From 8f234dc561deb3e2e52fb7bdca108108404ca86b Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Sat, 14 Sep 2024 14:46:09 -0400 Subject: [PATCH] feat(did): remove unused proto files --- devbox.json | 8 - proto/did/v1/accounts.proto | 4 - proto/did/v1/enums.proto | 24 - proto/did/v1/genesis.proto | 45 - proto/did/v1/query.proto | 123 +- proto/did/v1/state.proto | 22 +- proto/did/v1/tx.proto | 124 +- proto/did/v1/types.proto | 114 - x/did/types/accounts.pb.go | 634 ----- x/did/types/enums.pb.go | 120 - x/did/types/scopes.go | 53 - x/did/types/types.go | 15 - x/did/types/types.pb.go | 4548 ----------------------------------- 13 files changed, 34 insertions(+), 5800 deletions(-) delete mode 100644 proto/did/v1/accounts.proto delete mode 100644 proto/did/v1/enums.proto delete mode 100644 proto/did/v1/types.proto delete mode 100644 x/did/types/accounts.pb.go delete mode 100644 x/did/types/enums.pb.go delete mode 100644 x/did/types/scopes.go delete mode 100644 x/did/types/types.go delete mode 100644 x/did/types/types.pb.go diff --git a/devbox.json b/devbox.json index 72dabf8f9..01365d83b 100644 --- a/devbox.json +++ b/devbox.json @@ -9,7 +9,6 @@ "ipfs-cluster@latest", "air@latest" ], - "packages": ["go@1.21"], "env": { "GOPATH": "$HOME/go", "PATH": "$HOME/go/bin:$PATH", @@ -49,13 +48,6 @@ "testnet": [ "devbox services up" ] - "install": ["make install"], - "gen": ["make proto-gen"], - "build": [ - "make local-image", - "docker tag sonr:local ghcr.io/onsonr/sonrd:latest" - ], - "push": ["docker push ghcr.io/onsonr/sonrd:latest"] } } } diff --git a/proto/did/v1/accounts.proto b/proto/did/v1/accounts.proto deleted file mode 100644 index f189a6a7b..000000000 --- a/proto/did/v1/accounts.proto +++ /dev/null @@ -1,4 +0,0 @@ -syntax = "proto3"; -package did.v1; - -option go_package = "github.com/onsonr/hway/x/did/types"; diff --git a/proto/did/v1/enums.proto b/proto/did/v1/enums.proto deleted file mode 100644 index d7a1bd08b..000000000 --- a/proto/did/v1/enums.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package did.v1; - -import "gogoproto/gogo.proto"; -import "amino/amino.proto"; -option go_package = "github.com/onsonr/hway/x/did/types"; - -// PermissionScope define the Capabilities Controllers can grant for Services -enum PermissionScope { - PERMISSION_SCOPE_UNSPECIFIED = 0; - PERMISSION_SCOPE_PROFILE_NAME = 1; - PERMISSION_SCOPE_IDENTIFIERS_EMAIL = 2; - PERMISSION_SCOPE_IDENTIFIERS_PHONE = 3; - PERMISSION_SCOPE_TRANSACTIONS_READ = 4; - PERMISSION_SCOPE_TRANSACTIONS_WRITE = 5; - PERMISSION_SCOPE_WALLETS_READ = 6; - PERMISSION_SCOPE_WALLETS_CREATE = 7; - PERMISSION_SCOPE_WALLETS_SUBSCRIBE = 8; - PERMISSION_SCOPE_WALLETS_UPDATE = 9; - PERMISSION_SCOPE_TRANSACTIONS_VERIFY = 10; - PERMISSION_SCOPE_TRANSACTIONS_BROADCAST = 11; - PERMISSION_SCOPE_ADMIN_USER = 12; - PERMISSION_SCOPE_ADMIN_VALIDATOR = 13; -} diff --git a/proto/did/v1/genesis.proto b/proto/did/v1/genesis.proto index 45e8cde45..37c3ff16d 100644 --- a/proto/did/v1/genesis.proto +++ b/proto/did/v1/genesis.proto @@ -5,9 +5,6 @@ import "amino/amino.proto"; import "gogoproto/gogo.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; -import "did/v1/types.proto"; - -option go_package = "github.com/onsonr/hway/x/did/types"; // GenesisState defines the module genesis state message GenesisState { @@ -81,47 +78,6 @@ message KeyInfo { KeyType type = 5; // e.g., "Octet", "Elliptic", "RSA", "Symmetric", "HMAC" } -// ValidatorInfo defines information for accepted Validator nodes -message ValidatorInfo { - string moniker = 1; - repeated Endpoint grpc_endpoints = 2; - repeated Endpoint rest_endpoints = 3; - ExplorerInfo explorer = 4; - FeeInfo fee_info = 5; - IBCChannel ibc_channel = 6; - - // Endpoint defines an endpoint - message Endpoint { - string url = 1; - bool is_primary = 2; - } - - // ExplorerInfo defines the explorer info - message ExplorerInfo { - string name = 1; - string url = 2; - } - - // FeeInfo defines a fee info - message FeeInfo { - string base_denom = 1; - repeated string fee_rates = 2; - int32 init_gas_limit = 3; - bool is_simulable = 4; - double gas_multiply = 5; - } - - // IBCChannel defines the IBC channel info - message IBCChannel { - string id = 1; - string port = 2; - } -} - -// -// [Constant Enumerations] -// - // AssetType defines the type of asset: native, wrapped, staking, pool, or unspecified enum AssetType { ASSET_TYPE_UNSPECIFIED = 0; @@ -226,4 +182,3 @@ enum PermissionScope { PERMISSION_SCOPE_ADMIN_USER = 12; PERMISSION_SCOPE_ADMIN_VALIDATOR = 13; } - diff --git a/proto/did/v1/query.proto b/proto/did/v1/query.proto index 4daf8ecd0..4a2d2e5b2 100644 --- a/proto/did/v1/query.proto +++ b/proto/did/v1/query.proto @@ -4,7 +4,6 @@ package did.v1; import "did/v1/genesis.proto"; import "did/v1/models.proto"; import "google/api/annotations.proto"; -import "did/v1/types.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; @@ -16,39 +15,34 @@ service Query { } // ParamsAssets queries all parameters of the module. - rpc ParamsAssets(QueryRequest) returns (QueryResponse) { + rpc ParamsAssets(QueryRequest) returns (QueryParamsAssetsResponse) { option (google.api.http).get = "/params/assets"; } // Params queries all parameters of the module. - rpc ParamsByAsset(QueryRequest) returns (QueryResponse) { + rpc ParamsByAsset(QueryRequest) returns (QueryParamsByAssetResponse) { option (google.api.http).get = "/params/assets/{asset}"; } // ParamsKeys queries all parameters of the module. - rpc ParamsKeys(QueryRequest) returns (QueryResponse) { + rpc ParamsKeys(QueryRequest) returns (QueryParamsKeysResponse) { option (google.api.http).get = "/params/keys"; } // Params queries all parameters of the module. - rpc ParamsByKey(QueryRequest) returns (QueryResponse) { + rpc ParamsByKey(QueryRequest) returns (QueryParamsByKeyResponse) { option (google.api.http).get = "/params/keys/{key}"; } - // Params queries all parameters of the module. - rpc RegistrationOptionsByKey(QueryRequest) returns (QueryResponse) { - option (google.api.http).get = "/params/keys/{key}/registration"; - } - // Resolve queries the DID document by its id. - rpc Resolve(QueryRequest) returns (QueryResponse) { + rpc Resolve(QueryRequest) returns (QueryResolveResponse) { option (google.api.http).get = "/did/{did}"; } // Service returns associated ServiceInfo for a given Origin // if the servie is not found, a fingerprint is generated to be used // as a TXT record in DNS. v=sonr, o=origin, p=protocol - rpc Service(QueryRequest) returns (QueryResponse) { + rpc Service(QueryRequest) returns (QueryServiceResponse) { option (google.api.http).get = "/service/{origin}"; } } @@ -66,104 +60,21 @@ message QueryResponse { bool success = 1; string query = 2; Document document = 3; - ServiceInfo service = 4; Params params = 5; } -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - Params params = 1; -} - -message QueryParamsAssetsResponse { - repeated AssetInfo assets = 1; - // Accounts returns associated wallet accounts with the DID. - rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) { - option (google.api.http).get = "/did/{did}/accounts"; - } - - // Credentials returns associated credentials with the DID and Service Origin. - rpc Credentials(QueryCredentialsRequest) returns (QueryCredentialsResponse) { - option (google.api.http).get = "/did/{did}/{origin}/credentials"; - } - - // Identities returns associated identity with the DID. - rpc Identities(QueryIdentitiesRequest) returns (QueryIdentitiesResponse) { - option (google.api.http).get = "/did/{did}/identities"; - } - - // Resolve queries the DID document by its id. - rpc Resolve(QueryResolveRequest) returns (QueryResolveResponse) { - option (google.api.http).get = "/did/resolve/{did}"; - } - - // Service returns associated ServiceInfo for a given Origin - rpc Service(QueryServiceRequest) returns (QueryServiceResponse) { - option (google.api.http).get = "/did/service/{origin}"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - // QueryParamsResponse is the response type for the Query/Params RPC method. message QueryParamsResponse { // params defines the parameters of the module. Params params = 1; } -// QueryAccountsRequest is the request type for the Query/Exists RPC method. -message QueryAccountsRequest { - string did = 1; +message QueryParamsAssetsResponse { + repeated AssetInfo assets = 1; } -// QueryAccountsResponse is the response type for the Query/Exists RPC method. -message QueryAccountsResponse { - bool exists = 1; -} - -// QueryCredentialsRequest is the request type for the Query/Exists RPC method. -message QueryCredentialsRequest { - string did = 1; - string origin = 2; -} - -// QueryCredentialsResponse is the response type for the Query/Exists RPC method. -message QueryCredentialsResponse { - map credentials = 1; -} - -// QueryIdentitiesRequest is the request type for the Query/Exists RPC method. -message QueryIdentitiesRequest { - string did = 1; -} - -// QueryIdentitiesResponse is the response type for the Query/Exists RPC method. -message QueryIdentitiesResponse { - bool exists = 1; - repeated VerificationMethod verificationMethod = 2; -} - -// QueryResolveRequest is the request type for the Query/Resolve RPC method. -message QueryResolveRequest { - string did = 1; -} - -// QueryResolveResponse is the response type for the Query/Resolve RPC method. -message QueryResolveResponse { - // document is the DID document - Document document = 1; -} - -// QueryServiceRequest is the request type for the Query/LoginOptions RPC method. -message QueryServiceRequest { - string origin = 1; -} - -// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. -message QueryServiceResponse { - // options is the PublicKeyCredentialAttestationOptions - string options = 1; +message QueryParamsByAssetResponse { + AssetInfo asset = 1; } message QueryParamsKeysResponse { @@ -174,10 +85,16 @@ message QueryParamsByKeyResponse { KeyInfo key = 1; } -message QueryParamsByAssetResponse { - AssetInfo asset = 1; +// QueryResolveResponse is the response type for the Query/Resolve RPC method. +message QueryResolveResponse { + // document is the DID document + Document document = 1; } -message QueryRegistrationOptionsByKeyResponse { - repeated string registration_options = 1; +// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. +message QueryServiceResponse { + // options is the PublicKeyCredentialAttestationOptions + bool existing = 1; + ServiceInfo service = 2; + string txt_record = 3; } diff --git a/proto/did/v1/state.proto b/proto/did/v1/state.proto index 08b340e4d..2edb6294a 100644 --- a/proto/did/v1/state.proto +++ b/proto/did/v1/state.proto @@ -3,9 +3,9 @@ syntax = "proto3"; package did.v1; import "cosmos/orm/v1/orm.proto"; +import "did/v1/enums.proto"; import "did/v1/genesis.proto"; import "did/v1/models.proto"; -import "did/v1/enums.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; @@ -29,8 +29,12 @@ message Account { fields: "controller,chain_code,index" unique: true } - index: { id: 1, fields: "subject", unique: true } - }; + index: { + id: 1 + fields: "subject" + unique: true + } + }; // The unique identifier of the alias string id = 1; @@ -51,7 +55,7 @@ message Account { // Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave) message Assertion { option (cosmos.orm.v1.table) = { - id: 2 + id: 2 primary_key: {fields: "id"} }; @@ -216,14 +220,4 @@ message VerificationMethod { // The public key of the verification PubKey public_key = 6; // The controller DID of the service - string controller_did = 3; - - // The domain name of the service - string origin_uri = 4; - - // The service endpoint - map service_endpoints = 5; - - // Scopes is the Authorization Grants of the service - repeated PermissionScope scopes = 6; } diff --git a/proto/did/v1/tx.proto b/proto/did/v1/tx.proto index 4a6084d57..9e2df1f0c 100644 --- a/proto/did/v1/tx.proto +++ b/proto/did/v1/tx.proto @@ -3,10 +3,8 @@ syntax = "proto3"; package did.v1; import "cosmos/msg/v1/msg.proto"; -import "did/v1/enums.proto"; -import "did/v1/genesis.proto"; -import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; +import "did/v1/enums.proto"; import "did/v1/genesis.proto"; import "did/v1/models.proto"; import "gogoproto/gogo.proto"; @@ -36,20 +34,6 @@ service Msg { // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. rpc RegisterService(MsgRegisterService) returns (MsgRegisterServiceResponse); - // Authenticate asserts the given controller is the owner of the given address. - rpc Authenticate(MsgAuthenticate) returns (MsgAuthenticateResponse); - - // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. - rpc ProveWitness(MsgProveWitness) returns (MsgProveWitnessResponse); - - // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. - rpc SyncVault(MsgSyncVault) returns (MsgSyncVaultResponse); - - // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. - rpc RegisterController(MsgRegisterController) returns (MsgRegisterControllerResponse); - - // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. - rpc RegisterService(MsgRegisterService) returns (MsgRegisterServiceResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. @@ -103,32 +87,6 @@ message MsgAllocateVaultResponse { bool localhost = 4; } -// MsgProveWitness is the message type for the ProveWitness RPC. -message MsgProveWitness { - option (cosmos.msg.v1.signer) = "authority"; -// MsgAuthenticate is the message type for the Authenticate RPC. -message MsgAuthenticate { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // property is key to prove. - string property = 2; - - // Witness Value is the bytes of the witness. - bytes witness = 3; - - // token is the macron token to authenticate the operation. - string token = 4; -} - -// MsgProveWitnessResponse is the response type for the ProveWitness RPC. -message MsgProveWitnessResponse { - bool success = 1; - string property = 2; -} - // MsgSyncController is the message type for the SyncController RPC. message MsgSyncController { option (cosmos.msg.v1.signer) = "controller"; @@ -147,71 +105,19 @@ message MsgSyncControllerResponse { // MsgRegisterController is the message type for the InitializeController RPC. message MsgRegisterController { -// MsgAuthenticateResponse is the response type for the Authenticate RPC. -message MsgAuthenticateResponse {} - -// MsgProveWitness is the message type for the ProveWitness RPC. -message MsgProveWitness { option (cosmos.msg.v1.signer) = "authority"; // authority is the address of the governance account. string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Assertions is the list of assertions to initialize the controller with. - string cid = 2; + repeated bytes assertions = 2; - // Origin is the origin of the request in wildcard form. - string origin = 3; + // Keyshares is the list of keyshares to initialize the controller with. + repeated bytes keyshares = 3; - // Credential is the list of keyshares to initialize the controller with. - string credential_creation_response = 4; - // property is key to prove. - string property = 2; - - // Witness Value is the bytes of the witness. - bytes witness = 3; -} - -// MsgProveWitnessResponse is the response type for the ProveWitness RPC. -message MsgProveWitnessResponse { - bool success = 1; - string property = 2; -} - -// MsgSyncVault is the message type for the SyncVault RPC. -message MsgSyncVault { - option (cosmos.msg.v1.signer) = "controller"; - - // controller is the address of the controller to sync. - string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // cid is the IPFS content identifier. - string cid = 2; - - // Macroon is the public token to authenticate the operation. - bytes macron = 3; -} - -// MsgSyncVaultResponse is the response type for the SyncVault RPC. -message MsgSyncVaultResponse { - bool success = 1; -} - -// MsgRegisterController is the message type for the InitializeController RPC. -message MsgRegisterController { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // Assertions is the list of assertions to initialize the controller with. - repeated bytes assertions = 2; - - // Keyshares is the list of keyshares to initialize the controller with. - repeated bytes keyshares = 3; - - // Verifications is the list of verifications to initialize the controller with. - repeated bytes verifications = 4; + // Verifications is the list of verifications to initialize the controller with. + repeated bytes verifications = 4; } // MsgRegisterControllerResponse is the response type for the InitializeController RPC. @@ -247,11 +153,6 @@ message MsgAuthorizeService { message MsgAuthorizeServiceResponse { bool success = 1; string token = 2; - // Controller is the address of the initialized controller. - string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // Accounts are a Address Map and Supported coin Denoms for the controller - map accounts = 2; } // MsgRegisterService is the message type for the RegisterService RPC. @@ -263,19 +164,6 @@ message MsgRegisterService { // origin is the origin of the request in wildcard form. Requires valid TXT record in DNS. Service service = 2; - - // token is the macron token to authenticate the operation. - string token = 3; - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // origin is the origin of the request in wildcard form. - string origin_uri = 2; - - // PermissionScope is the scope of the service. - repeated PermissionScope scopes = 3; } // MsgRegisterServiceResponse is the response type for the RegisterService RPC. diff --git a/proto/did/v1/types.proto b/proto/did/v1/types.proto deleted file mode 100644 index 1e7b87cfb..000000000 --- a/proto/did/v1/types.proto +++ /dev/null @@ -1,114 +0,0 @@ -syntax = "proto3"; - -package did.v1; - -import "cosmos/msg/v1/msg.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/onsonr/hway/x/did/types"; - -// AssetInfo defines the asset info -message AssetInfo { - string id = 1; - string denom = 2; - string symbol = 3; - string asset_type = 4; - string origin_chain = 5; - string origin_denom = 6; - int32 decimals = 7; - string description = 8; - string image_url = 9; - string coingecko_id = 10; - bool is_enabled = 11; - string ibc_path = 12; - string ibc_channel = 13; - string ibc_port = 14; -} - -// ChainInfo defines the chain info -message ChainInfo { - string id = 1; - string chain_id = 2; - string name = 3; - string symbol = 4; - string bech32_prefix = 5; - string genesis_time = 6; - repeated Endpoint grpc_endpoints = 7; - repeated Endpoint rest_endpoints = 8; - ExplorerInfo explorer = 9; - FeeInfo fee_info = 10; -} - -// Credential defines a WebAuthn credential -message Credential { - string id = 1; - string credential_type = 2; - bytes credential_id = 3; - repeated string transport = 4; - string attestation_type = 5; - string display_name = 6; - string controller = 7; -} - -// Document defines a DID document -message Document { - string id = 1; - repeated VerificationMethod verification_methods = 2; - repeated string authentication = 4; - repeated string assertion_method = 5; - repeated string capability_delegation = 7; - repeated string capability_invocation = 8; -} - -// Endpoint defines an endpoint -message Endpoint { - string url = 1; - bool is_primary = 2; -} - -// ExplorerInfo defines the explorer info -message ExplorerInfo { - string name = 1; - string url = 2; -} - -// FeeInfo defines a fee info -message FeeInfo { - string base_denom = 1; - repeated string fee_rates = 2; - int32 init_gas_limit = 3; - bool is_simulable = 4; - double gas_multiply = 5; -} - -// Identity defines an associated profile for a did subject -message Identity { - string id = 1; - string subject = 2; - string controller = 3; - repeated Credential credentials = 4; - repeated VerificationMethod verification_methods = 5; -} - -// PubKey defines a public key for a did -message PubKey { - string id = 1; - bytes key = 2; - string key_type = 3; - string controller = 4; -} - -// VerificationMethod defines a verification method -message VerificationMethod { - string id = 1; - string controller = 2; - - // The delegation proof or verification method - string public_key_multibase = 3; - - // Public Key JWKS is a map of the associated public keys - map public_key_jwks = 4; -} - - diff --git a/x/did/types/accounts.pb.go b/x/did/types/accounts.pb.go deleted file mode 100644 index 4b9328774..000000000 --- a/x/did/types/accounts.pb.go +++ /dev/null @@ -1,634 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: did/v1/accounts.proto - -package types - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" - math "math" -) - -// 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 BtcAccount struct { -} - -func (m *BtcAccount) Reset() { *m = BtcAccount{} } -func (m *BtcAccount) String() string { return proto.CompactTextString(m) } -func (*BtcAccount) ProtoMessage() {} -func (*BtcAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_2125a09fb14c3bc3, []int{0} -} -func (m *BtcAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BtcAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BtcAccount.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 *BtcAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_BtcAccount.Merge(m, src) -} -func (m *BtcAccount) XXX_Size() int { - return m.Size() -} -func (m *BtcAccount) XXX_DiscardUnknown() { - xxx_messageInfo_BtcAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_BtcAccount proto.InternalMessageInfo - -type EthAccount struct { -} - -func (m *EthAccount) Reset() { *m = EthAccount{} } -func (m *EthAccount) String() string { return proto.CompactTextString(m) } -func (*EthAccount) ProtoMessage() {} -func (*EthAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_2125a09fb14c3bc3, []int{1} -} -func (m *EthAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EthAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EthAccount.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 *EthAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_EthAccount.Merge(m, src) -} -func (m *EthAccount) XXX_Size() int { - return m.Size() -} -func (m *EthAccount) XXX_DiscardUnknown() { - xxx_messageInfo_EthAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_EthAccount proto.InternalMessageInfo - -type IBCAccount struct { -} - -func (m *IBCAccount) Reset() { *m = IBCAccount{} } -func (m *IBCAccount) String() string { return proto.CompactTextString(m) } -func (*IBCAccount) ProtoMessage() {} -func (*IBCAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_2125a09fb14c3bc3, []int{2} -} -func (m *IBCAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IBCAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IBCAccount.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 *IBCAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_IBCAccount.Merge(m, src) -} -func (m *IBCAccount) XXX_Size() int { - return m.Size() -} -func (m *IBCAccount) XXX_DiscardUnknown() { - xxx_messageInfo_IBCAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_IBCAccount proto.InternalMessageInfo - -type SnrAccount struct { -} - -func (m *SnrAccount) Reset() { *m = SnrAccount{} } -func (m *SnrAccount) String() string { return proto.CompactTextString(m) } -func (*SnrAccount) ProtoMessage() {} -func (*SnrAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_2125a09fb14c3bc3, []int{3} -} -func (m *SnrAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnrAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnrAccount.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 *SnrAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnrAccount.Merge(m, src) -} -func (m *SnrAccount) XXX_Size() int { - return m.Size() -} -func (m *SnrAccount) XXX_DiscardUnknown() { - xxx_messageInfo_SnrAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_SnrAccount proto.InternalMessageInfo - -func init() { - proto.RegisterType((*BtcAccount)(nil), "did.v1.BtcAccount") - proto.RegisterType((*EthAccount)(nil), "did.v1.EthAccount") - proto.RegisterType((*IBCAccount)(nil), "did.v1.IBCAccount") - proto.RegisterType((*SnrAccount)(nil), "did.v1.SnrAccount") -} - -func init() { proto.RegisterFile("did/v1/accounts.proto", fileDescriptor_2125a09fb14c3bc3) } - -var fileDescriptor_2125a09fb14c3bc3 = []byte{ - // 145 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4d, 0xc9, 0x4c, 0xd1, - 0x2f, 0x33, 0xd4, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0x17, 0x62, 0x4b, 0xc9, 0x4c, 0xd1, 0x2b, 0x33, 0x54, 0xe2, 0xe1, 0xe2, 0x72, 0x2a, 0x49, - 0x76, 0x84, 0x48, 0x82, 0x78, 0xae, 0x25, 0x19, 0x48, 0x3c, 0x4f, 0x27, 0x67, 0x24, 0x5e, 0x70, - 0x5e, 0x11, 0x94, 0xe7, 0x64, 0x73, 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, - 0x4a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xf9, 0x79, 0xc5, 0xf9, - 0x79, 0x45, 0xfa, 0x60, 0xa2, 0x42, 0x1f, 0xe4, 0x92, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, - 0xb0, 0x23, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x82, 0x7e, 0x89, 0x0a, 0x9d, 0x00, 0x00, - 0x00, -} - -func (m *BtcAccount) 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 *BtcAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BtcAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *EthAccount) 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 *EthAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EthAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *IBCAccount) 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 *IBCAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IBCAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *SnrAccount) 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 *SnrAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnrAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintAccounts(dAtA []byte, offset int, v uint64) int { - offset -= sovAccounts(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *BtcAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *EthAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *IBCAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *SnrAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovAccounts(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAccounts(x uint64) (n int) { - return sovAccounts(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *BtcAccount) 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 ErrIntOverflowAccounts - } - 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: BtcAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BtcAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAccounts(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAccounts - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EthAccount) 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 ErrIntOverflowAccounts - } - 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: EthAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EthAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAccounts(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAccounts - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IBCAccount) 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 ErrIntOverflowAccounts - } - 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: IBCAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IBCAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAccounts(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAccounts - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnrAccount) 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 ErrIntOverflowAccounts - } - 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: SnrAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnrAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAccounts(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAccounts - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAccounts(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, ErrIntOverflowAccounts - } - 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, ErrIntOverflowAccounts - } - 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, ErrIntOverflowAccounts - } - 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, ErrInvalidLengthAccounts - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAccounts - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAccounts - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAccounts = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAccounts = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAccounts = fmt.Errorf("proto: unexpected end of group") -) -func init() { proto.RegisterFile("did/v1/accounts.proto", fileDescriptor_2125a09fb14c3bc3) } - -var fileDescriptor_2125a09fb14c3bc3 = []byte{ - // 122 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4d, 0xc9, 0x4c, 0xd1, - 0x2f, 0x33, 0xd4, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0x17, 0x62, 0x4b, 0xc9, 0x4c, 0xd1, 0x2b, 0x33, 0x74, 0xb2, 0x39, 0xf1, 0x48, 0x8e, 0xf1, - 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, - 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa5, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, - 0x5c, 0xfd, 0xfc, 0xbc, 0xe2, 0xfc, 0xbc, 0x22, 0xfd, 0x8c, 0xf2, 0xc4, 0x4a, 0xfd, 0x0a, 0x7d, - 0x90, 0x89, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0xc3, 0x8c, 0x01, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x28, 0xd1, 0x54, 0x54, 0x65, 0x00, 0x00, 0x00, -} diff --git a/x/did/types/enums.pb.go b/x/did/types/enums.pb.go deleted file mode 100644 index 5d96c7ec0..000000000 --- a/x/did/types/enums.pb.go +++ /dev/null @@ -1,120 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: did/v1/enums.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - math "math" -) - -// 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 - -// PermissionScope define the Capabilities Controllers can grant for Services -type PermissionScope int32 - -const ( - PermissionScope_PERMISSION_SCOPE_UNSPECIFIED PermissionScope = 0 - PermissionScope_PERMISSION_SCOPE_PROFILE_NAME PermissionScope = 1 - PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_EMAIL PermissionScope = 2 - PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_PHONE PermissionScope = 3 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ PermissionScope = 4 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE PermissionScope = 5 - PermissionScope_PERMISSION_SCOPE_WALLETS_READ PermissionScope = 6 - PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE PermissionScope = 7 - PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE PermissionScope = 8 - PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE PermissionScope = 9 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY PermissionScope = 10 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST PermissionScope = 11 - PermissionScope_PERMISSION_SCOPE_ADMIN_USER PermissionScope = 12 - PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR PermissionScope = 13 -) - -var PermissionScope_name = map[int32]string{ - 0: "PERMISSION_SCOPE_UNSPECIFIED", - 1: "PERMISSION_SCOPE_PROFILE_NAME", - 2: "PERMISSION_SCOPE_IDENTIFIERS_EMAIL", - 3: "PERMISSION_SCOPE_IDENTIFIERS_PHONE", - 4: "PERMISSION_SCOPE_TRANSACTIONS_READ", - 5: "PERMISSION_SCOPE_TRANSACTIONS_WRITE", - 6: "PERMISSION_SCOPE_WALLETS_READ", - 7: "PERMISSION_SCOPE_WALLETS_CREATE", - 8: "PERMISSION_SCOPE_WALLETS_SUBSCRIBE", - 9: "PERMISSION_SCOPE_WALLETS_UPDATE", - 10: "PERMISSION_SCOPE_TRANSACTIONS_VERIFY", - 11: "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST", - 12: "PERMISSION_SCOPE_ADMIN_USER", - 13: "PERMISSION_SCOPE_ADMIN_VALIDATOR", -} - -var PermissionScope_value = map[string]int32{ - "PERMISSION_SCOPE_UNSPECIFIED": 0, - "PERMISSION_SCOPE_PROFILE_NAME": 1, - "PERMISSION_SCOPE_IDENTIFIERS_EMAIL": 2, - "PERMISSION_SCOPE_IDENTIFIERS_PHONE": 3, - "PERMISSION_SCOPE_TRANSACTIONS_READ": 4, - "PERMISSION_SCOPE_TRANSACTIONS_WRITE": 5, - "PERMISSION_SCOPE_WALLETS_READ": 6, - "PERMISSION_SCOPE_WALLETS_CREATE": 7, - "PERMISSION_SCOPE_WALLETS_SUBSCRIBE": 8, - "PERMISSION_SCOPE_WALLETS_UPDATE": 9, - "PERMISSION_SCOPE_TRANSACTIONS_VERIFY": 10, - "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": 11, - "PERMISSION_SCOPE_ADMIN_USER": 12, - "PERMISSION_SCOPE_ADMIN_VALIDATOR": 13, -} - -func (x PermissionScope) String() string { - return proto.EnumName(PermissionScope_name, int32(x)) -} - -func (PermissionScope) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_001c58538597e328, []int{0} -} - -func init() { - proto.RegisterEnum("did.v1.PermissionScope", PermissionScope_name, PermissionScope_value) -} - -func init() { proto.RegisterFile("did/v1/enums.proto", fileDescriptor_001c58538597e328) } - -var fileDescriptor_001c58538597e328 = []byte{ - // 388 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0xd2, 0xc1, 0x6e, 0xd3, 0x30, - 0x18, 0x07, 0xf0, 0x04, 0x46, 0x01, 0x03, 0xc2, 0x58, 0x9c, 0x06, 0x64, 0x63, 0x9b, 0x18, 0x02, - 0xa9, 0xd6, 0xc4, 0x95, 0x8b, 0x93, 0x7c, 0x15, 0x96, 0x12, 0x27, 0xb2, 0x9d, 0x4d, 0x70, 0x89, - 0xd6, 0x26, 0x6a, 0x73, 0x48, 0x5c, 0x35, 0x6d, 0xa1, 0x6f, 0xc1, 0x73, 0xf0, 0x24, 0x1c, 0x7b, - 0xe4, 0x88, 0xda, 0x17, 0x41, 0x69, 0xe1, 0xd4, 0x36, 0x5c, 0x2c, 0xeb, 0xf3, 0x4f, 0x7f, 0x7d, - 0x96, 0xfe, 0x88, 0x64, 0x45, 0x46, 0xe7, 0x57, 0x34, 0xaf, 0x66, 0x65, 0xdd, 0x1d, 0x4f, 0xcc, - 0xd4, 0x90, 0x4e, 0x56, 0x64, 0xdd, 0xf9, 0xd5, 0xf1, 0xf3, 0xa1, 0x19, 0x9a, 0xcd, 0x88, 0x36, - 0xb7, 0xed, 0xeb, 0xf1, 0xb3, 0xdb, 0xb2, 0xa8, 0x0c, 0xdd, 0x9c, 0xdb, 0xd1, 0xbb, 0x1f, 0x47, - 0xe8, 0x69, 0x9c, 0x4f, 0xca, 0xa2, 0xae, 0x0b, 0x53, 0xa9, 0x81, 0x19, 0xe7, 0xe4, 0x14, 0xbd, - 0x8c, 0x41, 0x86, 0x5c, 0x29, 0x1e, 0x89, 0x54, 0x79, 0x51, 0x0c, 0x69, 0x22, 0x54, 0x0c, 0x1e, - 0xef, 0x71, 0xf0, 0xb1, 0x45, 0x5e, 0xa3, 0x57, 0x3b, 0x22, 0x96, 0x51, 0x8f, 0x07, 0x90, 0x0a, - 0x16, 0x02, 0xb6, 0xc9, 0x1b, 0x74, 0xb6, 0x43, 0xb8, 0x0f, 0x42, 0x37, 0x19, 0x52, 0xa5, 0x10, - 0x32, 0x1e, 0xe0, 0x3b, 0xff, 0x75, 0xf1, 0xa7, 0x48, 0x00, 0xbe, 0xbb, 0xd7, 0x69, 0xc9, 0x84, - 0x62, 0x9e, 0xe6, 0x91, 0x50, 0xa9, 0x04, 0xe6, 0xe3, 0x23, 0x72, 0x89, 0xce, 0xdb, 0xdd, 0x8d, - 0xe4, 0x1a, 0xf0, 0xbd, 0xbd, 0x7f, 0xb8, 0x61, 0x41, 0x00, 0xfa, 0x6f, 0x56, 0x87, 0x9c, 0xa3, - 0x93, 0x83, 0xc4, 0x93, 0xc0, 0x34, 0xe0, 0xfb, 0x7b, 0x17, 0xfb, 0x87, 0x54, 0xe2, 0x2a, 0x4f, - 0x72, 0x17, 0xf0, 0x83, 0xd6, 0xb0, 0x24, 0xf6, 0x9b, 0xb0, 0x87, 0xe4, 0x2d, 0xba, 0x68, 0xdf, - 0xfe, 0x1a, 0x24, 0xef, 0x7d, 0xc6, 0x88, 0xbc, 0x47, 0x97, 0xed, 0xd2, 0x95, 0x11, 0xf3, 0x3d, - 0xa6, 0x34, 0x7e, 0x44, 0x4e, 0xd0, 0x8b, 0x1d, 0xcc, 0xfc, 0x90, 0x8b, 0x34, 0x51, 0x20, 0xf1, - 0x63, 0x72, 0x81, 0x4e, 0x0f, 0x80, 0x6b, 0x16, 0x70, 0x9f, 0xe9, 0x48, 0xe2, 0x27, 0xee, 0xc7, - 0x9f, 0x2b, 0xc7, 0x5e, 0xae, 0x1c, 0xfb, 0xf7, 0xca, 0xb1, 0xbf, 0xaf, 0x1d, 0x6b, 0xb9, 0x76, - 0xac, 0x5f, 0x6b, 0xc7, 0xfa, 0x72, 0x36, 0x2c, 0xa6, 0xa3, 0x59, 0xbf, 0x3b, 0x30, 0x25, 0x35, - 0x55, 0x6d, 0xaa, 0x09, 0x1d, 0x7d, 0xbd, 0x5d, 0xd0, 0x6f, 0xb4, 0x29, 0xe9, 0x74, 0x31, 0xce, - 0xeb, 0x7e, 0x67, 0xd3, 0xb8, 0x0f, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x1a, 0xa8, 0xd9, - 0xb8, 0x02, 0x00, 0x00, -} diff --git a/x/did/types/scopes.go b/x/did/types/scopes.go deleted file mode 100644 index c64c97922..000000000 --- a/x/did/types/scopes.go +++ /dev/null @@ -1,53 +0,0 @@ -package types - -import "gopkg.in/macaroon-bakery.v2/bakery/checkers" - -var ( - PermissionScopeStrings = [...]string{ - "profile.name", - "identifiers.email", - "identifiers.phone", - "transactions.read", - "transactions.write", - "wallets.read", - "wallets.create", - "wallets.subscribe", - "wallets.update", - "transactions.verify", - "transactions.broadcast", - "admin.user", - "admin.validator", - } - - StringToPermissionScope = map[string]PermissionScope{ - "PERMISSION_SCOPE_UNSPECIFIED": PermissionScope_PERMISSION_SCOPE_UNSPECIFIED, - "PERMISSION_SCOPE_BASIC_INFO": PermissionScope_PERMISSION_SCOPE_BASIC_INFO, - "PERMISSION_SCOPE_IDENTIFIERS_EMAIL": PermissionScope_PERMISSION_SCOPE_PERMISSIONS_READ, - "PERMISSION_SCOPE_IDENTIFIERS_PHONE": PermissionScope_PERMISSION_SCOPE_PERMISSIONS_WRITE, - "PERMISSION_SCOPE_TRANSACTIONS_READ": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ, - "PERMISSION_SCOPE_TRANSACTIONS_WRITE": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE, - "PERMISSION_SCOPE_WALLETS_READ": PermissionScope_PERMISSION_SCOPE_WALLETS_READ, - "PERMISSION_SCOPE_WALLETS_CREATE": PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE, - "PERMISSION_SCOPE_WALLETS_SUBSCRIBE": PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE, - "PERMISSION_SCOPE_WALLETS_UPDATE": PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE, - "PERMISSION_SCOPE_TRANSACTIONS_VERIFY": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY, - "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST, - "PERMISSION_SCOPE_ADMIN_USER": PermissionScope_PERMISSION_SCOPE_ADMIN_USER, - "PERMISSION_SCOPE_ADMIN_VALIDATOR": PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR, - } -) - -func ResolvePermissionScope(scope string) (PermissionScope, bool) { - uriToPrefix := make(map[string]string) - for _, scope := range PermissionScopeStrings { - uriToPrefix["https://example.com/auth/"+scope] = scope - } - PermissionNamespace := checkers.NewNamespace(uriToPrefix) - - prefix, ok := PermissionNamespace.Resolve("https://example.com/auth/" + scope) - if !ok { - return 0, false - } - permScope, ok := StringToPermissionScope[prefix] - return permScope, ok -} diff --git a/x/did/types/types.go b/x/did/types/types.go deleted file mode 100644 index 777f908ff..000000000 --- a/x/did/types/types.go +++ /dev/null @@ -1,15 +0,0 @@ -package types - -func (a *AssetInfo) Equal(b *AssetInfo) bool { - if a == nil && b == nil { - return true - } - return false -} - -func (c *ChainInfo) Equal(b *ChainInfo) bool { - if c == nil && b == nil { - return true - } - return false -} diff --git a/x/did/types/types.pb.go b/x/did/types/types.pb.go deleted file mode 100644 index 3329dca2e..000000000 --- a/x/did/types/types.pb.go +++ /dev/null @@ -1,4548 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: did/v1/types.proto - -package types - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/types/msgservice" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/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 - -// AssetInfo defines the asset info -type AssetInfo struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` - AssetType string `protobuf:"bytes,4,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - OriginChain string `protobuf:"bytes,5,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` - OriginDenom string `protobuf:"bytes,6,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` - Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` - Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` - ImageUrl string `protobuf:"bytes,9,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` - CoingeckoId string `protobuf:"bytes,10,opt,name=coingecko_id,json=coingeckoId,proto3" json:"coingecko_id,omitempty"` - IsEnabled bool `protobuf:"varint,11,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` - IbcPath string `protobuf:"bytes,12,opt,name=ibc_path,json=ibcPath,proto3" json:"ibc_path,omitempty"` - IbcChannel string `protobuf:"bytes,13,opt,name=ibc_channel,json=ibcChannel,proto3" json:"ibc_channel,omitempty"` - IbcPort string `protobuf:"bytes,14,opt,name=ibc_port,json=ibcPort,proto3" json:"ibc_port,omitempty"` -} - -func (m *AssetInfo) Reset() { *m = AssetInfo{} } -func (m *AssetInfo) String() string { return proto.CompactTextString(m) } -func (*AssetInfo) ProtoMessage() {} -func (*AssetInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{0} -} -func (m *AssetInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetInfo.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 *AssetInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetInfo.Merge(m, src) -} -func (m *AssetInfo) XXX_Size() int { - return m.Size() -} -func (m *AssetInfo) XXX_DiscardUnknown() { - xxx_messageInfo_AssetInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetInfo proto.InternalMessageInfo - -func (m *AssetInfo) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *AssetInfo) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *AssetInfo) GetSymbol() string { - if m != nil { - return m.Symbol - } - return "" -} - -func (m *AssetInfo) GetAssetType() string { - if m != nil { - return m.AssetType - } - return "" -} - -func (m *AssetInfo) GetOriginChain() string { - if m != nil { - return m.OriginChain - } - return "" -} - -func (m *AssetInfo) GetOriginDenom() string { - if m != nil { - return m.OriginDenom - } - return "" -} - -func (m *AssetInfo) GetDecimals() int32 { - if m != nil { - return m.Decimals - } - return 0 -} - -func (m *AssetInfo) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *AssetInfo) GetImageUrl() string { - if m != nil { - return m.ImageUrl - } - return "" -} - -func (m *AssetInfo) GetCoingeckoId() string { - if m != nil { - return m.CoingeckoId - } - return "" -} - -func (m *AssetInfo) GetIsEnabled() bool { - if m != nil { - return m.IsEnabled - } - return false -} - -func (m *AssetInfo) GetIbcPath() string { - if m != nil { - return m.IbcPath - } - return "" -} - -func (m *AssetInfo) GetIbcChannel() string { - if m != nil { - return m.IbcChannel - } - return "" -} - -func (m *AssetInfo) GetIbcPort() string { - if m != nil { - return m.IbcPort - } - return "" -} - -// ChainInfo defines the chain info -type ChainInfo struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` - Bech32Prefix string `protobuf:"bytes,5,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` - GenesisTime string `protobuf:"bytes,6,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` - GrpcEndpoints []*Endpoint `protobuf:"bytes,7,rep,name=grpc_endpoints,json=grpcEndpoints,proto3" json:"grpc_endpoints,omitempty"` - RestEndpoints []*Endpoint `protobuf:"bytes,8,rep,name=rest_endpoints,json=restEndpoints,proto3" json:"rest_endpoints,omitempty"` - Explorer *ExplorerInfo `protobuf:"bytes,9,opt,name=explorer,proto3" json:"explorer,omitempty"` - FeeInfo *FeeInfo `protobuf:"bytes,10,opt,name=fee_info,json=feeInfo,proto3" json:"fee_info,omitempty"` -} - -func (m *ChainInfo) Reset() { *m = ChainInfo{} } -func (m *ChainInfo) String() string { return proto.CompactTextString(m) } -func (*ChainInfo) ProtoMessage() {} -func (*ChainInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{1} -} -func (m *ChainInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChainInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChainInfo.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 *ChainInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainInfo.Merge(m, src) -} -func (m *ChainInfo) XXX_Size() int { - return m.Size() -} -func (m *ChainInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ChainInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainInfo proto.InternalMessageInfo - -func (m *ChainInfo) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *ChainInfo) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *ChainInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ChainInfo) GetSymbol() string { - if m != nil { - return m.Symbol - } - return "" -} - -func (m *ChainInfo) GetBech32Prefix() string { - if m != nil { - return m.Bech32Prefix - } - return "" -} - -func (m *ChainInfo) GetGenesisTime() string { - if m != nil { - return m.GenesisTime - } - return "" -} - -func (m *ChainInfo) GetGrpcEndpoints() []*Endpoint { - if m != nil { - return m.GrpcEndpoints - } - return nil -} - -func (m *ChainInfo) GetRestEndpoints() []*Endpoint { - if m != nil { - return m.RestEndpoints - } - return nil -} - -func (m *ChainInfo) GetExplorer() *ExplorerInfo { - if m != nil { - return m.Explorer - } - return nil -} - -func (m *ChainInfo) GetFeeInfo() *FeeInfo { - if m != nil { - return m.FeeInfo - } - return nil -} - -// Credential defines a WebAuthn credential -type Credential struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - CredentialType string `protobuf:"bytes,2,opt,name=credential_type,json=credentialType,proto3" json:"credential_type,omitempty"` - CredentialId []byte `protobuf:"bytes,3,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` - Transport []string `protobuf:"bytes,4,rep,name=transport,proto3" json:"transport,omitempty"` - AttestationType string `protobuf:"bytes,5,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"` - DisplayName string `protobuf:"bytes,6,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Controller string `protobuf:"bytes,7,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (m *Credential) Reset() { *m = Credential{} } -func (m *Credential) String() string { return proto.CompactTextString(m) } -func (*Credential) ProtoMessage() {} -func (*Credential) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{2} -} -func (m *Credential) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Credential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Credential.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 *Credential) XXX_Merge(src proto.Message) { - xxx_messageInfo_Credential.Merge(m, src) -} -func (m *Credential) XXX_Size() int { - return m.Size() -} -func (m *Credential) XXX_DiscardUnknown() { - xxx_messageInfo_Credential.DiscardUnknown(m) -} - -var xxx_messageInfo_Credential proto.InternalMessageInfo - -func (m *Credential) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Credential) GetCredentialType() string { - if m != nil { - return m.CredentialType - } - return "" -} - -func (m *Credential) GetCredentialId() []byte { - if m != nil { - return m.CredentialId - } - return nil -} - -func (m *Credential) GetTransport() []string { - if m != nil { - return m.Transport - } - return nil -} - -func (m *Credential) GetAttestationType() string { - if m != nil { - return m.AttestationType - } - return "" -} - -func (m *Credential) GetDisplayName() string { - if m != nil { - return m.DisplayName - } - return "" -} - -func (m *Credential) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -// Document defines a DID document -type Document struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - VerificationMethods []*VerificationMethod `protobuf:"bytes,2,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` - Authentication []string `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"` - AssertionMethod []string `protobuf:"bytes,5,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` - CapabilityDelegation []string `protobuf:"bytes,7,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` - CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` -} - -func (m *Document) Reset() { *m = Document{} } -func (m *Document) String() string { return proto.CompactTextString(m) } -func (*Document) ProtoMessage() {} -func (*Document) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{3} -} -func (m *Document) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Document) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Document.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 *Document) XXX_Merge(src proto.Message) { - xxx_messageInfo_Document.Merge(m, src) -} -func (m *Document) XXX_Size() int { - return m.Size() -} -func (m *Document) XXX_DiscardUnknown() { - xxx_messageInfo_Document.DiscardUnknown(m) -} - -var xxx_messageInfo_Document proto.InternalMessageInfo - -func (m *Document) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Document) GetVerificationMethods() []*VerificationMethod { - if m != nil { - return m.VerificationMethods - } - return nil -} - -func (m *Document) GetAuthentication() []string { - if m != nil { - return m.Authentication - } - return nil -} - -func (m *Document) GetAssertionMethod() []string { - if m != nil { - return m.AssertionMethod - } - return nil -} - -func (m *Document) GetCapabilityDelegation() []string { - if m != nil { - return m.CapabilityDelegation - } - return nil -} - -func (m *Document) GetCapabilityInvocation() []string { - if m != nil { - return m.CapabilityInvocation - } - return nil -} - -// Endpoint defines an endpoint -type Endpoint struct { - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` -} - -func (m *Endpoint) Reset() { *m = Endpoint{} } -func (m *Endpoint) String() string { return proto.CompactTextString(m) } -func (*Endpoint) ProtoMessage() {} -func (*Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{4} -} -func (m *Endpoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Endpoint.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 *Endpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Endpoint.Merge(m, src) -} -func (m *Endpoint) XXX_Size() int { - return m.Size() -} -func (m *Endpoint) XXX_DiscardUnknown() { - xxx_messageInfo_Endpoint.DiscardUnknown(m) -} - -var xxx_messageInfo_Endpoint proto.InternalMessageInfo - -func (m *Endpoint) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -func (m *Endpoint) GetIsPrimary() bool { - if m != nil { - return m.IsPrimary - } - return false -} - -// ExplorerInfo defines the explorer info -type ExplorerInfo struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (m *ExplorerInfo) Reset() { *m = ExplorerInfo{} } -func (m *ExplorerInfo) String() string { return proto.CompactTextString(m) } -func (*ExplorerInfo) ProtoMessage() {} -func (*ExplorerInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{5} -} -func (m *ExplorerInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExplorerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExplorerInfo.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 *ExplorerInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExplorerInfo.Merge(m, src) -} -func (m *ExplorerInfo) XXX_Size() int { - return m.Size() -} -func (m *ExplorerInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ExplorerInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ExplorerInfo proto.InternalMessageInfo - -func (m *ExplorerInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ExplorerInfo) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -// FeeInfo defines a fee info -type FeeInfo struct { - BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` - FeeRates []string `protobuf:"bytes,2,rep,name=fee_rates,json=feeRates,proto3" json:"fee_rates,omitempty"` - InitGasLimit int32 `protobuf:"varint,3,opt,name=init_gas_limit,json=initGasLimit,proto3" json:"init_gas_limit,omitempty"` - IsSimulable bool `protobuf:"varint,4,opt,name=is_simulable,json=isSimulable,proto3" json:"is_simulable,omitempty"` - GasMultiply float64 `protobuf:"fixed64,5,opt,name=gas_multiply,json=gasMultiply,proto3" json:"gas_multiply,omitempty"` -} - -func (m *FeeInfo) Reset() { *m = FeeInfo{} } -func (m *FeeInfo) String() string { return proto.CompactTextString(m) } -func (*FeeInfo) ProtoMessage() {} -func (*FeeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{6} -} -func (m *FeeInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FeeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FeeInfo.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 *FeeInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_FeeInfo.Merge(m, src) -} -func (m *FeeInfo) XXX_Size() int { - return m.Size() -} -func (m *FeeInfo) XXX_DiscardUnknown() { - xxx_messageInfo_FeeInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_FeeInfo proto.InternalMessageInfo - -func (m *FeeInfo) GetBaseDenom() string { - if m != nil { - return m.BaseDenom - } - return "" -} - -func (m *FeeInfo) GetFeeRates() []string { - if m != nil { - return m.FeeRates - } - return nil -} - -func (m *FeeInfo) GetInitGasLimit() int32 { - if m != nil { - return m.InitGasLimit - } - return 0 -} - -func (m *FeeInfo) GetIsSimulable() bool { - if m != nil { - return m.IsSimulable - } - return false -} - -func (m *FeeInfo) GetGasMultiply() float64 { - if m != nil { - return m.GasMultiply - } - return 0 -} - -// Identity defines an associated profile for a did subject -type Identity struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` - Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` - VerificationMethods []*VerificationMethod `protobuf:"bytes,5,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` -} - -func (m *Identity) Reset() { *m = Identity{} } -func (m *Identity) String() string { return proto.CompactTextString(m) } -func (*Identity) ProtoMessage() {} -func (*Identity) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{7} -} -func (m *Identity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Identity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Identity.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 *Identity) XXX_Merge(src proto.Message) { - xxx_messageInfo_Identity.Merge(m, src) -} -func (m *Identity) XXX_Size() int { - return m.Size() -} -func (m *Identity) XXX_DiscardUnknown() { - xxx_messageInfo_Identity.DiscardUnknown(m) -} - -var xxx_messageInfo_Identity proto.InternalMessageInfo - -func (m *Identity) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Identity) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *Identity) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *Identity) GetCredentials() []*Credential { - if m != nil { - return m.Credentials - } - return nil -} - -func (m *Identity) GetVerificationMethods() []*VerificationMethod { - if m != nil { - return m.VerificationMethods - } - return nil -} - -// PubKey defines a public key for a did -type PubKey struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - KeyType string `protobuf:"bytes,3,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` - Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (m *PubKey) Reset() { *m = PubKey{} } -func (m *PubKey) String() string { return proto.CompactTextString(m) } -func (*PubKey) ProtoMessage() {} -func (*PubKey) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{8} -} -func (m *PubKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PubKey.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 *PubKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_PubKey.Merge(m, src) -} -func (m *PubKey) XXX_Size() int { - return m.Size() -} -func (m *PubKey) XXX_DiscardUnknown() { - xxx_messageInfo_PubKey.DiscardUnknown(m) -} - -var xxx_messageInfo_PubKey proto.InternalMessageInfo - -func (m *PubKey) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *PubKey) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *PubKey) GetKeyType() string { - if m != nil { - return m.KeyType - } - return "" -} - -func (m *PubKey) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -// VerificationMethod defines a verification method -type VerificationMethod struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // The delegation proof or verification method - PublicKeyMultibase string `protobuf:"bytes,3,opt,name=public_key_multibase,json=publicKeyMultibase,proto3" json:"public_key_multibase,omitempty"` - // Public Key JWKS is a map of the associated public keys - PublicKeyJwks map[string]string `protobuf:"bytes,4,rep,name=public_key_jwks,json=publicKeyJwks,proto3" json:"public_key_jwks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -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_e3176cd2dbe76ac1, []int{9} -} -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) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *VerificationMethod) GetPublicKeyMultibase() string { - if m != nil { - return m.PublicKeyMultibase - } - return "" -} - -func (m *VerificationMethod) GetPublicKeyJwks() map[string]string { - if m != nil { - return m.PublicKeyJwks - } - return nil -} - -func init() { - proto.RegisterType((*AssetInfo)(nil), "did.v1.AssetInfo") - proto.RegisterType((*ChainInfo)(nil), "did.v1.ChainInfo") - proto.RegisterType((*Credential)(nil), "did.v1.Credential") - proto.RegisterType((*Document)(nil), "did.v1.Document") - proto.RegisterType((*Endpoint)(nil), "did.v1.Endpoint") - proto.RegisterType((*ExplorerInfo)(nil), "did.v1.ExplorerInfo") - proto.RegisterType((*FeeInfo)(nil), "did.v1.FeeInfo") - proto.RegisterType((*Identity)(nil), "did.v1.Identity") - proto.RegisterType((*PubKey)(nil), "did.v1.PubKey") - proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod") - proto.RegisterMapType((map[string]string)(nil), "did.v1.VerificationMethod.PublicKeyJwksEntry") -} - -func init() { proto.RegisterFile("did/v1/types.proto", fileDescriptor_e3176cd2dbe76ac1) } - -var fileDescriptor_e3176cd2dbe76ac1 = []byte{ - // 1133 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x72, 0xe3, 0x44, - 0x10, 0x8e, 0xec, 0x38, 0x96, 0xda, 0x8e, 0x93, 0x1a, 0x0c, 0x28, 0x59, 0x30, 0xc1, 0x4b, 0x41, - 0xa0, 0x0a, 0x7b, 0x37, 0xd9, 0x2a, 0x28, 0xe0, 0x00, 0x24, 0x81, 0x32, 0x4b, 0xa8, 0x94, 0xd8, - 0xe5, 0xc0, 0x45, 0x35, 0x92, 0xc6, 0xf2, 0xac, 0x25, 0x8d, 0x4a, 0x33, 0x76, 0xa2, 0xa7, 0x80, - 0x67, 0xe0, 0xc0, 0x9d, 0xb7, 0xe0, 0xb8, 0x47, 0xb8, 0x51, 0xc9, 0x3b, 0x70, 0xe0, 0x44, 0xcd, - 0x8c, 0x24, 0x2b, 0x31, 0xb9, 0x70, 0x9b, 0xfe, 0xba, 0x7b, 0x7e, 0xfa, 0xfb, 0xba, 0x6b, 0x00, - 0x05, 0x34, 0x18, 0x2f, 0x1f, 0x8f, 0x45, 0x9e, 0x12, 0x3e, 0x4a, 0x33, 0x26, 0x18, 0xda, 0x0a, - 0x68, 0x30, 0x5a, 0x3e, 0xde, 0x7f, 0xdd, 0x67, 0x3c, 0x66, 0x7c, 0x1c, 0xf3, 0x50, 0x86, 0xc4, - 0x3c, 0xd4, 0x01, 0xfb, 0xfd, 0x90, 0x85, 0x4c, 0x2d, 0xc7, 0x72, 0x55, 0xa0, 0x7b, 0x3a, 0xdc, - 0xd5, 0x0e, 0x6d, 0x68, 0xd7, 0xf0, 0x97, 0x26, 0x58, 0x5f, 0x70, 0x4e, 0xc4, 0x24, 0x99, 0x32, - 0xd4, 0x83, 0x06, 0x0d, 0x6c, 0xe3, 0xc0, 0x38, 0xb4, 0x9c, 0x06, 0x0d, 0x50, 0x1f, 0x5a, 0x01, - 0x49, 0x58, 0x6c, 0x37, 0x14, 0xa4, 0x0d, 0xf4, 0x1a, 0x6c, 0xf1, 0x3c, 0xf6, 0x58, 0x64, 0x37, - 0x15, 0x5c, 0x58, 0xe8, 0x4d, 0x00, 0x2c, 0xb7, 0x72, 0xe5, 0x95, 0xed, 0x4d, 0xe5, 0xb3, 0x14, - 0xf2, 0x2c, 0x4f, 0x09, 0x7a, 0x1b, 0xba, 0x2c, 0xa3, 0x21, 0x4d, 0x5c, 0x7f, 0x86, 0x69, 0x62, - 0xb7, 0x54, 0x40, 0x47, 0x63, 0x27, 0x12, 0xaa, 0x85, 0xe8, 0x63, 0xb7, 0xea, 0x21, 0xa7, 0xea, - 0xf0, 0x7d, 0x30, 0x03, 0xe2, 0xd3, 0x18, 0x47, 0xdc, 0x6e, 0x1f, 0x18, 0x87, 0x2d, 0xa7, 0xb2, - 0xd1, 0x01, 0x74, 0x02, 0xc2, 0xfd, 0x8c, 0xa6, 0x82, 0xb2, 0xc4, 0x36, 0x75, 0x76, 0x0d, 0x42, - 0x0f, 0xc0, 0xa2, 0x31, 0x0e, 0x89, 0xbb, 0xc8, 0x22, 0xdb, 0x52, 0x7e, 0x53, 0x01, 0xcf, 0xb3, - 0x48, 0x9e, 0xee, 0x33, 0x9a, 0x84, 0xc4, 0x9f, 0x33, 0x97, 0x06, 0x36, 0xe8, 0xfc, 0x0a, 0x9b, - 0x04, 0xf2, 0x89, 0x94, 0xbb, 0x24, 0xc1, 0x5e, 0x44, 0x02, 0xbb, 0x73, 0x60, 0x1c, 0x9a, 0x8e, - 0x45, 0xf9, 0x99, 0x06, 0xd0, 0x1e, 0x98, 0xd4, 0xf3, 0xdd, 0x14, 0x8b, 0x99, 0xdd, 0x55, 0xd9, - 0x6d, 0xea, 0xf9, 0x17, 0x58, 0xcc, 0xd0, 0x5b, 0xd0, 0x91, 0x2e, 0x7f, 0x86, 0x93, 0x84, 0x44, - 0xf6, 0xb6, 0xf2, 0x02, 0xf5, 0xfc, 0x13, 0x8d, 0x54, 0xb9, 0x2c, 0x13, 0x76, 0x6f, 0x95, 0xcb, - 0x32, 0x31, 0xfc, 0xa7, 0x01, 0x96, 0x2a, 0xd0, 0x7f, 0x92, 0xb4, 0x07, 0xa6, 0x2a, 0xa8, 0xbc, - 0xb2, 0xe6, 0xa9, 0xad, 0xec, 0x49, 0x80, 0x10, 0x6c, 0x26, 0x38, 0x26, 0x05, 0x4f, 0x6a, 0x5d, - 0x63, 0x6f, 0xf3, 0x16, 0x7b, 0x0f, 0x61, 0xdb, 0x23, 0xfe, 0xec, 0xf8, 0xc8, 0x4d, 0x33, 0x32, - 0xa5, 0x57, 0x05, 0x3f, 0x5d, 0x0d, 0x5e, 0x28, 0x4c, 0x96, 0x28, 0x24, 0x09, 0xe1, 0x94, 0xbb, - 0x82, 0xc6, 0xa4, 0x24, 0xa8, 0xc0, 0x9e, 0xd1, 0x98, 0xa0, 0x8f, 0xa0, 0x17, 0x66, 0xa9, 0xef, - 0x92, 0x24, 0x48, 0x19, 0x4d, 0x84, 0xa4, 0xa9, 0x79, 0xd8, 0x39, 0xda, 0x1d, 0x69, 0xf1, 0x8e, - 0xce, 0x0a, 0x87, 0xb3, 0x2d, 0xe3, 0x4a, 0x8b, 0xcb, 0xc4, 0x8c, 0x70, 0x51, 0x4b, 0x34, 0xef, - 0x4b, 0x94, 0x71, 0xab, 0xc4, 0x47, 0x60, 0x92, 0xab, 0x34, 0x62, 0x19, 0xc9, 0x14, 0xa7, 0x9d, - 0xa3, 0x7e, 0x95, 0x52, 0xe0, 0xb2, 0x70, 0x4e, 0x15, 0x85, 0x3e, 0x00, 0x73, 0x4a, 0x88, 0x4b, - 0x93, 0x29, 0x53, 0x2c, 0x77, 0x8e, 0x76, 0xca, 0x8c, 0xaf, 0x08, 0x51, 0xc1, 0xed, 0xa9, 0x5e, - 0x0c, 0xff, 0x36, 0x00, 0x4e, 0x32, 0x12, 0x90, 0x44, 0x50, 0x1c, 0xad, 0x55, 0xff, 0x3d, 0xd8, - 0xf1, 0x2b, 0xaf, 0x56, 0xbe, 0x26, 0xa1, 0xb7, 0x82, 0x95, 0xfc, 0x1f, 0xc2, 0x76, 0x2d, 0x90, - 0x06, 0x8a, 0x94, 0xae, 0xd3, 0x5d, 0x81, 0x93, 0x00, 0xbd, 0x01, 0x96, 0xc8, 0x70, 0xc2, 0x95, - 0x0a, 0x36, 0x0f, 0x9a, 0xb2, 0x83, 0x2a, 0x00, 0xbd, 0x0f, 0xbb, 0x58, 0x08, 0xc2, 0x05, 0x96, - 0x62, 0xd6, 0x87, 0x69, 0x96, 0x76, 0x6a, 0x78, 0xd9, 0x6c, 0x01, 0xe5, 0x69, 0x84, 0x73, 0x57, - 0x29, 0xa0, 0x20, 0xaa, 0xc0, 0xbe, 0x93, 0x42, 0x18, 0x00, 0xf8, 0x2c, 0x11, 0x19, 0x8b, 0x22, - 0x92, 0xa9, 0x5e, 0xb2, 0x9c, 0x1a, 0x32, 0xfc, 0xb5, 0x01, 0xe6, 0x29, 0xf3, 0x17, 0x31, 0x49, - 0xc4, 0xda, 0xb3, 0xcf, 0xa1, 0xbf, 0x24, 0x19, 0x9d, 0x52, 0x5f, 0xdf, 0x25, 0x26, 0x62, 0xc6, - 0x02, 0x6e, 0x37, 0x14, 0x65, 0xfb, 0x65, 0x35, 0x7f, 0xa8, 0xc5, 0x9c, 0xab, 0x10, 0xe7, 0x95, - 0xe5, 0x1a, 0xc6, 0xd1, 0xbb, 0xd0, 0xc3, 0x0b, 0x31, 0x93, 0x75, 0xd0, 0x8e, 0xe2, 0xf1, 0x77, - 0x50, 0x55, 0x01, 0xce, 0x49, 0x56, 0x3b, 0xd3, 0x6e, 0xa9, 0xc8, 0x9d, 0x0a, 0xd7, 0x7b, 0xa2, - 0x63, 0x78, 0xd5, 0xc7, 0x29, 0xf6, 0x68, 0x44, 0x45, 0xee, 0x06, 0x24, 0x22, 0xa1, 0xde, 0xb9, - 0xad, 0xe2, 0xfb, 0x2b, 0xe7, 0x69, 0xe5, 0xbb, 0x93, 0x44, 0x93, 0x25, 0x2b, 0xae, 0x63, 0xde, - 0x4d, 0x9a, 0x54, 0xbe, 0xe1, 0xa7, 0x60, 0x96, 0x62, 0x44, 0xbb, 0xd0, 0x94, 0xa3, 0x45, 0x17, - 0x4a, 0x2e, 0x8b, 0x91, 0x91, 0x66, 0x34, 0xc6, 0x59, 0xae, 0xb4, 0xa1, 0x46, 0xc6, 0x85, 0x06, - 0x86, 0x4f, 0xa0, 0x5b, 0x17, 0x69, 0xd5, 0xb2, 0x46, 0xad, 0x65, 0x8b, 0x4d, 0x1b, 0xd5, 0xa6, - 0xc3, 0xdf, 0x0c, 0x68, 0x17, 0x4a, 0x95, 0x07, 0x78, 0x98, 0x93, 0x62, 0x64, 0xea, 0x3c, 0x4b, - 0x22, 0x7a, 0x60, 0x3e, 0x00, 0x4b, 0x6a, 0x3d, 0xc3, 0x82, 0x68, 0x7a, 0x2c, 0x47, 0x8a, 0xdf, - 0x91, 0x36, 0x7a, 0x07, 0x7a, 0x34, 0xa1, 0xc2, 0x0d, 0x31, 0x77, 0x23, 0x1a, 0x53, 0xa1, 0x54, - 0xd9, 0x72, 0xba, 0x12, 0xfd, 0x1a, 0xf3, 0x6f, 0x25, 0x26, 0xc5, 0x44, 0xb9, 0xcb, 0x69, 0xbc, - 0x88, 0xe4, 0x9c, 0x53, 0x83, 0xc3, 0x74, 0x3a, 0x94, 0x7f, 0x5f, 0x42, 0x6a, 0x30, 0x60, 0xee, - 0xc6, 0x8b, 0x48, 0xd0, 0x34, 0xca, 0x95, 0x2c, 0x0d, 0xa7, 0x13, 0x62, 0x7e, 0x5e, 0x40, 0xc3, - 0x3f, 0x0d, 0x30, 0x27, 0x4a, 0xea, 0x22, 0x5f, 0xd3, 0x93, 0x0d, 0x6d, 0xbe, 0xf0, 0x5e, 0x10, - 0x5f, 0x94, 0x33, 0xac, 0x30, 0xef, 0xc8, 0xb4, 0x79, 0x57, 0xa6, 0xe8, 0x09, 0x74, 0x56, 0x2d, - 0xc4, 0x95, 0x6e, 0x3a, 0x47, 0xa8, 0x14, 0xe0, 0xaa, 0x73, 0x9d, 0x7a, 0xd8, 0xbd, 0xfa, 0x6d, - 0xfd, 0x2f, 0xfd, 0x0e, 0x09, 0x6c, 0x5d, 0x2c, 0xbc, 0xa7, 0x64, 0xfd, 0x61, 0xbb, 0xd0, 0x9c, - 0x13, 0xcd, 0x7b, 0xd7, 0x91, 0x4b, 0x39, 0xaf, 0xe7, 0x24, 0xd7, 0xdd, 0xab, 0x9f, 0xd3, 0x9e, - 0x93, 0x5c, 0x75, 0xed, 0xed, 0xb7, 0x6e, 0xae, 0xb5, 0xe4, 0x4f, 0x0d, 0x40, 0xeb, 0x57, 0x5a, - 0x3b, 0xf3, 0xf6, 0x36, 0x8d, 0xb5, 0x92, 0x3d, 0x82, 0x7e, 0xba, 0xf0, 0x22, 0xea, 0xbb, 0xf2, - 0x22, 0x8a, 0x33, 0xa9, 0x97, 0xe2, 0x36, 0x48, 0xfb, 0x9e, 0x92, 0xfc, 0xbc, 0xf4, 0xa0, 0xe7, - 0xb0, 0x53, 0xcb, 0x78, 0x71, 0x39, 0x2f, 0x0b, 0xfd, 0xe1, 0xfd, 0x95, 0x1a, 0x5d, 0x94, 0xfb, - 0x7c, 0x73, 0x39, 0xe7, 0x67, 0x89, 0xc8, 0x72, 0x67, 0x3b, 0xad, 0x63, 0xfb, 0x9f, 0x03, 0x5a, - 0x0f, 0x2a, 0x4b, 0x56, 0xf4, 0x90, 0x2c, 0x59, 0x1f, 0x5a, 0x4b, 0x1c, 0x2d, 0xca, 0xd1, 0xaa, - 0x8d, 0x4f, 0x1a, 0x1f, 0x1b, 0x5f, 0x7e, 0xf6, 0xfb, 0xf5, 0xc0, 0x78, 0x79, 0x3d, 0x30, 0xfe, - 0xba, 0x1e, 0x18, 0x3f, 0xdf, 0x0c, 0x36, 0x5e, 0xde, 0x0c, 0x36, 0xfe, 0xb8, 0x19, 0x6c, 0xfc, - 0x38, 0x0c, 0xa9, 0x98, 0x2d, 0xbc, 0x91, 0xcf, 0xe2, 0x31, 0x4b, 0x38, 0x4b, 0xb2, 0xf1, 0xec, - 0x12, 0xe7, 0xe3, 0xab, 0xb1, 0xfc, 0x58, 0xa9, 0x5f, 0x95, 0xb7, 0xa5, 0x3e, 0x41, 0xc7, 0xff, - 0x06, 0x00, 0x00, 0xff, 0xff, 0x81, 0xc0, 0xc2, 0xed, 0x6c, 0x09, 0x00, 0x00, -} - -func (m *AssetInfo) 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 *AssetInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.IbcPort) > 0 { - i -= len(m.IbcPort) - copy(dAtA[i:], m.IbcPort) - i = encodeVarintTypes(dAtA, i, uint64(len(m.IbcPort))) - i-- - dAtA[i] = 0x72 - } - if len(m.IbcChannel) > 0 { - i -= len(m.IbcChannel) - copy(dAtA[i:], m.IbcChannel) - i = encodeVarintTypes(dAtA, i, uint64(len(m.IbcChannel))) - i-- - dAtA[i] = 0x6a - } - if len(m.IbcPath) > 0 { - i -= len(m.IbcPath) - copy(dAtA[i:], m.IbcPath) - i = encodeVarintTypes(dAtA, i, uint64(len(m.IbcPath))) - i-- - dAtA[i] = 0x62 - } - if m.IsEnabled { - i-- - if m.IsEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if len(m.CoingeckoId) > 0 { - i -= len(m.CoingeckoId) - copy(dAtA[i:], m.CoingeckoId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.CoingeckoId))) - i-- - dAtA[i] = 0x52 - } - if len(m.ImageUrl) > 0 { - i -= len(m.ImageUrl) - copy(dAtA[i:], m.ImageUrl) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ImageUrl))) - i-- - dAtA[i] = 0x4a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x42 - } - if m.Decimals != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Decimals)) - i-- - dAtA[i] = 0x38 - } - if len(m.OriginDenom) > 0 { - i -= len(m.OriginDenom) - copy(dAtA[i:], m.OriginDenom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.OriginDenom))) - i-- - dAtA[i] = 0x32 - } - if len(m.OriginChain) > 0 { - i -= len(m.OriginChain) - copy(dAtA[i:], m.OriginChain) - i = encodeVarintTypes(dAtA, i, uint64(len(m.OriginChain))) - i-- - dAtA[i] = 0x2a - } - if len(m.AssetType) > 0 { - i -= len(m.AssetType) - copy(dAtA[i:], m.AssetType) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AssetType))) - i-- - dAtA[i] = 0x22 - } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Symbol))) - i-- - dAtA[i] = 0x1a - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ChainInfo) 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 *ChainInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChainInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FeeInfo != nil { - { - size, err := m.FeeInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.Explorer != nil { - { - size, err := m.Explorer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if len(m.RestEndpoints) > 0 { - for iNdEx := len(m.RestEndpoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RestEndpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.GrpcEndpoints) > 0 { - for iNdEx := len(m.GrpcEndpoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.GrpcEndpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.GenesisTime) > 0 { - i -= len(m.GenesisTime) - copy(dAtA[i:], m.GenesisTime) - i = encodeVarintTypes(dAtA, i, uint64(len(m.GenesisTime))) - i-- - dAtA[i] = 0x32 - } - if len(m.Bech32Prefix) > 0 { - i -= len(m.Bech32Prefix) - copy(dAtA[i:], m.Bech32Prefix) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Bech32Prefix))) - i-- - dAtA[i] = 0x2a - } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Symbol))) - i-- - dAtA[i] = 0x22 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Credential) 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 *Credential) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Credential) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x3a - } - if len(m.DisplayName) > 0 { - i -= len(m.DisplayName) - copy(dAtA[i:], m.DisplayName) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DisplayName))) - i-- - dAtA[i] = 0x32 - } - if len(m.AttestationType) > 0 { - i -= len(m.AttestationType) - copy(dAtA[i:], m.AttestationType) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AttestationType))) - i-- - dAtA[i] = 0x2a - } - if len(m.Transport) > 0 { - for iNdEx := len(m.Transport) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Transport[iNdEx]) - copy(dAtA[i:], m.Transport[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Transport[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.CredentialId) > 0 { - i -= len(m.CredentialId) - copy(dAtA[i:], m.CredentialId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.CredentialId))) - i-- - dAtA[i] = 0x1a - } - if len(m.CredentialType) > 0 { - i -= len(m.CredentialType) - copy(dAtA[i:], m.CredentialType) - i = encodeVarintTypes(dAtA, i, uint64(len(m.CredentialType))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Document) 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 *Document) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - 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 = encodeVarintTypes(dAtA, i, uint64(len(m.CapabilityInvocation[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - 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 = encodeVarintTypes(dAtA, i, uint64(len(m.CapabilityDelegation[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 = encodeVarintTypes(dAtA, i, uint64(len(m.AssertionMethod[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - 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 = encodeVarintTypes(dAtA, i, uint64(len(m.Authentication[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.VerificationMethods) > 0 { - for iNdEx := len(m.VerificationMethods) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.VerificationMethods[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Endpoint) 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 *Endpoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IsPrimary { - i-- - if m.IsPrimary { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Url) > 0 { - i -= len(m.Url) - copy(dAtA[i:], m.Url) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Url))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ExplorerInfo) 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 *ExplorerInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExplorerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Url) > 0 { - i -= len(m.Url) - copy(dAtA[i:], m.Url) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Url))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FeeInfo) 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 *FeeInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FeeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.GasMultiply != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.GasMultiply)))) - i-- - dAtA[i] = 0x29 - } - if m.IsSimulable { - i-- - if m.IsSimulable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.InitGasLimit != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.InitGasLimit)) - i-- - dAtA[i] = 0x18 - } - if len(m.FeeRates) > 0 { - for iNdEx := len(m.FeeRates) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.FeeRates[iNdEx]) - copy(dAtA[i:], m.FeeRates[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.FeeRates[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.BaseDenom) > 0 { - i -= len(m.BaseDenom) - copy(dAtA[i:], m.BaseDenom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.BaseDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Identity) 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 *Identity) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Identity) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.VerificationMethods) > 0 { - for iNdEx := len(m.VerificationMethods) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.VerificationMethods[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.Credentials) > 0 { - for iNdEx := len(m.Credentials) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Credentials[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x1a - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PubKey) 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 *PubKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x22 - } - if len(m.KeyType) > 0 { - i -= len(m.KeyType) - copy(dAtA[i:], m.KeyType) - i = encodeVarintTypes(dAtA, i, uint64(len(m.KeyType))) - i-- - dAtA[i] = 0x1a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - 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.PublicKeyJwks) > 0 { - for k := range m.PublicKeyJwks { - v := m.PublicKeyJwks[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintTypes(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintTypes(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintTypes(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.PublicKeyMultibase) > 0 { - i -= len(m.PublicKeyMultibase) - copy(dAtA[i:], m.PublicKeyMultibase) - i = encodeVarintTypes(dAtA, i, uint64(len(m.PublicKeyMultibase))) - i-- - dAtA[i] = 0x1a - } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AssetInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Symbol) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.AssetType) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.OriginChain) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.OriginDenom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Decimals != 0 { - n += 1 + sovTypes(uint64(m.Decimals)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ImageUrl) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.CoingeckoId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.IsEnabled { - n += 2 - } - l = len(m.IbcPath) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.IbcChannel) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.IbcPort) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ChainInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Symbol) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Bech32Prefix) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.GenesisTime) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.GrpcEndpoints) > 0 { - for _, e := range m.GrpcEndpoints { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.RestEndpoints) > 0 { - for _, e := range m.RestEndpoints { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if m.Explorer != nil { - l = m.Explorer.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.FeeInfo != nil { - l = m.FeeInfo.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Credential) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.CredentialType) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.CredentialId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.Transport) > 0 { - for _, s := range m.Transport { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - l = len(m.AttestationType) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.DisplayName) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Document) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.VerificationMethods) > 0 { - for _, e := range m.VerificationMethods { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Authentication) > 0 { - for _, s := range m.Authentication { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.AssertionMethod) > 0 { - for _, s := range m.AssertionMethod { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.CapabilityDelegation) > 0 { - for _, s := range m.CapabilityDelegation { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.CapabilityInvocation) > 0 { - for _, s := range m.CapabilityInvocation { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *Endpoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Url) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.IsPrimary { - n += 2 - } - return n -} - -func (m *ExplorerInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Url) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *FeeInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BaseDenom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.FeeRates) > 0 { - for _, s := range m.FeeRates { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - if m.InitGasLimit != 0 { - n += 1 + sovTypes(uint64(m.InitGasLimit)) - } - if m.IsSimulable { - n += 2 - } - if m.GasMultiply != 0 { - n += 9 - } - return n -} - -func (m *Identity) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.Credentials) > 0 { - for _, e := range m.Credentials { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.VerificationMethods) > 0 { - for _, e := range m.VerificationMethods { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *PubKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.KeyType) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovTypes(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 + sovTypes(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.PublicKeyMultibase) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.PublicKeyJwks) > 0 { - for k, v := range m.PublicKeyJwks { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v))) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AssetInfo) 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 ErrIntOverflowTypes - } - 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: AssetInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetInfo: 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - 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 Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AssetType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginChain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginChain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) - } - m.Decimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Decimals |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImageUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CoingeckoId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CoingeckoId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsEnabled = bool(v != 0) - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcChannel", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcChannel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcPort", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcPort = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChainInfo) 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 ErrIntOverflowTypes - } - 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: ChainInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChainInfo: 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - 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 ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - 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 Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bech32Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenesisTime", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GenesisTime = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GrpcEndpoints = append(m.GrpcEndpoints, &Endpoint{}) - if err := m.GrpcEndpoints[len(m.GrpcEndpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RestEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RestEndpoints = append(m.RestEndpoints, &Endpoint{}) - if err := m.RestEndpoints[len(m.RestEndpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explorer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Explorer == nil { - m.Explorer = &ExplorerInfo{} - } - if err := m.Explorer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FeeInfo == nil { - m.FeeInfo = &FeeInfo{} - } - if err := m.FeeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Credential) 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 ErrIntOverflowTypes - } - 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: Credential: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - 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 CredentialType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CredentialType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CredentialId = append(m.CredentialId[:0], dAtA[iNdEx:postIndex]...) - if m.CredentialId == nil { - m.CredentialId = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Transport", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Transport = append(m.Transport, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttestationType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttestationType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DisplayName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DisplayName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Document) 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 ErrIntOverflowTypes - } - 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: Document: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Document: 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - 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 VerificationMethods", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerificationMethods = append(m.VerificationMethods, &VerificationMethod{}) - if err := m.VerificationMethods[len(m.VerificationMethods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authentication = append(m.Authentication, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - 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 CapabilityDelegation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CapabilityDelegation = append(m.CapabilityDelegation, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CapabilityInvocation = append(m.CapabilityInvocation, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Endpoint) 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 ErrIntOverflowTypes - } - 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: Endpoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsPrimary", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsPrimary = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExplorerInfo) 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 ErrIntOverflowTypes - } - 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: ExplorerInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExplorerInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FeeInfo) 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 ErrIntOverflowTypes - } - 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: FeeInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FeeInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BaseDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeRates", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeeRates = append(m.FeeRates, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InitGasLimit", wireType) - } - m.InitGasLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InitGasLimit |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSimulable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsSimulable = bool(v != 0) - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field GasMultiply", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.GasMultiply = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Identity) 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 ErrIntOverflowTypes - } - 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: Identity: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Identity: 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - 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 Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - 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 Credentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credentials = append(m.Credentials, &Credential{}) - if err := m.Credentials[len(m.Credentials)-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 VerificationMethods", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerificationMethods = append(m.VerificationMethods, &VerificationMethod{}) - if err := m.VerificationMethods[len(m.VerificationMethods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PubKey) 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 ErrIntOverflowTypes - } - 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: PubKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PubKey: 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - 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 Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeyType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - 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 ErrIntOverflowTypes - } - 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - 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 Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyMultibase", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKeyMultibase = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyJwks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PublicKeyJwks == nil { - m.PublicKeyJwks = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTypes - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthTypes - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTypes - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthTypes - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.PublicKeyJwks[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTypes(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, ErrIntOverflowTypes - } - 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, ErrIntOverflowTypes - } - 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, ErrIntOverflowTypes - } - 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, ErrInvalidLengthTypes - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTypes - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTypes - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") -)