From f22b6078b095ec30071da836ce7e3c6f8c32e253 Mon Sep 17 00:00:00 2001 From: atheesh Date: Fri, 9 Feb 2024 10:08:48 +0530 Subject: [PATCH 01/15] code clean up --- ante/expected_keepers.go | 1 + ante/testutil_test.go | 12 +- api/go.mod | 24 +- api/go.sum | 35 +- app/ante.go | 2 + app/app.go | 45 +- app/export.go | 2 +- app/migrations/migration_did_protobuf.go | 348 +- app/migrations/migration_resource_protobuf.go | 134 +- app/migrations/migrator.go | 21 +- {simapp => app}/test_helpers.go | 211 +- app/types.go | 2 +- cmd/cheqd-noded/cmd/root.go | 25 +- go.mod | 6 +- go.sum | 13 +- go.work | 2 + go.work.sum | 38 +- make/proto.mk | 33 +- proto/cheqd/did/v1/common.proto | 9 - proto/cheqd/did/v1/did.proto | 35 - proto/cheqd/did/v1/genesis.proto | 12 - proto/cheqd/did/v1/query.proto | 24 - proto/cheqd/did/v1/stateValue.proto | 20 - proto/cheqd/did/v1/tx.proto | 82 - proto/cheqd/resource/v1/genesis.proto | 11 - proto/cheqd/resource/v1/query.proto | 47 - proto/cheqd/resource/v1/resource.proto | 21 - proto/cheqd/resource/v1/tx.proto | 30 - scripts/protocgen.sh | 4 +- tests/upgrade/integration/v1/cli/query_did.go | 26 +- .../integration/v1/cli/query_resource.go | 26 +- tests/upgrade/integration/v1/cli/tx_did.go | 82 +- tests/upgrade/integration/v1/config.go | 6 - .../create - resource/resource_post_indy.json | 26 - .../create - resource/resource_post_uuid.json | 26 - .../deactivate - diddoc/diddoc_indy_32.json | 11 - .../diddoc_uuid_lowcase.json | 11 - .../diddoc_uuid_mixed.json | 11 - .../post/query - diddoc/diddoc_indy_16.json | 65 - .../post/query - diddoc/diddoc_indy_32.json | 72 - .../query - diddoc/diddoc_uuid_lowcase.json | 65 - .../query - diddoc/diddoc_uuid_mixed.json | 76 - .../query - diddoc/diddoc_uuid_uppercase.json | 66 - .../post/query - module-version-map/v1.json | 98 - .../query - resource/resource_indy_16.json | 24 - .../query - resource/resource_post_indy.json | 32 - .../query - resource/resource_post_uuid.json | 32 - .../resource_uuid_lower_1.json | 24 - .../resource_uuid_lower_2.json | 24 - .../resource_uuid_mixed_1.json | 24 - .../resource_uuid_mixed_2.json | 24 - .../resource_uuid_mixed_3.json | 24 - .../post/update - diddoc/diddoc_indy_16.json | 71 - .../update - diddoc/diddoc_uuid_lowcase.json | 71 - .../diddoc_uuid_uppercase.json | 72 - .../pre/create - diddoc/diddoc_indy_16.json | 80 - .../pre/create - diddoc/diddoc_indy_32.json | 80 - .../create - diddoc/diddoc_uuid_lowcase.json | 80 - .../create - diddoc/diddoc_uuid_mixed.json | 80 - .../diddoc_uuid_uppercase.json | 80 - .../create - resource/resource_indy_16.json | 15 - .../resource_uuid_lower_1.json | 15 - .../resource_uuid_lower_2.json | 15 - .../resource_uuid_mixed_1.json | 15 - .../resource_uuid_mixed_2.json | 15 - .../resource_uuid_mixed_3.json | 15 - .../pre/query - module-version-map/v069.json | 84 - .../v1/generated/pre/signinputs/indy_16.json | 6 - .../v1/generated/pre/signinputs/indy_16.keys | 2 - .../v1/generated/pre/signinputs/indy_32.json | 6 - .../v1/generated/pre/signinputs/indy_32.keys | 2 - .../pre/signinputs/uuid_lowcase.json | 6 - .../pre/signinputs/uuid_lowcase.keys | 2 - .../generated/pre/signinputs/uuid_mixed.json | 6 - .../generated/pre/signinputs/uuid_mixed.keys | 2 - .../pre/signinputs/uuid_uppercase.json | 6 - .../pre/signinputs/uuid_uppercase.keys | 2 - .../pre/update - diddoc/diddoc_indy_16.json | 83 - .../update - diddoc/diddoc_uuid_lowcase.json | 64 - .../update - diddoc/diddoc_uuid_mixed.json | 80 - .../proposal/existing/param_change_did.json | 13 - .../existing/param_change_resource.json | 13 - .../proposal/expected/param_change_did.json | 15 - .../expected/param_change_resource.json | 15 - tests/upgrade/integration/v1/glob.go | 18 - tests/upgrade/integration/v1/helpers.go | 26 - tests/upgrade/integration/v1/loader.go | 71 - .../upgrade/integration/v1/network/config.go | 10 - .../v1/param_change_proposal_test.go | 158 - tests/upgrade/integration/v1/post_test.go | 225 -- tests/upgrade/integration/v1/pre_test.go | 186 - .../integration/v1/upgrade_suite_test.go | 15 - tests/upgrade/integration/v2/loader.go | 25 +- .../keeper_param_change_proposal_test.go | 6 +- x/did/keeper/querier.go | 47 +- x/did/keeper/v1/keeper.go | 30 - x/did/keeper/v1/keeper_config.go | 41 - x/did/keeper/v1/keeper_did.go | 110 - x/did/module.go | 12 +- x/did/types/diddoc.pb.go | 16 +- x/did/types/fee.pb.go | 2 +- x/did/types/genesis.pb.go | 2 +- x/did/types/query.pb.go | 4 +- x/did/types/tx.pb.go | 4 +- x/did/types/tx_msg_create_diddoc_payload.go | 32 +- x/did/types/v1/codec.go | 37 - x/did/types/v1/common.pb.go | 367 -- x/did/types/v1/did.pb.go | 1559 -------- x/did/types/v1/did_verification_method.go | 6 - x/did/types/v1/genesis.pb.go | 381 -- x/did/types/v1/keys.go | 27 - x/did/types/v1/query.pb.go | 650 --- x/did/types/v1/query.pb.gw.go | 189 - x/did/types/v1/stateValue.go | 67 - x/did/types/v1/stateValue.pb.go | 763 ---- x/did/types/v1/tx.go | 5 - x/did/types/v1/tx.pb.go | 3551 ----------------- .../keeper_param_change_proposal_test.go | 7 +- x/resource/keeper/querier.go | 48 +- x/resource/keeper/v1/keeper.go | 28 - x/resource/keeper/v1/keeper_resource.go | 211 - x/resource/module.go | 16 +- x/resource/types/fee.pb.go | 2 +- x/resource/types/genesis.pb.go | 2 +- x/resource/types/query.pb.go | 4 +- x/resource/types/resource.pb.go | 10 +- x/resource/types/tx.pb.go | 4 +- x/resource/types/v1/genesis.pb.go | 328 -- x/resource/types/v1/keys.go | 25 - x/resource/types/v1/query.pb.go | 1528 ------- x/resource/types/v1/query.pb.gw.go | 453 --- x/resource/types/v1/resource.pb.go | 969 ----- x/resource/types/v1/tx.pb.go | 1042 ----- 133 files changed, 692 insertions(+), 15862 deletions(-) rename {simapp => app}/test_helpers.go (73%) delete mode 100644 proto/cheqd/did/v1/common.proto delete mode 100644 proto/cheqd/did/v1/did.proto delete mode 100644 proto/cheqd/did/v1/genesis.proto delete mode 100644 proto/cheqd/did/v1/query.proto delete mode 100644 proto/cheqd/did/v1/stateValue.proto delete mode 100644 proto/cheqd/did/v1/tx.proto delete mode 100644 proto/cheqd/resource/v1/genesis.proto delete mode 100644 proto/cheqd/resource/v1/query.proto delete mode 100644 proto/cheqd/resource/v1/resource.proto delete mode 100644 proto/cheqd/resource/v1/tx.proto delete mode 100644 tests/upgrade/integration/v1/config.go delete mode 100644 tests/upgrade/integration/v1/generated/post/create - resource/resource_post_indy.json delete mode 100644 tests/upgrade/integration/v1/generated/post/create - resource/resource_post_uuid.json delete mode 100644 tests/upgrade/integration/v1/generated/post/deactivate - diddoc/diddoc_indy_32.json delete mode 100644 tests/upgrade/integration/v1/generated/post/deactivate - diddoc/diddoc_uuid_lowcase.json delete mode 100644 tests/upgrade/integration/v1/generated/post/deactivate - diddoc/diddoc_uuid_mixed.json delete mode 100644 tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_indy_16.json delete mode 100644 tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_indy_32.json delete mode 100644 tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_uuid_lowcase.json delete mode 100644 tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_uuid_mixed.json delete mode 100644 tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_uuid_uppercase.json delete mode 100644 tests/upgrade/integration/v1/generated/post/query - module-version-map/v1.json delete mode 100644 tests/upgrade/integration/v1/generated/post/query - resource/resource_indy_16.json delete mode 100644 tests/upgrade/integration/v1/generated/post/query - resource/resource_post_indy.json delete mode 100644 tests/upgrade/integration/v1/generated/post/query - resource/resource_post_uuid.json delete mode 100644 tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_lower_1.json delete mode 100644 tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_lower_2.json delete mode 100644 tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_mixed_1.json delete mode 100644 tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_mixed_2.json delete mode 100644 tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_mixed_3.json delete mode 100644 tests/upgrade/integration/v1/generated/post/update - diddoc/diddoc_indy_16.json delete mode 100644 tests/upgrade/integration/v1/generated/post/update - diddoc/diddoc_uuid_lowcase.json delete mode 100644 tests/upgrade/integration/v1/generated/post/update - diddoc/diddoc_uuid_uppercase.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_indy_16.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_indy_32.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_uuid_lowcase.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_uuid_mixed.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_uuid_uppercase.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/create - resource/resource_indy_16.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_lower_1.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_lower_2.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_mixed_1.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_mixed_2.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_mixed_3.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/query - module-version-map/v069.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/signinputs/indy_16.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/signinputs/indy_16.keys delete mode 100644 tests/upgrade/integration/v1/generated/pre/signinputs/indy_32.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/signinputs/indy_32.keys delete mode 100644 tests/upgrade/integration/v1/generated/pre/signinputs/uuid_lowcase.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/signinputs/uuid_lowcase.keys delete mode 100644 tests/upgrade/integration/v1/generated/pre/signinputs/uuid_mixed.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/signinputs/uuid_mixed.keys delete mode 100644 tests/upgrade/integration/v1/generated/pre/signinputs/uuid_uppercase.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/signinputs/uuid_uppercase.keys delete mode 100644 tests/upgrade/integration/v1/generated/pre/update - diddoc/diddoc_indy_16.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/update - diddoc/diddoc_uuid_lowcase.json delete mode 100644 tests/upgrade/integration/v1/generated/pre/update - diddoc/diddoc_uuid_mixed.json delete mode 100644 tests/upgrade/integration/v1/generated/proposal/existing/param_change_did.json delete mode 100644 tests/upgrade/integration/v1/generated/proposal/existing/param_change_resource.json delete mode 100644 tests/upgrade/integration/v1/generated/proposal/expected/param_change_did.json delete mode 100644 tests/upgrade/integration/v1/generated/proposal/expected/param_change_resource.json delete mode 100644 tests/upgrade/integration/v1/glob.go delete mode 100644 tests/upgrade/integration/v1/helpers.go delete mode 100644 tests/upgrade/integration/v1/loader.go delete mode 100644 tests/upgrade/integration/v1/network/config.go delete mode 100644 tests/upgrade/integration/v1/param_change_proposal_test.go delete mode 100644 tests/upgrade/integration/v1/post_test.go delete mode 100644 tests/upgrade/integration/v1/pre_test.go delete mode 100644 tests/upgrade/integration/v1/upgrade_suite_test.go delete mode 100644 x/did/keeper/v1/keeper.go delete mode 100644 x/did/keeper/v1/keeper_config.go delete mode 100644 x/did/keeper/v1/keeper_did.go delete mode 100644 x/did/types/v1/codec.go delete mode 100644 x/did/types/v1/common.pb.go delete mode 100644 x/did/types/v1/did.pb.go delete mode 100644 x/did/types/v1/did_verification_method.go delete mode 100644 x/did/types/v1/genesis.pb.go delete mode 100644 x/did/types/v1/keys.go delete mode 100644 x/did/types/v1/query.pb.go delete mode 100644 x/did/types/v1/query.pb.gw.go delete mode 100644 x/did/types/v1/stateValue.go delete mode 100644 x/did/types/v1/stateValue.pb.go delete mode 100644 x/did/types/v1/tx.go delete mode 100644 x/did/types/v1/tx.pb.go delete mode 100644 x/resource/keeper/v1/keeper.go delete mode 100644 x/resource/keeper/v1/keeper_resource.go delete mode 100644 x/resource/types/v1/genesis.pb.go delete mode 100644 x/resource/types/v1/keys.go delete mode 100644 x/resource/types/v1/query.pb.go delete mode 100644 x/resource/types/v1/query.pb.gw.go delete mode 100644 x/resource/types/v1/resource.pb.go delete mode 100644 x/resource/types/v1/tx.pb.go diff --git a/ante/expected_keepers.go b/ante/expected_keepers.go index ee1847002..e86569c7d 100644 --- a/ante/expected_keepers.go +++ b/ante/expected_keepers.go @@ -11,6 +11,7 @@ type BankKeeper interface { SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error + IsSendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error } type DidKeeper interface { diff --git a/ante/testutil_test.go b/ante/testutil_test.go index da083260c..d4ce0719b 100644 --- a/ante/testutil_test.go +++ b/ante/testutil_test.go @@ -7,8 +7,8 @@ import ( tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/suite" + "github.com/cheqd/cheqd-node/app" cheqdapp "github.com/cheqd/cheqd-node/app" - "github.com/cheqd/cheqd-node/simapp" didtypes "github.com/cheqd/cheqd-node/x/did/types" resourcetypes "github.com/cheqd/cheqd-node/x/resource/types" @@ -34,7 +34,7 @@ type TestAccount struct { type AnteTestSuite struct { suite.Suite - app *simapp.SimApp + app *app.TestApp anteHandler sdk.AnteHandler ctx sdk.Context clientCtx client.Context @@ -42,8 +42,8 @@ type AnteTestSuite struct { } // returns context and app with params set on account keeper -func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context, error) { - app, err := simapp.Setup(isCheckTx) +func createTestApp(isCheckTx bool) (*app.TestApp, sdk.Context, error) { + app, err := app.Setup(isCheckTx) if err != nil { return nil, sdk.Context{}, err } @@ -76,8 +76,8 @@ func (s *AnteTestSuite) SetupTest(isCheckTx bool) error { s.clientCtx = client.Context{}. WithTxConfig(encodingConfig.TxConfig) - anteHandler, err := simapp.NewAnteHandler( - simapp.HandlerOptions{ + anteHandler, err := app.NewAnteHandler( + app.HandlerOptions{ AccountKeeper: s.app.AccountKeeper, BankKeeper: s.app.BankKeeper, FeegrantKeeper: s.app.FeeGrantKeeper, diff --git a/api/go.mod b/api/go.mod index 63582ce03..bb7328252 100644 --- a/api/go.mod +++ b/api/go.mod @@ -3,20 +3,22 @@ module github.com/cheqd/cheqd-node/api/v2 go 1.21 require ( - github.com/cosmos/cosmos-proto v1.0.0-alpha8 + github.com/cosmos/cosmos-proto v1.0.0-beta.2 github.com/cosmos/cosmos-sdk/api v0.1.0 - github.com/cosmos/gogoproto v1.4.6 - google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f - google.golang.org/grpc v1.53.0 - google.golang.org/protobuf v1.28.1 + github.com/cosmos/gogoproto v1.4.11 + google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 + google.golang.org/grpc v1.60.1 + google.golang.org/protobuf v1.32.0 ) require ( github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect - golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/go-cmp v0.6.0 // indirect + golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect ) diff --git a/api/go.sum b/api/go.sum index 5895fbefe..4c53038ca 100644 --- a/api/go.sum +++ b/api/go.sum @@ -1,17 +1,13 @@ -github.com/cosmos/cosmos-proto v1.0.0-alpha8 h1:d3pCRuMYYvGA5bM0ZbbjKn+AoQD4A7dyNG2wzwWalUw= -github.com/cosmos/cosmos-proto v1.0.0-alpha8/go.mod h1:6/p+Bc4O8JKeZqe0VqUGTX31eoYqemTT4C1hLCWsO7I= +github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= github.com/cosmos/cosmos-sdk/api v0.1.0 h1:xfSKM0e9p+EJTMQnf5PbWE6VT8ruxTABIJ64Rd064dE= github.com/cosmos/cosmos-sdk/api v0.1.0/go.mod h1:CupqQBskAOiTXO1XDZ/wrtWzN/wTxUvbQmOqdUhR8wI= -github.com/cosmos/gogoproto v1.4.6 h1:Ee7z15dWJaGlgM2rWrK8N2IX7PQcuccu8oG68jp5RL4= -github.com/cosmos/gogoproto v1.4.6/go.mod h1:VS/ASYmPgv6zkPKLjR9EB91lwbLHOzaGCirmKKhncfI= +github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -19,28 +15,24 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 h1:BEABXpNXLEz0WxtA+6CQIz2xkg80e+1zrhWyMcq8VzE= -golang.org/x/exp v0.0.0-20230131160201-f062dba9d201/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -49,11 +41,10 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 h1:nz5NESFLZbJGPFxDT/HCn+V1mZ8JGNoY4nUpmW/Y2eg= +google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 h1:s1w3X6gQxwrLEpxnLd/qXTVLgQE2yXwaOaoa6IlY/+o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 h1:gphdwh0npgs8elJ4T6J+DQJHPVF7RsuJHCfwztUb4J4= +google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= diff --git a/app/ante.go b/app/ante.go index 8f86664d8..7b2618d4e 100644 --- a/app/ante.go +++ b/app/ante.go @@ -23,6 +23,8 @@ type HandlerOptions struct { SigGasConsumer func(meter sdk.GasMeter, sig signing.SignatureV2, params types.Params) error TxFeeChecker cheqdante.TxFeeChecker IBCKeeper *ibckeeper.Keeper + DidKeeper cheqdante.DidKeeper + ResourceKeeper cheqdante.ResourceKeeper } // NewAnteHandler returns an AnteHandler that checks and increments sequence diff --git a/app/app.go b/app/app.go index 957b90b3e..95a24ceb0 100644 --- a/app/app.go +++ b/app/app.go @@ -24,6 +24,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" @@ -231,13 +232,15 @@ type App struct { ScopedICAHostKeeper capabilitykeeper.ScopedKeeper ScopedResourceKeeper capabilitykeeper.ScopedKeeper - didKeeper didkeeper.Keeper - resourceKeeper resourcekeeper.Keeper + DidKeeper didkeeper.Keeper + ResourceKeeper resourcekeeper.Keeper // the module manager ModuleManager *module.Manager configurator module.Configurator + + sm *module.SimulationManager } func init() { @@ -556,7 +559,7 @@ func New( AddRoute(icahosttypes.SubModuleName, icaHostStack) // x/resource - app.resourceKeeper = *resourcekeeper.NewKeeper( + app.ResourceKeeper = *resourcekeeper.NewKeeper( appCodec, keys[resourcetypes.StoreKey], app.GetSubspace(resourcetypes.ModuleName), &app.IBCKeeper.PortKeeper, @@ -565,7 +568,7 @@ func New( // create the resource IBC stack var resourceIbcStack porttypes.IBCModule - resourceIbcStack = resource.NewIBCModule(app.resourceKeeper) + resourceIbcStack = resource.NewIBCModule(app.ResourceKeeper) resourceIbcStack = ibcfee.NewIBCMiddleware(resourceIbcStack, app.IBCFeeKeeper) // Add resource stack to IBC Router @@ -588,7 +591,7 @@ func New( // If evidence needs to be handled for the app, set routes in router here and seal app.EvidenceKeeper = *evidenceKeeper - app.didKeeper = *didkeeper.NewKeeper( + app.DidKeeper = *didkeeper.NewKeeper( appCodec, keys[didtypes.StoreKey], app.GetSubspace(didtypes.ModuleName), ) @@ -626,8 +629,8 @@ func New( ibcfee.NewAppModule(app.IBCFeeKeeper), icaModule, // cheqd modules - did.NewAppModule(appCodec, app.didKeeper), - resource.NewAppModule(appCodec, app.resourceKeeper, app.didKeeper), + did.NewAppModule(appCodec, app.DidKeeper), + resource.NewAppModule(appCodec, app.ResourceKeeper, app.DidKeeper), ) // During begin block slashing happens after distr.BeginBlocker so that @@ -748,12 +751,22 @@ func New( tmos.Exit(err.Error()) } + // create the simulation manager and define the order of the modules for deterministic simulations + // + // NOTE: this is not required apps that don't use the simulator for fuzz testing + // transactions + overrideModules := map[string]module.AppModuleSimulation{ + authtypes.ModuleName: auth.NewAppModule(app.appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), + } + app.sm = module.NewSimulationManagerFromAppModules(app.ModuleManager.Modules, overrideModules) + app.sm.RegisterStoreDecoders() + // postHandler, err := posthandler.NewPostHandler(posthandler.HandlerOptions{ // AccountKeeper: app.AccountKeeper, // BankKeeper: app.BankKeeper, // FeegrantKeeper: app.FeeGrantKeeper, - // DidKeeper: app.didKeeper, - // ResourceKeeper: app.resourceKeeper, + // DidKeeper: app.DidKeeper, + // ResourceKeeper: app.ResourceKeeper, // }) // if err != nil { // tmos.Exit(err.Error()) @@ -809,6 +822,16 @@ func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.Res return app.ModuleManager.InitGenesis(ctx, app.appCodec, genesisState) } +// RegisterNodeService registers the node gRPC service on the app gRPC router. +func (a *App) RegisterNodeService(clientCtx client.Context) { + nodeservice.RegisterNodeService(clientCtx, a.GRPCQueryRouter()) +} + +// SimulationManager implements the SimulationApp interface. +func (app *App) SimulationManager() *module.SimulationManager { + return app.sm +} + // LoadHeight loads a particular height func (app *App) LoadHeight(height int64) error { return app.LoadVersion(height) @@ -1066,8 +1089,8 @@ func (app *App) upgradeHandlerV1(icaModule ica.AppModule, didStoreKey *storetype migrationContext, []migrations.Migration{ // Protobufs - migrations.MigrateDidProtobuf, - migrations.MigrateResourceProtobuf, + // migrations.MigrateDidProtobuf, + // migrations.MigrateResourceProtobuf, // Indy style migrations.MigrateDidIndyStyle, diff --git a/app/export.go b/app/export.go index 73f43060e..396d0aecc 100644 --- a/app/export.go +++ b/app/export.go @@ -17,7 +17,7 @@ import ( // ExportAppStateAndValidators exports the state of the application for a genesis // file. func (app *App) ExportAppStateAndValidators( - forZeroHeight bool, jailAllowedAddrs []string, + forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error) { // as if they could withdraw from the start of the next block ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) diff --git a/app/migrations/migration_did_protobuf.go b/app/migrations/migration_did_protobuf.go index cc586f6be..9e6a9735e 100644 --- a/app/migrations/migration_did_protobuf.go +++ b/app/migrations/migration_did_protobuf.go @@ -1,176 +1,176 @@ package migrations -import ( - "encoding/json" - - "github.com/cheqd/cheqd-node/app/migrations/helpers" - didtypes "github.com/cheqd/cheqd-node/x/did/types" - didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" - didutils "github.com/cheqd/cheqd-node/x/did/utils" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func MigrateDidProtobuf(sctx sdk.Context, mctx MigrationContext) error { - sctx.Logger().Debug("MigrateDidProtobuf: Starting migration") - - codec := NewLegacyProtoCodec() - store := sctx.KVStore(mctx.didStoreKey) - - sctx.Logger().Debug("MigrateDidProtobuf: Erasing old count key") - // Erase old broken count key - store.Delete([]byte(didtypesv1.DidCountKey + didtypesv1.DidCountKey)) - - sctx.Logger().Debug("MigrateResourceProtobuf: Reading all keys") - didKeys := helpers.ReadAllKeys(store, didutils.StrBytes(didtypesv1.DidKey)) - - for _, didKey := range didKeys { - sctx.Logger().Debug("MigrateDidProtobuf: Starting migration for didKey: " + string(didKey)) - - var stateValue didtypesv1.StateValue - sctx.Logger().Debug("MigrateDidProtobuf: Reading StateValue of DID from store") - codec.MustUnmarshal(store.Get(didKey), &stateValue) - - sctx.Logger().Debug("MigrateDidProtobuf: Migrating StateValue for DidDocWithMetadata") - newDidDocWithMetadata, err := MigrateStateValue(sctx, mctx, &stateValue) - if err != nil { - return err - } - - // Remove old DID Doc - store.Delete(didKey) - - sctx.Logger().Debug("MigrateDidProtobuf: Setting DidDocWithMetadata to store") - // Set new DID Doc - err = mctx.didKeeperNew.AddNewDidDocVersion(&sctx, &newDidDocWithMetadata) - if err != nil { - return err - } - sctx.Logger().Debug("MigrateDidProtobuf: Migration finished for didKey: " + string(didKey)) - } - - // Migrate DID namespace (at least make sure it's not changed) - if didtypesv1.DidNamespaceKey != didtypes.DidNamespaceKey { - panic("DID namespace key is changed") - } - sctx.Logger().Debug("MigrateDidProtobuf: Migration finished") - - return nil -} - -func NewLegacyProtoCodec() *codec.ProtoCodec { - ir := codectypes.NewInterfaceRegistry() - - ir.RegisterInterface("StateValueData", (*didtypesv1.StateValueData)(nil)) - ir.RegisterImplementations((*didtypesv1.StateValueData)(nil), &didtypesv1.Did{}) - - return codec.NewProtoCodec(ir) -} - -func MigrateStateValue(sctx sdk.Context, mctx MigrationContext, stateValue *didtypesv1.StateValue) (didtypes.DidDocWithMetadata, error) { - oldDidDoc, err := stateValue.UnpackDataAsDid() - if err != nil { - return didtypes.DidDocWithMetadata{}, err - } - - oldMetadata := stateValue.Metadata - - sctx.Logger().Debug("MigrateDidProtobuf: OldMetadata: " + string(mctx.codec.MustMarshalJSON(oldMetadata))) - newDidDoc := MigrateDidDoc(oldDidDoc) - newMetadata := MigrateMetadata(oldMetadata) - sctx.Logger().Debug("MigrateDidProtobuf: NewMetadata: " + string(mctx.codec.MustMarshalJSON(&newMetadata))) - - return didtypes.DidDocWithMetadata{ - DidDoc: &newDidDoc, - Metadata: &newMetadata, - }, nil -} - -func MigrateMetadata(metadata *didtypesv1.Metadata) didtypes.Metadata { - updated := helpers.MustParseFromStringTimeToGoTime(metadata.Updated) - return didtypes.Metadata{ - Created: helpers.MustParseFromStringTimeToGoTime(metadata.Created), - Updated: &updated, - Deactivated: metadata.Deactivated, - VersionId: metadata.VersionId, - NextVersionId: "", - PreviousVersionId: "", - } -} - -func MigrateDidDoc(oldDid *didtypesv1.Did) didtypes.DidDoc { - vms := []*didtypes.VerificationMethod{} - for _, vm := range oldDid.VerificationMethod { - vms = append( - vms, - &didtypes.VerificationMethod{ - Id: vm.Id, - VerificationMethodType: MigrateType(vm.Type), - Controller: vm.Controller, - VerificationMaterial: MigrateVerificationMaterial(vm), - }) - } - - srvs := []*didtypes.Service{} - for _, srv := range oldDid.Service { - srvs = append( - srvs, - &didtypes.Service{ - Id: srv.Id, - ServiceType: srv.Type, - ServiceEndpoint: []string{srv.ServiceEndpoint}, - }) - } - - return didtypes.DidDoc{ - Id: oldDid.Id, - VerificationMethod: vms, - Service: srvs, - Context: oldDid.Context, - Controller: oldDid.Controller, - Authentication: oldDid.Authentication, - AssertionMethod: oldDid.AssertionMethod, - CapabilityDelegation: oldDid.CapabilityDelegation, - CapabilityInvocation: oldDid.CapabilityInvocation, - KeyAgreement: oldDid.KeyAgreement, - AlsoKnownAs: oldDid.AlsoKnownAs, - } -} - -func MigrateType(t string) string { - switch t { - case didtypesv1.Ed25519VerificationKey2020: - return didtypes.Ed25519VerificationKey2020Type - case didtypesv1.JSONWebKey2020: - return didtypes.JSONWebKey2020Type - default: - panic("Unknown type") - } -} - -func MigrateVerificationMaterial(vm *didtypesv1.VerificationMethod) string { - switch vm.Type { - case didtypesv1.JSONWebKey2020: - jwk := make(map[string]string) - for _, kv := range vm.PublicKeyJwk { - jwk[kv.Key] = kv.Value - } - res, err := json.Marshal(jwk) - if err != nil { - panic(err) - } - return string(res) - - case didtypesv1.Ed25519VerificationKey2020: - pkMulti, err := helpers.GenerateEd25519VerificationKey2020VerificationMaterial(vm.PublicKeyMultibase) - if err != nil { - panic(err) - } - - return pkMulti - - default: - panic("Unknown type") - } -} +// import ( +// "encoding/json" + +// "github.com/cheqd/cheqd-node/app/migrations/helpers" +// didtypes "github.com/cheqd/cheqd-node/x/did/types" +// didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" +// didutils "github.com/cheqd/cheqd-node/x/did/utils" +// "github.com/cosmos/cosmos-sdk/codec" +// codectypes "github.com/cosmos/cosmos-sdk/codec/types" +// sdk "github.com/cosmos/cosmos-sdk/types" +// ) + +// func MigrateDidProtobuf(sctx sdk.Context, mctx MigrationContext) error { +// sctx.Logger().Debug("MigrateDidProtobuf: Starting migration") + +// codec := NewLegacyProtoCodec() +// store := sctx.KVStore(mctx.didStoreKey) + +// sctx.Logger().Debug("MigrateDidProtobuf: Erasing old count key") +// // Erase old broken count key +// store.Delete([]byte(didtypesv1.DidCountKey + didtypesv1.DidCountKey)) + +// sctx.Logger().Debug("MigrateResourceProtobuf: Reading all keys") +// didKeys := helpers.ReadAllKeys(store, didutils.StrBytes(didtypesv1.DidKey)) + +// for _, didKey := range didKeys { +// sctx.Logger().Debug("MigrateDidProtobuf: Starting migration for didKey: " + string(didKey)) + +// var stateValue didtypesv1.StateValue +// sctx.Logger().Debug("MigrateDidProtobuf: Reading StateValue of DID from store") +// codec.MustUnmarshal(store.Get(didKey), &stateValue) + +// sctx.Logger().Debug("MigrateDidProtobuf: Migrating StateValue for DidDocWithMetadata") +// newDidDocWithMetadata, err := MigrateStateValue(sctx, mctx, &stateValue) +// if err != nil { +// return err +// } + +// // Remove old DID Doc +// store.Delete(didKey) + +// sctx.Logger().Debug("MigrateDidProtobuf: Setting DidDocWithMetadata to store") +// // Set new DID Doc +// err = mctx.didKeeperNew.AddNewDidDocVersion(&sctx, &newDidDocWithMetadata) +// if err != nil { +// return err +// } +// sctx.Logger().Debug("MigrateDidProtobuf: Migration finished for didKey: " + string(didKey)) +// } + +// // Migrate DID namespace (at least make sure it's not changed) +// if didtypesv1.DidNamespaceKey != didtypes.DidNamespaceKey { +// panic("DID namespace key is changed") +// } +// sctx.Logger().Debug("MigrateDidProtobuf: Migration finished") + +// return nil +// } + +// func NewLegacyProtoCodec() *codec.ProtoCodec { +// ir := codectypes.NewInterfaceRegistry() + +// ir.RegisterInterface("StateValueData", (*didtypesv1.StateValueData)(nil)) +// ir.RegisterImplementations((*didtypesv1.StateValueData)(nil), &didtypesv1.Did{}) + +// return codec.NewProtoCodec(ir) +// } + +// func MigrateStateValue(sctx sdk.Context, mctx MigrationContext, stateValue *didtypesv1.StateValue) (didtypes.DidDocWithMetadata, error) { +// oldDidDoc, err := stateValue.UnpackDataAsDid() +// if err != nil { +// return didtypes.DidDocWithMetadata{}, err +// } + +// oldMetadata := stateValue.Metadata + +// sctx.Logger().Debug("MigrateDidProtobuf: OldMetadata: " + string(mctx.codec.MustMarshalJSON(oldMetadata))) +// newDidDoc := MigrateDidDoc(oldDidDoc) +// newMetadata := MigrateMetadata(oldMetadata) +// sctx.Logger().Debug("MigrateDidProtobuf: NewMetadata: " + string(mctx.codec.MustMarshalJSON(&newMetadata))) + +// return didtypes.DidDocWithMetadata{ +// DidDoc: &newDidDoc, +// Metadata: &newMetadata, +// }, nil +// } + +// func MigrateMetadata(metadata *didtypesv1.Metadata) didtypes.Metadata { +// updated := helpers.MustParseFromStringTimeToGoTime(metadata.Updated) +// return didtypes.Metadata{ +// Created: helpers.MustParseFromStringTimeToGoTime(metadata.Created), +// Updated: &updated, +// Deactivated: metadata.Deactivated, +// VersionId: metadata.VersionId, +// NextVersionId: "", +// PreviousVersionId: "", +// } +// } + +// func MigrateDidDoc(oldDid *didtypesv1.Did) didtypes.DidDoc { +// vms := []*didtypes.VerificationMethod{} +// for _, vm := range oldDid.VerificationMethod { +// vms = append( +// vms, +// &didtypes.VerificationMethod{ +// Id: vm.Id, +// VerificationMethodType: MigrateType(vm.Type), +// Controller: vm.Controller, +// VerificationMaterial: MigrateVerificationMaterial(vm), +// }) +// } + +// srvs := []*didtypes.Service{} +// for _, srv := range oldDid.Service { +// srvs = append( +// srvs, +// &didtypes.Service{ +// Id: srv.Id, +// ServiceType: srv.Type, +// ServiceEndpoint: []string{srv.ServiceEndpoint}, +// }) +// } + +// return didtypes.DidDoc{ +// Id: oldDid.Id, +// VerificationMethod: vms, +// Service: srvs, +// Context: oldDid.Context, +// Controller: oldDid.Controller, +// Authentication: oldDid.Authentication, +// AssertionMethod: oldDid.AssertionMethod, +// CapabilityDelegation: oldDid.CapabilityDelegation, +// CapabilityInvocation: oldDid.CapabilityInvocation, +// KeyAgreement: oldDid.KeyAgreement, +// AlsoKnownAs: oldDid.AlsoKnownAs, +// } +// } + +// func MigrateType(t string) string { +// switch t { +// case didtypesv1.Ed25519VerificationKey2020: +// return didtypes.Ed25519VerificationKey2020Type +// case didtypesv1.JSONWebKey2020: +// return didtypes.JSONWebKey2020Type +// default: +// panic("Unknown type") +// } +// } + +// func MigrateVerificationMaterial(vm *didtypesv1.VerificationMethod) string { +// switch vm.Type { +// case didtypesv1.JSONWebKey2020: +// jwk := make(map[string]string) +// for _, kv := range vm.PublicKeyJwk { +// jwk[kv.Key] = kv.Value +// } +// res, err := json.Marshal(jwk) +// if err != nil { +// panic(err) +// } +// return string(res) + +// case didtypesv1.Ed25519VerificationKey2020: +// pkMulti, err := helpers.GenerateEd25519VerificationKey2020VerificationMaterial(vm.PublicKeyMultibase) +// if err != nil { +// panic(err) +// } + +// return pkMulti + +// default: +// panic("Unknown type") +// } +// } diff --git a/app/migrations/migration_resource_protobuf.go b/app/migrations/migration_resource_protobuf.go index 549176bc5..6303543bd 100644 --- a/app/migrations/migration_resource_protobuf.go +++ b/app/migrations/migration_resource_protobuf.go @@ -1,80 +1,80 @@ package migrations -import ( - "encoding/hex" - "strings" +// import ( +// "encoding/hex" +// "strings" - "github.com/cheqd/cheqd-node/app/migrations/helpers" - didutils "github.com/cheqd/cheqd-node/x/did/utils" - resourcetypes "github.com/cheqd/cheqd-node/x/resource/types" - resourcetypesv1 "github.com/cheqd/cheqd-node/x/resource/types/v1" - sdk "github.com/cosmos/cosmos-sdk/types" -) +// "github.com/cheqd/cheqd-node/app/migrations/helpers" +// didutils "github.com/cheqd/cheqd-node/x/did/utils" +// resourcetypes "github.com/cheqd/cheqd-node/x/resource/types" +// resourcetypesv1 "github.com/cheqd/cheqd-node/x/resource/types/v1" +// sdk "github.com/cosmos/cosmos-sdk/types" +// ) -func MigrateResourceProtobuf(sctx sdk.Context, mctx MigrationContext) error { - sctx.Logger().Debug("MigrateResourceProtobuf: Starting migration") - // Storage for old headers and data - store := sctx.KVStore(mctx.resourceStoreKey) +// func MigrateResourceProtobuf(sctx sdk.Context, mctx MigrationContext) error { +// sctx.Logger().Debug("MigrateResourceProtobuf: Starting migration") +// // Storage for old headers and data +// store := sctx.KVStore(mctx.resourceStoreKey) - sctx.Logger().Debug("MigrateResourceProtobuf: Resetting counter") - // Reset counter - mctx.resourceKeeperNew.SetResourceCount(&sctx, 0) +// sctx.Logger().Debug("MigrateResourceProtobuf: Resetting counter") +// // Reset counter +// mctx.resourceKeeperNew.SetResourceCount(&sctx, 0) - sctx.Logger().Debug("MigrateResourceProtobuf: Reading all keys") - headerKeys := helpers.ReadAllKeys(store, didutils.StrBytes(resourcetypesv1.ResourceHeaderKey)) +// sctx.Logger().Debug("MigrateResourceProtobuf: Reading all keys") +// headerKeys := helpers.ReadAllKeys(store, didutils.StrBytes(resourcetypesv1.ResourceHeaderKey)) - for _, headerKey := range headerKeys { - sctx.Logger().Debug("MigrateResourceProtobuf: Starting migration for resource with header key: " + string(headerKey)) - dataKey := ResourceV1HeaderkeyToDataKey(headerKey) +// for _, headerKey := range headerKeys { +// sctx.Logger().Debug("MigrateResourceProtobuf: Starting migration for resource with header key: " + string(headerKey)) +// dataKey := ResourceV1HeaderkeyToDataKey(headerKey) - var oldHeader resourcetypesv1.ResourceHeader - mctx.codec.MustUnmarshal(store.Get(headerKey), &oldHeader) - oldData := store.Get(dataKey) +// var oldHeader resourcetypesv1.ResourceHeader +// mctx.codec.MustUnmarshal(store.Get(headerKey), &oldHeader) +// oldData := store.Get(dataKey) - sctx.Logger().Debug("MigrateResourceProtobuf: Collecting new resource metadata") - newMetadata := resourcetypes.Metadata{ - CollectionId: oldHeader.CollectionId, - Id: oldHeader.Id, - Name: oldHeader.Name, - Version: "", - ResourceType: oldHeader.ResourceType, - AlsoKnownAs: []*resourcetypes.AlternativeUri{}, - MediaType: oldHeader.MediaType, - Created: helpers.MustParseFromStringTimeToGoTime(oldHeader.Created), - Checksum: hex.EncodeToString(oldHeader.Checksum), - PreviousVersionId: oldHeader.PreviousVersionId, - NextVersionId: oldHeader.NextVersionId, - } +// sctx.Logger().Debug("MigrateResourceProtobuf: Collecting new resource metadata") +// newMetadata := resourcetypes.Metadata{ +// CollectionId: oldHeader.CollectionId, +// Id: oldHeader.Id, +// Name: oldHeader.Name, +// Version: "", +// ResourceType: oldHeader.ResourceType, +// AlsoKnownAs: []*resourcetypes.AlternativeUri{}, +// MediaType: oldHeader.MediaType, +// Created: helpers.MustParseFromStringTimeToGoTime(oldHeader.Created), +// Checksum: hex.EncodeToString(oldHeader.Checksum), +// PreviousVersionId: oldHeader.PreviousVersionId, +// NextVersionId: oldHeader.NextVersionId, +// } - resourceWithMetadata := resourcetypes.ResourceWithMetadata{ - Metadata: &newMetadata, - Resource: &resourcetypes.Resource{ - Data: oldData, - }, - } +// resourceWithMetadata := resourcetypes.ResourceWithMetadata{ +// Metadata: &newMetadata, +// Resource: &resourcetypes.Resource{ +// Data: oldData, +// }, +// } - sctx.Logger().Debug("MigrateResourceProtobuf: Remove old values") - // Remove old resource data and header - store.Delete(headerKey) - store.Delete(dataKey) +// sctx.Logger().Debug("MigrateResourceProtobuf: Remove old values") +// // Remove old resource data and header +// store.Delete(headerKey) +// store.Delete(dataKey) - sctx.Logger().Debug("MigrateResourceProtobuf: Write new resource with metadata") - // Write new resource - err := mctx.resourceKeeperNew.SetResource(&sctx, &resourceWithMetadata) - if err != nil { - return err - } - sctx.Logger().Debug("MigrateResourceProtobuf: Migration finished for resource with header key: " + string(headerKey)) - } - sctx.Logger().Debug("MigrateResourceProtobuf: Migration finished") - return nil -} +// sctx.Logger().Debug("MigrateResourceProtobuf: Write new resource with metadata") +// // Write new resource +// err := mctx.resourceKeeperNew.SetResource(&sctx, &resourceWithMetadata) +// if err != nil { +// return err +// } +// sctx.Logger().Debug("MigrateResourceProtobuf: Migration finished for resource with header key: " + string(headerKey)) +// } +// sctx.Logger().Debug("MigrateResourceProtobuf: Migration finished") +// return nil +// } -func ResourceV1HeaderkeyToDataKey(headerKey []byte) []byte { - return []byte( - strings.Replace( - string(headerKey), - string(resourcetypesv1.ResourceHeaderKey), - string(resourcetypesv1.ResourceDataKey), - 1)) -} +// func ResourceV1HeaderkeyToDataKey(headerKey []byte) []byte { +// return []byte( +// strings.Replace( +// string(headerKey), +// string(resourcetypesv1.ResourceHeaderKey), +// string(resourcetypesv1.ResourceDataKey), +// 1)) +// } diff --git a/app/migrations/migrator.go b/app/migrations/migrator.go index 5366e4cf6..28565ab41 100644 --- a/app/migrations/migrator.go +++ b/app/migrations/migrator.go @@ -2,10 +2,11 @@ package migrations import ( didkeeper "github.com/cheqd/cheqd-node/x/did/keeper" - didkeeperv1 "github.com/cheqd/cheqd-node/x/did/keeper/v1" + // didkeeperv1 "github.com/cheqd/cheqd-node/x/did/keeper/v1" didtypes "github.com/cheqd/cheqd-node/x/did/types" resourcekeeper "github.com/cheqd/cheqd-node/x/resource/keeper" - resourcekeeperv1 "github.com/cheqd/cheqd-node/x/resource/keeper/v1" + + // resourcekeeperv1 "github.com/cheqd/cheqd-node/x/resource/keeper/v1" resourcetypes "github.com/cheqd/cheqd-node/x/resource/types" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -45,12 +46,12 @@ type Migration func(sctx sdk.Context, mctx MigrationContext) error type MigrationContext struct { codec codec.Codec - didStoreKey *storetypes.KVStoreKey - didKeeperOld *didkeeperv1.Keeper + didStoreKey *storetypes.KVStoreKey + // didKeeperOld *didkeeperv1.Keeper didKeeperNew *didkeeper.Keeper - resourceStoreKey *storetypes.KVStoreKey - resourceKeeperOld *resourcekeeperv1.Keeper + resourceStoreKey *storetypes.KVStoreKey + // resourceKeeperOld *resourcekeeperv1.Keeper resourceKeeperNew *resourcekeeper.Keeper } @@ -66,12 +67,12 @@ func NewMigrationContext( return MigrationContext{ codec: codec, - didStoreKey: didStoreKey, - didKeeperOld: didkeeperv1.NewKeeper(codec, didStoreKey), + didStoreKey: didStoreKey, + // didKeeperOld: didkeeperv1.NewKeeper(codec, didStoreKey), didKeeperNew: didkeeper.NewKeeper(codec, didStoreKey, didSubspace), - resourceStoreKey: resourceStoreKey, - resourceKeeperOld: resourcekeeperv1.NewKeeper(codec, resourceStoreKey), + resourceStoreKey: resourceStoreKey, + // resourceKeeperOld: resourcekeeperv1.NewKeeper(codec, resourceStoreKey), resourceKeeperNew: resourcekeeper.NewKeeper(codec, resourceStoreKey, resourceSubspace, portKeeper, scopedKeeper), } } diff --git a/simapp/test_helpers.go b/app/test_helpers.go similarity index 73% rename from simapp/test_helpers.go rename to app/test_helpers.go index 8419ff6f2..19df01471 100644 --- a/simapp/test_helpers.go +++ b/app/test_helpers.go @@ -1,4 +1,4 @@ -package simapp +package app import ( "bytes" @@ -20,8 +20,6 @@ import ( sdkmath "cosmossdk.io/math" bam "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -34,18 +32,19 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" // cheqd specific imports - cheqdapp "github.com/cheqd/cheqd-node/app" didtypes "github.com/cheqd/cheqd-node/x/did/types" - resourcetypes "github.com/cheqd/cheqd-node/x/resource/types" ) +type TestApp struct { + App +} + // DefaultConsensusParams defines the default Tendermint consensus params used in // SimApp testing. -var DefaultConsensusParams = &abci.ConsensusParams{ - Block: &abci.BlockParams{ +var DefaultConsensusParams = &tmproto.ConsensusParams{ + Block: &tmproto.BlockParams{ MaxBytes: 200000, MaxGas: 2000000, }, @@ -72,18 +71,18 @@ type SetupOptions struct { AppOpts types.AppOptions } -func setup(withGenesis bool, invCheckPeriod uint) (*SimApp, cheqdapp.GenesisState) { +func setup(withGenesis bool, invCheckPeriod uint) (*TestApp, GenesisState) { db := dbm.NewMemDB() encCdc := moduletestutil.MakeTestEncodingConfig() - app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, invCheckPeriod, encCdc, EmptyAppOptions{}) + app := New(log.NewNopLogger(), db, nil, true, EmptyAppOptions{}) if withGenesis { - return app, cheqdapp.NewDefaultGenesisState(encCdc.Codec) + return &TestApp{App: *app}, NewDefaultGenesisState(encCdc.Codec) } - return app, cheqdapp.GenesisState{} + return &TestApp{*app}, GenesisState{} } // NewSimappWithCustomOptions initializes a new SimApp with custom options. -func NewSimappWithCustomOptions(isCheckTx bool, options SetupOptions) (*SimApp, error) { +func NewSimappWithCustomOptions(isCheckTx bool, options SetupOptions) (*TestApp, error) { privVal := mock.NewPV() pubKey, err := privVal.GetPubKey() if err != nil { @@ -101,9 +100,9 @@ func NewSimappWithCustomOptions(isCheckTx bool, options SetupOptions) (*SimApp, Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000000000))), } - app := NewSimApp(options.Logger, options.DB, nil, true, options.SkipUpgradeHeights, options.HomePath, options.InvCheckPeriod, options.EncConfig, options.AppOpts) - genesisState := cheqdapp.NewDefaultGenesisState(app.appCodec) - genesisState, err = genesisStateWithValSet(app, genesisState, valSet, []authtypes.GenesisAccount{acc}, balance) + app := New(options.Logger, options.DB, nil, true, options.AppOpts) + genesisState := NewDefaultGenesisState(app.appCodec) + genesisState, err = simtestutil.GenesisStateWithValSet(app.AppCodec(), genesisState, valSet, []authtypes.GenesisAccount{acc}, balance) if err != nil { return nil, err } @@ -125,11 +124,11 @@ func NewSimappWithCustomOptions(isCheckTx bool, options SetupOptions) (*SimApp, ) } - return app, nil + return &TestApp{*app}, nil } // Setup initializes a new SimApp. A Nop logger is set in SimApp. -func Setup(isCheckTx bool) (*SimApp, error) { +func Setup(isCheckTx bool) (*TestApp, error) { privVal := mock.NewPV() pubKey, err := privVal.GetPubKey() if err != nil { @@ -157,7 +156,7 @@ func Setup(isCheckTx bool) (*SimApp, error) { } // Setup initializes a new SimApp. A Nop logger is set in SimApp. -func SetupTest(isCheckTx bool) (*SimApp, error) { +func SetupTest(isCheckTx bool) (*TestApp, error) { privVal := mock.NewPV() pubKey, err := privVal.GetPubKey() if err != nil { @@ -183,89 +182,89 @@ func SetupTest(isCheckTx bool) (*SimApp, error) { return app, nil } -func genesisStateWithValSet( - app *SimApp, genesisState cheqdapp.GenesisState, - valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, - balances ...banktypes.Balance, -) (cheqdapp.GenesisState, error) { - // set genesis accounts - authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) - genesisState[authtypes.ModuleName] = app.AppCodec().MustMarshalJSON(authGenesis) - - validators := make([]stakingtypes.Validator, 0, len(valSet.Validators)) - delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators)) - - bondAmt := sdk.DefaultPowerReduction - - for _, val := range valSet.Validators { - pk, err := cryptocodec.FromTmPubKeyInterface(val.PubKey) - if err != nil { - return nil, err - } - pkAny, err := codectypes.NewAnyWithValue(pk) - if err != nil { - return nil, err - } - validator := stakingtypes.Validator{ - OperatorAddress: sdk.ValAddress(val.Address).String(), - ConsensusPubkey: pkAny, - Jailed: false, - Status: stakingtypes.Bonded, - Tokens: bondAmt, - DelegatorShares: sdk.OneDec(), - Description: stakingtypes.Description{}, - UnbondingHeight: int64(0), - UnbondingTime: time.Unix(0, 0).UTC(), - Commission: stakingtypes.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), - MinSelfDelegation: sdk.ZeroInt(), - } - validators = append(validators, validator) - delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec())) - - } - // set validators and delegations - stakingGenesis := stakingtypes.NewGenesisState(stakingtypes.DefaultParams(), validators, delegations) - genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(stakingGenesis) - - totalSupply := sdk.NewCoins() - for _, b := range balances { - // add genesis acc tokens to total supply - totalSupply = totalSupply.Add(b.Coins...) - } - - for range delegations { - // add delegated tokens to total supply - totalSupply = totalSupply.Add(sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)) - } - - // add bonded amount to bonded pool module account - balances = append(balances, banktypes.Balance{ - Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), - Coins: sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)}, - }) - - // update total supply - bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, totalSupply, []banktypes.Metadata{}) - genesisState[banktypes.ModuleName] = app.AppCodec().MustMarshalJSON(bankGenesis) - - // set did module genesis state - didGenesis := didtypes.DefaultGenesis() - genesisState[didtypes.ModuleName] = app.AppCodec().MustMarshalJSON(didGenesis) - - // set resource module genesis state - resourceGenesis := resourcetypes.DefaultGenesis() - genesisState[resourcetypes.ModuleName] = app.AppCodec().MustMarshalJSON(resourceGenesis) - - return genesisState, nil -} +// func genesisStateWithValSet( +// app *TestApp, genesisState GenesisState, +// valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, +// balances ...banktypes.Balance, +// ) (GenesisState, error) { +// // set genesis accounts +// authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) +// genesisState[authtypes.ModuleName] = app.AppCodec().MustMarshalJSON(authGenesis) + +// validators := make([]stakingtypes.Validator, 0, len(valSet.Validators)) +// delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators)) + +// bondAmt := sdk.DefaultPowerReduction + +// for _, val := range valSet.Validators { +// pk, err := cryptocodec.FromTmPubKeyInterface(val.PubKey) +// if err != nil { +// return nil, err +// } +// pkAny, err := codectypes.NewAnyWithValue(pk) +// if err != nil { +// return nil, err +// } +// validator := stakingtypes.Validator{ +// OperatorAddress: sdk.ValAddress(val.Address).String(), +// ConsensusPubkey: pkAny, +// Jailed: false, +// Status: stakingtypes.Bonded, +// Tokens: bondAmt, +// DelegatorShares: sdk.OneDec(), +// Description: stakingtypes.Description{}, +// UnbondingHeight: int64(0), +// UnbondingTime: time.Unix(0, 0).UTC(), +// Commission: stakingtypes.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), +// MinSelfDelegation: sdk.ZeroInt(), +// } +// validators = append(validators, validator) +// delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec())) + +// } +// // set validators and delegations +// stakingGenesis := stakingtypes.NewGenesisState(stakingtypes.DefaultParams(), validators, delegations) +// genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(stakingGenesis) + +// totalSupply := sdk.NewCoins() +// for _, b := range balances { +// // add genesis acc tokens to total supply +// totalSupply = totalSupply.Add(b.Coins...) +// } + +// for range delegations { +// // add delegated tokens to total supply +// totalSupply = totalSupply.Add(sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)) +// } + +// // add bonded amount to bonded pool module account +// balances = append(balances, banktypes.Balance{ +// Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), +// Coins: sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)}, +// }) + +// // update total supply +// bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, totalSupply, []banktypes.Metadata{}, []banktypes.SendEnabled{}) +// genesisState[banktypes.ModuleName] = app.AppCodec().MustMarshalJSON(bankGenesis) + +// // set did module genesis state +// didGenesis := didtypes.DefaultGenesis() +// genesisState[didtypes.ModuleName] = app.AppCodec().MustMarshalJSON(didGenesis) + +// // set resource module genesis state +// resourceGenesis := resourcetypes.DefaultGenesis() +// genesisState[resourcetypes.ModuleName] = app.AppCodec().MustMarshalJSON(resourceGenesis) + +// return genesisState, nil +// } // SetupWithGenesisValSet initializes a new SimApp with a validator set and genesis accounts // that also act as delegators. For simplicity, each validator is bonded with a delegation // of one consensus engine unit in the default token of the simapp from first genesis // account. A Nop logger is set in SimApp. -func SetupWithGenesisValSet(valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) (*SimApp, error) { +func SetupWithGenesisValSet(valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) (*TestApp, error) { app, genesisState := setup(true, 5) - genesisState, err := genesisStateWithValSet(app, genesisState, valSet, genAccs, balances...) + genesisState, err := simtestutil.GenesisStateWithValSet(app.AppCodec(), genesisState, valSet, genAccs, balances...) if err != nil { return nil, err } @@ -298,7 +297,7 @@ func SetupWithGenesisValSet(valSet *tmtypes.ValidatorSet, genAccs []authtypes.Ge // SetupWithGenesisAccounts initializes a new SimApp with the provided genesis // accounts and possible balances. -func SetupWithGenesisAccounts(genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) (*SimApp, error) { +func SetupWithGenesisAccounts(genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) (*TestApp, error) { privVal := mock.NewPV() pubKey, err := privVal.GetPubKey() if err != nil { @@ -314,7 +313,7 @@ func SetupWithGenesisAccounts(genAccs []authtypes.GenesisAccount, balances ...ba // GenesisStateWithSingleValidator initializes GenesisState with a single validator and genesis accounts // that also act as delegators. -func GenesisStateWithSingleValidator(app *SimApp) (cheqdapp.GenesisState, error) { +func GenesisStateWithSingleValidator(app *TestApp) (GenesisState, error) { privVal := mock.NewPV() pubKey, err := privVal.GetPubKey() if err != nil { @@ -335,8 +334,8 @@ func GenesisStateWithSingleValidator(app *SimApp) (cheqdapp.GenesisState, error) }, } - genesisState := cheqdapp.NewDefaultGenesisState(app.appCodec) - genesisState, err = genesisStateWithValSet(app, genesisState, valSet, []authtypes.GenesisAccount{acc}, balances...) + genesisState := NewDefaultGenesisState(app.appCodec) + genesisState, err = simtestutil.GenesisStateWithValSet(app.AppCodec(), genesisState, valSet, []authtypes.GenesisAccount{acc}, balances...) if err != nil { return nil, err } @@ -345,7 +344,7 @@ func GenesisStateWithSingleValidator(app *SimApp) (cheqdapp.GenesisState, error) } // CheckBalance checks the balance of an account. -func CheckBalance(app *SimApp, addr sdk.AccAddress, balances sdk.Coins) { +func CheckBalance(app *TestApp, addr sdk.AccAddress, balances sdk.Coins) { ctxCheck := app.BaseApp.NewContext(true, tmproto.Header{}) if reflect.DeepEqual(balances, app.BankKeeper.GetAllBalances(ctxCheck, addr)) { panic("Invalid balance of account") @@ -448,7 +447,7 @@ func createIncrementalAccounts(accNum int) []sdk.AccAddress { } // AddTestAddrsFromPubKeys adds the addresses into the SimApp providing only the public keys. -func AddTestAddrsFromPubKeys(app *SimApp, ctx sdk.Context, pubKeys []cryptotypes.PubKey, accAmt sdkmath.Int) { +func AddTestAddrsFromPubKeys(app *TestApp, ctx sdk.Context, pubKeys []cryptotypes.PubKey, accAmt sdkmath.Int) { initCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), accAmt)) for _, pk := range pubKeys { @@ -458,17 +457,17 @@ func AddTestAddrsFromPubKeys(app *SimApp, ctx sdk.Context, pubKeys []cryptotypes // AddTestAddrs constructs and returns accNum amount of accounts with an // initial balance of accAmt in random order -func AddTestAddrs(app *SimApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int) []sdk.AccAddress { +func AddTestAddrs(app *TestApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int) []sdk.AccAddress { return addTestAddrs(app, ctx, accNum, accAmt, createRandomAccounts) } // AddTestAddrsIncremental constructs and returns accNum amount of accounts with an // initial balance of accAmt in random order -func AddTestAddrsIncremental(app *SimApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int) []sdk.AccAddress { +func AddTestAddrsIncremental(app *TestApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int) []sdk.AccAddress { return addTestAddrs(app, ctx, accNum, accAmt, createIncrementalAccounts) } -func addTestAddrs(app *SimApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int, strategy GenerateAccountStrategy) []sdk.AccAddress { +func addTestAddrs(app *TestApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int, strategy GenerateAccountStrategy) []sdk.AccAddress { testAddrs := strategy(accNum) initCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), accAmt)) @@ -480,7 +479,7 @@ func addTestAddrs(app *SimApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int, return testAddrs } -func initAccountWithCoins(app *SimApp, ctx sdk.Context, addr sdk.AccAddress, coins sdk.Coins) { +func initAccountWithCoins(app *TestApp, ctx sdk.Context, addr sdk.AccAddress, coins sdk.Coins) { err := app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, coins) if err != nil { panic(err) diff --git a/app/types.go b/app/types.go index 1b224b07a..41e72fcd0 100644 --- a/app/types.go +++ b/app/types.go @@ -32,7 +32,7 @@ type CosmosApp interface { // Exports the state of the application for a genesis file. ExportAppStateAndValidators( - forZeroHeight bool, jailAllowedAddrs []string, + forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (types.ExportedApp, error) // All the registered module account addreses. diff --git a/cmd/cheqd-noded/cmd/root.go b/cmd/cheqd-noded/cmd/root.go index 766bca23d..f81eb3e1c 100644 --- a/cmd/cheqd-noded/cmd/root.go +++ b/cmd/cheqd-noded/cmd/root.go @@ -206,10 +206,11 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a snapshotOptions := snapshotstypes.NewSnapshotOptions(snapshotInterval, snapshotKeepRecent) return app.New( - logger, db, traceStore, true, skipUpgradeHeights, - cast.ToString(appOpts.Get(flags.FlagHome)), - cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), - a.encCfg, + logger, db, traceStore, true, + // skipUpgradeHeights, + // cast.ToString(appOpts.Get(flags.FlagHome)), + // cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), + // a.encCfg, appOpts, baseapp.SetPruning(pruningOpts), baseapp.SetMinGasPrices(cast.ToString(appOpts.Get(server.FlagMinGasPrices))), @@ -241,10 +242,10 @@ func (a appCreator) appExport( db, traceStore, false, - map[int64]bool{}, - homePath, - uint(1), - a.encCfg, + // map[int64]bool{}, + // homePath, + // uint(1), + // a.encCfg, // this line is used by starport scaffolding # stargate/root/exportArgument appOpts, ) @@ -258,10 +259,10 @@ func (a appCreator) appExport( db, traceStore, true, - map[int64]bool{}, - homePath, - uint(1), - a.encCfg, + // map[int64]bool{}, + // homePath, + // uint(1), + // a.encCfg, // this line is used by starport scaffolding # stargate/root/noHeightExportArgument appOpts, ) diff --git a/go.mod b/go.mod index 3fe1dd834..bd22f16da 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module github.com/cheqd/cheqd-node go 1.21 +toolchain go1.21.0 + require ( cosmossdk.io/math v1.2.0 filippo.io/edwards25519 v1.0.0 @@ -13,7 +15,6 @@ require ( github.com/cosmos/ibc-go/v7 v7.3.2 github.com/gabriel-vasile/mimetype v1.4.2 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 - github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.3 github.com/google/uuid v1.4.0 github.com/gorilla/mux v1.8.0 @@ -93,6 +94,7 @@ require ( github.com/goccy/go-json v0.10.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.1.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect @@ -212,7 +214,7 @@ replace ( github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 // From Cosmos SDK v0.46.8 upstream - github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 + // github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 // From Cosmos SDK v0.46.8 upstream github.com/jhump/protoreflect => github.com/jhump/protoreflect v1.9.0 diff --git a/go.sum b/go.sum index f0fe2648a..8b15131b0 100644 --- a/go.sum +++ b/go.sum @@ -481,6 +481,12 @@ github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFG github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= @@ -705,6 +711,8 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= @@ -919,8 +927,6 @@ github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Ung github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= -github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -1356,8 +1362,10 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1512,7 +1520,6 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= diff --git a/go.work b/go.work index f3b787735..e8997dc7c 100644 --- a/go.work +++ b/go.work @@ -1,5 +1,7 @@ go 1.21 +toolchain go1.21.0 + use ( . ./api diff --git a/go.work.sum b/go.work.sum index a935420b9..83944d09e 100644 --- a/go.work.sum +++ b/go.work.sum @@ -695,6 +695,7 @@ github.com/Azure/azure-service-bus-go v0.9.1/go.mod h1:yzBx6/BUGfjfeqbRZny9AQIbI github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v10.15.5+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= @@ -777,6 +778,7 @@ github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JP github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= @@ -795,6 +797,7 @@ github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5 github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/OpenPeeDeeP/depguard v1.1.1 h1:TSUznLjvp/4IUP+OQ0t/4jF4QUyxIcVX8YnghZdunyA= github.com/OpenPeeDeeP/depguard v1.1.1/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= @@ -810,6 +813,7 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIO github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6 h1:1d9pzdbkth4D9AX6ndKSl7of3UTV0RYl3z64U2dXMGo= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= @@ -931,6 +935,8 @@ github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJ github.com/btcsuite/btcd/btcec/v2 v2.2.1/go.mod h1:9/CSmJxmuvqzX9Wh2fXMWToLOHhPd11lSPuIupwTkI8= github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= +github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/goleveldb v1.0.0 h1:Tvd0BfvqX9o823q1j2UZ/epQo09eJh6dTcRp79ilIN4= @@ -943,6 +949,7 @@ github.com/bufbuild/connect-go v1.0.0 h1:htSflKUT8y1jxhoPhPYTZMrsY3ipUXjjrbcZR5O github.com/bufbuild/connect-go v1.0.0/go.mod h1:9iNvh/NOsfhNBUH5CtvXeVUskQO1xsrEviH7ZArwZ3I= github.com/bufbuild/protocompile v0.1.0 h1:HjgJBI85hY/qmW5tw/66sNDZ7z0UDdVSi/5r40WHw4s= github.com/bufbuild/protocompile v0.1.0/go.mod h1:ix/MMMdsT3fzxfw91dvbfzKW3fRRnuPCP47kpAm5m/4= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= @@ -1063,6 +1070,7 @@ github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EX github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/continuity v0.2.2/go.mod h1:pWygW9u7LtS1o4N/Tn0FoCFDIXZ7rxcMX7HX1Dmibvk= github.com/containerd/continuity v0.2.3-0.20220330195504-d132b287edc8/go.mod h1:pWygW9u7LtS1o4N/Tn0FoCFDIXZ7rxcMX7HX1Dmibvk= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= @@ -1149,6 +1157,7 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1 h1:6YvzjQtc+cDwCe9XwYPPa8zFCxNG79N7vmCjpK+vGOg= github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1/go.mod h1:JUMM2MxF9wuwzRWZJjb8BjXsn1BmPmdBd3a75pIct4I= +github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1.0.20220726092710-f848e4300a8a/go.mod h1:c8IO23vgNxueCCJlSI9awQtcxsvc+buzaeThB85qfBU= github.com/cosmos/gogoproto v1.4.5 h1:7B2UrCbDCpMdQIwU8vSXzEdK7ciCTdWUyGjVTEe0j74= github.com/cosmos/gogoproto v1.4.5/go.mod h1:VS/ASYmPgv6zkPKLjR9EB91lwbLHOzaGCirmKKhncfI= github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= @@ -1218,12 +1227,14 @@ github.com/docker/docker v20.10.19+incompatible h1:lzEmjivyNHFHMNAFLXORMBXyGIhw/ github.com/docker/docker v20.10.19+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libnetwork v0.8.0-dev.2.0.20200917202933-d0951081b35f/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= @@ -1278,11 +1289,13 @@ github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzP github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw= github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= @@ -1305,6 +1318,7 @@ github.com/go-critic/go-critic v0.4.1/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E github.com/go-critic/go-critic v0.4.3/go.mod h1:j4O3D4RoIwRqlZw5jJpx0BNfXWWbpcJoKu5cYSe4YmQ= github.com/go-critic/go-critic v0.6.5 h1:fDaR/5GWURljXwF8Eh31T2GZNz9X4jeboS912mWF8Uo= github.com/go-critic/go-critic v0.6.5/go.mod h1:ezfP/Lh7MA6dBNn4c6ab5ALv3sKnZVLx37tr00uuaOY= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= @@ -1348,6 +1362,9 @@ github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/ github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= @@ -1463,7 +1480,9 @@ github.com/google/go-replayers/grpcreplay v0.1.0/go.mod h1:8Ig2Idjpr6gifRd6pNVgg github.com/google/go-replayers/httpreplay v0.1.0/go.mod h1:YKZViNhiGgqdBlUbI2MwGpq4pXxNmhJLPHQ7cv2b5no= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/rpmpack v0.0.0-20191226140753-aa36bfddb3a0/go.mod h1:RaTPr0KUf2K7fnZYLNDrr8rxAamWs3iNywJLtQ2AzBg= @@ -1648,6 +1667,7 @@ github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGAR github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a/go.mod h1:xRskid8CManxVta/ALEhJha/pweKBaVG6fWgc0yH25s= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= @@ -1671,6 +1691,7 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jsternberg/zap-logfmt v1.0.0 h1:0Dz2s/eturmdUS34GM82JwNEdQ9hPoJgqptcEKcbpzY= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= @@ -1730,6 +1751,7 @@ github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdB github.com/ldez/tagliatelle v0.3.1 h1:3BqVVlReVUZwafJUwQ+oxbx2BEX2vUG4Yu/NOfMiKiM= github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leonklingele/grouper v1.1.0 h1:tC2y/ygPbMFSBOs3DcyaEMKnnwH7eYKzohOtRrf0SAg= github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= @@ -1850,6 +1872,7 @@ github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6U github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5 h1:8Q0qkMVC/MmWkpIdlvZgcv2o2jrlF6zqVOh7W5YHdMA= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/moricho/tparallel v0.2.1 h1:95FytivzT6rYzdJLdtfn6m1bfFJylOJK41+lgv/EHf4= @@ -1914,11 +1937,13 @@ github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1 github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= @@ -1931,6 +1956,7 @@ github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04s github.com/opencontainers/runc v1.1.0/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= github.com/opencontainers/runc v1.1.1/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runc v1.1.4/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= @@ -1955,6 +1981,7 @@ github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTm github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.2.5 h1:UwtQQx2pyPIgWYHRg+epgdx1/HnBQTgN3/oIYEJTQzU= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= @@ -1970,6 +1997,7 @@ github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrap github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= @@ -1987,6 +2015,7 @@ github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2 github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pjbgf/sha1cd v0.2.3/go.mod h1:HOK9QrgzdHpbc2Kzip0Q1yi3M2MFGPADtR6HjG65m5M= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= @@ -2011,8 +2040,6 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -2122,6 +2149,7 @@ github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvH github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sivchari/containedctx v1.0.2 h1:0hLQKpgC53OVF1VT7CeoFHk9YKstur1XOgfYIc1yrHI= github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt95do8= @@ -2199,6 +2227,7 @@ github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0 github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tdakkota/asciicheck v0.1.1 h1:PKzG7JUTUmVspQTDqtkX9eSiLGossXTybutHwTXuO0A= github.com/tdakkota/asciicheck v0.1.1/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= @@ -2239,6 +2268,7 @@ github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9 github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.7/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -2363,6 +2393,7 @@ go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs= go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= +go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= @@ -2459,6 +2490,7 @@ golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2770,6 +2802,7 @@ google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= @@ -2793,6 +2826,7 @@ gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= diff --git a/make/proto.mk b/make/proto.mk index 49e8f55af..0fdd5c793 100644 --- a/make/proto.mk +++ b/make/proto.mk @@ -4,38 +4,37 @@ ### Protobuf ### ############################################################################### -containerProtoVer=v0.7 -containerProtoImage=tendermintdev/sdk-proto-gen:$(containerProtoVer) -containerProtoGen=cheqd-node-proto-gen-$(containerProtoVer) -containerProtoFmt=cheqd-node-proto-fmt-$(containerProtoVer) -containerProtoGenSwagger=cheqd-node-proto-gen-swagger-$(containerProtoVer) -containerPulsar=cheqd-node-pulsar-gen-$(containerProtoVer) +DOCKER := $(shell which docker) +containerProtoVer=0.13.0 +containerProtoImage=ghcr.io/cosmos/proto-builder:$(containerProtoVer) +protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) +# containerProtoGen=cheqd-node-proto-gen-$(containerProtoVer) +# containerProtoFmt=cheqd-node-proto-fmt-$(containerProtoVer) +# containerProtoGenSwagger=cheqd-node-proto-gen-swagger-$(containerProtoVer) +# containerPulsar=cheqd-node-pulsar-gen-$(containerProtoVer) proto-all: proto-gen proto-swagger-gen proto-gen: @echo "Generating Protobuf files" - @if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGen}$$"; then docker start -a $(containerProtoGen); else docker run --name $(containerProtoGen) -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \ - sh ./scripts/protocgen.sh; fi + @echo $(protoImage) sh ./scripts/protocgen.sh; + @$(protoImage) sh ./scripts/protocgen.sh; + # go mod tidy proto-format: @echo "Formatting Protobuf files" - @if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoFmt}$$"; then docker start -a $(containerProtoFmt); else docker run --name $(containerProtoFmt) -v $(CURDIR):/workspace --workdir /workspace tendermintdev/docker-build-proto \ - find . -name "*.proto" -not -path "./third_party/*" -exec clang-format -i {} \; ; fi - -DOCKER_BUF := docker run -v $(shell pwd):/workspace --workdir /workspace bufbuild/buf:1.27.0 + @$(protoImage) find . -name "*.proto" -not -path "./third_party/*" -exec clang-format -i {} \; proto-lint: - @$(DOCKER_BUF) lint --error-format=json + @$(protoImage) buf lint --error-format=json proto-swagger-gen: @echo "Generating Protobuf Swagger" - @if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGenSwagger}$$"; then docker start -a $(containerProtoGenSwagger); else docker run --name $(containerProtoGenSwagger) -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \ - sh ./scripts/protoc-swagger-gen.sh; fi + @$(protoImage) sh ./scripts/protoc-swagger-gen.sh; + # go mod tidy proto-pulsar-gen: @echo "Generating Pulsar" - @if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerPulsar}$$"; then docker start -a $(containerPulsar); else docker run --name $(containerPulsar) -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \ - sh ./scripts/protoc-pulsar-gen.sh; fi + @$(protoImage) sh ./scripts/protoc-pulsar-gen.sh; .PHONY: proto-all proto-gen proto-format proto-lint proto-swagger-gen \ No newline at end of file diff --git a/proto/cheqd/did/v1/common.proto b/proto/cheqd/did/v1/common.proto deleted file mode 100644 index f1aa42762..000000000 --- a/proto/cheqd/did/v1/common.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; -package cheqdid.cheqdnode.cheqd.v1; - -option go_package = "github.com/cheqd/cheqd-node/x/did/types/v1"; - -message KeyValuePair { - string key = 1; - string value = 2; -} diff --git a/proto/cheqd/did/v1/did.proto b/proto/cheqd/did/v1/did.proto deleted file mode 100644 index 367c1cddf..000000000 --- a/proto/cheqd/did/v1/did.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; -package cheqdid.cheqdnode.cheqd.v1; - -import "cheqd/did/v1/common.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cheqd/cheqd-node/x/did/types/v1"; - -message Did { - repeated string context = 1; // optional - string id = 2; - repeated string controller = 3; // optional - repeated VerificationMethod verification_method = 4; // optional - repeated string authentication = 5; // optional - repeated string assertion_method = 6; // optional - repeated string capability_invocation = 7; // optional - repeated string capability_delegation = 8; // optional - repeated string key_agreement = 9; // optional - repeated Service service = 10; // optional - repeated string also_known_as = 11; // optional -} - -message VerificationMethod { - string id = 1; - string type = 2; - string controller = 3; - repeated KeyValuePair public_key_jwk = 4; // optional - string public_key_multibase = 5; // optional -} - -message Service { - string id = 1; - string type = 2; - string service_endpoint = 3; -} diff --git a/proto/cheqd/did/v1/genesis.proto b/proto/cheqd/did/v1/genesis.proto deleted file mode 100644 index 35b13b364..000000000 --- a/proto/cheqd/did/v1/genesis.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package cheqdid.cheqdnode.cheqd.v1; - -import "cheqd/did/v1/stateValue.proto"; - -option go_package = "github.com/cheqd/cheqd-node/x/did/types/v1"; - -// GenesisState defines the cheqd module's genesis state. -message GenesisState { - string did_namespace = 1; - repeated StateValue didList = 2; -} diff --git a/proto/cheqd/did/v1/query.proto b/proto/cheqd/did/v1/query.proto deleted file mode 100644 index 3a972af3c..000000000 --- a/proto/cheqd/did/v1/query.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package cheqdid.cheqdnode.cheqd.v1; - -import "cheqd/did/v1/did.proto"; -import "cheqd/did/v1/stateValue.proto"; -import "google/api/annotations.proto"; - -option go_package = "github.com/cheqd/cheqd-node/x/did/types/v1"; - -// Query defines the gRPC querier service. -service Query { - rpc Did(QueryGetDidRequest) returns (QueryGetDidResponse) { - option (google.api.http).get = "/cheqd/v1/did/{id}"; - } -} - -message QueryGetDidRequest { - string id = 1; -} - -message QueryGetDidResponse { - Did did = 1; - Metadata metadata = 2; -} diff --git a/proto/cheqd/did/v1/stateValue.proto b/proto/cheqd/did/v1/stateValue.proto deleted file mode 100644 index debec570d..000000000 --- a/proto/cheqd/did/v1/stateValue.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; -package cheqdid.cheqdnode.cheqd.v1; - -import "google/protobuf/any.proto"; - -option go_package = "github.com/cheqd/cheqd-node/x/did/types/v1"; - -message StateValue { - google.protobuf.Any data = 1; - Metadata metadata = 2; // optional -} - -// metadata -message Metadata { - string created = 1; - string updated = 2; - bool deactivated = 3; - string version_id = 4; - repeated string resources = 5; -} diff --git a/proto/cheqd/did/v1/tx.proto b/proto/cheqd/did/v1/tx.proto deleted file mode 100644 index a7f376f9f..000000000 --- a/proto/cheqd/did/v1/tx.proto +++ /dev/null @@ -1,82 +0,0 @@ -syntax = "proto3"; -package cheqdid.cheqdnode.cheqd.v1; - -import "cheqd/did/v1/did.proto"; -import "cheqd/did/v1/stateValue.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cheqd/cheqd-node/x/did/types/v1"; - -// Msg defines the Msg service. -service Msg { - rpc CreateDid(MsgCreateDid) returns (MsgCreateDidResponse); - rpc UpdateDid(MsgUpdateDid) returns (MsgUpdateDidResponse); - rpc DeactivateDid(MsgDeactivateDid) returns (MsgDeactivateDidResponse); -} - -// this line is used by starport scaffolding # proto/tx/message -message MsgCreateDid { - MsgCreateDidPayload payload = 1; - repeated SignInfo signatures = 2; -} - -message MsgUpdateDid { - MsgUpdateDidPayload payload = 1; - repeated SignInfo signatures = 2; -} - -message MsgDeactivateDid { - MsgDeactivateDidPayload payload = 1; - repeated SignInfo signatures = 2; -} - -message SignInfo { - string verification_method_id = 1; - string signature = 2; -} - -message MsgDeactivateDidPayload { - string id = 1; -} - -message MsgDeactivateDidResponse { - Did did = 1; - Metadata metadata = 2; -} - -message MsgCreateDidPayload { - repeated string context = 1; - string id = 2; - repeated string controller = 3; - repeated VerificationMethod verification_method = 4; - repeated string authentication = 5; - repeated string assertion_method = 6; - repeated string capability_invocation = 7; - repeated string capability_delegation = 8; - repeated string key_agreement = 9; - repeated string also_known_as = 10; - repeated Service service = 11; -} - -message MsgCreateDidResponse { - string id = 1; // Not necessary -} - -message MsgUpdateDidPayload { - repeated string context = 1; - string id = 2; - repeated string controller = 3; - repeated VerificationMethod verification_method = 4; - repeated string authentication = 5; - repeated string assertion_method = 6; - repeated string capability_invocation = 7; - repeated string capability_delegation = 8; - repeated string key_agreement = 9; - repeated string also_known_as = 10; - repeated Service service = 11; - string version_id = 12; -} - -message MsgUpdateDidResponse { - string id = 1; // Not necessary -} diff --git a/proto/cheqd/resource/v1/genesis.proto b/proto/cheqd/resource/v1/genesis.proto deleted file mode 100644 index a58349633..000000000 --- a/proto/cheqd/resource/v1/genesis.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; -package cheqdid.cheqdnode.resource.v1; - -import "cheqd/resource/v1/resource.proto"; - -option go_package = "github.com/cheqd/cheqd-node/x/resource/types/v1"; - -// GenesisState defines the cheqd module's genesis state. -message GenesisState { - repeated Resource resourceList = 1; -} diff --git a/proto/cheqd/resource/v1/query.proto b/proto/cheqd/resource/v1/query.proto deleted file mode 100644 index 7aa732f0a..000000000 --- a/proto/cheqd/resource/v1/query.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; -package cheqdid.cheqdnode.resource.v1; - -import "cheqd/resource/v1/resource.proto"; -import "google/api/annotations.proto"; - -option go_package = "github.com/cheqd/cheqd-node/x/resource/types/v1"; - -// Query defines the gRPC querier service. -service Query { - rpc Resource(QueryGetResourceRequest) returns (QueryResourceResponse) { - option (google.api.http).get = "/1.0/identifiers/{collection_id}/resources/{id}"; - } - rpc CollectionResources(QueryGetCollectionResourcesRequest) returns (QueryCollectionResourcesResponse) { - option (google.api.http).get = "/1.0/identifiers/{collection_id}/resources/all"; - } - rpc AllResourceVersions(QueryGetAllResourceVersionsRequest) returns (QueryGetAllResourceVersionsResponse) { - option (google.api.http).get = "/1.0/identifiers/{collection_id}/resources/versions/{name}"; - } -} - -message QueryGetResourceRequest { - string collection_id = 1; - string id = 2; -} - -message QueryResourceResponse { - Resource resource = 1; -} - -message QueryGetCollectionResourcesRequest { - string collection_id = 1; -} - -message QueryCollectionResourcesResponse { - repeated ResourceHeader resources = 1; -} - -message QueryGetAllResourceVersionsRequest { - string collection_id = 1; - string name = 2; - string resourceType = 3; -} - -message QueryGetAllResourceVersionsResponse { - repeated ResourceHeader resources = 1; -} diff --git a/proto/cheqd/resource/v1/resource.proto b/proto/cheqd/resource/v1/resource.proto deleted file mode 100644 index 21dc6da9e..000000000 --- a/proto/cheqd/resource/v1/resource.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; -package cheqdid.cheqdnode.resource.v1; - -option go_package = "github.com/cheqd/cheqd-node/x/resource/types/v1"; - -message Resource { - ResourceHeader header = 1; - bytes data = 2; -} - -message ResourceHeader { - string collection_id = 1; - string id = 2; - string name = 3; - string resource_type = 4; - string media_type = 5; - string created = 6; - bytes checksum = 7; - string previous_version_id = 8; - string next_version_id = 9; -} diff --git a/proto/cheqd/resource/v1/tx.proto b/proto/cheqd/resource/v1/tx.proto deleted file mode 100644 index 45e08a434..000000000 --- a/proto/cheqd/resource/v1/tx.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; -package cheqdid.cheqdnode.resource.v1; - -import "cheqd/did/v1/tx.proto"; -import "cheqd/resource/v1/resource.proto"; - -option go_package = "github.com/cheqd/cheqd-node/x/resource/types/v1"; - -// Msg defines the Msg service. -service Msg { - rpc CreateResource(MsgCreateResource) returns (MsgCreateResourceResponse); -} - -// this line is used by starport scaffolding # proto/tx/message -message MsgCreateResource { - MsgCreateResourcePayload payload = 1; - repeated cheqdid.cheqdnode.cheqd.v1.SignInfo signatures = 2; -} - -message MsgCreateResourcePayload { - string collection_id = 1; - string id = 2; - string name = 3; - string resource_type = 4; - bytes data = 6; -} - -message MsgCreateResourceResponse { - Resource resource = 1; // Not necessary -} diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 01128ad9e..5d915f606 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -3,11 +3,13 @@ set -euox pipefail # Get protoc-gen-gocosmos -go get github.com/cosmos/gogoproto 2>/dev/null +go get github.com/cosmos/gogoproto +# 2>/dev/null echo "Generating gogo proto code" cd proto +echo "coming here" # Find all proto files but exclude "v1" paths proto_dirs=$(find ./ -type f -path '*/v1/*' -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for proto_dir in $proto_dirs; do diff --git a/tests/upgrade/integration/v1/cli/query_did.go b/tests/upgrade/integration/v1/cli/query_did.go index 4ed9f8fa6..8ad16d39b 100644 --- a/tests/upgrade/integration/v1/cli/query_did.go +++ b/tests/upgrade/integration/v1/cli/query_did.go @@ -3,23 +3,23 @@ package cli import ( integrationhelpers "github.com/cheqd/cheqd-node/tests/integration/helpers" didtypesv2 "github.com/cheqd/cheqd-node/x/did/types" - didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" + // didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" ) -func QueryDidLegacy(did string, container string) (didtypesv1.QueryGetDidResponse, error) { - res, err := Query(container, CliBinaryName, "cheqd", "did", did) - if err != nil { - return didtypesv1.QueryGetDidResponse{}, err - } +// func QueryDidLegacy(did string, container string) (didtypesv1.QueryGetDidResponse, error) { +// res, err := Query(container, CliBinaryName, "cheqd", "did", did) +// if err != nil { +// return didtypesv1.QueryGetDidResponse{}, err +// } - var resp didtypesv1.QueryGetDidResponse - err = integrationhelpers.Codec.UnmarshalJSON([]byte(res), &resp) - if err != nil { - return didtypesv1.QueryGetDidResponse{}, err - } +// var resp didtypesv1.QueryGetDidResponse +// err = integrationhelpers.Codec.UnmarshalJSON([]byte(res), &resp) +// if err != nil { +// return didtypesv1.QueryGetDidResponse{}, err +// } - return resp, nil -} +// return resp, nil +// } func QueryDid(did string, container string) (didtypesv2.QueryDidDocResponse, error) { res, err := Query(container, CliBinaryName, "cheqd", "did-document", did) diff --git a/tests/upgrade/integration/v1/cli/query_resource.go b/tests/upgrade/integration/v1/cli/query_resource.go index d02da5532..f17a64a81 100644 --- a/tests/upgrade/integration/v1/cli/query_resource.go +++ b/tests/upgrade/integration/v1/cli/query_resource.go @@ -3,23 +3,23 @@ package cli import ( integrationhelpers "github.com/cheqd/cheqd-node/tests/integration/helpers" resourcetypesv2 "github.com/cheqd/cheqd-node/x/resource/types" - resourcetypesv1 "github.com/cheqd/cheqd-node/x/resource/types/v1" + // resourcetypesv1 "github.com/cheqd/cheqd-node/x/resource/types/v1" ) -func QueryResourceLegacy(collectionID string, resourceID string, container string) (resourcetypesv1.QueryResourceResponse, error) { - res, err := Query(container, CliBinaryName, "resource", "resource", collectionID, resourceID) - if err != nil { - return resourcetypesv1.QueryResourceResponse{}, err - } +// func QueryResourceLegacy(collectionID string, resourceID string, container string) (resourcetypesv1.QueryResourceResponse, error) { +// res, err := Query(container, CliBinaryName, "resource", "resource", collectionID, resourceID) +// if err != nil { +// return resourcetypesv1.QueryResourceResponse{}, err +// } - var resp resourcetypesv1.QueryResourceResponse - err = integrationhelpers.Codec.UnmarshalJSON([]byte(res), &resp) - if err != nil { - return resourcetypesv1.QueryResourceResponse{}, err - } +// var resp resourcetypesv1.QueryResourceResponse +// err = integrationhelpers.Codec.UnmarshalJSON([]byte(res), &resp) +// if err != nil { +// return resourcetypesv1.QueryResourceResponse{}, err +// } - return resp, nil -} +// return resp, nil +// } func QueryResource(collectionID string, resourceID string, container string) (resourcetypesv2.QueryResourceResponse, error) { res, err := Query(container, CliBinaryName, "resource", "specific-resource", collectionID, resourceID) diff --git a/tests/upgrade/integration/v1/cli/tx_did.go b/tests/upgrade/integration/v1/cli/tx_did.go index 33de521b1..02d0957dc 100644 --- a/tests/upgrade/integration/v1/cli/tx_did.go +++ b/tests/upgrade/integration/v1/cli/tx_did.go @@ -1,34 +1,34 @@ package cli import ( - "encoding/base64" "encoding/json" "fmt" integrationhelpers "github.com/cheqd/cheqd-node/tests/integration/helpers" "github.com/cheqd/cheqd-node/x/did/client/cli" didtypesv2 "github.com/cheqd/cheqd-node/x/did/types" - didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" + + // didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" sdk "github.com/cosmos/cosmos-sdk/types" ) -func CreateDidLegacy(payload didtypesv1.MsgCreateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error) { - payloadJSON, err := integrationhelpers.Codec.MarshalJSON(&payload) - if err != nil { - return sdk.TxResponse{}, err - } +// func CreateDidLegacy(payload didtypesv1.MsgCreateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error) { +// payloadJSON, err := integrationhelpers.Codec.MarshalJSON(&payload) +// if err != nil { +// return sdk.TxResponse{}, err +// } - args := []string{string(payloadJSON)} +// args := []string{string(payloadJSON)} - for _, signInput := range signInputs { - args = append(args, signInput.VerificationMethodID) - args = append(args, base64.StdEncoding.EncodeToString(signInput.PrivKey)) - } +// for _, signInput := range signInputs { +// args = append(args, signInput.VerificationMethodID) +// args = append(args, base64.StdEncoding.EncodeToString(signInput.PrivKey)) +// } - args = append(args, GasParams...) +// args = append(args, GasParams...) - return Tx(container, CliBinaryName, "cheqd", "create-did", OperatorAccounts[container], args...) -} +// return Tx(container, CliBinaryName, "cheqd", "create-did", OperatorAccounts[container], args...) +// } func CreateDid(payload cli.DIDDocument, signInputs []cli.SignInput, container, versionID, fees string) (sdk.TxResponse, error) { innerPayloadJSON, err := json.Marshal(&payload) @@ -64,23 +64,23 @@ func CreateDid(payload cli.DIDDocument, signInputs []cli.SignInput, container, v return Tx(container, CliBinaryName, "cheqd", "create-did", OperatorAccounts[container], args...) } -func UpdateDidLegacy(payload didtypesv1.MsgUpdateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error) { - payloadJSON, err := integrationhelpers.Codec.MarshalJSON(&payload) - if err != nil { - return sdk.TxResponse{}, err - } +// func UpdateDidLegacy(payload didtypesv1.MsgUpdateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error) { +// payloadJSON, err := integrationhelpers.Codec.MarshalJSON(&payload) +// if err != nil { +// return sdk.TxResponse{}, err +// } - args := []string{string(payloadJSON)} +// args := []string{string(payloadJSON)} - for _, signInput := range signInputs { - args = append(args, signInput.VerificationMethodID) - args = append(args, base64.StdEncoding.EncodeToString(signInput.PrivKey)) - } +// for _, signInput := range signInputs { +// args = append(args, signInput.VerificationMethodID) +// args = append(args, base64.StdEncoding.EncodeToString(signInput.PrivKey)) +// } - args = append(args, GasParams...) +// args = append(args, GasParams...) - return Tx(container, CliBinaryName, "cheqd", "update-did", OperatorAccounts[container], args...) -} +// return Tx(container, CliBinaryName, "cheqd", "update-did", OperatorAccounts[container], args...) +// } func UpdateDid(payload cli.DIDDocument, signInputs []cli.SignInput, container, versionID, fees string) (sdk.TxResponse, error) { innerPayloadJSON, err := json.Marshal(&payload) @@ -116,23 +116,23 @@ func UpdateDid(payload cli.DIDDocument, signInputs []cli.SignInput, container, v return Tx(container, CliBinaryName, "cheqd", "update-did", OperatorAccounts[container], args...) } -func DeactivateDidLegacy(payload didtypesv1.MsgDeactivateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error) { - payloadJSON, err := integrationhelpers.Codec.MarshalJSON(&payload) - if err != nil { - return sdk.TxResponse{}, err - } +// func DeactivateDidLegacy(payload didtypesv1.MsgDeactivateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error) { +// payloadJSON, err := integrationhelpers.Codec.MarshalJSON(&payload) +// if err != nil { +// return sdk.TxResponse{}, err +// } - args := []string{string(payloadJSON)} +// args := []string{string(payloadJSON)} - for _, signInput := range signInputs { - args = append(args, signInput.VerificationMethodID) - args = append(args, base64.StdEncoding.EncodeToString(signInput.PrivKey)) - } +// for _, signInput := range signInputs { +// args = append(args, signInput.VerificationMethodID) +// args = append(args, base64.StdEncoding.EncodeToString(signInput.PrivKey)) +// } - args = append(args, GasParams...) +// args = append(args, GasParams...) - return Tx(container, CliBinaryName, "cheqd", "deactivate-did", OperatorAccounts[container], args...) -} +// return Tx(container, CliBinaryName, "cheqd", "deactivate-did", OperatorAccounts[container], args...) +// } func DeactivateDid(payload didtypesv2.MsgDeactivateDidDocPayload, signInputs []cli.SignInput, container string, fees string) (sdk.TxResponse, error) { innerPayloadJSON := integrationhelpers.Codec.MustMarshalJSON(&payload) diff --git a/tests/upgrade/integration/v1/config.go b/tests/upgrade/integration/v1/config.go deleted file mode 100644 index fcba98b0e..000000000 --- a/tests/upgrade/integration/v1/config.go +++ /dev/null @@ -1,6 +0,0 @@ -package integration - -const ( - GeneratedJSONDir = "generated" - ProposalJSONDir = "proposal" -) diff --git a/tests/upgrade/integration/v1/generated/post/create - resource/resource_post_indy.json b/tests/upgrade/integration/v1/generated/post/create - resource/resource_post_indy.json deleted file mode 100644 index 83186f6ab..000000000 --- a/tests/upgrade/integration/v1/generated/post/create - resource/resource_post_indy.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "payload": { - "data": "eyJhdHRyIjpbIm5hbWUiLCJhZ2UiXX0=", - "collectionId": "5rjaLzcffhGUH4nt4fyfAg", - "id": "9fbb1b86-91f8-4942-97b9-725b7714131c", - "name": "Test Resource After Upgrade Name Indy Case", - "version": "1.1-indy", - "resourceType": "CL-Schema", - "alsoKnownAs": [ - { - "uri": "https://example.com/alternative-uri", - "description": "" - }, - { - "uri": "https://example.com/alternative-uri", - "description": "Alternative URI description" - } - ] - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-1", - "privKey": "dTHxupAW0yqeeIgqZkjndoWSbZ2kRjK2FMwI6bgtZR6aNYVzr6sn2zzT5zOUYPMflJu17gBqNH0tjp62SlLg/w==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/create - resource/resource_post_uuid.json b/tests/upgrade/integration/v1/generated/post/create - resource/resource_post_uuid.json deleted file mode 100644 index dc7a5c8e1..000000000 --- a/tests/upgrade/integration/v1/generated/post/create - resource/resource_post_uuid.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "payload": { - "data": "eyJhdHRyIjpbIm5hbWUiLCJhZ2UiXX0=", - "collectionId": "91e5f0cf-5f1e-5c19-97d3-d313e84033b4", - "id": "54cb8b4d-af33-4606-bc54-0f035ee30e0f", - "name": "Test Resource After Upgrade Name UUID Case", - "version": "1.2-uuid", - "resourceType": "CL-Schema", - "alsoKnownAs": [ - { - "uri": "https://example.com/alternative-uri", - "description": "" - }, - { - "uri": "https://example.com/alternative-uri", - "description": "Alternative URI description" - } - ] - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-1", - "privKey": "tBjxEJCqSkj7u+iTWRqAVZwtcl2XBZrlaMfhxYIRc4wj7epbmDkJ35sCin3MWnAxvHJNDY0yyPafVspsrgb1Ng==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/deactivate - diddoc/diddoc_indy_32.json b/tests/upgrade/integration/v1/generated/post/deactivate - diddoc/diddoc_indy_32.json deleted file mode 100644 index de1530973..000000000 --- a/tests/upgrade/integration/v1/generated/post/deactivate - diddoc/diddoc_indy_32.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "payload": { - "id": "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b" - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-1", - "privKey": "V+DHGMMA9O4fvIBM1gnyivbKxLudXrG1bHwMjnF4Xi3JYEmEn03givjkKTnAdQ8/DG5qfPU6qVoRUaBgNiwU+Q==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/deactivate - diddoc/diddoc_uuid_lowcase.json b/tests/upgrade/integration/v1/generated/post/deactivate - diddoc/diddoc_uuid_lowcase.json deleted file mode 100644 index a767191dc..000000000 --- a/tests/upgrade/integration/v1/generated/post/deactivate - diddoc/diddoc_uuid_lowcase.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "payload": { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554" - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "privKey": "9ODcnGwn0iiX9M47BTnfnoL8VfoK6BZLk7NX++txjABV4VqtfVOsEgTX9bQ1hg/uXQwBO3onISMQ0hCWbdTalw==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/deactivate - diddoc/diddoc_uuid_mixed.json b/tests/upgrade/integration/v1/generated/post/deactivate - diddoc/diddoc_uuid_mixed.json deleted file mode 100644 index 2e8865afe..000000000 --- a/tests/upgrade/integration/v1/generated/post/deactivate - diddoc/diddoc_uuid_mixed.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "payload": { - "id": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04" - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04#key-1", - "privKey": "x95rNwt5epP3755Y6A/lP822rE+oUmEtt4gs445soA0SV3E+3H5rRscvibF+NU9GC0K0cLRVjP4Q27pwUSMBkQ==" - } - ] -} diff --git a/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_indy_16.json b/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_indy_16.json deleted file mode 100644 index 9f1e9b59a..000000000 --- a/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_indy_16.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def" - ], - "id": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg", - "controller": [ - "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg" - ], - "verificationMethod": [ - { - "id": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-1", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg", - "verificationMaterial": "z6MkpqEAYo7Ri8WYt6Kx4efLQdVJNgh4QzDf8ptVxJoexXdx" - }, - { - "id": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-2", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg", - "verificationMaterial": "z6MkqX2qR3rvt9UQpXsaYKFqGjX79ooFfwhhpZo8HfVXiDMP" - }, - { - "id": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-3", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg", - "verificationMaterial": "z6MkqTTDS64UDxJGqNPb9FyeKRpz9YhDpV7qazkjXJkfRcfx" - } - ], - "authentication": [ - "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-1" - ], - "assertionMethod": [ - "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-2", - "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-3" - ], - "capabilityDelegation": [ - "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-4", - "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-2" - ], - "keyAgreement": [ - "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-4" - ], - "service": [ - { - "id": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#service-1", - "serviceType": "type-1", - "serviceEndpoint": [ - "endpoint-1" - ] - }, - { - "id": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#service-2", - "serviceType": "type-1", - "serviceEndpoint": [ - "endpoint-2" - ] - } - ], - "alsoKnownAs": [ - "alias-3" - ] - } -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_indy_32.json b/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_indy_32.json deleted file mode 100644 index 16a8a3f8b..000000000 --- a/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_indy_32.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def" - ], - "id": "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b", - "controller": [ - "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b" - ], - "verificationMethod": [ - { - "id": "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-1", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b", - "verificationMaterial": "z6Mkt1M9dWKQMSUjE7VXxidhXpah8JGuebU6Pox7mU7iY8mW" - }, - { - "id": "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-2", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b", - "verificationMaterial": "z6MkoMnWWviQr7EKDe3CNKeUqWzyzQ3yMwqDuEGm3Vpp3Rq8" - }, - { - "id": "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-3", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b", - "verificationMaterial": "z6MkrEqEdWVB1b8ENt7VjStKnDtyiUK8vBXB9WnRN49VKXPx" - }, - { - "id": "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-4", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b", - "verificationMaterial": "z6MkeZENiP78isxXtk1AwusrLSGTH74LU48SkQJEmUpFCxFK" - } - ], - "authentication": [ - "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-1", - "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-2" - ], - "assertionMethod": [ - "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-3" - ], - "capability_invocation": [ - "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-4", - "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-1" - ], - "capabilityDelegation": [ - "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-4", - "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-2" - ], - "keyAgreement": [ - "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-1", - "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-2", - "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-3", - "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#key-4" - ], - "service": [ - { - "id": "did:cheqd:testnet:Nqoxg85PKyr9nPstjTpg5b#service-1", - "serviceType": "type-1", - "serviceEndpoint": [ - "endpoint-1" - ] - } - ], - "alsoKnownAs": [ - "alias-1", - "alias-2" - ] - } -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_uuid_lowcase.json b/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_uuid_lowcase.json deleted file mode 100644 index db89eedf2..000000000 --- a/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_uuid_lowcase.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def", - "ghi" - ], - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "controller": [ - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554" - ], - "verificationMethod": [ - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "verificationMaterial": "z6MkkEW1CN6EsnHgjX48Xvn2mAzhLrpQpDHh9iwpmxRn2NNi" - }, - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-2", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "verificationMaterial": "z6Mkmj3sSdRgFLgPfL8ujzZKYtoSg8dqgz72MSq8bexF7Azq" - }, - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-3", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "verificationMaterial": "z6MknAgHAdLyfHoaDroWRNw1XiLu7jU1GXfBnnGEkEvDEHoR" - }, - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-4", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "verificationMaterial": "z6MkhiTEHjx3Ha49MWY48bXitkhwpgch4JK6H8xLMvftGRiG" - } - ], - "authentication": [ - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-2", - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-3" - ], - "service": [ - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#service-1", - "serviceType": "type-1", - "serviceEndpoint": [ - "endpoint-1" - ] - }, - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#service-2", - "serviceType": "type-2", - "serviceEndpoint": [ - "endpoint-2" - ] - } - ], - "alsoKnownAs": [ - "alias-1", - "alias-2", - "alias-3" - ] - } -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_uuid_mixed.json b/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_uuid_mixed.json deleted file mode 100644 index 897e1c295..000000000 --- a/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_uuid_mixed.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def" - ], - "id": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04", - "controller": [ - "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04" - ], - "verificationMethod": [ - { - "id": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04#key-1", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04", - "verificationMaterial": "z6MkfgridKfm6jqXYpNtRwLZ8w9JuZ6UaMs6ZLtGk2z1jRdS" - }, - { - "id": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04#key-2", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04", - "verificationMaterial": "z6MkgBK3i3hWjXC392A1kXWiXHU8if679zXbv1W8RhShUtPU" - }, - { - "id": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04#key-3", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04", - "verificationMaterial": "z6MkkuYh8wsibknFcMWMsSsNptyK9YTR6pd6D5JUAJ3d9xni" - }, - { - "id": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04#key-4", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04", - "verificationMaterial": "z6Mkf13qp3mXH9gnMKwG6ziGu8HiW7jHefNa4w8iM3NbZ7eg" - } - ], - "assertionMethod": [ - "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04#key-3" - ], - "capability_invocation": [ - "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04#key-1" - ], - "keyAgreement": [ - "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04#key-4" - ], - "service": [ - { - "id": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04#service-1", - "serviceType": "type-1", - "serviceEndpoint": [ - "endpoint-1" - ] - }, - { - "id": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04#service-2", - "serviceType": "type-2", - "serviceEndpoint": [ - "endpoint-2" - ] - }, - { - "id": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04#service-3", - "serviceType": "type-3", - "serviceEndpoint": [ - "endpoint-3" - ] - } - ], - "alsoKnownAs": [ - "alias-1", - "alias-2", - "alias-3", - "alias-4" - ] - } -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_uuid_uppercase.json b/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_uuid_uppercase.json deleted file mode 100644 index fa1ff0ce0..000000000 --- a/tests/upgrade/integration/v1/generated/post/query - diddoc/diddoc_uuid_uppercase.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def" - ], - "id": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4", - "controller": [ - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4" - ], - "verificationMethod": [ - { - "id": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-1", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4", - "verificationMaterial": "z6MkgsWjD4afggHtpX4Vzc8r6HzSzEU2jcpGsmuqnt9Vyg9j" - }, - { - "id": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-2", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4", - "verificationMaterial": "z6MkkkfNPuwBunkHrL8rzwUj6XsVji2bkAxGvsXJnP87QYvC" - }, - { - "id": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-3", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4", - "verificationMaterial": "z6MknyN27f3oxB3g8VmXb5nZU2GFcQdnMUF5bHWYG49BQkqM" - }, - { - "id": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-4", - "verificationMethodType": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4", - "verificationMaterial": "z6MkwCfE6fWEp2DTTsiK3wEFYTFthcGCiyiqkZADyrcCanP7" - } - ], - "authentication": [ - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-1" - ], - "assertionMethod": [ - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-1", - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-2", - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-3", - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-4" - ], - "capability_invocation": [ - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-1", - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-3", - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-4" - ], - "capabilityDelegation": [ - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-4", - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-2" - ], - "service": [ - { - "id": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#service-1", - "serviceType": "type-1", - "serviceEndpoint": [ - "endpoint-1" - ] - } - ], - "alsoKnownAs": [] - } -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/query - module-version-map/v1.json b/tests/upgrade/integration/v1/generated/post/query - module-version-map/v1.json deleted file mode 100644 index 665c63bb5..000000000 --- a/tests/upgrade/integration/v1/generated/post/query - module-version-map/v1.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "payload": { - "module_versions": [ - { - "name": "auth", - "version": 3 - }, - { - "name": "authz", - "version": 2 - }, - { - "name": "bank", - "version": 3 - }, - { - "name": "capability", - "version": 1 - }, - { - "name": "cheqd", - "version": 4 - }, - { - "name": "crisis", - "version": 1 - }, - { - "name": "distribution", - "version": 2 - }, - { - "name": "evidence", - "version": 1 - }, - { - "name": "feegrant", - "version": 2 - }, - { - "name": "feeibc", - "version": 1 - }, - { - "name": "genutil", - "version": 1 - }, - { - "name": "gov", - "version": 3 - }, - { - "name": "group", - "version": 1 - }, - { - "name": "ibc", - "version": 2 - }, - { - "name": "interchainaccounts", - "version": 2 - }, - { - "name": "mint", - "version": 1 - }, - { - "name": "params", - "version": 1 - }, - { - "name": "resource", - "version": 2 - }, - { - "name": "slashing", - "version": 2 - }, - { - "name": "staking", - "version": 3 - }, - { - "name": "transfer", - "version": 2 - }, - { - "name": "upgrade", - "version": 2 - }, - { - "name": "vesting", - "version": 1 - } - ] - } -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/query - resource/resource_indy_16.json b/tests/upgrade/integration/v1/generated/post/query - resource/resource_indy_16.json deleted file mode 100644 index d6b002533..000000000 --- a/tests/upgrade/integration/v1/generated/post/query - resource/resource_indy_16.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "payload": { - "resource": { - "data": "eyAibWVzc2FnZSI6ICJoZWxsbyB3b3JsZCJ9" - }, - "metadata": { - "collectionId": "5rjaLzcffhGUH4nt4fyfAg", - "id": "7f2589aa-1279-4bd7-b704-f868772b460a", - "name": "Indy 16 symbols resource", - "version": "", - "resourceType": "TestResourceType", - "alsoKnownAs": [ - { - "uri": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg/resources/7f2589aa-1279-4bd7-b704-f868772b460a", - "description": "did-url" - } - ], - "mediaType": "application/json", - "checksum": "4f479bba31f71859d9943651538c8df2119804eceb7f58a0de241789ff214af4", - "previousVersionId": "", - "nextVersionId": "" - } - } -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/query - resource/resource_post_indy.json b/tests/upgrade/integration/v1/generated/post/query - resource/resource_post_indy.json deleted file mode 100644 index 2b62f349f..000000000 --- a/tests/upgrade/integration/v1/generated/post/query - resource/resource_post_indy.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "payload": { - "resource": { - "data": "eyJhdHRyIjpbIm5hbWUiLCJhZ2UiXX0K" - }, - "metadata": { - "collectionId": "5rjaLzcffhGUH4nt4fyfAg", - "id": "9fbb1b86-91f8-4942-97b9-725b7714131c", - "name": "Test Resource After Upgrade Name Indy Case", - "version": "1.1-indy", - "resourceType": "CL-Schema", - "alsoKnownAs": [ - { - "uri": "https://example.com/alternative-uri", - "description": "" - }, - { - "uri": "https://example.com/alternative-uri", - "description": "Alternative URI description" - }, - { - "uri": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg/resources/9fbb1b86-91f8-4942-97b9-725b7714131c", - "description": "did-url" - } - ], - "mediaType": "application/json", - "checksum": "d9c6f336c5edfc5034bc66aab9277daac01e1e85b41e49e6bf1b7a8f2a81c04f", - "previousVersionId": "", - "nextVersionId": "" - } - } -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/query - resource/resource_post_uuid.json b/tests/upgrade/integration/v1/generated/post/query - resource/resource_post_uuid.json deleted file mode 100644 index 2b0afd349..000000000 --- a/tests/upgrade/integration/v1/generated/post/query - resource/resource_post_uuid.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "payload": { - "resource": { - "data": "eyJhdHRyIjpbIm5hbWUiLCJhZ2UiXX0K" - }, - "metadata": { - "collectionId": "91e5f0cf-5f1e-5c19-97d3-d313e84033b4", - "id": "54cb8b4d-af33-4606-bc54-0f035ee30e0f", - "name": "Test Resource After Upgrade Name UUID Case", - "version": "1.2-uuid", - "resourceType": "CL-Schema", - "alsoKnownAs": [ - { - "uri": "https://example.com/alternative-uri", - "description": "" - }, - { - "uri": "https://example.com/alternative-uri", - "description": "Alternative URI description" - }, - { - "uri": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4/resources/54cb8b4d-af33-4606-bc54-0f035ee30e0f", - "description": "did-url" - } - ], - "mediaType": "application/json", - "checksum": "d9c6f336c5edfc5034bc66aab9277daac01e1e85b41e49e6bf1b7a8f2a81c04f", - "previousVersionId": "", - "nextVersionId": "" - } - } -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_lower_1.json b/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_lower_1.json deleted file mode 100644 index 44003040d..000000000 --- a/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_lower_1.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "payload": { - "resource": { - "data": "eyAibWVzc2FnZSI6ICJoZWxsbyB3b3JsZCJ9" - }, - "metadata": { - "collectionId": "2e5ca092-8264-47c7-9216-8b36e01e5554", - "id": "b1c9406d-568c-4a41-9ed3-133fdf3e4974", - "name": "UUID lowercase", - "version": "", - "resourceType": "TestResourceType", - "alsoKnownAs": [ - { - "uri": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554/resources/b1c9406d-568c-4a41-9ed3-133fdf3e4974", - "description": "did-url" - } - ], - "mediaType": "application/json", - "checksum": "4f479bba31f71859d9943651538c8df2119804eceb7f58a0de241789ff214af4", - "previousVersionId": "", - "nextVersionId": "9011d912-258e-4c76-93a8-200c2031685e" - } - } -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_lower_2.json b/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_lower_2.json deleted file mode 100644 index a03b14e0e..000000000 --- a/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_lower_2.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "payload": { - "resource": { - "data": "eyAibWVzc2FnZSI6ICJoZWxsbyB3b3JsZCJ9" - }, - "metadata": { - "collectionId": "2e5ca092-8264-47c7-9216-8b36e01e5554", - "id": "9011d912-258e-4c76-93a8-200c2031685e", - "name": "UUID lowercase", - "version": "", - "resourceType": "TestResourceType", - "alsoKnownAs": [ - { - "uri": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554/resources/9011d912-258e-4c76-93a8-200c2031685e", - "description": "did-url" - } - ], - "mediaType": "application/json", - "checksum": "4f479bba31f71859d9943651538c8df2119804eceb7f58a0de241789ff214af4", - "previousVersionId": "b1c9406d-568c-4a41-9ed3-133fdf3e4974", - "nextVersionId": "" - } - } -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_mixed_1.json b/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_mixed_1.json deleted file mode 100644 index 0658adc78..000000000 --- a/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_mixed_1.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "payload": { - "resource": { - "data": "eyAibWVzc2FnZSI6ICJoZWxsbyB3b3JsZCJ9" - }, - "metadata": { - "collectionId": "85d9e742-be4d-59e8-9b10-5449db2e2d04", - "id": "f2f985da-62b5-457b-8167-54a0a739bdc4", - "name": "UUID mixed", - "version": "", - "resourceType": "TestResourceTypeMixed1", - "alsoKnownAs": [ - { - "uri": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04/resources/f2f985da-62b5-457b-8167-54a0a739bdc4", - "description": "did-url" - } - ], - "mediaType": "application/json", - "checksum": "4f479bba31f71859d9943651538c8df2119804eceb7f58a0de241789ff214af4", - "previousVersionId": "", - "nextVersionId": "" - } - } -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_mixed_2.json b/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_mixed_2.json deleted file mode 100644 index c487078cd..000000000 --- a/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_mixed_2.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "payload": { - "resource": { - "data": "eyAibWVzc2FnZSI6ICJoZWxsbyB3b3JsZCJ9" - }, - "metadata": { - "collectionId": "85d9e742-be4d-59e8-9b10-5449db2e2d04", - "id": "b67d9bdc-b8f4-45fd-b5f6-1af38c26d4c8", - "name": "UUID mixed", - "version": "", - "resourceType": "TestResourceTypeMixed23", - "alsoKnownAs": [ - { - "uri": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04/resources/b67d9bdc-b8f4-45fd-b5f6-1af38c26d4c8", - "description": "did-url" - } - ], - "mediaType": "application/json", - "checksum": "4f479bba31f71859d9943651538c8df2119804eceb7f58a0de241789ff214af4", - "previousVersionId": "", - "nextVersionId": "76ecedeb-225d-4164-90c2-a4857ac3c01a" - } - } -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_mixed_3.json b/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_mixed_3.json deleted file mode 100644 index 477b96296..000000000 --- a/tests/upgrade/integration/v1/generated/post/query - resource/resource_uuid_mixed_3.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "payload": { - "resource": { - "data": "eyAibWVzc2FnZSI6ICJoZWxsbyB3b3JsZCJ9" - }, - "metadata": { - "collectionId": "85d9e742-be4d-59e8-9b10-5449db2e2d04", - "id": "76ecedeb-225d-4164-90c2-a4857ac3c01a", - "name": "UUID mixed", - "version": "", - "resourceType": "TestResourceTypeMixed23", - "alsoKnownAs": [ - { - "uri": "did:cheqd:testnet:85d9e742-be4d-59e8-9b10-5449db2e2d04/resources/76ecedeb-225d-4164-90c2-a4857ac3c01a", - "description": "did-url" - } - ], - "mediaType": "application/json", - "checksum": "4f479bba31f71859d9943651538c8df2119804eceb7f58a0de241789ff214af4", - "previousVersionId": "b67d9bdc-b8f4-45fd-b5f6-1af38c26d4c8", - "nextVersionId": "" - } - } -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/update - diddoc/diddoc_indy_16.json b/tests/upgrade/integration/v1/generated/post/update - diddoc/diddoc_indy_16.json deleted file mode 100644 index 87ee5d1c8..000000000 --- a/tests/upgrade/integration/v1/generated/post/update - diddoc/diddoc_indy_16.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def" - ], - "id": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg", - "controller": [ - "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg" - ], - "verificationMethod": [ - { - "id": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-1", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg", - "publicKeyMultibase": "z6MkpqEAYo7Ri8WYt6Kx4efLQdVJNgh4QzDf8ptVxJoexXdx" - }, - { - "id": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-2", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg", - "publicKeyMultibase": "z6MkqX2qR3rvt9UQpXsaYKFqGjX79ooFfwhhpZo8HfVXiDMP" - }, - { - "id": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-3", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg", - "publicKeyMultibase": "z6MkqTTDS64UDxJGqNPb9FyeKRpz9YhDpV7qazkjXJkfRcfx" - } - ], - "authentication": [ - "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-1" - ], - "assertionMethod": [ - "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-2", - "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-3" - ], - "capabilityDelegation": [ - "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-4", - "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-2" - ], - "keyAgreement": [ - "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-4" - ], - "service": [ - { - "id": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#service-1", - "type": "type-1", - "serviceEndpoint": [ - "endpoint-1" - ] - }, - { - "id": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#service-2", - "type": "type-1", - "serviceEndpoint": [ - "endpoint-2" - ] - } - ], - "alsoKnownAs": [ - "alias-3" - ] - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:5rjaLzcffhGUH4nt4fyfAg#key-1", - "privKey": "dTHxupAW0yqeeIgqZkjndoWSbZ2kRjK2FMwI6bgtZR6aNYVzr6sn2zzT5zOUYPMflJu17gBqNH0tjp62SlLg/w==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/update - diddoc/diddoc_uuid_lowcase.json b/tests/upgrade/integration/v1/generated/post/update - diddoc/diddoc_uuid_lowcase.json deleted file mode 100644 index 127b2c12c..000000000 --- a/tests/upgrade/integration/v1/generated/post/update - diddoc/diddoc_uuid_lowcase.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def", - "ghi" - ], - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "controller": [ - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554" - ], - "verificationMethod": [ - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "publicKeyMultibase": "z6MkkEW1CN6EsnHgjX48Xvn2mAzhLrpQpDHh9iwpmxRn2NNi" - }, - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-2", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "publicKeyMultibase": "z6Mkmj3sSdRgFLgPfL8ujzZKYtoSg8dqgz72MSq8bexF7Azq" - }, - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-3", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "publicKeyMultibase": "z6MknAgHAdLyfHoaDroWRNw1XiLu7jU1GXfBnnGEkEvDEHoR" - }, - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-4", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "publicKeyMultibase": "z6MkhiTEHjx3Ha49MWY48bXitkhwpgch4JK6H8xLMvftGRiG" - } - ], - "authentication": [ - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-2", - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-3" - ], - "service": [ - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#service-1", - "type": "type-1", - "serviceEndpoint": [ - "endpoint-1" - ] - }, - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#service-2", - "type": "type-2", - "serviceEndpoint": [ - "endpoint-2" - ] - } - ], - "alsoKnownAs": [ - "alias-1", - "alias-2", - "alias-3" - ] - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "privKey": "9ODcnGwn0iiX9M47BTnfnoL8VfoK6BZLk7NX++txjABV4VqtfVOsEgTX9bQ1hg/uXQwBO3onISMQ0hCWbdTalw==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/post/update - diddoc/diddoc_uuid_uppercase.json b/tests/upgrade/integration/v1/generated/post/update - diddoc/diddoc_uuid_uppercase.json deleted file mode 100644 index b362ebeb2..000000000 --- a/tests/upgrade/integration/v1/generated/post/update - diddoc/diddoc_uuid_uppercase.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def" - ], - "id": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4", - "controller": [ - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4" - ], - "verificationMethod": [ - { - "id": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-1", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4", - "publicKeyMultibase": "z6MkgsWjD4afggHtpX4Vzc8r6HzSzEU2jcpGsmuqnt9Vyg9j" - }, - { - "id": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-2", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4", - "publicKeyMultibase": "z6MkkkfNPuwBunkHrL8rzwUj6XsVji2bkAxGvsXJnP87QYvC" - }, - { - "id": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-3", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4", - "publicKeyMultibase": "z6MknyN27f3oxB3g8VmXb5nZU2GFcQdnMUF5bHWYG49BQkqM" - }, - { - "id": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-4", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4", - "publicKeyMultibase": "z6MkwCfE6fWEp2DTTsiK3wEFYTFthcGCiyiqkZADyrcCanP7" - } - ], - "authentication": [ - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-1" - ], - "assertionMethod": [ - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-1", - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-2", - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-3", - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-4" - ], - "capabilityInvocation": [ - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-1", - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-3", - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-4" - ], - "capabilityDelegation": [ - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-4", - "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-2" - ], - "service": [ - { - "id": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#service-1", - "type": "type-1", - "serviceEndpoint": [ - "endpoint-1" - ] - } - ], - "alsoKnownAs": [] - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:91e5f0cf-5f1e-5c19-97d3-d313e84033b4#key-1", - "privKey": "tBjxEJCqSkj7u+iTWRqAVZwtcl2XBZrlaMfhxYIRc4wj7epbmDkJ35sCin3MWnAxvHJNDY0yyPafVspsrgb1Ng==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_indy_16.json b/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_indy_16.json deleted file mode 100644 index 0be6d154b..000000000 --- a/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_indy_16.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def" - ], - "id": "did:cheqd:testnet:HWdKrn8vpY6nVZEz", - "controller": [ - "did:cheqd:testnet:HWdKrn8vpY6nVZEz" - ], - "verification_method": [ - { - "id": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-1", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:HWdKrn8vpY6nVZEz", - "public_key_jwk": [], - "public_key_multibase": "zBNy7xYrzNb25mbVFP5hVZXwJZ7RD16yJSoya82qe3Jra" - }, - { - "id": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-2", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:HWdKrn8vpY6nVZEz", - "public_key_jwk": [], - "public_key_multibase": "zC4mnpocVYbywi32srkHzRdy7LEXQG4TM8YtCTPXWnza1" - }, - { - "id": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-3", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:HWdKrn8vpY6nVZEz", - "public_key_jwk": [], - "public_key_multibase": "zC1CAqqp2tQooisYtTh1oULGzKyRNQbsUtyqoh2neWPta" - }, - { - "id": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-4", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:HWdKrn8vpY6nVZEz", - "public_key_jwk": [], - "public_key_multibase": "zDw21irq4wBfyTvxAG9L8PQj6b79iyTyzyV6XVj9SfyRR" - } - ], - "authentication": [ - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-1", - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-2" - ], - "assertion_method": [ - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-3" - ], - "capability_invocation": [ - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-4", - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-1" - ], - "capability_delegation": [ - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-4", - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-2" - ], - "key_agreement": [ - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-1", - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-2", - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-3", - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-4" - ], - "service": [ - { - "id": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#service-1", - "type": "type-1", - "service_endpoint": "endpoint-1" - } - ], - "also_known_as": [ - "alias-1", - "alias-2" - ] - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-1", - "privKey": "dTHxupAW0yqeeIgqZkjndoWSbZ2kRjK2FMwI6bgtZR6aNYVzr6sn2zzT5zOUYPMflJu17gBqNH0tjp62SlLg/w==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_indy_32.json b/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_indy_32.json deleted file mode 100644 index 23827597c..000000000 --- a/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_indy_32.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def" - ], - "id": "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q", - "controller": [ - "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q" - ], - "verification_method": [ - { - "id": "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-1", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q", - "public_key_jwk": [], - "public_key_multibase": "zEZ673G4y1tzG7ceqH9frgj2hJj14EiDjho3BwC9hcuz8" - }, - { - "id": "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-2", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q", - "public_key_jwk": [], - "public_key_multibase": "z9uXTvgTyWZjr79CVgkgdzRSzApn7x4asDDMqDDro8D3k" - }, - { - "id": "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-3", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q", - "public_key_jwk": [], - "public_key_multibase": "zCnaC3GEjg3dmGPGo3svUw8Lytu3HWJGpTVsVXnBUQJca" - }, - { - "id": "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-4", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q", - "public_key_jwk": [], - "public_key_multibase": "z6yL88rhPLU4nFAUGLv1VLiTTXnV4At64PPJwCrEHjTw" - } - ], - "authentication": [ - "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-1", - "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-2" - ], - "assertion_method": [ - "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-3" - ], - "capability_invocation": [ - "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-4", - "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-1" - ], - "capability_delegation": [ - "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-4", - "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-2" - ], - "key_agreement": [ - "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-1", - "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-2", - "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-3", - "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-4" - ], - "service": [ - { - "id": "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#service-1", - "type": "type-1", - "service_endpoint": "endpoint-1" - } - ], - "also_known_as": [ - "alias-1", - "alias-2" - ] - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-1", - "privKey": "V+DHGMMA9O4fvIBM1gnyivbKxLudXrG1bHwMjnF4Xi3JYEmEn03givjkKTnAdQ8/DG5qfPU6qVoRUaBgNiwU+Q==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_uuid_lowcase.json b/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_uuid_lowcase.json deleted file mode 100644 index 6dab5a1b7..000000000 --- a/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_uuid_lowcase.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def" - ], - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "controller": [ - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554" - ], - "verification_method": [ - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "public_key_jwk": [], - "public_key_multibase": "z6nExc7qoYEoDd2DRrMpBv5ShXHYZQL3LTi2twgTm79bL" - }, - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-2", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "public_key_jwk": [], - "public_key_multibase": "z8GnprPBEuoBvYqJD4RbUhoFSrZMzH6rffRvCmNzEBxDT" - }, - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-3", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "public_key_jwk": [], - "public_key_multibase": "z8iREaP6YKkK77MxojoyAgcnuJAC9reQq6mMJuxxCK523" - }, - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-4", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "public_key_jwk": [], - "public_key_multibase": "z4GCBhVhbx2ZgF1hMT2Zt3f9x17LqeR4jb83QXehsMCvt" - } - ], - "authentication": [ - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-2" - ], - "assertion_method": [ - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-3" - ], - "capability_invocation": [ - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-4", - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1" - ], - "capability_delegation": [ - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-4", - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-2" - ], - "key_agreement": [ - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-2", - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-3", - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-4" - ], - "service": [ - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#service-1", - "type": "type-1", - "service_endpoint": "endpoint-1" - } - ], - "also_known_as": [ - "alias-1", - "alias-2" - ] - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "privKey": "9ODcnGwn0iiX9M47BTnfnoL8VfoK6BZLk7NX++txjABV4VqtfVOsEgTX9bQ1hg/uXQwBO3onISMQ0hCWbdTalw==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_uuid_mixed.json b/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_uuid_mixed.json deleted file mode 100644 index d401008ad..000000000 --- a/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_uuid_mixed.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def" - ], - "id": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad", - "controller": [ - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad" - ], - "verification_method": [ - { - "id": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-1", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad", - "public_key_jwk": [], - "public_key_multibase": "z2Ebg35RKmCM4SKYBkNNiHqbK5ypdAUcjsKyLum1zpCr4" - }, - { - "id": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-2", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad", - "public_key_jwk": [], - "public_key_multibase": "z2j417oT5Pyha2XKK4xYsgBv8u5pFk7HFDzbCbRUgZfc6" - }, - { - "id": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-3", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad", - "public_key_jwk": [], - "public_key_multibase": "z7THeYhdHGDHnVrffBsuXyoRKKyBZgwNjX4PYL25cEk1L" - }, - { - "id": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-4", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad", - "public_key_jwk": [], - "public_key_multibase": "zYnoDoX5wcCKEq6ZRRkS42jigYTSEn8DNvDnWmQadtsJ" - } - ], - "authentication": [ - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-1", - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-2" - ], - "assertion_method": [ - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-3" - ], - "capability_invocation": [ - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-4", - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-1" - ], - "capability_delegation": [ - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-4", - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-2" - ], - "key_agreement": [ - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-1", - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-2", - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-3", - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-4" - ], - "service": [ - { - "id": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#service-1", - "type": "type-1", - "service_endpoint": "endpoint-1" - } - ], - "also_known_as": [ - "alias-1", - "alias-2" - ] - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-1", - "privKey": "x95rNwt5epP3755Y6A/lP822rE+oUmEtt4gs445soA0SV3E+3H5rRscvibF+NU9GC0K0cLRVjP4Q27pwUSMBkQ==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_uuid_uppercase.json b/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_uuid_uppercase.json deleted file mode 100644 index 96f5587e9..000000000 --- a/tests/upgrade/integration/v1/generated/pre/create - diddoc/diddoc_uuid_uppercase.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def" - ], - "id": "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137", - "controller": [ - "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137" - ], - "verification_method": [ - { - "id": "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-1", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137", - "public_key_jwk": [], - "public_key_multibase": "z3RFgcpLEM8oRi2DoK3B1FCSTAfCBKjZvBkzuxcBV4TNM" - }, - { - "id": "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-2", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137", - "public_key_jwk": [], - "public_key_multibase": "z7JQKofgkaFFpjqJAKNWtFSKVv8kkLHhvErcNx7A6VL8p" - }, - { - "id": "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-3", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137", - "public_key_jwk": [], - "public_key_multibase": "z9X6yXQoNcdZD1zvpuWpicviFnqMvwaziuGbcRnBAVY3y" - }, - { - "id": "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-4", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137", - "public_key_jwk": [], - "public_key_multibase": "zHkQBWRFoUUizMNscNNGQhMhtt2zMK6UV4YFJ9aeBfZbj" - } - ], - "authentication": [ - "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-1", - "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-2" - ], - "assertion_method": [ - "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-3" - ], - "capability_invocation": [ - "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-4", - "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-1" - ], - "capability_delegation": [ - "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-4", - "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-2" - ], - "key_agreement": [ - "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-1", - "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-2", - "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-3", - "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-4" - ], - "service": [ - { - "id": "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#service-1", - "type": "type-1", - "service_endpoint": "endpoint-1" - } - ], - "also_known_as": [ - "alias-1", - "alias-2" - ] - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-1", - "privKey": "tBjxEJCqSkj7u+iTWRqAVZwtcl2XBZrlaMfhxYIRc4wj7epbmDkJ35sCin3MWnAxvHJNDY0yyPafVspsrgb1Ng==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/create - resource/resource_indy_16.json b/tests/upgrade/integration/v1/generated/pre/create - resource/resource_indy_16.json deleted file mode 100644 index 52650ccc2..000000000 --- a/tests/upgrade/integration/v1/generated/pre/create - resource/resource_indy_16.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "payload": { - "collectionId": "HWdKrn8vpY6nVZEz", - "id": "7f2589aa-1279-4bd7-b704-f868772b460a", - "name": "Indy 16 symbols resource", - "resourceType": "TestResourceType", - "data": "eyAibWVzc2FnZSI6ICJoZWxsbyB3b3JsZCJ9" - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-1", - "privKey": "dTHxupAW0yqeeIgqZkjndoWSbZ2kRjK2FMwI6bgtZR6aNYVzr6sn2zzT5zOUYPMflJu17gBqNH0tjp62SlLg/w==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_lower_1.json b/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_lower_1.json deleted file mode 100644 index 5dd70f562..000000000 --- a/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_lower_1.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "payload": { - "collectionId": "2e5ca092-8264-47c7-9216-8b36e01e5554", - "id": "b1c9406d-568c-4a41-9ed3-133fdf3e4974", - "name": "UUID lowercase", - "resourceType": "TestResourceType", - "data": "eyAibWVzc2FnZSI6ICJoZWxsbyB3b3JsZCJ9" - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "privKey": "9ODcnGwn0iiX9M47BTnfnoL8VfoK6BZLk7NX++txjABV4VqtfVOsEgTX9bQ1hg/uXQwBO3onISMQ0hCWbdTalw==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_lower_2.json b/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_lower_2.json deleted file mode 100644 index ca8e7e179..000000000 --- a/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_lower_2.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "payload": { - "collectionId": "2e5ca092-8264-47c7-9216-8b36e01e5554", - "id": "9011d912-258e-4c76-93a8-200c2031685e", - "name": "UUID lowercase", - "resourceType": "TestResourceType", - "data": "eyAibWVzc2FnZSI6ICJoZWxsbyB3b3JsZCJ9" - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "privKey": "9ODcnGwn0iiX9M47BTnfnoL8VfoK6BZLk7NX++txjABV4VqtfVOsEgTX9bQ1hg/uXQwBO3onISMQ0hCWbdTalw==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_mixed_1.json b/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_mixed_1.json deleted file mode 100644 index 26cc1e3ee..000000000 --- a/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_mixed_1.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "payload": { - "collectionId": "C8113F5E-E124-4400-a3c8-109b4f6722ad", - "id": "f2f985da-62b5-457b-8167-54a0a739bdc4", - "name": "UUID mixed", - "resourceType": "TestResourceTypeMixed1", - "data": "eyAibWVzc2FnZSI6ICJoZWxsbyB3b3JsZCJ9" - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-1", - "privKey": "x95rNwt5epP3755Y6A/lP822rE+oUmEtt4gs445soA0SV3E+3H5rRscvibF+NU9GC0K0cLRVjP4Q27pwUSMBkQ==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_mixed_2.json b/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_mixed_2.json deleted file mode 100644 index cb888c685..000000000 --- a/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_mixed_2.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "payload": { - "collectionId": "C8113F5E-E124-4400-a3c8-109b4f6722ad", - "id": "b67d9bdc-b8f4-45fd-b5f6-1af38c26d4c8", - "name": "UUID mixed", - "resourceType": "TestResourceTypeMixed23", - "data": "eyAibWVzc2FnZSI6ICJoZWxsbyB3b3JsZCJ9" - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-1", - "privKey": "x95rNwt5epP3755Y6A/lP822rE+oUmEtt4gs445soA0SV3E+3H5rRscvibF+NU9GC0K0cLRVjP4Q27pwUSMBkQ==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_mixed_3.json b/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_mixed_3.json deleted file mode 100644 index 08ae2ba59..000000000 --- a/tests/upgrade/integration/v1/generated/pre/create - resource/resource_uuid_mixed_3.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "payload": { - "collectionId": "C8113F5E-E124-4400-a3c8-109b4f6722ad", - "id": "76ecedeb-225d-4164-90c2-a4857ac3c01a", - "name": "UUID mixed", - "resourceType": "TestResourceTypeMixed23", - "data": "eyAibWVzc2FnZSI6ICJoZWxsbyB3b3JsZCJ9" - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-1", - "privKey": "x95rNwt5epP3755Y6A/lP822rE+oUmEtt4gs445soA0SV3E+3H5rRscvibF+NU9GC0K0cLRVjP4Q27pwUSMBkQ==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/query - module-version-map/v069.json b/tests/upgrade/integration/v1/generated/pre/query - module-version-map/v069.json deleted file mode 100644 index a351214b3..000000000 --- a/tests/upgrade/integration/v1/generated/pre/query - module-version-map/v069.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "module_versions": [ - { - "name": "auth", - "version": "2" - }, - { - "name": "authz", - "version": "1" - }, - { - "name": "bank", - "version": "2" - }, - { - "name": "capability", - "version": "1" - }, - { - "name": "cheqd", - "version": "3" - }, - { - "name": "crisis", - "version": "1" - }, - { - "name": "distribution", - "version": "2" - }, - { - "name": "evidence", - "version": "1" - }, - { - "name": "feegrant", - "version": "1" - }, - { - "name": "genutil", - "version": "1" - }, - { - "name": "gov", - "version": "2" - }, - { - "name": "ibc", - "version": "2" - }, - { - "name": "interchainaccounts", - "version": "1" - }, - { - "name": "mint", - "version": "1" - }, - { - "name": "params", - "version": "1" - }, - { - "name": "slashing", - "version": "2" - }, - { - "name": "staking", - "version": "2" - }, - { - "name": "transfer", - "version": "1" - }, - { - "name": "upgrade", - "version": "1" - }, - { - "name": "vesting", - "version": "1" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/signinputs/indy_16.json b/tests/upgrade/integration/v1/generated/pre/signinputs/indy_16.json deleted file mode 100644 index 35999a821..000000000 --- a/tests/upgrade/integration/v1/generated/pre/signinputs/indy_16.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "verificationMethodId": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-1", - "privKey": "dTHxupAW0yqeeIgqZkjndoWSbZ2kRjK2FMwI6bgtZR6aNYVzr6sn2zzT5zOUYPMflJu17gBqNH0tjp62SlLg/w==" - } -] \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/signinputs/indy_16.keys b/tests/upgrade/integration/v1/generated/pre/signinputs/indy_16.keys deleted file mode 100644 index 051f7b618..000000000 --- a/tests/upgrade/integration/v1/generated/pre/signinputs/indy_16.keys +++ /dev/null @@ -1,2 +0,0 @@ -{"pub_key_base_64":"mjWFc6+rJ9s80+czlGDzH5Sbte4AajR9LY6etkpS4P8=","priv_key_base_64":"dTHxupAW0yqeeIgqZkjndoWSbZ2kRjK2FMwI6bgtZR6aNYVzr6sn2zzT5zOUYPMflJu17gBqNH0tjp62SlLg/w=="} -zBNy7xYrzNb25mbVFP5hVZXwJZ7RD16yJSoya82qe3Jra diff --git a/tests/upgrade/integration/v1/generated/pre/signinputs/indy_32.json b/tests/upgrade/integration/v1/generated/pre/signinputs/indy_32.json deleted file mode 100644 index 25a24f298..000000000 --- a/tests/upgrade/integration/v1/generated/pre/signinputs/indy_32.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "verificationMethodId": "did:cheqd:testnet:H95Vr7VxXKDXoAWPNgdLxeihLYibSp1Q#key-1", - "privKey": "V+DHGMMA9O4fvIBM1gnyivbKxLudXrG1bHwMjnF4Xi3JYEmEn03givjkKTnAdQ8/DG5qfPU6qVoRUaBgNiwU+Q==" - } -] \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/signinputs/indy_32.keys b/tests/upgrade/integration/v1/generated/pre/signinputs/indy_32.keys deleted file mode 100644 index c6bd769b6..000000000 --- a/tests/upgrade/integration/v1/generated/pre/signinputs/indy_32.keys +++ /dev/null @@ -1,2 +0,0 @@ -{"pub_key_base_64":"yWBJhJ9N4Ir45Ck5wHUPPwxuanz1OqlaEVGgYDYsFPk=","priv_key_base_64":"V+DHGMMA9O4fvIBM1gnyivbKxLudXrG1bHwMjnF4Xi3JYEmEn03givjkKTnAdQ8/DG5qfPU6qVoRUaBgNiwU+Q=="} -zEZ673G4y1tzG7ceqH9frgj2hJj14EiDjho3BwC9hcuz8 diff --git a/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_lowcase.json b/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_lowcase.json deleted file mode 100644 index 754a4b84a..000000000 --- a/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_lowcase.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "verificationMethodId": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "privKey": "9ODcnGwn0iiX9M47BTnfnoL8VfoK6BZLk7NX++txjABV4VqtfVOsEgTX9bQ1hg/uXQwBO3onISMQ0hCWbdTalw==" - } -] \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_lowcase.keys b/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_lowcase.keys deleted file mode 100644 index a8d5f8ef7..000000000 --- a/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_lowcase.keys +++ /dev/null @@ -1,2 +0,0 @@ -{"pub_key_base_64":"VeFarX1TrBIE1/W0NYYP7l0MATt6JyEjENIQlm3U2pc=","priv_key_base_64":"9ODcnGwn0iiX9M47BTnfnoL8VfoK6BZLk7NX++txjABV4VqtfVOsEgTX9bQ1hg/uXQwBO3onISMQ0hCWbdTalw=="} -z6nExc7qoYEoDd2DRrMpBv5ShXHYZQL3LTi2twgTm79bL diff --git a/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_mixed.json b/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_mixed.json deleted file mode 100644 index 77e0f2ace..000000000 --- a/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_mixed.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "verificationMethodId": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-1", - "privKey": "x95rNwt5epP3755Y6A/lP822rE+oUmEtt4gs445soA0SV3E+3H5rRscvibF+NU9GC0K0cLRVjP4Q27pwUSMBkQ==" - } -] \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_mixed.keys b/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_mixed.keys deleted file mode 100644 index f211a800c..000000000 --- a/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_mixed.keys +++ /dev/null @@ -1,2 +0,0 @@ -{"pub_key_base_64":"EldxPtx+a0bHL4mxfjVPRgtCtHC0VYz+ENu6cFEjAZE=","priv_key_base_64":"x95rNwt5epP3755Y6A/lP822rE+oUmEtt4gs445soA0SV3E+3H5rRscvibF+NU9GC0K0cLRVjP4Q27pwUSMBkQ=="} -z2Ebg35RKmCM4SKYBkNNiHqbK5ypdAUcjsKyLum1zpCr4 diff --git a/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_uppercase.json b/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_uppercase.json deleted file mode 100644 index b99d2aebd..000000000 --- a/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_uppercase.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "verificationMethodId": "did:cheqd:testnet:45465F44-A45C-4B91-8C21-9AF6C0E33137#key-1", - "privKey": "tBjxEJCqSkj7u+iTWRqAVZwtcl2XBZrlaMfhxYIRc4wj7epbmDkJ35sCin3MWnAxvHJNDY0yyPafVspsrgb1Ng==" - } -] \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_uppercase.keys b/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_uppercase.keys deleted file mode 100644 index 68238bb7d..000000000 --- a/tests/upgrade/integration/v1/generated/pre/signinputs/uuid_uppercase.keys +++ /dev/null @@ -1,2 +0,0 @@ -{"pub_key_base_64":"I+3qW5g5Cd+bAop9zFpwMbxyTQ2NMsj2n1bKbK4G9TY=","priv_key_base_64":"tBjxEJCqSkj7u+iTWRqAVZwtcl2XBZrlaMfhxYIRc4wj7epbmDkJ35sCin3MWnAxvHJNDY0yyPafVspsrgb1Ng=="} -z3RFgcpLEM8oRi2DoK3B1FCSTAfCBKjZvBkzuxcBV4TNM diff --git a/tests/upgrade/integration/v1/generated/pre/update - diddoc/diddoc_indy_16.json b/tests/upgrade/integration/v1/generated/pre/update - diddoc/diddoc_indy_16.json deleted file mode 100644 index e1f7e521c..000000000 --- a/tests/upgrade/integration/v1/generated/pre/update - diddoc/diddoc_indy_16.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def" - ], - "id": "did:cheqd:testnet:HWdKrn8vpY6nVZEz", - "controller": [ - "did:cheqd:testnet:HWdKrn8vpY6nVZEz" - ], - "verification_method": [ - { - "id": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-1", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:HWdKrn8vpY6nVZEz", - "public_key_jwk": [], - "public_key_multibase": "zBNy7xYrzNb25mbVFP5hVZXwJZ7RD16yJSoya82qe3Jra" - }, - { - "id": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-2", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:HWdKrn8vpY6nVZEz", - "public_key_jwk": [], - "public_key_multibase": "zC4mnpocVYbywi32srkHzRdy7LEXQG4TM8YtCTPXWnza1" - }, - { - "id": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-3", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:HWdKrn8vpY6nVZEz", - "public_key_jwk": [], - "public_key_multibase": "zC1CAqqp2tQooisYtTh1oULGzKyRNQbsUtyqoh2neWPta" - }, - { - "id": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-4", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:HWdKrn8vpY6nVZEz", - "public_key_jwk": [], - "public_key_multibase": "zDw21irq4wBfyTvxAG9L8PQj6b79iyTyzyV6XVj9SfyRR" - } - ], - "authentication": [ - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-1" - ], - "assertion_method": [ - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-2", - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-3" - ], - "capability_invocation": [ - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-4", - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-1" - ], - "capability_delegation": [ - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-4", - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-2" - ], - "key_agreement": [ - "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-4" - ], - "service": [ - { - "id": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#service-1", - "type": "type-1", - "service_endpoint": "endpoint-1" - }, - { - "id": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#service-2", - "type": "type-1", - "service_endpoint": "endpoint-2" - } - ], - "also_known_as": [ - "alias-1", - "alias-2", - "alias-3" - ] - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:HWdKrn8vpY6nVZEz#key-1", - "privKey": "dTHxupAW0yqeeIgqZkjndoWSbZ2kRjK2FMwI6bgtZR6aNYVzr6sn2zzT5zOUYPMflJu17gBqNH0tjp62SlLg/w==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/update - diddoc/diddoc_uuid_lowcase.json b/tests/upgrade/integration/v1/generated/pre/update - diddoc/diddoc_uuid_lowcase.json deleted file mode 100644 index 1c9a208db..000000000 --- a/tests/upgrade/integration/v1/generated/pre/update - diddoc/diddoc_uuid_lowcase.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def", - "ghi" - ], - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "controller": [ - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554" - ], - "verification_method": [ - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "public_key_jwk": [], - "public_key_multibase": "z6nExc7qoYEoDd2DRrMpBv5ShXHYZQL3LTi2twgTm79bL" - }, - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-2", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "public_key_jwk": [], - "public_key_multibase": "z8GnprPBEuoBvYqJD4RbUhoFSrZMzH6rffRvCmNzEBxDT" - }, - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-3", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "public_key_jwk": [], - "public_key_multibase": "z8iREaP6YKkK77MxojoyAgcnuJAC9reQq6mMJuxxCK523" - }, - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-4", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554", - "public_key_jwk": [], - "public_key_multibase": "z4GCBhVhbx2ZgF1hMT2Zt3f9x17LqeR4jb83QXehsMCvt" - } - ], - "authentication": [ - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-2" - ], - "service": [ - { - "id": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#service-1", - "type": "type-1", - "service_endpoint": "endpoint-1" - } - ], - "also_known_as": [ - "alias-1", - "alias-2" - ] - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:2e5ca092-8264-47c7-9216-8b36e01e5554#key-1", - "privKey": "9ODcnGwn0iiX9M47BTnfnoL8VfoK6BZLk7NX++txjABV4VqtfVOsEgTX9bQ1hg/uXQwBO3onISMQ0hCWbdTalw==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/pre/update - diddoc/diddoc_uuid_mixed.json b/tests/upgrade/integration/v1/generated/pre/update - diddoc/diddoc_uuid_mixed.json deleted file mode 100644 index bf3b0e944..000000000 --- a/tests/upgrade/integration/v1/generated/pre/update - diddoc/diddoc_uuid_mixed.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "payload": { - "context": [ - "abc", - "def" - ], - "id": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad", - "controller": [ - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad" - ], - "verification_method": [ - { - "id": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-1", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad", - "public_key_jwk": [], - "public_key_multibase": "z2Ebg35RKmCM4SKYBkNNiHqbK5ypdAUcjsKyLum1zpCr4" - }, - { - "id": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-2", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad", - "public_key_jwk": [], - "public_key_multibase": "z2j417oT5Pyha2XKK4xYsgBv8u5pFk7HFDzbCbRUgZfc6" - }, - { - "id": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-3", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad", - "public_key_jwk": [], - "public_key_multibase": "z7THeYhdHGDHnVrffBsuXyoRKKyBZgwNjX4PYL25cEk1L" - }, - { - "id": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-4", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad", - "public_key_jwk": [], - "public_key_multibase": "zYnoDoX5wcCKEq6ZRRkS42jigYTSEn8DNvDnWmQadtsJ" - } - ], - "assertion_method": [ - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-3" - ], - "capability_invocation": [ - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-1" - ], - "key_agreement": [ - "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-4" - ], - "service": [ - { - "id": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#service-1", - "type": "type-1", - "service_endpoint": "endpoint-1" - }, - { - "id": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#service-2", - "type": "type-2", - "service_endpoint": "endpoint-2" - }, - { - "id": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#service-3", - "type": "type-3", - "service_endpoint": "endpoint-3" - } - ], - "also_known_as": [ - "alias-1", - "alias-2", - "alias-3", - "alias-4" - ] - }, - "signInputs": [ - { - "verificationMethodId": "did:cheqd:testnet:C8113F5E-E124-4400-a3c8-109b4f6722ad#key-1", - "privKey": "x95rNwt5epP3755Y6A/lP822rE+oUmEtt4gs445soA0SV3E+3H5rRscvibF+NU9GC0K0cLRVjP4Q27pwUSMBkQ==" - } - ] -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/proposal/existing/param_change_did.json b/tests/upgrade/integration/v1/generated/proposal/existing/param_change_did.json deleted file mode 100644 index 799adf059..000000000 --- a/tests/upgrade/integration/v1/generated/proposal/existing/param_change_did.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "title": "Did Param Change", - "description": "This is a simple example of a param change - double the values, 99% burn factor", - "type": "ParameterChange", - "changes": [ - { - "subspace": "cheqd", - "key": "feeparams", - "value": {"create_did": {"denom": "ncheq", "amount": "100000000000"}, "update_did": {"denom": "ncheq", "amount": "50000000000"}, "deactivate_did": {"denom": "ncheq", "amount": "20000000000"}, "burn_factor": "0.990000000000000000"} - } - ], - "deposit": "10000000000ncheq" -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/proposal/existing/param_change_resource.json b/tests/upgrade/integration/v1/generated/proposal/existing/param_change_resource.json deleted file mode 100644 index d066cc401..000000000 --- a/tests/upgrade/integration/v1/generated/proposal/existing/param_change_resource.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "title": "Resource Param Change", - "description": "This is a simple example of a param change - double the values, 99% burn factor", - "type": "ParameterChange", - "changes": [ - { - "subspace": "resource", - "key": "feeparams", - "value": {"image": {"denom": "ncheq", "amount": "20000000000"}, "json": {"denom": "ncheq", "amount": "5000000000"}, "default": {"denom": "ncheq", "amount": "10000000000"}, "burn_factor": "0.990000000000000000"} - } - ], - "deposit": "10000000000ncheq" -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/proposal/expected/param_change_did.json b/tests/upgrade/integration/v1/generated/proposal/expected/param_change_did.json deleted file mode 100644 index 2919f3791..000000000 --- a/tests/upgrade/integration/v1/generated/proposal/expected/param_change_did.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "create_did": { - "denom": "ncheq", - "amount": "100000000000" - }, - "update_did": { - "denom": "ncheq", - "amount": "50000000000" - }, - "deactivate_did": { - "denom": "ncheq", - "amount": "20000000000" - }, - "burn_factor": "0.990000000000000000" -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/generated/proposal/expected/param_change_resource.json b/tests/upgrade/integration/v1/generated/proposal/expected/param_change_resource.json deleted file mode 100644 index 2468816d8..000000000 --- a/tests/upgrade/integration/v1/generated/proposal/expected/param_change_resource.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "image": { - "denom": "ncheq", - "amount": "20000000000" - }, - "json": { - "denom": "ncheq", - "amount": "5000000000" - }, - "default": { - "denom": "ncheq", - "amount": "10000000000" - }, - "burn_factor": "0.990000000000000000" -} \ No newline at end of file diff --git a/tests/upgrade/integration/v1/glob.go b/tests/upgrade/integration/v1/glob.go deleted file mode 100644 index 355ca8922..000000000 --- a/tests/upgrade/integration/v1/glob.go +++ /dev/null @@ -1,18 +0,0 @@ -package integration - -import ( - "os" - "path/filepath" -) - -func RelGlob(relativePath ...string) ([]string, error) { - cwd, err := os.Getwd() - if err != nil { - return nil, err - } - - relativePathJoined := filepath.Join(relativePath...) - fullPath := filepath.Join(cwd, relativePathJoined) - - return filepath.Glob(fullPath) -} diff --git a/tests/upgrade/integration/v1/helpers.go b/tests/upgrade/integration/v1/helpers.go deleted file mode 100644 index 799f245ca..000000000 --- a/tests/upgrade/integration/v1/helpers.go +++ /dev/null @@ -1,26 +0,0 @@ -package integration - -import ( - "fmt" - "path/filepath" - "strings" - - helpers "github.com/cheqd/cheqd-node/tests/integration/helpers" -) - -func GetCaseName(path string) string { - split := strings.Split(path, string(filepath.Separator)) - l := len(split) - file := split[l-1] - idiom := strings.Replace(file, ".json", "", 1) - return fmt.Sprintf("%s %s %s", split[l-3], split[l-2], idiom) -} - -func GetFile(path string) string { - split := strings.Split(path, string(filepath.Separator)) - return split[len(split)-1] -} - -func CreateTestJSON(dir string, content []byte) (string, error) { - return helpers.WriteTmpFile(dir, content) -} diff --git a/tests/upgrade/integration/v1/loader.go b/tests/upgrade/integration/v1/loader.go deleted file mode 100644 index d6c57e666..000000000 --- a/tests/upgrade/integration/v1/loader.go +++ /dev/null @@ -1,71 +0,0 @@ -package integration - -import ( - "encoding/json" - "os" - - integrationhelpers "github.com/cheqd/cheqd-node/tests/integration/helpers" - "github.com/cheqd/cheqd-node/x/did/client/cli" - didtypesv2 "github.com/cheqd/cheqd-node/x/did/types" - didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" - resourcetypesv2 "github.com/cheqd/cheqd-node/x/resource/types" - resourcetypesv1 "github.com/cheqd/cheqd-node/x/resource/types/v1" -) - -func Loader(path string, ptrPayload interface{}) ([]cli.SignInput, error) { - var tc cli.PayloadWithSignInputs - - file, err := os.ReadFile(path) - if err != nil { - return []cli.SignInput{}, err - } - - switch ptrPayload := ptrPayload.(type) { - case *didtypesv2.FeeParams: - if err := integrationhelpers.Codec.UnmarshalJSON(file, ptrPayload); err != nil { - return []cli.SignInput{}, err - } - return []cli.SignInput{}, nil - case *resourcetypesv2.FeeParams: - if err := integrationhelpers.Codec.UnmarshalJSON(file, ptrPayload); err != nil { - return []cli.SignInput{}, err - } - return []cli.SignInput{}, nil - } - - err = json.Unmarshal(file, &tc) - if err != nil { - return []cli.SignInput{}, err - } - - switch ptrPayload := ptrPayload.(type) { - case *didtypesv1.MsgCreateDidPayload: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - case *didtypesv1.MsgUpdateDidPayload: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - case *didtypesv1.Did: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - case *didtypesv2.MsgCreateDidDocPayload: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - case *didtypesv2.MsgUpdateDidDocPayload: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - case *didtypesv2.DidDoc: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - case *resourcetypesv2.MsgCreateResourcePayload: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - case *resourcetypesv2.Metadata: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - case *resourcetypesv2.ResourceWithMetadata: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - case *resourcetypesv1.MsgCreateResourcePayload: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - case *resourcetypesv1.ResourceHeader: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - default: - err = json.Unmarshal(tc.Payload, ptrPayload) - } - if err != nil { - return []cli.SignInput{}, err - } - return tc.SignInputs, err -} diff --git a/tests/upgrade/integration/v1/network/config.go b/tests/upgrade/integration/v1/network/config.go deleted file mode 100644 index b4360aaac..000000000 --- a/tests/upgrade/integration/v1/network/config.go +++ /dev/null @@ -1,10 +0,0 @@ -package network - -import ( - integrationnetwork "github.com/cheqd/cheqd-node/tests/integration/network" -) - -const ( - ChainID = integrationnetwork.ChainID - DidNamespace = integrationnetwork.DidNamespace -) diff --git a/tests/upgrade/integration/v1/param_change_proposal_test.go b/tests/upgrade/integration/v1/param_change_proposal_test.go deleted file mode 100644 index 330544c01..000000000 --- a/tests/upgrade/integration/v1/param_change_proposal_test.go +++ /dev/null @@ -1,158 +0,0 @@ -//go:build upgrade_integration_v1 - -package integration - -import ( - "path/filepath" - - cli "github.com/cheqd/cheqd-node/tests/upgrade/integration/v1/cli" - didtypes "github.com/cheqd/cheqd-node/x/did/types" - resourcetypes "github.com/cheqd/cheqd-node/x/resource/types" - govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = Describe("Upgrade - Fee parameter change proposal", func() { - It("should wait for node catching up", func() { - By("pinging the node status until catching up is flagged as false") - err := cli.WaitForCaughtUp(cli.Validator0, cli.CliBinaryName, cli.VotingPeriod*6) - Expect(err).To(BeNil()) - }) - - It("should submit a parameter change proposal for did module", func() { - By("passing the proposal file to the container") - _, err := cli.LocalnetExecCopyAbsoluteWithPermissions(filepath.Join(GeneratedJSONDir, ProposalJSONDir, "existing", "param_change_did.json"), cli.DockerHome, cli.Validator0) - Expect(err).To(BeNil()) - - By("sending a SubmitParamChangeProposal transaction from `validator0` container") - res, err := cli.SubmitParamChangeProposal(cli.Validator0, "param_change_did.json") - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should vote for the parameter change proposal from `validator0` container", func() { - By("sending a VoteProposal transaction from `validator0` container") - res, err := cli.VoteProposal(cli.Validator0, "2", "yes") - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should vote for the parameter change proposal from `validator1` container", func() { - By("sending a VoteProposal transaction from `validator1` container") - res, err := cli.VoteProposal(cli.Validator1, "2", "yes") - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should vote for the parameter change proposal from `validator2` container", func() { - By("sending a VoteProposal transaction from `validator2` container") - res, err := cli.VoteProposal(cli.Validator2, "2", "yes") - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should vote for the parameter change proposal from `validator3` container", func() { - By("sending a VoteProposal transaction from `validator3` container") - res, err := cli.VoteProposal(cli.Validator3, "2", "yes") - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should wait for the proposal to pass", func() { - By("getting the current block height") - currentHeight, err := cli.GetCurrentBlockHeight(cli.Validator0, cli.CliBinaryName) - Expect(err).To(BeNil()) - - By("waiting for the proposal to pass") - err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+20, cli.VotingPeriod*3) - Expect(err).To(BeNil()) - }) - - It("should check the proposal status to ensure it has passed", func() { - By("sending a QueryProposal query from `validator0` container") - proposal, err := cli.QueryProposal(cli.Validator0, "2") - Expect(err).To(BeNil()) - Expect(proposal.Status).To(BeEquivalentTo(govtypesv1.StatusPassed)) - }) - - It("should validate the param change result with the expected outcome", func() { - By("sending a QueryParams query from `validator0` container") - feeParams, err := cli.QueryDidFeeParams(cli.Validator0, didtypes.ModuleName, string(didtypes.ParamStoreKeyFeeParams)) - Expect(err).To(BeNil()) - - By("checking against the expected fee params") - var expectedFeeParams didtypes.FeeParams - _, err = Loader(filepath.Join(GeneratedJSONDir, ProposalJSONDir, "expected", "param_change_did.json"), &expectedFeeParams) - Expect(err).To(BeNil()) - Expect(feeParams).To(Equal(expectedFeeParams)) - }) - - It("should submit a parameter change proposal for resource module", func() { - By("passing the proposal file to the container") - _, err := cli.LocalnetExecCopyAbsoluteWithPermissions(filepath.Join(GeneratedJSONDir, ProposalJSONDir, "existing", "param_change_resource.json"), cli.DockerHome, cli.Validator0) - Expect(err).To(BeNil()) - - By("sending a SubmitParamChangeProposal transaction from `validator0` container") - res, err := cli.SubmitParamChangeProposal(cli.Validator0, "param_change_resource.json") - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should vote for the parameter change proposal from `validator0` container", func() { - By("sending a VoteProposal transaction from `validator0` container") - res, err := cli.VoteProposal(cli.Validator0, "3", "yes") - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should vote for the parameter change proposal from `validator1` container", func() { - By("sending a VoteProposal transaction from `validator1` container") - res, err := cli.VoteProposal(cli.Validator1, "3", "yes") - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should vote for the parameter change proposal from `validator2` container", func() { - By("sending a VoteProposal transaction from `validator2` container") - res, err := cli.VoteProposal(cli.Validator2, "3", "yes") - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should vote for the parameter change proposal from `validator3` container", func() { - By("sending a VoteProposal transaction from `validator3` container") - res, err := cli.VoteProposal(cli.Validator3, "3", "yes") - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should wait for the proposal to pass", func() { - By("getting the current block height") - currentHeight, err := cli.GetCurrentBlockHeight(cli.Validator0, cli.CliBinaryName) - Expect(err).To(BeNil()) - - By("waiting for the proposal to pass") - err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+20, cli.VotingPeriod*3) - Expect(err).To(BeNil()) - }) - - It("should check the proposal status to ensure it has passed", func() { - By("sending a QueryProposal query from `validator0` container") - proposal, err := cli.QueryProposal(cli.Validator0, "3") - Expect(err).To(BeNil()) - Expect(proposal.Status).To(BeEquivalentTo(govtypesv1.StatusPassed)) - }) - - It("should validate the param change result with the expected outcome", func() { - By("sending a QueryParams query from `validator0` container") - feeParams, err := cli.QueryResourceFeeParams(cli.Validator0, resourcetypes.ModuleName, string(resourcetypes.ParamStoreKeyFeeParams)) - Expect(err).To(BeNil()) - - By("checking against the expected fee params") - var expectedFeeParams resourcetypes.FeeParams - _, err = Loader(filepath.Join(GeneratedJSONDir, ProposalJSONDir, "expected", "param_change_resource.json"), &expectedFeeParams) - Expect(err).To(BeNil()) - Expect(feeParams).To(Equal(expectedFeeParams)) - }) -}) diff --git a/tests/upgrade/integration/v1/post_test.go b/tests/upgrade/integration/v1/post_test.go deleted file mode 100644 index 43f58d598..000000000 --- a/tests/upgrade/integration/v1/post_test.go +++ /dev/null @@ -1,225 +0,0 @@ -//go:build upgrade_integration_v1 - -package integration - -import ( - "fmt" - "path/filepath" - - clihelpers "github.com/cheqd/cheqd-node/tests/integration/helpers" - cli "github.com/cheqd/cheqd-node/tests/upgrade/integration/v1/cli" - didcli "github.com/cheqd/cheqd-node/x/did/client/cli" - didtypesv2 "github.com/cheqd/cheqd-node/x/did/types" - resourcetypesv2 "github.com/cheqd/cheqd-node/x/resource/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = Describe("Upgrade - Post", func() { - var feeParams didtypesv2.FeeParams - var resourceFeeParams resourcetypesv2.FeeParams - - BeforeEach(func() { - // Query fee params - res, err := cli.QueryParams(cli.Validator0, didtypesv2.ModuleName, string(didtypesv2.ParamStoreKeyFeeParams)) - Expect(err).To(BeNil()) - err = clihelpers.Codec.UnmarshalJSON([]byte(res.Value), &feeParams) - Expect(err).To(BeNil()) - - res, err = cli.QueryParams(cli.Validator0, resourcetypesv2.ModuleName, string(resourcetypesv2.ParamStoreKeyFeeParams)) - Expect(err).To(BeNil()) - err = clihelpers.Codec.UnmarshalJSON([]byte(res.Value), &resourceFeeParams) - Expect(err).To(BeNil()) - }) - - Context("After a software upgrade execution has concluded", func() { - It("should wait for node catching up", func() { - By("pinging the node status until catching up is flagged as false") - err := cli.WaitForCaughtUp(cli.Validator0, cli.CliBinaryName, cli.VotingPeriod*6) - Expect(err).To(BeNil()) - }) - - It("should wait for a certain number of blocks to be produced", func() { - By("fetching the current chain height") - currentHeight, err := cli.GetCurrentBlockHeight(cli.Validator0, cli.CliBinaryName) - Expect(err).To(BeNil()) - - By("waiting for 10 blocks to be produced on top, after the upgrade") - err = cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, currentHeight+10, cli.VotingPeriod*6) - Expect(err).To(BeNil()) - }) - - It("should match the expected module version map", func() { - By("loading the expected module version map") - var expected upgradetypes.QueryModuleVersionsResponse - _, err := Loader(filepath.Join(GeneratedJSONDir, "post", "query - module-version-map", "v1.json"), &expected) - Expect(err).To(BeNil()) - - By("matching the expected module version map") - actual, err := cli.QueryModuleVersionMap(cli.Validator0) - Expect(err).To(BeNil()) - - Expect(actual.ModuleVersions).To(Equal(expected.ModuleVersions), "module version map mismatch") - }) - - It("should load and run existing diddoc payloads - case: update", func() { - By("matching the glob pattern for existing diddoc payloads") - DidDocUpdatePayloads, err := RelGlob(GeneratedJSONDir, "post", "update - diddoc", "*.json") - Expect(err).To(BeNil()) - - for _, payload := range DidDocUpdatePayloads { - var DidDocUpdatePayload didcli.DIDDocument - var DidDocUpdateSignInput []didcli.SignInput - - testCase := GetCaseName(payload) - By("Running: " + testCase) - fmt.Println("Running: " + testCase) - - By("reading ") - DidDocUpdateSignInput, err = Loader(payload, &DidDocUpdatePayload) - Expect(err).To(BeNil()) - - tax := feeParams.UpdateDid.String() - res, err := cli.UpdateDid(DidDocUpdatePayload, DidDocUpdateSignInput, cli.Validator0, "", tax) - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - } - }) - - It("should load and run existing diddoc payloads - case: deactivate", func() { - By("matching the glob pattern for existing diddoc payloads") - DidDocDeactivatePayloads, err := RelGlob(GeneratedJSONDir, "post", "deactivate - diddoc", "*.json") - Expect(err).To(BeNil()) - - for _, payload := range DidDocDeactivatePayloads { - var DidDocDeacctivatePayload didtypesv2.MsgDeactivateDidDocPayload - var DidDocDeactivateSignInput []didcli.SignInput - - testCase := GetCaseName(payload) - By("Running: " + testCase) - fmt.Println("Running: " + testCase) - - By("reading ") - DidDocDeactivateSignInput, err = Loader(payload, &DidDocDeacctivatePayload) - Expect(err).To(BeNil()) - - tax := feeParams.DeactivateDid.String() - res, err := cli.DeactivateDid(DidDocDeacctivatePayload, DidDocDeactivateSignInput, cli.Validator0, tax) - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - } - }) - - It("should create resources after upgrade", func() { - By("matching the glob pattern for resource payloads to create") - ResourcePayloads, err := RelGlob(GeneratedJSONDir, "post", "create - resource", "*.json") - Expect(err).To(BeNil()) - - for _, payload := range ResourcePayloads { - var ResourceCreatePayload resourcetypesv2.MsgCreateResourcePayload - - testCase := GetCaseName(payload) - By("Running: create " + testCase) - fmt.Println("Running: " + testCase) - - signInputs, err := Loader(payload, &ResourceCreatePayload) - Expect(err).To(BeNil()) - - ResourceFile, err := CreateTestJSON(GinkgoT().TempDir(), ResourceCreatePayload.Data) - Expect(err).To(BeNil()) - - res, err := cli.CreateResource( - ResourceCreatePayload, - ResourceFile, - signInputs, - cli.Validator0, - resourceFeeParams.Json.String(), - ) - - Expect(err).To(BeNil()) - Expect(res.Code).To(Equal(uint32(0))) - } - }) - - It("should load and run expected diddoc payloads", func() { - By("matching the glob pattern for existing diddoc payloads") - ExpectedDidDocUpdateRecords, err := RelGlob(GeneratedJSONDir, "post", "query - diddoc", "*.json") - Expect(err).To(BeNil()) - - for _, payload := range ExpectedDidDocUpdateRecords { - var DidDocUpdateRecord didtypesv2.DidDoc - - testCase := GetCaseName(payload) - By("Running: query " + testCase) - fmt.Println("Running: " + testCase) - - _, err = Loader(payload, &DidDocUpdateRecord) - Expect(err).To(BeNil()) - - res, err := cli.QueryDid(DidDocUpdateRecord.Id, cli.Validator0) - Expect(err).To(BeNil()) - - if DidDocUpdateRecord.Context == nil { - DidDocUpdateRecord.Context = []string{} - } - if DidDocUpdateRecord.Authentication == nil { - DidDocUpdateRecord.Authentication = []string{} - } - if DidDocUpdateRecord.AssertionMethod == nil { - DidDocUpdateRecord.AssertionMethod = []string{} - } - if DidDocUpdateRecord.CapabilityInvocation == nil { - DidDocUpdateRecord.CapabilityInvocation = []string{} - } - if DidDocUpdateRecord.CapabilityDelegation == nil { - DidDocUpdateRecord.CapabilityDelegation = []string{} - } - if DidDocUpdateRecord.KeyAgreement == nil { - DidDocUpdateRecord.KeyAgreement = []string{} - } - if DidDocUpdateRecord.Service == nil { - DidDocUpdateRecord.Service = []*didtypesv2.Service{} - } - if DidDocUpdateRecord.AlsoKnownAs == nil { - DidDocUpdateRecord.AlsoKnownAs = []string{} - } - - Expect(*res.Value.DidDoc).To(Equal(DidDocUpdateRecord)) - } - }) - - It("should load and run expected resource payloads", func() { - By("matching the glob pattern for existing resource payloads") - ExpectedResourceCreateRecords, err := RelGlob(GeneratedJSONDir, "post", "query - resource", "*.json") - Expect(err).To(BeNil()) - - for _, payload := range ExpectedResourceCreateRecords { - var ResourceCreateRecord resourcetypesv2.ResourceWithMetadata - - testCase := GetCaseName(payload) - By("Running: query " + testCase) - fmt.Println("Running: " + testCase) - - _, err = Loader(payload, &ResourceCreateRecord) - Expect(err).To(BeNil()) - - res, err := cli.QueryResource(ResourceCreateRecord.Metadata.CollectionId, ResourceCreateRecord.Metadata.Id, cli.Validator0) - - Expect(err).To(BeNil()) - Expect(res.Resource.Metadata.Id).To(Equal(ResourceCreateRecord.Metadata.Id)) - Expect(res.Resource.Metadata.CollectionId).To(Equal(ResourceCreateRecord.Metadata.CollectionId)) - Expect(res.Resource.Metadata.Name).To(Equal(ResourceCreateRecord.Metadata.Name)) - Expect(res.Resource.Metadata.Version).To(Equal(ResourceCreateRecord.Metadata.Version)) - Expect(res.Resource.Metadata.ResourceType).To(Equal(ResourceCreateRecord.Metadata.ResourceType)) - Expect(res.Resource.Metadata.AlsoKnownAs).To(Equal(ResourceCreateRecord.Metadata.AlsoKnownAs)) - Expect(res.Resource.Metadata.MediaType).To(Equal(ResourceCreateRecord.Metadata.MediaType)) - // Created is populated on successful creation. We are ignoring it here. - // Expect(res.Resource.Metadata.Created).To(Equal(ResourceCreateRecord.Metadata.Created)) - Expect(res.Resource.Metadata.Checksum).To(Equal(ResourceCreateRecord.Metadata.Checksum)) - Expect(res.Resource.Metadata.PreviousVersionId).To(Equal(ResourceCreateRecord.Metadata.PreviousVersionId)) - Expect(res.Resource.Metadata.NextVersionId).To(Equal(ResourceCreateRecord.Metadata.NextVersionId)) - } - }) - }) -}) diff --git a/tests/upgrade/integration/v1/pre_test.go b/tests/upgrade/integration/v1/pre_test.go deleted file mode 100644 index 3d3635a53..000000000 --- a/tests/upgrade/integration/v1/pre_test.go +++ /dev/null @@ -1,186 +0,0 @@ -//go:build upgrade_integration_v1 - -package integration - -import ( - "fmt" - "path/filepath" - - cli "github.com/cheqd/cheqd-node/tests/upgrade/integration/v1/cli" - didcli "github.com/cheqd/cheqd-node/x/did/client/cli" - didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" - resourcetypesv1 "github.com/cheqd/cheqd-node/x/resource/types/v1" - govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = Describe("Upgrade - Pre", func() { - Context("Before a software upgrade execution is initiated", func() { - It("should wait for chain to bootstrap", func() { - By("pinging the node status until the voting end height is reached") - err := cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, cli.BootstrapHeight, cli.BootstrapPeriod) - Expect(err).To(BeNil()) - }) - - It("should load and run existing diddoc payloads - case: create", func() { - By("matching the glob pattern for existing diddoc payloads") - ExistingDidDocCreatePayloads, err := RelGlob(GeneratedJSONDir, "pre", "create - diddoc", "*.json") - Expect(err).To(BeNil()) - - for _, payload := range ExistingDidDocCreatePayloads { - var DidDocCreatePayload didtypesv1.MsgCreateDidPayload - var DidDocCreateSignInput []didcli.SignInput - - testCase := GetCaseName(payload) - By("Running: " + testCase) - fmt.Println("Running: " + testCase) - - By("reading ") - DidDocCreateSignInput, err = Loader(payload, &DidDocCreatePayload) - Expect(err).To(BeNil()) - - res, err := cli.CreateDidLegacy(DidDocCreatePayload, DidDocCreateSignInput, cli.Validator0) - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - } - }) - - It("should load and run existing diddoc payloads - case: update", func() { - By("matching the glob pattern for existing diddoc payloads") - ExistingDidDocUpdatePayloads, err := RelGlob(GeneratedJSONDir, "pre", "update - diddoc", "*.json") - Expect(err).To(BeNil()) - - for _, payload := range ExistingDidDocUpdatePayloads { - var DidDocUpdatePayload didtypesv1.MsgUpdateDidPayload - var DidDocUpdateSignInput []didcli.SignInput - - testCase := GetCaseName(payload) - By("Running: " + testCase) - fmt.Println("Running: " + testCase) - - By("reading ") - DidDocUpdateSignInput, err = Loader(payload, &DidDocUpdatePayload) - Expect(err).To(BeNil()) - - resp, err := cli.QueryDidLegacy(DidDocUpdatePayload.Id, cli.Validator0) - Expect(err).To(BeNil()) - Expect(resp.Did.Id).To(BeEquivalentTo(DidDocUpdatePayload.Id)) - - DidDocUpdatePayload.VersionId = resp.Metadata.VersionId - - res, err := cli.UpdateDidLegacy(DidDocUpdatePayload, DidDocUpdateSignInput, cli.Validator0) - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - } - }) - - It("should load and run existing resource payloads - case: create", func() { - By("matching the glob pattern for existing resource payloads") - ExistingResourceCreatePayloads, err := RelGlob(GeneratedJSONDir, "pre", "create - resource", "*.json") - Expect(err).To(BeNil()) - - for _, payload := range ExistingResourceCreatePayloads { - var ResourceCreatePayload resourcetypesv1.MsgCreateResourcePayload - var ResourceCreateSignInput []didcli.SignInput - - testCase := GetCaseName(payload) - By("Running: " + testCase) - fmt.Println("Running: " + testCase) - - ResourceCreateSignInput, err = Loader(payload, &ResourceCreatePayload) - Expect(err).To(BeNil()) - - By("copying the existing resource file to the container") - ResourceFile, err := CreateTestJSON(GinkgoT().TempDir(), ResourceCreatePayload.Data) - Expect(err).To(BeNil()) - _, err = cli.LocalnetExecCopyAbsoluteWithPermissions(ResourceFile, cli.DockerHome, cli.Validator0) - Expect(err).To(BeNil()) - - res, err := cli.CreateResourceLegacy( - ResourceCreatePayload.CollectionId, - ResourceCreatePayload.Id, - ResourceCreatePayload.Name, - ResourceCreatePayload.ResourceType, - filepath.Base(ResourceFile), - ResourceCreateSignInput, - cli.Validator0) - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - } - }) - - var UpgradeHeight int64 - var VotingEndHeight int64 - - It("should calculate the upgrade height", func() { - By("getting the current block height and calculating the voting end height") - var err error - UpgradeHeight, VotingEndHeight, err = cli.CalculateUpgradeHeight(cli.Validator0, cli.CliBinaryName) - Expect(err).To(BeNil()) - fmt.Printf("Upgrade height: %d\n", UpgradeHeight) - fmt.Printf("Voting end height: %d\n", VotingEndHeight) - }) - - It("should submit a software upgrade proposal", func() { - By("sending a SubmitUpgradeProposal transaction from `validator0` container") - res, err := cli.SubmitUpgradeProposal(UpgradeHeight, cli.Validator0) - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should deposit tokens for the software upgrade proposal", func() { - By("sending a DepositGov transaction from `validator0` container") - res, err := cli.DepositGov(cli.Validator0) - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should vote for the software upgrade proposal from `validator0` container", func() { - By("sending a VoteProposal transaction from `validator0` container") - res, err := cli.VoteProposal(cli.Validator0, "1", "yes") - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should vote for the software upgrade proposal from `validator1` container", func() { - By("sending a VoteProposal transaction from `validator1` container") - res, err := cli.VoteProposal(cli.Validator1, "1", "yes") - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should vote for the software upgrade proposal from `validator2` container", func() { - By("sending a VoteProposal transaction from `validator2` container") - res, err := cli.VoteProposal(cli.Validator2, "1", "yes") - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should vote for the software upgrade proposal from `validator3` container", func() { - By("sending a VoteProposal transaction from `validator3` container") - res, err := cli.VoteProposal(cli.Validator3, "1", "yes") - Expect(err).To(BeNil()) - Expect(res.Code).To(BeEquivalentTo(0)) - }) - - It("should wait for the voting end height to be reached", func() { - By("pinging the node status until the voting end height is reached") - err := cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, VotingEndHeight, cli.VotingPeriod) - Expect(err).To(BeNil()) - }) - - It("should query the proposal status to ensure it has passed", func() { - By("sending a QueryProposal Msg from `validator0` container") - proposal, err := cli.QueryProposalLegacy(cli.Validator0, "1") - Expect(err).To(BeNil()) - Expect(proposal.Status).To(BeEquivalentTo(govtypesv1beta1.StatusPassed)) - }) - - It("should wait for the upgrade height to be reached", func() { - By("pinging the node status until the upgrade height is reached") - err := cli.WaitForChainHeight(cli.Validator0, cli.CliBinaryName, UpgradeHeight, cli.VotingPeriod) - Expect(err).To(BeNil()) - }) - }) -}) diff --git a/tests/upgrade/integration/v1/upgrade_suite_test.go b/tests/upgrade/integration/v1/upgrade_suite_test.go deleted file mode 100644 index 802d62bfb..000000000 --- a/tests/upgrade/integration/v1/upgrade_suite_test.go +++ /dev/null @@ -1,15 +0,0 @@ -//go:build upgrade_integration_v1 - -package integration - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestUpgrade(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Upgrade v1 Integration Suite") -} diff --git a/tests/upgrade/integration/v2/loader.go b/tests/upgrade/integration/v2/loader.go index d6c57e666..55dd2ee10 100644 --- a/tests/upgrade/integration/v2/loader.go +++ b/tests/upgrade/integration/v2/loader.go @@ -7,9 +7,10 @@ import ( integrationhelpers "github.com/cheqd/cheqd-node/tests/integration/helpers" "github.com/cheqd/cheqd-node/x/did/client/cli" didtypesv2 "github.com/cheqd/cheqd-node/x/did/types" - didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" + + // didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" resourcetypesv2 "github.com/cheqd/cheqd-node/x/resource/types" - resourcetypesv1 "github.com/cheqd/cheqd-node/x/resource/types/v1" + // resourcetypesv1 "github.com/cheqd/cheqd-node/x/resource/types/v1" ) func Loader(path string, ptrPayload interface{}) ([]cli.SignInput, error) { @@ -39,12 +40,12 @@ func Loader(path string, ptrPayload interface{}) ([]cli.SignInput, error) { } switch ptrPayload := ptrPayload.(type) { - case *didtypesv1.MsgCreateDidPayload: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - case *didtypesv1.MsgUpdateDidPayload: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - case *didtypesv1.Did: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) + // case *didtypesv1.MsgCreateDidPayload: + // err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) + // case *didtypesv1.MsgUpdateDidPayload: + // err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) + // case *didtypesv1.Did: + // err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) case *didtypesv2.MsgCreateDidDocPayload: err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) case *didtypesv2.MsgUpdateDidDocPayload: @@ -57,10 +58,10 @@ func Loader(path string, ptrPayload interface{}) ([]cli.SignInput, error) { err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) case *resourcetypesv2.ResourceWithMetadata: err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - case *resourcetypesv1.MsgCreateResourcePayload: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - case *resourcetypesv1.ResourceHeader: - err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) + // case *resourcetypesv1.MsgCreateResourcePayload: + // err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) + // case *resourcetypesv1.ResourceHeader: + // err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) default: err = json.Unmarshal(tc.Payload, ptrPayload) } diff --git a/x/did/keeper/keeper_param_change_proposal_test.go b/x/did/keeper/keeper_param_change_proposal_test.go index 83af427d2..63edbe8df 100644 --- a/x/did/keeper/keeper_param_change_proposal_test.go +++ b/x/did/keeper/keeper_param_change_proposal_test.go @@ -5,7 +5,7 @@ import ( tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - cheqdsimapp "github.com/cheqd/cheqd-node/simapp" + cheqdapp "github.com/cheqd/cheqd-node/app" didtypes "github.com/cheqd/cheqd-node/x/did/types" sdk "github.com/cosmos/cosmos-sdk/types" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" @@ -19,14 +19,14 @@ import ( type HandlerTestSuite struct { suite.Suite - app *cheqdsimapp.SimApp + app *cheqdapp.TestApp ctx sdk.Context govHandler govv1beta1.Handler } func (suite *HandlerTestSuite) SetupTest() error { var err error - suite.app, err = cheqdsimapp.Setup(false) + suite.app, err = cheqdapp.Setup(false) if err != nil { return err } diff --git a/x/did/keeper/querier.go b/x/did/keeper/querier.go index 3a96dc2cd..95be3a37e 100644 --- a/x/did/keeper/querier.go +++ b/x/did/keeper/querier.go @@ -1,33 +1,24 @@ package keeper -import ( - "github.com/cheqd/cheqd-node/x/did/types" - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +// func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { +// return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { +// var ( +// res []byte +// err error +// ) - abci "github.com/cometbft/cometbft/abci/types" -) +// switch path[0] { +// case types.QueryGetDidDoc: +// return getDidDoc(ctx, path[1], k, legacyQuerierCdc) +// case types.QueryGetAllDidDocVersions: +// return getAllDidDocVersionsMetadata(ctx, path[1], k, legacyQuerierCdc) +// case types.QueryGetDidDocVersion: +// return getDidDocVersion(ctx, path[1], path[2], k, legacyQuerierCdc) -func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { - var ( - res []byte - err error - ) +// default: +// err = sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown %s query endpoint: %s", types.ModuleName, path[0]) +// } - switch path[0] { - case types.QueryGetDidDoc: - return getDidDoc(ctx, path[1], k, legacyQuerierCdc) - case types.QueryGetAllDidDocVersions: - return getAllDidDocVersionsMetadata(ctx, path[1], k, legacyQuerierCdc) - case types.QueryGetDidDocVersion: - return getDidDocVersion(ctx, path[1], path[2], k, legacyQuerierCdc) - - default: - err = sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown %s query endpoint: %s", types.ModuleName, path[0]) - } - - return res, err - } -} +// return res, err +// } +// } diff --git a/x/did/keeper/v1/keeper.go b/x/did/keeper/v1/keeper.go deleted file mode 100644 index 90886ab4d..000000000 --- a/x/did/keeper/v1/keeper.go +++ /dev/null @@ -1,30 +0,0 @@ -package keeper - -import ( - "fmt" - - types "github.com/cheqd/cheqd-node/x/did/types/v1" - "github.com/cometbft/cometbft/libs/log" - - "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -type ( - Keeper struct { - cdc codec.BinaryCodec - storeKey storetypes.StoreKey - } -) - -func NewKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey) *Keeper { - return &Keeper{ - cdc: cdc, - storeKey: storeKey, - } -} - -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) -} diff --git a/x/did/keeper/v1/keeper_config.go b/x/did/keeper/v1/keeper_config.go deleted file mode 100644 index e77e065f2..000000000 --- a/x/did/keeper/v1/keeper_config.go +++ /dev/null @@ -1,41 +0,0 @@ -package keeper - -import ( - types "github.com/cheqd/cheqd-node/x/did/types/v1" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// GetDidNamespace get did namespace -func (k Keeper) GetDidNamespace(ctx *sdk.Context) string { - return k.GetFromState(ctx, types.DidNamespaceKey) -} - -// SetDidNamespace set did namespace -func (k Keeper) SetDidNamespace(ctx *sdk.Context, namespace string) { - k.SetToState(ctx, types.DidNamespaceKey, []byte(namespace)) -} - -// GetFromState - get State value -func (k Keeper) GetFromState(ctx *sdk.Context, stateKey string) string { - store := ctx.KVStore(k.storeKey) - byteKey := types.KeyPrefix(stateKey) - bz := store.Get(byteKey) - - // Parse bytes - namespace := string(bz) - return namespace -} - -// SetToState - set State value -func (k Keeper) SetToState(ctx *sdk.Context, stateKey string, stateValue []byte) { - store := ctx.KVStore(k.storeKey) - byteKey := types.KeyPrefix(stateKey) - store.Set(byteKey, stateValue) -} - -// DeleteFromState - remove value from State by key -func (k Keeper) DeleteFromState(ctx *sdk.Context, stateKey string) { - store := ctx.KVStore(k.storeKey) - byteKey := types.KeyPrefix(stateKey) - store.Delete(byteKey) -} diff --git a/x/did/keeper/v1/keeper_did.go b/x/did/keeper/v1/keeper_did.go deleted file mode 100644 index ae830c6c4..000000000 --- a/x/did/keeper/v1/keeper_did.go +++ /dev/null @@ -1,110 +0,0 @@ -package keeper - -import ( - "strconv" - - types "github.com/cheqd/cheqd-node/x/did/types/v1" - "github.com/cosmos/cosmos-sdk/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -// GetDidCount get the total number of did -func (k Keeper) GetDidCount(ctx *sdk.Context) uint64 { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.DidCountKey)) - byteKey := types.KeyPrefix(types.DidCountKey) - bz := store.Get(byteKey) - - // Count doesn't exist: no element - if bz == nil { - return 0 - } - - // Parse bytes - count, err := strconv.ParseUint(string(bz), 10, 64) - if err != nil { - // Panic because the count should be always formattable to iint64 - panic("cannot decode count") - } - - return count -} - -// SetDidCount set the total number of did -func (k Keeper) SetDidCount(ctx *sdk.Context, count uint64) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.DidCountKey)) - byteKey := types.KeyPrefix(types.DidCountKey) - bz := []byte(strconv.FormatUint(count, 10)) - store.Set(byteKey, bz) -} - -// SetDid set a specific did in the store. Updates DID counter if the DID is new. -func (k Keeper) SetDid(ctx *sdk.Context, stateValue *types.StateValue) error { - // Unpack - did, err := stateValue.UnpackDataAsDid() - if err != nil { - return err - } - - // Update counter - if !k.HasDid(ctx, did.Id) { - count := k.GetDidCount(ctx) - k.SetDidCount(ctx, count+1) - } - - // Create the did - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.DidKey)) - b := k.cdc.MustMarshal(stateValue) - store.Set(GetDidIDBytes(did.Id), b) - return nil -} - -// GetDid returns a did from its id -func (k Keeper) GetDid(ctx *sdk.Context, id string) (types.StateValue, error) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.DidKey)) - - if !k.HasDid(ctx, id) { - return types.StateValue{}, sdkerrors.ErrNotFound.Wrap(id) - } - - var value types.StateValue - bytes := store.Get(GetDidIDBytes(id)) - if err := k.cdc.Unmarshal(bytes, &value); err != nil { - return types.StateValue{}, sdkerrors.Wrap(sdkerrors.ErrInvalidType, err.Error()) - } - - return value, nil -} - -// HasDid checks if the did exists in the store -func (k Keeper) HasDid(ctx *sdk.Context, id string) bool { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.DidKey)) - return store.Has(GetDidIDBytes(id)) -} - -// GetDidIDBytes returns the byte representation of the ID -func GetDidIDBytes(id string) []byte { - return []byte(id) -} - -// GetAllDid returns all did -// Loads all DIDs in memory. Use only for genesis export. -func (k Keeper) GetAllDid(ctx *sdk.Context) (list []types.StateValue) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.DidKey)) - iterator := sdk.KVStorePrefixIterator(store, []byte{}) - - defer func(iterator sdk.Iterator) { - err := iterator.Close() - if err != nil { - panic(err.Error()) - } - }(iterator) - - for ; iterator.Valid(); iterator.Next() { - var val types.StateValue - k.cdc.MustUnmarshal(iterator.Value(), &val) - list = append(list, val) - } - - return -} diff --git a/x/did/module.go b/x/did/module.go index 4107846d6..4e91ed930 100644 --- a/x/did/module.go +++ b/x/did/module.go @@ -129,17 +129,17 @@ func (am AppModule) Name() string { } // Route returns the cheqd module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, keeper.NewHandler(am.keeper)) -} +// func (am AppModule) Route() sdk.Route { +// return sdk.NewRoute(types.RouterKey, keeper.NewHandler(am.keeper)) +// } // QuerierRoute returns the cheqd module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } // LegacyQuerierHandler returns the cheqd module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return keeper.NewQuerier(am.keeper, legacyQuerierCdc) -} +// func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { +// return keeper.NewQuerier(am.keeper, legacyQuerierCdc) +// } // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. diff --git a/x/did/types/diddoc.pb.go b/x/did/types/diddoc.pb.go index 8d0a51773..39c07ebce 100644 --- a/x/did/types/diddoc.pb.go +++ b/x/did/types/diddoc.pb.go @@ -6,9 +6,9 @@ package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" @@ -863,7 +863,7 @@ func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x18 } if m.Updated != nil { - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Updated, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.Updated):]) + n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.Updated, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Updated):]) if err3 != nil { return 0, err3 } @@ -872,7 +872,7 @@ func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Created, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Created):]) + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Created, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Created):]) if err4 != nil { return 0, err4 } @@ -1038,10 +1038,10 @@ func (m *Metadata) Size() (n int) { } var l int _ = l - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Created) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Created) n += 1 + l + sovDiddoc(uint64(l)) if m.Updated != nil { - l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Updated) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Updated) n += 1 + l + sovDiddoc(uint64(l)) } if m.Deactivated { @@ -1978,7 +1978,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Created, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Created, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2014,7 +2014,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { if m.Updated == nil { m.Updated = new(time.Time) } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.Updated, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.Updated, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/did/types/fee.pb.go b/x/did/types/fee.pb.go index 6fef4db44..b38535f55 100644 --- a/x/did/types/fee.pb.go +++ b/x/did/types/fee.pb.go @@ -9,7 +9,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/did/types/genesis.pb.go b/x/did/types/genesis.pb.go index 9c711780b..582f69ea1 100644 --- a/x/did/types/genesis.pb.go +++ b/x/did/types/genesis.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/did/types/query.pb.go b/x/did/types/query.pb.go index 9564a18d4..d0c7e65c4 100644 --- a/x/did/types/query.pb.go +++ b/x/did/types/query.pb.go @@ -7,8 +7,8 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/did/types/tx.pb.go b/x/did/types/tx.pb.go index 7cdb2af1f..ef2767836 100644 --- a/x/did/types/tx.pb.go +++ b/x/did/types/tx.pb.go @@ -6,8 +6,8 @@ package types import ( context "context" fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/did/types/tx_msg_create_diddoc_payload.go b/x/did/types/tx_msg_create_diddoc_payload.go index 16ea65290..c0eb3291f 100644 --- a/x/did/types/tx_msg_create_diddoc_payload.go +++ b/x/did/types/tx_msg_create_diddoc_payload.go @@ -1,7 +1,7 @@ package types import ( - didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" + // didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" "github.com/cheqd/cheqd-node/x/did/utils" validation "github.com/go-ozzo/ozzo-validation/v4" ) @@ -80,18 +80,18 @@ func (msg *MsgCreateDidDocPayload) Normalize() { // Creator -func MsgCreateDidPayloadFromDid(did *didtypesv1.Did) didtypesv1.MsgCreateDidPayload { - return didtypesv1.MsgCreateDidPayload{ - Context: did.Context, - Id: did.Id, - Controller: did.Controller, - VerificationMethod: did.VerificationMethod, - Authentication: did.Authentication, - AssertionMethod: did.AssertionMethod, - CapabilityInvocation: did.CapabilityInvocation, - CapabilityDelegation: did.CapabilityDelegation, - KeyAgreement: did.KeyAgreement, - AlsoKnownAs: did.AlsoKnownAs, - Service: did.Service, - } -} +// func MsgCreateDidPayloadFromDid(did *didtypesv1.Did) didtypesv1.MsgCreateDidPayload { +// return didtypesv1.MsgCreateDidPayload{ +// Context: did.Context, +// Id: did.Id, +// Controller: did.Controller, +// VerificationMethod: did.VerificationMethod, +// Authentication: did.Authentication, +// AssertionMethod: did.AssertionMethod, +// CapabilityInvocation: did.CapabilityInvocation, +// CapabilityDelegation: did.CapabilityDelegation, +// KeyAgreement: did.KeyAgreement, +// AlsoKnownAs: did.AlsoKnownAs, +// Service: did.Service, +// } +// } diff --git a/x/did/types/v1/codec.go b/x/did/types/v1/codec.go deleted file mode 100644 index 05004b192..000000000 --- a/x/did/types/v1/codec.go +++ /dev/null @@ -1,37 +0,0 @@ -package v1 - -import ( - "github.com/cosmos/cosmos-sdk/codec" - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/msgservice" -) - -func RegisterCodec(cdc *codec.LegacyAmino) { - // Sdk messages - cdc.RegisterConcrete(&MsgCreateDid{}, "cheqd/CreateDid", nil) - cdc.RegisterConcrete(&MsgUpdateDid{}, "cheqd/UpdateDid", nil) - - // State value data - cdc.RegisterInterface((*StateValueData)(nil), nil) - cdc.RegisterConcrete(&Did{}, "cheqd/Did", nil) -} - -func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { - // Sdk messages - registry.RegisterImplementations((*sdk.Msg)(nil), - &MsgCreateDid{}, - &MsgUpdateDid{}, - ) - - // State value data - registry.RegisterInterface("StateValueData", (*StateValueData)(nil)) - registry.RegisterImplementations((*StateValueData)(nil), &Did{}) - - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) -} - -var ( - amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewAminoCodec(amino) -) diff --git a/x/did/types/v1/common.pb.go b/x/did/types/v1/common.pb.go deleted file mode 100644 index ef8b3bef4..000000000 --- a/x/did/types/v1/common.pb.go +++ /dev/null @@ -1,367 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cheqd/did/v1/common.proto - -package v1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type KeyValuePair struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *KeyValuePair) Reset() { *m = KeyValuePair{} } -func (m *KeyValuePair) String() string { return proto.CompactTextString(m) } -func (*KeyValuePair) ProtoMessage() {} -func (*KeyValuePair) Descriptor() ([]byte, []int) { - return fileDescriptor_488ad3ab822f2393, []int{0} -} -func (m *KeyValuePair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KeyValuePair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KeyValuePair.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 *KeyValuePair) XXX_Merge(src proto.Message) { - xxx_messageInfo_KeyValuePair.Merge(m, src) -} -func (m *KeyValuePair) XXX_Size() int { - return m.Size() -} -func (m *KeyValuePair) XXX_DiscardUnknown() { - xxx_messageInfo_KeyValuePair.DiscardUnknown(m) -} - -var xxx_messageInfo_KeyValuePair proto.InternalMessageInfo - -func (m *KeyValuePair) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *KeyValuePair) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -func init() { - proto.RegisterType((*KeyValuePair)(nil), "cheqdid.cheqdnode.cheqd.v1.KeyValuePair") -} - -func init() { proto.RegisterFile("cheqd/did/v1/common.proto", fileDescriptor_488ad3ab822f2393) } - -var fileDescriptor_488ad3ab822f2393 = []byte{ - // 178 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xce, 0x48, 0x2d, - 0x4c, 0xd1, 0x4f, 0xc9, 0x4c, 0xd1, 0x2f, 0x33, 0xd4, 0x4f, 0xce, 0xcf, 0xcd, 0xcd, 0xcf, 0xd3, - 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x02, 0x4b, 0x65, 0xa6, 0xe8, 0x81, 0xe9, 0xbc, 0xfc, - 0x94, 0x54, 0x08, 0x4b, 0xaf, 0xcc, 0x50, 0xc9, 0x8c, 0x8b, 0xc7, 0x3b, 0xb5, 0x32, 0x2c, 0x31, - 0xa7, 0x34, 0x35, 0x20, 0x31, 0xb3, 0x48, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x52, 0x82, 0x51, - 0x81, 0x51, 0x83, 0x33, 0x08, 0xc4, 0x14, 0x12, 0xe1, 0x62, 0x2d, 0x03, 0x49, 0x4b, 0x30, 0x81, - 0xc5, 0x20, 0x1c, 0x27, 0x97, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, - 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xd2, - 0x4a, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87, 0xb8, 0x09, 0x4c, 0xea, - 0x82, 0xec, 0xd5, 0xaf, 0x00, 0x3b, 0xb0, 0xa4, 0xb2, 0x20, 0xb5, 0x58, 0xbf, 0xcc, 0x30, 0x89, - 0x0d, 0xec, 0x40, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x10, 0x87, 0x5d, 0x7f, 0xbd, 0x00, - 0x00, 0x00, -} - -func (m *KeyValuePair) 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 *KeyValuePair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeyValuePair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintCommon(dAtA []byte, offset int, v uint64) int { - offset -= sovCommon(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *KeyValuePair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - return n -} - -func sovCommon(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCommon(x uint64) (n int) { - return sovCommon(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *KeyValuePair) 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 ErrIntOverflowCommon - } - 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: KeyValuePair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyValuePair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - 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 ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - 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 ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCommon(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommon - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommon - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommon - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCommon - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCommon - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCommon - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCommon = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCommon = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCommon = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/did/types/v1/did.pb.go b/x/did/types/v1/did.pb.go deleted file mode 100644 index acd30b185..000000000 --- a/x/did/types/v1/did.pb.go +++ /dev/null @@ -1,1559 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cheqd/did/v1/did.proto - -package v1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/codec/types" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type Did struct { - Context []string `protobuf:"bytes,1,rep,name=context,proto3" json:"context,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Controller []string `protobuf:"bytes,3,rep,name=controller,proto3" json:"controller,omitempty"` - VerificationMethod []*VerificationMethod `protobuf:"bytes,4,rep,name=verification_method,json=verificationMethod,proto3" json:"verification_method,omitempty"` - Authentication []string `protobuf:"bytes,5,rep,name=authentication,proto3" json:"authentication,omitempty"` - AssertionMethod []string `protobuf:"bytes,6,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` - CapabilityInvocation []string `protobuf:"bytes,7,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` - CapabilityDelegation []string `protobuf:"bytes,8,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` - KeyAgreement []string `protobuf:"bytes,9,rep,name=key_agreement,json=keyAgreement,proto3" json:"key_agreement,omitempty"` - Service []*Service `protobuf:"bytes,10,rep,name=service,proto3" json:"service,omitempty"` - AlsoKnownAs []string `protobuf:"bytes,11,rep,name=also_known_as,json=alsoKnownAs,proto3" json:"also_known_as,omitempty"` -} - -func (m *Did) Reset() { *m = Did{} } -func (m *Did) String() string { return proto.CompactTextString(m) } -func (*Did) ProtoMessage() {} -func (*Did) Descriptor() ([]byte, []int) { - return fileDescriptor_32f9ce71a4322a51, []int{0} -} -func (m *Did) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Did) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Did.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 *Did) XXX_Merge(src proto.Message) { - xxx_messageInfo_Did.Merge(m, src) -} -func (m *Did) XXX_Size() int { - return m.Size() -} -func (m *Did) XXX_DiscardUnknown() { - xxx_messageInfo_Did.DiscardUnknown(m) -} - -var xxx_messageInfo_Did proto.InternalMessageInfo - -func (m *Did) GetContext() []string { - if m != nil { - return m.Context - } - return nil -} - -func (m *Did) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Did) GetController() []string { - if m != nil { - return m.Controller - } - return nil -} - -func (m *Did) GetVerificationMethod() []*VerificationMethod { - if m != nil { - return m.VerificationMethod - } - return nil -} - -func (m *Did) GetAuthentication() []string { - if m != nil { - return m.Authentication - } - return nil -} - -func (m *Did) GetAssertionMethod() []string { - if m != nil { - return m.AssertionMethod - } - return nil -} - -func (m *Did) GetCapabilityInvocation() []string { - if m != nil { - return m.CapabilityInvocation - } - return nil -} - -func (m *Did) GetCapabilityDelegation() []string { - if m != nil { - return m.CapabilityDelegation - } - return nil -} - -func (m *Did) GetKeyAgreement() []string { - if m != nil { - return m.KeyAgreement - } - return nil -} - -func (m *Did) GetService() []*Service { - if m != nil { - return m.Service - } - return nil -} - -func (m *Did) GetAlsoKnownAs() []string { - if m != nil { - return m.AlsoKnownAs - } - return nil -} - -type VerificationMethod struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` - PublicKeyJwk []*KeyValuePair `protobuf:"bytes,4,rep,name=public_key_jwk,json=publicKeyJwk,proto3" json:"public_key_jwk,omitempty"` - PublicKeyMultibase string `protobuf:"bytes,5,opt,name=public_key_multibase,json=publicKeyMultibase,proto3" json:"public_key_multibase,omitempty"` -} - -func (m *VerificationMethod) Reset() { *m = VerificationMethod{} } -func (m *VerificationMethod) String() string { return proto.CompactTextString(m) } -func (*VerificationMethod) ProtoMessage() {} -func (*VerificationMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_32f9ce71a4322a51, []int{1} -} -func (m *VerificationMethod) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VerificationMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VerificationMethod.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 *VerificationMethod) XXX_Merge(src proto.Message) { - xxx_messageInfo_VerificationMethod.Merge(m, src) -} -func (m *VerificationMethod) XXX_Size() int { - return m.Size() -} -func (m *VerificationMethod) XXX_DiscardUnknown() { - xxx_messageInfo_VerificationMethod.DiscardUnknown(m) -} - -var xxx_messageInfo_VerificationMethod proto.InternalMessageInfo - -func (m *VerificationMethod) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *VerificationMethod) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *VerificationMethod) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *VerificationMethod) GetPublicKeyJwk() []*KeyValuePair { - if m != nil { - return m.PublicKeyJwk - } - return nil -} - -func (m *VerificationMethod) GetPublicKeyMultibase() string { - if m != nil { - return m.PublicKeyMultibase - } - return "" -} - -type Service struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - ServiceEndpoint string `protobuf:"bytes,3,opt,name=service_endpoint,json=serviceEndpoint,proto3" json:"service_endpoint,omitempty"` -} - -func (m *Service) Reset() { *m = Service{} } -func (m *Service) String() string { return proto.CompactTextString(m) } -func (*Service) ProtoMessage() {} -func (*Service) Descriptor() ([]byte, []int) { - return fileDescriptor_32f9ce71a4322a51, []int{2} -} -func (m *Service) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Service.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 *Service) XXX_Merge(src proto.Message) { - xxx_messageInfo_Service.Merge(m, src) -} -func (m *Service) XXX_Size() int { - return m.Size() -} -func (m *Service) XXX_DiscardUnknown() { - xxx_messageInfo_Service.DiscardUnknown(m) -} - -var xxx_messageInfo_Service proto.InternalMessageInfo - -func (m *Service) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Service) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *Service) GetServiceEndpoint() string { - if m != nil { - return m.ServiceEndpoint - } - return "" -} - -func init() { - proto.RegisterType((*Did)(nil), "cheqdid.cheqdnode.cheqd.v1.Did") - proto.RegisterType((*VerificationMethod)(nil), "cheqdid.cheqdnode.cheqd.v1.VerificationMethod") - proto.RegisterType((*Service)(nil), "cheqdid.cheqdnode.cheqd.v1.Service") -} - -func init() { proto.RegisterFile("cheqd/did/v1/did.proto", fileDescriptor_32f9ce71a4322a51) } - -var fileDescriptor_32f9ce71a4322a51 = []byte{ - // 525 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xcf, 0x6e, 0xd3, 0x30, - 0x18, 0x5f, 0xda, 0x6d, 0xa5, 0xee, 0xd6, 0x4d, 0x66, 0x20, 0xaf, 0x87, 0xa8, 0xea, 0x24, 0xd4, - 0x21, 0x91, 0x50, 0x76, 0xe6, 0x30, 0x54, 0x0e, 0x50, 0x0d, 0xa1, 0x22, 0x4d, 0x88, 0x4b, 0xe4, - 0xc4, 0xdf, 0x5a, 0xd3, 0xc4, 0x2e, 0x89, 0x93, 0x2e, 0x6f, 0xc1, 0x63, 0x71, 0xdc, 0x11, 0x71, - 0x42, 0xed, 0x33, 0x70, 0x47, 0x71, 0xdc, 0x52, 0x5a, 0x31, 0x71, 0x49, 0xec, 0xdf, 0x1f, 0xdb, - 0xbf, 0xef, 0xb3, 0xd1, 0xe3, 0x60, 0x0c, 0x5f, 0x98, 0xcb, 0x38, 0x73, 0xb3, 0x5e, 0xf1, 0x73, - 0xa6, 0xb1, 0x54, 0x12, 0xb7, 0x34, 0xce, 0x99, 0xa3, 0xff, 0x42, 0x32, 0x28, 0x47, 0x4e, 0xd6, - 0x6b, 0x9d, 0xfe, 0xe5, 0x09, 0x64, 0x14, 0x49, 0x51, 0xda, 0x5a, 0xa7, 0x23, 0x29, 0x47, 0x21, - 0xb8, 0x7a, 0xe6, 0xa7, 0x37, 0x2e, 0x15, 0x79, 0x49, 0x75, 0x7e, 0x55, 0x51, 0xb5, 0xcf, 0x19, - 0x26, 0xa8, 0x16, 0x48, 0xa1, 0xe0, 0x56, 0x11, 0xab, 0x5d, 0xed, 0xd6, 0x87, 0xcb, 0x29, 0x6e, - 0xa2, 0x0a, 0x67, 0xa4, 0xd2, 0xb6, 0xba, 0xf5, 0x61, 0x85, 0x33, 0x6c, 0x23, 0x54, 0x50, 0xb1, - 0x0c, 0x43, 0x88, 0x49, 0x55, 0x8b, 0xd7, 0x10, 0xec, 0xa1, 0x87, 0x19, 0xc4, 0xfc, 0x86, 0x07, - 0x54, 0x71, 0x29, 0xbc, 0x08, 0xd4, 0x58, 0x32, 0xb2, 0xdb, 0xae, 0x76, 0x1b, 0x2f, 0x1c, 0xe7, - 0xdf, 0x09, 0x9c, 0xeb, 0x35, 0xdb, 0x95, 0x76, 0x0d, 0x71, 0xb6, 0x85, 0xe1, 0x27, 0xa8, 0x49, - 0x53, 0x35, 0x06, 0xa1, 0x0c, 0x4e, 0xf6, 0xf4, 0x21, 0x36, 0x50, 0x7c, 0x8e, 0x8e, 0x69, 0x92, - 0x40, 0xbc, 0x7e, 0x8a, 0x7d, 0xad, 0x3c, 0x5a, 0xe1, 0x66, 0xc9, 0x0b, 0xf4, 0x28, 0xa0, 0x53, - 0xea, 0xf3, 0x90, 0xab, 0xdc, 0xe3, 0x22, 0x93, 0x66, 0xe5, 0x9a, 0xd6, 0x9f, 0xfc, 0x21, 0xdf, - 0xac, 0xb8, 0x0d, 0x13, 0x83, 0x10, 0x46, 0xa5, 0xe9, 0xc1, 0xa6, 0xa9, 0xbf, 0xe2, 0xf0, 0x19, - 0x3a, 0x9c, 0x40, 0xee, 0xd1, 0x51, 0x0c, 0x10, 0x81, 0x50, 0xa4, 0xae, 0xc5, 0x07, 0x13, 0xc8, - 0x2f, 0x97, 0x18, 0x7e, 0x89, 0x6a, 0x09, 0xc4, 0x19, 0x0f, 0x80, 0x20, 0x5d, 0xb6, 0xb3, 0xfb, - 0xca, 0xf6, 0xa1, 0x94, 0x0e, 0x97, 0x1e, 0xdc, 0x41, 0x87, 0x34, 0x4c, 0xa4, 0x37, 0x11, 0x72, - 0x26, 0x3c, 0x9a, 0x90, 0x86, 0xde, 0xa3, 0x51, 0x80, 0x83, 0x02, 0xbb, 0x4c, 0x3a, 0x3f, 0x2c, - 0x84, 0xb7, 0xeb, 0x6d, 0x9a, 0x6d, 0xad, 0x9a, 0x8d, 0xd1, 0xae, 0xca, 0xa7, 0x60, 0xda, 0xaf, - 0xc7, 0x5b, 0x17, 0xc0, 0xda, 0xb8, 0x00, 0xef, 0x50, 0x73, 0x9a, 0xfa, 0x21, 0x0f, 0xbc, 0x22, - 0xe9, 0xe7, 0xd9, 0xc4, 0xf4, 0xbe, 0x7b, 0x5f, 0x88, 0x01, 0xe4, 0xd7, 0x34, 0x4c, 0xe1, 0x3d, - 0xe5, 0xf1, 0xf0, 0xa0, 0xf4, 0x0f, 0x20, 0x7f, 0x3b, 0x9b, 0xe0, 0xe7, 0xe8, 0x64, 0x6d, 0xbd, - 0x28, 0x0d, 0x15, 0xf7, 0x69, 0x02, 0x64, 0x4f, 0xef, 0x8c, 0x57, 0xda, 0xab, 0x25, 0xd3, 0xf9, - 0x88, 0x6a, 0xa6, 0x28, 0xff, 0x15, 0xe8, 0x1c, 0x1d, 0x9b, 0xd2, 0x79, 0x20, 0xd8, 0x54, 0x72, - 0xa1, 0x4c, 0xac, 0x23, 0x83, 0xbf, 0x36, 0xf0, 0xab, 0xfe, 0xb7, 0xb9, 0x6d, 0xdd, 0xcd, 0x6d, - 0xeb, 0xe7, 0xdc, 0xb6, 0xbe, 0x2e, 0xec, 0x9d, 0xbb, 0x85, 0xbd, 0xf3, 0x7d, 0x61, 0xef, 0x7c, - 0x7a, 0x3a, 0xe2, 0x6a, 0x9c, 0xfa, 0x4e, 0x20, 0x23, 0xb7, 0x7c, 0x89, 0xfa, 0xfb, 0xac, 0x88, - 0xe9, 0xde, 0xea, 0x67, 0x59, 0x6c, 0x96, 0xb8, 0x59, 0xcf, 0xdf, 0xd7, 0x6f, 0xef, 0xe2, 0x77, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x77, 0xec, 0x76, 0xe7, 0x03, 0x00, 0x00, -} - -func (m *Did) 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 *Did) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Did) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AlsoKnownAs) > 0 { - for iNdEx := len(m.AlsoKnownAs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AlsoKnownAs[iNdEx]) - copy(dAtA[i:], m.AlsoKnownAs[iNdEx]) - i = encodeVarintDid(dAtA, i, uint64(len(m.AlsoKnownAs[iNdEx]))) - i-- - dAtA[i] = 0x5a - } - } - if len(m.Service) > 0 { - for iNdEx := len(m.Service) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Service[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDid(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - } - if len(m.KeyAgreement) > 0 { - for iNdEx := len(m.KeyAgreement) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.KeyAgreement[iNdEx]) - copy(dAtA[i:], m.KeyAgreement[iNdEx]) - i = encodeVarintDid(dAtA, i, uint64(len(m.KeyAgreement[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if len(m.CapabilityDelegation) > 0 { - for iNdEx := len(m.CapabilityDelegation) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.CapabilityDelegation[iNdEx]) - copy(dAtA[i:], m.CapabilityDelegation[iNdEx]) - i = encodeVarintDid(dAtA, i, uint64(len(m.CapabilityDelegation[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if len(m.CapabilityInvocation) > 0 { - for iNdEx := len(m.CapabilityInvocation) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.CapabilityInvocation[iNdEx]) - copy(dAtA[i:], m.CapabilityInvocation[iNdEx]) - i = encodeVarintDid(dAtA, i, uint64(len(m.CapabilityInvocation[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.AssertionMethod) > 0 { - for iNdEx := len(m.AssertionMethod) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AssertionMethod[iNdEx]) - copy(dAtA[i:], m.AssertionMethod[iNdEx]) - i = encodeVarintDid(dAtA, i, uint64(len(m.AssertionMethod[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Authentication) > 0 { - for iNdEx := len(m.Authentication) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Authentication[iNdEx]) - copy(dAtA[i:], m.Authentication[iNdEx]) - i = encodeVarintDid(dAtA, i, uint64(len(m.Authentication[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.VerificationMethod) > 0 { - for iNdEx := len(m.VerificationMethod) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.VerificationMethod[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDid(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Controller) > 0 { - for iNdEx := len(m.Controller) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Controller[iNdEx]) - copy(dAtA[i:], m.Controller[iNdEx]) - i = encodeVarintDid(dAtA, i, uint64(len(m.Controller[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintDid(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0x12 - } - if len(m.Context) > 0 { - for iNdEx := len(m.Context) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Context[iNdEx]) - copy(dAtA[i:], m.Context[iNdEx]) - i = encodeVarintDid(dAtA, i, uint64(len(m.Context[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *VerificationMethod) 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 *VerificationMethod) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PublicKeyMultibase) > 0 { - i -= len(m.PublicKeyMultibase) - copy(dAtA[i:], m.PublicKeyMultibase) - i = encodeVarintDid(dAtA, i, uint64(len(m.PublicKeyMultibase))) - i-- - dAtA[i] = 0x2a - } - if len(m.PublicKeyJwk) > 0 { - for iNdEx := len(m.PublicKeyJwk) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PublicKeyJwk[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDid(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintDid(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x1a - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintDid(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintDid(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Service) 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 *Service) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ServiceEndpoint) > 0 { - i -= len(m.ServiceEndpoint) - copy(dAtA[i:], m.ServiceEndpoint) - i = encodeVarintDid(dAtA, i, uint64(len(m.ServiceEndpoint))) - i-- - dAtA[i] = 0x1a - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintDid(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintDid(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintDid(dAtA []byte, offset int, v uint64) int { - offset -= sovDid(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Did) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Context) > 0 { - for _, s := range m.Context { - l = len(s) - n += 1 + l + sovDid(uint64(l)) - } - } - l = len(m.Id) - if l > 0 { - n += 1 + l + sovDid(uint64(l)) - } - if len(m.Controller) > 0 { - for _, s := range m.Controller { - l = len(s) - n += 1 + l + sovDid(uint64(l)) - } - } - if len(m.VerificationMethod) > 0 { - for _, e := range m.VerificationMethod { - l = e.Size() - n += 1 + l + sovDid(uint64(l)) - } - } - if len(m.Authentication) > 0 { - for _, s := range m.Authentication { - l = len(s) - n += 1 + l + sovDid(uint64(l)) - } - } - if len(m.AssertionMethod) > 0 { - for _, s := range m.AssertionMethod { - l = len(s) - n += 1 + l + sovDid(uint64(l)) - } - } - if len(m.CapabilityInvocation) > 0 { - for _, s := range m.CapabilityInvocation { - l = len(s) - n += 1 + l + sovDid(uint64(l)) - } - } - if len(m.CapabilityDelegation) > 0 { - for _, s := range m.CapabilityDelegation { - l = len(s) - n += 1 + l + sovDid(uint64(l)) - } - } - if len(m.KeyAgreement) > 0 { - for _, s := range m.KeyAgreement { - l = len(s) - n += 1 + l + sovDid(uint64(l)) - } - } - if len(m.Service) > 0 { - for _, e := range m.Service { - l = e.Size() - n += 1 + l + sovDid(uint64(l)) - } - } - if len(m.AlsoKnownAs) > 0 { - for _, s := range m.AlsoKnownAs { - l = len(s) - n += 1 + l + sovDid(uint64(l)) - } - } - return n -} - -func (m *VerificationMethod) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovDid(uint64(l)) - } - l = len(m.Type) - if l > 0 { - n += 1 + l + sovDid(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovDid(uint64(l)) - } - if len(m.PublicKeyJwk) > 0 { - for _, e := range m.PublicKeyJwk { - l = e.Size() - n += 1 + l + sovDid(uint64(l)) - } - } - l = len(m.PublicKeyMultibase) - if l > 0 { - n += 1 + l + sovDid(uint64(l)) - } - return n -} - -func (m *Service) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovDid(uint64(l)) - } - l = len(m.Type) - if l > 0 { - n += 1 + l + sovDid(uint64(l)) - } - l = len(m.ServiceEndpoint) - if l > 0 { - n += 1 + l + sovDid(uint64(l)) - } - return n -} - -func sovDid(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozDid(x uint64) (n int) { - return sovDid(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Did) 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 ErrIntOverflowDid - } - 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: Did: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Did: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Context = append(m.Context, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - 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 ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = append(m.Controller, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerificationMethod", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDid - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerificationMethod = append(m.VerificationMethod, &VerificationMethod{}) - if err := m.VerificationMethod[len(m.VerificationMethod)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authentication = append(m.Authentication, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssertionMethod", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AssertionMethod = append(m.AssertionMethod, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CapabilityInvocation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CapabilityInvocation = append(m.CapabilityInvocation, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CapabilityDelegation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CapabilityDelegation = append(m.CapabilityDelegation, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyAgreement", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeyAgreement = append(m.KeyAgreement, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDid - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Service = append(m.Service, &Service{}) - if err := m.Service[len(m.Service)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AlsoKnownAs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AlsoKnownAs = append(m.AlsoKnownAs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDid(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDid - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VerificationMethod) 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 ErrIntOverflowDid - } - 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: VerificationMethod: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VerificationMethod: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - 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 ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyJwk", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDid - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKeyJwk = append(m.PublicKeyJwk, &KeyValuePair{}) - if err := m.PublicKeyJwk[len(m.PublicKeyJwk)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyMultibase", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKeyMultibase = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDid(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDid - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Service) 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 ErrIntOverflowDid - } - 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: Service: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDid - } - 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 ErrInvalidLengthDid - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDid - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceEndpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDid(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDid - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDid(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDid - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDid - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDid - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthDid - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupDid - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthDid - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthDid = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDid = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupDid = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/did/types/v1/did_verification_method.go b/x/did/types/v1/did_verification_method.go deleted file mode 100644 index 58223ee2a..000000000 --- a/x/did/types/v1/did_verification_method.go +++ /dev/null @@ -1,6 +0,0 @@ -package v1 - -const ( - JSONWebKey2020 = "JsonWebKey2020" - Ed25519VerificationKey2020 = "Ed25519VerificationKey2020" -) diff --git a/x/did/types/v1/genesis.pb.go b/x/did/types/v1/genesis.pb.go deleted file mode 100644 index 1b1291bfa..000000000 --- a/x/did/types/v1/genesis.pb.go +++ /dev/null @@ -1,381 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cheqd/did/v1/genesis.proto - -package v1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the cheqd module's genesis state. -type GenesisState struct { - DidNamespace string `protobuf:"bytes,1,opt,name=did_namespace,json=didNamespace,proto3" json:"did_namespace,omitempty"` - DidList []*StateValue `protobuf:"bytes,2,rep,name=didList,proto3" json:"didList,omitempty"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_800930b9dedc9b25, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetDidNamespace() string { - if m != nil { - return m.DidNamespace - } - return "" -} - -func (m *GenesisState) GetDidList() []*StateValue { - if m != nil { - return m.DidList - } - return nil -} - -func init() { - proto.RegisterType((*GenesisState)(nil), "cheqdid.cheqdnode.cheqd.v1.GenesisState") -} - -func init() { proto.RegisterFile("cheqd/did/v1/genesis.proto", fileDescriptor_800930b9dedc9b25) } - -var fileDescriptor_800930b9dedc9b25 = []byte{ - // 220 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xce, 0x48, 0x2d, - 0x4c, 0xd1, 0x4f, 0xc9, 0x4c, 0xd1, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, - 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x82, 0xc8, 0x65, 0xa6, 0xe8, 0x81, 0xe9, 0xbc, 0xfc, - 0x94, 0x54, 0x08, 0x4b, 0xaf, 0xcc, 0x50, 0x4a, 0x16, 0x45, 0x5f, 0x71, 0x49, 0x62, 0x49, 0x6a, - 0x58, 0x62, 0x4e, 0x69, 0x2a, 0x44, 0xab, 0x52, 0x29, 0x17, 0x8f, 0x3b, 0xc4, 0xac, 0x60, 0x90, - 0x94, 0x90, 0x32, 0x17, 0x6f, 0x4a, 0x66, 0x4a, 0x7c, 0x5e, 0x62, 0x6e, 0x6a, 0x71, 0x41, 0x62, - 0x72, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x4f, 0x4a, 0x66, 0x8a, 0x1f, 0x4c, 0x4c, - 0xc8, 0x81, 0x8b, 0x3d, 0x25, 0x33, 0xc5, 0x27, 0xb3, 0xb8, 0x44, 0x82, 0x49, 0x81, 0x59, 0x83, - 0xdb, 0x48, 0x4d, 0x0f, 0xb7, 0x0b, 0xf4, 0x82, 0xe1, 0x76, 0x06, 0xc1, 0xb4, 0x39, 0xb9, 0x9c, - 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, - 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x56, 0x7a, 0x66, 0x49, 0x46, 0x69, - 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xc4, 0xe9, 0x60, 0x52, 0x17, 0x64, 0xa6, 0x7e, 0x05, 0xd8, - 0x1f, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0xfa, 0x65, 0x86, 0x49, 0x6c, 0x60, 0x3f, 0x18, 0x03, 0x02, - 0x00, 0x00, 0xff, 0xff, 0x5b, 0x86, 0xf5, 0x4d, 0x1c, 0x01, 0x00, 0x00, -} - -func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DidList) > 0 { - for iNdEx := len(m.DidList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DidList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.DidNamespace) > 0 { - i -= len(m.DidNamespace) - copy(dAtA[i:], m.DidNamespace) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.DidNamespace))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DidNamespace) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if len(m.DidList) > 0 { - for _, e := range m.DidList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) 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 ErrIntOverflowGenesis - } - 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: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DidNamespace", 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.DidNamespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DidList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DidList = append(m.DidList, &StateValue{}) - if err := m.DidList[len(m.DidList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/did/types/v1/keys.go b/x/did/types/v1/keys.go deleted file mode 100644 index 6205411ae..000000000 --- a/x/did/types/v1/keys.go +++ /dev/null @@ -1,27 +0,0 @@ -package v1 - -const ( - // ModuleName defines the module name - ModuleName = "cheqd" - - // StoreKey defines the primary module store key - StoreKey = ModuleName - - // RouterKey is the message route for slashing - RouterKey = ModuleName - - // QuerierRoute defines the module's query routing key - QuerierRoute = ModuleName - - DidMethod = ModuleName -) - -func KeyPrefix(p string) []byte { - return []byte(p) -} - -const ( - DidKey = "did:" - DidCountKey = "did-count:" - DidNamespaceKey = "did-namespace:" -) diff --git a/x/did/types/v1/query.pb.go b/x/did/types/v1/query.pb.go deleted file mode 100644 index dfc0e8517..000000000 --- a/x/did/types/v1/query.pb.go +++ /dev/null @@ -1,650 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cheqd/did/v1/query.proto - -package v1 - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type QueryGetDidRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *QueryGetDidRequest) Reset() { *m = QueryGetDidRequest{} } -func (m *QueryGetDidRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetDidRequest) ProtoMessage() {} -func (*QueryGetDidRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a3bd6aa714c99150, []int{0} -} -func (m *QueryGetDidRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetDidRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetDidRequest.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 *QueryGetDidRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetDidRequest.Merge(m, src) -} -func (m *QueryGetDidRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetDidRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetDidRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetDidRequest proto.InternalMessageInfo - -func (m *QueryGetDidRequest) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -type QueryGetDidResponse struct { - Did *Did `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` - Metadata *Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (m *QueryGetDidResponse) Reset() { *m = QueryGetDidResponse{} } -func (m *QueryGetDidResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetDidResponse) ProtoMessage() {} -func (*QueryGetDidResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a3bd6aa714c99150, []int{1} -} -func (m *QueryGetDidResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetDidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetDidResponse.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 *QueryGetDidResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetDidResponse.Merge(m, src) -} -func (m *QueryGetDidResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetDidResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetDidResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetDidResponse proto.InternalMessageInfo - -func (m *QueryGetDidResponse) GetDid() *Did { - if m != nil { - return m.Did - } - return nil -} - -func (m *QueryGetDidResponse) GetMetadata() *Metadata { - if m != nil { - return m.Metadata - } - return nil -} - -func init() { - proto.RegisterType((*QueryGetDidRequest)(nil), "cheqdid.cheqdnode.cheqd.v1.QueryGetDidRequest") - proto.RegisterType((*QueryGetDidResponse)(nil), "cheqdid.cheqdnode.cheqd.v1.QueryGetDidResponse") -} - -func init() { proto.RegisterFile("cheqd/did/v1/query.proto", fileDescriptor_a3bd6aa714c99150) } - -var fileDescriptor_a3bd6aa714c99150 = []byte{ - // 321 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x3f, 0x4b, 0x33, 0x31, - 0x18, 0xc0, 0x9b, 0x2b, 0xef, 0x8b, 0x46, 0x70, 0x88, 0x22, 0xe5, 0xd0, 0x28, 0xa5, 0x83, 0x08, - 0x26, 0x5c, 0xfd, 0x02, 0x22, 0x05, 0x27, 0x07, 0x3b, 0x38, 0xb8, 0xa5, 0x7d, 0x1e, 0xda, 0x40, - 0x7b, 0xb9, 0x36, 0xb9, 0x62, 0x11, 0x97, 0x8e, 0xe2, 0x20, 0xf8, 0xa5, 0x1c, 0x0b, 0x2e, 0x8e, - 0xd2, 0xf3, 0x83, 0xc8, 0xe5, 0x0e, 0xe1, 0x10, 0x8b, 0xcb, 0x5d, 0xc8, 0xf3, 0xfb, 0x3d, 0xff, - 0x42, 0x1b, 0xfd, 0x21, 0x4e, 0x40, 0x82, 0x06, 0x39, 0x8b, 0xe4, 0x24, 0xc5, 0xe9, 0x5c, 0x24, - 0x53, 0xe3, 0x0c, 0x0b, 0x7d, 0x44, 0x83, 0xf0, 0xff, 0xd8, 0x00, 0x16, 0x27, 0x31, 0x8b, 0xc2, - 0xbd, 0x8a, 0x95, 0x43, 0xde, 0x09, 0x0f, 0x2a, 0xf7, 0xd6, 0x29, 0x87, 0x37, 0x6a, 0x94, 0x62, - 0x19, 0xde, 0x1f, 0x18, 0x33, 0x18, 0xa1, 0x54, 0x89, 0x96, 0x2a, 0x8e, 0x8d, 0x53, 0x4e, 0x9b, - 0xd8, 0x16, 0xd1, 0x66, 0x8b, 0xb2, 0xeb, 0xbc, 0xfe, 0x25, 0xba, 0x8e, 0x86, 0x2e, 0x4e, 0x52, - 0xb4, 0x8e, 0x6d, 0xd3, 0x40, 0x43, 0x83, 0x1c, 0x91, 0xe3, 0xcd, 0x6e, 0xa0, 0xa1, 0xf9, 0x48, - 0xe8, 0x4e, 0x05, 0xb3, 0x89, 0x89, 0x2d, 0xb2, 0x88, 0xd6, 0xa1, 0x04, 0xb7, 0xda, 0x87, 0xe2, - 0xf7, 0xe6, 0x45, 0x6e, 0xe5, 0x2c, 0x3b, 0xa7, 0x1b, 0x63, 0x74, 0x0a, 0x94, 0x53, 0x8d, 0xc0, - 0x7b, 0xad, 0x75, 0xde, 0x55, 0xc9, 0x76, 0xbf, 0xad, 0xf6, 0x13, 0xa1, 0xff, 0x7c, 0x33, 0x6c, - 0x41, 0x68, 0xbd, 0xa3, 0x81, 0x89, 0x75, 0x19, 0x7e, 0x8e, 0x17, 0xca, 0x3f, 0xf3, 0xc5, 0x9c, - 0xcd, 0x70, 0xf1, 0xf6, 0xf9, 0x12, 0xec, 0x32, 0x26, 0x8b, 0x5d, 0x17, 0xfb, 0x97, 0xf7, 0x1a, - 0x1e, 0x2e, 0x3a, 0xaf, 0x2b, 0x4e, 0x96, 0x2b, 0x4e, 0x3e, 0x56, 0x9c, 0x3c, 0x67, 0xbc, 0xb6, - 0xcc, 0x78, 0xed, 0x3d, 0xe3, 0xb5, 0xdb, 0x93, 0x81, 0x76, 0xc3, 0xb4, 0x27, 0xfa, 0x66, 0x5c, - 0x7a, 0xfe, 0x7b, 0x9a, 0xd7, 0x93, 0x77, 0x3e, 0x83, 0x9b, 0x27, 0x68, 0xe5, 0x2c, 0xea, 0xfd, - 0xf7, 0xcf, 0x71, 0xf6, 0x15, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x7c, 0xd6, 0xcd, 0x1b, 0x02, 0x00, - 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - Did(ctx context.Context, in *QueryGetDidRequest, opts ...grpc.CallOption) (*QueryGetDidResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Did(ctx context.Context, in *QueryGetDidRequest, opts ...grpc.CallOption) (*QueryGetDidResponse, error) { - out := new(QueryGetDidResponse) - err := c.cc.Invoke(ctx, "/cheqdid.cheqdnode.cheqd.v1.Query/Did", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - Did(context.Context, *QueryGetDidRequest) (*QueryGetDidResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Did(ctx context.Context, req *QueryGetDidRequest) (*QueryGetDidResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Did not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Did_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetDidRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Did(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cheqdid.cheqdnode.cheqd.v1.Query/Did", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Did(ctx, req.(*QueryGetDidRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cheqdid.cheqdnode.cheqd.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Did", - Handler: _Query_Did_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cheqd/did/v1/query.proto", -} - -func (m *QueryGetDidRequest) 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 *QueryGetDidRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetDidRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetDidResponse) 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 *QueryGetDidResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetDidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Metadata != nil { - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Did != nil { - { - size, err := m.Did.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryGetDidRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetDidResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Did != nil { - l = m.Did.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryGetDidRequest) 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 ErrIntOverflowQuery - } - 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: QueryGetDidRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetDidRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetDidResponse) 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 ErrIntOverflowQuery - } - 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: QueryGetDidResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetDidResponse: 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 msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Did == nil { - m.Did = &Did{} - } - if err := m.Did.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - 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 ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &Metadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/did/types/v1/query.pb.gw.go b/x/did/types/v1/query.pb.gw.go deleted file mode 100644 index a7d8867dd..000000000 --- a/x/did/types/v1/query.pb.gw.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: cheqd/did/v1/query.proto - -/* -Package v1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package v1 - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -func request_Query_Did_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetDidRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.Did(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Did_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetDidRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.Did(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_Did_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Did_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Did_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_Did_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Did_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Did_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_Did_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"cheqd", "v1", "did", "id"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_Did_0 = runtime.ForwardResponseMessage -) diff --git a/x/did/types/v1/stateValue.go b/x/did/types/v1/stateValue.go deleted file mode 100644 index 0e853be6b..000000000 --- a/x/did/types/v1/stateValue.go +++ /dev/null @@ -1,67 +0,0 @@ -package v1 - -import ( - "errors" - "reflect" - "time" - - "github.com/cheqd/cheqd-node/x/did/utils" - "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/gogo/protobuf/proto" -) - -// StateValueData is interface uniting possible types to be used for stateValue.data field -type StateValueData interface { - proto.Message -} - -var _ types.UnpackInterfacesMessage = &StateValue{} - -func (m *StateValue) UnpackInterfaces(unpacker types.AnyUnpacker) error { - var data StateValueData - return unpacker.UnpackAny(m.Data, &data) -} - -func NewStateValue(data StateValueData, metadata *Metadata) (StateValue, error) { - any, err := types.NewAnyWithValue(data) - if err != nil { - return StateValue{}, err - } - - return StateValue{Data: any, Metadata: metadata}, nil -} - -func NewMetadataFromContext(ctx sdk.Context) Metadata { - created := ctx.BlockTime().Format(time.RFC3339) - txHash := utils.GetTxHash(ctx.TxBytes()) - - return Metadata{Created: created, Deactivated: false, VersionId: txHash} -} - -func (m *Metadata) Update(ctx sdk.Context) { - m.Updated = ctx.BlockTime().Format(time.RFC3339) -} - -func (m StateValue) UnpackData() (StateValueData, error) { - value, isOk := m.Data.GetCachedValue().(StateValueData) - if !isOk { - return nil, errors.New("failed to unpack state value data: " + reflect.TypeOf(m.Data.GetCachedValue()).String()) - } - - return value, nil -} - -func (m StateValue) UnpackDataAsDid() (*Did, error) { - data, err := m.UnpackData() - if err != nil { - return nil, err - } - - value, isValue := data.(*Did) - if !isValue { - return nil, errors.New("failed to unpack state value data as did: " + reflect.TypeOf(data).String()) - } - - return value, nil -} diff --git a/x/did/types/v1/stateValue.pb.go b/x/did/types/v1/stateValue.pb.go deleted file mode 100644 index 0aff1a0e7..000000000 --- a/x/did/types/v1/stateValue.pb.go +++ /dev/null @@ -1,763 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cheqd/did/v1/stateValue.proto - -package v1 - -import ( - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type StateValue struct { - Data *types.Any `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Metadata *Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (m *StateValue) Reset() { *m = StateValue{} } -func (m *StateValue) String() string { return proto.CompactTextString(m) } -func (*StateValue) ProtoMessage() {} -func (*StateValue) Descriptor() ([]byte, []int) { - return fileDescriptor_fadc6edf051fd79c, []int{0} -} -func (m *StateValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StateValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StateValue.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 *StateValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_StateValue.Merge(m, src) -} -func (m *StateValue) XXX_Size() int { - return m.Size() -} -func (m *StateValue) XXX_DiscardUnknown() { - xxx_messageInfo_StateValue.DiscardUnknown(m) -} - -var xxx_messageInfo_StateValue proto.InternalMessageInfo - -func (m *StateValue) GetData() *types.Any { - if m != nil { - return m.Data - } - return nil -} - -func (m *StateValue) GetMetadata() *Metadata { - if m != nil { - return m.Metadata - } - return nil -} - -// metadata -type Metadata struct { - Created string `protobuf:"bytes,1,opt,name=created,proto3" json:"created,omitempty"` - Updated string `protobuf:"bytes,2,opt,name=updated,proto3" json:"updated,omitempty"` - Deactivated bool `protobuf:"varint,3,opt,name=deactivated,proto3" json:"deactivated,omitempty"` - VersionId string `protobuf:"bytes,4,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - Resources []string `protobuf:"bytes,5,rep,name=resources,proto3" json:"resources,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_fadc6edf051fd79c, []int{1} -} -func (m *Metadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metadata.Merge(m, src) -} -func (m *Metadata) XXX_Size() int { - return m.Size() -} -func (m *Metadata) XXX_DiscardUnknown() { - xxx_messageInfo_Metadata.DiscardUnknown(m) -} - -var xxx_messageInfo_Metadata proto.InternalMessageInfo - -func (m *Metadata) GetCreated() string { - if m != nil { - return m.Created - } - return "" -} - -func (m *Metadata) GetUpdated() string { - if m != nil { - return m.Updated - } - return "" -} - -func (m *Metadata) GetDeactivated() bool { - if m != nil { - return m.Deactivated - } - return false -} - -func (m *Metadata) GetVersionId() string { - if m != nil { - return m.VersionId - } - return "" -} - -func (m *Metadata) GetResources() []string { - if m != nil { - return m.Resources - } - return nil -} - -func init() { - proto.RegisterType((*StateValue)(nil), "cheqdid.cheqdnode.cheqd.v1.StateValue") - proto.RegisterType((*Metadata)(nil), "cheqdid.cheqdnode.cheqd.v1.Metadata") -} - -func init() { proto.RegisterFile("cheqd/did/v1/stateValue.proto", fileDescriptor_fadc6edf051fd79c) } - -var fileDescriptor_fadc6edf051fd79c = []byte{ - // 312 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xbd, 0x4e, 0xfb, 0x30, - 0x14, 0xc5, 0xeb, 0xb6, 0xff, 0x3f, 0xad, 0xbb, 0x59, 0x0c, 0xa1, 0xa2, 0x56, 0x54, 0x31, 0x54, - 0x48, 0xd8, 0x2a, 0xbc, 0x00, 0x20, 0x16, 0x06, 0x96, 0x20, 0x31, 0xb0, 0x20, 0x37, 0xbe, 0xb4, - 0x96, 0xda, 0xb8, 0x24, 0x4e, 0xd4, 0xbe, 0x05, 0x2f, 0xc0, 0xfb, 0x30, 0x76, 0x64, 0x44, 0xc9, - 0x8b, 0xa0, 0xdc, 0x7c, 0x88, 0x85, 0xc5, 0xf6, 0x3d, 0xbf, 0x73, 0xfc, 0x75, 0xe9, 0x24, 0x5c, - 0xc1, 0x9b, 0x96, 0xda, 0x68, 0x99, 0xcd, 0x65, 0xe2, 0x94, 0x83, 0x27, 0xb5, 0x4e, 0x41, 0x6c, - 0x63, 0xeb, 0x2c, 0x1b, 0x23, 0x36, 0x5a, 0xe0, 0x1c, 0x59, 0x0d, 0xd5, 0x4a, 0x64, 0xf3, 0xf1, - 0xc9, 0xd2, 0xda, 0xe5, 0x1a, 0x24, 0x3a, 0x17, 0xe9, 0xab, 0x54, 0xd1, 0xbe, 0x8a, 0x4d, 0x77, - 0x94, 0x3e, 0xb6, 0x5b, 0xb1, 0x19, 0xed, 0x6b, 0xe5, 0x94, 0x47, 0x7c, 0x32, 0x1b, 0x5d, 0x1e, - 0x8b, 0x2a, 0x27, 0x9a, 0x9c, 0xb8, 0x89, 0xf6, 0x01, 0x3a, 0xd8, 0x35, 0x1d, 0x6c, 0xc0, 0x29, - 0x74, 0x77, 0xd1, 0x7d, 0x26, 0xfe, 0xbe, 0x81, 0x78, 0xa8, 0xbd, 0x41, 0x9b, 0x9a, 0x7e, 0x10, - 0x3a, 0x68, 0x64, 0xe6, 0xd1, 0xa3, 0x30, 0x06, 0xe5, 0x40, 0xe3, 0xd9, 0xc3, 0xa0, 0x29, 0x4b, - 0x92, 0x6e, 0x35, 0x92, 0x6e, 0x45, 0xea, 0x92, 0xf9, 0x74, 0xa4, 0x41, 0x85, 0xce, 0x64, 0x48, - 0x7b, 0x3e, 0x99, 0x0d, 0x82, 0xdf, 0x12, 0x9b, 0x50, 0x9a, 0x41, 0x9c, 0x18, 0x1b, 0xbd, 0x18, - 0xed, 0xf5, 0x31, 0x3e, 0xac, 0x95, 0x7b, 0xcd, 0x4e, 0xe9, 0x30, 0x86, 0xc4, 0xa6, 0x71, 0x08, - 0x89, 0xf7, 0xcf, 0xef, 0x95, 0xb4, 0x15, 0x6e, 0xef, 0x3e, 0x73, 0x4e, 0x0e, 0x39, 0x27, 0xdf, - 0x39, 0x27, 0xef, 0x05, 0xef, 0x1c, 0x0a, 0xde, 0xf9, 0x2a, 0x78, 0xe7, 0xf9, 0x7c, 0x69, 0xdc, - 0x2a, 0x5d, 0x88, 0xd0, 0x6e, 0x64, 0xd5, 0x14, 0x1c, 0x2f, 0xca, 0x27, 0xcb, 0x1d, 0x76, 0xc8, - 0xed, 0xb7, 0x90, 0xc8, 0x6c, 0xbe, 0xf8, 0x8f, 0x7f, 0x77, 0xf5, 0x13, 0x00, 0x00, 0xff, 0xff, - 0xaa, 0x8c, 0x63, 0x70, 0xbe, 0x01, 0x00, 0x00, -} - -func (m *StateValue) 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 *StateValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StateValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Metadata != nil { - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStateValue(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStateValue(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Metadata) 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 *Metadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Resources) > 0 { - for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Resources[iNdEx]) - copy(dAtA[i:], m.Resources[iNdEx]) - i = encodeVarintStateValue(dAtA, i, uint64(len(m.Resources[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.VersionId) > 0 { - i -= len(m.VersionId) - copy(dAtA[i:], m.VersionId) - i = encodeVarintStateValue(dAtA, i, uint64(len(m.VersionId))) - i-- - dAtA[i] = 0x22 - } - if m.Deactivated { - i-- - if m.Deactivated { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.Updated) > 0 { - i -= len(m.Updated) - copy(dAtA[i:], m.Updated) - i = encodeVarintStateValue(dAtA, i, uint64(len(m.Updated))) - i-- - dAtA[i] = 0x12 - } - if len(m.Created) > 0 { - i -= len(m.Created) - copy(dAtA[i:], m.Created) - i = encodeVarintStateValue(dAtA, i, uint64(len(m.Created))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintStateValue(dAtA []byte, offset int, v uint64) int { - offset -= sovStateValue(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *StateValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovStateValue(uint64(l)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovStateValue(uint64(l)) - } - return n -} - -func (m *Metadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Created) - if l > 0 { - n += 1 + l + sovStateValue(uint64(l)) - } - l = len(m.Updated) - if l > 0 { - n += 1 + l + sovStateValue(uint64(l)) - } - if m.Deactivated { - n += 2 - } - l = len(m.VersionId) - if l > 0 { - n += 1 + l + sovStateValue(uint64(l)) - } - if len(m.Resources) > 0 { - for _, s := range m.Resources { - l = len(s) - n += 1 + l + sovStateValue(uint64(l)) - } - } - return n -} - -func sovStateValue(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozStateValue(x uint64) (n int) { - return sovStateValue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *StateValue) 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 ErrIntOverflowStateValue - } - 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: StateValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StateValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStateValue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStateValue - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStateValue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &types.Any{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - 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 ErrIntOverflowStateValue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStateValue - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStateValue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &Metadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStateValue(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStateValue - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Metadata) 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 ErrIntOverflowStateValue - } - 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: Metadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStateValue - } - 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 ErrInvalidLengthStateValue - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStateValue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Created = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Updated", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStateValue - } - 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 ErrInvalidLengthStateValue - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStateValue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Updated = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Deactivated", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStateValue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Deactivated = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStateValue - } - 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 ErrInvalidLengthStateValue - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStateValue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VersionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStateValue - } - 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 ErrInvalidLengthStateValue - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStateValue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStateValue(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStateValue - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipStateValue(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStateValue - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStateValue - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStateValue - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthStateValue - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupStateValue - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthStateValue - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthStateValue = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowStateValue = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupStateValue = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/did/types/v1/tx.go b/x/did/types/v1/tx.go deleted file mode 100644 index 9261a04d8..000000000 --- a/x/did/types/v1/tx.go +++ /dev/null @@ -1,5 +0,0 @@ -package v1 - -type IdentityMsg interface { - GetSignBytes() []byte -} diff --git a/x/did/types/v1/tx.pb.go b/x/did/types/v1/tx.pb.go deleted file mode 100644 index 1140fc032..000000000 --- a/x/did/types/v1/tx.pb.go +++ /dev/null @@ -1,3551 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cheqd/did/v1/tx.proto - -package v1 - -import ( - context "context" - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/codec/types" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// this line is used by starport scaffolding # proto/tx/message -type MsgCreateDid struct { - Payload *MsgCreateDidPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` - Signatures []*SignInfo `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"` -} - -func (m *MsgCreateDid) Reset() { *m = MsgCreateDid{} } -func (m *MsgCreateDid) String() string { return proto.CompactTextString(m) } -func (*MsgCreateDid) ProtoMessage() {} -func (*MsgCreateDid) Descriptor() ([]byte, []int) { - return fileDescriptor_f9a3392bc9b36316, []int{0} -} -func (m *MsgCreateDid) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateDid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateDid.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 *MsgCreateDid) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateDid.Merge(m, src) -} -func (m *MsgCreateDid) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateDid) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateDid.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateDid proto.InternalMessageInfo - -func (m *MsgCreateDid) GetPayload() *MsgCreateDidPayload { - if m != nil { - return m.Payload - } - return nil -} - -func (m *MsgCreateDid) GetSignatures() []*SignInfo { - if m != nil { - return m.Signatures - } - return nil -} - -type MsgUpdateDid struct { - Payload *MsgUpdateDidPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` - Signatures []*SignInfo `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"` -} - -func (m *MsgUpdateDid) Reset() { *m = MsgUpdateDid{} } -func (m *MsgUpdateDid) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateDid) ProtoMessage() {} -func (*MsgUpdateDid) Descriptor() ([]byte, []int) { - return fileDescriptor_f9a3392bc9b36316, []int{1} -} -func (m *MsgUpdateDid) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateDid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateDid.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 *MsgUpdateDid) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateDid.Merge(m, src) -} -func (m *MsgUpdateDid) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateDid) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateDid.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateDid proto.InternalMessageInfo - -func (m *MsgUpdateDid) GetPayload() *MsgUpdateDidPayload { - if m != nil { - return m.Payload - } - return nil -} - -func (m *MsgUpdateDid) GetSignatures() []*SignInfo { - if m != nil { - return m.Signatures - } - return nil -} - -type MsgDeactivateDid struct { - Payload *MsgDeactivateDidPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` - Signatures []*SignInfo `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"` -} - -func (m *MsgDeactivateDid) Reset() { *m = MsgDeactivateDid{} } -func (m *MsgDeactivateDid) String() string { return proto.CompactTextString(m) } -func (*MsgDeactivateDid) ProtoMessage() {} -func (*MsgDeactivateDid) Descriptor() ([]byte, []int) { - return fileDescriptor_f9a3392bc9b36316, []int{2} -} -func (m *MsgDeactivateDid) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDeactivateDid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDeactivateDid.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 *MsgDeactivateDid) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeactivateDid.Merge(m, src) -} -func (m *MsgDeactivateDid) XXX_Size() int { - return m.Size() -} -func (m *MsgDeactivateDid) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeactivateDid.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDeactivateDid proto.InternalMessageInfo - -func (m *MsgDeactivateDid) GetPayload() *MsgDeactivateDidPayload { - if m != nil { - return m.Payload - } - return nil -} - -func (m *MsgDeactivateDid) GetSignatures() []*SignInfo { - if m != nil { - return m.Signatures - } - return nil -} - -type SignInfo struct { - VerificationMethodId string `protobuf:"bytes,1,opt,name=verification_method_id,json=verificationMethodId,proto3" json:"verification_method_id,omitempty"` - Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *SignInfo) Reset() { *m = SignInfo{} } -func (m *SignInfo) String() string { return proto.CompactTextString(m) } -func (*SignInfo) ProtoMessage() {} -func (*SignInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_f9a3392bc9b36316, []int{3} -} -func (m *SignInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignInfo.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 *SignInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignInfo.Merge(m, src) -} -func (m *SignInfo) XXX_Size() int { - return m.Size() -} -func (m *SignInfo) XXX_DiscardUnknown() { - xxx_messageInfo_SignInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_SignInfo proto.InternalMessageInfo - -func (m *SignInfo) GetVerificationMethodId() string { - if m != nil { - return m.VerificationMethodId - } - return "" -} - -func (m *SignInfo) GetSignature() string { - if m != nil { - return m.Signature - } - return "" -} - -type MsgDeactivateDidPayload struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *MsgDeactivateDidPayload) Reset() { *m = MsgDeactivateDidPayload{} } -func (m *MsgDeactivateDidPayload) String() string { return proto.CompactTextString(m) } -func (*MsgDeactivateDidPayload) ProtoMessage() {} -func (*MsgDeactivateDidPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_f9a3392bc9b36316, []int{4} -} -func (m *MsgDeactivateDidPayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDeactivateDidPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDeactivateDidPayload.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 *MsgDeactivateDidPayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeactivateDidPayload.Merge(m, src) -} -func (m *MsgDeactivateDidPayload) XXX_Size() int { - return m.Size() -} -func (m *MsgDeactivateDidPayload) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeactivateDidPayload.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDeactivateDidPayload proto.InternalMessageInfo - -func (m *MsgDeactivateDidPayload) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -type MsgDeactivateDidResponse struct { - Did *Did `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` - Metadata *Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (m *MsgDeactivateDidResponse) Reset() { *m = MsgDeactivateDidResponse{} } -func (m *MsgDeactivateDidResponse) String() string { return proto.CompactTextString(m) } -func (*MsgDeactivateDidResponse) ProtoMessage() {} -func (*MsgDeactivateDidResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9a3392bc9b36316, []int{5} -} -func (m *MsgDeactivateDidResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDeactivateDidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDeactivateDidResponse.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 *MsgDeactivateDidResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeactivateDidResponse.Merge(m, src) -} -func (m *MsgDeactivateDidResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgDeactivateDidResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeactivateDidResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDeactivateDidResponse proto.InternalMessageInfo - -func (m *MsgDeactivateDidResponse) GetDid() *Did { - if m != nil { - return m.Did - } - return nil -} - -func (m *MsgDeactivateDidResponse) GetMetadata() *Metadata { - if m != nil { - return m.Metadata - } - return nil -} - -type MsgCreateDidPayload struct { - Context []string `protobuf:"bytes,1,rep,name=context,proto3" json:"context,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Controller []string `protobuf:"bytes,3,rep,name=controller,proto3" json:"controller,omitempty"` - VerificationMethod []*VerificationMethod `protobuf:"bytes,4,rep,name=verification_method,json=verificationMethod,proto3" json:"verification_method,omitempty"` - Authentication []string `protobuf:"bytes,5,rep,name=authentication,proto3" json:"authentication,omitempty"` - AssertionMethod []string `protobuf:"bytes,6,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` - CapabilityInvocation []string `protobuf:"bytes,7,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` - CapabilityDelegation []string `protobuf:"bytes,8,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` - KeyAgreement []string `protobuf:"bytes,9,rep,name=key_agreement,json=keyAgreement,proto3" json:"key_agreement,omitempty"` - AlsoKnownAs []string `protobuf:"bytes,10,rep,name=also_known_as,json=alsoKnownAs,proto3" json:"also_known_as,omitempty"` - Service []*Service `protobuf:"bytes,11,rep,name=service,proto3" json:"service,omitempty"` -} - -func (m *MsgCreateDidPayload) Reset() { *m = MsgCreateDidPayload{} } -func (m *MsgCreateDidPayload) String() string { return proto.CompactTextString(m) } -func (*MsgCreateDidPayload) ProtoMessage() {} -func (*MsgCreateDidPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_f9a3392bc9b36316, []int{6} -} -func (m *MsgCreateDidPayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateDidPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateDidPayload.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 *MsgCreateDidPayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateDidPayload.Merge(m, src) -} -func (m *MsgCreateDidPayload) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateDidPayload) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateDidPayload.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateDidPayload proto.InternalMessageInfo - -func (m *MsgCreateDidPayload) GetContext() []string { - if m != nil { - return m.Context - } - return nil -} - -func (m *MsgCreateDidPayload) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *MsgCreateDidPayload) GetController() []string { - if m != nil { - return m.Controller - } - return nil -} - -func (m *MsgCreateDidPayload) GetVerificationMethod() []*VerificationMethod { - if m != nil { - return m.VerificationMethod - } - return nil -} - -func (m *MsgCreateDidPayload) GetAuthentication() []string { - if m != nil { - return m.Authentication - } - return nil -} - -func (m *MsgCreateDidPayload) GetAssertionMethod() []string { - if m != nil { - return m.AssertionMethod - } - return nil -} - -func (m *MsgCreateDidPayload) GetCapabilityInvocation() []string { - if m != nil { - return m.CapabilityInvocation - } - return nil -} - -func (m *MsgCreateDidPayload) GetCapabilityDelegation() []string { - if m != nil { - return m.CapabilityDelegation - } - return nil -} - -func (m *MsgCreateDidPayload) GetKeyAgreement() []string { - if m != nil { - return m.KeyAgreement - } - return nil -} - -func (m *MsgCreateDidPayload) GetAlsoKnownAs() []string { - if m != nil { - return m.AlsoKnownAs - } - return nil -} - -func (m *MsgCreateDidPayload) GetService() []*Service { - if m != nil { - return m.Service - } - return nil -} - -type MsgCreateDidResponse struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *MsgCreateDidResponse) Reset() { *m = MsgCreateDidResponse{} } -func (m *MsgCreateDidResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCreateDidResponse) ProtoMessage() {} -func (*MsgCreateDidResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9a3392bc9b36316, []int{7} -} -func (m *MsgCreateDidResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateDidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateDidResponse.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 *MsgCreateDidResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateDidResponse.Merge(m, src) -} -func (m *MsgCreateDidResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateDidResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateDidResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateDidResponse proto.InternalMessageInfo - -func (m *MsgCreateDidResponse) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -type MsgUpdateDidPayload struct { - Context []string `protobuf:"bytes,1,rep,name=context,proto3" json:"context,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Controller []string `protobuf:"bytes,3,rep,name=controller,proto3" json:"controller,omitempty"` - VerificationMethod []*VerificationMethod `protobuf:"bytes,4,rep,name=verification_method,json=verificationMethod,proto3" json:"verification_method,omitempty"` - Authentication []string `protobuf:"bytes,5,rep,name=authentication,proto3" json:"authentication,omitempty"` - AssertionMethod []string `protobuf:"bytes,6,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` - CapabilityInvocation []string `protobuf:"bytes,7,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` - CapabilityDelegation []string `protobuf:"bytes,8,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` - KeyAgreement []string `protobuf:"bytes,9,rep,name=key_agreement,json=keyAgreement,proto3" json:"key_agreement,omitempty"` - AlsoKnownAs []string `protobuf:"bytes,10,rep,name=also_known_as,json=alsoKnownAs,proto3" json:"also_known_as,omitempty"` - Service []*Service `protobuf:"bytes,11,rep,name=service,proto3" json:"service,omitempty"` - VersionId string `protobuf:"bytes,12,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` -} - -func (m *MsgUpdateDidPayload) Reset() { *m = MsgUpdateDidPayload{} } -func (m *MsgUpdateDidPayload) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateDidPayload) ProtoMessage() {} -func (*MsgUpdateDidPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_f9a3392bc9b36316, []int{8} -} -func (m *MsgUpdateDidPayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateDidPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateDidPayload.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 *MsgUpdateDidPayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateDidPayload.Merge(m, src) -} -func (m *MsgUpdateDidPayload) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateDidPayload) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateDidPayload.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateDidPayload proto.InternalMessageInfo - -func (m *MsgUpdateDidPayload) GetContext() []string { - if m != nil { - return m.Context - } - return nil -} - -func (m *MsgUpdateDidPayload) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *MsgUpdateDidPayload) GetController() []string { - if m != nil { - return m.Controller - } - return nil -} - -func (m *MsgUpdateDidPayload) GetVerificationMethod() []*VerificationMethod { - if m != nil { - return m.VerificationMethod - } - return nil -} - -func (m *MsgUpdateDidPayload) GetAuthentication() []string { - if m != nil { - return m.Authentication - } - return nil -} - -func (m *MsgUpdateDidPayload) GetAssertionMethod() []string { - if m != nil { - return m.AssertionMethod - } - return nil -} - -func (m *MsgUpdateDidPayload) GetCapabilityInvocation() []string { - if m != nil { - return m.CapabilityInvocation - } - return nil -} - -func (m *MsgUpdateDidPayload) GetCapabilityDelegation() []string { - if m != nil { - return m.CapabilityDelegation - } - return nil -} - -func (m *MsgUpdateDidPayload) GetKeyAgreement() []string { - if m != nil { - return m.KeyAgreement - } - return nil -} - -func (m *MsgUpdateDidPayload) GetAlsoKnownAs() []string { - if m != nil { - return m.AlsoKnownAs - } - return nil -} - -func (m *MsgUpdateDidPayload) GetService() []*Service { - if m != nil { - return m.Service - } - return nil -} - -func (m *MsgUpdateDidPayload) GetVersionId() string { - if m != nil { - return m.VersionId - } - return "" -} - -type MsgUpdateDidResponse struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *MsgUpdateDidResponse) Reset() { *m = MsgUpdateDidResponse{} } -func (m *MsgUpdateDidResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateDidResponse) ProtoMessage() {} -func (*MsgUpdateDidResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9a3392bc9b36316, []int{9} -} -func (m *MsgUpdateDidResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateDidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateDidResponse.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 *MsgUpdateDidResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateDidResponse.Merge(m, src) -} -func (m *MsgUpdateDidResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateDidResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateDidResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateDidResponse proto.InternalMessageInfo - -func (m *MsgUpdateDidResponse) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func init() { - proto.RegisterType((*MsgCreateDid)(nil), "cheqdid.cheqdnode.cheqd.v1.MsgCreateDid") - proto.RegisterType((*MsgUpdateDid)(nil), "cheqdid.cheqdnode.cheqd.v1.MsgUpdateDid") - proto.RegisterType((*MsgDeactivateDid)(nil), "cheqdid.cheqdnode.cheqd.v1.MsgDeactivateDid") - proto.RegisterType((*SignInfo)(nil), "cheqdid.cheqdnode.cheqd.v1.SignInfo") - proto.RegisterType((*MsgDeactivateDidPayload)(nil), "cheqdid.cheqdnode.cheqd.v1.MsgDeactivateDidPayload") - proto.RegisterType((*MsgDeactivateDidResponse)(nil), "cheqdid.cheqdnode.cheqd.v1.MsgDeactivateDidResponse") - proto.RegisterType((*MsgCreateDidPayload)(nil), "cheqdid.cheqdnode.cheqd.v1.MsgCreateDidPayload") - proto.RegisterType((*MsgCreateDidResponse)(nil), "cheqdid.cheqdnode.cheqd.v1.MsgCreateDidResponse") - proto.RegisterType((*MsgUpdateDidPayload)(nil), "cheqdid.cheqdnode.cheqd.v1.MsgUpdateDidPayload") - proto.RegisterType((*MsgUpdateDidResponse)(nil), "cheqdid.cheqdnode.cheqd.v1.MsgUpdateDidResponse") -} - -func init() { proto.RegisterFile("cheqd/did/v1/tx.proto", fileDescriptor_f9a3392bc9b36316) } - -var fileDescriptor_f9a3392bc9b36316 = []byte{ - // 721 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcb, 0x4e, 0x1b, 0x49, - 0x14, 0xa5, 0x6d, 0x06, 0xe3, 0x6b, 0x60, 0x50, 0xf1, 0x98, 0x1e, 0x6b, 0xf0, 0x20, 0x33, 0x42, - 0x66, 0x34, 0xe3, 0x1e, 0x03, 0xdb, 0x91, 0x86, 0x89, 0x37, 0x56, 0x64, 0x29, 0xea, 0x28, 0x2c, - 0xb2, 0x88, 0x55, 0x76, 0x5d, 0xda, 0x25, 0xda, 0x5d, 0x4e, 0x57, 0xb9, 0x83, 0x3f, 0x20, 0xeb, - 0xe4, 0x0f, 0xb2, 0x89, 0x94, 0x5f, 0xc9, 0x22, 0x0b, 0x96, 0x59, 0x46, 0xf0, 0x23, 0x51, 0x57, - 0x3f, 0xfc, 0x00, 0x0c, 0x44, 0x62, 0x95, 0x6c, 0x6c, 0xf7, 0xb9, 0xe7, 0xdc, 0x3e, 0x55, 0x7d, - 0xdc, 0xb7, 0x60, 0xa3, 0xd3, 0xc5, 0x97, 0xcc, 0x62, 0x9c, 0x59, 0x41, 0xcd, 0x52, 0x67, 0xd5, - 0xbe, 0x2f, 0x94, 0x20, 0x45, 0x0d, 0x73, 0x56, 0xd5, 0xdf, 0x9e, 0x60, 0x18, 0xfd, 0xaa, 0x06, - 0xb5, 0xe2, 0xe6, 0x84, 0x24, 0x24, 0x69, 0x4d, 0x71, 0x6b, 0x02, 0x97, 0x8a, 0x2a, 0x3c, 0xa6, - 0xee, 0x00, 0xe3, 0xf2, 0xaf, 0x8e, 0x10, 0x8e, 0x8b, 0x96, 0xbe, 0x6a, 0x0f, 0x4e, 0x2c, 0xea, - 0x0d, 0xa3, 0x52, 0xf9, 0x9d, 0x01, 0x4b, 0x4d, 0xe9, 0x3c, 0xf2, 0x91, 0x2a, 0xac, 0x73, 0x46, - 0x1a, 0x90, 0xeb, 0xd3, 0xa1, 0x2b, 0x28, 0x33, 0x8d, 0x6d, 0xa3, 0x52, 0xd8, 0xb7, 0xaa, 0x37, - 0x1b, 0xaa, 0x8e, 0x4b, 0x9f, 0x44, 0x32, 0x3b, 0xd1, 0x93, 0x3a, 0x80, 0xe4, 0x8e, 0x47, 0xd5, - 0xc0, 0x47, 0x69, 0x66, 0xb6, 0xb3, 0x95, 0xc2, 0xfe, 0x1f, 0xb3, 0xba, 0x3d, 0xe5, 0x8e, 0xd7, - 0xf0, 0x4e, 0x84, 0x3d, 0xa6, 0x4b, 0x1c, 0x3e, 0xeb, 0xb3, 0x6f, 0x75, 0x98, 0x4a, 0x1f, 0xc8, - 0xe1, 0x07, 0x03, 0x56, 0x9b, 0xd2, 0xa9, 0x23, 0xed, 0x28, 0x1e, 0xc4, 0x2e, 0x9b, 0xd3, 0x2e, - 0x0f, 0x6e, 0x71, 0x39, 0x21, 0x7f, 0x20, 0xa7, 0x2f, 0x60, 0x31, 0xc1, 0xc9, 0x21, 0x6c, 0x06, - 0xe8, 0xf3, 0x13, 0xde, 0xa1, 0x8a, 0x0b, 0xaf, 0xd5, 0x43, 0xd5, 0x15, 0xac, 0xc5, 0x23, 0xbf, - 0x79, 0x7b, 0x7d, 0xbc, 0xda, 0xd4, 0xc5, 0x06, 0x23, 0xbf, 0x41, 0x3e, 0xed, 0x67, 0x66, 0x34, - 0x71, 0x04, 0x94, 0xf7, 0xe0, 0x97, 0x1b, 0x56, 0x42, 0x56, 0x20, 0x93, 0xb6, 0xce, 0x70, 0x56, - 0x7e, 0x63, 0x80, 0x39, 0xcd, 0xb5, 0x51, 0xf6, 0x85, 0x27, 0x91, 0xd4, 0x20, 0xcb, 0x78, 0xb2, - 0x71, 0xbf, 0xcf, 0x5a, 0x66, 0xa8, 0x0a, 0xb9, 0xe4, 0x3f, 0x58, 0xec, 0xa1, 0xa2, 0x8c, 0x2a, - 0xaa, 0x7d, 0xdd, 0xb2, 0x3d, 0xcd, 0x98, 0x6b, 0xa7, 0xaa, 0xf2, 0xeb, 0x79, 0x58, 0xbb, 0x26, - 0xcf, 0xc4, 0x84, 0x5c, 0x47, 0x78, 0x0a, 0xcf, 0x94, 0x69, 0x6c, 0x67, 0x2b, 0x79, 0x3b, 0xb9, - 0x8c, 0xd7, 0x94, 0x49, 0xd6, 0x44, 0x4a, 0x00, 0x61, 0xc9, 0x17, 0xae, 0x8b, 0xbe, 0x99, 0xd5, - 0xe4, 0x31, 0x84, 0xb4, 0x60, 0xed, 0x9a, 0x2d, 0x37, 0xe7, 0xf5, 0xd3, 0xac, 0xce, 0xb2, 0x7b, - 0x7c, 0xe5, 0x59, 0xd8, 0xe4, 0xea, 0xf3, 0x21, 0xbb, 0xb0, 0x42, 0x07, 0xaa, 0x8b, 0x9e, 0x8a, - 0x71, 0xf3, 0x27, 0x6d, 0x62, 0x0a, 0x25, 0x7b, 0xb0, 0x4a, 0xa5, 0x44, 0x7f, 0xdc, 0xc5, 0x82, - 0x66, 0xfe, 0x9c, 0xe2, 0x71, 0xcb, 0x03, 0xd8, 0xe8, 0xd0, 0x3e, 0x6d, 0x73, 0x97, 0xab, 0x61, - 0x8b, 0x7b, 0x81, 0x88, 0x3b, 0xe7, 0x34, 0x7f, 0x7d, 0x54, 0x6c, 0xa4, 0xb5, 0x29, 0x11, 0x43, - 0x17, 0x9d, 0x48, 0xb4, 0x38, 0x2d, 0xaa, 0xa7, 0x35, 0xb2, 0x03, 0xcb, 0xa7, 0x38, 0x6c, 0x51, - 0xc7, 0x47, 0xec, 0xa1, 0xa7, 0xcc, 0xbc, 0x26, 0x2f, 0x9d, 0xe2, 0xf0, 0x28, 0xc1, 0x48, 0x19, - 0x96, 0xa9, 0x2b, 0x45, 0xeb, 0xd4, 0x13, 0xaf, 0xbc, 0x16, 0x95, 0x26, 0x68, 0x52, 0x21, 0x04, - 0x1f, 0x87, 0xd8, 0x91, 0x24, 0xff, 0x42, 0x4e, 0xa2, 0x1f, 0xf0, 0x0e, 0x9a, 0x05, 0xbd, 0xb5, - 0x3b, 0x33, 0xff, 0x28, 0x11, 0xd5, 0x4e, 0x34, 0xe5, 0x5d, 0x58, 0x1f, 0x8f, 0x41, 0x1a, 0xca, - 0xe9, 0x04, 0xbf, 0x8f, 0xf2, 0x32, 0xfd, 0x76, 0xf9, 0x91, 0x97, 0xef, 0x2b, 0x2f, 0x64, 0x0b, - 0x20, 0x40, 0x5f, 0x86, 0x5b, 0xc3, 0x99, 0xb9, 0x14, 0xbd, 0x13, 0x63, 0xa4, 0xc1, 0xe2, 0x38, - 0xa5, 0x29, 0xb9, 0x29, 0x4e, 0xfb, 0x9f, 0x32, 0x90, 0x6d, 0x4a, 0x87, 0x38, 0x90, 0x1f, 0x4d, - 0xe3, 0xca, 0x5d, 0x87, 0x6f, 0xf1, 0x9f, 0xbb, 0x32, 0x53, 0x03, 0x0e, 0xe4, 0x47, 0x43, 0xb5, - 0x72, 0xd7, 0x19, 0x7a, 0xeb, 0x8d, 0xae, 0xae, 0x54, 0xc2, 0xf2, 0xe4, 0x6c, 0xfc, 0xeb, 0x3e, - 0xa3, 0xb0, 0x78, 0x78, 0x1f, 0x76, 0x72, 0xd3, 0xff, 0xeb, 0x1f, 0x2f, 0x4a, 0xc6, 0xf9, 0x45, - 0xc9, 0xf8, 0x72, 0x51, 0x32, 0xde, 0x5e, 0x96, 0xe6, 0xce, 0x2f, 0x4b, 0x73, 0x9f, 0x2f, 0x4b, - 0x73, 0xcf, 0xff, 0x74, 0xb8, 0xea, 0x0e, 0xda, 0xd5, 0x8e, 0xe8, 0x59, 0xd1, 0xb9, 0x49, 0x7f, - 0xfe, 0x1d, 0x36, 0xb6, 0xce, 0xf4, 0x21, 0x4a, 0x0d, 0xfb, 0x28, 0xad, 0xa0, 0xd6, 0x5e, 0xd0, - 0xa7, 0xa4, 0x83, 0xaf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0b, 0xaf, 0xbb, 0x35, 0xac, 0x09, 0x00, - 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - CreateDid(ctx context.Context, in *MsgCreateDid, opts ...grpc.CallOption) (*MsgCreateDidResponse, error) - UpdateDid(ctx context.Context, in *MsgUpdateDid, opts ...grpc.CallOption) (*MsgUpdateDidResponse, error) - DeactivateDid(ctx context.Context, in *MsgDeactivateDid, opts ...grpc.CallOption) (*MsgDeactivateDidResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) CreateDid(ctx context.Context, in *MsgCreateDid, opts ...grpc.CallOption) (*MsgCreateDidResponse, error) { - out := new(MsgCreateDidResponse) - err := c.cc.Invoke(ctx, "/cheqdid.cheqdnode.cheqd.v1.Msg/CreateDid", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateDid(ctx context.Context, in *MsgUpdateDid, opts ...grpc.CallOption) (*MsgUpdateDidResponse, error) { - out := new(MsgUpdateDidResponse) - err := c.cc.Invoke(ctx, "/cheqdid.cheqdnode.cheqd.v1.Msg/UpdateDid", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) DeactivateDid(ctx context.Context, in *MsgDeactivateDid, opts ...grpc.CallOption) (*MsgDeactivateDidResponse, error) { - out := new(MsgDeactivateDidResponse) - err := c.cc.Invoke(ctx, "/cheqdid.cheqdnode.cheqd.v1.Msg/DeactivateDid", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - CreateDid(context.Context, *MsgCreateDid) (*MsgCreateDidResponse, error) - UpdateDid(context.Context, *MsgUpdateDid) (*MsgUpdateDidResponse, error) - DeactivateDid(context.Context, *MsgDeactivateDid) (*MsgDeactivateDidResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) CreateDid(ctx context.Context, req *MsgCreateDid) (*MsgCreateDidResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateDid not implemented") -} -func (*UnimplementedMsgServer) UpdateDid(ctx context.Context, req *MsgUpdateDid) (*MsgUpdateDidResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateDid not implemented") -} -func (*UnimplementedMsgServer) DeactivateDid(ctx context.Context, req *MsgDeactivateDid) (*MsgDeactivateDidResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeactivateDid not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_CreateDid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateDid) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateDid(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cheqdid.cheqdnode.cheqd.v1.Msg/CreateDid", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateDid(ctx, req.(*MsgCreateDid)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateDid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateDid) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateDid(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cheqdid.cheqdnode.cheqd.v1.Msg/UpdateDid", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateDid(ctx, req.(*MsgUpdateDid)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_DeactivateDid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeactivateDid) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).DeactivateDid(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cheqdid.cheqdnode.cheqd.v1.Msg/DeactivateDid", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DeactivateDid(ctx, req.(*MsgDeactivateDid)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cheqdid.cheqdnode.cheqd.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateDid", - Handler: _Msg_CreateDid_Handler, - }, - { - MethodName: "UpdateDid", - Handler: _Msg_UpdateDid_Handler, - }, - { - MethodName: "DeactivateDid", - Handler: _Msg_DeactivateDid_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cheqd/did/v1/tx.proto", -} - -func (m *MsgCreateDid) 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 *MsgCreateDid) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateDid) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Payload != nil { - { - size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateDid) 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 *MsgUpdateDid) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateDid) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Payload != nil { - { - size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgDeactivateDid) 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 *MsgDeactivateDid) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgDeactivateDid) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Payload != nil { - { - size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignInfo) 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 *SignInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintTx(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.VerificationMethodId) > 0 { - i -= len(m.VerificationMethodId) - copy(dAtA[i:], m.VerificationMethodId) - i = encodeVarintTx(dAtA, i, uint64(len(m.VerificationMethodId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgDeactivateDidPayload) 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 *MsgDeactivateDidPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgDeactivateDidPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTx(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgDeactivateDidResponse) 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 *MsgDeactivateDidResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgDeactivateDidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Metadata != nil { - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Did != nil { - { - size, err := m.Did.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateDidPayload) 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 *MsgCreateDidPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateDidPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Service) > 0 { - for iNdEx := len(m.Service) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Service[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - if len(m.AlsoKnownAs) > 0 { - for iNdEx := len(m.AlsoKnownAs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AlsoKnownAs[iNdEx]) - copy(dAtA[i:], m.AlsoKnownAs[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.AlsoKnownAs[iNdEx]))) - i-- - dAtA[i] = 0x52 - } - } - if len(m.KeyAgreement) > 0 { - for iNdEx := len(m.KeyAgreement) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.KeyAgreement[iNdEx]) - copy(dAtA[i:], m.KeyAgreement[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.KeyAgreement[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if len(m.CapabilityDelegation) > 0 { - for iNdEx := len(m.CapabilityDelegation) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.CapabilityDelegation[iNdEx]) - copy(dAtA[i:], m.CapabilityDelegation[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.CapabilityDelegation[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if len(m.CapabilityInvocation) > 0 { - for iNdEx := len(m.CapabilityInvocation) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.CapabilityInvocation[iNdEx]) - copy(dAtA[i:], m.CapabilityInvocation[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.CapabilityInvocation[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.AssertionMethod) > 0 { - for iNdEx := len(m.AssertionMethod) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AssertionMethod[iNdEx]) - copy(dAtA[i:], m.AssertionMethod[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.AssertionMethod[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Authentication) > 0 { - for iNdEx := len(m.Authentication) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Authentication[iNdEx]) - copy(dAtA[i:], m.Authentication[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authentication[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.VerificationMethod) > 0 { - for iNdEx := len(m.VerificationMethod) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.VerificationMethod[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Controller) > 0 { - for iNdEx := len(m.Controller) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Controller[iNdEx]) - copy(dAtA[i:], m.Controller[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Controller[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTx(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0x12 - } - if len(m.Context) > 0 { - for iNdEx := len(m.Context) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Context[iNdEx]) - copy(dAtA[i:], m.Context[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Context[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateDidResponse) 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 *MsgCreateDidResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateDidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTx(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateDidPayload) 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 *MsgUpdateDidPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateDidPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.VersionId) > 0 { - i -= len(m.VersionId) - copy(dAtA[i:], m.VersionId) - i = encodeVarintTx(dAtA, i, uint64(len(m.VersionId))) - i-- - dAtA[i] = 0x62 - } - if len(m.Service) > 0 { - for iNdEx := len(m.Service) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Service[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - if len(m.AlsoKnownAs) > 0 { - for iNdEx := len(m.AlsoKnownAs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AlsoKnownAs[iNdEx]) - copy(dAtA[i:], m.AlsoKnownAs[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.AlsoKnownAs[iNdEx]))) - i-- - dAtA[i] = 0x52 - } - } - if len(m.KeyAgreement) > 0 { - for iNdEx := len(m.KeyAgreement) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.KeyAgreement[iNdEx]) - copy(dAtA[i:], m.KeyAgreement[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.KeyAgreement[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if len(m.CapabilityDelegation) > 0 { - for iNdEx := len(m.CapabilityDelegation) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.CapabilityDelegation[iNdEx]) - copy(dAtA[i:], m.CapabilityDelegation[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.CapabilityDelegation[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if len(m.CapabilityInvocation) > 0 { - for iNdEx := len(m.CapabilityInvocation) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.CapabilityInvocation[iNdEx]) - copy(dAtA[i:], m.CapabilityInvocation[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.CapabilityInvocation[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.AssertionMethod) > 0 { - for iNdEx := len(m.AssertionMethod) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AssertionMethod[iNdEx]) - copy(dAtA[i:], m.AssertionMethod[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.AssertionMethod[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Authentication) > 0 { - for iNdEx := len(m.Authentication) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Authentication[iNdEx]) - copy(dAtA[i:], m.Authentication[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authentication[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.VerificationMethod) > 0 { - for iNdEx := len(m.VerificationMethod) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.VerificationMethod[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Controller) > 0 { - for iNdEx := len(m.Controller) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Controller[iNdEx]) - copy(dAtA[i:], m.Controller[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Controller[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTx(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0x12 - } - if len(m.Context) > 0 { - for iNdEx := len(m.Context) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Context[iNdEx]) - copy(dAtA[i:], m.Context[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Context[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateDidResponse) 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 *MsgUpdateDidResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateDidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTx(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgCreateDid) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Payload != nil { - l = m.Payload.Size() - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Signatures) > 0 { - for _, e := range m.Signatures { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgUpdateDid) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Payload != nil { - l = m.Payload.Size() - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Signatures) > 0 { - for _, e := range m.Signatures { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgDeactivateDid) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Payload != nil { - l = m.Payload.Size() - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Signatures) > 0 { - for _, e := range m.Signatures { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *SignInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.VerificationMethodId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgDeactivateDidPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgDeactivateDidResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Did != nil { - l = m.Did.Size() - n += 1 + l + sovTx(uint64(l)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgCreateDidPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Context) > 0 { - for _, s := range m.Context { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Controller) > 0 { - for _, s := range m.Controller { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.VerificationMethod) > 0 { - for _, e := range m.VerificationMethod { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.Authentication) > 0 { - for _, s := range m.Authentication { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.AssertionMethod) > 0 { - for _, s := range m.AssertionMethod { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.CapabilityInvocation) > 0 { - for _, s := range m.CapabilityInvocation { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.CapabilityDelegation) > 0 { - for _, s := range m.CapabilityDelegation { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.KeyAgreement) > 0 { - for _, s := range m.KeyAgreement { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.AlsoKnownAs) > 0 { - for _, s := range m.AlsoKnownAs { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.Service) > 0 { - for _, e := range m.Service { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgCreateDidResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgUpdateDidPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Context) > 0 { - for _, s := range m.Context { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Controller) > 0 { - for _, s := range m.Controller { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.VerificationMethod) > 0 { - for _, e := range m.VerificationMethod { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.Authentication) > 0 { - for _, s := range m.Authentication { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.AssertionMethod) > 0 { - for _, s := range m.AssertionMethod { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.CapabilityInvocation) > 0 { - for _, s := range m.CapabilityInvocation { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.CapabilityDelegation) > 0 { - for _, s := range m.CapabilityDelegation { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.KeyAgreement) > 0 { - for _, s := range m.KeyAgreement { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.AlsoKnownAs) > 0 { - for _, s := range m.AlsoKnownAs { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.Service) > 0 { - for _, e := range m.Service { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - l = len(m.VersionId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgUpdateDidResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgCreateDid) 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 ErrIntOverflowTx - } - 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: MsgCreateDid: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateDid: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Payload == nil { - m.Payload = &MsgCreateDidPayload{} - } - if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signatures = append(m.Signatures, &SignInfo{}) - if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateDid) 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 ErrIntOverflowTx - } - 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: MsgUpdateDid: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateDid: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Payload == nil { - m.Payload = &MsgUpdateDidPayload{} - } - if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signatures = append(m.Signatures, &SignInfo{}) - if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgDeactivateDid) 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 ErrIntOverflowTx - } - 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: MsgDeactivateDid: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeactivateDid: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Payload == nil { - m.Payload = &MsgDeactivateDidPayload{} - } - if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signatures = append(m.Signatures, &SignInfo{}) - if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignInfo) 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 ErrIntOverflowTx - } - 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: SignInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerificationMethodId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerificationMethodId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgDeactivateDidPayload) 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 ErrIntOverflowTx - } - 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: MsgDeactivateDidPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeactivateDidPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgDeactivateDidResponse) 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 ErrIntOverflowTx - } - 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: MsgDeactivateDidResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeactivateDidResponse: 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 msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Did == nil { - m.Did = &Did{} - } - if err := m.Did.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - 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 ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &Metadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateDidPayload) 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 ErrIntOverflowTx - } - 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: MsgCreateDidPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateDidPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Context = append(m.Context, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - 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 ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = append(m.Controller, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerificationMethod", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerificationMethod = append(m.VerificationMethod, &VerificationMethod{}) - if err := m.VerificationMethod[len(m.VerificationMethod)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authentication = append(m.Authentication, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssertionMethod", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AssertionMethod = append(m.AssertionMethod, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CapabilityInvocation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CapabilityInvocation = append(m.CapabilityInvocation, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CapabilityDelegation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CapabilityDelegation = append(m.CapabilityDelegation, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyAgreement", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeyAgreement = append(m.KeyAgreement, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AlsoKnownAs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AlsoKnownAs = append(m.AlsoKnownAs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Service = append(m.Service, &Service{}) - if err := m.Service[len(m.Service)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateDidResponse) 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 ErrIntOverflowTx - } - 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: MsgCreateDidResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateDidResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateDidPayload) 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 ErrIntOverflowTx - } - 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: MsgUpdateDidPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateDidPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Context = append(m.Context, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - 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 ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = append(m.Controller, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerificationMethod", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerificationMethod = append(m.VerificationMethod, &VerificationMethod{}) - if err := m.VerificationMethod[len(m.VerificationMethod)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authentication = append(m.Authentication, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssertionMethod", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AssertionMethod = append(m.AssertionMethod, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CapabilityInvocation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CapabilityInvocation = append(m.CapabilityInvocation, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CapabilityDelegation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CapabilityDelegation = append(m.CapabilityDelegation, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyAgreement", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeyAgreement = append(m.KeyAgreement, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AlsoKnownAs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AlsoKnownAs = append(m.AlsoKnownAs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Service = append(m.Service, &Service{}) - if err := m.Service[len(m.Service)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VersionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateDidResponse) 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 ErrIntOverflowTx - } - 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: MsgUpdateDidResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateDidResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTx(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/resource/keeper/keeper_param_change_proposal_test.go b/x/resource/keeper/keeper_param_change_proposal_test.go index 0f10c5407..3f2dadd91 100644 --- a/x/resource/keeper/keeper_param_change_proposal_test.go +++ b/x/resource/keeper/keeper_param_change_proposal_test.go @@ -5,7 +5,8 @@ import ( tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - cheqdsimapp "github.com/cheqd/cheqd-node/simapp" + "github.com/cheqd/cheqd-node/app" + cheqdapp "github.com/cheqd/cheqd-node/app" resourcetypes "github.com/cheqd/cheqd-node/x/resource/types" sdk "github.com/cosmos/cosmos-sdk/types" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" @@ -19,14 +20,14 @@ import ( type HandlerTestSuite struct { suite.Suite - app *cheqdsimapp.SimApp + app *app.TestApp ctx sdk.Context govHandler govv1beta1.Handler } func (suite *HandlerTestSuite) SetupTest() error { var err error - suite.app, err = cheqdsimapp.Setup(false) + suite.app, err = cheqdapp.Setup(false) if err != nil { return err } diff --git a/x/resource/keeper/querier.go b/x/resource/keeper/querier.go index 0040654c0..66149f2d1 100644 --- a/x/resource/keeper/querier.go +++ b/x/resource/keeper/querier.go @@ -1,34 +1,24 @@ package keeper -import ( - didkeeper "github.com/cheqd/cheqd-node/x/did/keeper" - "github.com/cheqd/cheqd-node/x/resource/types" - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +// func NewQuerier(k Keeper, cheqdKeeper didkeeper.Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { +// return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { +// var ( +// res []byte +// err error +// ) - abci "github.com/cometbft/cometbft/abci/types" -) +// switch path[0] { +// case types.QueryGetResource: +// return resource(ctx, k, cheqdKeeper, legacyQuerierCdc, path[1], path[2]) +// case types.QueryGetResourceMetadata: +// return resourceMetadata(ctx, k, cheqdKeeper, legacyQuerierCdc, path[1], path[2]) +// case types.QueryGetCollectionResources: +// return collectionResources(ctx, k, cheqdKeeper, legacyQuerierCdc, path[1]) -func NewQuerier(k Keeper, cheqdKeeper didkeeper.Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { - var ( - res []byte - err error - ) +// default: +// err = sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown %s query endpoint: %s", types.ModuleName, path[0]) +// } - switch path[0] { - case types.QueryGetResource: - return resource(ctx, k, cheqdKeeper, legacyQuerierCdc, path[1], path[2]) - case types.QueryGetResourceMetadata: - return resourceMetadata(ctx, k, cheqdKeeper, legacyQuerierCdc, path[1], path[2]) - case types.QueryGetCollectionResources: - return collectionResources(ctx, k, cheqdKeeper, legacyQuerierCdc, path[1]) - - default: - err = sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown %s query endpoint: %s", types.ModuleName, path[0]) - } - - return res, err - } -} +// return res, err +// } +// } diff --git a/x/resource/keeper/v1/keeper.go b/x/resource/keeper/v1/keeper.go deleted file mode 100644 index e44d39ce2..000000000 --- a/x/resource/keeper/v1/keeper.go +++ /dev/null @@ -1,28 +0,0 @@ -package keeper - -import ( - "fmt" - - "github.com/cheqd/cheqd-node/x/resource/types" - "github.com/cometbft/cometbft/libs/log" - - "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -type Keeper struct { - cdc codec.BinaryCodec - storeKey storetypes.StoreKey -} - -func NewKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey) *Keeper { - return &Keeper{ - cdc: cdc, - storeKey: storeKey, - } -} - -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) -} diff --git a/x/resource/keeper/v1/keeper_resource.go b/x/resource/keeper/v1/keeper_resource.go deleted file mode 100644 index 9cc2fe520..000000000 --- a/x/resource/keeper/v1/keeper_resource.go +++ /dev/null @@ -1,211 +0,0 @@ -package keeper - -import ( - "strconv" - - types "github.com/cheqd/cheqd-node/x/resource/types/v1" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -// GetResourceCount get the total number of resource -func (k Keeper) GetResourceCount(ctx *sdk.Context) uint64 { - store := ctx.KVStore(k.storeKey) - byteKey := types.KeyPrefix(types.ResourceCountKey) - bz := store.Get(byteKey) - - // Count doesn't exist: no element - if bz == nil { - return 0 - } - - // Parse bytes - count, err := strconv.ParseUint(string(bz), 10, 64) - if err != nil { - // Panic because the count should be always formattable to int64 - panic("cannot decode count") - } - - return count -} - -// SetResourceCount set the total number of resource -func (k Keeper) SetResourceCount(ctx *sdk.Context, count uint64) { - store := ctx.KVStore(k.storeKey) - byteKey := types.KeyPrefix(types.ResourceCountKey) - - // Set bytes - bz := []byte(strconv.FormatUint(count, 10)) - store.Set(byteKey, bz) -} - -// SetResource create or update a specific resource in the store -func (k Keeper) SetResource(ctx *sdk.Context, resource *types.Resource) error { - if !k.HasResource(ctx, resource.Header.CollectionId, resource.Header.Id) { - count := k.GetResourceCount(ctx) - k.SetResourceCount(ctx, count+1) - } - - store := ctx.KVStore(k.storeKey) - - // Set header - headerKey := GetResourceHeaderKeyBytes(resource.Header.CollectionId, resource.Header.Id) - headerBytes := k.cdc.MustMarshal(resource.Header) - store.Set(headerKey, headerBytes) - - // Set data - dataKey := GetResourceDataKeyBytes(resource.Header.CollectionId, resource.Header.Id) - store.Set(dataKey, resource.Data) - - return nil -} - -// GetResource returns a resource from its id -func (k Keeper) GetResource(ctx *sdk.Context, collectionID string, id string) (types.Resource, error) { - if !k.HasResource(ctx, collectionID, id) { - return types.Resource{}, sdkerrors.ErrNotFound.Wrap("resource " + collectionID + ":" + id) - } - - store := ctx.KVStore(k.storeKey) - - headerBytes := store.Get(GetResourceHeaderKeyBytes(collectionID, id)) - var header types.ResourceHeader - if err := k.cdc.Unmarshal(headerBytes, &header); err != nil { - return types.Resource{}, sdkerrors.ErrInvalidType.Wrap(err.Error()) - } - - dataBytes := store.Get(GetResourceDataKeyBytes(collectionID, id)) - - return types.Resource{ - Header: &header, - Data: dataBytes, - }, nil -} - -// HasResource checks if the resource exists in the store -func (k Keeper) HasResource(ctx *sdk.Context, collectionID string, id string) bool { - store := ctx.KVStore(k.storeKey) - return store.Has(GetResourceHeaderKeyBytes(collectionID, id)) -} - -func (k Keeper) GetAllResourceVersions(ctx *sdk.Context, collectionID, name string) []*types.ResourceHeader { - store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, GetResourceHeaderCollectionPrefixBytes(collectionID)) - - defer closeIteratorOrPanic(iterator) - - var result []*types.ResourceHeader - - for ; iterator.Valid(); iterator.Next() { - var val types.ResourceHeader - k.cdc.MustUnmarshal(iterator.Value(), &val) - - if val.Name == name { - result = append(result, &val) - } - } - - return result -} - -func (k Keeper) GetResourceCollection(ctx *sdk.Context, collectionID string) []*types.ResourceHeader { - store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, GetResourceHeaderCollectionPrefixBytes(collectionID)) - - var resources []*types.ResourceHeader - - defer closeIteratorOrPanic(iterator) - - for ; iterator.Valid(); iterator.Next() { - var val types.ResourceHeader - k.cdc.MustUnmarshal(iterator.Value(), &val) - resources = append(resources, &val) - - } - - return resources -} - -func (k Keeper) GetLastResourceVersionHeader(ctx *sdk.Context, collectionID, name, resourceType, mediaType string) (types.ResourceHeader, bool) { - iterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), GetResourceHeaderCollectionPrefixBytes(collectionID)) - - defer closeIteratorOrPanic(iterator) - - for ; iterator.Valid(); iterator.Next() { - var val types.ResourceHeader - k.cdc.MustUnmarshal(iterator.Value(), &val) - - if val.Name == name && val.NextVersionId == "" { - return val, true - } - } - - return types.ResourceHeader{}, false -} - -// UpdateResourceHeader update the header of a resource. Returns an error if the resource doesn't exist -func (k Keeper) UpdateResourceHeader(ctx *sdk.Context, header *types.ResourceHeader) error { - if !k.HasResource(ctx, header.CollectionId, header.Id) { - return sdkerrors.ErrNotFound.Wrap("resource " + header.CollectionId + ":" + header.Id) - } - - store := ctx.KVStore(k.storeKey) - - // Set header - headerKey := GetResourceHeaderKeyBytes(header.CollectionId, header.Id) - headerBytes := k.cdc.MustMarshal(header) - store.Set(headerKey, headerBytes) - - return nil -} - -// GetAllResources returns all resources as a list -// Loads everything in memory. Use only for genesis export! -func (k Keeper) GetAllResources(ctx *sdk.Context) (list []types.Resource) { - headerIterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ResourceHeaderKey)) - dataIterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ResourceDataKey)) - - defer closeIteratorOrPanic(headerIterator) - defer closeIteratorOrPanic(dataIterator) - - for headerIterator.Valid() { - if !dataIterator.Valid() { - panic("number of headers and data don't match") - } - - var val types.ResourceHeader - k.cdc.MustUnmarshal(headerIterator.Value(), &val) - - list = append(list, types.Resource{ - Header: &val, - Data: dataIterator.Value(), - }) - - headerIterator.Next() - dataIterator.Next() - } - - return -} - -// GetResourceHeaderKeyBytes returns the byte representation of resource key -func GetResourceHeaderKeyBytes(collectionID string, id string) []byte { - return []byte(types.ResourceHeaderKey + collectionID + ":" + id) -} - -// GetResourceHeaderCollectionPrefixBytes used to iterate over all resource headers in a collection -func GetResourceHeaderCollectionPrefixBytes(collectionID string) []byte { - return []byte(types.ResourceHeaderKey + collectionID + ":") -} - -// GetResourceDataKeyBytes returns the byte representation of resource key -func GetResourceDataKeyBytes(collectionID string, id string) []byte { - return []byte(types.ResourceDataKey + collectionID + ":" + id) -} - -func closeIteratorOrPanic(iterator sdk.Iterator) { - err := iterator.Close() - if err != nil { - panic(err.Error()) - } -} diff --git a/x/resource/module.go b/x/resource/module.go index 049f387ea..c638a42ca 100644 --- a/x/resource/module.go +++ b/x/resource/module.go @@ -134,18 +134,18 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the resource module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper, am.didKeeper)) -} +// // Route returns the resource module's message routing key. +// func (am AppModule) Route() sdk.Route { +// return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper, am.didKeeper)) +// } // QuerierRoute returns the resource module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns the resource module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return keeper.NewQuerier(am.keeper, am.didKeeper, legacyQuerierCdc) -} +// // LegacyQuerierHandler returns the resource module's Querier. +// func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { +// return keeper.NewQuerier(am.keeper, am.didKeeper, legacyQuerierCdc) +// } // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. diff --git a/x/resource/types/fee.pb.go b/x/resource/types/fee.pb.go index 5e389ee44..1fcda3878 100644 --- a/x/resource/types/fee.pb.go +++ b/x/resource/types/fee.pb.go @@ -9,7 +9,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/resource/types/genesis.pb.go b/x/resource/types/genesis.pb.go index 7a6ef47b4..80518cf02 100644 --- a/x/resource/types/genesis.pb.go +++ b/x/resource/types/genesis.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/resource/types/query.pb.go b/x/resource/types/query.pb.go index d26048411..2e98ba720 100644 --- a/x/resource/types/query.pb.go +++ b/x/resource/types/query.pb.go @@ -8,8 +8,8 @@ import ( fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/resource/types/resource.pb.go b/x/resource/types/resource.pb.go index b10d1116b..b782c3a71 100644 --- a/x/resource/types/resource.pb.go +++ b/x/resource/types/resource.pb.go @@ -6,9 +6,9 @@ package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" @@ -472,7 +472,7 @@ func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x4a } - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Created, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Created):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Created, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Created):]) if err1 != nil { return 0, err1 } @@ -683,7 +683,7 @@ func (m *Metadata) Size() (n int) { if l > 0 { n += 1 + l + sovResource(uint64(l)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Created) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Created) n += 1 + l + sovResource(uint64(l)) l = len(m.Checksum) if l > 0 { @@ -1108,7 +1108,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Created, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Created, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/resource/types/tx.pb.go b/x/resource/types/tx.pb.go index 7a15d39d2..8b38edc5e 100644 --- a/x/resource/types/tx.pb.go +++ b/x/resource/types/tx.pb.go @@ -8,8 +8,8 @@ import ( fmt "fmt" types "github.com/cheqd/cheqd-node/x/did/types" _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/resource/types/v1/genesis.pb.go b/x/resource/types/v1/genesis.pb.go deleted file mode 100644 index 18ed8094d..000000000 --- a/x/resource/types/v1/genesis.pb.go +++ /dev/null @@ -1,328 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cheqd/resource/v1/genesis.proto - -package v1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the cheqd module's genesis state. -type GenesisState struct { - ResourceList []*Resource `protobuf:"bytes,1,rep,name=resourceList,proto3" json:"resourceList,omitempty"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_443aa1d6e92ebfdf, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetResourceList() []*Resource { - if m != nil { - return m.ResourceList - } - return nil -} - -func init() { - proto.RegisterType((*GenesisState)(nil), "cheqdid.cheqdnode.resource.v1.GenesisState") -} - -func init() { proto.RegisterFile("cheqd/resource/v1/genesis.proto", fileDescriptor_443aa1d6e92ebfdf) } - -var fileDescriptor_443aa1d6e92ebfdf = []byte{ - // 189 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x48, 0x2d, - 0x4c, 0xd1, 0x2f, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, - 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x05, 0x2b, 0xc8, - 0x4c, 0xd1, 0x03, 0xd3, 0x79, 0xf9, 0x29, 0xa9, 0x7a, 0x30, 0xc5, 0x7a, 0x65, 0x86, 0x52, 0x0a, - 0x98, 0xfa, 0xe1, 0xd2, 0x60, 0x03, 0x94, 0xa2, 0xb9, 0x78, 0xdc, 0x21, 0x26, 0x06, 0x97, 0x24, - 0x96, 0xa4, 0x0a, 0x79, 0x73, 0xf1, 0xc0, 0x54, 0xf8, 0x64, 0x16, 0x97, 0x48, 0x30, 0x2a, 0x30, - 0x6b, 0x70, 0x1b, 0xa9, 0xeb, 0xe1, 0xb5, 0x47, 0x2f, 0x08, 0xca, 0x0e, 0x42, 0xd1, 0xec, 0xe4, - 0x79, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, - 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xfa, 0xe9, 0x99, 0x25, 0x19, - 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x10, 0x37, 0x82, 0x49, 0x5d, 0x90, 0xc9, 0xfa, 0x15, - 0x08, 0x07, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0x97, 0x19, 0x26, 0xb1, 0x81, 0x9d, 0x6b, 0x0c, - 0x08, 0x00, 0x00, 0xff, 0xff, 0xec, 0x8e, 0x71, 0xcf, 0x12, 0x01, 0x00, 0x00, -} - -func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceList) > 0 { - for iNdEx := len(m.ResourceList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceList) > 0 { - for _, e := range m.ResourceList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) 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 ErrIntOverflowGenesis - } - 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: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceList = append(m.ResourceList, &Resource{}) - if err := m.ResourceList[len(m.ResourceList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/resource/types/v1/keys.go b/x/resource/types/v1/keys.go deleted file mode 100644 index 9e78c9b48..000000000 --- a/x/resource/types/v1/keys.go +++ /dev/null @@ -1,25 +0,0 @@ -package v1 - -const ( - // ModuleName defines the module name - ModuleName = "resource" - - // StoreKey defines the primary module store key - StoreKey = ModuleName - - // RouterKey is the message route for slashing - RouterKey = ModuleName - - // QuerierRoute defines the module's query routing key - QuerierRoute = ModuleName -) - -func KeyPrefix(p string) []byte { - return []byte(p) -} - -const ( - ResourceHeaderKey = "resource-header:" - ResourceDataKey = "resource-data:" - ResourceCountKey = "resource-count:" -) diff --git a/x/resource/types/v1/query.pb.go b/x/resource/types/v1/query.pb.go deleted file mode 100644 index 112a9e4f6..000000000 --- a/x/resource/types/v1/query.pb.go +++ /dev/null @@ -1,1528 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cheqd/resource/v1/query.proto - -package v1 - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type QueryResourceRequest struct { - CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *QueryResourceRequest) Reset() { *m = QueryResourceRequest{} } -func (m *QueryResourceRequest) String() string { return proto.CompactTextString(m) } -func (*QueryResourceRequest) ProtoMessage() {} -func (*QueryResourceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcece4d32a2c67c4, []int{0} -} -func (m *QueryResourceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetResourceRequest.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 *QueryResourceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetResourceRequest.Merge(m, src) -} -func (m *QueryResourceRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryResourceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetResourceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetResourceRequest proto.InternalMessageInfo - -func (m *QueryResourceRequest) GetCollectionId() string { - if m != nil { - return m.CollectionId - } - return "" -} - -func (m *QueryResourceRequest) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -type QueryResourceResponse struct { - Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` -} - -func (m *QueryResourceResponse) Reset() { *m = QueryResourceResponse{} } -func (m *QueryResourceResponse) String() string { return proto.CompactTextString(m) } -func (*QueryResourceResponse) ProtoMessage() {} -func (*QueryResourceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcece4d32a2c67c4, []int{1} -} -func (m *QueryResourceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryResourceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryResourceResponse.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 *QueryResourceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryResourceResponse.Merge(m, src) -} -func (m *QueryResourceResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryResourceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryResourceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryResourceResponse proto.InternalMessageInfo - -func (m *QueryResourceResponse) GetResource() *Resource { - if m != nil { - return m.Resource - } - return nil -} - -type QueryCollectionResourcesRequest struct { - CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"` -} - -func (m *QueryCollectionResourcesRequest) Reset() { *m = QueryCollectionResourcesRequest{} } -func (m *QueryCollectionResourcesRequest) String() string { return proto.CompactTextString(m) } -func (*QueryCollectionResourcesRequest) ProtoMessage() {} -func (*QueryCollectionResourcesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcece4d32a2c67c4, []int{2} -} -func (m *QueryCollectionResourcesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCollectionResourcesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetCollectionResourcesRequest.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 *QueryCollectionResourcesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetCollectionResourcesRequest.Merge(m, src) -} -func (m *QueryCollectionResourcesRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryCollectionResourcesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetCollectionResourcesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetCollectionResourcesRequest proto.InternalMessageInfo - -func (m *QueryCollectionResourcesRequest) GetCollectionId() string { - if m != nil { - return m.CollectionId - } - return "" -} - -type QueryCollectionResourcesResponse struct { - Resources []*ResourceHeader `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` -} - -func (m *QueryCollectionResourcesResponse) Reset() { *m = QueryCollectionResourcesResponse{} } -func (m *QueryCollectionResourcesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryCollectionResourcesResponse) ProtoMessage() {} -func (*QueryCollectionResourcesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcece4d32a2c67c4, []int{3} -} -func (m *QueryCollectionResourcesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCollectionResourcesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCollectionResourcesResponse.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 *QueryCollectionResourcesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCollectionResourcesResponse.Merge(m, src) -} -func (m *QueryCollectionResourcesResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryCollectionResourcesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCollectionResourcesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCollectionResourcesResponse proto.InternalMessageInfo - -func (m *QueryCollectionResourcesResponse) GetResources() []*ResourceHeader { - if m != nil { - return m.Resources - } - return nil -} - -type QueryGetAllResourceVersionsRequest struct { - CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - ResourceType string `protobuf:"bytes,3,opt,name=resourceType,proto3" json:"resourceType,omitempty"` -} - -func (m *QueryGetAllResourceVersionsRequest) Reset() { *m = QueryGetAllResourceVersionsRequest{} } -func (m *QueryGetAllResourceVersionsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetAllResourceVersionsRequest) ProtoMessage() {} -func (*QueryGetAllResourceVersionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dcece4d32a2c67c4, []int{4} -} -func (m *QueryGetAllResourceVersionsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetAllResourceVersionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetAllResourceVersionsRequest.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 *QueryGetAllResourceVersionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetAllResourceVersionsRequest.Merge(m, src) -} -func (m *QueryGetAllResourceVersionsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetAllResourceVersionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetAllResourceVersionsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetAllResourceVersionsRequest proto.InternalMessageInfo - -func (m *QueryGetAllResourceVersionsRequest) GetCollectionId() string { - if m != nil { - return m.CollectionId - } - return "" -} - -func (m *QueryGetAllResourceVersionsRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *QueryGetAllResourceVersionsRequest) GetResourceType() string { - if m != nil { - return m.ResourceType - } - return "" -} - -type QueryGetAllResourceVersionsResponse struct { - Resources []*ResourceHeader `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` -} - -func (m *QueryGetAllResourceVersionsResponse) Reset() { *m = QueryGetAllResourceVersionsResponse{} } -func (m *QueryGetAllResourceVersionsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetAllResourceVersionsResponse) ProtoMessage() {} -func (*QueryGetAllResourceVersionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dcece4d32a2c67c4, []int{5} -} -func (m *QueryGetAllResourceVersionsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetAllResourceVersionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetAllResourceVersionsResponse.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 *QueryGetAllResourceVersionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetAllResourceVersionsResponse.Merge(m, src) -} -func (m *QueryGetAllResourceVersionsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetAllResourceVersionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetAllResourceVersionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetAllResourceVersionsResponse proto.InternalMessageInfo - -func (m *QueryGetAllResourceVersionsResponse) GetResources() []*ResourceHeader { - if m != nil { - return m.Resources - } - return nil -} - -func init() { - proto.RegisterType((*QueryResourceRequest)(nil), "cheqdid.cheqdnode.resource.v1.QueryResourceRequest") - proto.RegisterType((*QueryResourceResponse)(nil), "cheqdid.cheqdnode.resource.v1.QueryResourceResponse") - proto.RegisterType((*QueryCollectionResourcesRequest)(nil), "cheqdid.cheqdnode.resource.v1.QueryCollectionResourcesRequest") - proto.RegisterType((*QueryCollectionResourcesResponse)(nil), "cheqdid.cheqdnode.resource.v1.QueryCollectionResourcesResponse") - proto.RegisterType((*QueryGetAllResourceVersionsRequest)(nil), "cheqdid.cheqdnode.resource.v1.QueryGetAllResourceVersionsRequest") - proto.RegisterType((*QueryGetAllResourceVersionsResponse)(nil), "cheqdid.cheqdnode.resource.v1.QueryGetAllResourceVersionsResponse") -} - -func init() { proto.RegisterFile("cheqd/resource/v1/query.proto", fileDescriptor_dcece4d32a2c67c4) } - -var fileDescriptor_dcece4d32a2c67c4 = []byte{ - // 509 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0xdd, 0x6a, 0x13, 0x41, - 0x14, 0xc7, 0x33, 0x69, 0x95, 0x76, 0x5a, 0xbd, 0x98, 0x22, 0x86, 0x45, 0x97, 0x30, 0xbd, 0xb0, - 0x37, 0x9d, 0xe9, 0x46, 0xa9, 0x20, 0x82, 0x34, 0xbd, 0xd0, 0x20, 0x08, 0x06, 0xf1, 0x42, 0x04, - 0xd9, 0xee, 0x1c, 0xd3, 0x81, 0xed, 0xce, 0x66, 0x67, 0x13, 0x0c, 0x21, 0x17, 0xfa, 0x04, 0x82, - 0x4f, 0xe2, 0x5b, 0x78, 0x59, 0xf1, 0xc6, 0xcb, 0x92, 0xf8, 0x04, 0x3e, 0x81, 0xec, 0x64, 0x3f, - 0xfc, 0x48, 0xe2, 0x2e, 0xe2, 0x4d, 0xb2, 0xcc, 0x39, 0xe7, 0x77, 0xfe, 0xff, 0x99, 0x33, 0x83, - 0x6f, 0x7a, 0xa7, 0xd0, 0x17, 0x3c, 0x02, 0xad, 0x06, 0x91, 0x07, 0x7c, 0xe8, 0xf0, 0xfe, 0x00, - 0xa2, 0x11, 0x0b, 0x23, 0x15, 0x2b, 0x32, 0x0f, 0x4b, 0xc1, 0xcc, 0x7f, 0xa0, 0x04, 0xb0, 0x2c, - 0x95, 0x0d, 0x1d, 0xab, 0xf9, 0x67, 0x75, 0x1e, 0x36, 0x00, 0xeb, 0x46, 0x4f, 0xa9, 0x9e, 0x0f, - 0xdc, 0x0d, 0x25, 0x77, 0x83, 0x40, 0xc5, 0x6e, 0x2c, 0x55, 0xa0, 0xe7, 0x51, 0xfa, 0x04, 0x5f, - 0x7f, 0x9a, 0x74, 0x7b, 0x08, 0x71, 0x37, 0xad, 0xeb, 0x42, 0x7f, 0x00, 0x3a, 0x26, 0xbb, 0xf8, - 0x8a, 0xa7, 0x7c, 0x1f, 0xbc, 0x24, 0xff, 0x95, 0x14, 0x0d, 0xd4, 0x44, 0x7b, 0x9b, 0xdd, 0xed, - 0x62, 0xb1, 0x23, 0xc8, 0x55, 0x5c, 0x97, 0xa2, 0x51, 0x37, 0x91, 0xba, 0x14, 0xf4, 0x25, 0xbe, - 0x66, 0x78, 0x05, 0x4c, 0x87, 0x2a, 0xd0, 0x40, 0x8e, 0xf1, 0x46, 0x26, 0xcc, 0x80, 0xb6, 0x5a, - 0xb7, 0xd8, 0x4a, 0x6b, 0x2c, 0x47, 0xe4, 0x85, 0xb4, 0x83, 0x69, 0xa6, 0xf6, 0x38, 0x57, 0x91, - 0xe5, 0xe9, 0x2a, 0xc2, 0xa9, 0xc2, 0x4d, 0x83, 0x5a, 0xc8, 0x49, 0x35, 0x3f, 0xc6, 0x9b, 0x59, - 0x6b, 0xdd, 0x40, 0xcd, 0xb5, 0xbd, 0xad, 0xd6, 0x7e, 0x49, 0xd1, 0x8f, 0xc0, 0x15, 0x10, 0x75, - 0x8b, 0x7a, 0xfa, 0x16, 0x15, 0xe2, 0x8f, 0x7c, 0x3f, 0x4b, 0x7c, 0x0e, 0x91, 0x4e, 0xce, 0xa3, - 0xd2, 0xae, 0x13, 0xbc, 0x1e, 0xb8, 0x67, 0x90, 0xee, 0xbb, 0xf9, 0x26, 0x14, 0x6f, 0x67, 0xcd, - 0x9e, 0x8d, 0x42, 0x68, 0xac, 0xcd, 0xeb, 0x7e, 0x5e, 0xa3, 0x11, 0xde, 0x5d, 0x29, 0xe1, 0x3f, - 0xf8, 0x6e, 0x7d, 0x5f, 0xc7, 0x97, 0x4c, 0x53, 0xf2, 0x11, 0xe1, 0x8d, 0x2c, 0x8f, 0x1c, 0xfe, - 0x05, 0xb8, 0x64, 0x2a, 0xad, 0x3b, 0x65, 0xea, 0x7e, 0x9f, 0x3e, 0x7a, 0xf7, 0xdd, 0x97, 0x6f, - 0x1f, 0xea, 0x0e, 0xe1, 0xdc, 0x61, 0x07, 0x5c, 0x0a, 0x08, 0x62, 0xf9, 0x5a, 0x42, 0xa4, 0xf9, - 0xf8, 0x97, 0xdd, 0x9e, 0xe4, 0xb7, 0x47, 0xf3, 0xb1, 0x14, 0x13, 0xf2, 0x19, 0xe1, 0x9d, 0x05, - 0x23, 0x42, 0x8e, 0x4a, 0xca, 0x5f, 0x3e, 0xa6, 0xd6, 0x83, 0x32, 0x88, 0x15, 0xe3, 0x49, 0x0f, - 0x8d, 0xa9, 0x03, 0xc2, 0x2a, 0x98, 0x72, 0x7d, 0x9f, 0x5c, 0x20, 0xbc, 0xb3, 0xe0, 0xf8, 0x4b, - 0x7b, 0x5a, 0x3e, 0xbd, 0x56, 0xfb, 0x5f, 0x10, 0xa9, 0xad, 0xb6, 0xb1, 0x75, 0x9f, 0xdc, 0xab, - 0x60, 0x6b, 0x98, 0x42, 0xf8, 0x38, 0xb9, 0x0b, 0x93, 0x76, 0xe7, 0xd3, 0xd4, 0x46, 0xe7, 0x53, - 0x1b, 0x5d, 0x4c, 0x6d, 0xf4, 0x7e, 0x66, 0xd7, 0xce, 0x67, 0x76, 0xed, 0xeb, 0xcc, 0xae, 0xbd, - 0xe0, 0x3d, 0x19, 0x9f, 0x0e, 0x4e, 0x98, 0xa7, 0xce, 0xf8, 0xfc, 0xed, 0x34, 0xbf, 0xfb, 0x89, - 0x54, 0xfe, 0xa6, 0x78, 0x48, 0xe3, 0x51, 0x98, 0x70, 0x9d, 0x93, 0xcb, 0xe6, 0xa1, 0xbc, 0xfd, - 0x23, 0x00, 0x00, 0xff, 0xff, 0x16, 0x9e, 0xd6, 0xf3, 0xa8, 0x05, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - Resource(ctx context.Context, in *QueryResourceRequest, opts ...grpc.CallOption) (*QueryResourceResponse, error) - CollectionResources(ctx context.Context, in *QueryCollectionResourcesRequest, opts ...grpc.CallOption) (*QueryCollectionResourcesResponse, error) - AllResourceVersions(ctx context.Context, in *QueryGetAllResourceVersionsRequest, opts ...grpc.CallOption) (*QueryGetAllResourceVersionsResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Resource(ctx context.Context, in *QueryResourceRequest, opts ...grpc.CallOption) (*QueryResourceResponse, error) { - out := new(QueryResourceResponse) - err := c.cc.Invoke(ctx, "/cheqdid.cheqdnode.resource.v1.Query/Resource", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) CollectionResources(ctx context.Context, in *QueryCollectionResourcesRequest, opts ...grpc.CallOption) (*QueryCollectionResourcesResponse, error) { - out := new(QueryCollectionResourcesResponse) - err := c.cc.Invoke(ctx, "/cheqdid.cheqdnode.resource.v1.Query/CollectionResources", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AllResourceVersions(ctx context.Context, in *QueryGetAllResourceVersionsRequest, opts ...grpc.CallOption) (*QueryGetAllResourceVersionsResponse, error) { - out := new(QueryGetAllResourceVersionsResponse) - err := c.cc.Invoke(ctx, "/cheqdid.cheqdnode.resource.v1.Query/AllResourceVersions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - Resource(context.Context, *QueryResourceRequest) (*QueryResourceResponse, error) - CollectionResources(context.Context, *QueryCollectionResourcesRequest) (*QueryCollectionResourcesResponse, error) - AllResourceVersions(context.Context, *QueryGetAllResourceVersionsRequest) (*QueryGetAllResourceVersionsResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Resource(ctx context.Context, req *QueryResourceRequest) (*QueryResourceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Resource not implemented") -} -func (*UnimplementedQueryServer) CollectionResources(ctx context.Context, req *QueryCollectionResourcesRequest) (*QueryCollectionResourcesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CollectionResources not implemented") -} -func (*UnimplementedQueryServer) AllResourceVersions(ctx context.Context, req *QueryGetAllResourceVersionsRequest) (*QueryGetAllResourceVersionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AllResourceVersions not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Resource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryResourceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Resource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cheqdid.cheqdnode.resource.v1.Query/Resource", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Resource(ctx, req.(*QueryResourceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_CollectionResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCollectionResourcesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).CollectionResources(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cheqdid.cheqdnode.resource.v1.Query/CollectionResources", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CollectionResources(ctx, req.(*QueryCollectionResourcesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AllResourceVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetAllResourceVersionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AllResourceVersions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cheqdid.cheqdnode.resource.v1.Query/AllResourceVersions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AllResourceVersions(ctx, req.(*QueryGetAllResourceVersionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cheqdid.cheqdnode.resource.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Resource", - Handler: _Query_Resource_Handler, - }, - { - MethodName: "CollectionResources", - Handler: _Query_CollectionResources_Handler, - }, - { - MethodName: "AllResourceVersions", - Handler: _Query_AllResourceVersions_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cheqd/resource/v1/query.proto", -} - -func (m *QueryResourceRequest) 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 *QueryResourceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryResourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0x12 - } - if len(m.CollectionId) > 0 { - i -= len(m.CollectionId) - copy(dAtA[i:], m.CollectionId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.CollectionId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryResourceResponse) 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 *QueryResourceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryResourceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Resource != nil { - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryCollectionResourcesRequest) 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 *QueryCollectionResourcesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCollectionResourcesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CollectionId) > 0 { - i -= len(m.CollectionId) - copy(dAtA[i:], m.CollectionId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.CollectionId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryCollectionResourcesResponse) 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 *QueryCollectionResourcesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCollectionResourcesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Resources) > 0 { - for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Resources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryGetAllResourceVersionsRequest) 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 *QueryGetAllResourceVersionsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetAllResourceVersionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceType) > 0 { - i -= len(m.ResourceType) - copy(dAtA[i:], m.ResourceType) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ResourceType))) - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.CollectionId) > 0 { - i -= len(m.CollectionId) - copy(dAtA[i:], m.CollectionId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.CollectionId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetAllResourceVersionsResponse) 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 *QueryGetAllResourceVersionsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetAllResourceVersionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Resources) > 0 { - for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Resources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryResourceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CollectionId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Id) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryResourceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Resource != nil { - l = m.Resource.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryCollectionResourcesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CollectionId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryCollectionResourcesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Resources) > 0 { - for _, e := range m.Resources { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryGetAllResourceVersionsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CollectionId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ResourceType) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetAllResourceVersionsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Resources) > 0 { - for _, e := range m.Resources { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryResourceRequest) 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 ErrIntOverflowQuery - } - 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: QueryResourceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryResourceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CollectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryResourceResponse) 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 ErrIntOverflowQuery - } - 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: QueryResourceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryResourceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Resource == nil { - m.Resource = &Resource{} - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCollectionResourcesRequest) 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 ErrIntOverflowQuery - } - 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: QueryCollectionResourcesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCollectionResourcesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CollectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCollectionResourcesResponse) 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 ErrIntOverflowQuery - } - 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: QueryCollectionResourcesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCollectionResourcesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resources = append(m.Resources, &ResourceHeader{}) - if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetAllResourceVersionsRequest) 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 ErrIntOverflowQuery - } - 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: QueryGetAllResourceVersionsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetAllResourceVersionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CollectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetAllResourceVersionsResponse) 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 ErrIntOverflowQuery - } - 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: QueryGetAllResourceVersionsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetAllResourceVersionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resources = append(m.Resources, &ResourceHeader{}) - if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/resource/types/v1/query.pb.gw.go b/x/resource/types/v1/query.pb.gw.go deleted file mode 100644 index f194d7046..000000000 --- a/x/resource/types/v1/query.pb.gw.go +++ /dev/null @@ -1,453 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: cheqd/resource/v1/query.proto - -/* -Package v1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package v1 - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -func request_Query_Resource_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryResourceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["collection_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "collection_id") - } - - protoReq.CollectionId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "collection_id", err) - } - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.Resource(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Resource_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryResourceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["collection_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "collection_id") - } - - protoReq.CollectionId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "collection_id", err) - } - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.Resource(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_CollectionResources_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCollectionResourcesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["collection_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "collection_id") - } - - protoReq.CollectionId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "collection_id", err) - } - - msg, err := client.CollectionResources(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_CollectionResources_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCollectionResourcesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["collection_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "collection_id") - } - - protoReq.CollectionId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "collection_id", err) - } - - msg, err := server.CollectionResources(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_AllResourceVersions_0 = &utilities.DoubleArray{Encoding: map[string]int{"collection_id": 0, "name": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} -) - -func request_Query_AllResourceVersions_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetAllResourceVersionsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["collection_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "collection_id") - } - - protoReq.CollectionId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "collection_id", err) - } - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllResourceVersions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.AllResourceVersions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_AllResourceVersions_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetAllResourceVersionsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["collection_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "collection_id") - } - - protoReq.CollectionId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "collection_id", err) - } - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllResourceVersions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.AllResourceVersions(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_Resource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Resource_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Resource_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_CollectionResources_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_CollectionResources_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_CollectionResources_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AllResourceVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_AllResourceVersions_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_AllResourceVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_Resource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Resource_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Resource_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_CollectionResources_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_CollectionResources_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_CollectionResources_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AllResourceVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_AllResourceVersions_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_AllResourceVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_Resource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"1.0", "identifiers", "collection_id", "resources", "id"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_CollectionResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"1.0", "identifiers", "collection_id", "resources", "all"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_AllResourceVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"1.0", "identifiers", "collection_id", "resources", "versions", "name"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_Resource_0 = runtime.ForwardResponseMessage - - forward_Query_CollectionResources_0 = runtime.ForwardResponseMessage - - forward_Query_AllResourceVersions_0 = runtime.ForwardResponseMessage -) diff --git a/x/resource/types/v1/resource.pb.go b/x/resource/types/v1/resource.pb.go deleted file mode 100644 index 6cd0064fd..000000000 --- a/x/resource/types/v1/resource.pb.go +++ /dev/null @@ -1,969 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cheqd/resource/v1/resource.proto - -package v1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type Resource struct { - Header *ResourceHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *Resource) Reset() { *m = Resource{} } -func (m *Resource) String() string { return proto.CompactTextString(m) } -func (*Resource) ProtoMessage() {} -func (*Resource) Descriptor() ([]byte, []int) { - return fileDescriptor_f9a40e43d3305340, []int{0} -} -func (m *Resource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Resource.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 *Resource) XXX_Merge(src proto.Message) { - xxx_messageInfo_Resource.Merge(m, src) -} -func (m *Resource) XXX_Size() int { - return m.Size() -} -func (m *Resource) XXX_DiscardUnknown() { - xxx_messageInfo_Resource.DiscardUnknown(m) -} - -var xxx_messageInfo_Resource proto.InternalMessageInfo - -func (m *Resource) GetHeader() *ResourceHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *Resource) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -type ResourceHeader struct { - CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - ResourceType string `protobuf:"bytes,4,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - MediaType string `protobuf:"bytes,5,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"` - Created string `protobuf:"bytes,6,opt,name=created,proto3" json:"created,omitempty"` - Checksum []byte `protobuf:"bytes,7,opt,name=checksum,proto3" json:"checksum,omitempty"` - PreviousVersionId string `protobuf:"bytes,8,opt,name=previous_version_id,json=previousVersionId,proto3" json:"previous_version_id,omitempty"` - NextVersionId string `protobuf:"bytes,9,opt,name=next_version_id,json=nextVersionId,proto3" json:"next_version_id,omitempty"` -} - -func (m *ResourceHeader) Reset() { *m = ResourceHeader{} } -func (m *ResourceHeader) String() string { return proto.CompactTextString(m) } -func (*ResourceHeader) ProtoMessage() {} -func (*ResourceHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_f9a40e43d3305340, []int{1} -} -func (m *ResourceHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceHeader.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 *ResourceHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceHeader.Merge(m, src) -} -func (m *ResourceHeader) XXX_Size() int { - return m.Size() -} -func (m *ResourceHeader) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceHeader.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceHeader proto.InternalMessageInfo - -func (m *ResourceHeader) GetCollectionId() string { - if m != nil { - return m.CollectionId - } - return "" -} - -func (m *ResourceHeader) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *ResourceHeader) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ResourceHeader) GetResourceType() string { - if m != nil { - return m.ResourceType - } - return "" -} - -func (m *ResourceHeader) GetMediaType() string { - if m != nil { - return m.MediaType - } - return "" -} - -func (m *ResourceHeader) GetCreated() string { - if m != nil { - return m.Created - } - return "" -} - -func (m *ResourceHeader) GetChecksum() []byte { - if m != nil { - return m.Checksum - } - return nil -} - -func (m *ResourceHeader) GetPreviousVersionId() string { - if m != nil { - return m.PreviousVersionId - } - return "" -} - -func (m *ResourceHeader) GetNextVersionId() string { - if m != nil { - return m.NextVersionId - } - return "" -} - -func init() { - proto.RegisterType((*Resource)(nil), "cheqdid.cheqdnode.resource.v1.Resource") - proto.RegisterType((*ResourceHeader)(nil), "cheqdid.cheqdnode.resource.v1.ResourceHeader") -} - -func init() { proto.RegisterFile("cheqd/resource/v1/resource.proto", fileDescriptor_f9a40e43d3305340) } - -var fileDescriptor_f9a40e43d3305340 = []byte{ - // 353 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xc1, 0x4e, 0xea, 0x40, - 0x14, 0x86, 0x69, 0x2f, 0x17, 0xe8, 0x5c, 0xe0, 0xe6, 0xce, 0xdd, 0x34, 0x26, 0x34, 0x04, 0x13, - 0xc3, 0x86, 0x69, 0xd0, 0x37, 0x30, 0x31, 0x91, 0x6d, 0x63, 0x5c, 0xb8, 0x21, 0x65, 0xe6, 0xc4, - 0x4e, 0xa4, 0x9d, 0x3a, 0x9d, 0x36, 0xf0, 0x16, 0xbe, 0x87, 0x2f, 0xe2, 0x92, 0xa5, 0x4b, 0x03, - 0x2f, 0x62, 0x7a, 0x4a, 0x8b, 0x6e, 0xdc, 0xb4, 0xe7, 0xfc, 0xe7, 0xfb, 0xff, 0xf6, 0x64, 0x86, - 0x8c, 0x79, 0x04, 0xcf, 0xc2, 0xd7, 0x90, 0xa9, 0x5c, 0x73, 0xf0, 0x8b, 0x79, 0x53, 0xb3, 0x54, - 0x2b, 0xa3, 0xe8, 0x08, 0x09, 0x29, 0x18, 0xbe, 0x13, 0x25, 0x80, 0x35, 0x44, 0x31, 0x9f, 0x00, - 0xe9, 0x05, 0xc7, 0x96, 0xde, 0x90, 0x4e, 0x04, 0xa1, 0x00, 0xed, 0x5a, 0x63, 0x6b, 0xfa, 0xe7, - 0x72, 0xc6, 0x7e, 0xf4, 0xb2, 0xda, 0x78, 0x8b, 0xa6, 0xe0, 0x68, 0xa6, 0x94, 0xb4, 0x45, 0x68, - 0x42, 0xd7, 0x1e, 0x5b, 0xd3, 0x7e, 0x80, 0xf5, 0xe4, 0xd5, 0x26, 0xc3, 0xef, 0x38, 0x3d, 0x27, - 0x03, 0xae, 0xd6, 0x6b, 0xe0, 0x46, 0xaa, 0x64, 0x29, 0x05, 0x7e, 0xd4, 0x09, 0xfa, 0x27, 0x71, - 0x21, 0xe8, 0x90, 0xd8, 0x52, 0x60, 0x92, 0x13, 0xd8, 0x52, 0x94, 0xd9, 0x49, 0x18, 0x83, 0xfb, - 0x0b, 0x15, 0xac, 0xcb, 0xa0, 0xfa, 0xaf, 0x96, 0x66, 0x9b, 0x82, 0xdb, 0xae, 0x82, 0x6a, 0xf1, - 0x6e, 0x9b, 0x02, 0x1d, 0x11, 0x12, 0x83, 0x90, 0x61, 0x45, 0xfc, 0x46, 0xc2, 0x41, 0x05, 0xc7, - 0x2e, 0xe9, 0x72, 0x0d, 0xa1, 0x01, 0xe1, 0x76, 0x70, 0x56, 0xb7, 0xf4, 0x8c, 0xf4, 0x78, 0x04, - 0xfc, 0x29, 0xcb, 0x63, 0xb7, 0x8b, 0x1b, 0x35, 0x3d, 0x65, 0xe4, 0x7f, 0xaa, 0xa1, 0x90, 0x2a, - 0xcf, 0x96, 0x05, 0xe8, 0xec, 0xb8, 0x48, 0x0f, 0x13, 0xfe, 0xd5, 0xa3, 0xfb, 0x6a, 0xb2, 0x10, - 0xf4, 0x82, 0xfc, 0x4d, 0x60, 0x63, 0xbe, 0xb2, 0x0e, 0xb2, 0x83, 0x52, 0x6e, 0xb8, 0xeb, 0xc5, - 0xdb, 0xde, 0xb3, 0x76, 0x7b, 0xcf, 0xfa, 0xd8, 0x7b, 0xd6, 0xcb, 0xc1, 0x6b, 0xed, 0x0e, 0x5e, - 0xeb, 0xfd, 0xe0, 0xb5, 0x1e, 0xfc, 0x47, 0x69, 0xa2, 0x7c, 0xc5, 0xb8, 0x8a, 0xfd, 0xea, 0xe8, - 0xf1, 0x39, 0x2b, 0xcf, 0xc6, 0xdf, 0x9c, 0xee, 0x41, 0xb9, 0x65, 0xe6, 0x17, 0xf3, 0x55, 0x07, - 0x6f, 0xc1, 0xd5, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x6a, 0xa6, 0xe7, 0x29, 0x02, 0x00, - 0x00, -} - -func (m *Resource) 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 *Resource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Resource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintResource(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResource(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ResourceHeader) 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 *ResourceHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.NextVersionId) > 0 { - i -= len(m.NextVersionId) - copy(dAtA[i:], m.NextVersionId) - i = encodeVarintResource(dAtA, i, uint64(len(m.NextVersionId))) - i-- - dAtA[i] = 0x4a - } - if len(m.PreviousVersionId) > 0 { - i -= len(m.PreviousVersionId) - copy(dAtA[i:], m.PreviousVersionId) - i = encodeVarintResource(dAtA, i, uint64(len(m.PreviousVersionId))) - i-- - dAtA[i] = 0x42 - } - if len(m.Checksum) > 0 { - i -= len(m.Checksum) - copy(dAtA[i:], m.Checksum) - i = encodeVarintResource(dAtA, i, uint64(len(m.Checksum))) - i-- - dAtA[i] = 0x3a - } - if len(m.Created) > 0 { - i -= len(m.Created) - copy(dAtA[i:], m.Created) - i = encodeVarintResource(dAtA, i, uint64(len(m.Created))) - i-- - dAtA[i] = 0x32 - } - if len(m.MediaType) > 0 { - i -= len(m.MediaType) - copy(dAtA[i:], m.MediaType) - i = encodeVarintResource(dAtA, i, uint64(len(m.MediaType))) - i-- - dAtA[i] = 0x2a - } - if len(m.ResourceType) > 0 { - i -= len(m.ResourceType) - copy(dAtA[i:], m.ResourceType) - i = encodeVarintResource(dAtA, i, uint64(len(m.ResourceType))) - i-- - dAtA[i] = 0x22 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintResource(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintResource(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0x12 - } - if len(m.CollectionId) > 0 { - i -= len(m.CollectionId) - copy(dAtA[i:], m.CollectionId) - i = encodeVarintResource(dAtA, i, uint64(len(m.CollectionId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintResource(dAtA []byte, offset int, v uint64) int { - offset -= sovResource(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Resource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovResource(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovResource(uint64(l)) - } - return n -} - -func (m *ResourceHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CollectionId) - if l > 0 { - n += 1 + l + sovResource(uint64(l)) - } - l = len(m.Id) - if l > 0 { - n += 1 + l + sovResource(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovResource(uint64(l)) - } - l = len(m.ResourceType) - if l > 0 { - n += 1 + l + sovResource(uint64(l)) - } - l = len(m.MediaType) - if l > 0 { - n += 1 + l + sovResource(uint64(l)) - } - l = len(m.Created) - if l > 0 { - n += 1 + l + sovResource(uint64(l)) - } - l = len(m.Checksum) - if l > 0 { - n += 1 + l + sovResource(uint64(l)) - } - l = len(m.PreviousVersionId) - if l > 0 { - n += 1 + l + sovResource(uint64(l)) - } - l = len(m.NextVersionId) - if l > 0 { - n += 1 + l + sovResource(uint64(l)) - } - return n -} - -func sovResource(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozResource(x uint64) (n int) { - return sovResource(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Resource) 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 ErrIntOverflowResource - } - 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: Resource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResource - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResourceHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthResource - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResource(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResource - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceHeader) 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 ErrIntOverflowResource - } - 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: ResourceHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - 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 ErrInvalidLengthResource - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CollectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - 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 ErrInvalidLengthResource - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - 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 ErrInvalidLengthResource - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - 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 ErrInvalidLengthResource - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - 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 ErrInvalidLengthResource - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MediaType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - 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 ErrInvalidLengthResource - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Created = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Checksum", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthResource - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Checksum = append(m.Checksum[:0], dAtA[iNdEx:postIndex]...) - if m.Checksum == nil { - m.Checksum = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviousVersionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - 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 ErrInvalidLengthResource - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreviousVersionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextVersionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - 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 ErrInvalidLengthResource - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NextVersionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResource(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResource - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipResource(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResource - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResource - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResource - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthResource - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupResource - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthResource - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthResource = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowResource = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupResource = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/resource/types/v1/tx.pb.go b/x/resource/types/v1/tx.pb.go deleted file mode 100644 index cd8a062f7..000000000 --- a/x/resource/types/v1/tx.pb.go +++ /dev/null @@ -1,1042 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cheqd/resource/v1/tx.proto - -package v1 - -import ( - context "context" - fmt "fmt" - v1 "github.com/cheqd/cheqd-node/x/did/types/v1" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// this line is used by starport scaffolding # proto/tx/message -type MsgCreateResource struct { - Payload *MsgCreateResourcePayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` - Signatures []*v1.SignInfo `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"` -} - -func (m *MsgCreateResource) Reset() { *m = MsgCreateResource{} } -func (m *MsgCreateResource) String() string { return proto.CompactTextString(m) } -func (*MsgCreateResource) ProtoMessage() {} -func (*MsgCreateResource) Descriptor() ([]byte, []int) { - return fileDescriptor_af1802e11d6c2cd5, []int{0} -} -func (m *MsgCreateResource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateResource.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 *MsgCreateResource) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateResource.Merge(m, src) -} -func (m *MsgCreateResource) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateResource) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateResource.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateResource proto.InternalMessageInfo - -func (m *MsgCreateResource) GetPayload() *MsgCreateResourcePayload { - if m != nil { - return m.Payload - } - return nil -} - -func (m *MsgCreateResource) GetSignatures() []*v1.SignInfo { - if m != nil { - return m.Signatures - } - return nil -} - -type MsgCreateResourcePayload struct { - CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - ResourceType string `protobuf:"bytes,4,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *MsgCreateResourcePayload) Reset() { *m = MsgCreateResourcePayload{} } -func (m *MsgCreateResourcePayload) String() string { return proto.CompactTextString(m) } -func (*MsgCreateResourcePayload) ProtoMessage() {} -func (*MsgCreateResourcePayload) Descriptor() ([]byte, []int) { - return fileDescriptor_af1802e11d6c2cd5, []int{1} -} -func (m *MsgCreateResourcePayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateResourcePayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateResourcePayload.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 *MsgCreateResourcePayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateResourcePayload.Merge(m, src) -} -func (m *MsgCreateResourcePayload) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateResourcePayload) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateResourcePayload.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateResourcePayload proto.InternalMessageInfo - -func (m *MsgCreateResourcePayload) GetCollectionId() string { - if m != nil { - return m.CollectionId - } - return "" -} - -func (m *MsgCreateResourcePayload) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *MsgCreateResourcePayload) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *MsgCreateResourcePayload) GetResourceType() string { - if m != nil { - return m.ResourceType - } - return "" -} - -func (m *MsgCreateResourcePayload) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -type MsgCreateResourceResponse struct { - Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` -} - -func (m *MsgCreateResourceResponse) Reset() { *m = MsgCreateResourceResponse{} } -func (m *MsgCreateResourceResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCreateResourceResponse) ProtoMessage() {} -func (*MsgCreateResourceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_af1802e11d6c2cd5, []int{2} -} -func (m *MsgCreateResourceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateResourceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateResourceResponse.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 *MsgCreateResourceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateResourceResponse.Merge(m, src) -} -func (m *MsgCreateResourceResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateResourceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateResourceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateResourceResponse proto.InternalMessageInfo - -func (m *MsgCreateResourceResponse) GetResource() *Resource { - if m != nil { - return m.Resource - } - return nil -} - -func init() { - proto.RegisterType((*MsgCreateResource)(nil), "cheqdid.cheqdnode.resource.v1.MsgCreateResource") - proto.RegisterType((*MsgCreateResourcePayload)(nil), "cheqdid.cheqdnode.resource.v1.MsgCreateResourcePayload") - proto.RegisterType((*MsgCreateResourceResponse)(nil), "cheqdid.cheqdnode.resource.v1.MsgCreateResourceResponse") -} - -func init() { proto.RegisterFile("cheqd/resource/v1/tx.proto", fileDescriptor_af1802e11d6c2cd5) } - -var fileDescriptor_af1802e11d6c2cd5 = []byte{ - // 385 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcf, 0x4e, 0xc2, 0x30, - 0x18, 0xc0, 0xe9, 0x20, 0xa8, 0x05, 0x49, 0x6c, 0x62, 0x32, 0x97, 0xb8, 0x2c, 0x68, 0x22, 0x17, - 0x37, 0xc1, 0x83, 0x9e, 0xc5, 0x0b, 0x07, 0x12, 0x9d, 0x9e, 0xbc, 0xe0, 0x58, 0xeb, 0x68, 0x02, - 0xed, 0x5c, 0x0b, 0x81, 0xc4, 0x9b, 0x2f, 0xe0, 0x03, 0xf8, 0x08, 0x3e, 0x88, 0x47, 0x8e, 0x1e, - 0x0d, 0xbc, 0x88, 0x59, 0xc7, 0x80, 0x88, 0x7f, 0xc2, 0x65, 0xfb, 0xf2, 0x7d, 0xfd, 0xfd, 0xda, - 0x7e, 0xfd, 0xa0, 0xe1, 0x77, 0xc8, 0x23, 0x76, 0x22, 0x22, 0x78, 0x3f, 0xf2, 0x89, 0x33, 0xa8, - 0x3a, 0x72, 0x68, 0x87, 0x11, 0x97, 0x1c, 0xed, 0xab, 0x1a, 0xc5, 0xb6, 0xfa, 0x33, 0x8e, 0x89, - 0x9d, 0xae, 0xb3, 0x07, 0x55, 0x63, 0x37, 0x41, 0x31, 0xc5, 0xcb, 0x94, 0x61, 0xad, 0x1a, 0xe7, - 0x94, 0x5a, 0x51, 0x7e, 0x03, 0x70, 0xa7, 0x29, 0x82, 0x7a, 0x44, 0x3c, 0x49, 0xdc, 0x59, 0x0d, - 0x5d, 0xc3, 0x8d, 0xd0, 0x1b, 0x75, 0xb9, 0x87, 0x75, 0x60, 0x81, 0x4a, 0xa1, 0x76, 0x66, 0xff, - 0xb9, 0xbf, 0xbd, 0xa2, 0xb8, 0x4a, 0x70, 0x37, 0xf5, 0xa0, 0x4b, 0x08, 0x05, 0x0d, 0x98, 0x27, - 0xfb, 0x11, 0x11, 0xba, 0x66, 0x65, 0x2b, 0x85, 0xda, 0xe1, 0x0f, 0x56, 0x15, 0xc5, 0xca, 0x1b, - 0x1a, 0xb0, 0x06, 0x7b, 0xe0, 0xee, 0x12, 0x57, 0x7e, 0x05, 0x50, 0xff, 0x6d, 0x2f, 0x74, 0x00, - 0xb7, 0x7d, 0xde, 0xed, 0x12, 0x5f, 0x52, 0xce, 0x5a, 0x34, 0x39, 0xfb, 0x96, 0x5b, 0x5c, 0x24, - 0x1b, 0x18, 0x95, 0xa0, 0x46, 0xb1, 0xae, 0xa9, 0x8a, 0x46, 0x31, 0x42, 0x30, 0xc7, 0xbc, 0x1e, - 0xd1, 0xb3, 0x2a, 0xa3, 0xe2, 0x58, 0x94, 0x5e, 0xae, 0x25, 0x47, 0x21, 0xd1, 0x73, 0x89, 0x28, - 0x4d, 0xde, 0x8e, 0x42, 0x12, 0x83, 0xd8, 0x93, 0x9e, 0x9e, 0xb7, 0x40, 0xa5, 0xe8, 0xaa, 0xb8, - 0x7c, 0x0f, 0xf7, 0x56, 0x4e, 0xe7, 0x12, 0x11, 0x72, 0x26, 0x08, 0xaa, 0xc3, 0xcd, 0x54, 0x30, - 0xeb, 0xea, 0xd1, 0x3f, 0x5d, 0x9d, 0x2b, 0xe6, 0x60, 0xed, 0x19, 0xc0, 0x6c, 0x53, 0x04, 0xe8, - 0x09, 0x96, 0xbe, 0xbd, 0xd9, 0xc9, 0xba, 0x4f, 0x64, 0x9c, 0xaf, 0x4b, 0xa4, 0x57, 0xb9, 0x68, - 0xbc, 0x4f, 0x4c, 0x30, 0x9e, 0x98, 0xe0, 0x73, 0x62, 0x82, 0x97, 0xa9, 0x99, 0x19, 0x4f, 0xcd, - 0xcc, 0xc7, 0xd4, 0xcc, 0xdc, 0x39, 0x01, 0x95, 0x9d, 0x7e, 0xdb, 0xf6, 0x79, 0xcf, 0x49, 0x86, - 0x4f, 0x7d, 0x8f, 0x63, 0xb9, 0x33, 0x5c, 0x4c, 0x62, 0xdc, 0x56, 0xe1, 0x0c, 0xaa, 0xed, 0xbc, - 0x9a, 0xc3, 0xd3, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcd, 0xea, 0xaa, 0xd0, 0xfd, 0x02, 0x00, - 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - CreateResource(ctx context.Context, in *MsgCreateResource, opts ...grpc.CallOption) (*MsgCreateResourceResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) CreateResource(ctx context.Context, in *MsgCreateResource, opts ...grpc.CallOption) (*MsgCreateResourceResponse, error) { - out := new(MsgCreateResourceResponse) - err := c.cc.Invoke(ctx, "/cheqdid.cheqdnode.resource.v1.Msg/CreateResource", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - CreateResource(context.Context, *MsgCreateResource) (*MsgCreateResourceResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) CreateResource(ctx context.Context, req *MsgCreateResource) (*MsgCreateResourceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateResource not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_CreateResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateResource) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateResource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cheqdid.cheqdnode.resource.v1.Msg/CreateResource", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateResource(ctx, req.(*MsgCreateResource)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cheqdid.cheqdnode.resource.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateResource", - Handler: _Msg_CreateResource_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cheqd/resource/v1/tx.proto", -} - -func (m *MsgCreateResource) 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 *MsgCreateResource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateResource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Payload != nil { - { - size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateResourcePayload) 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 *MsgCreateResourcePayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateResourcePayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x32 - } - if len(m.ResourceType) > 0 { - i -= len(m.ResourceType) - copy(dAtA[i:], m.ResourceType) - i = encodeVarintTx(dAtA, i, uint64(len(m.ResourceType))) - i-- - dAtA[i] = 0x22 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTx(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0x12 - } - if len(m.CollectionId) > 0 { - i -= len(m.CollectionId) - copy(dAtA[i:], m.CollectionId) - i = encodeVarintTx(dAtA, i, uint64(len(m.CollectionId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateResourceResponse) 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 *MsgCreateResourceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateResourceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Resource != nil { - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgCreateResource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Payload != nil { - l = m.Payload.Size() - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Signatures) > 0 { - for _, e := range m.Signatures { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgCreateResourcePayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CollectionId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ResourceType) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgCreateResourceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Resource != nil { - l = m.Resource.Size() - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgCreateResource) 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 ErrIntOverflowTx - } - 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: MsgCreateResource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateResource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Payload == nil { - m.Payload = &MsgCreateResourcePayload{} - } - if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signatures = append(m.Signatures, &v1.SignInfo{}) - if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateResourcePayload) 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 ErrIntOverflowTx - } - 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: MsgCreateResourcePayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateResourcePayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CollectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateResourceResponse) 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 ErrIntOverflowTx - } - 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: MsgCreateResourceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateResourceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Resource == nil { - m.Resource = &Resource{} - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTx(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") -) From 8570df6db575d60445ec8ec15da78c2b5bd88418 Mon Sep 17 00:00:00 2001 From: atheesh Date: Fri, 9 Feb 2024 10:30:05 +0530 Subject: [PATCH 02/15] clean --- make/proto.mk | 4 +--- scripts/protocgen.sh | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/make/proto.mk b/make/proto.mk index 0fdd5c793..b1e3596a0 100644 --- a/make/proto.mk +++ b/make/proto.mk @@ -5,7 +5,7 @@ ############################################################################### DOCKER := $(shell which docker) -containerProtoVer=0.13.0 +containerProtoVer=0.14.0 containerProtoImage=ghcr.io/cosmos/proto-builder:$(containerProtoVer) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) # containerProtoGen=cheqd-node-proto-gen-$(containerProtoVer) @@ -19,7 +19,6 @@ proto-gen: @echo "Generating Protobuf files" @echo $(protoImage) sh ./scripts/protocgen.sh; @$(protoImage) sh ./scripts/protocgen.sh; - # go mod tidy proto-format: @echo "Formatting Protobuf files" @@ -31,7 +30,6 @@ proto-lint: proto-swagger-gen: @echo "Generating Protobuf Swagger" @$(protoImage) sh ./scripts/protoc-swagger-gen.sh; - # go mod tidy proto-pulsar-gen: @echo "Generating Pulsar" diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 5d915f606..8ff44efee 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -1,15 +1,13 @@ -#!/bin/bash +#!/usr/bin/env bash set -euox pipefail # Get protoc-gen-gocosmos -go get github.com/cosmos/gogoproto -# 2>/dev/null +go get github.com/cosmos/gogoproto 2>/dev/null echo "Generating gogo proto code" cd proto -echo "coming here" # Find all proto files but exclude "v1" paths proto_dirs=$(find ./ -type f -path '*/v1/*' -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for proto_dir in $proto_dirs; do From 6c53579ee5e08cf48525631988f90c98ef32722d Mon Sep 17 00:00:00 2001 From: atheesh Date: Fri, 9 Feb 2024 10:57:34 +0530 Subject: [PATCH 03/15] fix proto-gen --- make/proto.mk | 3 +++ scripts/protoc-pulsar-gen.sh | 4 +--- scripts/protocgen.sh | 10 ++-------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/make/proto.mk b/make/proto.mk index b1e3596a0..cd82172c8 100644 --- a/make/proto.mk +++ b/make/proto.mk @@ -19,6 +19,9 @@ proto-gen: @echo "Generating Protobuf files" @echo $(protoImage) sh ./scripts/protocgen.sh; @$(protoImage) sh ./scripts/protocgen.sh; + go mod tidy + cd api + go mod tidy proto-format: @echo "Formatting Protobuf files" diff --git a/scripts/protoc-pulsar-gen.sh b/scripts/protoc-pulsar-gen.sh index d01147459..197dd4e07 100755 --- a/scripts/protoc-pulsar-gen.sh +++ b/scripts/protoc-pulsar-gen.sh @@ -1,8 +1,6 @@ -#!/bin/bash -# # this script is for generating protobuf files for the new google.golang.org/protobuf API -set -euox pipefail +set -eo pipefail protoc_gen_install() { go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest #2>/dev/null diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 8ff44efee..31cbacccd 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -euox pipefail +set -e # Get protoc-gen-gocosmos go get github.com/cosmos/gogoproto 2>/dev/null @@ -25,10 +25,4 @@ cd .. cp -r github.com/cheqd/cheqd-node/* ./ rm -rf github.com -go mod tidy - -sh ./scripts/protoc-pulsar-gen.sh - -# go mod tidy in API folder -cd api -go mod tidy +./scripts/protoc-pulsar-gen.sh From 02bced916076c93e9d5584b6c40080eb1e17d828 Mon Sep 17 00:00:00 2001 From: atheesh Date: Fri, 9 Feb 2024 11:35:33 +0530 Subject: [PATCH 04/15] fix build --- Makefile | 2 +- app/app.go | 3 +++ cmd/cheqd-noded/cmd/init_extensions.go | 1 - cmd/cheqd-noded/cmd/root.go | 35 ++++++++++++++++++-------- go.mod | 2 +- go.work | 2 -- x/did/types/diddoc.pb.go | 2 +- x/resource/types/resource.pb.go | 2 +- 8 files changed, 31 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 84140ca16..4dc09b759 100644 --- a/Makefile +++ b/Makefile @@ -173,7 +173,7 @@ go-version: go.sum: go.mod @echo "Ensuring app dependencies have not been modified..." - go mod verify + # go mod verify // TODO: revisit go mod tidy verify: diff --git a/app/app.go b/app/app.go index 95a24ceb0..45417b1cd 100644 --- a/app/app.go +++ b/app/app.go @@ -1150,3 +1150,6 @@ func BlockedAddresses() map[string]bool { return modAccAddrs } + +func (app *App) RegisterUpgradeHandlers() { +} diff --git a/cmd/cheqd-noded/cmd/init_extensions.go b/cmd/cheqd-noded/cmd/init_extensions.go index 0c8976e34..8b98d6eb5 100644 --- a/cmd/cheqd-noded/cmd/init_extensions.go +++ b/cmd/cheqd-noded/cmd/init_extensions.go @@ -32,7 +32,6 @@ func applyConfigDefaults(cmd *cobra.Command) error { err := updateTmConfig(clientCtx.HomeDir, func(config *tmcfg.Config) { config.Consensus.CreateEmptyBlocks = false - config.FastSync.Version = "v0" config.LogFormat = "json" config.LogLevel = "error" config.P2P.SendRate = 20000000 diff --git a/cmd/cheqd-noded/cmd/root.go b/cmd/cheqd-noded/cmd/root.go index f81eb3e1c..94948d455 100644 --- a/cmd/cheqd-noded/cmd/root.go +++ b/cmd/cheqd-noded/cmd/root.go @@ -28,7 +28,6 @@ import ( authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/auth/types" vestingcli "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" "github.com/spf13/cast" @@ -53,8 +52,8 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). - WithBroadcastMode(flags.BroadcastBlock). - WithHomeDir(app.DefaultNodeHome) + WithHomeDir(app.DefaultNodeHome). + WithViper("") rootCmd := &cobra.Command{ Use: app.Name + "d", @@ -89,27 +88,35 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { rootCmd.AddCommand( extendInit(genutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome)), - genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome), - genutilcli.MigrateGenesisCmd(), - genutilcli.GenTxCmd(app.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome), - genutilcli.ValidateGenesisCmd(app.ModuleBasics), AddGenesisAccountCmd(app.DefaultNodeHome), tmcli.NewCompletionCmd(rootCmd, true), extendDebug(debug.Cmd()), ) a := appCreator{encodingConfig} - server.AddCommands(rootCmd, app.DefaultNodeHome, a.newApp, a.appExport, addModuleInitFlags) + server.AddCommands(rootCmd, app.DefaultNodeHome, a.newApp, appExport, addModuleInitFlags) // add keybase, auxiliary RPC, query, and tx child commands rootCmd.AddCommand( rpc.StatusCommand(), + genesisCommand(encodingConfig), queryCommand(), txCommand(), keys.Commands(app.DefaultNodeHome), ) } +// genesisCommand builds genesis-related `universus genesis` command. +// Users may provide application specific commands as a parameter +func genesisCommand(encodingConfig params.EncodingConfig, cmds ...*cobra.Command) *cobra.Command { + cmd := genutilcli.GenesisCoreCommand(encodingConfig.TxConfig, app.ModuleBasics, app.DefaultNodeHome) + + for _, sub_cmd := range cmds { + cmd.AddCommand(sub_cmd) + } + return cmd +} + func addModuleInitFlags(startCmd *cobra.Command) { crisis.AddModuleInitFlags(startCmd) // this line is used by starport scaffolding # stargate/root/initFlags @@ -225,9 +232,15 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a } // appExport creates a new simapp (optionally at a given height) -func (a appCreator) appExport( - logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, +func appExport( + logger log.Logger, + db dbm.DB, + traceStore io.Writer, + height int64, + forZeroHeight bool, + jailAllowedAddrs []string, appOpts servertypes.AppOptions, + modulesToExport []string, ) (servertypes.ExportedApp, error) { var anApp *app.App @@ -268,7 +281,7 @@ func (a appCreator) appExport( ) } - return anApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs) + return anApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) } func overwriteFlagDefaults(c *cobra.Command, defaults map[string]string) { diff --git a/go.mod b/go.mod index bd22f16da..2ddcfc2b7 100644 --- a/go.mod +++ b/go.mod @@ -32,6 +32,7 @@ require ( github.com/stretchr/testify v1.8.4 google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 google.golang.org/grpc v1.60.1 + google.golang.org/protobuf v1.32.0 ) require ( @@ -189,7 +190,6 @@ require ( google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect - google.golang.org/protobuf v1.32.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.work b/go.work index e8997dc7c..f3b787735 100644 --- a/go.work +++ b/go.work @@ -1,7 +1,5 @@ go 1.21 -toolchain go1.21.0 - use ( . ./api diff --git a/x/did/types/diddoc.pb.go b/x/did/types/diddoc.pb.go index 39c07ebce..4c0040da7 100644 --- a/x/did/types/diddoc.pb.go +++ b/x/did/types/diddoc.pb.go @@ -7,8 +7,8 @@ import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - _ "github.com/cosmos/gogoproto/types" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" diff --git a/x/resource/types/resource.pb.go b/x/resource/types/resource.pb.go index b782c3a71..834962316 100644 --- a/x/resource/types/resource.pb.go +++ b/x/resource/types/resource.pb.go @@ -7,8 +7,8 @@ import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - _ "github.com/cosmos/gogoproto/types" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" From 72ac05eca2fe34432c446bedaa9328e83693e850 Mon Sep 17 00:00:00 2001 From: atheesh Date: Fri, 9 Feb 2024 15:07:10 +0530 Subject: [PATCH 05/15] fix build --- api/go.mod | 16 ++++++------ api/go.sum | 29 +++++++++++++++------ go.mod | 13 +++------- go.sum | 75 +++++++++++++++++++++++++++++++++-------------------- go.work.sum | 55 ++++----------------------------------- 5 files changed, 85 insertions(+), 103 deletions(-) diff --git a/api/go.mod b/api/go.mod index bb7328252..a020afd80 100644 --- a/api/go.mod +++ b/api/go.mod @@ -5,7 +5,7 @@ go 1.21 require ( github.com/cosmos/cosmos-proto v1.0.0-beta.2 github.com/cosmos/cosmos-sdk/api v0.1.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.10 google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 google.golang.org/grpc v1.60.1 google.golang.org/protobuf v1.32.0 @@ -14,11 +14,11 @@ require ( require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-cmp v0.6.0 // indirect - golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect + github.com/google/go-cmp v0.5.9 // indirect + golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect + google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231211222908-989df2bf70f3 // indirect ) diff --git a/api/go.sum b/api/go.sum index 4c53038ca..14bba0612 100644 --- a/api/go.sum +++ b/api/go.sum @@ -1,13 +1,17 @@ github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= +github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= github.com/cosmos/cosmos-sdk/api v0.1.0 h1:xfSKM0e9p+EJTMQnf5PbWE6VT8ruxTABIJ64Rd064dE= github.com/cosmos/cosmos-sdk/api v0.1.0/go.mod h1:CupqQBskAOiTXO1XDZ/wrtWzN/wTxUvbQmOqdUhR8wI= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= +github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= +github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -15,24 +19,28 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= +golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 h1:BEABXpNXLEz0WxtA+6CQIz2xkg80e+1zrhWyMcq8VzE= +golang.org/x/exp v0.0.0-20230131160201-f062dba9d201/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -41,10 +49,15 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 h1:nz5NESFLZbJGPFxDT/HCn+V1mZ8JGNoY4nUpmW/Y2eg= +google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 h1:1hfbdAfFbkmpg41000wDVqr7jUpK/Yo+LPnIxxGzmkg= +google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic= google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 h1:s1w3X6gQxwrLEpxnLd/qXTVLgQE2yXwaOaoa6IlY/+o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 h1:gphdwh0npgs8elJ4T6J+DQJHPVF7RsuJHCfwztUb4J4= +google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0/go.mod h1:CAny0tYF+0/9rmDB9fahA9YLzX3+AEVl1qXbv5hhj6c= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231211222908-989df2bf70f3 h1:kzJAXnzZoFbe5bhZd4zjUuHos/I31yH4thfMb/13oVY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231211222908-989df2bf70f3/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= +google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= diff --git a/go.mod b/go.mod index 2ddcfc2b7..07a76cd67 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/cometbft/cometbft-db v0.8.0 github.com/cosmos/cosmos-proto v1.0.0-beta.2 github.com/cosmos/cosmos-sdk v0.47.8 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-go/v7 v7.3.2 github.com/gabriel-vasile/mimetype v1.4.2 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 @@ -155,7 +155,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect @@ -178,7 +178,7 @@ require ( go.opentelemetry.io/otel/metric v1.19.0 // indirect go.opentelemetry.io/otel/trace v1.19.0 // indirect golang.org/x/crypto v0.16.0 // indirect - golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/oauth2 v0.13.0 // indirect golang.org/x/sync v0.4.0 // indirect @@ -211,11 +211,6 @@ replace ( // Fix upstream GHSA-h395-qcrw-5vmq vulnerability. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 - github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 + github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 - // From Cosmos SDK v0.46.8 upstream - // github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - - // From Cosmos SDK v0.46.8 upstream - github.com/jhump/protoreflect => github.com/jhump/protoreflect v1.9.0 ) diff --git a/go.sum b/go.sum index 8b15131b0..997488a1c 100644 --- a/go.sum +++ b/go.sum @@ -265,6 +265,11 @@ github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJ github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= +github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -278,6 +283,9 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= @@ -338,8 +346,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= +github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= github.com/cosmos/ibc-go/v7 v7.3.2 h1:FeUDcBX7VYY0e0iRmcVkPPUjYfAqIc//QuHXo8JHz9c= @@ -425,8 +433,8 @@ github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= -github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= +github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8= +github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -451,16 +459,13 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es= github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= -github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= +github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= @@ -472,6 +477,7 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= @@ -688,8 +694,8 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jhump/protoreflect v1.9.0 h1:npqHz788dryJiR/l6K/RUQAyh2SwV91+d1dnh4RjO9w= -github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -721,18 +727,21 @@ github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8 github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lestrrat-go/backoff/v2 v2.0.8 h1:oNb5E5isby2kiro9AgdHLv5N5tint1AnDVVf2E2un5A= @@ -767,8 +776,8 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= @@ -870,6 +879,7 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= @@ -904,8 +914,8 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1: github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= @@ -930,6 +940,8 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqn github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= @@ -1012,12 +1024,11 @@ github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU= +github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -1067,6 +1078,8 @@ go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1081,6 +1094,7 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= @@ -1095,8 +1109,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= -golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1187,7 +1201,9 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= @@ -1266,7 +1282,6 @@ golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1330,6 +1345,7 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1339,6 +1355,7 @@ golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= @@ -1354,6 +1371,7 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -1721,6 +1739,7 @@ nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0 pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/go.work.sum b/go.work.sum index 83944d09e..f15b8b6d7 100644 --- a/go.work.sum +++ b/go.work.sum @@ -695,7 +695,6 @@ github.com/Azure/azure-service-bus-go v0.9.1/go.mod h1:yzBx6/BUGfjfeqbRZny9AQIbI github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v10.15.5+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= @@ -778,7 +777,6 @@ github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JP github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= @@ -797,7 +795,6 @@ github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5 github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/OpenPeeDeeP/depguard v1.1.1 h1:TSUznLjvp/4IUP+OQ0t/4jF4QUyxIcVX8YnghZdunyA= github.com/OpenPeeDeeP/depguard v1.1.1/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= @@ -813,7 +810,6 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIO github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6 h1:1d9pzdbkth4D9AX6ndKSl7of3UTV0RYl3z64U2dXMGo= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= @@ -935,8 +931,6 @@ github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJ github.com/btcsuite/btcd/btcec/v2 v2.2.1/go.mod h1:9/CSmJxmuvqzX9Wh2fXMWToLOHhPd11lSPuIupwTkI8= github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= -github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/goleveldb v1.0.0 h1:Tvd0BfvqX9o823q1j2UZ/epQo09eJh6dTcRp79ilIN4= @@ -949,7 +943,6 @@ github.com/bufbuild/connect-go v1.0.0 h1:htSflKUT8y1jxhoPhPYTZMrsY3ipUXjjrbcZR5O github.com/bufbuild/connect-go v1.0.0/go.mod h1:9iNvh/NOsfhNBUH5CtvXeVUskQO1xsrEviH7ZArwZ3I= github.com/bufbuild/protocompile v0.1.0 h1:HjgJBI85hY/qmW5tw/66sNDZ7z0UDdVSi/5r40WHw4s= github.com/bufbuild/protocompile v0.1.0/go.mod h1:ix/MMMdsT3fzxfw91dvbfzKW3fRRnuPCP47kpAm5m/4= -github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= @@ -1070,7 +1063,6 @@ github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EX github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/continuity v0.2.2/go.mod h1:pWygW9u7LtS1o4N/Tn0FoCFDIXZ7rxcMX7HX1Dmibvk= github.com/containerd/continuity v0.2.3-0.20220330195504-d132b287edc8/go.mod h1:pWygW9u7LtS1o4N/Tn0FoCFDIXZ7rxcMX7HX1Dmibvk= -github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= @@ -1227,14 +1219,12 @@ github.com/docker/docker v20.10.19+incompatible h1:lzEmjivyNHFHMNAFLXORMBXyGIhw/ github.com/docker/docker v20.10.19+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libnetwork v0.8.0-dev.2.0.20200917202933-d0951081b35f/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= @@ -1289,13 +1279,11 @@ github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzP github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw= github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= -github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= @@ -1318,7 +1306,6 @@ github.com/go-critic/go-critic v0.4.1/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E github.com/go-critic/go-critic v0.4.3/go.mod h1:j4O3D4RoIwRqlZw5jJpx0BNfXWWbpcJoKu5cYSe4YmQ= github.com/go-critic/go-critic v0.6.5 h1:fDaR/5GWURljXwF8Eh31T2GZNz9X4jeboS912mWF8Uo= github.com/go-critic/go-critic v0.6.5/go.mod h1:ezfP/Lh7MA6dBNn4c6ab5ALv3sKnZVLx37tr00uuaOY= -github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= @@ -1362,9 +1349,6 @@ github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/ github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= -github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= @@ -1480,9 +1464,7 @@ github.com/google/go-replayers/grpcreplay v0.1.0/go.mod h1:8Ig2Idjpr6gifRd6pNVgg github.com/google/go-replayers/httpreplay v0.1.0/go.mod h1:YKZViNhiGgqdBlUbI2MwGpq4pXxNmhJLPHQ7cv2b5no= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/rpmpack v0.0.0-20191226140753-aa36bfddb3a0/go.mod h1:RaTPr0KUf2K7fnZYLNDrr8rxAamWs3iNywJLtQ2AzBg= @@ -1667,7 +1649,6 @@ github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGAR github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a/go.mod h1:xRskid8CManxVta/ALEhJha/pweKBaVG6fWgc0yH25s= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= @@ -1691,7 +1672,6 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jsternberg/zap-logfmt v1.0.0 h1:0Dz2s/eturmdUS34GM82JwNEdQ9hPoJgqptcEKcbpzY= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= @@ -1722,7 +1702,6 @@ github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47e github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5 h1:2U0HzY8BJ8hVwDKIzp7y4voR9CX/nvcfymLmg2UiOio= github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6 h1:KAZ1BW2TCmT6PRihDPpocIy1QTtsAsrx6TneU/4+CMg= github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= @@ -1731,7 +1710,6 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJ github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= @@ -1751,7 +1729,6 @@ github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdB github.com/ldez/tagliatelle v0.3.1 h1:3BqVVlReVUZwafJUwQ+oxbx2BEX2vUG4Yu/NOfMiKiM= github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leonklingele/grouper v1.1.0 h1:tC2y/ygPbMFSBOs3DcyaEMKnnwH7eYKzohOtRrf0SAg= github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= @@ -1801,7 +1778,6 @@ github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= @@ -1872,7 +1848,6 @@ github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6U github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5 h1:8Q0qkMVC/MmWkpIdlvZgcv2o2jrlF6zqVOh7W5YHdMA= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/moricho/tparallel v0.2.1 h1:95FytivzT6rYzdJLdtfn6m1bfFJylOJK41+lgv/EHf4= @@ -1929,6 +1904,7 @@ github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNs github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/ginkgo/v2 v2.5.1/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= github.com/onsi/ginkgo/v2 v2.9.7/go.mod h1:cxrmXWykAwTwhQsJOPfdIDiJ+l2RYq7U8hFU+M/1uw0= @@ -1937,13 +1913,11 @@ github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1 github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= @@ -1956,7 +1930,6 @@ github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04s github.com/opencontainers/runc v1.1.0/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= github.com/opencontainers/runc v1.1.1/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= -github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runc v1.1.4/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= @@ -1981,7 +1954,6 @@ github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTm github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.2.5 h1:UwtQQx2pyPIgWYHRg+epgdx1/HnBQTgN3/oIYEJTQzU= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= -github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= @@ -2001,7 +1973,6 @@ github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCko github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/performancecopilot/speed v3.0.0+incompatible h1:2WnRzIquHa5QxaJKShDkLM+sc0JPuwhXzK8OYOyt3Vg= github.com/performancecopilot/speed/v4 v4.0.0 h1:VxEDCmdkfbQYDlcr/GC9YoN9PQ6p8ulk9xVsepYy9ZY= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= @@ -2015,7 +1986,6 @@ github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2 github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pjbgf/sha1cd v0.2.3/go.mod h1:HOK9QrgzdHpbc2Kzip0Q1yi3M2MFGPADtR6HjG65m5M= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= @@ -2040,6 +2010,8 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -2080,7 +2052,6 @@ github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeC github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= @@ -2149,7 +2120,6 @@ github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvH github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sivchari/containedctx v1.0.2 h1:0hLQKpgC53OVF1VT7CeoFHk9YKstur1XOgfYIc1yrHI= github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt95do8= @@ -2268,7 +2238,6 @@ github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9 github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.7/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -2393,7 +2362,6 @@ go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs= go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= -go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= @@ -2454,10 +2422,8 @@ golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -2466,6 +2432,8 @@ golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2F golang.org/x/exp v0.0.0-20221205204356-47842c84f3db/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0 h1:LGJsf5LRplCck6jUCH3dBL2dmycNruWNF5xugkSlfXw= golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= @@ -2485,12 +2453,10 @@ golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2523,12 +2489,10 @@ golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193/go.mod h1:RpDiru2p0u2F0lLpEo golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -2609,10 +2573,8 @@ golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2620,14 +2582,11 @@ golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220919170432-7a66f970e087/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2762,7 +2721,6 @@ google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mR google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= @@ -2775,7 +2733,6 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231211222908-989df2bf70f3/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= @@ -2802,7 +2759,6 @@ google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= @@ -2826,7 +2782,6 @@ gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= From c3ac1bb1bfa59bc085542c4a70404e224eb07044 Mon Sep 17 00:00:00 2001 From: atheesh Date: Fri, 9 Feb 2024 15:09:44 +0530 Subject: [PATCH 06/15] fix build --- Makefile | 2 +- api/go.mod | 14 +++++++------- api/go.sum | 28 ++++++++++++++-------------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 4dc09b759..84140ca16 100644 --- a/Makefile +++ b/Makefile @@ -173,7 +173,7 @@ go-version: go.sum: go.mod @echo "Ensuring app dependencies have not been modified..." - # go mod verify // TODO: revisit + go mod verify go mod tidy verify: diff --git a/api/go.mod b/api/go.mod index a020afd80..b2c402339 100644 --- a/api/go.mod +++ b/api/go.mod @@ -14,11 +14,11 @@ require ( require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-cmp v0.5.9 // indirect - golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231211222908-989df2bf70f3 // indirect + github.com/google/go-cmp v0.6.0 // indirect + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect ) diff --git a/api/go.sum b/api/go.sum index 14bba0612..774440992 100644 --- a/api/go.sum +++ b/api/go.sum @@ -10,8 +10,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -19,28 +19,28 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 h1:BEABXpNXLEz0WxtA+6CQIz2xkg80e+1zrhWyMcq8VzE= -golang.org/x/exp v0.0.0-20230131160201-f062dba9d201/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -49,12 +49,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 h1:1hfbdAfFbkmpg41000wDVqr7jUpK/Yo+LPnIxxGzmkg= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic= +google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 h1:nz5NESFLZbJGPFxDT/HCn+V1mZ8JGNoY4nUpmW/Y2eg= +google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917/go.mod h1:pZqR+glSb11aJ+JQcczCvgf47+duRuzNSKqE8YAQnV0= google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 h1:s1w3X6gQxwrLEpxnLd/qXTVLgQE2yXwaOaoa6IlY/+o= google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0/go.mod h1:CAny0tYF+0/9rmDB9fahA9YLzX3+AEVl1qXbv5hhj6c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231211222908-989df2bf70f3 h1:kzJAXnzZoFbe5bhZd4zjUuHos/I31yH4thfMb/13oVY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231211222908-989df2bf70f3/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 h1:gphdwh0npgs8elJ4T6J+DQJHPVF7RsuJHCfwztUb4J4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= From 35abe7c168a4c9531671a8f3387751cccb871a3f Mon Sep 17 00:00:00 2001 From: atheesh Date: Fri, 9 Feb 2024 15:44:05 +0530 Subject: [PATCH 07/15] fix makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4dc09b759..e0011262e 100644 --- a/Makefile +++ b/Makefile @@ -173,7 +173,7 @@ go-version: go.sum: go.mod @echo "Ensuring app dependencies have not been modified..." - # go mod verify // TODO: revisit + go mod verify go mod tidy verify: From faa75d802d0b7aeb83f3caa03651fcbbb1aeffdb Mon Sep 17 00:00:00 2001 From: atheesh Date: Mon, 12 Feb 2024 15:57:31 +0530 Subject: [PATCH 08/15] fix chain --- app/app.go | 10 ++--- cmd/cheqd-noded/cmd/root.go | 77 +++++++++++++++---------------------- go.mod | 2 + go.sum | 21 ++++------ go.work.sum | 36 ++--------------- 5 files changed, 47 insertions(+), 99 deletions(-) diff --git a/app/app.go b/app/app.go index 45417b1cd..ad6213342 100644 --- a/app/app.go +++ b/app/app.go @@ -135,7 +135,7 @@ var ( // and genesis verification. ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, - genutil.AppModuleBasic{}, + genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, @@ -377,7 +377,7 @@ func New( app.AccountKeeper, ) - stakingKeeper := stakingkeeper.NewKeeper( + app.StakingKeeper = stakingkeeper.NewKeeper( appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, @@ -388,7 +388,7 @@ func New( app.MintKeeper = mintkeeper.NewKeeper( appCodec, keys[minttypes.StoreKey], - stakingKeeper, + app.StakingKeeper, app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, @@ -400,7 +400,7 @@ func New( keys[distrtypes.StoreKey], app.AccountKeeper, app.BankKeeper, - stakingKeeper, + app.StakingKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) @@ -409,7 +409,7 @@ func New( appCodec, legacyAmino, keys[slashingtypes.StoreKey], - stakingKeeper, + app.StakingKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) diff --git a/cmd/cheqd-noded/cmd/root.go b/cmd/cheqd-noded/cmd/root.go index 94948d455..4633349c9 100644 --- a/cmd/cheqd-noded/cmd/root.go +++ b/cmd/cheqd-noded/cmd/root.go @@ -4,7 +4,6 @@ import ( "errors" "io" "os" - "path/filepath" "github.com/cheqd/cheqd-node/app" "github.com/cheqd/cheqd-node/app/params" @@ -12,7 +11,6 @@ import ( tmconfig "github.com/cometbft/cometbft/config" tmcli "github.com/cometbft/cometbft/libs/cli" "github.com/cometbft/cometbft/libs/log" - "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/debug" "github.com/cosmos/cosmos-sdk/client/flags" @@ -21,16 +19,12 @@ import ( "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/snapshots" - snapshotstypes "github.com/cosmos/cosmos-sdk/snapshots/types" - "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/auth/types" vestingcli "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli" "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" - "github.com/spf13/cast" "github.com/spf13/cobra" "github.com/spf13/pflag" ) @@ -183,51 +177,40 @@ type appCreator struct { // newApp is an AppCreator func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { - var cache sdk.MultiStorePersistentCache - - if cast.ToBool(appOpts.Get(server.FlagInterBlockCache)) { - cache = store.NewCommitKVStoreCacheManager() - } - - skipUpgradeHeights := make(map[int64]bool) - for _, h := range cast.ToIntSlice(appOpts.Get(server.FlagUnsafeSkipUpgrades)) { - skipUpgradeHeights[int64(h)] = true - } - - pruningOpts, err := server.GetPruningOptionsFromFlags(appOpts) - if err != nil { - panic(err) - } - - snapshotDir := filepath.Join(cast.ToString(appOpts.Get(flags.FlagHome)), "data", "snapshots") - snapshotDB, err := dbm.NewDB("metadata", server.GetAppDBBackend(appOpts), snapshotDir) - if err != nil { - panic(err) - } - snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir) - if err != nil { - panic(err) - } - snapshotInterval := cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval)) - snapshotKeepRecent := cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent)) - snapshotOptions := snapshotstypes.NewSnapshotOptions(snapshotInterval, snapshotKeepRecent) + // var cache sdk.MultiStorePersistentCache + + // if cast.ToBool(appOpts.Get(server.FlagInterBlockCache)) { + // cache = store.NewCommitKVStoreCacheManager() + // } + + // skipUpgradeHeights := make(map[int64]bool) + // for _, h := range cast.ToIntSlice(appOpts.Get(server.FlagUnsafeSkipUpgrades)) { + // skipUpgradeHeights[int64(h)] = true + // } + + // pruningOpts, err := server.GetPruningOptionsFromFlags(appOpts) + // if err != nil { + // panic(err) + // } + + // snapshotDir := filepath.Join(cast.ToString(appOpts.Get(flags.FlagHome)), "data", "snapshots") + // snapshotDB, err := dbm.NewDB("metadata", server.GetAppDBBackend(appOpts), snapshotDir) + // if err != nil { + // panic(err) + // } + // snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir) + // if err != nil { + // panic(err) + // } + // snapshotInterval := cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval)) + // snapshotKeepRecent := cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent)) + // snapshotOptions := snapshotstypes.NewSnapshotOptions(snapshotInterval, snapshotKeepRecent) + // _, _, _, _ = snapshotStore, pruningOpts, snapshotOptions, cache return app.New( logger, db, traceStore, true, - // skipUpgradeHeights, - // cast.ToString(appOpts.Get(flags.FlagHome)), - // cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), - // a.encCfg, appOpts, - baseapp.SetPruning(pruningOpts), - baseapp.SetMinGasPrices(cast.ToString(appOpts.Get(server.FlagMinGasPrices))), - baseapp.SetMinRetainBlocks(cast.ToUint64(appOpts.Get(server.FlagMinRetainBlocks))), - baseapp.SetHaltHeight(cast.ToUint64(appOpts.Get(server.FlagHaltHeight))), - baseapp.SetHaltTime(cast.ToUint64(appOpts.Get(server.FlagHaltTime))), - baseapp.SetInterBlockCache(cache), - baseapp.SetTrace(cast.ToBool(appOpts.Get(server.FlagTrace))), - baseapp.SetIndexEvents(cast.ToStringSlice(appOpts.Get(server.FlagIndexEvents))), - baseapp.SetSnapshot(snapshotStore, snapshotOptions), + server.DefaultBaseappOptions(appOpts)..., ) } diff --git a/go.mod b/go.mod index 07a76cd67..ad26bf14c 100644 --- a/go.mod +++ b/go.mod @@ -213,4 +213,6 @@ replace ( // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 + // replace broken goleveldb + github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/go.sum b/go.sum index 997488a1c..ea0af4b26 100644 --- a/go.sum +++ b/go.sum @@ -423,7 +423,6 @@ github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0X github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= @@ -468,7 +467,6 @@ github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyh github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= @@ -583,7 +581,6 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= @@ -843,17 +840,14 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.28.0 h1:i2rg/p9n/UqIDAMFUJ6qIUUMcsqOuUHgbpbu235Vr1c= github.com/onsi/gomega v1.28.0/go.mod h1:A1H2JE76sI14WIP57LMKj7FVfCHx3g3BcZVjJG8bjX8= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= @@ -1008,7 +1002,6 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= @@ -1016,8 +1009,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= -github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= @@ -1175,6 +1168,7 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -1185,7 +1179,6 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1293,16 +1286,17 @@ golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1432,7 +1426,6 @@ golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82u golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= diff --git a/go.work.sum b/go.work.sum index cf6d89a9f..ac28199ed 100644 --- a/go.work.sum +++ b/go.work.sum @@ -695,7 +695,6 @@ github.com/Azure/azure-service-bus-go v0.9.1/go.mod h1:yzBx6/BUGfjfeqbRZny9AQIbI github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v10.15.5+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= @@ -778,7 +777,6 @@ github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JP github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= @@ -797,7 +795,6 @@ github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5 github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/OpenPeeDeeP/depguard v1.1.1 h1:TSUznLjvp/4IUP+OQ0t/4jF4QUyxIcVX8YnghZdunyA= github.com/OpenPeeDeeP/depguard v1.1.1/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= @@ -813,7 +810,6 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIO github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6 h1:1d9pzdbkth4D9AX6ndKSl7of3UTV0RYl3z64U2dXMGo= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= @@ -935,8 +931,6 @@ github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJ github.com/btcsuite/btcd/btcec/v2 v2.2.1/go.mod h1:9/CSmJxmuvqzX9Wh2fXMWToLOHhPd11lSPuIupwTkI8= github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= -github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/goleveldb v1.0.0 h1:Tvd0BfvqX9o823q1j2UZ/epQo09eJh6dTcRp79ilIN4= @@ -949,7 +943,6 @@ github.com/bufbuild/connect-go v1.0.0 h1:htSflKUT8y1jxhoPhPYTZMrsY3ipUXjjrbcZR5O github.com/bufbuild/connect-go v1.0.0/go.mod h1:9iNvh/NOsfhNBUH5CtvXeVUskQO1xsrEviH7ZArwZ3I= github.com/bufbuild/protocompile v0.1.0 h1:HjgJBI85hY/qmW5tw/66sNDZ7z0UDdVSi/5r40WHw4s= github.com/bufbuild/protocompile v0.1.0/go.mod h1:ix/MMMdsT3fzxfw91dvbfzKW3fRRnuPCP47kpAm5m/4= -github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= @@ -1070,7 +1063,6 @@ github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EX github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/continuity v0.2.2/go.mod h1:pWygW9u7LtS1o4N/Tn0FoCFDIXZ7rxcMX7HX1Dmibvk= github.com/containerd/continuity v0.2.3-0.20220330195504-d132b287edc8/go.mod h1:pWygW9u7LtS1o4N/Tn0FoCFDIXZ7rxcMX7HX1Dmibvk= -github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= @@ -1155,6 +1147,8 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf h1:CAKfRE2YtTUIjjh1bkBt github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= +github.com/cosmos/cosmos-sdk v0.47.8 h1:kzYF2xhnfi8dy15t2VVS24tc2KcuU4JBgjh9yCFx4y4= +github.com/cosmos/cosmos-sdk v0.47.8/go.mod h1:VTAtthIsmfplanhFfUTfT6ED4F+kkJxT7nmvmKXRthI= github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1 h1:6YvzjQtc+cDwCe9XwYPPa8zFCxNG79N7vmCjpK+vGOg= github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1/go.mod h1:JUMM2MxF9wuwzRWZJjb8BjXsn1BmPmdBd3a75pIct4I= github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1.0.20220726092710-f848e4300a8a/go.mod h1:c8IO23vgNxueCCJlSI9awQtcxsvc+buzaeThB85qfBU= @@ -1227,14 +1221,12 @@ github.com/docker/docker v20.10.19+incompatible h1:lzEmjivyNHFHMNAFLXORMBXyGIhw/ github.com/docker/docker v20.10.19+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libnetwork v0.8.0-dev.2.0.20200917202933-d0951081b35f/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= @@ -1289,13 +1281,11 @@ github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzP github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw= github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= -github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= @@ -1318,7 +1308,6 @@ github.com/go-critic/go-critic v0.4.1/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E github.com/go-critic/go-critic v0.4.3/go.mod h1:j4O3D4RoIwRqlZw5jJpx0BNfXWWbpcJoKu5cYSe4YmQ= github.com/go-critic/go-critic v0.6.5 h1:fDaR/5GWURljXwF8Eh31T2GZNz9X4jeboS912mWF8Uo= github.com/go-critic/go-critic v0.6.5/go.mod h1:ezfP/Lh7MA6dBNn4c6ab5ALv3sKnZVLx37tr00uuaOY= -github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= @@ -1480,9 +1469,7 @@ github.com/google/go-replayers/grpcreplay v0.1.0/go.mod h1:8Ig2Idjpr6gifRd6pNVgg github.com/google/go-replayers/httpreplay v0.1.0/go.mod h1:YKZViNhiGgqdBlUbI2MwGpq4pXxNmhJLPHQ7cv2b5no= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/rpmpack v0.0.0-20191226140753-aa36bfddb3a0/go.mod h1:RaTPr0KUf2K7fnZYLNDrr8rxAamWs3iNywJLtQ2AzBg= @@ -1691,7 +1678,6 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jsternberg/zap-logfmt v1.0.0 h1:0Dz2s/eturmdUS34GM82JwNEdQ9hPoJgqptcEKcbpzY= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= @@ -1749,7 +1735,6 @@ github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdB github.com/ldez/tagliatelle v0.3.1 h1:3BqVVlReVUZwafJUwQ+oxbx2BEX2vUG4Yu/NOfMiKiM= github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leonklingele/grouper v1.1.0 h1:tC2y/ygPbMFSBOs3DcyaEMKnnwH7eYKzohOtRrf0SAg= github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= @@ -1869,7 +1854,6 @@ github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6U github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5 h1:8Q0qkMVC/MmWkpIdlvZgcv2o2jrlF6zqVOh7W5YHdMA= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/moricho/tparallel v0.2.1 h1:95FytivzT6rYzdJLdtfn6m1bfFJylOJK41+lgv/EHf4= @@ -1919,6 +1903,7 @@ github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62 github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2 h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= @@ -1926,7 +1911,6 @@ github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNs github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/ginkgo/v2 v2.5.1/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= github.com/onsi/ginkgo/v2 v2.9.7/go.mod h1:cxrmXWykAwTwhQsJOPfdIDiJ+l2RYq7U8hFU+M/1uw0= @@ -1935,13 +1919,11 @@ github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1 github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= @@ -1954,7 +1936,6 @@ github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04s github.com/opencontainers/runc v1.1.0/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= github.com/opencontainers/runc v1.1.1/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= -github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runc v1.1.4/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= @@ -1979,7 +1960,6 @@ github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTm github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.2.5 h1:UwtQQx2pyPIgWYHRg+epgdx1/HnBQTgN3/oIYEJTQzU= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= -github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= @@ -2012,7 +1992,6 @@ github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2 github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pjbgf/sha1cd v0.2.3/go.mod h1:HOK9QrgzdHpbc2Kzip0Q1yi3M2MFGPADtR6HjG65m5M= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= @@ -2037,8 +2016,6 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -2147,7 +2124,6 @@ github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvH github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sivchari/containedctx v1.0.2 h1:0hLQKpgC53OVF1VT7CeoFHk9YKstur1XOgfYIc1yrHI= github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt95do8= @@ -2391,7 +2367,6 @@ go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs= go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= -go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= @@ -2462,8 +2437,6 @@ golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2F golang.org/x/exp v0.0.0-20221205204356-47842c84f3db/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0 h1:LGJsf5LRplCck6jUCH3dBL2dmycNruWNF5xugkSlfXw= golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= @@ -2487,7 +2460,6 @@ golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2790,7 +2762,6 @@ google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= @@ -2814,7 +2785,6 @@ gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= From 70756dc02df72bd4fa91704e76f63595f7e84c7e Mon Sep 17 00:00:00 2001 From: atheesh Date: Mon, 12 Feb 2024 16:04:43 +0530 Subject: [PATCH 09/15] fix app.go --- app/app.go | 1 - cmd/cheqd-noded/cmd/root.go | 30 ------------------------------ 2 files changed, 31 deletions(-) diff --git a/app/app.go b/app/app.go index ad6213342..c633f51df 100644 --- a/app/app.go +++ b/app/app.go @@ -256,7 +256,6 @@ func init() { // NewSimApp returns a reference to an initialized SimApp. func New( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, - // skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *App { encodingConfig := MakeTestEncodingConfig() diff --git a/cmd/cheqd-noded/cmd/root.go b/cmd/cheqd-noded/cmd/root.go index 4633349c9..4d1633edd 100644 --- a/cmd/cheqd-noded/cmd/root.go +++ b/cmd/cheqd-noded/cmd/root.go @@ -177,36 +177,6 @@ type appCreator struct { // newApp is an AppCreator func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { - // var cache sdk.MultiStorePersistentCache - - // if cast.ToBool(appOpts.Get(server.FlagInterBlockCache)) { - // cache = store.NewCommitKVStoreCacheManager() - // } - - // skipUpgradeHeights := make(map[int64]bool) - // for _, h := range cast.ToIntSlice(appOpts.Get(server.FlagUnsafeSkipUpgrades)) { - // skipUpgradeHeights[int64(h)] = true - // } - - // pruningOpts, err := server.GetPruningOptionsFromFlags(appOpts) - // if err != nil { - // panic(err) - // } - - // snapshotDir := filepath.Join(cast.ToString(appOpts.Get(flags.FlagHome)), "data", "snapshots") - // snapshotDB, err := dbm.NewDB("metadata", server.GetAppDBBackend(appOpts), snapshotDir) - // if err != nil { - // panic(err) - // } - // snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir) - // if err != nil { - // panic(err) - // } - // snapshotInterval := cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval)) - // snapshotKeepRecent := cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent)) - // snapshotOptions := snapshotstypes.NewSnapshotOptions(snapshotInterval, snapshotKeepRecent) - // _, _, _, _ = snapshotStore, pruningOpts, snapshotOptions, cache - return app.New( logger, db, traceStore, true, appOpts, From a6c7a5606181e5819c6d24fcb2c5b42f729d55ab Mon Sep 17 00:00:00 2001 From: atheesh Date: Mon, 12 Feb 2024 18:46:24 +0530 Subject: [PATCH 10/15] protocgen --- scripts/protocgen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 31cbacccd..5e50de88c 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -e +set -euox pipefail # Get protoc-gen-gocosmos go get github.com/cosmos/gogoproto 2>/dev/null From 28e3a29e57588a6d9975f1c5c3b95e3312706ef9 Mon Sep 17 00:00:00 2001 From: atheesh Date: Mon, 12 Feb 2024 18:52:12 +0530 Subject: [PATCH 11/15] fix ci job --- scripts/protoc-pulsar-gen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/protoc-pulsar-gen.sh b/scripts/protoc-pulsar-gen.sh index 197dd4e07..bd877e840 100755 --- a/scripts/protoc-pulsar-gen.sh +++ b/scripts/protoc-pulsar-gen.sh @@ -1,6 +1,6 @@ # this script is for generating protobuf files for the new google.golang.org/protobuf API -set -eo pipefail +set -eoux pipefail protoc_gen_install() { go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest #2>/dev/null From 4c0311b59d3c65e8d86ed949fbe95d763d59cdcb Mon Sep 17 00:00:00 2001 From: atheesh Date: Tue, 13 Feb 2024 19:41:32 +0530 Subject: [PATCH 12/15] fix build --- go.mod | 4 ++-- go.work.sum | 17 ++++++++++++++--- make/proto.mk | 1 - scripts/protoc-pulsar-gen.sh | 5 +++-- scripts/protocgen.sh | 3 --- x/did/types/diddoc.pb.go | 2 +- x/resource/types/resource.pb.go | 2 +- 7 files changed, 21 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index ad26bf14c..aed215878 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.21 toolchain go1.21.0 require ( + cosmossdk.io/core v0.5.1 cosmossdk.io/math v1.2.0 filippo.io/edwards25519 v1.0.0 github.com/cometbft/cometbft v0.37.4 @@ -32,7 +33,6 @@ require ( github.com/stretchr/testify v1.8.4 google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 google.golang.org/grpc v1.60.1 - google.golang.org/protobuf v1.32.0 ) require ( @@ -42,7 +42,6 @@ require ( cloud.google.com/go/iam v1.1.5 // indirect cloud.google.com/go/storage v1.30.1 // indirect cosmossdk.io/api v0.3.1 // indirect - cosmossdk.io/core v0.5.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/log v1.3.0 // indirect @@ -190,6 +189,7 @@ require ( google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.work.sum b/go.work.sum index ac28199ed..e9d40a698 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1147,8 +1147,6 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf h1:CAKfRE2YtTUIjjh1bkBt github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= -github.com/cosmos/cosmos-sdk v0.47.8 h1:kzYF2xhnfi8dy15t2VVS24tc2KcuU4JBgjh9yCFx4y4= -github.com/cosmos/cosmos-sdk v0.47.8/go.mod h1:VTAtthIsmfplanhFfUTfT6ED4F+kkJxT7nmvmKXRthI= github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1 h1:6YvzjQtc+cDwCe9XwYPPa8zFCxNG79N7vmCjpK+vGOg= github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1/go.mod h1:JUMM2MxF9wuwzRWZJjb8BjXsn1BmPmdBd3a75pIct4I= github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1.0.20220726092710-f848e4300a8a/go.mod h1:c8IO23vgNxueCCJlSI9awQtcxsvc+buzaeThB85qfBU= @@ -1270,6 +1268,7 @@ github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= @@ -1786,6 +1785,7 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= @@ -1903,7 +1903,6 @@ github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62 github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2 h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= @@ -1911,6 +1910,7 @@ github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNs github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/ginkgo/v2 v2.5.1/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= github.com/onsi/ginkgo/v2 v2.9.7/go.mod h1:cxrmXWykAwTwhQsJOPfdIDiJ+l2RYq7U8hFU+M/1uw0= @@ -2016,6 +2016,8 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -2256,6 +2258,7 @@ github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= github.com/uudashr/gocognit v1.0.6/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= @@ -2274,6 +2277,8 @@ github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmF github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/vmware/govmomi v0.20.3/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= github.com/whalelephant/cosmos-sdk v0.0.0-20230906130404-fde27c0060e4 h1:hi5M/6rvWDm0sL3NtI7gZu+nZIrJHAiyiCD/K2/DwHE= github.com/whalelephant/cosmos-sdk v0.0.0-20230906130404-fde27c0060e4/go.mod h1:ZFL/yjcIZq67H8FiWoLCnnaChkXnbRRYEEhGrFq8fzE= @@ -2496,6 +2501,7 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -2578,6 +2584,7 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2590,6 +2597,7 @@ golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fq golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2724,6 +2732,7 @@ google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mR google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= +google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= @@ -2736,6 +2745,7 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231211222908-989df2bf70f3/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= @@ -2781,6 +2791,7 @@ gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= diff --git a/make/proto.mk b/make/proto.mk index cd82172c8..bfb89aa76 100644 --- a/make/proto.mk +++ b/make/proto.mk @@ -17,7 +17,6 @@ proto-all: proto-gen proto-swagger-gen proto-gen: @echo "Generating Protobuf files" - @echo $(protoImage) sh ./scripts/protocgen.sh; @$(protoImage) sh ./scripts/protocgen.sh; go mod tidy cd api diff --git a/scripts/protoc-pulsar-gen.sh b/scripts/protoc-pulsar-gen.sh index bd877e840..a7626dd50 100755 --- a/scripts/protoc-pulsar-gen.sh +++ b/scripts/protoc-pulsar-gen.sh @@ -1,6 +1,7 @@ -# this script is for generating protobuf files for the new google.golang.org/protobuf API +# !/usr/bin/env bash -set -eoux pipefail +# this script is for generating protobuf files for the new google.golang.org/protobuf API +set -euox pipefail protoc_gen_install() { go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest #2>/dev/null diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 5e50de88c..b0cc43b1c 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -2,9 +2,6 @@ set -euox pipefail -# Get protoc-gen-gocosmos -go get github.com/cosmos/gogoproto 2>/dev/null - echo "Generating gogo proto code" cd proto diff --git a/x/did/types/diddoc.pb.go b/x/did/types/diddoc.pb.go index 4c0040da7..39c07ebce 100644 --- a/x/did/types/diddoc.pb.go +++ b/x/did/types/diddoc.pb.go @@ -7,8 +7,8 @@ import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + _ "github.com/cosmos/gogoproto/types" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" diff --git a/x/resource/types/resource.pb.go b/x/resource/types/resource.pb.go index 834962316..b782c3a71 100644 --- a/x/resource/types/resource.pb.go +++ b/x/resource/types/resource.pb.go @@ -7,8 +7,8 @@ import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + _ "github.com/cosmos/gogoproto/types" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" From 3132693c3d5fce5591d0b899d4fc802317fb108b Mon Sep 17 00:00:00 2001 From: atheesh Date: Wed, 14 Feb 2024 15:51:11 +0530 Subject: [PATCH 13/15] fixes --- app/app.go | 31 +++++++++++++++++++++-- go.mod | 2 +- scripts/protoc-pulsar-gen.sh | 2 +- x/resource/module.go | 48 ++++++++++++++---------------------- 4 files changed, 49 insertions(+), 34 deletions(-) diff --git a/app/app.go b/app/app.go index c633f51df..49d2ebca8 100644 --- a/app/app.go +++ b/app/app.go @@ -7,6 +7,8 @@ import ( "os" "path/filepath" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" "github.com/cheqd/cheqd-node/app/migrations" upgradeV1 "github.com/cheqd/cheqd-node/app/upgrades/v1" upgradeV2 "github.com/cheqd/cheqd-node/app/upgrades/v2" @@ -29,6 +31,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" + runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" @@ -733,6 +736,14 @@ func New( // Make sure it's called after `app.ModuleManager` and `app.configurator` are set. app.RegisterUpgradeHandlers() + autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.ModuleManager.Modules)) + + reflectionSvc, err := runtimeservices.NewReflectionService() + if err != nil { + panic(err) + } + reflectionv1.RegisterReflectionServiceServer(app.GRPCQueryRouter(), reflectionSvc) + // initialize stores app.MountKVStores(keys) app.MountTransientStores(tkeys) @@ -777,11 +788,10 @@ func New( app.SetEndBlocker(app.EndBlocker) // app.SetPostHandler(postHandler) + // Note: This migration is completed, we can remove these lines. // Upgrade handler for v1 v1UpgradeHandler := app.upgradeHandlerV1(icaModule, keys[didtypes.StoreKey], keys[resourcetypes.StoreKey]) app.UpgradeKeeper.SetUpgradeHandler(upgradeV1.UpgradeName, v1UpgradeHandler) - // Upgrade handler for v2 - app.UpgradeKeeper.SetUpgradeHandler(upgradeV2.UpgradeName, upgradeV2.CreateUpgradeHandler(app.ModuleManager, app.configurator)) if loadLatest { if err := app.LoadLatestVersion(); err != nil { @@ -1151,4 +1161,21 @@ func BlockedAddresses() map[string]bool { } func (app *App) RegisterUpgradeHandlers() { + baseAppLegacySS := app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()) + + // Upgrade handler for v2 + app.UpgradeKeeper.SetUpgradeHandler( + upgradeV2.UpgradeName, + func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + ctx.Logger().Info("Handler for upgrade plan: " + upgradeV2.UpgradeName) + // Migrate Tendermint consensus parameters from x/params module to a + // dedicated x/consensus module. + baseapp.MigrateParams(ctx, baseAppLegacySS, &app.ConsensusParamsKeeper) + return app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM) + }, + ) +} + +func (a *App) Configurator() module.Configurator { + return a.configurator } diff --git a/go.mod b/go.mod index aed215878..0596fad7d 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.21 toolchain go1.21.0 require ( + cosmossdk.io/api v0.3.1 cosmossdk.io/core v0.5.1 cosmossdk.io/math v1.2.0 filippo.io/edwards25519 v1.0.0 @@ -41,7 +42,6 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.5 // indirect cloud.google.com/go/storage v1.30.1 // indirect - cosmossdk.io/api v0.3.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/log v1.3.0 // indirect diff --git a/scripts/protoc-pulsar-gen.sh b/scripts/protoc-pulsar-gen.sh index a7626dd50..dff628500 100755 --- a/scripts/protoc-pulsar-gen.sh +++ b/scripts/protoc-pulsar-gen.sh @@ -1,4 +1,4 @@ -# !/usr/bin/env bash +#!/usr/bin/env bash # this script is for generating protobuf files for the new google.golang.org/protobuf API set -euox pipefail diff --git a/x/resource/module.go b/x/resource/module.go index c638a42ca..82089ba02 100644 --- a/x/resource/module.go +++ b/x/resource/module.go @@ -6,14 +6,14 @@ import ( "fmt" "log" + "cosmossdk.io/core/appmodule" didkeeper "github.com/cheqd/cheqd-node/x/did/keeper" "github.com/cheqd/cheqd-node/x/resource/client/cli" migrationV3 "github.com/cheqd/cheqd-node/x/resource/migration/v3" "github.com/cheqd/cheqd-node/x/resource/types" + gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/gorilla/mux" - "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/cometbft/cometbft/abci/types" @@ -27,12 +27,22 @@ import ( porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" ) +const ConsensusVersion = 3 + var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} - _ porttypes.IBCModule = IBCModule{} + _ module.BeginBlockAppModule = AppModule{} + _ module.EndBlockAppModule = AppModule{} + _ module.AppModuleBasic = AppModuleBasic{} + _ porttypes.IBCModule = IBCModule{} + _ appmodule.AppModule = AppModule{} ) +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + // ---------------------------------------------------------------------------- // AppModuleBasic // ---------------------------------------------------------------------------- @@ -51,10 +61,6 @@ func (AppModuleBasic) Name() string { return types.ModuleName } -func (AppModuleBasic) RegisterCodec(cdc *codec.LegacyAmino) { - types.RegisterCodec(cdc) -} - func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { types.RegisterCodec(cdc) } @@ -78,14 +84,9 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return genState.Validate() } -// RegisterRESTRoutes registers the resource module's REST service handlers. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - // rest.RegisterRoutes(clientCtx, rtr) -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. -func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, m *gwruntime.ServeMux) { + err := types.RegisterQueryHandlerClient(context.Background(), m, types.NewQueryClient(clientCtx)) if err != nil { log.Fatal(err) } @@ -126,7 +127,7 @@ func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, cheqdKeeper didkeeper.K // introduced by the module. To avoid wrong/empty versions, the initial version // should be set to 1. func (am AppModule) ConsensusVersion() uint64 { - return 3 + return ConsensusVersion } // Name returns the resource module's name. @@ -134,19 +135,6 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// // Route returns the resource module's message routing key. -// func (am AppModule) Route() sdk.Route { -// return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper, am.didKeeper)) -// } - -// QuerierRoute returns the resource module's query routing key. -func (AppModule) QuerierRoute() string { return types.QuerierRoute } - -// // LegacyQuerierHandler returns the resource module's Querier. -// func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { -// return keeper.NewQuerier(am.keeper, am.didKeeper, legacyQuerierCdc) -// } - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { From 0d981295c8ddfdcba65114dfa1433c0e9cd6eb72 Mon Sep 17 00:00:00 2001 From: atheesh Date: Wed, 14 Feb 2024 16:31:53 +0530 Subject: [PATCH 14/15] review changes --- app/export.go | 2 +- x/did/module.go | 13 ------------- x/did/types/keys.go | 3 --- x/resource/types/keys.go | 3 --- 4 files changed, 1 insertion(+), 20 deletions(-) diff --git a/app/export.go b/app/export.go index 396d0aecc..03e871a84 100644 --- a/app/export.go +++ b/app/export.go @@ -30,7 +30,7 @@ func (app *App) ExportAppStateAndValidators( app.prepForZeroHeightGenesis(ctx, jailAllowedAddrs) } - genState := app.ModuleManager.ExportGenesis(ctx, app.appCodec) + genState := app.ModuleManager.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) appState, err := json.MarshalIndent(genState, "", " ") if err != nil { return servertypes.ExportedApp{}, err diff --git a/x/did/module.go b/x/did/module.go index 4e91ed930..88064c6ca 100644 --- a/x/did/module.go +++ b/x/did/module.go @@ -128,19 +128,6 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the cheqd module's message routing key. -// func (am AppModule) Route() sdk.Route { -// return sdk.NewRoute(types.RouterKey, keeper.NewHandler(am.keeper)) -// } - -// QuerierRoute returns the cheqd module's query routing key. -func (AppModule) QuerierRoute() string { return types.QuerierRoute } - -// LegacyQuerierHandler returns the cheqd module's Querier. -// func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { -// return keeper.NewQuerier(am.keeper, legacyQuerierCdc) -// } - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { diff --git a/x/did/types/keys.go b/x/did/types/keys.go index 21b50790d..6472b3e88 100644 --- a/x/did/types/keys.go +++ b/x/did/types/keys.go @@ -10,9 +10,6 @@ const ( // RouterKey is the message route for slashing RouterKey = ModuleName - // QuerierRoute defines the module's query routing key - QuerierRoute = ModuleName - DidMethod = ModuleName ) diff --git a/x/resource/types/keys.go b/x/resource/types/keys.go index 6c48fcfff..a47a3c740 100644 --- a/x/resource/types/keys.go +++ b/x/resource/types/keys.go @@ -10,9 +10,6 @@ const ( // RouterKey is the message route for slashing RouterKey = ModuleName - // QuerierRoute defines the module's query routing key - QuerierRoute = ModuleName - // Version support via IBC IBCVersion = "cheqd-resource-v3" From 02ede70ec4e2aadd5a972c2ba4690611eb6148b3 Mon Sep 17 00:00:00 2001 From: atheesh Date: Wed, 14 Feb 2024 16:33:48 +0530 Subject: [PATCH 15/15] review changes --- cmd/cheqd-noded/cmd/genaccounts.go | 192 ----------------------------- cmd/cheqd-noded/cmd/root.go | 1 - 2 files changed, 193 deletions(-) delete mode 100644 cmd/cheqd-noded/cmd/genaccounts.go diff --git a/cmd/cheqd-noded/cmd/genaccounts.go b/cmd/cheqd-noded/cmd/genaccounts.go deleted file mode 100644 index 6b5b48ebf..000000000 --- a/cmd/cheqd-noded/cmd/genaccounts.go +++ /dev/null @@ -1,192 +0,0 @@ -package cmd - -import ( - "bufio" - "encoding/json" - "errors" - "fmt" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/cosmos/cosmos-sdk/server" - sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - authvesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/spf13/cobra" -) - -const ( - flagVestingStart = "vesting-start-time" - flagVestingEnd = "vesting-end-time" - flagVestingAmt = "vesting-amount" -) - -// AddGenesisAccountCmd returns add-genesis-account cobra Command. -func AddGenesisAccountCmd(defaultNodeHome string) *cobra.Command { - cmd := &cobra.Command{ - Use: "add-genesis-account [address_or_key_name] [coin][,[coin]]", - Short: "Add a genesis account to genesis.json", - Long: `Add a genesis account to genesis.json. The provided account must specify -the account address or key name and a list of initial coins. If a key name is given, -the address will be looked up in the local Keybase. The list of initial tokens must -contain valid denominations. Accounts may optionally be supplied with vesting parameters. -`, - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - cdc := clientCtx.Codec - - serverCtx := server.GetServerContextFromCmd(cmd) - config := serverCtx.Config - - config.SetRoot(clientCtx.HomeDir) - - coins, err := sdk.ParseCoinsNormalized(args[1]) - if err != nil { - return fmt.Errorf("failed to parse coins: %w", err) - } - - addr, err := sdk.AccAddressFromBech32(args[0]) - if err != nil { - inBuf := bufio.NewReader(cmd.InOrStdin()) - keyringBackend, err := cmd.Flags().GetString(flags.FlagKeyringBackend) - if err != nil { - return err - } - - // attempt to lookup address from Keybase if no address was provided - kb, err := keyring.New(sdk.KeyringServiceName(), keyringBackend, clientCtx.HomeDir, inBuf, cdc) - if err != nil { - return err - } - - info, err := kb.Key(args[0]) - if err != nil { - return fmt.Errorf("failed to get address from Keybase: %w", err) - } - - addr, err = info.GetAddress() - if err != nil { - return fmt.Errorf("failed to fetch address from Keybase Record: %w", err) - } - } - - vestingStart, err := cmd.Flags().GetInt64(flagVestingStart) - if err != nil { - return err - } - vestingEnd, err := cmd.Flags().GetInt64(flagVestingEnd) - if err != nil { - return err - } - vestingAmtStr, err := cmd.Flags().GetString(flagVestingAmt) - if err != nil { - return err - } - - vestingAmt, err := sdk.ParseCoinsNormalized(vestingAmtStr) - if err != nil { - return fmt.Errorf("failed to parse vesting amount: %w", err) - } - - // create concrete account type based on input parameters - var genAccount authtypes.GenesisAccount - - balances := banktypes.Balance{Address: addr.String(), Coins: coins.Sort()} - baseAccount := authtypes.NewBaseAccount(addr, nil, 0, 0) - - if !vestingAmt.IsZero() { - baseVestingAccount := authvesting.NewBaseVestingAccount(baseAccount, vestingAmt.Sort(), vestingEnd) - - if (balances.Coins.IsZero() && !baseVestingAccount.OriginalVesting.IsZero()) || - baseVestingAccount.OriginalVesting.IsAnyGT(balances.Coins) { - return errors.New("vesting amount cannot be greater than total amount") - } - - switch { - case vestingStart != 0 && vestingEnd != 0: - genAccount = authvesting.NewContinuousVestingAccountRaw(baseVestingAccount, vestingStart) - - case vestingEnd != 0: - genAccount = authvesting.NewDelayedVestingAccountRaw(baseVestingAccount) - - default: - return errors.New("invalid vesting parameters; must supply start and end time or end time") - } - } else { - genAccount = baseAccount - } - - if err := genAccount.Validate(); err != nil { - return fmt.Errorf("failed to validate new genesis account: %w", err) - } - - genFile := config.GenesisFile() - appState, genDoc, err := genutiltypes.GenesisStateFromGenFile(genFile) - if err != nil { - return fmt.Errorf("failed to unmarshal genesis state: %w", err) - } - - authGenState := authtypes.GetGenesisStateFromAppState(cdc, appState) - - accs, err := authtypes.UnpackAccounts(authGenState.Accounts) - if err != nil { - return fmt.Errorf("failed to get accounts from any: %w", err) - } - - if accs.Contains(addr) { - return fmt.Errorf("cannot add account at existing address %s", addr) - } - - // Add the new account to the set of genesis accounts and sanitize the - // accounts afterwards. - accs = append(accs, genAccount) - accs = authtypes.SanitizeGenesisAccounts(accs) - - genAccs, err := authtypes.PackAccounts(accs) - if err != nil { - return fmt.Errorf("failed to convert accounts into any's: %w", err) - } - authGenState.Accounts = genAccs - - authGenStateBz, err := cdc.MarshalJSON(&authGenState) - if err != nil { - return fmt.Errorf("failed to marshal auth genesis state: %w", err) - } - - appState[authtypes.ModuleName] = authGenStateBz - - bankGenState := banktypes.GetGenesisStateFromAppState(cdc, appState) - bankGenState.Balances = append(bankGenState.Balances, balances) - bankGenState.Balances = banktypes.SanitizeGenesisBalances(bankGenState.Balances) - - bankGenStateBz, err := cdc.MarshalJSON(bankGenState) - if err != nil { - return fmt.Errorf("failed to marshal bank genesis state: %w", err) - } - - appState[banktypes.ModuleName] = bankGenStateBz - - appStateJSON, err := json.Marshal(appState) - if err != nil { - return fmt.Errorf("failed to marshal application genesis state: %w", err) - } - - genDoc.AppState = appStateJSON - return genutil.ExportGenesisFile(genDoc, genFile) - }, - } - - cmd.Flags().String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|kwallet|pass|test)") - cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") - cmd.Flags().String(flagVestingAmt, "", "amount of coins for vesting accounts") - cmd.Flags().Int64(flagVestingStart, 0, "schedule start time (unix epoch) for vesting accounts") - cmd.Flags().Int64(flagVestingEnd, 0, "schedule end time (unix epoch) for vesting accounts") - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/cmd/cheqd-noded/cmd/root.go b/cmd/cheqd-noded/cmd/root.go index 4d1633edd..56a3a9d83 100644 --- a/cmd/cheqd-noded/cmd/root.go +++ b/cmd/cheqd-noded/cmd/root.go @@ -82,7 +82,6 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { rootCmd.AddCommand( extendInit(genutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome)), - AddGenesisAccountCmd(app.DefaultNodeHome), tmcli.NewCompletionCmd(rootCmd, true), extendDebug(debug.Cmd()), )