From 504df4a421e69df1ecb2f0626093c0ded149d212 Mon Sep 17 00:00:00 2001 From: ngam Date: Fri, 30 Sep 2022 10:59:48 +0700 Subject: [PATCH 1/5] init --- docs/static/openapi.yml | 1099 ++-- initiate.sh | 7 +- proto/evmsupport/address_binding.proto | 2 +- proto/evmsupport/genesis.proto | 2 +- proto/evmsupport/params.proto | 2 +- proto/evmsupport/query.proto | 2 +- proto/evmsupport/tx.proto | 2 +- proto/nftadmin/authorization.proto | 2 +- proto/nftadmin/genesis.proto | 2 +- proto/nftadmin/params.proto | 2 +- proto/nftadmin/permissions.proto | 2 +- proto/nftadmin/query.proto | 2 +- proto/nftadmin/tx.proto | 2 +- proto/nftoracle/action_request.proto | 2 +- proto/nftoracle/action_signature.proto | 2 +- .../nftoracle/collection_owner_request.proto | 11 + proto/nftoracle/genesis.proto | 5 +- proto/nftoracle/mint_request.proto | 2 +- proto/nftoracle/opensea.proto | 2 +- proto/nftoracle/params.proto | 2 +- proto/nftoracle/query.proto | 30 +- proto/nftoracle/request.proto | 2 +- proto/nftoracle/tx.proto | 2 +- vue/src/store/generated/index.ts | 2 + .../sixnft/sixnft.nftadmin/index.ts | 32 +- .../sixnft/sixnft.nftadmin/module/index.ts | 6 +- .../sixnft/sixnft.nftmngr/index.ts | 144 +- .../sixnft/sixnft.nftmngr/module/index.ts | 42 +- .../sixnft/sixnft.nftmngr/module/rest.ts | 11 - .../cosmos/base/query/v1beta1/pagination.ts | 30 +- .../thesixnetwork.sixnft.nftoracle/index.ts | 455 ++ .../module/index.ts | 69 + .../module/rest.ts | 606 ++ .../cosmos/base/query/v1beta1/pagination.ts | 328 + .../module/types/gogoproto/gogo.ts | 2 + .../module/types/google/api/annotations.ts | 2 + .../module/types/google/api/http.ts | 706 +++ .../types/google/protobuf/descriptor.ts | 5314 +++++++++++++++++ .../module/types/google/protobuf/duration.ts | 188 + .../module/types/google/protobuf/timestamp.ts | 219 + .../module/types/nftoracle/action_request.ts | 709 +++ .../types/nftoracle/action_signature.ts | 92 + .../nftoracle/collection_owner_request.ts | 150 + .../module/types/nftoracle/genesis.ts | 296 + .../module/types/nftoracle/mint_request.ts | 475 ++ .../module/types/nftoracle/opensea.ts | 134 + .../module/types/nftoracle/params.ts | 132 + .../module/types/nftoracle/query.ts | 1317 ++++ .../module/types/nftoracle/request.ts | 311 + .../module/types/nftoracle/tx.ts | 956 +++ .../package.json | 18 + .../thesixnetwork.sixnft.nftoracle/vuex-root | 1 + x/nftoracle/client/cli/query.go | 2 + .../cli/query_collection_owner_request.go | 77 + .../query_collection_owner_request_test.go | 153 + x/nftoracle/genesis.go | 9 + x/nftoracle/genesis_test.go | 11 + .../keeper/collection_owner_request.go | 106 + .../keeper/collection_owner_request_test.go | 59 + .../grpc_query_collection_owner_request.go | 55 + ...rpc_query_collection_owner_request_test.go | 117 + x/nftoracle/types/action_request.pb.go | 90 +- x/nftoracle/types/action_signature.pb.go | 24 +- .../types/collection_owner_request.pb.go | 407 ++ x/nftoracle/types/genesis.go | 17 +- x/nftoracle/types/genesis.pb.go | 155 +- x/nftoracle/types/genesis_test.go | 35 + x/nftoracle/types/keys.go | 5 + x/nftoracle/types/mint_request.pb.go | 74 +- x/nftoracle/types/opensea.pb.go | 28 +- x/nftoracle/types/params.pb.go | 38 +- x/nftoracle/types/query.pb.go | 1217 +++- x/nftoracle/types/query.pb.gw.go | 184 + x/nftoracle/types/request.pb.go | 63 +- x/nftoracle/types/tx.pb.go | 99 +- 75 files changed, 15923 insertions(+), 1037 deletions(-) create mode 100644 proto/nftoracle/collection_owner_request.proto create mode 100755 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/index.ts create mode 100755 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/index.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/rest.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/cosmos/base/query/v1beta1/pagination.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/gogoproto/gogo.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/api/annotations.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/api/http.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/protobuf/descriptor.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/protobuf/duration.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/protobuf/timestamp.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/action_request.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/action_signature.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/collection_owner_request.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/genesis.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/mint_request.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/opensea.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/params.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/query.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/request.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/tx.ts create mode 100755 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/package.json create mode 100755 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/vuex-root create mode 100644 x/nftoracle/client/cli/query_collection_owner_request.go create mode 100644 x/nftoracle/client/cli/query_collection_owner_request_test.go create mode 100644 x/nftoracle/keeper/collection_owner_request.go create mode 100644 x/nftoracle/keeper/collection_owner_request_test.go create mode 100644 x/nftoracle/keeper/grpc_query_collection_owner_request.go create mode 100644 x/nftoracle/keeper/grpc_query_collection_owner_request_test.go create mode 100644 x/nftoracle/types/collection_owner_request.pb.go diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 9d5a79a7..8dcaf548 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -30287,16 +30287,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/sixnft/evmsupport/address_binding/{ethAddress}/{nativeAddress}': @@ -33353,10 +33343,206 @@ paths: } tags: - Query + /tendermint/spn/monitoringp/connection_channel_id: + get: + summary: Queries a ConnectionChannelID by index. + operationId: TendermintSpnMonitoringpConnectionChannelID + responses: + '200': + description: A successful response. + schema: + type: object + properties: + ConnectionChannelID: + type: object + properties: + channelID: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /tendermint/spn/monitoringp/consumer_client_id: + get: + summary: Queries a ConsumerClientID by index. + operationId: TendermintSpnMonitoringpConsumerClientID + responses: + '200': + description: A successful response. + schema: + type: object + properties: + ConsumerClientID: + type: object + properties: + clientID: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /tendermint/spn/monitoringp/monitoring_info: + get: + summary: Queries a MonitoringInfo by index. + operationId: TendermintSpnMonitoringpMonitoringInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + MonitoringInfo: + type: object + properties: + transmitted: + type: boolean + signatureCounts: + type: object + properties: + blockCount: + type: string + format: uint64 + counts: + type: array + items: + type: object + properties: + opAddress: + type: string + RelativeSignatures: + type: string + title: >- + SignatureCount contains information of signature + reporting for one specific validator with consensus + address + + RelativeSignatures is the sum of all signatures + relative to the validator set size + title: >- + SignatureCounts contains information about signature + reporting for a number of blocks + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /tendermint/spn/monitoringp/params: + get: + summary: Params queries the parameters of the module. + operationId: TendermintSpnMonitoringpParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + type: object + properties: + lastBlockHeight: + type: string + format: int64 + consumerChainID: + type: string + consumerConsensusState: + type: object + properties: + nextValidatorsHash: + type: string + timestamp: + type: string + root: + type: object + properties: + hash: + type: string + title: MerkleRoot represents a Merkle Root in ConsensusState + title: >- + ConsensusState represents a Consensus State + + it is compatible with the dumped state from `appd q ibc + client self-consensus-state` command + consumerUnbondingPeriod: + type: string + format: int64 + consumerRevisionHeight: + type: string + format: uint64 + description: Params defines the parameters for the module. + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query /sixnft/nftoracle/action_request: get: summary: Queries a list of ActionRequest items. - operationId: SixnftNftoracleActionRequestAll + operationId: ThesixnetworkSixnftNftoracleActionRequestAll responses: '200': description: A successful response. @@ -33550,7 +33736,7 @@ paths: '/sixnft/nftoracle/action_request/{id}': get: summary: Queries a ActionRequest by id. - operationId: SixnftNftoracleActionRequest + operationId: ThesixnetworkSixnftNftoracleActionRequest responses: '200': description: A successful response. @@ -33664,7 +33850,7 @@ paths: /sixnft/nftoracle/mint_request: get: summary: Queries a list of MintRequest items. - operationId: SixnftNftoracleMintRequestAll + operationId: ThesixnetworkSixnftNftoracleMintRequestAll responses: '200': description: A successful response. @@ -33851,7 +34037,7 @@ paths: '/sixnft/nftoracle/mint_request/{id}': get: summary: Queries a MintRequest by id. - operationId: SixnftNftoracleMintRequest + operationId: ThesixnetworkSixnftNftoracleMintRequest responses: '200': description: A successful response. @@ -33958,7 +34144,7 @@ paths: /sixnft/nftoracle/params: get: summary: Parameters queries the parameters of the module. - operationId: SixnftNftoracleParams + operationId: ThesixnetworkSixnftNftoracleParams responses: '200': description: A successful response. @@ -33996,21 +34182,55 @@ paths: additionalProperties: {} tags: - Query - /tendermint/spn/monitoringp/connection_channel_id: + /thesixnetwork/sixnft/nftoracle/collection_owner_request: get: - summary: Queries a ConnectionChannelID by index. - operationId: TendermintSpnMonitoringpConnectionChannelID + summary: Queries a list of CollectionOwnerRequest items. + operationId: ThesixnetworkSixnftNftoracleCollectionOwnerRequestAll responses: '200': description: A successful response. schema: type: object properties: - ConnectionChannelID: + CollectionOwnerRequest: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + nftSchemaCode: + type: string + base64OwnerSignature: + type: string + pagination: type: object properties: - channelID: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } default: description: An unexpected error response. schema: @@ -34029,149 +34249,85 @@ paths: '@type': type: string additionalProperties: {} - tags: - - Query - /tendermint/spn/monitoringp/consumer_client_id: - get: - summary: Queries a ConsumerClientID by index. - operationId: TendermintSpnMonitoringpConsumerClientID - responses: - '200': - description: A successful response. - schema: - type: object - properties: - ConsumerClientID: - type: object - properties: - clientID: - type: string - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query - /tendermint/spn/monitoringp/monitoring_info: - get: - summary: Queries a MonitoringInfo by index. - operationId: TendermintSpnMonitoringpMonitoringInfo - responses: - '200': - description: A successful response. - schema: - type: object - properties: - MonitoringInfo: - type: object - properties: - transmitted: - type: boolean - signatureCounts: - type: object - properties: - blockCount: - type: string - format: uint64 - counts: - type: array - items: - type: object - properties: - opAddress: - type: string - RelativeSignatures: - type: string - title: >- - SignatureCount contains information of signature - reporting for one specific validator with consensus - address + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. - RelativeSignatures is the sum of all signatures - relative to the validator set size - title: >- - SignatureCounts contains information about signature - reporting for a number of blocks - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query - /tendermint/spn/monitoringp/params: + '/thesixnetwork/sixnft/nftoracle/collection_owner_request/{id}': get: - summary: Params queries the parameters of the module. - operationId: TendermintSpnMonitoringpParams + summary: Queries a CollectionOwnerRequest by id. + operationId: ThesixnetworkSixnftNftoracleCollectionOwnerRequest responses: '200': description: A successful response. schema: type: object properties: - params: + CollectionOwnerRequest: type: object properties: - lastBlockHeight: - type: string - format: int64 - consumerChainID: + id: type: string - consumerConsensusState: - type: object - properties: - nextValidatorsHash: - type: string - timestamp: - type: string - root: - type: object - properties: - hash: - type: string - title: MerkleRoot represents a Merkle Root in ConsensusState - title: >- - ConsensusState represents a Consensus State - - it is compatible with the dumped state from `appd q ibc - client self-consensus-state` command - consumerUnbondingPeriod: + format: uint64 + nftSchemaCode: type: string - format: int64 - consumerRevisionHeight: + base64OwnerSignature: type: string - format: uint64 - description: Params defines the parameters for the module. - description: >- - QueryParamsResponse is response type for the Query/Params RPC - method. default: description: An unexpected error response. schema: @@ -34190,6 +34346,12 @@ paths: '@type': type: string additionalProperties: {} + parameters: + - name: id + in: path + required: true + type: string + format: uint64 tags: - Query definitions: @@ -58056,69 +58218,287 @@ definitions: - BASE - TOKEN default: BASE - sixnft.nftoracle.ActionRequest: + tendermint.spn.monitoringp.ConnectionChannelID: type: object properties: - id: - type: string - format: uint64 - nft_schema_code: - type: string - token_id: - type: string - action: - type: string - caller: - type: string - ref_id: - type: string - required_confirm: - type: string - format: uint64 - status: + channelID: type: string - enum: - - PENDING - - SUCCESS_WITH_CONSENSUS - - FAILED_WITHOUT_CONCENSUS - - EXPIRED - - FAILED_ON_EXECUTION - default: PENDING - current_confirm: + tendermint.spn.monitoringp.ConsumerClientID: + type: object + properties: + clientID: type: string - format: uint64 - confirmers: + tendermint.spn.monitoringp.MonitoringInfo: + type: object + properties: + transmitted: + type: boolean + signatureCounts: type: object - additionalProperties: - type: boolean - created_at: - type: string - format: date-time - valid_until: - type: string - format: date-time - data_hashes: - type: array - items: - type: object - properties: - origin_data: + properties: + blockCount: + type: string + format: uint64 + counts: + type: array + items: type: object properties: - image: + opAddress: type: string - holder_address: + RelativeSignatures: type: string - traits: - type: array - items: - type: object - properties: - trait_type: - type: string - value: - type: string - display_type: + title: >- + SignatureCount contains information of signature reporting for + one specific validator with consensus address + + RelativeSignatures is the sum of all signatures relative to the + validator set size + title: >- + SignatureCounts contains information about signature reporting for a + number of blocks + tendermint.spn.monitoringp.Params: + type: object + properties: + lastBlockHeight: + type: string + format: int64 + consumerChainID: + type: string + consumerConsensusState: + type: object + properties: + nextValidatorsHash: + type: string + timestamp: + type: string + root: + type: object + properties: + hash: + type: string + title: MerkleRoot represents a Merkle Root in ConsensusState + title: >- + ConsensusState represents a Consensus State + + it is compatible with the dumped state from `appd q ibc client + self-consensus-state` command + consumerUnbondingPeriod: + type: string + format: int64 + consumerRevisionHeight: + type: string + format: uint64 + description: Params defines the parameters for the module. + tendermint.spn.monitoringp.QueryGetConnectionChannelIDResponse: + type: object + properties: + ConnectionChannelID: + type: object + properties: + channelID: + type: string + tendermint.spn.monitoringp.QueryGetConsumerClientIDResponse: + type: object + properties: + ConsumerClientID: + type: object + properties: + clientID: + type: string + tendermint.spn.monitoringp.QueryGetMonitoringInfoResponse: + type: object + properties: + MonitoringInfo: + type: object + properties: + transmitted: + type: boolean + signatureCounts: + type: object + properties: + blockCount: + type: string + format: uint64 + counts: + type: array + items: + type: object + properties: + opAddress: + type: string + RelativeSignatures: + type: string + title: >- + SignatureCount contains information of signature reporting + for one specific validator with consensus address + + RelativeSignatures is the sum of all signatures relative to + the validator set size + title: >- + SignatureCounts contains information about signature reporting for + a number of blocks + tendermint.spn.monitoringp.QueryParamsResponse: + type: object + properties: + params: + type: object + properties: + lastBlockHeight: + type: string + format: int64 + consumerChainID: + type: string + consumerConsensusState: + type: object + properties: + nextValidatorsHash: + type: string + timestamp: + type: string + root: + type: object + properties: + hash: + type: string + title: MerkleRoot represents a Merkle Root in ConsensusState + title: >- + ConsensusState represents a Consensus State + + it is compatible with the dumped state from `appd q ibc client + self-consensus-state` command + consumerUnbondingPeriod: + type: string + format: int64 + consumerRevisionHeight: + type: string + format: uint64 + description: Params defines the parameters for the module. + description: QueryParamsResponse is response type for the Query/Params RPC method. + tendermint.spn.types.ConsensusState: + type: object + properties: + nextValidatorsHash: + type: string + timestamp: + type: string + root: + type: object + properties: + hash: + type: string + title: MerkleRoot represents a Merkle Root in ConsensusState + title: >- + ConsensusState represents a Consensus State + + it is compatible with the dumped state from `appd q ibc client + self-consensus-state` command + tendermint.spn.types.MerkleRoot: + type: object + properties: + hash: + type: string + title: MerkleRoot represents a Merkle Root in ConsensusState + tendermint.spn.types.SignatureCount: + type: object + properties: + opAddress: + type: string + RelativeSignatures: + type: string + title: >- + SignatureCount contains information of signature reporting for one + specific validator with consensus address + + RelativeSignatures is the sum of all signatures relative to the validator + set size + tendermint.spn.types.SignatureCounts: + type: object + properties: + blockCount: + type: string + format: uint64 + counts: + type: array + items: + type: object + properties: + opAddress: + type: string + RelativeSignatures: + type: string + title: >- + SignatureCount contains information of signature reporting for one + specific validator with consensus address + + RelativeSignatures is the sum of all signatures relative to the + validator set size + title: >- + SignatureCounts contains information about signature reporting for a + number of blocks + thesixnetwork.sixnft.nftoracle.ActionRequest: + type: object + properties: + id: + type: string + format: uint64 + nft_schema_code: + type: string + token_id: + type: string + action: + type: string + caller: + type: string + ref_id: + type: string + required_confirm: + type: string + format: uint64 + status: + type: string + enum: + - PENDING + - SUCCESS_WITH_CONSENSUS + - FAILED_WITHOUT_CONCENSUS + - EXPIRED + - FAILED_ON_EXECUTION + default: PENDING + current_confirm: + type: string + format: uint64 + confirmers: + type: object + additionalProperties: + type: boolean + created_at: + type: string + format: date-time + valid_until: + type: string + format: date-time + data_hashes: + type: array + items: + type: object + properties: + origin_data: + type: object + properties: + image: + type: string + holder_address: + type: string + traits: + type: array + items: + type: object + properties: + trait_type: + type: string + value: + type: string + display_type: type: string max_value: type: string @@ -58134,7 +58514,17 @@ definitions: format: int64 execution_error_message: type: string - sixnft.nftoracle.DataHash: + thesixnetwork.sixnft.nftoracle.CollectionOwnerRequest: + type: object + properties: + id: + type: string + format: uint64 + nftSchemaCode: + type: string + base64OwnerSignature: + type: string + thesixnetwork.sixnft.nftoracle.DataHash: type: object properties: origin_data: @@ -58164,7 +58554,7 @@ definitions: type: array items: type: string - sixnft.nftoracle.MintRequest: + thesixnetwork.sixnft.nftoracle.MintRequest: type: object properties: id: @@ -58235,13 +58625,13 @@ definitions: expired_height: type: string format: int64 - sixnft.nftoracle.MsgCreateActionRequestResponse: + thesixnetwork.sixnft.nftoracle.MsgCreateActionRequestResponse: type: object properties: id: type: string format: uint64 - sixnft.nftoracle.MsgCreateMintRequestResponse: + thesixnetwork.sixnft.nftoracle.MsgCreateMintRequestResponse: type: object properties: id: @@ -58251,17 +58641,17 @@ definitions: type: string tokenId: type: string - sixnft.nftoracle.MsgSubmitActionResponseResponse: + thesixnetwork.sixnft.nftoracle.MsgSubmitActionResponseResponse: type: object properties: actionRequestID: type: string - sixnft.nftoracle.MsgSubmitMintResponseResponse: + thesixnetwork.sixnft.nftoracle.MsgSubmitMintResponseResponse: type: object properties: mintRequestID: type: string - sixnft.nftoracle.NftOriginData: + thesixnetwork.sixnft.nftoracle.NftOriginData: type: object properties: image: @@ -58281,7 +58671,7 @@ definitions: type: string max_value: type: string - sixnft.nftoracle.Params: + thesixnetwork.sixnft.nftoracle.Params: type: object properties: mint_request_active_duration: @@ -58289,7 +58679,7 @@ definitions: action_request_active_duration: type: string description: Params defines the parameters for the module. - sixnft.nftoracle.QueryAllActionRequestResponse: + thesixnetwork.sixnft.nftoracle.QueryAllActionRequestResponse: type: object properties: ActionRequest: @@ -58369,8 +58759,48 @@ definitions: type: string expired_height: type: string - format: int64 - execution_error_message: + format: int64 + execution_error_message: + type: string + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + thesixnetwork.sixnft.nftoracle.QueryAllCollectionOwnerRequestResponse: + type: object + properties: + CollectionOwnerRequest: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + nftSchemaCode: + type: string + base64OwnerSignature: type: string pagination: type: object @@ -58397,7 +58827,7 @@ definitions: repeated Bar results = 1; PageResponse page = 2; } - sixnft.nftoracle.QueryAllMintRequestResponse: + thesixnetwork.sixnft.nftoracle.QueryAllMintRequestResponse: type: object properties: MintRequest: @@ -58498,7 +58928,7 @@ definitions: repeated Bar results = 1; PageResponse page = 2; } - sixnft.nftoracle.QueryGetActionRequestResponse: + thesixnetwork.sixnft.nftoracle.QueryGetActionRequestResponse: type: object properties: ActionRequest: @@ -58579,7 +59009,20 @@ definitions: format: int64 execution_error_message: type: string - sixnft.nftoracle.QueryGetMintRequestResponse: + thesixnetwork.sixnft.nftoracle.QueryGetCollectionOwnerRequestResponse: + type: object + properties: + CollectionOwnerRequest: + type: object + properties: + id: + type: string + format: uint64 + nftSchemaCode: + type: string + base64OwnerSignature: + type: string + thesixnetwork.sixnft.nftoracle.QueryGetMintRequestResponse: type: object properties: MintRequest: @@ -58653,7 +59096,7 @@ definitions: expired_height: type: string format: int64 - sixnft.nftoracle.QueryParamsResponse: + thesixnetwork.sixnft.nftoracle.QueryParamsResponse: type: object properties: params: @@ -58665,7 +59108,7 @@ definitions: action_request_active_duration: type: string description: QueryParamsResponse is response type for the Query/Params RPC method. - sixnft.nftoracle.RequestStatus: + thesixnetwork.sixnft.nftoracle.RequestStatus: type: string enum: - PENDING @@ -58674,7 +59117,7 @@ definitions: - EXPIRED - FAILED_ON_EXECUTION default: PENDING - sixnft.nftoracle.Trait: + thesixnetwork.sixnft.nftoracle.Trait: type: object properties: trait_type: @@ -58685,221 +59128,3 @@ definitions: type: string max_value: type: string - tendermint.spn.monitoringp.ConnectionChannelID: - type: object - properties: - channelID: - type: string - tendermint.spn.monitoringp.ConsumerClientID: - type: object - properties: - clientID: - type: string - tendermint.spn.monitoringp.MonitoringInfo: - type: object - properties: - transmitted: - type: boolean - signatureCounts: - type: object - properties: - blockCount: - type: string - format: uint64 - counts: - type: array - items: - type: object - properties: - opAddress: - type: string - RelativeSignatures: - type: string - title: >- - SignatureCount contains information of signature reporting for - one specific validator with consensus address - - RelativeSignatures is the sum of all signatures relative to the - validator set size - title: >- - SignatureCounts contains information about signature reporting for a - number of blocks - tendermint.spn.monitoringp.Params: - type: object - properties: - lastBlockHeight: - type: string - format: int64 - consumerChainID: - type: string - consumerConsensusState: - type: object - properties: - nextValidatorsHash: - type: string - timestamp: - type: string - root: - type: object - properties: - hash: - type: string - title: MerkleRoot represents a Merkle Root in ConsensusState - title: >- - ConsensusState represents a Consensus State - - it is compatible with the dumped state from `appd q ibc client - self-consensus-state` command - consumerUnbondingPeriod: - type: string - format: int64 - consumerRevisionHeight: - type: string - format: uint64 - description: Params defines the parameters for the module. - tendermint.spn.monitoringp.QueryGetConnectionChannelIDResponse: - type: object - properties: - ConnectionChannelID: - type: object - properties: - channelID: - type: string - tendermint.spn.monitoringp.QueryGetConsumerClientIDResponse: - type: object - properties: - ConsumerClientID: - type: object - properties: - clientID: - type: string - tendermint.spn.monitoringp.QueryGetMonitoringInfoResponse: - type: object - properties: - MonitoringInfo: - type: object - properties: - transmitted: - type: boolean - signatureCounts: - type: object - properties: - blockCount: - type: string - format: uint64 - counts: - type: array - items: - type: object - properties: - opAddress: - type: string - RelativeSignatures: - type: string - title: >- - SignatureCount contains information of signature reporting - for one specific validator with consensus address - - RelativeSignatures is the sum of all signatures relative to - the validator set size - title: >- - SignatureCounts contains information about signature reporting for - a number of blocks - tendermint.spn.monitoringp.QueryParamsResponse: - type: object - properties: - params: - type: object - properties: - lastBlockHeight: - type: string - format: int64 - consumerChainID: - type: string - consumerConsensusState: - type: object - properties: - nextValidatorsHash: - type: string - timestamp: - type: string - root: - type: object - properties: - hash: - type: string - title: MerkleRoot represents a Merkle Root in ConsensusState - title: >- - ConsensusState represents a Consensus State - - it is compatible with the dumped state from `appd q ibc client - self-consensus-state` command - consumerUnbondingPeriod: - type: string - format: int64 - consumerRevisionHeight: - type: string - format: uint64 - description: Params defines the parameters for the module. - description: QueryParamsResponse is response type for the Query/Params RPC method. - tendermint.spn.types.ConsensusState: - type: object - properties: - nextValidatorsHash: - type: string - timestamp: - type: string - root: - type: object - properties: - hash: - type: string - title: MerkleRoot represents a Merkle Root in ConsensusState - title: >- - ConsensusState represents a Consensus State - - it is compatible with the dumped state from `appd q ibc client - self-consensus-state` command - tendermint.spn.types.MerkleRoot: - type: object - properties: - hash: - type: string - title: MerkleRoot represents a Merkle Root in ConsensusState - tendermint.spn.types.SignatureCount: - type: object - properties: - opAddress: - type: string - RelativeSignatures: - type: string - title: >- - SignatureCount contains information of signature reporting for one - specific validator with consensus address - - RelativeSignatures is the sum of all signatures relative to the validator - set size - tendermint.spn.types.SignatureCounts: - type: object - properties: - blockCount: - type: string - format: uint64 - counts: - type: array - items: - type: object - properties: - opAddress: - type: string - RelativeSignatures: - type: string - title: >- - SignatureCount contains information of signature reporting for one - specific validator with consensus address - - RelativeSignatures is the sum of all signatures relative to the - validator set size - title: >- - SignatureCounts contains information about signature reporting for a - number of blocks diff --git a/initiate.sh b/initiate.sh index b80389d4..979bb8c8 100755 --- a/initiate.sh +++ b/initiate.sh @@ -358,4 +358,9 @@ ignite scaffold message changeSchemaOwner nft_schema_code:string new_owner:strin --desc "To update schema owner" \ --response nft_schema_code,new_owner \ --no-simulation \ - --module nftmngr \ No newline at end of file + --module nftmngr + +ignite scaffold list CollectionOwnerRequest nft_schema_code:string base64_owner_signature:string \ + --no-message \ + --no-simulation \ + --module nftoracle \ No newline at end of file diff --git a/proto/evmsupport/address_binding.proto b/proto/evmsupport/address_binding.proto index 67b88378..01c0be1c 100644 --- a/proto/evmsupport/address_binding.proto +++ b/proto/evmsupport/address_binding.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.evmsupport; +package thesixnetwork.sixnft.evmsupport; option go_package = "github.com/thesixnetwork/sixnft/x/evmsupport/types"; diff --git a/proto/evmsupport/genesis.proto b/proto/evmsupport/genesis.proto index d22f4143..3f6c70aa 100644 --- a/proto/evmsupport/genesis.proto +++ b/proto/evmsupport/genesis.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.evmsupport; +package thesixnetwork.sixnft.evmsupport; import "gogoproto/gogo.proto"; import "evmsupport/params.proto"; diff --git a/proto/evmsupport/params.proto b/proto/evmsupport/params.proto index e4a7eead..6e4a98b7 100644 --- a/proto/evmsupport/params.proto +++ b/proto/evmsupport/params.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.evmsupport; +package thesixnetwork.sixnft.evmsupport; import "gogoproto/gogo.proto"; diff --git a/proto/evmsupport/query.proto b/proto/evmsupport/query.proto index 9432a118..72e75326 100644 --- a/proto/evmsupport/query.proto +++ b/proto/evmsupport/query.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.evmsupport; +package thesixnetwork.sixnft.evmsupport; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; diff --git a/proto/evmsupport/tx.proto b/proto/evmsupport/tx.proto index 69a1b904..0c0cf31d 100644 --- a/proto/evmsupport/tx.proto +++ b/proto/evmsupport/tx.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.evmsupport; +package thesixnetwork.sixnft.evmsupport; // this line is used by starport scaffolding # proto/tx/import diff --git a/proto/nftadmin/authorization.proto b/proto/nftadmin/authorization.proto index 27b101bd..e3a06158 100644 --- a/proto/nftadmin/authorization.proto +++ b/proto/nftadmin/authorization.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.nftadmin; +package thesixnetwork.sixnft.nftadmin; option go_package = "github.com/thesixnetwork/sixnft/x/nftadmin/types"; import "nftadmin/permissions.proto"; diff --git a/proto/nftadmin/genesis.proto b/proto/nftadmin/genesis.proto index f28907cf..579c4ebc 100644 --- a/proto/nftadmin/genesis.proto +++ b/proto/nftadmin/genesis.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.nftadmin; +package thesixnetwork.sixnft.nftadmin; import "gogoproto/gogo.proto"; import "nftadmin/params.proto"; diff --git a/proto/nftadmin/params.proto b/proto/nftadmin/params.proto index 3edf294e..d66cab12 100644 --- a/proto/nftadmin/params.proto +++ b/proto/nftadmin/params.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.nftadmin; +package thesixnetwork.sixnft.nftadmin; import "gogoproto/gogo.proto"; diff --git a/proto/nftadmin/permissions.proto b/proto/nftadmin/permissions.proto index 76d2c47f..b51eebc6 100644 --- a/proto/nftadmin/permissions.proto +++ b/proto/nftadmin/permissions.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.nftadmin; +package thesixnetwork.sixnft.nftadmin; option go_package = "github.com/thesixnetwork/sixnft/x/nftadmin/types"; diff --git a/proto/nftadmin/query.proto b/proto/nftadmin/query.proto index a634b0e9..7c640178 100644 --- a/proto/nftadmin/query.proto +++ b/proto/nftadmin/query.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.nftadmin; +package thesixnetwork.sixnft.nftadmin; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; diff --git a/proto/nftadmin/tx.proto b/proto/nftadmin/tx.proto index 0a1fa202..2258e622 100644 --- a/proto/nftadmin/tx.proto +++ b/proto/nftadmin/tx.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.nftadmin; +package thesixnetwork.sixnft.nftadmin; // this line is used by starport scaffolding # proto/tx/import diff --git a/proto/nftoracle/action_request.proto b/proto/nftoracle/action_request.proto index 2944cabb..39153cc4 100644 --- a/proto/nftoracle/action_request.proto +++ b/proto/nftoracle/action_request.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.nftoracle; +package thesixnetwork.sixnft.nftoracle; import "nftoracle/opensea.proto"; import "nftoracle/request.proto"; import "gogoproto/gogo.proto"; diff --git a/proto/nftoracle/action_signature.proto b/proto/nftoracle/action_signature.proto index 43d9bf5f..3e3e3228 100644 --- a/proto/nftoracle/action_signature.proto +++ b/proto/nftoracle/action_signature.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.nftoracle; +package thesixnetwork.sixnft.nftoracle; option go_package = "github.com/thesixnetwork/sixnft/x/nftoracle/types"; message ActionSignature { diff --git a/proto/nftoracle/collection_owner_request.proto b/proto/nftoracle/collection_owner_request.proto new file mode 100644 index 00000000..7679433f --- /dev/null +++ b/proto/nftoracle/collection_owner_request.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +package thesixnetwork.sixnft.nftoracle; + +option go_package = "github.com/thesixnetwork/sixnft/x/nftoracle/types"; + +message CollectionOwnerRequest { + uint64 id = 1; + string nftSchemaCode = 2; + string base64OwnerSignature = 3; + +} diff --git a/proto/nftoracle/genesis.proto b/proto/nftoracle/genesis.proto index 8ea3ea00..6474635a 100644 --- a/proto/nftoracle/genesis.proto +++ b/proto/nftoracle/genesis.proto @@ -1,10 +1,11 @@ syntax = "proto3"; -package sixnft.nftoracle; +package thesixnetwork.sixnft.nftoracle; import "gogoproto/gogo.proto"; import "nftoracle/params.proto"; import "nftoracle/mint_request.proto"; import "nftoracle/action_request.proto"; +import "nftoracle/collection_owner_request.proto"; // this line is used by starport scaffolding # genesis/proto/import option go_package = "github.com/thesixnetwork/sixnft/x/nftoracle/types"; @@ -16,5 +17,7 @@ message GenesisState { uint64 mintRequestCount = 3; repeated ActionRequest actionRequestList = 4 [(gogoproto.nullable) = false]; uint64 actionRequestCount = 5; + repeated CollectionOwnerRequest collectionOwnerRequestList = 6 [(gogoproto.nullable) = false]; + uint64 collectionOwnerRequestCount = 7; // this line is used by starport scaffolding # genesis/proto/state } diff --git a/proto/nftoracle/mint_request.proto b/proto/nftoracle/mint_request.proto index 8339f78b..4069c367 100644 --- a/proto/nftoracle/mint_request.proto +++ b/proto/nftoracle/mint_request.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.nftoracle; +package thesixnetwork.sixnft.nftoracle; import "nftoracle/opensea.proto"; import "nftoracle/request.proto"; import "gogoproto/gogo.proto"; diff --git a/proto/nftoracle/opensea.proto b/proto/nftoracle/opensea.proto index 9b570bcc..737e007b 100644 --- a/proto/nftoracle/opensea.proto +++ b/proto/nftoracle/opensea.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.nftoracle; +package thesixnetwork.sixnft.nftoracle; // import "google/protobuf/any.proto"; option go_package = "github.com/thesixnetwork/sixnft/x/nftoracle/types"; diff --git a/proto/nftoracle/params.proto b/proto/nftoracle/params.proto index 559b24ad..40dcfc97 100644 --- a/proto/nftoracle/params.proto +++ b/proto/nftoracle/params.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.nftoracle; +package thesixnetwork.sixnft.nftoracle; import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; diff --git a/proto/nftoracle/query.proto b/proto/nftoracle/query.proto index c155c931..1d37be83 100644 --- a/proto/nftoracle/query.proto +++ b/proto/nftoracle/query.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.nftoracle; +package thesixnetwork.sixnft.nftoracle; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; @@ -7,6 +7,7 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "nftoracle/params.proto"; import "nftoracle/mint_request.proto"; import "nftoracle/action_request.proto"; +import "nftoracle/collection_owner_request.proto"; // this line is used by starport scaffolding # 1 option go_package = "github.com/thesixnetwork/sixnft/x/nftoracle/types"; @@ -37,6 +38,16 @@ service Query { option (google.api.http).get = "/sixnft/nftoracle/action_request"; } +// Queries a CollectionOwnerRequest by id. + rpc CollectionOwnerRequest(QueryGetCollectionOwnerRequestRequest) returns (QueryGetCollectionOwnerRequestResponse) { + option (google.api.http).get = "/thesixnetwork/sixnft/nftoracle/collection_owner_request/{id}"; + } + + // Queries a list of CollectionOwnerRequest items. + rpc CollectionOwnerRequestAll(QueryAllCollectionOwnerRequestRequest) returns (QueryAllCollectionOwnerRequestResponse) { + option (google.api.http).get = "/thesixnetwork/sixnft/nftoracle/collection_owner_request"; + } + // this line is used by starport scaffolding # 2 } @@ -83,4 +94,21 @@ message QueryAllActionRequestResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } +message QueryGetCollectionOwnerRequestRequest { + uint64 id = 1; +} + +message QueryGetCollectionOwnerRequestResponse { + CollectionOwnerRequest CollectionOwnerRequest = 1 [(gogoproto.nullable) = false]; +} + +message QueryAllCollectionOwnerRequestRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +message QueryAllCollectionOwnerRequestResponse { + repeated CollectionOwnerRequest CollectionOwnerRequest = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + // this line is used by starport scaffolding # 3 diff --git a/proto/nftoracle/request.proto b/proto/nftoracle/request.proto index cd753e13..90dfd0bc 100644 --- a/proto/nftoracle/request.proto +++ b/proto/nftoracle/request.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.nftoracle; +package thesixnetwork.sixnft.nftoracle; import "nftoracle/opensea.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; diff --git a/proto/nftoracle/tx.proto b/proto/nftoracle/tx.proto index 7f113297..9942846a 100644 --- a/proto/nftoracle/tx.proto +++ b/proto/nftoracle/tx.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package sixnft.nftoracle; +package thesixnetwork.sixnft.nftoracle; // this line is used by starport scaffolding # proto/tx/import diff --git a/vue/src/store/generated/index.ts b/vue/src/store/generated/index.ts index 857d3715..91cec479 100644 --- a/vue/src/store/generated/index.ts +++ b/vue/src/store/generated/index.ts @@ -37,6 +37,7 @@ import ThesixnetworkSixnftSixnftEvmsupport from './thesixnetwork/sixnft/sixnft.e import ThesixnetworkSixnftSixnftNftadmin from './thesixnetwork/sixnft/sixnft.nftadmin' import ThesixnetworkSixnftSixnftNftmngr from './thesixnetwork/sixnft/sixnft.nftmngr' import ThesixnetworkSixnftSixnftNftoracle from './thesixnetwork/sixnft/sixnft.nftoracle' +import ThesixnetworkSixnftThesixnetworkSixnftNftoracle from './thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle' export default { @@ -77,6 +78,7 @@ export default { ThesixnetworkSixnftSixnftNftadmin: load(ThesixnetworkSixnftSixnftNftadmin, 'sixnft.nftadmin'), ThesixnetworkSixnftSixnftNftmngr: load(ThesixnetworkSixnftSixnftNftmngr, 'sixnft.nftmngr'), ThesixnetworkSixnftSixnftNftoracle: load(ThesixnetworkSixnftSixnftNftoracle, 'sixnft.nftoracle'), + ThesixnetworkSixnftThesixnetworkSixnftNftoracle: load(ThesixnetworkSixnftThesixnetworkSixnftNftoracle, 'thesixnetwork.sixnft.nftoracle'), } diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftadmin/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftadmin/index.ts index 982370f3..7dac8415 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftadmin/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftadmin/index.ts @@ -170,33 +170,33 @@ export default { }, - async sendMsgBurn({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgGrantPermission({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgBurn(value) + const msg = await txClient.msgGrantPermission(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgGrantPermission:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgBurn:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgGrantPermission:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgGrantPermission({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgBurn({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgGrantPermission(value) + const msg = await txClient.msgBurn(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgGrantPermission:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgGrantPermission:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgBurn:Send Could not broadcast Tx: '+ e.message) } } }, @@ -231,29 +231,29 @@ export default { } }, - async MsgBurn({ rootGetters }, { value }) { + async MsgGrantPermission({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgBurn(value) + const msg = await txClient.msgGrantPermission(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgGrantPermission:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgBurn:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgGrantPermission:Create Could not create message: ' + e.message) } } }, - async MsgGrantPermission({ rootGetters }, { value }) { + async MsgBurn({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgGrantPermission(value) + const msg = await txClient.msgBurn(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgGrantPermission:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgGrantPermission:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgBurn:Create Could not create message: ' + e.message) } } }, diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftadmin/module/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftadmin/module/index.ts index 6382a573..3603bb21 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftadmin/module/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftadmin/module/index.ts @@ -4,15 +4,15 @@ import { StdFee } from "@cosmjs/launchpad"; import { SigningStargateClient } from "@cosmjs/stargate"; import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { Api } from "./rest"; -import { MsgBurn } from "./types/nftadmin/tx"; import { MsgGrantPermission } from "./types/nftadmin/tx"; +import { MsgBurn } from "./types/nftadmin/tx"; import { MsgRevokePermission } from "./types/nftadmin/tx"; import { MsgMint } from "./types/nftadmin/tx"; const types = [ - ["/sixnft.nftadmin.MsgBurn", MsgBurn], ["/sixnft.nftadmin.MsgGrantPermission", MsgGrantPermission], + ["/sixnft.nftadmin.MsgBurn", MsgBurn], ["/sixnft.nftadmin.MsgRevokePermission", MsgRevokePermission], ["/sixnft.nftadmin.MsgMint", MsgMint], @@ -47,8 +47,8 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = return { signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgBurn: (data: MsgBurn): EncodeObject => ({ typeUrl: "/sixnft.nftadmin.MsgBurn", value: MsgBurn.fromPartial( data ) }), msgGrantPermission: (data: MsgGrantPermission): EncodeObject => ({ typeUrl: "/sixnft.nftadmin.MsgGrantPermission", value: MsgGrantPermission.fromPartial( data ) }), + msgBurn: (data: MsgBurn): EncodeObject => ({ typeUrl: "/sixnft.nftadmin.MsgBurn", value: MsgBurn.fromPartial( data ) }), msgRevokePermission: (data: MsgRevokePermission): EncodeObject => ({ typeUrl: "/sixnft.nftadmin.MsgRevokePermission", value: MsgRevokePermission.fromPartial( data ) }), msgMint: (data: MsgMint): EncodeObject => ({ typeUrl: "/sixnft.nftadmin.MsgMint", value: MsgMint.fromPartial( data ) }), diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts index 127fba3f..ea236a94 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts @@ -425,78 +425,78 @@ export default { }, - async sendMsgAddAttribute({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgAddTokenAttribute({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddAttribute(value) + const msg = await txClient.msgAddTokenAttribute(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddTokenAttribute:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgAddAttribute:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgAddTokenAttribute:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgCreateNFTSchema({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgChangeSchemaOwner({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateNFTSchema(value) + const msg = await txClient.msgChangeSchemaOwner(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgChangeSchemaOwner:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateNFTSchema:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgChangeSchemaOwner:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgCreateMetadata({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgPerformActionByAdmin({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateMetadata(value) + const msg = await txClient.msgPerformActionByAdmin(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateMetadata:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgPerformActionByAdmin:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateMetadata:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgPerformActionByAdmin:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgAddTokenAttribute({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateMetadata({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddTokenAttribute(value) + const msg = await txClient.msgCreateMetadata(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddTokenAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateMetadata:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgAddTokenAttribute:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateMetadata:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgToggleAction({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateNFTSchema({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgToggleAction(value) + const msg = await txClient.msgCreateNFTSchema(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgToggleAction:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateNFTSchema:Send Could not broadcast Tx: '+ e.message) } } }, @@ -515,129 +515,129 @@ export default { } } }, - async sendMsgPerformActionByAdmin({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgToggleAction({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgPerformActionByAdmin(value) + const msg = await txClient.msgToggleAction(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgPerformActionByAdmin:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgPerformActionByAdmin:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgToggleAction:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgSetBaseUri({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgAddAttribute({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetBaseUri(value) + const msg = await txClient.msgAddAttribute(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddAttribute:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgSetBaseUri:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgAddAttribute:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgChangeSchemaOwner({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgSetNFTAttribute({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgChangeSchemaOwner(value) + const msg = await txClient.msgSetNFTAttribute(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgChangeSchemaOwner:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSetNFTAttribute:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgChangeSchemaOwner:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgSetNFTAttribute:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgSetNFTAttribute({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgSetBaseUri({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetNFTAttribute(value) + const msg = await txClient.msgSetBaseUri(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetNFTAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgSetNFTAttribute:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgSetBaseUri:Send Could not broadcast Tx: '+ e.message) } } }, - async MsgAddAttribute({ rootGetters }, { value }) { + async MsgAddTokenAttribute({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddAttribute(value) + const msg = await txClient.msgAddTokenAttribute(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddTokenAttribute:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgAddAttribute:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgAddTokenAttribute:Create Could not create message: ' + e.message) } } }, - async MsgCreateNFTSchema({ rootGetters }, { value }) { + async MsgChangeSchemaOwner({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateNFTSchema(value) + const msg = await txClient.msgChangeSchemaOwner(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgChangeSchemaOwner:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateNFTSchema:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgChangeSchemaOwner:Create Could not create message: ' + e.message) } } }, - async MsgCreateMetadata({ rootGetters }, { value }) { + async MsgPerformActionByAdmin({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateMetadata(value) + const msg = await txClient.msgPerformActionByAdmin(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateMetadata:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgPerformActionByAdmin:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateMetadata:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgPerformActionByAdmin:Create Could not create message: ' + e.message) } } }, - async MsgAddTokenAttribute({ rootGetters }, { value }) { + async MsgCreateMetadata({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddTokenAttribute(value) + const msg = await txClient.msgCreateMetadata(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddTokenAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateMetadata:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgAddTokenAttribute:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateMetadata:Create Could not create message: ' + e.message) } } }, - async MsgToggleAction({ rootGetters }, { value }) { + async MsgCreateNFTSchema({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgToggleAction(value) + const msg = await txClient.msgCreateNFTSchema(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgToggleAction:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateNFTSchema:Create Could not create message: ' + e.message) } } }, @@ -654,55 +654,55 @@ export default { } } }, - async MsgPerformActionByAdmin({ rootGetters }, { value }) { + async MsgToggleAction({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgPerformActionByAdmin(value) + const msg = await txClient.msgToggleAction(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgPerformActionByAdmin:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgPerformActionByAdmin:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgToggleAction:Create Could not create message: ' + e.message) } } }, - async MsgSetBaseUri({ rootGetters }, { value }) { + async MsgAddAttribute({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetBaseUri(value) + const msg = await txClient.msgAddAttribute(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddAttribute:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgSetBaseUri:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgAddAttribute:Create Could not create message: ' + e.message) } } }, - async MsgChangeSchemaOwner({ rootGetters }, { value }) { + async MsgSetNFTAttribute({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgChangeSchemaOwner(value) + const msg = await txClient.msgSetNFTAttribute(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgChangeSchemaOwner:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSetNFTAttribute:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgChangeSchemaOwner:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgSetNFTAttribute:Create Could not create message: ' + e.message) } } }, - async MsgSetNFTAttribute({ rootGetters }, { value }) { + async MsgSetBaseUri({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetNFTAttribute(value) + const msg = await txClient.msgSetBaseUri(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetNFTAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgSetNFTAttribute:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgSetBaseUri:Create Could not create message: ' + e.message) } } }, diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts index a662204d..df4b3360 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts @@ -4,29 +4,29 @@ import { StdFee } from "@cosmjs/launchpad"; import { SigningStargateClient } from "@cosmjs/stargate"; import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { Api } from "./rest"; -import { MsgAddAttribute } from "./types/nftmngr/tx"; -import { MsgCreateNFTSchema } from "./types/nftmngr/tx"; -import { MsgCreateMetadata } from "./types/nftmngr/tx"; import { MsgAddTokenAttribute } from "./types/nftmngr/tx"; -import { MsgToggleAction } from "./types/nftmngr/tx"; -import { MsgAddAction } from "./types/nftmngr/tx"; -import { MsgPerformActionByAdmin } from "./types/nftmngr/tx"; -import { MsgSetBaseUri } from "./types/nftmngr/tx"; import { MsgChangeSchemaOwner } from "./types/nftmngr/tx"; +import { MsgPerformActionByAdmin } from "./types/nftmngr/tx"; +import { MsgCreateMetadata } from "./types/nftmngr/tx"; +import { MsgCreateNFTSchema } from "./types/nftmngr/tx"; +import { MsgAddAction } from "./types/nftmngr/tx"; +import { MsgToggleAction } from "./types/nftmngr/tx"; +import { MsgAddAttribute } from "./types/nftmngr/tx"; import { MsgSetNFTAttribute } from "./types/nftmngr/tx"; +import { MsgSetBaseUri } from "./types/nftmngr/tx"; const types = [ - ["/sixnft.nftmngr.MsgAddAttribute", MsgAddAttribute], - ["/sixnft.nftmngr.MsgCreateNFTSchema", MsgCreateNFTSchema], - ["/sixnft.nftmngr.MsgCreateMetadata", MsgCreateMetadata], ["/sixnft.nftmngr.MsgAddTokenAttribute", MsgAddTokenAttribute], - ["/sixnft.nftmngr.MsgToggleAction", MsgToggleAction], - ["/sixnft.nftmngr.MsgAddAction", MsgAddAction], - ["/sixnft.nftmngr.MsgPerformActionByAdmin", MsgPerformActionByAdmin], - ["/sixnft.nftmngr.MsgSetBaseUri", MsgSetBaseUri], ["/sixnft.nftmngr.MsgChangeSchemaOwner", MsgChangeSchemaOwner], + ["/sixnft.nftmngr.MsgPerformActionByAdmin", MsgPerformActionByAdmin], + ["/sixnft.nftmngr.MsgCreateMetadata", MsgCreateMetadata], + ["/sixnft.nftmngr.MsgCreateNFTSchema", MsgCreateNFTSchema], + ["/sixnft.nftmngr.MsgAddAction", MsgAddAction], + ["/sixnft.nftmngr.MsgToggleAction", MsgToggleAction], + ["/sixnft.nftmngr.MsgAddAttribute", MsgAddAttribute], ["/sixnft.nftmngr.MsgSetNFTAttribute", MsgSetNFTAttribute], + ["/sixnft.nftmngr.MsgSetBaseUri", MsgSetBaseUri], ]; export const MissingWalletError = new Error("wallet is required"); @@ -59,16 +59,16 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = return { signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgAddAttribute: (data: MsgAddAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddAttribute", value: MsgAddAttribute.fromPartial( data ) }), - msgCreateNFTSchema: (data: MsgCreateNFTSchema): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgCreateNFTSchema", value: MsgCreateNFTSchema.fromPartial( data ) }), - msgCreateMetadata: (data: MsgCreateMetadata): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgCreateMetadata", value: MsgCreateMetadata.fromPartial( data ) }), msgAddTokenAttribute: (data: MsgAddTokenAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddTokenAttribute", value: MsgAddTokenAttribute.fromPartial( data ) }), - msgToggleAction: (data: MsgToggleAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgToggleAction", value: MsgToggleAction.fromPartial( data ) }), - msgAddAction: (data: MsgAddAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddAction", value: MsgAddAction.fromPartial( data ) }), - msgPerformActionByAdmin: (data: MsgPerformActionByAdmin): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgPerformActionByAdmin", value: MsgPerformActionByAdmin.fromPartial( data ) }), - msgSetBaseUri: (data: MsgSetBaseUri): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgSetBaseUri", value: MsgSetBaseUri.fromPartial( data ) }), msgChangeSchemaOwner: (data: MsgChangeSchemaOwner): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgChangeSchemaOwner", value: MsgChangeSchemaOwner.fromPartial( data ) }), + msgPerformActionByAdmin: (data: MsgPerformActionByAdmin): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgPerformActionByAdmin", value: MsgPerformActionByAdmin.fromPartial( data ) }), + msgCreateMetadata: (data: MsgCreateMetadata): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgCreateMetadata", value: MsgCreateMetadata.fromPartial( data ) }), + msgCreateNFTSchema: (data: MsgCreateNFTSchema): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgCreateNFTSchema", value: MsgCreateNFTSchema.fromPartial( data ) }), + msgAddAction: (data: MsgAddAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddAction", value: MsgAddAction.fromPartial( data ) }), + msgToggleAction: (data: MsgToggleAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgToggleAction", value: MsgToggleAction.fromPartial( data ) }), + msgAddAttribute: (data: MsgAddAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddAttribute", value: MsgAddAttribute.fromPartial( data ) }), msgSetNFTAttribute: (data: MsgSetNFTAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgSetNFTAttribute", value: MsgSetNFTAttribute.fromPartial( data ) }), + msgSetBaseUri: (data: MsgSetBaseUri): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgSetBaseUri", value: MsgSetBaseUri.fromPartial( data ) }), }; }; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/rest.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/rest.ts index 4ba271f4..b5ccdd5d 100644 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/rest.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/rest.ts @@ -451,13 +451,6 @@ export interface V1Beta1PageRequest { * is set. */ count_total?: boolean; - - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse?: boolean; } /** @@ -687,7 +680,6 @@ export class Api extends HttpClient @@ -729,7 +721,6 @@ export class Api extends HttpClient @@ -771,7 +762,6 @@ export class Api extends HttpClient @@ -813,7 +803,6 @@ export class Api extends HttpClient diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/cosmos/base/query/v1beta1/pagination.ts index 9c87ac0c..0bc568f4 100644 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/cosmos/base/query/v1beta1/pagination.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/cosmos/base/query/v1beta1/pagination.ts @@ -38,12 +38,6 @@ export interface PageRequest { * is set. */ count_total: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; } /** @@ -68,12 +62,7 @@ export interface PageResponse { total: number; } -const basePageRequest: object = { - offset: 0, - limit: 0, - count_total: false, - reverse: false, -}; +const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; export const PageRequest = { encode(message: PageRequest, writer: Writer = Writer.create()): Writer { @@ -89,9 +78,6 @@ export const PageRequest = { if (message.count_total === true) { writer.uint32(32).bool(message.count_total); } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } return writer; }, @@ -114,9 +100,6 @@ export const PageRequest = { case 4: message.count_total = reader.bool(); break; - case 5: - message.reverse = reader.bool(); - break; default: reader.skipType(tag & 7); break; @@ -145,11 +128,6 @@ export const PageRequest = { } else { message.count_total = false; } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } return message; }, @@ -163,7 +141,6 @@ export const PageRequest = { message.limit !== undefined && (obj.limit = message.limit); message.count_total !== undefined && (obj.count_total = message.count_total); - message.reverse !== undefined && (obj.reverse = message.reverse); return obj; }, @@ -189,11 +166,6 @@ export const PageRequest = { } else { message.count_total = false; } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } return message; }, }; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/index.ts new file mode 100755 index 00000000..0384daee --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/index.ts @@ -0,0 +1,455 @@ +import { txClient, queryClient, MissingWalletError , registry} from './module' + +import { ActionParam } from "./module/types/nftoracle/action_request" +import { ActionRequest } from "./module/types/nftoracle/action_request" +import { ActionSignature } from "./module/types/nftoracle/action_signature" +import { CollectionOwnerRequest } from "./module/types/nftoracle/collection_owner_request" +import { MintRequest } from "./module/types/nftoracle/mint_request" +import { Trait } from "./module/types/nftoracle/opensea" +import { Params } from "./module/types/nftoracle/params" +import { NftOriginData } from "./module/types/nftoracle/request" +import { DataHash } from "./module/types/nftoracle/request" + + +export { ActionParam, ActionRequest, ActionSignature, CollectionOwnerRequest, MintRequest, Trait, Params, NftOriginData, DataHash }; + +async function initTxClient(vuexGetters) { + return await txClient(vuexGetters['common/wallet/signer'], { + addr: vuexGetters['common/env/apiTendermint'] + }) +} + +async function initQueryClient(vuexGetters) { + return await queryClient({ + addr: vuexGetters['common/env/apiCosmos'] + }) +} + +function mergeResults(value, next_values) { + for (let prop of Object.keys(next_values)) { + if (Array.isArray(next_values[prop])) { + value[prop]=[...value[prop], ...next_values[prop]] + }else{ + value[prop]=next_values[prop] + } + } + return value +} + +function getStructure(template) { + let structure = { fields: [] } + for (const [key, value] of Object.entries(template)) { + let field: any = {} + field.name = key + field.type = typeof value + structure.fields.push(field) + } + return structure +} + +const getDefaultState = () => { + return { + Params: {}, + MintRequest: {}, + MintRequestAll: {}, + ActionRequest: {}, + ActionRequestAll: {}, + CollectionOwnerRequest: {}, + CollectionOwnerRequestAll: {}, + + _Structure: { + ActionParam: getStructure(ActionParam.fromPartial({})), + ActionRequest: getStructure(ActionRequest.fromPartial({})), + ActionSignature: getStructure(ActionSignature.fromPartial({})), + CollectionOwnerRequest: getStructure(CollectionOwnerRequest.fromPartial({})), + MintRequest: getStructure(MintRequest.fromPartial({})), + Trait: getStructure(Trait.fromPartial({})), + Params: getStructure(Params.fromPartial({})), + NftOriginData: getStructure(NftOriginData.fromPartial({})), + DataHash: getStructure(DataHash.fromPartial({})), + + }, + _Registry: registry, + _Subscriptions: new Set(), + } +} + +// initial state +const state = getDefaultState() + +export default { + namespaced: true, + state, + mutations: { + RESET_STATE(state) { + Object.assign(state, getDefaultState()) + }, + QUERY(state, { query, key, value }) { + state[query][JSON.stringify(key)] = value + }, + SUBSCRIBE(state, subscription) { + state._Subscriptions.add(JSON.stringify(subscription)) + }, + UNSUBSCRIBE(state, subscription) { + state._Subscriptions.delete(JSON.stringify(subscription)) + } + }, + getters: { + getParams: (state) => (params = { params: {}}) => { + if (!( params).query) { + ( params).query=null + } + return state.Params[JSON.stringify(params)] ?? {} + }, + getMintRequest: (state) => (params = { params: {}}) => { + if (!( params).query) { + ( params).query=null + } + return state.MintRequest[JSON.stringify(params)] ?? {} + }, + getMintRequestAll: (state) => (params = { params: {}}) => { + if (!( params).query) { + ( params).query=null + } + return state.MintRequestAll[JSON.stringify(params)] ?? {} + }, + getActionRequest: (state) => (params = { params: {}}) => { + if (!( params).query) { + ( params).query=null + } + return state.ActionRequest[JSON.stringify(params)] ?? {} + }, + getActionRequestAll: (state) => (params = { params: {}}) => { + if (!( params).query) { + ( params).query=null + } + return state.ActionRequestAll[JSON.stringify(params)] ?? {} + }, + getCollectionOwnerRequest: (state) => (params = { params: {}}) => { + if (!( params).query) { + ( params).query=null + } + return state.CollectionOwnerRequest[JSON.stringify(params)] ?? {} + }, + getCollectionOwnerRequestAll: (state) => (params = { params: {}}) => { + if (!( params).query) { + ( params).query=null + } + return state.CollectionOwnerRequestAll[JSON.stringify(params)] ?? {} + }, + + getTypeStructure: (state) => (type) => { + return state._Structure[type].fields + }, + getRegistry: (state) => { + return state._Registry + } + }, + actions: { + init({ dispatch, rootGetters }) { + console.log('Vuex module: thesixnetwork.sixnft.nftoracle initialized!') + if (rootGetters['common/env/client']) { + rootGetters['common/env/client'].on('newblock', () => { + dispatch('StoreUpdate') + }) + } + }, + resetState({ commit }) { + commit('RESET_STATE') + }, + unsubscribe({ commit }, subscription) { + commit('UNSUBSCRIBE', subscription) + }, + async StoreUpdate({ state, dispatch }) { + state._Subscriptions.forEach(async (subscription) => { + try { + const sub=JSON.parse(subscription) + await dispatch(sub.action, sub.payload) + }catch(e) { + throw new Error('Subscriptions: ' + e.message) + } + }) + }, + + + + + + + async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { + try { + const key = params ?? {}; + const queryClient=await initQueryClient(rootGetters) + let value= (await queryClient.queryParams()).data + + + commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) + if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) + return getters['getParams']( { params: {...key}, query}) ?? {} + } catch (e) { + throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) + + } + }, + + + + + + + + async QueryMintRequest({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { + try { + const key = params ?? {}; + const queryClient=await initQueryClient(rootGetters) + let value= (await queryClient.queryMintRequest( key.id)).data + + + commit('QUERY', { query: 'MintRequest', key: { params: {...key}, query}, value }) + if (subscribe) commit('SUBSCRIBE', { action: 'QueryMintRequest', payload: { options: { all }, params: {...key},query }}) + return getters['getMintRequest']( { params: {...key}, query}) ?? {} + } catch (e) { + throw new Error('QueryClient:QueryMintRequest API Node Unavailable. Could not perform query: ' + e.message) + + } + }, + + + + + + + + async QueryMintRequestAll({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { + try { + const key = params ?? {}; + const queryClient=await initQueryClient(rootGetters) + let value= (await queryClient.queryMintRequestAll(query)).data + + + while (all && ( value).pagination && ( value).pagination.next_key!=null) { + let next_values=(await queryClient.queryMintRequestAll({...query, 'pagination.key':( value).pagination.next_key})).data + value = mergeResults(value, next_values); + } + commit('QUERY', { query: 'MintRequestAll', key: { params: {...key}, query}, value }) + if (subscribe) commit('SUBSCRIBE', { action: 'QueryMintRequestAll', payload: { options: { all }, params: {...key},query }}) + return getters['getMintRequestAll']( { params: {...key}, query}) ?? {} + } catch (e) { + throw new Error('QueryClient:QueryMintRequestAll API Node Unavailable. Could not perform query: ' + e.message) + + } + }, + + + + + + + + async QueryActionRequest({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { + try { + const key = params ?? {}; + const queryClient=await initQueryClient(rootGetters) + let value= (await queryClient.queryActionRequest( key.id)).data + + + commit('QUERY', { query: 'ActionRequest', key: { params: {...key}, query}, value }) + if (subscribe) commit('SUBSCRIBE', { action: 'QueryActionRequest', payload: { options: { all }, params: {...key},query }}) + return getters['getActionRequest']( { params: {...key}, query}) ?? {} + } catch (e) { + throw new Error('QueryClient:QueryActionRequest API Node Unavailable. Could not perform query: ' + e.message) + + } + }, + + + + + + + + async QueryActionRequestAll({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { + try { + const key = params ?? {}; + const queryClient=await initQueryClient(rootGetters) + let value= (await queryClient.queryActionRequestAll(query)).data + + + while (all && ( value).pagination && ( value).pagination.next_key!=null) { + let next_values=(await queryClient.queryActionRequestAll({...query, 'pagination.key':( value).pagination.next_key})).data + value = mergeResults(value, next_values); + } + commit('QUERY', { query: 'ActionRequestAll', key: { params: {...key}, query}, value }) + if (subscribe) commit('SUBSCRIBE', { action: 'QueryActionRequestAll', payload: { options: { all }, params: {...key},query }}) + return getters['getActionRequestAll']( { params: {...key}, query}) ?? {} + } catch (e) { + throw new Error('QueryClient:QueryActionRequestAll API Node Unavailable. Could not perform query: ' + e.message) + + } + }, + + + + + + + + async QueryCollectionOwnerRequest({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { + try { + const key = params ?? {}; + const queryClient=await initQueryClient(rootGetters) + let value= (await queryClient.queryCollectionOwnerRequest( key.id)).data + + + commit('QUERY', { query: 'CollectionOwnerRequest', key: { params: {...key}, query}, value }) + if (subscribe) commit('SUBSCRIBE', { action: 'QueryCollectionOwnerRequest', payload: { options: { all }, params: {...key},query }}) + return getters['getCollectionOwnerRequest']( { params: {...key}, query}) ?? {} + } catch (e) { + throw new Error('QueryClient:QueryCollectionOwnerRequest API Node Unavailable. Could not perform query: ' + e.message) + + } + }, + + + + + + + + async QueryCollectionOwnerRequestAll({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { + try { + const key = params ?? {}; + const queryClient=await initQueryClient(rootGetters) + let value= (await queryClient.queryCollectionOwnerRequestAll(query)).data + + + while (all && ( value).pagination && ( value).pagination.next_key!=null) { + let next_values=(await queryClient.queryCollectionOwnerRequestAll({...query, 'pagination.key':( value).pagination.next_key})).data + value = mergeResults(value, next_values); + } + commit('QUERY', { query: 'CollectionOwnerRequestAll', key: { params: {...key}, query}, value }) + if (subscribe) commit('SUBSCRIBE', { action: 'QueryCollectionOwnerRequestAll', payload: { options: { all }, params: {...key},query }}) + return getters['getCollectionOwnerRequestAll']( { params: {...key}, query}) ?? {} + } catch (e) { + throw new Error('QueryClient:QueryCollectionOwnerRequestAll API Node Unavailable. Could not perform query: ' + e.message) + + } + }, + + + async sendMsgCreateActionRequest({ rootGetters }, { value, fee = [], memo = '' }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgCreateActionRequest(value) + const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, + gas: "200000" }, memo}) + return result + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgCreateActionRequest:Init Could not initialize signing client. Wallet is required.') + }else{ + throw new Error('TxClient:MsgCreateActionRequest:Send Could not broadcast Tx: '+ e.message) + } + } + }, + async sendMsgCreateMintRequest({ rootGetters }, { value, fee = [], memo = '' }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgCreateMintRequest(value) + const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, + gas: "200000" }, memo}) + return result + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgCreateMintRequest:Init Could not initialize signing client. Wallet is required.') + }else{ + throw new Error('TxClient:MsgCreateMintRequest:Send Could not broadcast Tx: '+ e.message) + } + } + }, + async sendMsgSubmitMintResponse({ rootGetters }, { value, fee = [], memo = '' }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgSubmitMintResponse(value) + const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, + gas: "200000" }, memo}) + return result + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgSubmitMintResponse:Init Could not initialize signing client. Wallet is required.') + }else{ + throw new Error('TxClient:MsgSubmitMintResponse:Send Could not broadcast Tx: '+ e.message) + } + } + }, + async sendMsgSubmitActionResponse({ rootGetters }, { value, fee = [], memo = '' }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgSubmitActionResponse(value) + const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, + gas: "200000" }, memo}) + return result + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgSubmitActionResponse:Init Could not initialize signing client. Wallet is required.') + }else{ + throw new Error('TxClient:MsgSubmitActionResponse:Send Could not broadcast Tx: '+ e.message) + } + } + }, + + async MsgCreateActionRequest({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgCreateActionRequest(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgCreateActionRequest:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgCreateActionRequest:Create Could not create message: ' + e.message) + } + } + }, + async MsgCreateMintRequest({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgCreateMintRequest(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgCreateMintRequest:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgCreateMintRequest:Create Could not create message: ' + e.message) + } + } + }, + async MsgSubmitMintResponse({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgSubmitMintResponse(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgSubmitMintResponse:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgSubmitMintResponse:Create Could not create message: ' + e.message) + } + } + }, + async MsgSubmitActionResponse({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgSubmitActionResponse(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgSubmitActionResponse:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgSubmitActionResponse:Create Could not create message: ' + e.message) + } + } + }, + + } +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/index.ts new file mode 100755 index 00000000..507c50a7 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/index.ts @@ -0,0 +1,69 @@ +// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. + +import { StdFee } from "@cosmjs/launchpad"; +import { SigningStargateClient } from "@cosmjs/stargate"; +import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; +import { Api } from "./rest"; +import { MsgCreateActionRequest } from "./types/nftoracle/tx"; +import { MsgCreateMintRequest } from "./types/nftoracle/tx"; +import { MsgSubmitMintResponse } from "./types/nftoracle/tx"; +import { MsgSubmitActionResponse } from "./types/nftoracle/tx"; + + +const types = [ + ["/thesixnetwork.sixnft.nftoracle.MsgCreateActionRequest", MsgCreateActionRequest], + ["/thesixnetwork.sixnft.nftoracle.MsgCreateMintRequest", MsgCreateMintRequest], + ["/thesixnetwork.sixnft.nftoracle.MsgSubmitMintResponse", MsgSubmitMintResponse], + ["/thesixnetwork.sixnft.nftoracle.MsgSubmitActionResponse", MsgSubmitActionResponse], + +]; +export const MissingWalletError = new Error("wallet is required"); + +export const registry = new Registry(types); + +const defaultFee = { + amount: [], + gas: "200000", +}; + +interface TxClientOptions { + addr: string +} + +interface SignAndBroadcastOptions { + fee: StdFee, + memo?: string +} + +const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { + if (!wallet) throw MissingWalletError; + let client; + if (addr) { + client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); + }else{ + client = await SigningStargateClient.offline( wallet, { registry }); + } + const { address } = (await wallet.getAccounts())[0]; + + return { + signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), + msgCreateActionRequest: (data: MsgCreateActionRequest): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgCreateActionRequest", value: MsgCreateActionRequest.fromPartial( data ) }), + msgCreateMintRequest: (data: MsgCreateMintRequest): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgCreateMintRequest", value: MsgCreateMintRequest.fromPartial( data ) }), + msgSubmitMintResponse: (data: MsgSubmitMintResponse): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgSubmitMintResponse", value: MsgSubmitMintResponse.fromPartial( data ) }), + msgSubmitActionResponse: (data: MsgSubmitActionResponse): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgSubmitActionResponse", value: MsgSubmitActionResponse.fromPartial( data ) }), + + }; +}; + +interface QueryClientOptions { + addr: string +} + +const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { + return new Api({ baseUrl: addr }); +}; + +export { + txClient, + queryClient, +}; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/rest.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/rest.ts new file mode 100644 index 00000000..23241498 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/rest.ts @@ -0,0 +1,606 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +export interface NftoracleActionRequest { + /** @format uint64 */ + id?: string; + nft_schema_code?: string; + token_id?: string; + action?: string; + caller?: string; + ref_id?: string; + + /** @format uint64 */ + required_confirm?: string; + status?: NftoracleRequestStatus; + + /** @format uint64 */ + current_confirm?: string; + confirmers?: Record; + + /** @format date-time */ + created_at?: string; + + /** @format date-time */ + valid_until?: string; + data_hashes?: NftoracleDataHash[]; + + /** @format int64 */ + expired_height?: string; + execution_error_message?: string; +} + +export interface NftoracleCollectionOwnerRequest { + /** @format uint64 */ + id?: string; + nftSchemaCode?: string; + base64OwnerSignature?: string; +} + +export interface NftoracleDataHash { + origin_data?: NftoracleNftOriginData; + + /** @format byte */ + hash?: string; + confirmers?: string[]; +} + +export interface NftoracleMintRequest { + /** @format uint64 */ + id?: string; + nft_schema_code?: string; + token_id?: string; + + /** @format uint64 */ + required_confirm?: string; + status?: NftoracleRequestStatus; + + /** @format uint64 */ + current_confirm?: string; + confirmers?: Record; + + /** @format date-time */ + created_at?: string; + + /** @format date-time */ + valid_until?: string; + data_hashes?: NftoracleDataHash[]; + + /** @format int64 */ + expired_height?: string; +} + +export interface NftoracleMsgCreateActionRequestResponse { + /** @format uint64 */ + id?: string; +} + +export interface NftoracleMsgCreateMintRequestResponse { + /** @format uint64 */ + id?: string; + nftSchemaCode?: string; + tokenId?: string; +} + +export interface NftoracleMsgSubmitActionResponseResponse { + actionRequestID?: string; +} + +export interface NftoracleMsgSubmitMintResponseResponse { + mintRequestID?: string; +} + +export interface NftoracleNftOriginData { + image?: string; + holder_address?: string; + traits?: NftoracleTrait[]; +} + +/** + * Params defines the parameters for the module. + */ +export interface NftoracleParams { + mint_request_active_duration?: string; + action_request_active_duration?: string; +} + +export interface NftoracleQueryAllActionRequestResponse { + ActionRequest?: NftoracleActionRequest[]; + + /** + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ + pagination?: V1Beta1PageResponse; +} + +export interface NftoracleQueryAllCollectionOwnerRequestResponse { + CollectionOwnerRequest?: NftoracleCollectionOwnerRequest[]; + + /** + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ + pagination?: V1Beta1PageResponse; +} + +export interface NftoracleQueryAllMintRequestResponse { + MintRequest?: NftoracleMintRequest[]; + + /** + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ + pagination?: V1Beta1PageResponse; +} + +export interface NftoracleQueryGetActionRequestResponse { + ActionRequest?: NftoracleActionRequest; +} + +export interface NftoracleQueryGetCollectionOwnerRequestResponse { + CollectionOwnerRequest?: NftoracleCollectionOwnerRequest; +} + +export interface NftoracleQueryGetMintRequestResponse { + MintRequest?: NftoracleMintRequest; +} + +/** + * QueryParamsResponse is response type for the Query/Params RPC method. + */ +export interface NftoracleQueryParamsResponse { + /** params holds all the parameters of this module. */ + params?: NftoracleParams; +} + +export enum NftoracleRequestStatus { + PENDING = "PENDING", + SUCCESS_WITH_CONSENSUS = "SUCCESS_WITH_CONSENSUS", + FAILED_WITHOUT_CONCENSUS = "FAILED_WITHOUT_CONCENSUS", + EXPIRED = "EXPIRED", + FAILED_ON_EXECUTION = "FAILED_ON_EXECUTION", +} + +export interface NftoracleTrait { + trait_type?: string; + value?: string; + display_type?: string; + max_value?: string; +} + +export interface ProtobufAny { + "@type"?: string; +} + +export interface RpcStatus { + /** @format int32 */ + code?: number; + message?: string; + details?: ProtobufAny[]; +} + +/** +* message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } +*/ +export interface V1Beta1PageRequest { + /** + * key is a value returned in PageResponse.next_key to begin + * querying the next page most efficiently. Only one of offset or key + * should be set. + * @format byte + */ + key?: string; + + /** + * offset is a numeric offset that can be used when key is unavailable. + * It is less efficient than using key. Only one of offset or key should + * be set. + * @format uint64 + */ + offset?: string; + + /** + * limit is the total number of results to be returned in the result page. + * If left empty it will default to a value to be set by each app. + * @format uint64 + */ + limit?: string; + + /** + * count_total is set to true to indicate that the result set should include + * a count of the total number of items available for pagination in UIs. + * count_total is only respected when offset is used. It is ignored when key + * is set. + */ + count_total?: boolean; + + /** + * reverse is set to true if results are to be returned in the descending order. + * + * Since: cosmos-sdk 0.43 + */ + reverse?: boolean; +} + +/** +* PageResponse is to be embedded in gRPC response messages where the +corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } +*/ +export interface V1Beta1PageResponse { + /** @format byte */ + next_key?: string; + + /** @format uint64 */ + total?: string; +} + +export type QueryParamsType = Record; +export type ResponseFormat = keyof Omit; + +export interface FullRequestParams extends Omit { + /** set parameter to `true` for call `securityWorker` for this request */ + secure?: boolean; + /** request path */ + path: string; + /** content type of request body */ + type?: ContentType; + /** query params */ + query?: QueryParamsType; + /** format of response (i.e. response.json() -> format: "json") */ + format?: keyof Omit; + /** request body */ + body?: unknown; + /** base url */ + baseUrl?: string; + /** request cancellation token */ + cancelToken?: CancelToken; +} + +export type RequestParams = Omit; + +export interface ApiConfig { + baseUrl?: string; + baseApiParams?: Omit; + securityWorker?: (securityData: SecurityDataType) => RequestParams | void; +} + +export interface HttpResponse extends Response { + data: D; + error: E; +} + +type CancelToken = Symbol | string | number; + +export enum ContentType { + Json = "application/json", + FormData = "multipart/form-data", + UrlEncoded = "application/x-www-form-urlencoded", +} + +export class HttpClient { + public baseUrl: string = ""; + private securityData: SecurityDataType = null as any; + private securityWorker: null | ApiConfig["securityWorker"] = null; + private abortControllers = new Map(); + + private baseApiParams: RequestParams = { + credentials: "same-origin", + headers: {}, + redirect: "follow", + referrerPolicy: "no-referrer", + }; + + constructor(apiConfig: ApiConfig = {}) { + Object.assign(this, apiConfig); + } + + public setSecurityData = (data: SecurityDataType) => { + this.securityData = data; + }; + + private addQueryParam(query: QueryParamsType, key: string) { + const value = query[key]; + + return ( + encodeURIComponent(key) + + "=" + + encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) + ); + } + + protected toQueryString(rawQuery?: QueryParamsType): string { + const query = rawQuery || {}; + const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); + return keys + .map((key) => + typeof query[key] === "object" && !Array.isArray(query[key]) + ? this.toQueryString(query[key] as QueryParamsType) + : this.addQueryParam(query, key), + ) + .join("&"); + } + + protected addQueryParams(rawQuery?: QueryParamsType): string { + const queryString = this.toQueryString(rawQuery); + return queryString ? `?${queryString}` : ""; + } + + private contentFormatters: Record any> = { + [ContentType.Json]: (input: any) => + input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, + [ContentType.FormData]: (input: any) => + Object.keys(input || {}).reduce((data, key) => { + data.append(key, input[key]); + return data; + }, new FormData()), + [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), + }; + + private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { + return { + ...this.baseApiParams, + ...params1, + ...(params2 || {}), + headers: { + ...(this.baseApiParams.headers || {}), + ...(params1.headers || {}), + ...((params2 && params2.headers) || {}), + }, + }; + } + + private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { + if (this.abortControllers.has(cancelToken)) { + const abortController = this.abortControllers.get(cancelToken); + if (abortController) { + return abortController.signal; + } + return void 0; + } + + const abortController = new AbortController(); + this.abortControllers.set(cancelToken, abortController); + return abortController.signal; + }; + + public abortRequest = (cancelToken: CancelToken) => { + const abortController = this.abortControllers.get(cancelToken); + + if (abortController) { + abortController.abort(); + this.abortControllers.delete(cancelToken); + } + }; + + public request = ({ + body, + secure, + path, + type, + query, + format = "json", + baseUrl, + cancelToken, + ...params + }: FullRequestParams): Promise> => { + const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; + const requestParams = this.mergeRequestParams(params, secureParams); + const queryString = query && this.toQueryString(query); + const payloadFormatter = this.contentFormatters[type || ContentType.Json]; + + return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { + ...requestParams, + headers: { + ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), + ...(requestParams.headers || {}), + }, + signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, + body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), + }).then(async (response) => { + const r = response as HttpResponse; + r.data = (null as unknown) as T; + r.error = (null as unknown) as E; + + const data = await response[format]() + .then((data) => { + if (r.ok) { + r.data = data; + } else { + r.error = data; + } + return r; + }) + .catch((e) => { + r.error = e; + return r; + }); + + if (cancelToken) { + this.abortControllers.delete(cancelToken); + } + + if (!response.ok) throw data; + return data; + }); + }; +} + +/** + * @title nftoracle/action_request.proto + * @version version not set + */ +export class Api extends HttpClient { + /** + * No description + * + * @tags Query + * @name QueryActionRequestAll + * @summary Queries a list of ActionRequest items. + * @request GET:/sixnft/nftoracle/action_request + */ + queryActionRequestAll = ( + query?: { + "pagination.key"?: string; + "pagination.offset"?: string; + "pagination.limit"?: string; + "pagination.count_total"?: boolean; + "pagination.reverse"?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/sixnft/nftoracle/action_request`, + method: "GET", + query: query, + format: "json", + ...params, + }); + + /** + * No description + * + * @tags Query + * @name QueryActionRequest + * @summary Queries a ActionRequest by id. + * @request GET:/sixnft/nftoracle/action_request/{id} + */ + queryActionRequest = (id: string, params: RequestParams = {}) => + this.request({ + path: `/sixnft/nftoracle/action_request/${id}`, + method: "GET", + format: "json", + ...params, + }); + + /** + * No description + * + * @tags Query + * @name QueryMintRequestAll + * @summary Queries a list of MintRequest items. + * @request GET:/sixnft/nftoracle/mint_request + */ + queryMintRequestAll = ( + query?: { + "pagination.key"?: string; + "pagination.offset"?: string; + "pagination.limit"?: string; + "pagination.count_total"?: boolean; + "pagination.reverse"?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/sixnft/nftoracle/mint_request`, + method: "GET", + query: query, + format: "json", + ...params, + }); + + /** + * No description + * + * @tags Query + * @name QueryMintRequest + * @summary Queries a MintRequest by id. + * @request GET:/sixnft/nftoracle/mint_request/{id} + */ + queryMintRequest = (id: string, params: RequestParams = {}) => + this.request({ + path: `/sixnft/nftoracle/mint_request/${id}`, + method: "GET", + format: "json", + ...params, + }); + + /** + * No description + * + * @tags Query + * @name QueryParams + * @summary Parameters queries the parameters of the module. + * @request GET:/sixnft/nftoracle/params + */ + queryParams = (params: RequestParams = {}) => + this.request({ + path: `/sixnft/nftoracle/params`, + method: "GET", + format: "json", + ...params, + }); + + /** + * No description + * + * @tags Query + * @name QueryCollectionOwnerRequestAll + * @summary Queries a list of CollectionOwnerRequest items. + * @request GET:/thesixnetwork/sixnft/nftoracle/collection_owner_request + */ + queryCollectionOwnerRequestAll = ( + query?: { + "pagination.key"?: string; + "pagination.offset"?: string; + "pagination.limit"?: string; + "pagination.count_total"?: boolean; + "pagination.reverse"?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/thesixnetwork/sixnft/nftoracle/collection_owner_request`, + method: "GET", + query: query, + format: "json", + ...params, + }); + + /** + * No description + * + * @tags Query + * @name QueryCollectionOwnerRequest + * @summary Queries a CollectionOwnerRequest by id. + * @request GET:/thesixnetwork/sixnft/nftoracle/collection_owner_request/{id} + */ + queryCollectionOwnerRequest = (id: string, params: RequestParams = {}) => + this.request({ + path: `/thesixnetwork/sixnft/nftoracle/collection_owner_request/${id}`, + method: "GET", + format: "json", + ...params, + }); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/cosmos/base/query/v1beta1/pagination.ts new file mode 100644 index 00000000..9c87ac0c --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/cosmos/base/query/v1beta1/pagination.ts @@ -0,0 +1,328 @@ +/* eslint-disable */ +import * as Long from "long"; +import { util, configure, Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "cosmos.base.query.v1beta1"; + +/** + * PageRequest is to be embedded in gRPC request messages for efficient + * pagination. Ex: + * + * message SomeRequest { + * Foo some_parameter = 1; + * PageRequest pagination = 2; + * } + */ +export interface PageRequest { + /** + * key is a value returned in PageResponse.next_key to begin + * querying the next page most efficiently. Only one of offset or key + * should be set. + */ + key: Uint8Array; + /** + * offset is a numeric offset that can be used when key is unavailable. + * It is less efficient than using key. Only one of offset or key should + * be set. + */ + offset: number; + /** + * limit is the total number of results to be returned in the result page. + * If left empty it will default to a value to be set by each app. + */ + limit: number; + /** + * count_total is set to true to indicate that the result set should include + * a count of the total number of items available for pagination in UIs. + * count_total is only respected when offset is used. It is ignored when key + * is set. + */ + count_total: boolean; + /** + * reverse is set to true if results are to be returned in the descending order. + * + * Since: cosmos-sdk 0.43 + */ + reverse: boolean; +} + +/** + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ +export interface PageResponse { + /** + * next_key is the key to be passed to PageRequest.key to + * query the next page most efficiently + */ + next_key: Uint8Array; + /** + * total is total number of results available if PageRequest.count_total + * was set, its value is undefined otherwise + */ + total: number; +} + +const basePageRequest: object = { + offset: 0, + limit: 0, + count_total: false, + reverse: false, +}; + +export const PageRequest = { + encode(message: PageRequest, writer: Writer = Writer.create()): Writer { + if (message.key.length !== 0) { + writer.uint32(10).bytes(message.key); + } + if (message.offset !== 0) { + writer.uint32(16).uint64(message.offset); + } + if (message.limit !== 0) { + writer.uint32(24).uint64(message.limit); + } + if (message.count_total === true) { + writer.uint32(32).bool(message.count_total); + } + if (message.reverse === true) { + writer.uint32(40).bool(message.reverse); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): PageRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...basePageRequest } as PageRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.offset = longToNumber(reader.uint64() as Long); + break; + case 3: + message.limit = longToNumber(reader.uint64() as Long); + break; + case 4: + message.count_total = reader.bool(); + break; + case 5: + message.reverse = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): PageRequest { + const message = { ...basePageRequest } as PageRequest; + if (object.key !== undefined && object.key !== null) { + message.key = bytesFromBase64(object.key); + } + if (object.offset !== undefined && object.offset !== null) { + message.offset = Number(object.offset); + } else { + message.offset = 0; + } + if (object.limit !== undefined && object.limit !== null) { + message.limit = Number(object.limit); + } else { + message.limit = 0; + } + if (object.count_total !== undefined && object.count_total !== null) { + message.count_total = Boolean(object.count_total); + } else { + message.count_total = false; + } + if (object.reverse !== undefined && object.reverse !== null) { + message.reverse = Boolean(object.reverse); + } else { + message.reverse = false; + } + return message; + }, + + toJSON(message: PageRequest): unknown { + const obj: any = {}; + message.key !== undefined && + (obj.key = base64FromBytes( + message.key !== undefined ? message.key : new Uint8Array() + )); + message.offset !== undefined && (obj.offset = message.offset); + message.limit !== undefined && (obj.limit = message.limit); + message.count_total !== undefined && + (obj.count_total = message.count_total); + message.reverse !== undefined && (obj.reverse = message.reverse); + return obj; + }, + + fromPartial(object: DeepPartial): PageRequest { + const message = { ...basePageRequest } as PageRequest; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = new Uint8Array(); + } + if (object.offset !== undefined && object.offset !== null) { + message.offset = object.offset; + } else { + message.offset = 0; + } + if (object.limit !== undefined && object.limit !== null) { + message.limit = object.limit; + } else { + message.limit = 0; + } + if (object.count_total !== undefined && object.count_total !== null) { + message.count_total = object.count_total; + } else { + message.count_total = false; + } + if (object.reverse !== undefined && object.reverse !== null) { + message.reverse = object.reverse; + } else { + message.reverse = false; + } + return message; + }, +}; + +const basePageResponse: object = { total: 0 }; + +export const PageResponse = { + encode(message: PageResponse, writer: Writer = Writer.create()): Writer { + if (message.next_key.length !== 0) { + writer.uint32(10).bytes(message.next_key); + } + if (message.total !== 0) { + writer.uint32(16).uint64(message.total); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): PageResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...basePageResponse } as PageResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.next_key = reader.bytes(); + break; + case 2: + message.total = longToNumber(reader.uint64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): PageResponse { + const message = { ...basePageResponse } as PageResponse; + if (object.next_key !== undefined && object.next_key !== null) { + message.next_key = bytesFromBase64(object.next_key); + } + if (object.total !== undefined && object.total !== null) { + message.total = Number(object.total); + } else { + message.total = 0; + } + return message; + }, + + toJSON(message: PageResponse): unknown { + const obj: any = {}; + message.next_key !== undefined && + (obj.next_key = base64FromBytes( + message.next_key !== undefined ? message.next_key : new Uint8Array() + )); + message.total !== undefined && (obj.total = message.total); + return obj; + }, + + fromPartial(object: DeepPartial): PageResponse { + const message = { ...basePageResponse } as PageResponse; + if (object.next_key !== undefined && object.next_key !== null) { + message.next_key = object.next_key; + } else { + message.next_key = new Uint8Array(); + } + if (object.total !== undefined && object.total !== null) { + message.total = object.total; + } else { + message.total = 0; + } + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +const atob: (b64: string) => string = + globalThis.atob || + ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +function bytesFromBase64(b64: string): Uint8Array { + const bin = atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; +} + +const btoa: (bin: string) => string = + globalThis.btoa || + ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +function base64FromBytes(arr: Uint8Array): string { + const bin: string[] = []; + for (let i = 0; i < arr.byteLength; ++i) { + bin.push(String.fromCharCode(arr[i])); + } + return btoa(bin.join("")); +} + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/gogoproto/gogo.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/gogoproto/gogo.ts new file mode 100644 index 00000000..3f41a047 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/gogoproto/gogo.ts @@ -0,0 +1,2 @@ +/* eslint-disable */ +export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/api/annotations.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/api/annotations.ts new file mode 100644 index 00000000..aace4787 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/api/annotations.ts @@ -0,0 +1,2 @@ +/* eslint-disable */ +export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/api/http.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/api/http.ts new file mode 100644 index 00000000..ccadff68 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/api/http.ts @@ -0,0 +1,706 @@ +/* eslint-disable */ +import { Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "google.api"; + +/** + * Defines the HTTP configuration for an API service. It contains a list of + * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method + * to one or more HTTP REST API methods. + */ +export interface Http { + /** + * A list of HTTP configuration rules that apply to individual API methods. + * + * **NOTE:** All service configuration rules follow "last one wins" order. + */ + rules: HttpRule[]; + /** + * When set to true, URL path parmeters will be fully URI-decoded except in + * cases of single segment matches in reserved expansion, where "%2F" will be + * left encoded. + * + * The default behavior is to not decode RFC 6570 reserved characters in multi + * segment matches. + */ + fully_decode_reserved_expansion: boolean; +} + +/** + * `HttpRule` defines the mapping of an RPC method to one or more HTTP + * REST API methods. The mapping specifies how different portions of the RPC + * request message are mapped to URL path, URL query parameters, and + * HTTP request body. The mapping is typically specified as an + * `google.api.http` annotation on the RPC method, + * see "google/api/annotations.proto" for details. + * + * The mapping consists of a field specifying the path template and + * method kind. The path template can refer to fields in the request + * message, as in the example below which describes a REST GET + * operation on a resource collection of messages: + * + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; + * } + * } + * message GetMessageRequest { + * message SubMessage { + * string subfield = 1; + * } + * string message_id = 1; // mapped to the URL + * SubMessage sub = 2; // `sub.subfield` is url-mapped + * } + * message Message { + * string text = 1; // content of the resource + * } + * + * The same http annotation can alternatively be expressed inside the + * `GRPC API Configuration` YAML file. + * + * http: + * rules: + * - selector: .Messaging.GetMessage + * get: /v1/messages/{message_id}/{sub.subfield} + * + * This definition enables an automatic, bidrectional mapping of HTTP + * JSON to RPC. Example: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` + * + * In general, not only fields but also field paths can be referenced + * from a path pattern. Fields mapped to the path pattern cannot be + * repeated and must have a primitive (non-message) type. + * + * Any fields in the request message which are not bound by the path + * pattern automatically become (optional) HTTP query + * parameters. Assume the following definition of the request message: + * + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http).get = "/v1/messages/{message_id}"; + * } + * } + * message GetMessageRequest { + * message SubMessage { + * string subfield = 1; + * } + * string message_id = 1; // mapped to the URL + * int64 revision = 2; // becomes a parameter + * SubMessage sub = 3; // `sub.subfield` becomes a parameter + * } + * + * + * This enables a HTTP JSON to RPC mapping as below: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` + * + * Note that fields which are mapped to HTTP parameters must have a + * primitive type or a repeated primitive type. Message types are not + * allowed. In the case of a repeated type, the parameter can be + * repeated in the URL, as in `...?param=A¶m=B`. + * + * For HTTP method kinds which allow a request body, the `body` field + * specifies the mapping. Consider a REST update method on the + * message resource collection: + * + * + * service Messaging { + * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { + * option (google.api.http) = { + * put: "/v1/messages/{message_id}" + * body: "message" + * }; + * } + * } + * message UpdateMessageRequest { + * string message_id = 1; // mapped to the URL + * Message message = 2; // mapped to the body + * } + * + * + * The following HTTP JSON to RPC mapping is enabled, where the + * representation of the JSON in the request body is determined by + * protos JSON encoding: + * + * HTTP | RPC + * -----|----- + * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` + * + * The special name `*` can be used in the body mapping to define that + * every field not bound by the path template should be mapped to the + * request body. This enables the following alternative definition of + * the update method: + * + * service Messaging { + * rpc UpdateMessage(Message) returns (Message) { + * option (google.api.http) = { + * put: "/v1/messages/{message_id}" + * body: "*" + * }; + * } + * } + * message Message { + * string message_id = 1; + * string text = 2; + * } + * + * + * The following HTTP JSON to RPC mapping is enabled: + * + * HTTP | RPC + * -----|----- + * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` + * + * Note that when using `*` in the body mapping, it is not possible to + * have HTTP parameters, as all fields not bound by the path end in + * the body. This makes this option more rarely used in practice of + * defining REST APIs. The common usage of `*` is in custom methods + * which don't use the URL at all for transferring data. + * + * It is possible to define multiple HTTP methods for one RPC by using + * the `additional_bindings` option. Example: + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { + * get: "/v1/messages/{message_id}" + * additional_bindings { + * get: "/v1/users/{user_id}/messages/{message_id}" + * } + * }; + * } + * } + * message GetMessageRequest { + * string message_id = 1; + * string user_id = 2; + * } + * + * + * This enables the following two alternative HTTP JSON to RPC + * mappings: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` + * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` + * + * # Rules for HTTP mapping + * + * The rules for mapping HTTP path, query parameters, and body fields + * to the request message are as follows: + * + * 1. The `body` field specifies either `*` or a field path, or is + * omitted. If omitted, it indicates there is no HTTP request body. + * 2. Leaf fields (recursive expansion of nested messages in the + * request) can be classified into three types: + * (a) Matched in the URL template. + * (b) Covered by body (if body is `*`, everything except (a) fields; + * else everything under the body field) + * (c) All other fields. + * 3. URL query parameters found in the HTTP request are mapped to (c) fields. + * 4. Any body sent with an HTTP request can contain only (b) fields. + * + * The syntax of the path template is as follows: + * + * Template = "/" Segments [ Verb ] ; + * Segments = Segment { "/" Segment } ; + * Segment = "*" | "**" | LITERAL | Variable ; + * Variable = "{" FieldPath [ "=" Segments ] "}" ; + * FieldPath = IDENT { "." IDENT } ; + * Verb = ":" LITERAL ; + * + * The syntax `*` matches a single path segment. The syntax `**` matches zero + * or more path segments, which must be the last part of the path except the + * `Verb`. The syntax `LITERAL` matches literal text in the path. + * + * The syntax `Variable` matches part of the URL path as specified by its + * template. A variable template must not contain other variables. If a variable + * matches a single path segment, its template may be omitted, e.g. `{var}` + * is equivalent to `{var=*}`. + * + * If a variable contains exactly one path segment, such as `"{var}"` or + * `"{var=*}"`, when such a variable is expanded into a URL path, all characters + * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the + * Discovery Document as `{var}`. + * + * If a variable contains one or more path segments, such as `"{var=foo/*}"` + * or `"{var=**}"`, when such a variable is expanded into a URL path, all + * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables + * show up in the Discovery Document as `{+var}`. + * + * NOTE: While the single segment variable matches the semantics of + * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 + * Simple String Expansion, the multi segment variable **does not** match + * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion + * does not expand special characters like `?` and `#`, which would lead + * to invalid URLs. + * + * NOTE: the field paths in variables and in the `body` must not refer to + * repeated fields or map fields. + */ +export interface HttpRule { + /** + * Selects methods to which this rule applies. + * + * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + */ + selector: string; + /** Used for listing and getting information about resources. */ + get: string | undefined; + /** Used for updating a resource. */ + put: string | undefined; + /** Used for creating a resource. */ + post: string | undefined; + /** Used for deleting a resource. */ + delete: string | undefined; + /** Used for updating a resource. */ + patch: string | undefined; + /** + * The custom pattern is used for specifying an HTTP method that is not + * included in the `pattern` field, such as HEAD, or "*" to leave the + * HTTP method unspecified for this rule. The wild-card rule is useful + * for services that provide content to Web (HTML) clients. + */ + custom: CustomHttpPattern | undefined; + /** + * The name of the request field whose value is mapped to the HTTP body, or + * `*` for mapping all fields not captured by the path pattern to the HTTP + * body. NOTE: the referred field must not be a repeated field and must be + * present at the top-level of request message type. + */ + body: string; + /** + * Optional. The name of the response field whose value is mapped to the HTTP + * body of response. Other response fields are ignored. When + * not set, the response message will be used as HTTP body of response. + */ + response_body: string; + /** + * Additional HTTP bindings for the selector. Nested bindings must + * not contain an `additional_bindings` field themselves (that is, + * the nesting may only be one level deep). + */ + additional_bindings: HttpRule[]; +} + +/** A custom pattern is used for defining custom HTTP verb. */ +export interface CustomHttpPattern { + /** The name of this custom HTTP verb. */ + kind: string; + /** The path matched by this custom verb. */ + path: string; +} + +const baseHttp: object = { fully_decode_reserved_expansion: false }; + +export const Http = { + encode(message: Http, writer: Writer = Writer.create()): Writer { + for (const v of message.rules) { + HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.fully_decode_reserved_expansion === true) { + writer.uint32(16).bool(message.fully_decode_reserved_expansion); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): Http { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseHttp } as Http; + message.rules = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rules.push(HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fully_decode_reserved_expansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): Http { + const message = { ...baseHttp } as Http; + message.rules = []; + if (object.rules !== undefined && object.rules !== null) { + for (const e of object.rules) { + message.rules.push(HttpRule.fromJSON(e)); + } + } + if ( + object.fully_decode_reserved_expansion !== undefined && + object.fully_decode_reserved_expansion !== null + ) { + message.fully_decode_reserved_expansion = Boolean( + object.fully_decode_reserved_expansion + ); + } else { + message.fully_decode_reserved_expansion = false; + } + return message; + }, + + toJSON(message: Http): unknown { + const obj: any = {}; + if (message.rules) { + obj.rules = message.rules.map((e) => + e ? HttpRule.toJSON(e) : undefined + ); + } else { + obj.rules = []; + } + message.fully_decode_reserved_expansion !== undefined && + (obj.fully_decode_reserved_expansion = + message.fully_decode_reserved_expansion); + return obj; + }, + + fromPartial(object: DeepPartial): Http { + const message = { ...baseHttp } as Http; + message.rules = []; + if (object.rules !== undefined && object.rules !== null) { + for (const e of object.rules) { + message.rules.push(HttpRule.fromPartial(e)); + } + } + if ( + object.fully_decode_reserved_expansion !== undefined && + object.fully_decode_reserved_expansion !== null + ) { + message.fully_decode_reserved_expansion = + object.fully_decode_reserved_expansion; + } else { + message.fully_decode_reserved_expansion = false; + } + return message; + }, +}; + +const baseHttpRule: object = { selector: "", body: "", response_body: "" }; + +export const HttpRule = { + encode(message: HttpRule, writer: Writer = Writer.create()): Writer { + if (message.selector !== "") { + writer.uint32(10).string(message.selector); + } + if (message.get !== undefined) { + writer.uint32(18).string(message.get); + } + if (message.put !== undefined) { + writer.uint32(26).string(message.put); + } + if (message.post !== undefined) { + writer.uint32(34).string(message.post); + } + if (message.delete !== undefined) { + writer.uint32(42).string(message.delete); + } + if (message.patch !== undefined) { + writer.uint32(50).string(message.patch); + } + if (message.custom !== undefined) { + CustomHttpPattern.encode( + message.custom, + writer.uint32(66).fork() + ).ldelim(); + } + if (message.body !== "") { + writer.uint32(58).string(message.body); + } + if (message.response_body !== "") { + writer.uint32(98).string(message.response_body); + } + for (const v of message.additional_bindings) { + HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): HttpRule { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseHttpRule } as HttpRule; + message.additional_bindings = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message.delete = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.response_body = reader.string(); + break; + case 11: + message.additional_bindings.push( + HttpRule.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): HttpRule { + const message = { ...baseHttpRule } as HttpRule; + message.additional_bindings = []; + if (object.selector !== undefined && object.selector !== null) { + message.selector = String(object.selector); + } else { + message.selector = ""; + } + if (object.get !== undefined && object.get !== null) { + message.get = String(object.get); + } else { + message.get = undefined; + } + if (object.put !== undefined && object.put !== null) { + message.put = String(object.put); + } else { + message.put = undefined; + } + if (object.post !== undefined && object.post !== null) { + message.post = String(object.post); + } else { + message.post = undefined; + } + if (object.delete !== undefined && object.delete !== null) { + message.delete = String(object.delete); + } else { + message.delete = undefined; + } + if (object.patch !== undefined && object.patch !== null) { + message.patch = String(object.patch); + } else { + message.patch = undefined; + } + if (object.custom !== undefined && object.custom !== null) { + message.custom = CustomHttpPattern.fromJSON(object.custom); + } else { + message.custom = undefined; + } + if (object.body !== undefined && object.body !== null) { + message.body = String(object.body); + } else { + message.body = ""; + } + if (object.response_body !== undefined && object.response_body !== null) { + message.response_body = String(object.response_body); + } else { + message.response_body = ""; + } + if ( + object.additional_bindings !== undefined && + object.additional_bindings !== null + ) { + for (const e of object.additional_bindings) { + message.additional_bindings.push(HttpRule.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: HttpRule): unknown { + const obj: any = {}; + message.selector !== undefined && (obj.selector = message.selector); + message.get !== undefined && (obj.get = message.get); + message.put !== undefined && (obj.put = message.put); + message.post !== undefined && (obj.post = message.post); + message.delete !== undefined && (obj.delete = message.delete); + message.patch !== undefined && (obj.patch = message.patch); + message.custom !== undefined && + (obj.custom = message.custom + ? CustomHttpPattern.toJSON(message.custom) + : undefined); + message.body !== undefined && (obj.body = message.body); + message.response_body !== undefined && + (obj.response_body = message.response_body); + if (message.additional_bindings) { + obj.additional_bindings = message.additional_bindings.map((e) => + e ? HttpRule.toJSON(e) : undefined + ); + } else { + obj.additional_bindings = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): HttpRule { + const message = { ...baseHttpRule } as HttpRule; + message.additional_bindings = []; + if (object.selector !== undefined && object.selector !== null) { + message.selector = object.selector; + } else { + message.selector = ""; + } + if (object.get !== undefined && object.get !== null) { + message.get = object.get; + } else { + message.get = undefined; + } + if (object.put !== undefined && object.put !== null) { + message.put = object.put; + } else { + message.put = undefined; + } + if (object.post !== undefined && object.post !== null) { + message.post = object.post; + } else { + message.post = undefined; + } + if (object.delete !== undefined && object.delete !== null) { + message.delete = object.delete; + } else { + message.delete = undefined; + } + if (object.patch !== undefined && object.patch !== null) { + message.patch = object.patch; + } else { + message.patch = undefined; + } + if (object.custom !== undefined && object.custom !== null) { + message.custom = CustomHttpPattern.fromPartial(object.custom); + } else { + message.custom = undefined; + } + if (object.body !== undefined && object.body !== null) { + message.body = object.body; + } else { + message.body = ""; + } + if (object.response_body !== undefined && object.response_body !== null) { + message.response_body = object.response_body; + } else { + message.response_body = ""; + } + if ( + object.additional_bindings !== undefined && + object.additional_bindings !== null + ) { + for (const e of object.additional_bindings) { + message.additional_bindings.push(HttpRule.fromPartial(e)); + } + } + return message; + }, +}; + +const baseCustomHttpPattern: object = { kind: "", path: "" }; + +export const CustomHttpPattern = { + encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { + if (message.kind !== "") { + writer.uint32(10).string(message.kind); + } + if (message.path !== "") { + writer.uint32(18).string(message.path); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseCustomHttpPattern } as CustomHttpPattern; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): CustomHttpPattern { + const message = { ...baseCustomHttpPattern } as CustomHttpPattern; + if (object.kind !== undefined && object.kind !== null) { + message.kind = String(object.kind); + } else { + message.kind = ""; + } + if (object.path !== undefined && object.path !== null) { + message.path = String(object.path); + } else { + message.path = ""; + } + return message; + }, + + toJSON(message: CustomHttpPattern): unknown { + const obj: any = {}; + message.kind !== undefined && (obj.kind = message.kind); + message.path !== undefined && (obj.path = message.path); + return obj; + }, + + fromPartial(object: DeepPartial): CustomHttpPattern { + const message = { ...baseCustomHttpPattern } as CustomHttpPattern; + if (object.kind !== undefined && object.kind !== null) { + message.kind = object.kind; + } else { + message.kind = ""; + } + if (object.path !== undefined && object.path !== null) { + message.path = object.path; + } else { + message.path = ""; + } + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/protobuf/descriptor.ts new file mode 100644 index 00000000..a0167cb2 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/protobuf/descriptor.ts @@ -0,0 +1,5314 @@ +/* eslint-disable */ +import * as Long from "long"; +import { util, configure, Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "google.protobuf"; + +/** + * The protocol compiler can output a FileDescriptorSet containing the .proto + * files it parses. + */ +export interface FileDescriptorSet { + file: FileDescriptorProto[]; +} + +/** Describes a complete .proto file. */ +export interface FileDescriptorProto { + /** file name, relative to root of source tree */ + name: string; + /** e.g. "foo", "foo.bar", etc. */ + package: string; + /** Names of files imported by this file. */ + dependency: string[]; + /** Indexes of the public imported files in the dependency list above. */ + public_dependency: number[]; + /** + * Indexes of the weak imported files in the dependency list. + * For Google-internal migration only. Do not use. + */ + weak_dependency: number[]; + /** All top-level definitions in this file. */ + message_type: DescriptorProto[]; + enum_type: EnumDescriptorProto[]; + service: ServiceDescriptorProto[]; + extension: FieldDescriptorProto[]; + options: FileOptions | undefined; + /** + * This field contains optional information about the original source code. + * You may safely remove this entire field without harming runtime + * functionality of the descriptors -- the information is needed only by + * development tools. + */ + source_code_info: SourceCodeInfo | undefined; + /** + * The syntax of the proto file. + * The supported values are "proto2" and "proto3". + */ + syntax: string; +} + +/** Describes a message type. */ +export interface DescriptorProto { + name: string; + field: FieldDescriptorProto[]; + extension: FieldDescriptorProto[]; + nested_type: DescriptorProto[]; + enum_type: EnumDescriptorProto[]; + extension_range: DescriptorProto_ExtensionRange[]; + oneof_decl: OneofDescriptorProto[]; + options: MessageOptions | undefined; + reserved_range: DescriptorProto_ReservedRange[]; + /** + * Reserved field names, which may not be used by fields in the same message. + * A given name may only be reserved once. + */ + reserved_name: string[]; +} + +export interface DescriptorProto_ExtensionRange { + /** Inclusive. */ + start: number; + /** Exclusive. */ + end: number; + options: ExtensionRangeOptions | undefined; +} + +/** + * Range of reserved tag numbers. Reserved tag numbers may not be used by + * fields or extension ranges in the same message. Reserved ranges may + * not overlap. + */ +export interface DescriptorProto_ReservedRange { + /** Inclusive. */ + start: number; + /** Exclusive. */ + end: number; +} + +export interface ExtensionRangeOptions { + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +/** Describes a field within a message. */ +export interface FieldDescriptorProto { + name: string; + number: number; + label: FieldDescriptorProto_Label; + /** + * If type_name is set, this need not be set. If both this and type_name + * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + */ + type: FieldDescriptorProto_Type; + /** + * For message and enum types, this is the name of the type. If the name + * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + * rules are used to find the type (i.e. first the nested types within this + * message are searched, then within the parent, on up to the root + * namespace). + */ + type_name: string; + /** + * For extensions, this is the name of the type being extended. It is + * resolved in the same manner as type_name. + */ + extendee: string; + /** + * For numeric types, contains the original text representation of the value. + * For booleans, "true" or "false". + * For strings, contains the default text contents (not escaped in any way). + * For bytes, contains the C escaped value. All bytes >= 128 are escaped. + * TODO(kenton): Base-64 encode? + */ + default_value: string; + /** + * If set, gives the index of a oneof in the containing type's oneof_decl + * list. This field is a member of that oneof. + */ + oneof_index: number; + /** + * JSON name of this field. The value is set by protocol compiler. If the + * user has set a "json_name" option on this field, that option's value + * will be used. Otherwise, it's deduced from the field's name by converting + * it to camelCase. + */ + json_name: string; + options: FieldOptions | undefined; + /** + * If true, this is a proto3 "optional". When a proto3 field is optional, it + * tracks presence regardless of field type. + * + * When proto3_optional is true, this field must be belong to a oneof to + * signal to old proto3 clients that presence is tracked for this field. This + * oneof is known as a "synthetic" oneof, and this field must be its sole + * member (each proto3 optional field gets its own synthetic oneof). Synthetic + * oneofs exist in the descriptor only, and do not generate any API. Synthetic + * oneofs must be ordered after all "real" oneofs. + * + * For message fields, proto3_optional doesn't create any semantic change, + * since non-repeated message fields always track presence. However it still + * indicates the semantic detail of whether the user wrote "optional" or not. + * This can be useful for round-tripping the .proto file. For consistency we + * give message fields a synthetic oneof also, even though it is not required + * to track presence. This is especially important because the parser can't + * tell if a field is a message or an enum, so it must always create a + * synthetic oneof. + * + * Proto2 optional fields do not set this flag, because they already indicate + * optional with `LABEL_OPTIONAL`. + */ + proto3_optional: boolean; +} + +export enum FieldDescriptorProto_Type { + /** + * TYPE_DOUBLE - 0 is reserved for errors. + * Order is weird for historical reasons. + */ + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + /** + * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + * negative values are likely. + */ + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + /** + * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + * negative values are likely. + */ + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + /** + * TYPE_GROUP - Tag-delimited aggregate. + * Group type is deprecated and not supported in proto3. However, Proto3 + * implementations should still be able to parse the group wire format and + * treat group fields as unknown fields. + */ + TYPE_GROUP = 10, + /** TYPE_MESSAGE - Length-delimited aggregate. */ + TYPE_MESSAGE = 11, + /** TYPE_BYTES - New in version 2. */ + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + /** TYPE_SINT32 - Uses ZigZag encoding. */ + TYPE_SINT32 = 17, + /** TYPE_SINT64 - Uses ZigZag encoding. */ + TYPE_SINT64 = 18, + UNRECOGNIZED = -1, +} + +export function fieldDescriptorProto_TypeFromJSON( + object: any +): FieldDescriptorProto_Type { + switch (object) { + case 1: + case "TYPE_DOUBLE": + return FieldDescriptorProto_Type.TYPE_DOUBLE; + case 2: + case "TYPE_FLOAT": + return FieldDescriptorProto_Type.TYPE_FLOAT; + case 3: + case "TYPE_INT64": + return FieldDescriptorProto_Type.TYPE_INT64; + case 4: + case "TYPE_UINT64": + return FieldDescriptorProto_Type.TYPE_UINT64; + case 5: + case "TYPE_INT32": + return FieldDescriptorProto_Type.TYPE_INT32; + case 6: + case "TYPE_FIXED64": + return FieldDescriptorProto_Type.TYPE_FIXED64; + case 7: + case "TYPE_FIXED32": + return FieldDescriptorProto_Type.TYPE_FIXED32; + case 8: + case "TYPE_BOOL": + return FieldDescriptorProto_Type.TYPE_BOOL; + case 9: + case "TYPE_STRING": + return FieldDescriptorProto_Type.TYPE_STRING; + case 10: + case "TYPE_GROUP": + return FieldDescriptorProto_Type.TYPE_GROUP; + case 11: + case "TYPE_MESSAGE": + return FieldDescriptorProto_Type.TYPE_MESSAGE; + case 12: + case "TYPE_BYTES": + return FieldDescriptorProto_Type.TYPE_BYTES; + case 13: + case "TYPE_UINT32": + return FieldDescriptorProto_Type.TYPE_UINT32; + case 14: + case "TYPE_ENUM": + return FieldDescriptorProto_Type.TYPE_ENUM; + case 15: + case "TYPE_SFIXED32": + return FieldDescriptorProto_Type.TYPE_SFIXED32; + case 16: + case "TYPE_SFIXED64": + return FieldDescriptorProto_Type.TYPE_SFIXED64; + case 17: + case "TYPE_SINT32": + return FieldDescriptorProto_Type.TYPE_SINT32; + case 18: + case "TYPE_SINT64": + return FieldDescriptorProto_Type.TYPE_SINT64; + case -1: + case "UNRECOGNIZED": + default: + return FieldDescriptorProto_Type.UNRECOGNIZED; + } +} + +export function fieldDescriptorProto_TypeToJSON( + object: FieldDescriptorProto_Type +): string { + switch (object) { + case FieldDescriptorProto_Type.TYPE_DOUBLE: + return "TYPE_DOUBLE"; + case FieldDescriptorProto_Type.TYPE_FLOAT: + return "TYPE_FLOAT"; + case FieldDescriptorProto_Type.TYPE_INT64: + return "TYPE_INT64"; + case FieldDescriptorProto_Type.TYPE_UINT64: + return "TYPE_UINT64"; + case FieldDescriptorProto_Type.TYPE_INT32: + return "TYPE_INT32"; + case FieldDescriptorProto_Type.TYPE_FIXED64: + return "TYPE_FIXED64"; + case FieldDescriptorProto_Type.TYPE_FIXED32: + return "TYPE_FIXED32"; + case FieldDescriptorProto_Type.TYPE_BOOL: + return "TYPE_BOOL"; + case FieldDescriptorProto_Type.TYPE_STRING: + return "TYPE_STRING"; + case FieldDescriptorProto_Type.TYPE_GROUP: + return "TYPE_GROUP"; + case FieldDescriptorProto_Type.TYPE_MESSAGE: + return "TYPE_MESSAGE"; + case FieldDescriptorProto_Type.TYPE_BYTES: + return "TYPE_BYTES"; + case FieldDescriptorProto_Type.TYPE_UINT32: + return "TYPE_UINT32"; + case FieldDescriptorProto_Type.TYPE_ENUM: + return "TYPE_ENUM"; + case FieldDescriptorProto_Type.TYPE_SFIXED32: + return "TYPE_SFIXED32"; + case FieldDescriptorProto_Type.TYPE_SFIXED64: + return "TYPE_SFIXED64"; + case FieldDescriptorProto_Type.TYPE_SINT32: + return "TYPE_SINT32"; + case FieldDescriptorProto_Type.TYPE_SINT64: + return "TYPE_SINT64"; + default: + return "UNKNOWN"; + } +} + +export enum FieldDescriptorProto_Label { + /** LABEL_OPTIONAL - 0 is reserved for errors */ + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3, + UNRECOGNIZED = -1, +} + +export function fieldDescriptorProto_LabelFromJSON( + object: any +): FieldDescriptorProto_Label { + switch (object) { + case 1: + case "LABEL_OPTIONAL": + return FieldDescriptorProto_Label.LABEL_OPTIONAL; + case 2: + case "LABEL_REQUIRED": + return FieldDescriptorProto_Label.LABEL_REQUIRED; + case 3: + case "LABEL_REPEATED": + return FieldDescriptorProto_Label.LABEL_REPEATED; + case -1: + case "UNRECOGNIZED": + default: + return FieldDescriptorProto_Label.UNRECOGNIZED; + } +} + +export function fieldDescriptorProto_LabelToJSON( + object: FieldDescriptorProto_Label +): string { + switch (object) { + case FieldDescriptorProto_Label.LABEL_OPTIONAL: + return "LABEL_OPTIONAL"; + case FieldDescriptorProto_Label.LABEL_REQUIRED: + return "LABEL_REQUIRED"; + case FieldDescriptorProto_Label.LABEL_REPEATED: + return "LABEL_REPEATED"; + default: + return "UNKNOWN"; + } +} + +/** Describes a oneof. */ +export interface OneofDescriptorProto { + name: string; + options: OneofOptions | undefined; +} + +/** Describes an enum type. */ +export interface EnumDescriptorProto { + name: string; + value: EnumValueDescriptorProto[]; + options: EnumOptions | undefined; + /** + * Range of reserved numeric values. Reserved numeric values may not be used + * by enum values in the same enum declaration. Reserved ranges may not + * overlap. + */ + reserved_range: EnumDescriptorProto_EnumReservedRange[]; + /** + * Reserved enum value names, which may not be reused. A given name may only + * be reserved once. + */ + reserved_name: string[]; +} + +/** + * Range of reserved numeric values. Reserved values may not be used by + * entries in the same enum. Reserved ranges may not overlap. + * + * Note that this is distinct from DescriptorProto.ReservedRange in that it + * is inclusive such that it can appropriately represent the entire int32 + * domain. + */ +export interface EnumDescriptorProto_EnumReservedRange { + /** Inclusive. */ + start: number; + /** Inclusive. */ + end: number; +} + +/** Describes a value within an enum. */ +export interface EnumValueDescriptorProto { + name: string; + number: number; + options: EnumValueOptions | undefined; +} + +/** Describes a service. */ +export interface ServiceDescriptorProto { + name: string; + method: MethodDescriptorProto[]; + options: ServiceOptions | undefined; +} + +/** Describes a method of a service. */ +export interface MethodDescriptorProto { + name: string; + /** + * Input and output type names. These are resolved in the same way as + * FieldDescriptorProto.type_name, but must refer to a message type. + */ + input_type: string; + output_type: string; + options: MethodOptions | undefined; + /** Identifies if client streams multiple client messages */ + client_streaming: boolean; + /** Identifies if server streams multiple server messages */ + server_streaming: boolean; +} + +export interface FileOptions { + /** + * Sets the Java package where classes generated from this .proto will be + * placed. By default, the proto package is used, but this is often + * inappropriate because proto packages do not normally start with backwards + * domain names. + */ + java_package: string; + /** + * Controls the name of the wrapper Java class generated for the .proto file. + * That class will always contain the .proto file's getDescriptor() method as + * well as any top-level extensions defined in the .proto file. + * If java_multiple_files is disabled, then all the other classes from the + * .proto file will be nested inside the single wrapper outer class. + */ + java_outer_classname: string; + /** + * If enabled, then the Java code generator will generate a separate .java + * file for each top-level message, enum, and service defined in the .proto + * file. Thus, these types will *not* be nested inside the wrapper class + * named by java_outer_classname. However, the wrapper class will still be + * generated to contain the file's getDescriptor() method as well as any + * top-level extensions defined in the file. + */ + java_multiple_files: boolean; + /** + * This option does nothing. + * + * @deprecated + */ + java_generate_equals_and_hash: boolean; + /** + * If set true, then the Java2 code generator will generate code that + * throws an exception whenever an attempt is made to assign a non-UTF-8 + * byte sequence to a string field. + * Message reflection will do the same. + * However, an extension field still accepts non-UTF-8 byte sequences. + * This option has no effect on when used with the lite runtime. + */ + java_string_check_utf8: boolean; + optimize_for: FileOptions_OptimizeMode; + /** + * Sets the Go package where structs generated from this .proto will be + * placed. If omitted, the Go package will be derived from the following: + * - The basename of the package import path, if provided. + * - Otherwise, the package statement in the .proto file, if present. + * - Otherwise, the basename of the .proto file, without extension. + */ + go_package: string; + /** + * Should generic services be generated in each language? "Generic" services + * are not specific to any particular RPC system. They are generated by the + * main code generators in each language (without additional plugins). + * Generic services were the only kind of service generation supported by + * early versions of google.protobuf. + * + * Generic services are now considered deprecated in favor of using plugins + * that generate code specific to your particular RPC system. Therefore, + * these default to false. Old code which depends on generic services should + * explicitly set them to true. + */ + cc_generic_services: boolean; + java_generic_services: boolean; + py_generic_services: boolean; + php_generic_services: boolean; + /** + * Is this file deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for everything in the file, or it will be completely ignored; in the very + * least, this is a formalization for deprecating files. + */ + deprecated: boolean; + /** + * Enables the use of arenas for the proto messages in this file. This applies + * only to generated classes for C++. + */ + cc_enable_arenas: boolean; + /** + * Sets the objective c class prefix which is prepended to all objective c + * generated classes from this .proto. There is no default. + */ + objc_class_prefix: string; + /** Namespace for generated classes; defaults to the package. */ + csharp_namespace: string; + /** + * By default Swift generators will take the proto package and CamelCase it + * replacing '.' with underscore and use that to prefix the types/symbols + * defined. When this options is provided, they will use this value instead + * to prefix the types/symbols defined. + */ + swift_prefix: string; + /** + * Sets the php class prefix which is prepended to all php generated classes + * from this .proto. Default is empty. + */ + php_class_prefix: string; + /** + * Use this option to change the namespace of php generated classes. Default + * is empty. When this option is empty, the package name will be used for + * determining the namespace. + */ + php_namespace: string; + /** + * Use this option to change the namespace of php generated metadata classes. + * Default is empty. When this option is empty, the proto file name will be + * used for determining the namespace. + */ + php_metadata_namespace: string; + /** + * Use this option to change the package of ruby generated classes. Default + * is empty. When this option is not set, the package name will be used for + * determining the ruby package. + */ + ruby_package: string; + /** + * The parser stores options it doesn't recognize here. + * See the documentation for the "Options" section above. + */ + uninterpreted_option: UninterpretedOption[]; +} + +/** Generated classes can be optimized for speed or code size. */ +export enum FileOptions_OptimizeMode { + /** SPEED - Generate complete code for parsing, serialization, */ + SPEED = 1, + /** CODE_SIZE - etc. */ + CODE_SIZE = 2, + /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ + LITE_RUNTIME = 3, + UNRECOGNIZED = -1, +} + +export function fileOptions_OptimizeModeFromJSON( + object: any +): FileOptions_OptimizeMode { + switch (object) { + case 1: + case "SPEED": + return FileOptions_OptimizeMode.SPEED; + case 2: + case "CODE_SIZE": + return FileOptions_OptimizeMode.CODE_SIZE; + case 3: + case "LITE_RUNTIME": + return FileOptions_OptimizeMode.LITE_RUNTIME; + case -1: + case "UNRECOGNIZED": + default: + return FileOptions_OptimizeMode.UNRECOGNIZED; + } +} + +export function fileOptions_OptimizeModeToJSON( + object: FileOptions_OptimizeMode +): string { + switch (object) { + case FileOptions_OptimizeMode.SPEED: + return "SPEED"; + case FileOptions_OptimizeMode.CODE_SIZE: + return "CODE_SIZE"; + case FileOptions_OptimizeMode.LITE_RUNTIME: + return "LITE_RUNTIME"; + default: + return "UNKNOWN"; + } +} + +export interface MessageOptions { + /** + * Set true to use the old proto1 MessageSet wire format for extensions. + * This is provided for backwards-compatibility with the MessageSet wire + * format. You should not use this for any other reason: It's less + * efficient, has fewer features, and is more complicated. + * + * The message must be defined exactly as follows: + * message Foo { + * option message_set_wire_format = true; + * extensions 4 to max; + * } + * Note that the message cannot have any defined fields; MessageSets only + * have extensions. + * + * All extensions of your type must be singular messages; e.g. they cannot + * be int32s, enums, or repeated messages. + * + * Because this is an option, the above two restrictions are not enforced by + * the protocol compiler. + */ + message_set_wire_format: boolean; + /** + * Disables the generation of the standard "descriptor()" accessor, which can + * conflict with a field of the same name. This is meant to make migration + * from proto1 easier; new code should avoid fields named "descriptor". + */ + no_standard_descriptor_accessor: boolean; + /** + * Is this message deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the message, or it will be completely ignored; in the very least, + * this is a formalization for deprecating messages. + */ + deprecated: boolean; + /** + * Whether the message is an automatically generated map entry type for the + * maps field. + * + * For maps fields: + * map map_field = 1; + * The parsed descriptor looks like: + * message MapFieldEntry { + * option map_entry = true; + * optional KeyType key = 1; + * optional ValueType value = 2; + * } + * repeated MapFieldEntry map_field = 1; + * + * Implementations may choose not to generate the map_entry=true message, but + * use a native map in the target language to hold the keys and values. + * The reflection APIs in such implementations still need to work as + * if the field is a repeated message field. + * + * NOTE: Do not set the option in .proto files. Always use the maps syntax + * instead. The option should only be implicitly set by the proto compiler + * parser. + */ + map_entry: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface FieldOptions { + /** + * The ctype option instructs the C++ code generator to use a different + * representation of the field than it normally would. See the specific + * options below. This option is not yet implemented in the open source + * release -- sorry, we'll try to include it in a future version! + */ + ctype: FieldOptions_CType; + /** + * The packed option can be enabled for repeated primitive fields to enable + * a more efficient representation on the wire. Rather than repeatedly + * writing the tag and type for each element, the entire array is encoded as + * a single length-delimited blob. In proto3, only explicit setting it to + * false will avoid using packed encoding. + */ + packed: boolean; + /** + * The jstype option determines the JavaScript type used for values of the + * field. The option is permitted only for 64 bit integral and fixed types + * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + * is represented as JavaScript string, which avoids loss of precision that + * can happen when a large value is converted to a floating point JavaScript. + * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + * use the JavaScript "number" type. The behavior of the default option + * JS_NORMAL is implementation dependent. + * + * This option is an enum to permit additional types to be added, e.g. + * goog.math.Integer. + */ + jstype: FieldOptions_JSType; + /** + * Should this field be parsed lazily? Lazy applies only to message-type + * fields. It means that when the outer message is initially parsed, the + * inner message's contents will not be parsed but instead stored in encoded + * form. The inner message will actually be parsed when it is first accessed. + * + * This is only a hint. Implementations are free to choose whether to use + * eager or lazy parsing regardless of the value of this option. However, + * setting this option true suggests that the protocol author believes that + * using lazy parsing on this field is worth the additional bookkeeping + * overhead typically needed to implement it. + * + * This option does not affect the public interface of any generated code; + * all method signatures remain the same. Furthermore, thread-safety of the + * interface is not affected by this option; const methods remain safe to + * call from multiple threads concurrently, while non-const methods continue + * to require exclusive access. + * + * + * Note that implementations may choose not to check required fields within + * a lazy sub-message. That is, calling IsInitialized() on the outer message + * may return true even if the inner message has missing required fields. + * This is necessary because otherwise the inner message would have to be + * parsed in order to perform the check, defeating the purpose of lazy + * parsing. An implementation which chooses not to check required fields + * must be consistent about it. That is, for any particular sub-message, the + * implementation must either *always* check its required fields, or *never* + * check its required fields, regardless of whether or not the message has + * been parsed. + */ + lazy: boolean; + /** + * Is this field deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for accessors, or it will be completely ignored; in the very least, this + * is a formalization for deprecating fields. + */ + deprecated: boolean; + /** For Google-internal migration only. Do not use. */ + weak: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export enum FieldOptions_CType { + /** STRING - Default mode. */ + STRING = 0, + CORD = 1, + STRING_PIECE = 2, + UNRECOGNIZED = -1, +} + +export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { + switch (object) { + case 0: + case "STRING": + return FieldOptions_CType.STRING; + case 1: + case "CORD": + return FieldOptions_CType.CORD; + case 2: + case "STRING_PIECE": + return FieldOptions_CType.STRING_PIECE; + case -1: + case "UNRECOGNIZED": + default: + return FieldOptions_CType.UNRECOGNIZED; + } +} + +export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { + switch (object) { + case FieldOptions_CType.STRING: + return "STRING"; + case FieldOptions_CType.CORD: + return "CORD"; + case FieldOptions_CType.STRING_PIECE: + return "STRING_PIECE"; + default: + return "UNKNOWN"; + } +} + +export enum FieldOptions_JSType { + /** JS_NORMAL - Use the default type. */ + JS_NORMAL = 0, + /** JS_STRING - Use JavaScript strings. */ + JS_STRING = 1, + /** JS_NUMBER - Use JavaScript numbers. */ + JS_NUMBER = 2, + UNRECOGNIZED = -1, +} + +export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { + switch (object) { + case 0: + case "JS_NORMAL": + return FieldOptions_JSType.JS_NORMAL; + case 1: + case "JS_STRING": + return FieldOptions_JSType.JS_STRING; + case 2: + case "JS_NUMBER": + return FieldOptions_JSType.JS_NUMBER; + case -1: + case "UNRECOGNIZED": + default: + return FieldOptions_JSType.UNRECOGNIZED; + } +} + +export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { + switch (object) { + case FieldOptions_JSType.JS_NORMAL: + return "JS_NORMAL"; + case FieldOptions_JSType.JS_STRING: + return "JS_STRING"; + case FieldOptions_JSType.JS_NUMBER: + return "JS_NUMBER"; + default: + return "UNKNOWN"; + } +} + +export interface OneofOptions { + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface EnumOptions { + /** + * Set this option to true to allow mapping different tag names to the same + * value. + */ + allow_alias: boolean; + /** + * Is this enum deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum, or it will be completely ignored; in the very least, this + * is a formalization for deprecating enums. + */ + deprecated: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface EnumValueOptions { + /** + * Is this enum value deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum value, or it will be completely ignored; in the very least, + * this is a formalization for deprecating enum values. + */ + deprecated: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface ServiceOptions { + /** + * Is this service deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the service, or it will be completely ignored; in the very least, + * this is a formalization for deprecating services. + */ + deprecated: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface MethodOptions { + /** + * Is this method deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the method, or it will be completely ignored; in the very least, + * this is a formalization for deprecating methods. + */ + deprecated: boolean; + idempotency_level: MethodOptions_IdempotencyLevel; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +/** + * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + * or neither? HTTP based RPC implementation may choose GET verb for safe + * methods, and PUT verb for idempotent methods instead of the default POST. + */ +export enum MethodOptions_IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + /** NO_SIDE_EFFECTS - implies idempotent */ + NO_SIDE_EFFECTS = 1, + /** IDEMPOTENT - idempotent, but may have side effects */ + IDEMPOTENT = 2, + UNRECOGNIZED = -1, +} + +export function methodOptions_IdempotencyLevelFromJSON( + object: any +): MethodOptions_IdempotencyLevel { + switch (object) { + case 0: + case "IDEMPOTENCY_UNKNOWN": + return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; + case 1: + case "NO_SIDE_EFFECTS": + return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; + case 2: + case "IDEMPOTENT": + return MethodOptions_IdempotencyLevel.IDEMPOTENT; + case -1: + case "UNRECOGNIZED": + default: + return MethodOptions_IdempotencyLevel.UNRECOGNIZED; + } +} + +export function methodOptions_IdempotencyLevelToJSON( + object: MethodOptions_IdempotencyLevel +): string { + switch (object) { + case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: + return "IDEMPOTENCY_UNKNOWN"; + case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: + return "NO_SIDE_EFFECTS"; + case MethodOptions_IdempotencyLevel.IDEMPOTENT: + return "IDEMPOTENT"; + default: + return "UNKNOWN"; + } +} + +/** + * A message representing a option the parser does not recognize. This only + * appears in options protos created by the compiler::Parser class. + * DescriptorPool resolves these when building Descriptor objects. Therefore, + * options protos in descriptor objects (e.g. returned by Descriptor::options(), + * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions + * in them. + */ +export interface UninterpretedOption { + name: UninterpretedOption_NamePart[]; + /** + * The value of the uninterpreted option, in whatever type the tokenizer + * identified it as during parsing. Exactly one of these should be set. + */ + identifier_value: string; + positive_int_value: number; + negative_int_value: number; + double_value: number; + string_value: Uint8Array; + aggregate_value: string; +} + +/** + * The name of the uninterpreted option. Each string represents a segment in + * a dot-separated name. is_extension is true iff a segment represents an + * extension (denoted with parentheses in options specs in .proto files). + * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents + * "foo.(bar.baz).qux". + */ +export interface UninterpretedOption_NamePart { + name_part: string; + is_extension: boolean; +} + +/** + * Encapsulates information about the original source file from which a + * FileDescriptorProto was generated. + */ +export interface SourceCodeInfo { + /** + * A Location identifies a piece of source code in a .proto file which + * corresponds to a particular definition. This information is intended + * to be useful to IDEs, code indexers, documentation generators, and similar + * tools. + * + * For example, say we have a file like: + * message Foo { + * optional string foo = 1; + * } + * Let's look at just the field definition: + * optional string foo = 1; + * ^ ^^ ^^ ^ ^^^ + * a bc de f ghi + * We have the following locations: + * span path represents + * [a,i) [ 4, 0, 2, 0 ] The whole field definition. + * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + * + * Notes: + * - A location may refer to a repeated field itself (i.e. not to any + * particular index within it). This is used whenever a set of elements are + * logically enclosed in a single code segment. For example, an entire + * extend block (possibly containing multiple extension definitions) will + * have an outer location whose path refers to the "extensions" repeated + * field without an index. + * - Multiple locations may have the same path. This happens when a single + * logical declaration is spread out across multiple places. The most + * obvious example is the "extend" block again -- there may be multiple + * extend blocks in the same scope, each of which will have the same path. + * - A location's span is not always a subset of its parent's span. For + * example, the "extendee" of an extension declaration appears at the + * beginning of the "extend" block and is shared by all extensions within + * the block. + * - Just because a location's span is a subset of some other location's span + * does not mean that it is a descendant. For example, a "group" defines + * both a type and a field in a single declaration. Thus, the locations + * corresponding to the type and field and their components will overlap. + * - Code which tries to interpret locations should probably be designed to + * ignore those that it doesn't understand, as more types of locations could + * be recorded in the future. + */ + location: SourceCodeInfo_Location[]; +} + +export interface SourceCodeInfo_Location { + /** + * Identifies which part of the FileDescriptorProto was defined at this + * location. + * + * Each element is a field number or an index. They form a path from + * the root FileDescriptorProto to the place where the definition. For + * example, this path: + * [ 4, 3, 2, 7, 1 ] + * refers to: + * file.message_type(3) // 4, 3 + * .field(7) // 2, 7 + * .name() // 1 + * This is because FileDescriptorProto.message_type has field number 4: + * repeated DescriptorProto message_type = 4; + * and DescriptorProto.field has field number 2: + * repeated FieldDescriptorProto field = 2; + * and FieldDescriptorProto.name has field number 1: + * optional string name = 1; + * + * Thus, the above path gives the location of a field name. If we removed + * the last element: + * [ 4, 3, 2, 7 ] + * this path refers to the whole field declaration (from the beginning + * of the label to the terminating semicolon). + */ + path: number[]; + /** + * Always has exactly three or four elements: start line, start column, + * end line (optional, otherwise assumed same as start line), end column. + * These are packed into a single field for efficiency. Note that line + * and column numbers are zero-based -- typically you will want to add + * 1 to each before displaying to a user. + */ + span: number[]; + /** + * If this SourceCodeInfo represents a complete declaration, these are any + * comments appearing before and after the declaration which appear to be + * attached to the declaration. + * + * A series of line comments appearing on consecutive lines, with no other + * tokens appearing on those lines, will be treated as a single comment. + * + * leading_detached_comments will keep paragraphs of comments that appear + * before (but not connected to) the current element. Each paragraph, + * separated by empty lines, will be one comment element in the repeated + * field. + * + * Only the comment content is provided; comment markers (e.g. //) are + * stripped out. For block comments, leading whitespace and an asterisk + * will be stripped from the beginning of each line other than the first. + * Newlines are included in the output. + * + * Examples: + * + * optional int32 foo = 1; // Comment attached to foo. + * // Comment attached to bar. + * optional int32 bar = 2; + * + * optional string baz = 3; + * // Comment attached to baz. + * // Another line attached to baz. + * + * // Comment attached to qux. + * // + * // Another line attached to qux. + * optional double qux = 4; + * + * // Detached comment for corge. This is not leading or trailing comments + * // to qux or corge because there are blank lines separating it from + * // both. + * + * // Detached comment for corge paragraph 2. + * + * optional string corge = 5; + * /* Block comment attached + * * to corge. Leading asterisks + * * will be removed. * / + * /* Block comment attached to + * * grault. * / + * optional int32 grault = 6; + * + * // ignored detached comments. + */ + leading_comments: string; + trailing_comments: string; + leading_detached_comments: string[]; +} + +/** + * Describes the relationship between generated code and its original source + * file. A GeneratedCodeInfo message is associated with only one generated + * source file, but may contain references to different source .proto files. + */ +export interface GeneratedCodeInfo { + /** + * An Annotation connects some span of text in generated code to an element + * of its generating .proto file. + */ + annotation: GeneratedCodeInfo_Annotation[]; +} + +export interface GeneratedCodeInfo_Annotation { + /** + * Identifies the element in the original source .proto file. This field + * is formatted the same as SourceCodeInfo.Location.path. + */ + path: number[]; + /** Identifies the filesystem path to the original source .proto. */ + source_file: string; + /** + * Identifies the starting offset in bytes in the generated code + * that relates to the identified object. + */ + begin: number; + /** + * Identifies the ending offset in bytes in the generated code that + * relates to the identified offset. The end offset should be one past + * the last relevant byte (so the length of the text = end - begin). + */ + end: number; +} + +const baseFileDescriptorSet: object = {}; + +export const FileDescriptorSet = { + encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { + for (const v of message.file) { + FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFileDescriptorSet } as FileDescriptorSet; + message.file = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.file.push( + FileDescriptorProto.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FileDescriptorSet { + const message = { ...baseFileDescriptorSet } as FileDescriptorSet; + message.file = []; + if (object.file !== undefined && object.file !== null) { + for (const e of object.file) { + message.file.push(FileDescriptorProto.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: FileDescriptorSet): unknown { + const obj: any = {}; + if (message.file) { + obj.file = message.file.map((e) => + e ? FileDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.file = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): FileDescriptorSet { + const message = { ...baseFileDescriptorSet } as FileDescriptorSet; + message.file = []; + if (object.file !== undefined && object.file !== null) { + for (const e of object.file) { + message.file.push(FileDescriptorProto.fromPartial(e)); + } + } + return message; + }, +}; + +const baseFileDescriptorProto: object = { + name: "", + package: "", + dependency: "", + public_dependency: 0, + weak_dependency: 0, + syntax: "", +}; + +export const FileDescriptorProto = { + encode( + message: FileDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.package !== "") { + writer.uint32(18).string(message.package); + } + for (const v of message.dependency) { + writer.uint32(26).string(v!); + } + writer.uint32(82).fork(); + for (const v of message.public_dependency) { + writer.int32(v); + } + writer.ldelim(); + writer.uint32(90).fork(); + for (const v of message.weak_dependency) { + writer.int32(v); + } + writer.ldelim(); + for (const v of message.message_type) { + DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); + } + for (const v of message.enum_type) { + EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); + } + for (const v of message.service) { + ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); + } + for (const v of message.extension) { + FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); + } + if (message.options !== undefined) { + FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); + } + if (message.source_code_info !== undefined) { + SourceCodeInfo.encode( + message.source_code_info, + writer.uint32(74).fork() + ).ldelim(); + } + if (message.syntax !== "") { + writer.uint32(98).string(message.syntax); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFileDescriptorProto } as FileDescriptorProto; + message.dependency = []; + message.public_dependency = []; + message.weak_dependency = []; + message.message_type = []; + message.enum_type = []; + message.service = []; + message.extension = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.package = reader.string(); + break; + case 3: + message.dependency.push(reader.string()); + break; + case 10: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.public_dependency.push(reader.int32()); + } + } else { + message.public_dependency.push(reader.int32()); + } + break; + case 11: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.weak_dependency.push(reader.int32()); + } + } else { + message.weak_dependency.push(reader.int32()); + } + break; + case 4: + message.message_type.push( + DescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 5: + message.enum_type.push( + EnumDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 6: + message.service.push( + ServiceDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 7: + message.extension.push( + FieldDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 8: + message.options = FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.source_code_info = SourceCodeInfo.decode( + reader, + reader.uint32() + ); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FileDescriptorProto { + const message = { ...baseFileDescriptorProto } as FileDescriptorProto; + message.dependency = []; + message.public_dependency = []; + message.weak_dependency = []; + message.message_type = []; + message.enum_type = []; + message.service = []; + message.extension = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.package !== undefined && object.package !== null) { + message.package = String(object.package); + } else { + message.package = ""; + } + if (object.dependency !== undefined && object.dependency !== null) { + for (const e of object.dependency) { + message.dependency.push(String(e)); + } + } + if ( + object.public_dependency !== undefined && + object.public_dependency !== null + ) { + for (const e of object.public_dependency) { + message.public_dependency.push(Number(e)); + } + } + if ( + object.weak_dependency !== undefined && + object.weak_dependency !== null + ) { + for (const e of object.weak_dependency) { + message.weak_dependency.push(Number(e)); + } + } + if (object.message_type !== undefined && object.message_type !== null) { + for (const e of object.message_type) { + message.message_type.push(DescriptorProto.fromJSON(e)); + } + } + if (object.enum_type !== undefined && object.enum_type !== null) { + for (const e of object.enum_type) { + message.enum_type.push(EnumDescriptorProto.fromJSON(e)); + } + } + if (object.service !== undefined && object.service !== null) { + for (const e of object.service) { + message.service.push(ServiceDescriptorProto.fromJSON(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = FileOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if ( + object.source_code_info !== undefined && + object.source_code_info !== null + ) { + message.source_code_info = SourceCodeInfo.fromJSON( + object.source_code_info + ); + } else { + message.source_code_info = undefined; + } + if (object.syntax !== undefined && object.syntax !== null) { + message.syntax = String(object.syntax); + } else { + message.syntax = ""; + } + return message; + }, + + toJSON(message: FileDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.package !== undefined && (obj.package = message.package); + if (message.dependency) { + obj.dependency = message.dependency.map((e) => e); + } else { + obj.dependency = []; + } + if (message.public_dependency) { + obj.public_dependency = message.public_dependency.map((e) => e); + } else { + obj.public_dependency = []; + } + if (message.weak_dependency) { + obj.weak_dependency = message.weak_dependency.map((e) => e); + } else { + obj.weak_dependency = []; + } + if (message.message_type) { + obj.message_type = message.message_type.map((e) => + e ? DescriptorProto.toJSON(e) : undefined + ); + } else { + obj.message_type = []; + } + if (message.enum_type) { + obj.enum_type = message.enum_type.map((e) => + e ? EnumDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.enum_type = []; + } + if (message.service) { + obj.service = message.service.map((e) => + e ? ServiceDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.service = []; + } + if (message.extension) { + obj.extension = message.extension.map((e) => + e ? FieldDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.extension = []; + } + message.options !== undefined && + (obj.options = message.options + ? FileOptions.toJSON(message.options) + : undefined); + message.source_code_info !== undefined && + (obj.source_code_info = message.source_code_info + ? SourceCodeInfo.toJSON(message.source_code_info) + : undefined); + message.syntax !== undefined && (obj.syntax = message.syntax); + return obj; + }, + + fromPartial(object: DeepPartial): FileDescriptorProto { + const message = { ...baseFileDescriptorProto } as FileDescriptorProto; + message.dependency = []; + message.public_dependency = []; + message.weak_dependency = []; + message.message_type = []; + message.enum_type = []; + message.service = []; + message.extension = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.package !== undefined && object.package !== null) { + message.package = object.package; + } else { + message.package = ""; + } + if (object.dependency !== undefined && object.dependency !== null) { + for (const e of object.dependency) { + message.dependency.push(e); + } + } + if ( + object.public_dependency !== undefined && + object.public_dependency !== null + ) { + for (const e of object.public_dependency) { + message.public_dependency.push(e); + } + } + if ( + object.weak_dependency !== undefined && + object.weak_dependency !== null + ) { + for (const e of object.weak_dependency) { + message.weak_dependency.push(e); + } + } + if (object.message_type !== undefined && object.message_type !== null) { + for (const e of object.message_type) { + message.message_type.push(DescriptorProto.fromPartial(e)); + } + } + if (object.enum_type !== undefined && object.enum_type !== null) { + for (const e of object.enum_type) { + message.enum_type.push(EnumDescriptorProto.fromPartial(e)); + } + } + if (object.service !== undefined && object.service !== null) { + for (const e of object.service) { + message.service.push(ServiceDescriptorProto.fromPartial(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = FileOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if ( + object.source_code_info !== undefined && + object.source_code_info !== null + ) { + message.source_code_info = SourceCodeInfo.fromPartial( + object.source_code_info + ); + } else { + message.source_code_info = undefined; + } + if (object.syntax !== undefined && object.syntax !== null) { + message.syntax = object.syntax; + } else { + message.syntax = ""; + } + return message; + }, +}; + +const baseDescriptorProto: object = { name: "", reserved_name: "" }; + +export const DescriptorProto = { + encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + for (const v of message.field) { + FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); + } + for (const v of message.extension) { + FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); + } + for (const v of message.nested_type) { + DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); + } + for (const v of message.enum_type) { + EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); + } + for (const v of message.extension_range) { + DescriptorProto_ExtensionRange.encode( + v!, + writer.uint32(42).fork() + ).ldelim(); + } + for (const v of message.oneof_decl) { + OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); + } + if (message.options !== undefined) { + MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); + } + for (const v of message.reserved_range) { + DescriptorProto_ReservedRange.encode( + v!, + writer.uint32(74).fork() + ).ldelim(); + } + for (const v of message.reserved_name) { + writer.uint32(82).string(v!); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): DescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseDescriptorProto } as DescriptorProto; + message.field = []; + message.extension = []; + message.nested_type = []; + message.enum_type = []; + message.extension_range = []; + message.oneof_decl = []; + message.reserved_range = []; + message.reserved_name = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.field.push( + FieldDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 6: + message.extension.push( + FieldDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 3: + message.nested_type.push( + DescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 4: + message.enum_type.push( + EnumDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 5: + message.extension_range.push( + DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) + ); + break; + case 8: + message.oneof_decl.push( + OneofDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 7: + message.options = MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + message.reserved_range.push( + DescriptorProto_ReservedRange.decode(reader, reader.uint32()) + ); + break; + case 10: + message.reserved_name.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): DescriptorProto { + const message = { ...baseDescriptorProto } as DescriptorProto; + message.field = []; + message.extension = []; + message.nested_type = []; + message.enum_type = []; + message.extension_range = []; + message.oneof_decl = []; + message.reserved_range = []; + message.reserved_name = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.field !== undefined && object.field !== null) { + for (const e of object.field) { + message.field.push(FieldDescriptorProto.fromJSON(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromJSON(e)); + } + } + if (object.nested_type !== undefined && object.nested_type !== null) { + for (const e of object.nested_type) { + message.nested_type.push(DescriptorProto.fromJSON(e)); + } + } + if (object.enum_type !== undefined && object.enum_type !== null) { + for (const e of object.enum_type) { + message.enum_type.push(EnumDescriptorProto.fromJSON(e)); + } + } + if ( + object.extension_range !== undefined && + object.extension_range !== null + ) { + for (const e of object.extension_range) { + message.extension_range.push( + DescriptorProto_ExtensionRange.fromJSON(e) + ); + } + } + if (object.oneof_decl !== undefined && object.oneof_decl !== null) { + for (const e of object.oneof_decl) { + message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = MessageOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if (object.reserved_range !== undefined && object.reserved_range !== null) { + for (const e of object.reserved_range) { + message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); + } + } + if (object.reserved_name !== undefined && object.reserved_name !== null) { + for (const e of object.reserved_name) { + message.reserved_name.push(String(e)); + } + } + return message; + }, + + toJSON(message: DescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + if (message.field) { + obj.field = message.field.map((e) => + e ? FieldDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.field = []; + } + if (message.extension) { + obj.extension = message.extension.map((e) => + e ? FieldDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.extension = []; + } + if (message.nested_type) { + obj.nested_type = message.nested_type.map((e) => + e ? DescriptorProto.toJSON(e) : undefined + ); + } else { + obj.nested_type = []; + } + if (message.enum_type) { + obj.enum_type = message.enum_type.map((e) => + e ? EnumDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.enum_type = []; + } + if (message.extension_range) { + obj.extension_range = message.extension_range.map((e) => + e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined + ); + } else { + obj.extension_range = []; + } + if (message.oneof_decl) { + obj.oneof_decl = message.oneof_decl.map((e) => + e ? OneofDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.oneof_decl = []; + } + message.options !== undefined && + (obj.options = message.options + ? MessageOptions.toJSON(message.options) + : undefined); + if (message.reserved_range) { + obj.reserved_range = message.reserved_range.map((e) => + e ? DescriptorProto_ReservedRange.toJSON(e) : undefined + ); + } else { + obj.reserved_range = []; + } + if (message.reserved_name) { + obj.reserved_name = message.reserved_name.map((e) => e); + } else { + obj.reserved_name = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): DescriptorProto { + const message = { ...baseDescriptorProto } as DescriptorProto; + message.field = []; + message.extension = []; + message.nested_type = []; + message.enum_type = []; + message.extension_range = []; + message.oneof_decl = []; + message.reserved_range = []; + message.reserved_name = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.field !== undefined && object.field !== null) { + for (const e of object.field) { + message.field.push(FieldDescriptorProto.fromPartial(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromPartial(e)); + } + } + if (object.nested_type !== undefined && object.nested_type !== null) { + for (const e of object.nested_type) { + message.nested_type.push(DescriptorProto.fromPartial(e)); + } + } + if (object.enum_type !== undefined && object.enum_type !== null) { + for (const e of object.enum_type) { + message.enum_type.push(EnumDescriptorProto.fromPartial(e)); + } + } + if ( + object.extension_range !== undefined && + object.extension_range !== null + ) { + for (const e of object.extension_range) { + message.extension_range.push( + DescriptorProto_ExtensionRange.fromPartial(e) + ); + } + } + if (object.oneof_decl !== undefined && object.oneof_decl !== null) { + for (const e of object.oneof_decl) { + message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = MessageOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if (object.reserved_range !== undefined && object.reserved_range !== null) { + for (const e of object.reserved_range) { + message.reserved_range.push( + DescriptorProto_ReservedRange.fromPartial(e) + ); + } + } + if (object.reserved_name !== undefined && object.reserved_name !== null) { + for (const e of object.reserved_name) { + message.reserved_name.push(e); + } + } + return message; + }, +}; + +const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; + +export const DescriptorProto_ExtensionRange = { + encode( + message: DescriptorProto_ExtensionRange, + writer: Writer = Writer.create() + ): Writer { + if (message.start !== 0) { + writer.uint32(8).int32(message.start); + } + if (message.end !== 0) { + writer.uint32(16).int32(message.end); + } + if (message.options !== undefined) { + ExtensionRangeOptions.encode( + message.options, + writer.uint32(26).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): DescriptorProto_ExtensionRange { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseDescriptorProto_ExtensionRange, + } as DescriptorProto_ExtensionRange; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = ExtensionRangeOptions.decode( + reader, + reader.uint32() + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): DescriptorProto_ExtensionRange { + const message = { + ...baseDescriptorProto_ExtensionRange, + } as DescriptorProto_ExtensionRange; + if (object.start !== undefined && object.start !== null) { + message.start = Number(object.start); + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = ExtensionRangeOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; + }, + + toJSON(message: DescriptorProto_ExtensionRange): unknown { + const obj: any = {}; + message.start !== undefined && (obj.start = message.start); + message.end !== undefined && (obj.end = message.end); + message.options !== undefined && + (obj.options = message.options + ? ExtensionRangeOptions.toJSON(message.options) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): DescriptorProto_ExtensionRange { + const message = { + ...baseDescriptorProto_ExtensionRange, + } as DescriptorProto_ExtensionRange; + if (object.start !== undefined && object.start !== null) { + message.start = object.start; + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = ExtensionRangeOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + return message; + }, +}; + +const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; + +export const DescriptorProto_ReservedRange = { + encode( + message: DescriptorProto_ReservedRange, + writer: Writer = Writer.create() + ): Writer { + if (message.start !== 0) { + writer.uint32(8).int32(message.start); + } + if (message.end !== 0) { + writer.uint32(16).int32(message.end); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): DescriptorProto_ReservedRange { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseDescriptorProto_ReservedRange, + } as DescriptorProto_ReservedRange; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): DescriptorProto_ReservedRange { + const message = { + ...baseDescriptorProto_ReservedRange, + } as DescriptorProto_ReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = Number(object.start); + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + return message; + }, + + toJSON(message: DescriptorProto_ReservedRange): unknown { + const obj: any = {}; + message.start !== undefined && (obj.start = message.start); + message.end !== undefined && (obj.end = message.end); + return obj; + }, + + fromPartial( + object: DeepPartial + ): DescriptorProto_ReservedRange { + const message = { + ...baseDescriptorProto_ReservedRange, + } as DescriptorProto_ReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = object.start; + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } + return message; + }, +}; + +const baseExtensionRangeOptions: object = {}; + +export const ExtensionRangeOptions = { + encode( + message: ExtensionRangeOptions, + writer: Writer = Writer.create() + ): Writer { + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ExtensionRangeOptions { + const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; + message.uninterpreted_option = []; + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: ExtensionRangeOptions): unknown { + const obj: any = {}; + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial( + object: DeepPartial + ): ExtensionRangeOptions { + const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; + message.uninterpreted_option = []; + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseFieldDescriptorProto: object = { + name: "", + number: 0, + label: 1, + type: 1, + type_name: "", + extendee: "", + default_value: "", + oneof_index: 0, + json_name: "", + proto3_optional: false, +}; + +export const FieldDescriptorProto = { + encode( + message: FieldDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.number !== 0) { + writer.uint32(24).int32(message.number); + } + if (message.label !== 1) { + writer.uint32(32).int32(message.label); + } + if (message.type !== 1) { + writer.uint32(40).int32(message.type); + } + if (message.type_name !== "") { + writer.uint32(50).string(message.type_name); + } + if (message.extendee !== "") { + writer.uint32(18).string(message.extendee); + } + if (message.default_value !== "") { + writer.uint32(58).string(message.default_value); + } + if (message.oneof_index !== 0) { + writer.uint32(72).int32(message.oneof_index); + } + if (message.json_name !== "") { + writer.uint32(82).string(message.json_name); + } + if (message.options !== undefined) { + FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); + } + if (message.proto3_optional === true) { + writer.uint32(136).bool(message.proto3_optional); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32() as any; + break; + case 5: + message.type = reader.int32() as any; + break; + case 6: + message.type_name = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.default_value = reader.string(); + break; + case 9: + message.oneof_index = reader.int32(); + break; + case 10: + message.json_name = reader.string(); + break; + case 8: + message.options = FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3_optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FieldDescriptorProto { + const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = Number(object.number); + } else { + message.number = 0; + } + if (object.label !== undefined && object.label !== null) { + message.label = fieldDescriptorProto_LabelFromJSON(object.label); + } else { + message.label = 1; + } + if (object.type !== undefined && object.type !== null) { + message.type = fieldDescriptorProto_TypeFromJSON(object.type); + } else { + message.type = 1; + } + if (object.type_name !== undefined && object.type_name !== null) { + message.type_name = String(object.type_name); + } else { + message.type_name = ""; + } + if (object.extendee !== undefined && object.extendee !== null) { + message.extendee = String(object.extendee); + } else { + message.extendee = ""; + } + if (object.default_value !== undefined && object.default_value !== null) { + message.default_value = String(object.default_value); + } else { + message.default_value = ""; + } + if (object.oneof_index !== undefined && object.oneof_index !== null) { + message.oneof_index = Number(object.oneof_index); + } else { + message.oneof_index = 0; + } + if (object.json_name !== undefined && object.json_name !== null) { + message.json_name = String(object.json_name); + } else { + message.json_name = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = FieldOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if ( + object.proto3_optional !== undefined && + object.proto3_optional !== null + ) { + message.proto3_optional = Boolean(object.proto3_optional); + } else { + message.proto3_optional = false; + } + return message; + }, + + toJSON(message: FieldDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.number !== undefined && (obj.number = message.number); + message.label !== undefined && + (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); + message.type !== undefined && + (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); + message.type_name !== undefined && (obj.type_name = message.type_name); + message.extendee !== undefined && (obj.extendee = message.extendee); + message.default_value !== undefined && + (obj.default_value = message.default_value); + message.oneof_index !== undefined && + (obj.oneof_index = message.oneof_index); + message.json_name !== undefined && (obj.json_name = message.json_name); + message.options !== undefined && + (obj.options = message.options + ? FieldOptions.toJSON(message.options) + : undefined); + message.proto3_optional !== undefined && + (obj.proto3_optional = message.proto3_optional); + return obj; + }, + + fromPartial(object: DeepPartial): FieldDescriptorProto { + const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = object.number; + } else { + message.number = 0; + } + if (object.label !== undefined && object.label !== null) { + message.label = object.label; + } else { + message.label = 1; + } + if (object.type !== undefined && object.type !== null) { + message.type = object.type; + } else { + message.type = 1; + } + if (object.type_name !== undefined && object.type_name !== null) { + message.type_name = object.type_name; + } else { + message.type_name = ""; + } + if (object.extendee !== undefined && object.extendee !== null) { + message.extendee = object.extendee; + } else { + message.extendee = ""; + } + if (object.default_value !== undefined && object.default_value !== null) { + message.default_value = object.default_value; + } else { + message.default_value = ""; + } + if (object.oneof_index !== undefined && object.oneof_index !== null) { + message.oneof_index = object.oneof_index; + } else { + message.oneof_index = 0; + } + if (object.json_name !== undefined && object.json_name !== null) { + message.json_name = object.json_name; + } else { + message.json_name = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = FieldOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if ( + object.proto3_optional !== undefined && + object.proto3_optional !== null + ) { + message.proto3_optional = object.proto3_optional; + } else { + message.proto3_optional = false; + } + return message; + }, +}; + +const baseOneofDescriptorProto: object = { name: "" }; + +export const OneofDescriptorProto = { + encode( + message: OneofDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.options !== undefined) { + OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): OneofDescriptorProto { + const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = OneofOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; + }, + + toJSON(message: OneofDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.options !== undefined && + (obj.options = message.options + ? OneofOptions.toJSON(message.options) + : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): OneofDescriptorProto { + const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = OneofOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + return message; + }, +}; + +const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; + +export const EnumDescriptorProto = { + encode( + message: EnumDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + for (const v of message.value) { + EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); + } + if (message.options !== undefined) { + EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); + } + for (const v of message.reserved_range) { + EnumDescriptorProto_EnumReservedRange.encode( + v!, + writer.uint32(34).fork() + ).ldelim(); + } + for (const v of message.reserved_name) { + writer.uint32(42).string(v!); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; + message.value = []; + message.reserved_range = []; + message.reserved_name = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.value.push( + EnumValueDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 3: + message.options = EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + message.reserved_range.push( + EnumDescriptorProto_EnumReservedRange.decode( + reader, + reader.uint32() + ) + ); + break; + case 5: + message.reserved_name.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumDescriptorProto { + const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; + message.value = []; + message.reserved_range = []; + message.reserved_name = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.value !== undefined && object.value !== null) { + for (const e of object.value) { + message.value.push(EnumValueDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if (object.reserved_range !== undefined && object.reserved_range !== null) { + for (const e of object.reserved_range) { + message.reserved_range.push( + EnumDescriptorProto_EnumReservedRange.fromJSON(e) + ); + } + } + if (object.reserved_name !== undefined && object.reserved_name !== null) { + for (const e of object.reserved_name) { + message.reserved_name.push(String(e)); + } + } + return message; + }, + + toJSON(message: EnumDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + if (message.value) { + obj.value = message.value.map((e) => + e ? EnumValueDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.value = []; + } + message.options !== undefined && + (obj.options = message.options + ? EnumOptions.toJSON(message.options) + : undefined); + if (message.reserved_range) { + obj.reserved_range = message.reserved_range.map((e) => + e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined + ); + } else { + obj.reserved_range = []; + } + if (message.reserved_name) { + obj.reserved_name = message.reserved_name.map((e) => e); + } else { + obj.reserved_name = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): EnumDescriptorProto { + const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; + message.value = []; + message.reserved_range = []; + message.reserved_name = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.value !== undefined && object.value !== null) { + for (const e of object.value) { + message.value.push(EnumValueDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if (object.reserved_range !== undefined && object.reserved_range !== null) { + for (const e of object.reserved_range) { + message.reserved_range.push( + EnumDescriptorProto_EnumReservedRange.fromPartial(e) + ); + } + } + if (object.reserved_name !== undefined && object.reserved_name !== null) { + for (const e of object.reserved_name) { + message.reserved_name.push(e); + } + } + return message; + }, +}; + +const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; + +export const EnumDescriptorProto_EnumReservedRange = { + encode( + message: EnumDescriptorProto_EnumReservedRange, + writer: Writer = Writer.create() + ): Writer { + if (message.start !== 0) { + writer.uint32(8).int32(message.start); + } + if (message.end !== 0) { + writer.uint32(16).int32(message.end); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): EnumDescriptorProto_EnumReservedRange { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseEnumDescriptorProto_EnumReservedRange, + } as EnumDescriptorProto_EnumReservedRange; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { + const message = { + ...baseEnumDescriptorProto_EnumReservedRange, + } as EnumDescriptorProto_EnumReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = Number(object.start); + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + return message; + }, + + toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { + const obj: any = {}; + message.start !== undefined && (obj.start = message.start); + message.end !== undefined && (obj.end = message.end); + return obj; + }, + + fromPartial( + object: DeepPartial + ): EnumDescriptorProto_EnumReservedRange { + const message = { + ...baseEnumDescriptorProto_EnumReservedRange, + } as EnumDescriptorProto_EnumReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = object.start; + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } + return message; + }, +}; + +const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; + +export const EnumValueDescriptorProto = { + encode( + message: EnumValueDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.number !== 0) { + writer.uint32(16).int32(message.number); + } + if (message.options !== undefined) { + EnumValueOptions.encode( + message.options, + writer.uint32(26).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): EnumValueDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseEnumValueDescriptorProto, + } as EnumValueDescriptorProto; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumValueDescriptorProto { + const message = { + ...baseEnumValueDescriptorProto, + } as EnumValueDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = Number(object.number); + } else { + message.number = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumValueOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; + }, + + toJSON(message: EnumValueDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.number !== undefined && (obj.number = message.number); + message.options !== undefined && + (obj.options = message.options + ? EnumValueOptions.toJSON(message.options) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): EnumValueDescriptorProto { + const message = { + ...baseEnumValueDescriptorProto, + } as EnumValueDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = object.number; + } else { + message.number = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumValueOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + return message; + }, +}; + +const baseServiceDescriptorProto: object = { name: "" }; + +export const ServiceDescriptorProto = { + encode( + message: ServiceDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + for (const v of message.method) { + MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); + } + if (message.options !== undefined) { + ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; + message.method = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.method.push( + MethodDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 3: + message.options = ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ServiceDescriptorProto { + const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; + message.method = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.method !== undefined && object.method !== null) { + for (const e of object.method) { + message.method.push(MethodDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = ServiceOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; + }, + + toJSON(message: ServiceDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + if (message.method) { + obj.method = message.method.map((e) => + e ? MethodDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.method = []; + } + message.options !== undefined && + (obj.options = message.options + ? ServiceOptions.toJSON(message.options) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): ServiceDescriptorProto { + const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; + message.method = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.method !== undefined && object.method !== null) { + for (const e of object.method) { + message.method.push(MethodDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = ServiceOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + return message; + }, +}; + +const baseMethodDescriptorProto: object = { + name: "", + input_type: "", + output_type: "", + client_streaming: false, + server_streaming: false, +}; + +export const MethodDescriptorProto = { + encode( + message: MethodDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.input_type !== "") { + writer.uint32(18).string(message.input_type); + } + if (message.output_type !== "") { + writer.uint32(26).string(message.output_type); + } + if (message.options !== undefined) { + MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); + } + if (message.client_streaming === true) { + writer.uint32(40).bool(message.client_streaming); + } + if (message.server_streaming === true) { + writer.uint32(48).bool(message.server_streaming); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.input_type = reader.string(); + break; + case 3: + message.output_type = reader.string(); + break; + case 4: + message.options = MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.client_streaming = reader.bool(); + break; + case 6: + message.server_streaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MethodDescriptorProto { + const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.input_type !== undefined && object.input_type !== null) { + message.input_type = String(object.input_type); + } else { + message.input_type = ""; + } + if (object.output_type !== undefined && object.output_type !== null) { + message.output_type = String(object.output_type); + } else { + message.output_type = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = MethodOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if ( + object.client_streaming !== undefined && + object.client_streaming !== null + ) { + message.client_streaming = Boolean(object.client_streaming); + } else { + message.client_streaming = false; + } + if ( + object.server_streaming !== undefined && + object.server_streaming !== null + ) { + message.server_streaming = Boolean(object.server_streaming); + } else { + message.server_streaming = false; + } + return message; + }, + + toJSON(message: MethodDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.input_type !== undefined && (obj.input_type = message.input_type); + message.output_type !== undefined && + (obj.output_type = message.output_type); + message.options !== undefined && + (obj.options = message.options + ? MethodOptions.toJSON(message.options) + : undefined); + message.client_streaming !== undefined && + (obj.client_streaming = message.client_streaming); + message.server_streaming !== undefined && + (obj.server_streaming = message.server_streaming); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MethodDescriptorProto { + const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.input_type !== undefined && object.input_type !== null) { + message.input_type = object.input_type; + } else { + message.input_type = ""; + } + if (object.output_type !== undefined && object.output_type !== null) { + message.output_type = object.output_type; + } else { + message.output_type = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = MethodOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if ( + object.client_streaming !== undefined && + object.client_streaming !== null + ) { + message.client_streaming = object.client_streaming; + } else { + message.client_streaming = false; + } + if ( + object.server_streaming !== undefined && + object.server_streaming !== null + ) { + message.server_streaming = object.server_streaming; + } else { + message.server_streaming = false; + } + return message; + }, +}; + +const baseFileOptions: object = { + java_package: "", + java_outer_classname: "", + java_multiple_files: false, + java_generate_equals_and_hash: false, + java_string_check_utf8: false, + optimize_for: 1, + go_package: "", + cc_generic_services: false, + java_generic_services: false, + py_generic_services: false, + php_generic_services: false, + deprecated: false, + cc_enable_arenas: false, + objc_class_prefix: "", + csharp_namespace: "", + swift_prefix: "", + php_class_prefix: "", + php_namespace: "", + php_metadata_namespace: "", + ruby_package: "", +}; + +export const FileOptions = { + encode(message: FileOptions, writer: Writer = Writer.create()): Writer { + if (message.java_package !== "") { + writer.uint32(10).string(message.java_package); + } + if (message.java_outer_classname !== "") { + writer.uint32(66).string(message.java_outer_classname); + } + if (message.java_multiple_files === true) { + writer.uint32(80).bool(message.java_multiple_files); + } + if (message.java_generate_equals_and_hash === true) { + writer.uint32(160).bool(message.java_generate_equals_and_hash); + } + if (message.java_string_check_utf8 === true) { + writer.uint32(216).bool(message.java_string_check_utf8); + } + if (message.optimize_for !== 1) { + writer.uint32(72).int32(message.optimize_for); + } + if (message.go_package !== "") { + writer.uint32(90).string(message.go_package); + } + if (message.cc_generic_services === true) { + writer.uint32(128).bool(message.cc_generic_services); + } + if (message.java_generic_services === true) { + writer.uint32(136).bool(message.java_generic_services); + } + if (message.py_generic_services === true) { + writer.uint32(144).bool(message.py_generic_services); + } + if (message.php_generic_services === true) { + writer.uint32(336).bool(message.php_generic_services); + } + if (message.deprecated === true) { + writer.uint32(184).bool(message.deprecated); + } + if (message.cc_enable_arenas === true) { + writer.uint32(248).bool(message.cc_enable_arenas); + } + if (message.objc_class_prefix !== "") { + writer.uint32(290).string(message.objc_class_prefix); + } + if (message.csharp_namespace !== "") { + writer.uint32(298).string(message.csharp_namespace); + } + if (message.swift_prefix !== "") { + writer.uint32(314).string(message.swift_prefix); + } + if (message.php_class_prefix !== "") { + writer.uint32(322).string(message.php_class_prefix); + } + if (message.php_namespace !== "") { + writer.uint32(330).string(message.php_namespace); + } + if (message.php_metadata_namespace !== "") { + writer.uint32(354).string(message.php_metadata_namespace); + } + if (message.ruby_package !== "") { + writer.uint32(362).string(message.ruby_package); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FileOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFileOptions } as FileOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.java_package = reader.string(); + break; + case 8: + message.java_outer_classname = reader.string(); + break; + case 10: + message.java_multiple_files = reader.bool(); + break; + case 20: + message.java_generate_equals_and_hash = reader.bool(); + break; + case 27: + message.java_string_check_utf8 = reader.bool(); + break; + case 9: + message.optimize_for = reader.int32() as any; + break; + case 11: + message.go_package = reader.string(); + break; + case 16: + message.cc_generic_services = reader.bool(); + break; + case 17: + message.java_generic_services = reader.bool(); + break; + case 18: + message.py_generic_services = reader.bool(); + break; + case 42: + message.php_generic_services = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.cc_enable_arenas = reader.bool(); + break; + case 36: + message.objc_class_prefix = reader.string(); + break; + case 37: + message.csharp_namespace = reader.string(); + break; + case 39: + message.swift_prefix = reader.string(); + break; + case 40: + message.php_class_prefix = reader.string(); + break; + case 41: + message.php_namespace = reader.string(); + break; + case 44: + message.php_metadata_namespace = reader.string(); + break; + case 45: + message.ruby_package = reader.string(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FileOptions { + const message = { ...baseFileOptions } as FileOptions; + message.uninterpreted_option = []; + if (object.java_package !== undefined && object.java_package !== null) { + message.java_package = String(object.java_package); + } else { + message.java_package = ""; + } + if ( + object.java_outer_classname !== undefined && + object.java_outer_classname !== null + ) { + message.java_outer_classname = String(object.java_outer_classname); + } else { + message.java_outer_classname = ""; + } + if ( + object.java_multiple_files !== undefined && + object.java_multiple_files !== null + ) { + message.java_multiple_files = Boolean(object.java_multiple_files); + } else { + message.java_multiple_files = false; + } + if ( + object.java_generate_equals_and_hash !== undefined && + object.java_generate_equals_and_hash !== null + ) { + message.java_generate_equals_and_hash = Boolean( + object.java_generate_equals_and_hash + ); + } else { + message.java_generate_equals_and_hash = false; + } + if ( + object.java_string_check_utf8 !== undefined && + object.java_string_check_utf8 !== null + ) { + message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); + } else { + message.java_string_check_utf8 = false; + } + if (object.optimize_for !== undefined && object.optimize_for !== null) { + message.optimize_for = fileOptions_OptimizeModeFromJSON( + object.optimize_for + ); + } else { + message.optimize_for = 1; + } + if (object.go_package !== undefined && object.go_package !== null) { + message.go_package = String(object.go_package); + } else { + message.go_package = ""; + } + if ( + object.cc_generic_services !== undefined && + object.cc_generic_services !== null + ) { + message.cc_generic_services = Boolean(object.cc_generic_services); + } else { + message.cc_generic_services = false; + } + if ( + object.java_generic_services !== undefined && + object.java_generic_services !== null + ) { + message.java_generic_services = Boolean(object.java_generic_services); + } else { + message.java_generic_services = false; + } + if ( + object.py_generic_services !== undefined && + object.py_generic_services !== null + ) { + message.py_generic_services = Boolean(object.py_generic_services); + } else { + message.py_generic_services = false; + } + if ( + object.php_generic_services !== undefined && + object.php_generic_services !== null + ) { + message.php_generic_services = Boolean(object.php_generic_services); + } else { + message.php_generic_services = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.cc_enable_arenas !== undefined && + object.cc_enable_arenas !== null + ) { + message.cc_enable_arenas = Boolean(object.cc_enable_arenas); + } else { + message.cc_enable_arenas = false; + } + if ( + object.objc_class_prefix !== undefined && + object.objc_class_prefix !== null + ) { + message.objc_class_prefix = String(object.objc_class_prefix); + } else { + message.objc_class_prefix = ""; + } + if ( + object.csharp_namespace !== undefined && + object.csharp_namespace !== null + ) { + message.csharp_namespace = String(object.csharp_namespace); + } else { + message.csharp_namespace = ""; + } + if (object.swift_prefix !== undefined && object.swift_prefix !== null) { + message.swift_prefix = String(object.swift_prefix); + } else { + message.swift_prefix = ""; + } + if ( + object.php_class_prefix !== undefined && + object.php_class_prefix !== null + ) { + message.php_class_prefix = String(object.php_class_prefix); + } else { + message.php_class_prefix = ""; + } + if (object.php_namespace !== undefined && object.php_namespace !== null) { + message.php_namespace = String(object.php_namespace); + } else { + message.php_namespace = ""; + } + if ( + object.php_metadata_namespace !== undefined && + object.php_metadata_namespace !== null + ) { + message.php_metadata_namespace = String(object.php_metadata_namespace); + } else { + message.php_metadata_namespace = ""; + } + if (object.ruby_package !== undefined && object.ruby_package !== null) { + message.ruby_package = String(object.ruby_package); + } else { + message.ruby_package = ""; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: FileOptions): unknown { + const obj: any = {}; + message.java_package !== undefined && + (obj.java_package = message.java_package); + message.java_outer_classname !== undefined && + (obj.java_outer_classname = message.java_outer_classname); + message.java_multiple_files !== undefined && + (obj.java_multiple_files = message.java_multiple_files); + message.java_generate_equals_and_hash !== undefined && + (obj.java_generate_equals_and_hash = + message.java_generate_equals_and_hash); + message.java_string_check_utf8 !== undefined && + (obj.java_string_check_utf8 = message.java_string_check_utf8); + message.optimize_for !== undefined && + (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); + message.go_package !== undefined && (obj.go_package = message.go_package); + message.cc_generic_services !== undefined && + (obj.cc_generic_services = message.cc_generic_services); + message.java_generic_services !== undefined && + (obj.java_generic_services = message.java_generic_services); + message.py_generic_services !== undefined && + (obj.py_generic_services = message.py_generic_services); + message.php_generic_services !== undefined && + (obj.php_generic_services = message.php_generic_services); + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + message.cc_enable_arenas !== undefined && + (obj.cc_enable_arenas = message.cc_enable_arenas); + message.objc_class_prefix !== undefined && + (obj.objc_class_prefix = message.objc_class_prefix); + message.csharp_namespace !== undefined && + (obj.csharp_namespace = message.csharp_namespace); + message.swift_prefix !== undefined && + (obj.swift_prefix = message.swift_prefix); + message.php_class_prefix !== undefined && + (obj.php_class_prefix = message.php_class_prefix); + message.php_namespace !== undefined && + (obj.php_namespace = message.php_namespace); + message.php_metadata_namespace !== undefined && + (obj.php_metadata_namespace = message.php_metadata_namespace); + message.ruby_package !== undefined && + (obj.ruby_package = message.ruby_package); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): FileOptions { + const message = { ...baseFileOptions } as FileOptions; + message.uninterpreted_option = []; + if (object.java_package !== undefined && object.java_package !== null) { + message.java_package = object.java_package; + } else { + message.java_package = ""; + } + if ( + object.java_outer_classname !== undefined && + object.java_outer_classname !== null + ) { + message.java_outer_classname = object.java_outer_classname; + } else { + message.java_outer_classname = ""; + } + if ( + object.java_multiple_files !== undefined && + object.java_multiple_files !== null + ) { + message.java_multiple_files = object.java_multiple_files; + } else { + message.java_multiple_files = false; + } + if ( + object.java_generate_equals_and_hash !== undefined && + object.java_generate_equals_and_hash !== null + ) { + message.java_generate_equals_and_hash = + object.java_generate_equals_and_hash; + } else { + message.java_generate_equals_and_hash = false; + } + if ( + object.java_string_check_utf8 !== undefined && + object.java_string_check_utf8 !== null + ) { + message.java_string_check_utf8 = object.java_string_check_utf8; + } else { + message.java_string_check_utf8 = false; + } + if (object.optimize_for !== undefined && object.optimize_for !== null) { + message.optimize_for = object.optimize_for; + } else { + message.optimize_for = 1; + } + if (object.go_package !== undefined && object.go_package !== null) { + message.go_package = object.go_package; + } else { + message.go_package = ""; + } + if ( + object.cc_generic_services !== undefined && + object.cc_generic_services !== null + ) { + message.cc_generic_services = object.cc_generic_services; + } else { + message.cc_generic_services = false; + } + if ( + object.java_generic_services !== undefined && + object.java_generic_services !== null + ) { + message.java_generic_services = object.java_generic_services; + } else { + message.java_generic_services = false; + } + if ( + object.py_generic_services !== undefined && + object.py_generic_services !== null + ) { + message.py_generic_services = object.py_generic_services; + } else { + message.py_generic_services = false; + } + if ( + object.php_generic_services !== undefined && + object.php_generic_services !== null + ) { + message.php_generic_services = object.php_generic_services; + } else { + message.php_generic_services = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.cc_enable_arenas !== undefined && + object.cc_enable_arenas !== null + ) { + message.cc_enable_arenas = object.cc_enable_arenas; + } else { + message.cc_enable_arenas = false; + } + if ( + object.objc_class_prefix !== undefined && + object.objc_class_prefix !== null + ) { + message.objc_class_prefix = object.objc_class_prefix; + } else { + message.objc_class_prefix = ""; + } + if ( + object.csharp_namespace !== undefined && + object.csharp_namespace !== null + ) { + message.csharp_namespace = object.csharp_namespace; + } else { + message.csharp_namespace = ""; + } + if (object.swift_prefix !== undefined && object.swift_prefix !== null) { + message.swift_prefix = object.swift_prefix; + } else { + message.swift_prefix = ""; + } + if ( + object.php_class_prefix !== undefined && + object.php_class_prefix !== null + ) { + message.php_class_prefix = object.php_class_prefix; + } else { + message.php_class_prefix = ""; + } + if (object.php_namespace !== undefined && object.php_namespace !== null) { + message.php_namespace = object.php_namespace; + } else { + message.php_namespace = ""; + } + if ( + object.php_metadata_namespace !== undefined && + object.php_metadata_namespace !== null + ) { + message.php_metadata_namespace = object.php_metadata_namespace; + } else { + message.php_metadata_namespace = ""; + } + if (object.ruby_package !== undefined && object.ruby_package !== null) { + message.ruby_package = object.ruby_package; + } else { + message.ruby_package = ""; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseMessageOptions: object = { + message_set_wire_format: false, + no_standard_descriptor_accessor: false, + deprecated: false, + map_entry: false, +}; + +export const MessageOptions = { + encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { + if (message.message_set_wire_format === true) { + writer.uint32(8).bool(message.message_set_wire_format); + } + if (message.no_standard_descriptor_accessor === true) { + writer.uint32(16).bool(message.no_standard_descriptor_accessor); + } + if (message.deprecated === true) { + writer.uint32(24).bool(message.deprecated); + } + if (message.map_entry === true) { + writer.uint32(56).bool(message.map_entry); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MessageOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMessageOptions } as MessageOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message_set_wire_format = reader.bool(); + break; + case 2: + message.no_standard_descriptor_accessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.map_entry = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MessageOptions { + const message = { ...baseMessageOptions } as MessageOptions; + message.uninterpreted_option = []; + if ( + object.message_set_wire_format !== undefined && + object.message_set_wire_format !== null + ) { + message.message_set_wire_format = Boolean(object.message_set_wire_format); + } else { + message.message_set_wire_format = false; + } + if ( + object.no_standard_descriptor_accessor !== undefined && + object.no_standard_descriptor_accessor !== null + ) { + message.no_standard_descriptor_accessor = Boolean( + object.no_standard_descriptor_accessor + ); + } else { + message.no_standard_descriptor_accessor = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if (object.map_entry !== undefined && object.map_entry !== null) { + message.map_entry = Boolean(object.map_entry); + } else { + message.map_entry = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: MessageOptions): unknown { + const obj: any = {}; + message.message_set_wire_format !== undefined && + (obj.message_set_wire_format = message.message_set_wire_format); + message.no_standard_descriptor_accessor !== undefined && + (obj.no_standard_descriptor_accessor = + message.no_standard_descriptor_accessor); + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + message.map_entry !== undefined && (obj.map_entry = message.map_entry); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): MessageOptions { + const message = { ...baseMessageOptions } as MessageOptions; + message.uninterpreted_option = []; + if ( + object.message_set_wire_format !== undefined && + object.message_set_wire_format !== null + ) { + message.message_set_wire_format = object.message_set_wire_format; + } else { + message.message_set_wire_format = false; + } + if ( + object.no_standard_descriptor_accessor !== undefined && + object.no_standard_descriptor_accessor !== null + ) { + message.no_standard_descriptor_accessor = + object.no_standard_descriptor_accessor; + } else { + message.no_standard_descriptor_accessor = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if (object.map_entry !== undefined && object.map_entry !== null) { + message.map_entry = object.map_entry; + } else { + message.map_entry = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseFieldOptions: object = { + ctype: 0, + packed: false, + jstype: 0, + lazy: false, + deprecated: false, + weak: false, +}; + +export const FieldOptions = { + encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { + if (message.ctype !== 0) { + writer.uint32(8).int32(message.ctype); + } + if (message.packed === true) { + writer.uint32(16).bool(message.packed); + } + if (message.jstype !== 0) { + writer.uint32(48).int32(message.jstype); + } + if (message.lazy === true) { + writer.uint32(40).bool(message.lazy); + } + if (message.deprecated === true) { + writer.uint32(24).bool(message.deprecated); + } + if (message.weak === true) { + writer.uint32(80).bool(message.weak); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FieldOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFieldOptions } as FieldOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32() as any; + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32() as any; + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FieldOptions { + const message = { ...baseFieldOptions } as FieldOptions; + message.uninterpreted_option = []; + if (object.ctype !== undefined && object.ctype !== null) { + message.ctype = fieldOptions_CTypeFromJSON(object.ctype); + } else { + message.ctype = 0; + } + if (object.packed !== undefined && object.packed !== null) { + message.packed = Boolean(object.packed); + } else { + message.packed = false; + } + if (object.jstype !== undefined && object.jstype !== null) { + message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); + } else { + message.jstype = 0; + } + if (object.lazy !== undefined && object.lazy !== null) { + message.lazy = Boolean(object.lazy); + } else { + message.lazy = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if (object.weak !== undefined && object.weak !== null) { + message.weak = Boolean(object.weak); + } else { + message.weak = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: FieldOptions): unknown { + const obj: any = {}; + message.ctype !== undefined && + (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); + message.packed !== undefined && (obj.packed = message.packed); + message.jstype !== undefined && + (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); + message.lazy !== undefined && (obj.lazy = message.lazy); + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + message.weak !== undefined && (obj.weak = message.weak); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): FieldOptions { + const message = { ...baseFieldOptions } as FieldOptions; + message.uninterpreted_option = []; + if (object.ctype !== undefined && object.ctype !== null) { + message.ctype = object.ctype; + } else { + message.ctype = 0; + } + if (object.packed !== undefined && object.packed !== null) { + message.packed = object.packed; + } else { + message.packed = false; + } + if (object.jstype !== undefined && object.jstype !== null) { + message.jstype = object.jstype; + } else { + message.jstype = 0; + } + if (object.lazy !== undefined && object.lazy !== null) { + message.lazy = object.lazy; + } else { + message.lazy = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if (object.weak !== undefined && object.weak !== null) { + message.weak = object.weak; + } else { + message.weak = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseOneofOptions: object = {}; + +export const OneofOptions = { + encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): OneofOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseOneofOptions } as OneofOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): OneofOptions { + const message = { ...baseOneofOptions } as OneofOptions; + message.uninterpreted_option = []; + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: OneofOptions): unknown { + const obj: any = {}; + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): OneofOptions { + const message = { ...baseOneofOptions } as OneofOptions; + message.uninterpreted_option = []; + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseEnumOptions: object = { allow_alias: false, deprecated: false }; + +export const EnumOptions = { + encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { + if (message.allow_alias === true) { + writer.uint32(16).bool(message.allow_alias); + } + if (message.deprecated === true) { + writer.uint32(24).bool(message.deprecated); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): EnumOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseEnumOptions } as EnumOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allow_alias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumOptions { + const message = { ...baseEnumOptions } as EnumOptions; + message.uninterpreted_option = []; + if (object.allow_alias !== undefined && object.allow_alias !== null) { + message.allow_alias = Boolean(object.allow_alias); + } else { + message.allow_alias = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: EnumOptions): unknown { + const obj: any = {}; + message.allow_alias !== undefined && + (obj.allow_alias = message.allow_alias); + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): EnumOptions { + const message = { ...baseEnumOptions } as EnumOptions; + message.uninterpreted_option = []; + if (object.allow_alias !== undefined && object.allow_alias !== null) { + message.allow_alias = object.allow_alias; + } else { + message.allow_alias = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseEnumValueOptions: object = { deprecated: false }; + +export const EnumValueOptions = { + encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { + if (message.deprecated === true) { + writer.uint32(8).bool(message.deprecated); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseEnumValueOptions } as EnumValueOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumValueOptions { + const message = { ...baseEnumValueOptions } as EnumValueOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: EnumValueOptions): unknown { + const obj: any = {}; + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): EnumValueOptions { + const message = { ...baseEnumValueOptions } as EnumValueOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseServiceOptions: object = { deprecated: false }; + +export const ServiceOptions = { + encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { + if (message.deprecated === true) { + writer.uint32(264).bool(message.deprecated); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): ServiceOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseServiceOptions } as ServiceOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ServiceOptions { + const message = { ...baseServiceOptions } as ServiceOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: ServiceOptions): unknown { + const obj: any = {}; + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): ServiceOptions { + const message = { ...baseServiceOptions } as ServiceOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; + +export const MethodOptions = { + encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { + if (message.deprecated === true) { + writer.uint32(264).bool(message.deprecated); + } + if (message.idempotency_level !== 0) { + writer.uint32(272).int32(message.idempotency_level); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MethodOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMethodOptions } as MethodOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotency_level = reader.int32() as any; + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MethodOptions { + const message = { ...baseMethodOptions } as MethodOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.idempotency_level !== undefined && + object.idempotency_level !== null + ) { + message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( + object.idempotency_level + ); + } else { + message.idempotency_level = 0; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: MethodOptions): unknown { + const obj: any = {}; + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + message.idempotency_level !== undefined && + (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( + message.idempotency_level + )); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): MethodOptions { + const message = { ...baseMethodOptions } as MethodOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.idempotency_level !== undefined && + object.idempotency_level !== null + ) { + message.idempotency_level = object.idempotency_level; + } else { + message.idempotency_level = 0; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseUninterpretedOption: object = { + identifier_value: "", + positive_int_value: 0, + negative_int_value: 0, + double_value: 0, + aggregate_value: "", +}; + +export const UninterpretedOption = { + encode( + message: UninterpretedOption, + writer: Writer = Writer.create() + ): Writer { + for (const v of message.name) { + UninterpretedOption_NamePart.encode( + v!, + writer.uint32(18).fork() + ).ldelim(); + } + if (message.identifier_value !== "") { + writer.uint32(26).string(message.identifier_value); + } + if (message.positive_int_value !== 0) { + writer.uint32(32).uint64(message.positive_int_value); + } + if (message.negative_int_value !== 0) { + writer.uint32(40).int64(message.negative_int_value); + } + if (message.double_value !== 0) { + writer.uint32(49).double(message.double_value); + } + if (message.string_value.length !== 0) { + writer.uint32(58).bytes(message.string_value); + } + if (message.aggregate_value !== "") { + writer.uint32(66).string(message.aggregate_value); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseUninterpretedOption } as UninterpretedOption; + message.name = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.name.push( + UninterpretedOption_NamePart.decode(reader, reader.uint32()) + ); + break; + case 3: + message.identifier_value = reader.string(); + break; + case 4: + message.positive_int_value = longToNumber(reader.uint64() as Long); + break; + case 5: + message.negative_int_value = longToNumber(reader.int64() as Long); + break; + case 6: + message.double_value = reader.double(); + break; + case 7: + message.string_value = reader.bytes(); + break; + case 8: + message.aggregate_value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): UninterpretedOption { + const message = { ...baseUninterpretedOption } as UninterpretedOption; + message.name = []; + if (object.name !== undefined && object.name !== null) { + for (const e of object.name) { + message.name.push(UninterpretedOption_NamePart.fromJSON(e)); + } + } + if ( + object.identifier_value !== undefined && + object.identifier_value !== null + ) { + message.identifier_value = String(object.identifier_value); + } else { + message.identifier_value = ""; + } + if ( + object.positive_int_value !== undefined && + object.positive_int_value !== null + ) { + message.positive_int_value = Number(object.positive_int_value); + } else { + message.positive_int_value = 0; + } + if ( + object.negative_int_value !== undefined && + object.negative_int_value !== null + ) { + message.negative_int_value = Number(object.negative_int_value); + } else { + message.negative_int_value = 0; + } + if (object.double_value !== undefined && object.double_value !== null) { + message.double_value = Number(object.double_value); + } else { + message.double_value = 0; + } + if (object.string_value !== undefined && object.string_value !== null) { + message.string_value = bytesFromBase64(object.string_value); + } + if ( + object.aggregate_value !== undefined && + object.aggregate_value !== null + ) { + message.aggregate_value = String(object.aggregate_value); + } else { + message.aggregate_value = ""; + } + return message; + }, + + toJSON(message: UninterpretedOption): unknown { + const obj: any = {}; + if (message.name) { + obj.name = message.name.map((e) => + e ? UninterpretedOption_NamePart.toJSON(e) : undefined + ); + } else { + obj.name = []; + } + message.identifier_value !== undefined && + (obj.identifier_value = message.identifier_value); + message.positive_int_value !== undefined && + (obj.positive_int_value = message.positive_int_value); + message.negative_int_value !== undefined && + (obj.negative_int_value = message.negative_int_value); + message.double_value !== undefined && + (obj.double_value = message.double_value); + message.string_value !== undefined && + (obj.string_value = base64FromBytes( + message.string_value !== undefined + ? message.string_value + : new Uint8Array() + )); + message.aggregate_value !== undefined && + (obj.aggregate_value = message.aggregate_value); + return obj; + }, + + fromPartial(object: DeepPartial): UninterpretedOption { + const message = { ...baseUninterpretedOption } as UninterpretedOption; + message.name = []; + if (object.name !== undefined && object.name !== null) { + for (const e of object.name) { + message.name.push(UninterpretedOption_NamePart.fromPartial(e)); + } + } + if ( + object.identifier_value !== undefined && + object.identifier_value !== null + ) { + message.identifier_value = object.identifier_value; + } else { + message.identifier_value = ""; + } + if ( + object.positive_int_value !== undefined && + object.positive_int_value !== null + ) { + message.positive_int_value = object.positive_int_value; + } else { + message.positive_int_value = 0; + } + if ( + object.negative_int_value !== undefined && + object.negative_int_value !== null + ) { + message.negative_int_value = object.negative_int_value; + } else { + message.negative_int_value = 0; + } + if (object.double_value !== undefined && object.double_value !== null) { + message.double_value = object.double_value; + } else { + message.double_value = 0; + } + if (object.string_value !== undefined && object.string_value !== null) { + message.string_value = object.string_value; + } else { + message.string_value = new Uint8Array(); + } + if ( + object.aggregate_value !== undefined && + object.aggregate_value !== null + ) { + message.aggregate_value = object.aggregate_value; + } else { + message.aggregate_value = ""; + } + return message; + }, +}; + +const baseUninterpretedOption_NamePart: object = { + name_part: "", + is_extension: false, +}; + +export const UninterpretedOption_NamePart = { + encode( + message: UninterpretedOption_NamePart, + writer: Writer = Writer.create() + ): Writer { + if (message.name_part !== "") { + writer.uint32(10).string(message.name_part); + } + if (message.is_extension === true) { + writer.uint32(16).bool(message.is_extension); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): UninterpretedOption_NamePart { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseUninterpretedOption_NamePart, + } as UninterpretedOption_NamePart; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name_part = reader.string(); + break; + case 2: + message.is_extension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): UninterpretedOption_NamePart { + const message = { + ...baseUninterpretedOption_NamePart, + } as UninterpretedOption_NamePart; + if (object.name_part !== undefined && object.name_part !== null) { + message.name_part = String(object.name_part); + } else { + message.name_part = ""; + } + if (object.is_extension !== undefined && object.is_extension !== null) { + message.is_extension = Boolean(object.is_extension); + } else { + message.is_extension = false; + } + return message; + }, + + toJSON(message: UninterpretedOption_NamePart): unknown { + const obj: any = {}; + message.name_part !== undefined && (obj.name_part = message.name_part); + message.is_extension !== undefined && + (obj.is_extension = message.is_extension); + return obj; + }, + + fromPartial( + object: DeepPartial + ): UninterpretedOption_NamePart { + const message = { + ...baseUninterpretedOption_NamePart, + } as UninterpretedOption_NamePart; + if (object.name_part !== undefined && object.name_part !== null) { + message.name_part = object.name_part; + } else { + message.name_part = ""; + } + if (object.is_extension !== undefined && object.is_extension !== null) { + message.is_extension = object.is_extension; + } else { + message.is_extension = false; + } + return message; + }, +}; + +const baseSourceCodeInfo: object = {}; + +export const SourceCodeInfo = { + encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { + for (const v of message.location) { + SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseSourceCodeInfo } as SourceCodeInfo; + message.location = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location.push( + SourceCodeInfo_Location.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): SourceCodeInfo { + const message = { ...baseSourceCodeInfo } as SourceCodeInfo; + message.location = []; + if (object.location !== undefined && object.location !== null) { + for (const e of object.location) { + message.location.push(SourceCodeInfo_Location.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: SourceCodeInfo): unknown { + const obj: any = {}; + if (message.location) { + obj.location = message.location.map((e) => + e ? SourceCodeInfo_Location.toJSON(e) : undefined + ); + } else { + obj.location = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): SourceCodeInfo { + const message = { ...baseSourceCodeInfo } as SourceCodeInfo; + message.location = []; + if (object.location !== undefined && object.location !== null) { + for (const e of object.location) { + message.location.push(SourceCodeInfo_Location.fromPartial(e)); + } + } + return message; + }, +}; + +const baseSourceCodeInfo_Location: object = { + path: 0, + span: 0, + leading_comments: "", + trailing_comments: "", + leading_detached_comments: "", +}; + +export const SourceCodeInfo_Location = { + encode( + message: SourceCodeInfo_Location, + writer: Writer = Writer.create() + ): Writer { + writer.uint32(10).fork(); + for (const v of message.path) { + writer.int32(v); + } + writer.ldelim(); + writer.uint32(18).fork(); + for (const v of message.span) { + writer.int32(v); + } + writer.ldelim(); + if (message.leading_comments !== "") { + writer.uint32(26).string(message.leading_comments); + } + if (message.trailing_comments !== "") { + writer.uint32(34).string(message.trailing_comments); + } + for (const v of message.leading_detached_comments) { + writer.uint32(50).string(v!); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseSourceCodeInfo_Location, + } as SourceCodeInfo_Location; + message.path = []; + message.span = []; + message.leading_detached_comments = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.path.push(reader.int32()); + } + } else { + message.path.push(reader.int32()); + } + break; + case 2: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.span.push(reader.int32()); + } + } else { + message.span.push(reader.int32()); + } + break; + case 3: + message.leading_comments = reader.string(); + break; + case 4: + message.trailing_comments = reader.string(); + break; + case 6: + message.leading_detached_comments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): SourceCodeInfo_Location { + const message = { + ...baseSourceCodeInfo_Location, + } as SourceCodeInfo_Location; + message.path = []; + message.span = []; + message.leading_detached_comments = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(Number(e)); + } + } + if (object.span !== undefined && object.span !== null) { + for (const e of object.span) { + message.span.push(Number(e)); + } + } + if ( + object.leading_comments !== undefined && + object.leading_comments !== null + ) { + message.leading_comments = String(object.leading_comments); + } else { + message.leading_comments = ""; + } + if ( + object.trailing_comments !== undefined && + object.trailing_comments !== null + ) { + message.trailing_comments = String(object.trailing_comments); + } else { + message.trailing_comments = ""; + } + if ( + object.leading_detached_comments !== undefined && + object.leading_detached_comments !== null + ) { + for (const e of object.leading_detached_comments) { + message.leading_detached_comments.push(String(e)); + } + } + return message; + }, + + toJSON(message: SourceCodeInfo_Location): unknown { + const obj: any = {}; + if (message.path) { + obj.path = message.path.map((e) => e); + } else { + obj.path = []; + } + if (message.span) { + obj.span = message.span.map((e) => e); + } else { + obj.span = []; + } + message.leading_comments !== undefined && + (obj.leading_comments = message.leading_comments); + message.trailing_comments !== undefined && + (obj.trailing_comments = message.trailing_comments); + if (message.leading_detached_comments) { + obj.leading_detached_comments = message.leading_detached_comments.map( + (e) => e + ); + } else { + obj.leading_detached_comments = []; + } + return obj; + }, + + fromPartial( + object: DeepPartial + ): SourceCodeInfo_Location { + const message = { + ...baseSourceCodeInfo_Location, + } as SourceCodeInfo_Location; + message.path = []; + message.span = []; + message.leading_detached_comments = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(e); + } + } + if (object.span !== undefined && object.span !== null) { + for (const e of object.span) { + message.span.push(e); + } + } + if ( + object.leading_comments !== undefined && + object.leading_comments !== null + ) { + message.leading_comments = object.leading_comments; + } else { + message.leading_comments = ""; + } + if ( + object.trailing_comments !== undefined && + object.trailing_comments !== null + ) { + message.trailing_comments = object.trailing_comments; + } else { + message.trailing_comments = ""; + } + if ( + object.leading_detached_comments !== undefined && + object.leading_detached_comments !== null + ) { + for (const e of object.leading_detached_comments) { + message.leading_detached_comments.push(e); + } + } + return message; + }, +}; + +const baseGeneratedCodeInfo: object = {}; + +export const GeneratedCodeInfo = { + encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { + for (const v of message.annotation) { + GeneratedCodeInfo_Annotation.encode( + v!, + writer.uint32(10).fork() + ).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; + message.annotation = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.annotation.push( + GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): GeneratedCodeInfo { + const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; + message.annotation = []; + if (object.annotation !== undefined && object.annotation !== null) { + for (const e of object.annotation) { + message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: GeneratedCodeInfo): unknown { + const obj: any = {}; + if (message.annotation) { + obj.annotation = message.annotation.map((e) => + e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined + ); + } else { + obj.annotation = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): GeneratedCodeInfo { + const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; + message.annotation = []; + if (object.annotation !== undefined && object.annotation !== null) { + for (const e of object.annotation) { + message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); + } + } + return message; + }, +}; + +const baseGeneratedCodeInfo_Annotation: object = { + path: 0, + source_file: "", + begin: 0, + end: 0, +}; + +export const GeneratedCodeInfo_Annotation = { + encode( + message: GeneratedCodeInfo_Annotation, + writer: Writer = Writer.create() + ): Writer { + writer.uint32(10).fork(); + for (const v of message.path) { + writer.int32(v); + } + writer.ldelim(); + if (message.source_file !== "") { + writer.uint32(18).string(message.source_file); + } + if (message.begin !== 0) { + writer.uint32(24).int32(message.begin); + } + if (message.end !== 0) { + writer.uint32(32).int32(message.end); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): GeneratedCodeInfo_Annotation { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseGeneratedCodeInfo_Annotation, + } as GeneratedCodeInfo_Annotation; + message.path = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.path.push(reader.int32()); + } + } else { + message.path.push(reader.int32()); + } + break; + case 2: + message.source_file = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): GeneratedCodeInfo_Annotation { + const message = { + ...baseGeneratedCodeInfo_Annotation, + } as GeneratedCodeInfo_Annotation; + message.path = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(Number(e)); + } + } + if (object.source_file !== undefined && object.source_file !== null) { + message.source_file = String(object.source_file); + } else { + message.source_file = ""; + } + if (object.begin !== undefined && object.begin !== null) { + message.begin = Number(object.begin); + } else { + message.begin = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + return message; + }, + + toJSON(message: GeneratedCodeInfo_Annotation): unknown { + const obj: any = {}; + if (message.path) { + obj.path = message.path.map((e) => e); + } else { + obj.path = []; + } + message.source_file !== undefined && + (obj.source_file = message.source_file); + message.begin !== undefined && (obj.begin = message.begin); + message.end !== undefined && (obj.end = message.end); + return obj; + }, + + fromPartial( + object: DeepPartial + ): GeneratedCodeInfo_Annotation { + const message = { + ...baseGeneratedCodeInfo_Annotation, + } as GeneratedCodeInfo_Annotation; + message.path = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(e); + } + } + if (object.source_file !== undefined && object.source_file !== null) { + message.source_file = object.source_file; + } else { + message.source_file = ""; + } + if (object.begin !== undefined && object.begin !== null) { + message.begin = object.begin; + } else { + message.begin = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +const atob: (b64: string) => string = + globalThis.atob || + ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +function bytesFromBase64(b64: string): Uint8Array { + const bin = atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; +} + +const btoa: (bin: string) => string = + globalThis.btoa || + ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +function base64FromBytes(arr: Uint8Array): string { + const bin: string[] = []; + for (let i = 0; i < arr.byteLength; ++i) { + bin.push(String.fromCharCode(arr[i])); + } + return btoa(bin.join("")); +} + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/protobuf/duration.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/protobuf/duration.ts new file mode 100644 index 00000000..fffd5b14 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/protobuf/duration.ts @@ -0,0 +1,188 @@ +/* eslint-disable */ +import * as Long from "long"; +import { util, configure, Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "google.protobuf"; + +/** + * A Duration represents a signed, fixed-length span of time represented + * as a count of seconds and fractions of seconds at nanosecond + * resolution. It is independent of any calendar and concepts like "day" + * or "month". It is related to Timestamp in that the difference between + * two Timestamp values is a Duration and it can be added or subtracted + * from a Timestamp. Range is approximately +-10,000 years. + * + * # Examples + * + * Example 1: Compute Duration from two Timestamps in pseudo code. + * + * Timestamp start = ...; + * Timestamp end = ...; + * Duration duration = ...; + * + * duration.seconds = end.seconds - start.seconds; + * duration.nanos = end.nanos - start.nanos; + * + * if (duration.seconds < 0 && duration.nanos > 0) { + * duration.seconds += 1; + * duration.nanos -= 1000000000; + * } else if (duration.seconds > 0 && duration.nanos < 0) { + * duration.seconds -= 1; + * duration.nanos += 1000000000; + * } + * + * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + * + * Timestamp start = ...; + * Duration duration = ...; + * Timestamp end = ...; + * + * end.seconds = start.seconds + duration.seconds; + * end.nanos = start.nanos + duration.nanos; + * + * if (end.nanos < 0) { + * end.seconds -= 1; + * end.nanos += 1000000000; + * } else if (end.nanos >= 1000000000) { + * end.seconds += 1; + * end.nanos -= 1000000000; + * } + * + * Example 3: Compute Duration from datetime.timedelta in Python. + * + * td = datetime.timedelta(days=3, minutes=10) + * duration = Duration() + * duration.FromTimedelta(td) + * + * # JSON Mapping + * + * In JSON format, the Duration type is encoded as a string rather than an + * object, where the string ends in the suffix "s" (indicating seconds) and + * is preceded by the number of seconds, with nanoseconds expressed as + * fractional seconds. For example, 3 seconds with 0 nanoseconds should be + * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + * microsecond should be expressed in JSON format as "3.000001s". + */ +export interface Duration { + /** + * Signed seconds of the span of time. Must be from -315,576,000,000 + * to +315,576,000,000 inclusive. Note: these bounds are computed from: + * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + */ + seconds: number; + /** + * Signed fractions of a second at nanosecond resolution of the span + * of time. Durations less than one second are represented with a 0 + * `seconds` field and a positive or negative `nanos` field. For durations + * of one second or more, a non-zero value for the `nanos` field must be + * of the same sign as the `seconds` field. Must be from -999,999,999 + * to +999,999,999 inclusive. + */ + nanos: number; +} + +const baseDuration: object = { seconds: 0, nanos: 0 }; + +export const Duration = { + encode(message: Duration, writer: Writer = Writer.create()): Writer { + if (message.seconds !== 0) { + writer.uint32(8).int64(message.seconds); + } + if (message.nanos !== 0) { + writer.uint32(16).int32(message.nanos); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): Duration { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseDuration } as Duration; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = longToNumber(reader.int64() as Long); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): Duration { + const message = { ...baseDuration } as Duration; + if (object.seconds !== undefined && object.seconds !== null) { + message.seconds = Number(object.seconds); + } else { + message.seconds = 0; + } + if (object.nanos !== undefined && object.nanos !== null) { + message.nanos = Number(object.nanos); + } else { + message.nanos = 0; + } + return message; + }, + + toJSON(message: Duration): unknown { + const obj: any = {}; + message.seconds !== undefined && (obj.seconds = message.seconds); + message.nanos !== undefined && (obj.nanos = message.nanos); + return obj; + }, + + fromPartial(object: DeepPartial): Duration { + const message = { ...baseDuration } as Duration; + if (object.seconds !== undefined && object.seconds !== null) { + message.seconds = object.seconds; + } else { + message.seconds = 0; + } + if (object.nanos !== undefined && object.nanos !== null) { + message.nanos = object.nanos; + } else { + message.nanos = 0; + } + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/protobuf/timestamp.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/protobuf/timestamp.ts new file mode 100644 index 00000000..11864afc --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/google/protobuf/timestamp.ts @@ -0,0 +1,219 @@ +/* eslint-disable */ +import * as Long from "long"; +import { util, configure, Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "google.protobuf"; + +/** + * A Timestamp represents a point in time independent of any time zone or local + * calendar, encoded as a count of seconds and fractions of seconds at + * nanosecond resolution. The count is relative to an epoch at UTC midnight on + * January 1, 1970, in the proleptic Gregorian calendar which extends the + * Gregorian calendar backwards to year one. + * + * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + * second table is needed for interpretation, using a [24-hour linear + * smear](https://developers.google.com/time/smear). + * + * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + * restricting to that range, we ensure that we can convert to and from [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + * + * # Examples + * + * Example 1: Compute Timestamp from POSIX `time()`. + * + * Timestamp timestamp; + * timestamp.set_seconds(time(NULL)); + * timestamp.set_nanos(0); + * + * Example 2: Compute Timestamp from POSIX `gettimeofday()`. + * + * struct timeval tv; + * gettimeofday(&tv, NULL); + * + * Timestamp timestamp; + * timestamp.set_seconds(tv.tv_sec); + * timestamp.set_nanos(tv.tv_usec * 1000); + * + * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + * + * FILETIME ft; + * GetSystemTimeAsFileTime(&ft); + * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + * + * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + * Timestamp timestamp; + * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + * + * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + * + * long millis = System.currentTimeMillis(); + * + * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + * .setNanos((int) ((millis % 1000) * 1000000)).build(); + * + * + * Example 5: Compute Timestamp from Java `Instant.now()`. + * + * Instant now = Instant.now(); + * + * Timestamp timestamp = + * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + * .setNanos(now.getNano()).build(); + * + * + * Example 6: Compute Timestamp from current time in Python. + * + * timestamp = Timestamp() + * timestamp.GetCurrentTime() + * + * # JSON Mapping + * + * In JSON format, the Timestamp type is encoded as a string in the + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + * where {year} is always expressed using four digits while {month}, {day}, + * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + * is required. A proto3 JSON serializer should always use UTC (as indicated by + * "Z") when printing the Timestamp type and a proto3 JSON parser should be + * able to accept both UTC and other timezones (as indicated by an offset). + * + * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + * 01:30 UTC on January 15, 2017. + * + * In JavaScript, one can convert a Date object to this format using the + * standard + * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + * method. In Python, a standard `datetime.datetime` object can be converted + * to this format using + * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + * the Joda Time's [`ISODateTimeFormat.dateTime()`]( + * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D + * ) to obtain a formatter capable of generating timestamps in this format. + */ +export interface Timestamp { + /** + * Represents seconds of UTC time since Unix epoch + * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + * 9999-12-31T23:59:59Z inclusive. + */ + seconds: number; + /** + * Non-negative fractions of a second at nanosecond resolution. Negative + * second values with fractions must still have non-negative nanos values + * that count forward in time. Must be from 0 to 999,999,999 + * inclusive. + */ + nanos: number; +} + +const baseTimestamp: object = { seconds: 0, nanos: 0 }; + +export const Timestamp = { + encode(message: Timestamp, writer: Writer = Writer.create()): Writer { + if (message.seconds !== 0) { + writer.uint32(8).int64(message.seconds); + } + if (message.nanos !== 0) { + writer.uint32(16).int32(message.nanos); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): Timestamp { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseTimestamp } as Timestamp; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = longToNumber(reader.int64() as Long); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): Timestamp { + const message = { ...baseTimestamp } as Timestamp; + if (object.seconds !== undefined && object.seconds !== null) { + message.seconds = Number(object.seconds); + } else { + message.seconds = 0; + } + if (object.nanos !== undefined && object.nanos !== null) { + message.nanos = Number(object.nanos); + } else { + message.nanos = 0; + } + return message; + }, + + toJSON(message: Timestamp): unknown { + const obj: any = {}; + message.seconds !== undefined && (obj.seconds = message.seconds); + message.nanos !== undefined && (obj.nanos = message.nanos); + return obj; + }, + + fromPartial(object: DeepPartial): Timestamp { + const message = { ...baseTimestamp } as Timestamp; + if (object.seconds !== undefined && object.seconds !== null) { + message.seconds = object.seconds; + } else { + message.seconds = 0; + } + if (object.nanos !== undefined && object.nanos !== null) { + message.nanos = object.nanos; + } else { + message.nanos = 0; + } + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/action_request.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/action_request.ts new file mode 100644 index 00000000..343e9198 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/action_request.ts @@ -0,0 +1,709 @@ +/* eslint-disable */ +import { + RequestStatus, + DataHash, + requestStatusFromJSON, + requestStatusToJSON, +} from "../nftoracle/request"; +import { Timestamp } from "../google/protobuf/timestamp"; +import * as Long from "long"; +import { util, configure, Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.nftoracle"; + +export interface ActionParam { + nft_schema_code: string; + token_id: string; + action: string; + ref_id: string; + expired_at: Date | undefined; +} + +export interface ActionRequest { + id: number; + nft_schema_code: string; + token_id: string; + action: string; + caller: string; + ref_id: string; + required_confirm: number; + status: RequestStatus; + current_confirm: number; + confirmers: { [key: string]: boolean }; + created_at: Date | undefined; + valid_until: Date | undefined; + data_hashes: DataHash[]; + expired_height: number; + execution_error_message: string; +} + +export interface ActionRequest_ConfirmersEntry { + key: string; + value: boolean; +} + +const baseActionParam: object = { + nft_schema_code: "", + token_id: "", + action: "", + ref_id: "", +}; + +export const ActionParam = { + encode(message: ActionParam, writer: Writer = Writer.create()): Writer { + if (message.nft_schema_code !== "") { + writer.uint32(10).string(message.nft_schema_code); + } + if (message.token_id !== "") { + writer.uint32(18).string(message.token_id); + } + if (message.action !== "") { + writer.uint32(26).string(message.action); + } + if (message.ref_id !== "") { + writer.uint32(34).string(message.ref_id); + } + if (message.expired_at !== undefined) { + Timestamp.encode( + toTimestamp(message.expired_at), + writer.uint32(42).fork() + ).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): ActionParam { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseActionParam } as ActionParam; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.nft_schema_code = reader.string(); + break; + case 2: + message.token_id = reader.string(); + break; + case 3: + message.action = reader.string(); + break; + case 4: + message.ref_id = reader.string(); + break; + case 5: + message.expired_at = fromTimestamp( + Timestamp.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ActionParam { + const message = { ...baseActionParam } as ActionParam; + if ( + object.nft_schema_code !== undefined && + object.nft_schema_code !== null + ) { + message.nft_schema_code = String(object.nft_schema_code); + } else { + message.nft_schema_code = ""; + } + if (object.token_id !== undefined && object.token_id !== null) { + message.token_id = String(object.token_id); + } else { + message.token_id = ""; + } + if (object.action !== undefined && object.action !== null) { + message.action = String(object.action); + } else { + message.action = ""; + } + if (object.ref_id !== undefined && object.ref_id !== null) { + message.ref_id = String(object.ref_id); + } else { + message.ref_id = ""; + } + if (object.expired_at !== undefined && object.expired_at !== null) { + message.expired_at = fromJsonTimestamp(object.expired_at); + } else { + message.expired_at = undefined; + } + return message; + }, + + toJSON(message: ActionParam): unknown { + const obj: any = {}; + message.nft_schema_code !== undefined && + (obj.nft_schema_code = message.nft_schema_code); + message.token_id !== undefined && (obj.token_id = message.token_id); + message.action !== undefined && (obj.action = message.action); + message.ref_id !== undefined && (obj.ref_id = message.ref_id); + message.expired_at !== undefined && + (obj.expired_at = + message.expired_at !== undefined + ? message.expired_at.toISOString() + : null); + return obj; + }, + + fromPartial(object: DeepPartial): ActionParam { + const message = { ...baseActionParam } as ActionParam; + if ( + object.nft_schema_code !== undefined && + object.nft_schema_code !== null + ) { + message.nft_schema_code = object.nft_schema_code; + } else { + message.nft_schema_code = ""; + } + if (object.token_id !== undefined && object.token_id !== null) { + message.token_id = object.token_id; + } else { + message.token_id = ""; + } + if (object.action !== undefined && object.action !== null) { + message.action = object.action; + } else { + message.action = ""; + } + if (object.ref_id !== undefined && object.ref_id !== null) { + message.ref_id = object.ref_id; + } else { + message.ref_id = ""; + } + if (object.expired_at !== undefined && object.expired_at !== null) { + message.expired_at = object.expired_at; + } else { + message.expired_at = undefined; + } + return message; + }, +}; + +const baseActionRequest: object = { + id: 0, + nft_schema_code: "", + token_id: "", + action: "", + caller: "", + ref_id: "", + required_confirm: 0, + status: 0, + current_confirm: 0, + expired_height: 0, + execution_error_message: "", +}; + +export const ActionRequest = { + encode(message: ActionRequest, writer: Writer = Writer.create()): Writer { + if (message.id !== 0) { + writer.uint32(8).uint64(message.id); + } + if (message.nft_schema_code !== "") { + writer.uint32(18).string(message.nft_schema_code); + } + if (message.token_id !== "") { + writer.uint32(26).string(message.token_id); + } + if (message.action !== "") { + writer.uint32(34).string(message.action); + } + if (message.caller !== "") { + writer.uint32(42).string(message.caller); + } + if (message.ref_id !== "") { + writer.uint32(50).string(message.ref_id); + } + if (message.required_confirm !== 0) { + writer.uint32(56).uint64(message.required_confirm); + } + if (message.status !== 0) { + writer.uint32(64).int32(message.status); + } + if (message.current_confirm !== 0) { + writer.uint32(72).uint64(message.current_confirm); + } + Object.entries(message.confirmers).forEach(([key, value]) => { + ActionRequest_ConfirmersEntry.encode( + { key: key as any, value }, + writer.uint32(82).fork() + ).ldelim(); + }); + if (message.created_at !== undefined) { + Timestamp.encode( + toTimestamp(message.created_at), + writer.uint32(90).fork() + ).ldelim(); + } + if (message.valid_until !== undefined) { + Timestamp.encode( + toTimestamp(message.valid_until), + writer.uint32(98).fork() + ).ldelim(); + } + for (const v of message.data_hashes) { + DataHash.encode(v!, writer.uint32(106).fork()).ldelim(); + } + if (message.expired_height !== 0) { + writer.uint32(112).int64(message.expired_height); + } + if (message.execution_error_message !== "") { + writer.uint32(122).string(message.execution_error_message); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): ActionRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseActionRequest } as ActionRequest; + message.confirmers = {}; + message.data_hashes = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = longToNumber(reader.uint64() as Long); + break; + case 2: + message.nft_schema_code = reader.string(); + break; + case 3: + message.token_id = reader.string(); + break; + case 4: + message.action = reader.string(); + break; + case 5: + message.caller = reader.string(); + break; + case 6: + message.ref_id = reader.string(); + break; + case 7: + message.required_confirm = longToNumber(reader.uint64() as Long); + break; + case 8: + message.status = reader.int32() as any; + break; + case 9: + message.current_confirm = longToNumber(reader.uint64() as Long); + break; + case 10: + const entry10 = ActionRequest_ConfirmersEntry.decode( + reader, + reader.uint32() + ); + if (entry10.value !== undefined) { + message.confirmers[entry10.key] = entry10.value; + } + break; + case 11: + message.created_at = fromTimestamp( + Timestamp.decode(reader, reader.uint32()) + ); + break; + case 12: + message.valid_until = fromTimestamp( + Timestamp.decode(reader, reader.uint32()) + ); + break; + case 13: + message.data_hashes.push(DataHash.decode(reader, reader.uint32())); + break; + case 14: + message.expired_height = longToNumber(reader.int64() as Long); + break; + case 15: + message.execution_error_message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ActionRequest { + const message = { ...baseActionRequest } as ActionRequest; + message.confirmers = {}; + message.data_hashes = []; + if (object.id !== undefined && object.id !== null) { + message.id = Number(object.id); + } else { + message.id = 0; + } + if ( + object.nft_schema_code !== undefined && + object.nft_schema_code !== null + ) { + message.nft_schema_code = String(object.nft_schema_code); + } else { + message.nft_schema_code = ""; + } + if (object.token_id !== undefined && object.token_id !== null) { + message.token_id = String(object.token_id); + } else { + message.token_id = ""; + } + if (object.action !== undefined && object.action !== null) { + message.action = String(object.action); + } else { + message.action = ""; + } + if (object.caller !== undefined && object.caller !== null) { + message.caller = String(object.caller); + } else { + message.caller = ""; + } + if (object.ref_id !== undefined && object.ref_id !== null) { + message.ref_id = String(object.ref_id); + } else { + message.ref_id = ""; + } + if ( + object.required_confirm !== undefined && + object.required_confirm !== null + ) { + message.required_confirm = Number(object.required_confirm); + } else { + message.required_confirm = 0; + } + if (object.status !== undefined && object.status !== null) { + message.status = requestStatusFromJSON(object.status); + } else { + message.status = 0; + } + if ( + object.current_confirm !== undefined && + object.current_confirm !== null + ) { + message.current_confirm = Number(object.current_confirm); + } else { + message.current_confirm = 0; + } + if (object.confirmers !== undefined && object.confirmers !== null) { + Object.entries(object.confirmers).forEach(([key, value]) => { + message.confirmers[key] = Boolean(value); + }); + } + if (object.created_at !== undefined && object.created_at !== null) { + message.created_at = fromJsonTimestamp(object.created_at); + } else { + message.created_at = undefined; + } + if (object.valid_until !== undefined && object.valid_until !== null) { + message.valid_until = fromJsonTimestamp(object.valid_until); + } else { + message.valid_until = undefined; + } + if (object.data_hashes !== undefined && object.data_hashes !== null) { + for (const e of object.data_hashes) { + message.data_hashes.push(DataHash.fromJSON(e)); + } + } + if (object.expired_height !== undefined && object.expired_height !== null) { + message.expired_height = Number(object.expired_height); + } else { + message.expired_height = 0; + } + if ( + object.execution_error_message !== undefined && + object.execution_error_message !== null + ) { + message.execution_error_message = String(object.execution_error_message); + } else { + message.execution_error_message = ""; + } + return message; + }, + + toJSON(message: ActionRequest): unknown { + const obj: any = {}; + message.id !== undefined && (obj.id = message.id); + message.nft_schema_code !== undefined && + (obj.nft_schema_code = message.nft_schema_code); + message.token_id !== undefined && (obj.token_id = message.token_id); + message.action !== undefined && (obj.action = message.action); + message.caller !== undefined && (obj.caller = message.caller); + message.ref_id !== undefined && (obj.ref_id = message.ref_id); + message.required_confirm !== undefined && + (obj.required_confirm = message.required_confirm); + message.status !== undefined && + (obj.status = requestStatusToJSON(message.status)); + message.current_confirm !== undefined && + (obj.current_confirm = message.current_confirm); + obj.confirmers = {}; + if (message.confirmers) { + Object.entries(message.confirmers).forEach(([k, v]) => { + obj.confirmers[k] = v; + }); + } + message.created_at !== undefined && + (obj.created_at = + message.created_at !== undefined + ? message.created_at.toISOString() + : null); + message.valid_until !== undefined && + (obj.valid_until = + message.valid_until !== undefined + ? message.valid_until.toISOString() + : null); + if (message.data_hashes) { + obj.data_hashes = message.data_hashes.map((e) => + e ? DataHash.toJSON(e) : undefined + ); + } else { + obj.data_hashes = []; + } + message.expired_height !== undefined && + (obj.expired_height = message.expired_height); + message.execution_error_message !== undefined && + (obj.execution_error_message = message.execution_error_message); + return obj; + }, + + fromPartial(object: DeepPartial): ActionRequest { + const message = { ...baseActionRequest } as ActionRequest; + message.confirmers = {}; + message.data_hashes = []; + if (object.id !== undefined && object.id !== null) { + message.id = object.id; + } else { + message.id = 0; + } + if ( + object.nft_schema_code !== undefined && + object.nft_schema_code !== null + ) { + message.nft_schema_code = object.nft_schema_code; + } else { + message.nft_schema_code = ""; + } + if (object.token_id !== undefined && object.token_id !== null) { + message.token_id = object.token_id; + } else { + message.token_id = ""; + } + if (object.action !== undefined && object.action !== null) { + message.action = object.action; + } else { + message.action = ""; + } + if (object.caller !== undefined && object.caller !== null) { + message.caller = object.caller; + } else { + message.caller = ""; + } + if (object.ref_id !== undefined && object.ref_id !== null) { + message.ref_id = object.ref_id; + } else { + message.ref_id = ""; + } + if ( + object.required_confirm !== undefined && + object.required_confirm !== null + ) { + message.required_confirm = object.required_confirm; + } else { + message.required_confirm = 0; + } + if (object.status !== undefined && object.status !== null) { + message.status = object.status; + } else { + message.status = 0; + } + if ( + object.current_confirm !== undefined && + object.current_confirm !== null + ) { + message.current_confirm = object.current_confirm; + } else { + message.current_confirm = 0; + } + if (object.confirmers !== undefined && object.confirmers !== null) { + Object.entries(object.confirmers).forEach(([key, value]) => { + if (value !== undefined) { + message.confirmers[key] = Boolean(value); + } + }); + } + if (object.created_at !== undefined && object.created_at !== null) { + message.created_at = object.created_at; + } else { + message.created_at = undefined; + } + if (object.valid_until !== undefined && object.valid_until !== null) { + message.valid_until = object.valid_until; + } else { + message.valid_until = undefined; + } + if (object.data_hashes !== undefined && object.data_hashes !== null) { + for (const e of object.data_hashes) { + message.data_hashes.push(DataHash.fromPartial(e)); + } + } + if (object.expired_height !== undefined && object.expired_height !== null) { + message.expired_height = object.expired_height; + } else { + message.expired_height = 0; + } + if ( + object.execution_error_message !== undefined && + object.execution_error_message !== null + ) { + message.execution_error_message = object.execution_error_message; + } else { + message.execution_error_message = ""; + } + return message; + }, +}; + +const baseActionRequest_ConfirmersEntry: object = { key: "", value: false }; + +export const ActionRequest_ConfirmersEntry = { + encode( + message: ActionRequest_ConfirmersEntry, + writer: Writer = Writer.create() + ): Writer { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value === true) { + writer.uint32(16).bool(message.value); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): ActionRequest_ConfirmersEntry { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseActionRequest_ConfirmersEntry, + } as ActionRequest_ConfirmersEntry; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.value = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ActionRequest_ConfirmersEntry { + const message = { + ...baseActionRequest_ConfirmersEntry, + } as ActionRequest_ConfirmersEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Boolean(object.value); + } else { + message.value = false; + } + return message; + }, + + toJSON(message: ActionRequest_ConfirmersEntry): unknown { + const obj: any = {}; + message.key !== undefined && (obj.key = message.key); + message.value !== undefined && (obj.value = message.value); + return obj; + }, + + fromPartial( + object: DeepPartial + ): ActionRequest_ConfirmersEntry { + const message = { + ...baseActionRequest_ConfirmersEntry, + } as ActionRequest_ConfirmersEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = false; + } + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function toTimestamp(date: Date): Timestamp { + const seconds = date.getTime() / 1_000; + const nanos = (date.getTime() % 1_000) * 1_000_000; + return { seconds, nanos }; +} + +function fromTimestamp(t: Timestamp): Date { + let millis = t.seconds * 1_000; + millis += t.nanos / 1_000_000; + return new Date(millis); +} + +function fromJsonTimestamp(o: any): Date { + if (o instanceof Date) { + return o; + } else if (typeof o === "string") { + return new Date(o); + } else { + return fromTimestamp(Timestamp.fromJSON(o)); + } +} + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/action_signature.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/action_signature.ts new file mode 100644 index 00000000..84fa2a63 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/action_signature.ts @@ -0,0 +1,92 @@ +/* eslint-disable */ +import { Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.nftoracle"; + +export interface ActionSignature { + signature: string; + message: string; +} + +const baseActionSignature: object = { signature: "", message: "" }; + +export const ActionSignature = { + encode(message: ActionSignature, writer: Writer = Writer.create()): Writer { + if (message.signature !== "") { + writer.uint32(10).string(message.signature); + } + if (message.message !== "") { + writer.uint32(18).string(message.message); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): ActionSignature { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseActionSignature } as ActionSignature; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.signature = reader.string(); + break; + case 2: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ActionSignature { + const message = { ...baseActionSignature } as ActionSignature; + if (object.signature !== undefined && object.signature !== null) { + message.signature = String(object.signature); + } else { + message.signature = ""; + } + if (object.message !== undefined && object.message !== null) { + message.message = String(object.message); + } else { + message.message = ""; + } + return message; + }, + + toJSON(message: ActionSignature): unknown { + const obj: any = {}; + message.signature !== undefined && (obj.signature = message.signature); + message.message !== undefined && (obj.message = message.message); + return obj; + }, + + fromPartial(object: DeepPartial): ActionSignature { + const message = { ...baseActionSignature } as ActionSignature; + if (object.signature !== undefined && object.signature !== null) { + message.signature = object.signature; + } else { + message.signature = ""; + } + if (object.message !== undefined && object.message !== null) { + message.message = object.message; + } else { + message.message = ""; + } + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/collection_owner_request.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/collection_owner_request.ts new file mode 100644 index 00000000..fa581fac --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/collection_owner_request.ts @@ -0,0 +1,150 @@ +/* eslint-disable */ +import * as Long from "long"; +import { util, configure, Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.nftoracle"; + +export interface CollectionOwnerRequest { + id: number; + nftSchemaCode: string; + base64OwnerSignature: string; +} + +const baseCollectionOwnerRequest: object = { + id: 0, + nftSchemaCode: "", + base64OwnerSignature: "", +}; + +export const CollectionOwnerRequest = { + encode( + message: CollectionOwnerRequest, + writer: Writer = Writer.create() + ): Writer { + if (message.id !== 0) { + writer.uint32(8).uint64(message.id); + } + if (message.nftSchemaCode !== "") { + writer.uint32(18).string(message.nftSchemaCode); + } + if (message.base64OwnerSignature !== "") { + writer.uint32(26).string(message.base64OwnerSignature); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): CollectionOwnerRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseCollectionOwnerRequest } as CollectionOwnerRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = longToNumber(reader.uint64() as Long); + break; + case 2: + message.nftSchemaCode = reader.string(); + break; + case 3: + message.base64OwnerSignature = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): CollectionOwnerRequest { + const message = { ...baseCollectionOwnerRequest } as CollectionOwnerRequest; + if (object.id !== undefined && object.id !== null) { + message.id = Number(object.id); + } else { + message.id = 0; + } + if (object.nftSchemaCode !== undefined && object.nftSchemaCode !== null) { + message.nftSchemaCode = String(object.nftSchemaCode); + } else { + message.nftSchemaCode = ""; + } + if ( + object.base64OwnerSignature !== undefined && + object.base64OwnerSignature !== null + ) { + message.base64OwnerSignature = String(object.base64OwnerSignature); + } else { + message.base64OwnerSignature = ""; + } + return message; + }, + + toJSON(message: CollectionOwnerRequest): unknown { + const obj: any = {}; + message.id !== undefined && (obj.id = message.id); + message.nftSchemaCode !== undefined && + (obj.nftSchemaCode = message.nftSchemaCode); + message.base64OwnerSignature !== undefined && + (obj.base64OwnerSignature = message.base64OwnerSignature); + return obj; + }, + + fromPartial( + object: DeepPartial + ): CollectionOwnerRequest { + const message = { ...baseCollectionOwnerRequest } as CollectionOwnerRequest; + if (object.id !== undefined && object.id !== null) { + message.id = object.id; + } else { + message.id = 0; + } + if (object.nftSchemaCode !== undefined && object.nftSchemaCode !== null) { + message.nftSchemaCode = object.nftSchemaCode; + } else { + message.nftSchemaCode = ""; + } + if ( + object.base64OwnerSignature !== undefined && + object.base64OwnerSignature !== null + ) { + message.base64OwnerSignature = object.base64OwnerSignature; + } else { + message.base64OwnerSignature = ""; + } + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/genesis.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/genesis.ts new file mode 100644 index 00000000..b09a84fb --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/genesis.ts @@ -0,0 +1,296 @@ +/* eslint-disable */ +import * as Long from "long"; +import { util, configure, Writer, Reader } from "protobufjs/minimal"; +import { Params } from "../nftoracle/params"; +import { MintRequest } from "../nftoracle/mint_request"; +import { ActionRequest } from "../nftoracle/action_request"; +import { CollectionOwnerRequest } from "../nftoracle/collection_owner_request"; + +export const protobufPackage = "thesixnetwork.sixnft.nftoracle"; + +/** GenesisState defines the nftoracle module's genesis state. */ +export interface GenesisState { + params: Params | undefined; + mintRequestList: MintRequest[]; + mintRequestCount: number; + actionRequestList: ActionRequest[]; + actionRequestCount: number; + collectionOwnerRequestList: CollectionOwnerRequest[]; + /** this line is used by starport scaffolding # genesis/proto/state */ + collectionOwnerRequestCount: number; +} + +const baseGenesisState: object = { + mintRequestCount: 0, + actionRequestCount: 0, + collectionOwnerRequestCount: 0, +}; + +export const GenesisState = { + encode(message: GenesisState, writer: Writer = Writer.create()): Writer { + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.mintRequestList) { + MintRequest.encode(v!, writer.uint32(18).fork()).ldelim(); + } + if (message.mintRequestCount !== 0) { + writer.uint32(24).uint64(message.mintRequestCount); + } + for (const v of message.actionRequestList) { + ActionRequest.encode(v!, writer.uint32(34).fork()).ldelim(); + } + if (message.actionRequestCount !== 0) { + writer.uint32(40).uint64(message.actionRequestCount); + } + for (const v of message.collectionOwnerRequestList) { + CollectionOwnerRequest.encode(v!, writer.uint32(50).fork()).ldelim(); + } + if (message.collectionOwnerRequestCount !== 0) { + writer.uint32(56).uint64(message.collectionOwnerRequestCount); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): GenesisState { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseGenesisState } as GenesisState; + message.mintRequestList = []; + message.actionRequestList = []; + message.collectionOwnerRequestList = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = Params.decode(reader, reader.uint32()); + break; + case 2: + message.mintRequestList.push( + MintRequest.decode(reader, reader.uint32()) + ); + break; + case 3: + message.mintRequestCount = longToNumber(reader.uint64() as Long); + break; + case 4: + message.actionRequestList.push( + ActionRequest.decode(reader, reader.uint32()) + ); + break; + case 5: + message.actionRequestCount = longToNumber(reader.uint64() as Long); + break; + case 6: + message.collectionOwnerRequestList.push( + CollectionOwnerRequest.decode(reader, reader.uint32()) + ); + break; + case 7: + message.collectionOwnerRequestCount = longToNumber( + reader.uint64() as Long + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): GenesisState { + const message = { ...baseGenesisState } as GenesisState; + message.mintRequestList = []; + message.actionRequestList = []; + message.collectionOwnerRequestList = []; + if (object.params !== undefined && object.params !== null) { + message.params = Params.fromJSON(object.params); + } else { + message.params = undefined; + } + if ( + object.mintRequestList !== undefined && + object.mintRequestList !== null + ) { + for (const e of object.mintRequestList) { + message.mintRequestList.push(MintRequest.fromJSON(e)); + } + } + if ( + object.mintRequestCount !== undefined && + object.mintRequestCount !== null + ) { + message.mintRequestCount = Number(object.mintRequestCount); + } else { + message.mintRequestCount = 0; + } + if ( + object.actionRequestList !== undefined && + object.actionRequestList !== null + ) { + for (const e of object.actionRequestList) { + message.actionRequestList.push(ActionRequest.fromJSON(e)); + } + } + if ( + object.actionRequestCount !== undefined && + object.actionRequestCount !== null + ) { + message.actionRequestCount = Number(object.actionRequestCount); + } else { + message.actionRequestCount = 0; + } + if ( + object.collectionOwnerRequestList !== undefined && + object.collectionOwnerRequestList !== null + ) { + for (const e of object.collectionOwnerRequestList) { + message.collectionOwnerRequestList.push( + CollectionOwnerRequest.fromJSON(e) + ); + } + } + if ( + object.collectionOwnerRequestCount !== undefined && + object.collectionOwnerRequestCount !== null + ) { + message.collectionOwnerRequestCount = Number( + object.collectionOwnerRequestCount + ); + } else { + message.collectionOwnerRequestCount = 0; + } + return message; + }, + + toJSON(message: GenesisState): unknown { + const obj: any = {}; + message.params !== undefined && + (obj.params = message.params ? Params.toJSON(message.params) : undefined); + if (message.mintRequestList) { + obj.mintRequestList = message.mintRequestList.map((e) => + e ? MintRequest.toJSON(e) : undefined + ); + } else { + obj.mintRequestList = []; + } + message.mintRequestCount !== undefined && + (obj.mintRequestCount = message.mintRequestCount); + if (message.actionRequestList) { + obj.actionRequestList = message.actionRequestList.map((e) => + e ? ActionRequest.toJSON(e) : undefined + ); + } else { + obj.actionRequestList = []; + } + message.actionRequestCount !== undefined && + (obj.actionRequestCount = message.actionRequestCount); + if (message.collectionOwnerRequestList) { + obj.collectionOwnerRequestList = message.collectionOwnerRequestList.map( + (e) => (e ? CollectionOwnerRequest.toJSON(e) : undefined) + ); + } else { + obj.collectionOwnerRequestList = []; + } + message.collectionOwnerRequestCount !== undefined && + (obj.collectionOwnerRequestCount = message.collectionOwnerRequestCount); + return obj; + }, + + fromPartial(object: DeepPartial): GenesisState { + const message = { ...baseGenesisState } as GenesisState; + message.mintRequestList = []; + message.actionRequestList = []; + message.collectionOwnerRequestList = []; + if (object.params !== undefined && object.params !== null) { + message.params = Params.fromPartial(object.params); + } else { + message.params = undefined; + } + if ( + object.mintRequestList !== undefined && + object.mintRequestList !== null + ) { + for (const e of object.mintRequestList) { + message.mintRequestList.push(MintRequest.fromPartial(e)); + } + } + if ( + object.mintRequestCount !== undefined && + object.mintRequestCount !== null + ) { + message.mintRequestCount = object.mintRequestCount; + } else { + message.mintRequestCount = 0; + } + if ( + object.actionRequestList !== undefined && + object.actionRequestList !== null + ) { + for (const e of object.actionRequestList) { + message.actionRequestList.push(ActionRequest.fromPartial(e)); + } + } + if ( + object.actionRequestCount !== undefined && + object.actionRequestCount !== null + ) { + message.actionRequestCount = object.actionRequestCount; + } else { + message.actionRequestCount = 0; + } + if ( + object.collectionOwnerRequestList !== undefined && + object.collectionOwnerRequestList !== null + ) { + for (const e of object.collectionOwnerRequestList) { + message.collectionOwnerRequestList.push( + CollectionOwnerRequest.fromPartial(e) + ); + } + } + if ( + object.collectionOwnerRequestCount !== undefined && + object.collectionOwnerRequestCount !== null + ) { + message.collectionOwnerRequestCount = object.collectionOwnerRequestCount; + } else { + message.collectionOwnerRequestCount = 0; + } + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/mint_request.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/mint_request.ts new file mode 100644 index 00000000..bb0cba73 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/mint_request.ts @@ -0,0 +1,475 @@ +/* eslint-disable */ +import { + RequestStatus, + DataHash, + requestStatusFromJSON, + requestStatusToJSON, +} from "../nftoracle/request"; +import { Timestamp } from "../google/protobuf/timestamp"; +import * as Long from "long"; +import { util, configure, Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.nftoracle"; + +export interface MintRequest { + id: number; + nft_schema_code: string; + token_id: string; + required_confirm: number; + status: RequestStatus; + current_confirm: number; + confirmers: { [key: string]: boolean }; + /** NftOriginData nft_origin_data = 8; */ + created_at: Date | undefined; + valid_until: Date | undefined; + data_hashes: DataHash[]; + expired_height: number; +} + +export interface MintRequest_ConfirmersEntry { + key: string; + value: boolean; +} + +const baseMintRequest: object = { + id: 0, + nft_schema_code: "", + token_id: "", + required_confirm: 0, + status: 0, + current_confirm: 0, + expired_height: 0, +}; + +export const MintRequest = { + encode(message: MintRequest, writer: Writer = Writer.create()): Writer { + if (message.id !== 0) { + writer.uint32(8).uint64(message.id); + } + if (message.nft_schema_code !== "") { + writer.uint32(18).string(message.nft_schema_code); + } + if (message.token_id !== "") { + writer.uint32(26).string(message.token_id); + } + if (message.required_confirm !== 0) { + writer.uint32(32).uint64(message.required_confirm); + } + if (message.status !== 0) { + writer.uint32(40).int32(message.status); + } + if (message.current_confirm !== 0) { + writer.uint32(48).uint64(message.current_confirm); + } + Object.entries(message.confirmers).forEach(([key, value]) => { + MintRequest_ConfirmersEntry.encode( + { key: key as any, value }, + writer.uint32(58).fork() + ).ldelim(); + }); + if (message.created_at !== undefined) { + Timestamp.encode( + toTimestamp(message.created_at), + writer.uint32(66).fork() + ).ldelim(); + } + if (message.valid_until !== undefined) { + Timestamp.encode( + toTimestamp(message.valid_until), + writer.uint32(74).fork() + ).ldelim(); + } + for (const v of message.data_hashes) { + DataHash.encode(v!, writer.uint32(82).fork()).ldelim(); + } + if (message.expired_height !== 0) { + writer.uint32(88).int64(message.expired_height); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MintRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMintRequest } as MintRequest; + message.confirmers = {}; + message.data_hashes = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = longToNumber(reader.uint64() as Long); + break; + case 2: + message.nft_schema_code = reader.string(); + break; + case 3: + message.token_id = reader.string(); + break; + case 4: + message.required_confirm = longToNumber(reader.uint64() as Long); + break; + case 5: + message.status = reader.int32() as any; + break; + case 6: + message.current_confirm = longToNumber(reader.uint64() as Long); + break; + case 7: + const entry7 = MintRequest_ConfirmersEntry.decode( + reader, + reader.uint32() + ); + if (entry7.value !== undefined) { + message.confirmers[entry7.key] = entry7.value; + } + break; + case 8: + message.created_at = fromTimestamp( + Timestamp.decode(reader, reader.uint32()) + ); + break; + case 9: + message.valid_until = fromTimestamp( + Timestamp.decode(reader, reader.uint32()) + ); + break; + case 10: + message.data_hashes.push(DataHash.decode(reader, reader.uint32())); + break; + case 11: + message.expired_height = longToNumber(reader.int64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MintRequest { + const message = { ...baseMintRequest } as MintRequest; + message.confirmers = {}; + message.data_hashes = []; + if (object.id !== undefined && object.id !== null) { + message.id = Number(object.id); + } else { + message.id = 0; + } + if ( + object.nft_schema_code !== undefined && + object.nft_schema_code !== null + ) { + message.nft_schema_code = String(object.nft_schema_code); + } else { + message.nft_schema_code = ""; + } + if (object.token_id !== undefined && object.token_id !== null) { + message.token_id = String(object.token_id); + } else { + message.token_id = ""; + } + if ( + object.required_confirm !== undefined && + object.required_confirm !== null + ) { + message.required_confirm = Number(object.required_confirm); + } else { + message.required_confirm = 0; + } + if (object.status !== undefined && object.status !== null) { + message.status = requestStatusFromJSON(object.status); + } else { + message.status = 0; + } + if ( + object.current_confirm !== undefined && + object.current_confirm !== null + ) { + message.current_confirm = Number(object.current_confirm); + } else { + message.current_confirm = 0; + } + if (object.confirmers !== undefined && object.confirmers !== null) { + Object.entries(object.confirmers).forEach(([key, value]) => { + message.confirmers[key] = Boolean(value); + }); + } + if (object.created_at !== undefined && object.created_at !== null) { + message.created_at = fromJsonTimestamp(object.created_at); + } else { + message.created_at = undefined; + } + if (object.valid_until !== undefined && object.valid_until !== null) { + message.valid_until = fromJsonTimestamp(object.valid_until); + } else { + message.valid_until = undefined; + } + if (object.data_hashes !== undefined && object.data_hashes !== null) { + for (const e of object.data_hashes) { + message.data_hashes.push(DataHash.fromJSON(e)); + } + } + if (object.expired_height !== undefined && object.expired_height !== null) { + message.expired_height = Number(object.expired_height); + } else { + message.expired_height = 0; + } + return message; + }, + + toJSON(message: MintRequest): unknown { + const obj: any = {}; + message.id !== undefined && (obj.id = message.id); + message.nft_schema_code !== undefined && + (obj.nft_schema_code = message.nft_schema_code); + message.token_id !== undefined && (obj.token_id = message.token_id); + message.required_confirm !== undefined && + (obj.required_confirm = message.required_confirm); + message.status !== undefined && + (obj.status = requestStatusToJSON(message.status)); + message.current_confirm !== undefined && + (obj.current_confirm = message.current_confirm); + obj.confirmers = {}; + if (message.confirmers) { + Object.entries(message.confirmers).forEach(([k, v]) => { + obj.confirmers[k] = v; + }); + } + message.created_at !== undefined && + (obj.created_at = + message.created_at !== undefined + ? message.created_at.toISOString() + : null); + message.valid_until !== undefined && + (obj.valid_until = + message.valid_until !== undefined + ? message.valid_until.toISOString() + : null); + if (message.data_hashes) { + obj.data_hashes = message.data_hashes.map((e) => + e ? DataHash.toJSON(e) : undefined + ); + } else { + obj.data_hashes = []; + } + message.expired_height !== undefined && + (obj.expired_height = message.expired_height); + return obj; + }, + + fromPartial(object: DeepPartial): MintRequest { + const message = { ...baseMintRequest } as MintRequest; + message.confirmers = {}; + message.data_hashes = []; + if (object.id !== undefined && object.id !== null) { + message.id = object.id; + } else { + message.id = 0; + } + if ( + object.nft_schema_code !== undefined && + object.nft_schema_code !== null + ) { + message.nft_schema_code = object.nft_schema_code; + } else { + message.nft_schema_code = ""; + } + if (object.token_id !== undefined && object.token_id !== null) { + message.token_id = object.token_id; + } else { + message.token_id = ""; + } + if ( + object.required_confirm !== undefined && + object.required_confirm !== null + ) { + message.required_confirm = object.required_confirm; + } else { + message.required_confirm = 0; + } + if (object.status !== undefined && object.status !== null) { + message.status = object.status; + } else { + message.status = 0; + } + if ( + object.current_confirm !== undefined && + object.current_confirm !== null + ) { + message.current_confirm = object.current_confirm; + } else { + message.current_confirm = 0; + } + if (object.confirmers !== undefined && object.confirmers !== null) { + Object.entries(object.confirmers).forEach(([key, value]) => { + if (value !== undefined) { + message.confirmers[key] = Boolean(value); + } + }); + } + if (object.created_at !== undefined && object.created_at !== null) { + message.created_at = object.created_at; + } else { + message.created_at = undefined; + } + if (object.valid_until !== undefined && object.valid_until !== null) { + message.valid_until = object.valid_until; + } else { + message.valid_until = undefined; + } + if (object.data_hashes !== undefined && object.data_hashes !== null) { + for (const e of object.data_hashes) { + message.data_hashes.push(DataHash.fromPartial(e)); + } + } + if (object.expired_height !== undefined && object.expired_height !== null) { + message.expired_height = object.expired_height; + } else { + message.expired_height = 0; + } + return message; + }, +}; + +const baseMintRequest_ConfirmersEntry: object = { key: "", value: false }; + +export const MintRequest_ConfirmersEntry = { + encode( + message: MintRequest_ConfirmersEntry, + writer: Writer = Writer.create() + ): Writer { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value === true) { + writer.uint32(16).bool(message.value); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): MintRequest_ConfirmersEntry { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseMintRequest_ConfirmersEntry, + } as MintRequest_ConfirmersEntry; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.value = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MintRequest_ConfirmersEntry { + const message = { + ...baseMintRequest_ConfirmersEntry, + } as MintRequest_ConfirmersEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Boolean(object.value); + } else { + message.value = false; + } + return message; + }, + + toJSON(message: MintRequest_ConfirmersEntry): unknown { + const obj: any = {}; + message.key !== undefined && (obj.key = message.key); + message.value !== undefined && (obj.value = message.value); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MintRequest_ConfirmersEntry { + const message = { + ...baseMintRequest_ConfirmersEntry, + } as MintRequest_ConfirmersEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = false; + } + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function toTimestamp(date: Date): Timestamp { + const seconds = date.getTime() / 1_000; + const nanos = (date.getTime() % 1_000) * 1_000_000; + return { seconds, nanos }; +} + +function fromTimestamp(t: Timestamp): Date { + let millis = t.seconds * 1_000; + millis += t.nanos / 1_000_000; + return new Date(millis); +} + +function fromJsonTimestamp(o: any): Date { + if (o instanceof Date) { + return o; + } else if (typeof o === "string") { + return new Date(o); + } else { + return fromTimestamp(Timestamp.fromJSON(o)); + } +} + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/opensea.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/opensea.ts new file mode 100644 index 00000000..542f9adf --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/opensea.ts @@ -0,0 +1,134 @@ +/* eslint-disable */ +import { Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.nftoracle"; + +export interface Trait { + trait_type: string; + value: string; + display_type: string; + max_value: string; +} + +const baseTrait: object = { + trait_type: "", + value: "", + display_type: "", + max_value: "", +}; + +export const Trait = { + encode(message: Trait, writer: Writer = Writer.create()): Writer { + if (message.trait_type !== "") { + writer.uint32(10).string(message.trait_type); + } + if (message.value !== "") { + writer.uint32(18).string(message.value); + } + if (message.display_type !== "") { + writer.uint32(26).string(message.display_type); + } + if (message.max_value !== "") { + writer.uint32(34).string(message.max_value); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): Trait { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseTrait } as Trait; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.trait_type = reader.string(); + break; + case 2: + message.value = reader.string(); + break; + case 3: + message.display_type = reader.string(); + break; + case 4: + message.max_value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): Trait { + const message = { ...baseTrait } as Trait; + if (object.trait_type !== undefined && object.trait_type !== null) { + message.trait_type = String(object.trait_type); + } else { + message.trait_type = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = String(object.value); + } else { + message.value = ""; + } + if (object.display_type !== undefined && object.display_type !== null) { + message.display_type = String(object.display_type); + } else { + message.display_type = ""; + } + if (object.max_value !== undefined && object.max_value !== null) { + message.max_value = String(object.max_value); + } else { + message.max_value = ""; + } + return message; + }, + + toJSON(message: Trait): unknown { + const obj: any = {}; + message.trait_type !== undefined && (obj.trait_type = message.trait_type); + message.value !== undefined && (obj.value = message.value); + message.display_type !== undefined && + (obj.display_type = message.display_type); + message.max_value !== undefined && (obj.max_value = message.max_value); + return obj; + }, + + fromPartial(object: DeepPartial): Trait { + const message = { ...baseTrait } as Trait; + if (object.trait_type !== undefined && object.trait_type !== null) { + message.trait_type = object.trait_type; + } else { + message.trait_type = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = ""; + } + if (object.display_type !== undefined && object.display_type !== null) { + message.display_type = object.display_type; + } else { + message.display_type = ""; + } + if (object.max_value !== undefined && object.max_value !== null) { + message.max_value = object.max_value; + } else { + message.max_value = ""; + } + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/params.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/params.ts new file mode 100644 index 00000000..f1da6d52 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/params.ts @@ -0,0 +1,132 @@ +/* eslint-disable */ +import { Duration } from "../google/protobuf/duration"; +import { Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.nftoracle"; + +/** Params defines the parameters for the module. */ +export interface Params { + mint_request_active_duration: Duration | undefined; + action_request_active_duration: Duration | undefined; +} + +const baseParams: object = {}; + +export const Params = { + encode(message: Params, writer: Writer = Writer.create()): Writer { + if (message.mint_request_active_duration !== undefined) { + Duration.encode( + message.mint_request_active_duration, + writer.uint32(10).fork() + ).ldelim(); + } + if (message.action_request_active_duration !== undefined) { + Duration.encode( + message.action_request_active_duration, + writer.uint32(18).fork() + ).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): Params { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseParams } as Params; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mint_request_active_duration = Duration.decode( + reader, + reader.uint32() + ); + break; + case 2: + message.action_request_active_duration = Duration.decode( + reader, + reader.uint32() + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): Params { + const message = { ...baseParams } as Params; + if ( + object.mint_request_active_duration !== undefined && + object.mint_request_active_duration !== null + ) { + message.mint_request_active_duration = Duration.fromJSON( + object.mint_request_active_duration + ); + } else { + message.mint_request_active_duration = undefined; + } + if ( + object.action_request_active_duration !== undefined && + object.action_request_active_duration !== null + ) { + message.action_request_active_duration = Duration.fromJSON( + object.action_request_active_duration + ); + } else { + message.action_request_active_duration = undefined; + } + return message; + }, + + toJSON(message: Params): unknown { + const obj: any = {}; + message.mint_request_active_duration !== undefined && + (obj.mint_request_active_duration = message.mint_request_active_duration + ? Duration.toJSON(message.mint_request_active_duration) + : undefined); + message.action_request_active_duration !== undefined && + (obj.action_request_active_duration = message.action_request_active_duration + ? Duration.toJSON(message.action_request_active_duration) + : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): Params { + const message = { ...baseParams } as Params; + if ( + object.mint_request_active_duration !== undefined && + object.mint_request_active_duration !== null + ) { + message.mint_request_active_duration = Duration.fromPartial( + object.mint_request_active_duration + ); + } else { + message.mint_request_active_duration = undefined; + } + if ( + object.action_request_active_duration !== undefined && + object.action_request_active_duration !== null + ) { + message.action_request_active_duration = Duration.fromPartial( + object.action_request_active_duration + ); + } else { + message.action_request_active_duration = undefined; + } + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/query.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/query.ts new file mode 100644 index 00000000..b32c59b3 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/query.ts @@ -0,0 +1,1317 @@ +/* eslint-disable */ +import { Reader, util, configure, Writer } from "protobufjs/minimal"; +import * as Long from "long"; +import { Params } from "../nftoracle/params"; +import { MintRequest } from "../nftoracle/mint_request"; +import { + PageRequest, + PageResponse, +} from "../cosmos/base/query/v1beta1/pagination"; +import { ActionRequest } from "../nftoracle/action_request"; +import { CollectionOwnerRequest } from "../nftoracle/collection_owner_request"; + +export const protobufPackage = "thesixnetwork.sixnft.nftoracle"; + +/** QueryParamsRequest is request type for the Query/Params RPC method. */ +export interface QueryParamsRequest {} + +/** QueryParamsResponse is response type for the Query/Params RPC method. */ +export interface QueryParamsResponse { + /** params holds all the parameters of this module. */ + params: Params | undefined; +} + +export interface QueryGetMintRequestRequest { + id: number; +} + +export interface QueryGetMintRequestResponse { + MintRequest: MintRequest | undefined; +} + +export interface QueryAllMintRequestRequest { + pagination: PageRequest | undefined; +} + +export interface QueryAllMintRequestResponse { + MintRequest: MintRequest[]; + pagination: PageResponse | undefined; +} + +export interface QueryGetActionRequestRequest { + id: number; +} + +export interface QueryGetActionRequestResponse { + ActionRequest: ActionRequest | undefined; +} + +export interface QueryAllActionRequestRequest { + pagination: PageRequest | undefined; +} + +export interface QueryAllActionRequestResponse { + ActionRequest: ActionRequest[]; + pagination: PageResponse | undefined; +} + +export interface QueryGetCollectionOwnerRequestRequest { + id: number; +} + +export interface QueryGetCollectionOwnerRequestResponse { + CollectionOwnerRequest: CollectionOwnerRequest | undefined; +} + +export interface QueryAllCollectionOwnerRequestRequest { + pagination: PageRequest | undefined; +} + +export interface QueryAllCollectionOwnerRequestResponse { + CollectionOwnerRequest: CollectionOwnerRequest[]; + pagination: PageResponse | undefined; +} + +const baseQueryParamsRequest: object = {}; + +export const QueryParamsRequest = { + encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseQueryParamsRequest } as QueryParamsRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(_: any): QueryParamsRequest { + const message = { ...baseQueryParamsRequest } as QueryParamsRequest; + return message; + }, + + toJSON(_: QueryParamsRequest): unknown { + const obj: any = {}; + return obj; + }, + + fromPartial(_: DeepPartial): QueryParamsRequest { + const message = { ...baseQueryParamsRequest } as QueryParamsRequest; + return message; + }, +}; + +const baseQueryParamsResponse: object = {}; + +export const QueryParamsResponse = { + encode( + message: QueryParamsResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseQueryParamsResponse } as QueryParamsResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryParamsResponse { + const message = { ...baseQueryParamsResponse } as QueryParamsResponse; + if (object.params !== undefined && object.params !== null) { + message.params = Params.fromJSON(object.params); + } else { + message.params = undefined; + } + return message; + }, + + toJSON(message: QueryParamsResponse): unknown { + const obj: any = {}; + message.params !== undefined && + (obj.params = message.params ? Params.toJSON(message.params) : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): QueryParamsResponse { + const message = { ...baseQueryParamsResponse } as QueryParamsResponse; + if (object.params !== undefined && object.params !== null) { + message.params = Params.fromPartial(object.params); + } else { + message.params = undefined; + } + return message; + }, +}; + +const baseQueryGetMintRequestRequest: object = { id: 0 }; + +export const QueryGetMintRequestRequest = { + encode( + message: QueryGetMintRequestRequest, + writer: Writer = Writer.create() + ): Writer { + if (message.id !== 0) { + writer.uint32(8).uint64(message.id); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryGetMintRequestRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryGetMintRequestRequest, + } as QueryGetMintRequestRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = longToNumber(reader.uint64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryGetMintRequestRequest { + const message = { + ...baseQueryGetMintRequestRequest, + } as QueryGetMintRequestRequest; + if (object.id !== undefined && object.id !== null) { + message.id = Number(object.id); + } else { + message.id = 0; + } + return message; + }, + + toJSON(message: QueryGetMintRequestRequest): unknown { + const obj: any = {}; + message.id !== undefined && (obj.id = message.id); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryGetMintRequestRequest { + const message = { + ...baseQueryGetMintRequestRequest, + } as QueryGetMintRequestRequest; + if (object.id !== undefined && object.id !== null) { + message.id = object.id; + } else { + message.id = 0; + } + return message; + }, +}; + +const baseQueryGetMintRequestResponse: object = {}; + +export const QueryGetMintRequestResponse = { + encode( + message: QueryGetMintRequestResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.MintRequest !== undefined) { + MintRequest.encode( + message.MintRequest, + writer.uint32(10).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryGetMintRequestResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryGetMintRequestResponse, + } as QueryGetMintRequestResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.MintRequest = MintRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryGetMintRequestResponse { + const message = { + ...baseQueryGetMintRequestResponse, + } as QueryGetMintRequestResponse; + if (object.MintRequest !== undefined && object.MintRequest !== null) { + message.MintRequest = MintRequest.fromJSON(object.MintRequest); + } else { + message.MintRequest = undefined; + } + return message; + }, + + toJSON(message: QueryGetMintRequestResponse): unknown { + const obj: any = {}; + message.MintRequest !== undefined && + (obj.MintRequest = message.MintRequest + ? MintRequest.toJSON(message.MintRequest) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryGetMintRequestResponse { + const message = { + ...baseQueryGetMintRequestResponse, + } as QueryGetMintRequestResponse; + if (object.MintRequest !== undefined && object.MintRequest !== null) { + message.MintRequest = MintRequest.fromPartial(object.MintRequest); + } else { + message.MintRequest = undefined; + } + return message; + }, +}; + +const baseQueryAllMintRequestRequest: object = {}; + +export const QueryAllMintRequestRequest = { + encode( + message: QueryAllMintRequestRequest, + writer: Writer = Writer.create() + ): Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryAllMintRequestRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryAllMintRequestRequest, + } as QueryAllMintRequestRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryAllMintRequestRequest { + const message = { + ...baseQueryAllMintRequestRequest, + } as QueryAllMintRequestRequest; + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageRequest.fromJSON(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, + + toJSON(message: QueryAllMintRequestRequest): unknown { + const obj: any = {}; + message.pagination !== undefined && + (obj.pagination = message.pagination + ? PageRequest.toJSON(message.pagination) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryAllMintRequestRequest { + const message = { + ...baseQueryAllMintRequestRequest, + } as QueryAllMintRequestRequest; + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageRequest.fromPartial(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, +}; + +const baseQueryAllMintRequestResponse: object = {}; + +export const QueryAllMintRequestResponse = { + encode( + message: QueryAllMintRequestResponse, + writer: Writer = Writer.create() + ): Writer { + for (const v of message.MintRequest) { + MintRequest.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.pagination !== undefined) { + PageResponse.encode( + message.pagination, + writer.uint32(18).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryAllMintRequestResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryAllMintRequestResponse, + } as QueryAllMintRequestResponse; + message.MintRequest = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.MintRequest.push(MintRequest.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryAllMintRequestResponse { + const message = { + ...baseQueryAllMintRequestResponse, + } as QueryAllMintRequestResponse; + message.MintRequest = []; + if (object.MintRequest !== undefined && object.MintRequest !== null) { + for (const e of object.MintRequest) { + message.MintRequest.push(MintRequest.fromJSON(e)); + } + } + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageResponse.fromJSON(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, + + toJSON(message: QueryAllMintRequestResponse): unknown { + const obj: any = {}; + if (message.MintRequest) { + obj.MintRequest = message.MintRequest.map((e) => + e ? MintRequest.toJSON(e) : undefined + ); + } else { + obj.MintRequest = []; + } + message.pagination !== undefined && + (obj.pagination = message.pagination + ? PageResponse.toJSON(message.pagination) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryAllMintRequestResponse { + const message = { + ...baseQueryAllMintRequestResponse, + } as QueryAllMintRequestResponse; + message.MintRequest = []; + if (object.MintRequest !== undefined && object.MintRequest !== null) { + for (const e of object.MintRequest) { + message.MintRequest.push(MintRequest.fromPartial(e)); + } + } + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageResponse.fromPartial(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, +}; + +const baseQueryGetActionRequestRequest: object = { id: 0 }; + +export const QueryGetActionRequestRequest = { + encode( + message: QueryGetActionRequestRequest, + writer: Writer = Writer.create() + ): Writer { + if (message.id !== 0) { + writer.uint32(8).uint64(message.id); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryGetActionRequestRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryGetActionRequestRequest, + } as QueryGetActionRequestRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = longToNumber(reader.uint64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryGetActionRequestRequest { + const message = { + ...baseQueryGetActionRequestRequest, + } as QueryGetActionRequestRequest; + if (object.id !== undefined && object.id !== null) { + message.id = Number(object.id); + } else { + message.id = 0; + } + return message; + }, + + toJSON(message: QueryGetActionRequestRequest): unknown { + const obj: any = {}; + message.id !== undefined && (obj.id = message.id); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryGetActionRequestRequest { + const message = { + ...baseQueryGetActionRequestRequest, + } as QueryGetActionRequestRequest; + if (object.id !== undefined && object.id !== null) { + message.id = object.id; + } else { + message.id = 0; + } + return message; + }, +}; + +const baseQueryGetActionRequestResponse: object = {}; + +export const QueryGetActionRequestResponse = { + encode( + message: QueryGetActionRequestResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.ActionRequest !== undefined) { + ActionRequest.encode( + message.ActionRequest, + writer.uint32(10).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryGetActionRequestResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryGetActionRequestResponse, + } as QueryGetActionRequestResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ActionRequest = ActionRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryGetActionRequestResponse { + const message = { + ...baseQueryGetActionRequestResponse, + } as QueryGetActionRequestResponse; + if (object.ActionRequest !== undefined && object.ActionRequest !== null) { + message.ActionRequest = ActionRequest.fromJSON(object.ActionRequest); + } else { + message.ActionRequest = undefined; + } + return message; + }, + + toJSON(message: QueryGetActionRequestResponse): unknown { + const obj: any = {}; + message.ActionRequest !== undefined && + (obj.ActionRequest = message.ActionRequest + ? ActionRequest.toJSON(message.ActionRequest) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryGetActionRequestResponse { + const message = { + ...baseQueryGetActionRequestResponse, + } as QueryGetActionRequestResponse; + if (object.ActionRequest !== undefined && object.ActionRequest !== null) { + message.ActionRequest = ActionRequest.fromPartial(object.ActionRequest); + } else { + message.ActionRequest = undefined; + } + return message; + }, +}; + +const baseQueryAllActionRequestRequest: object = {}; + +export const QueryAllActionRequestRequest = { + encode( + message: QueryAllActionRequestRequest, + writer: Writer = Writer.create() + ): Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryAllActionRequestRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryAllActionRequestRequest, + } as QueryAllActionRequestRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryAllActionRequestRequest { + const message = { + ...baseQueryAllActionRequestRequest, + } as QueryAllActionRequestRequest; + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageRequest.fromJSON(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, + + toJSON(message: QueryAllActionRequestRequest): unknown { + const obj: any = {}; + message.pagination !== undefined && + (obj.pagination = message.pagination + ? PageRequest.toJSON(message.pagination) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryAllActionRequestRequest { + const message = { + ...baseQueryAllActionRequestRequest, + } as QueryAllActionRequestRequest; + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageRequest.fromPartial(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, +}; + +const baseQueryAllActionRequestResponse: object = {}; + +export const QueryAllActionRequestResponse = { + encode( + message: QueryAllActionRequestResponse, + writer: Writer = Writer.create() + ): Writer { + for (const v of message.ActionRequest) { + ActionRequest.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.pagination !== undefined) { + PageResponse.encode( + message.pagination, + writer.uint32(18).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryAllActionRequestResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryAllActionRequestResponse, + } as QueryAllActionRequestResponse; + message.ActionRequest = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ActionRequest.push( + ActionRequest.decode(reader, reader.uint32()) + ); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryAllActionRequestResponse { + const message = { + ...baseQueryAllActionRequestResponse, + } as QueryAllActionRequestResponse; + message.ActionRequest = []; + if (object.ActionRequest !== undefined && object.ActionRequest !== null) { + for (const e of object.ActionRequest) { + message.ActionRequest.push(ActionRequest.fromJSON(e)); + } + } + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageResponse.fromJSON(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, + + toJSON(message: QueryAllActionRequestResponse): unknown { + const obj: any = {}; + if (message.ActionRequest) { + obj.ActionRequest = message.ActionRequest.map((e) => + e ? ActionRequest.toJSON(e) : undefined + ); + } else { + obj.ActionRequest = []; + } + message.pagination !== undefined && + (obj.pagination = message.pagination + ? PageResponse.toJSON(message.pagination) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryAllActionRequestResponse { + const message = { + ...baseQueryAllActionRequestResponse, + } as QueryAllActionRequestResponse; + message.ActionRequest = []; + if (object.ActionRequest !== undefined && object.ActionRequest !== null) { + for (const e of object.ActionRequest) { + message.ActionRequest.push(ActionRequest.fromPartial(e)); + } + } + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageResponse.fromPartial(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, +}; + +const baseQueryGetCollectionOwnerRequestRequest: object = { id: 0 }; + +export const QueryGetCollectionOwnerRequestRequest = { + encode( + message: QueryGetCollectionOwnerRequestRequest, + writer: Writer = Writer.create() + ): Writer { + if (message.id !== 0) { + writer.uint32(8).uint64(message.id); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryGetCollectionOwnerRequestRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryGetCollectionOwnerRequestRequest, + } as QueryGetCollectionOwnerRequestRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = longToNumber(reader.uint64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryGetCollectionOwnerRequestRequest { + const message = { + ...baseQueryGetCollectionOwnerRequestRequest, + } as QueryGetCollectionOwnerRequestRequest; + if (object.id !== undefined && object.id !== null) { + message.id = Number(object.id); + } else { + message.id = 0; + } + return message; + }, + + toJSON(message: QueryGetCollectionOwnerRequestRequest): unknown { + const obj: any = {}; + message.id !== undefined && (obj.id = message.id); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryGetCollectionOwnerRequestRequest { + const message = { + ...baseQueryGetCollectionOwnerRequestRequest, + } as QueryGetCollectionOwnerRequestRequest; + if (object.id !== undefined && object.id !== null) { + message.id = object.id; + } else { + message.id = 0; + } + return message; + }, +}; + +const baseQueryGetCollectionOwnerRequestResponse: object = {}; + +export const QueryGetCollectionOwnerRequestResponse = { + encode( + message: QueryGetCollectionOwnerRequestResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.CollectionOwnerRequest !== undefined) { + CollectionOwnerRequest.encode( + message.CollectionOwnerRequest, + writer.uint32(10).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryGetCollectionOwnerRequestResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryGetCollectionOwnerRequestResponse, + } as QueryGetCollectionOwnerRequestResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.CollectionOwnerRequest = CollectionOwnerRequest.decode( + reader, + reader.uint32() + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryGetCollectionOwnerRequestResponse { + const message = { + ...baseQueryGetCollectionOwnerRequestResponse, + } as QueryGetCollectionOwnerRequestResponse; + if ( + object.CollectionOwnerRequest !== undefined && + object.CollectionOwnerRequest !== null + ) { + message.CollectionOwnerRequest = CollectionOwnerRequest.fromJSON( + object.CollectionOwnerRequest + ); + } else { + message.CollectionOwnerRequest = undefined; + } + return message; + }, + + toJSON(message: QueryGetCollectionOwnerRequestResponse): unknown { + const obj: any = {}; + message.CollectionOwnerRequest !== undefined && + (obj.CollectionOwnerRequest = message.CollectionOwnerRequest + ? CollectionOwnerRequest.toJSON(message.CollectionOwnerRequest) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryGetCollectionOwnerRequestResponse { + const message = { + ...baseQueryGetCollectionOwnerRequestResponse, + } as QueryGetCollectionOwnerRequestResponse; + if ( + object.CollectionOwnerRequest !== undefined && + object.CollectionOwnerRequest !== null + ) { + message.CollectionOwnerRequest = CollectionOwnerRequest.fromPartial( + object.CollectionOwnerRequest + ); + } else { + message.CollectionOwnerRequest = undefined; + } + return message; + }, +}; + +const baseQueryAllCollectionOwnerRequestRequest: object = {}; + +export const QueryAllCollectionOwnerRequestRequest = { + encode( + message: QueryAllCollectionOwnerRequestRequest, + writer: Writer = Writer.create() + ): Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryAllCollectionOwnerRequestRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryAllCollectionOwnerRequestRequest, + } as QueryAllCollectionOwnerRequestRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryAllCollectionOwnerRequestRequest { + const message = { + ...baseQueryAllCollectionOwnerRequestRequest, + } as QueryAllCollectionOwnerRequestRequest; + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageRequest.fromJSON(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, + + toJSON(message: QueryAllCollectionOwnerRequestRequest): unknown { + const obj: any = {}; + message.pagination !== undefined && + (obj.pagination = message.pagination + ? PageRequest.toJSON(message.pagination) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryAllCollectionOwnerRequestRequest { + const message = { + ...baseQueryAllCollectionOwnerRequestRequest, + } as QueryAllCollectionOwnerRequestRequest; + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageRequest.fromPartial(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, +}; + +const baseQueryAllCollectionOwnerRequestResponse: object = {}; + +export const QueryAllCollectionOwnerRequestResponse = { + encode( + message: QueryAllCollectionOwnerRequestResponse, + writer: Writer = Writer.create() + ): Writer { + for (const v of message.CollectionOwnerRequest) { + CollectionOwnerRequest.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.pagination !== undefined) { + PageResponse.encode( + message.pagination, + writer.uint32(18).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryAllCollectionOwnerRequestResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryAllCollectionOwnerRequestResponse, + } as QueryAllCollectionOwnerRequestResponse; + message.CollectionOwnerRequest = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.CollectionOwnerRequest.push( + CollectionOwnerRequest.decode(reader, reader.uint32()) + ); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryAllCollectionOwnerRequestResponse { + const message = { + ...baseQueryAllCollectionOwnerRequestResponse, + } as QueryAllCollectionOwnerRequestResponse; + message.CollectionOwnerRequest = []; + if ( + object.CollectionOwnerRequest !== undefined && + object.CollectionOwnerRequest !== null + ) { + for (const e of object.CollectionOwnerRequest) { + message.CollectionOwnerRequest.push(CollectionOwnerRequest.fromJSON(e)); + } + } + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageResponse.fromJSON(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, + + toJSON(message: QueryAllCollectionOwnerRequestResponse): unknown { + const obj: any = {}; + if (message.CollectionOwnerRequest) { + obj.CollectionOwnerRequest = message.CollectionOwnerRequest.map((e) => + e ? CollectionOwnerRequest.toJSON(e) : undefined + ); + } else { + obj.CollectionOwnerRequest = []; + } + message.pagination !== undefined && + (obj.pagination = message.pagination + ? PageResponse.toJSON(message.pagination) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryAllCollectionOwnerRequestResponse { + const message = { + ...baseQueryAllCollectionOwnerRequestResponse, + } as QueryAllCollectionOwnerRequestResponse; + message.CollectionOwnerRequest = []; + if ( + object.CollectionOwnerRequest !== undefined && + object.CollectionOwnerRequest !== null + ) { + for (const e of object.CollectionOwnerRequest) { + message.CollectionOwnerRequest.push( + CollectionOwnerRequest.fromPartial(e) + ); + } + } + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageResponse.fromPartial(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, +}; + +/** Query defines the gRPC querier service. */ +export interface Query { + /** Parameters queries the parameters of the module. */ + Params(request: QueryParamsRequest): Promise; + /** Queries a MintRequest by id. */ + MintRequest( + request: QueryGetMintRequestRequest + ): Promise; + /** Queries a list of MintRequest items. */ + MintRequestAll( + request: QueryAllMintRequestRequest + ): Promise; + /** Queries a ActionRequest by id. */ + ActionRequest( + request: QueryGetActionRequestRequest + ): Promise; + /** Queries a list of ActionRequest items. */ + ActionRequestAll( + request: QueryAllActionRequestRequest + ): Promise; + /** Queries a CollectionOwnerRequest by id. */ + CollectionOwnerRequest( + request: QueryGetCollectionOwnerRequestRequest + ): Promise; + /** Queries a list of CollectionOwnerRequest items. */ + CollectionOwnerRequestAll( + request: QueryAllCollectionOwnerRequestRequest + ): Promise; +} + +export class QueryClientImpl implements Query { + private readonly rpc: Rpc; + constructor(rpc: Rpc) { + this.rpc = rpc; + } + Params(request: QueryParamsRequest): Promise { + const data = QueryParamsRequest.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftoracle.Query", + "Params", + data + ); + return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); + } + + MintRequest( + request: QueryGetMintRequestRequest + ): Promise { + const data = QueryGetMintRequestRequest.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftoracle.Query", + "MintRequest", + data + ); + return promise.then((data) => + QueryGetMintRequestResponse.decode(new Reader(data)) + ); + } + + MintRequestAll( + request: QueryAllMintRequestRequest + ): Promise { + const data = QueryAllMintRequestRequest.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftoracle.Query", + "MintRequestAll", + data + ); + return promise.then((data) => + QueryAllMintRequestResponse.decode(new Reader(data)) + ); + } + + ActionRequest( + request: QueryGetActionRequestRequest + ): Promise { + const data = QueryGetActionRequestRequest.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftoracle.Query", + "ActionRequest", + data + ); + return promise.then((data) => + QueryGetActionRequestResponse.decode(new Reader(data)) + ); + } + + ActionRequestAll( + request: QueryAllActionRequestRequest + ): Promise { + const data = QueryAllActionRequestRequest.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftoracle.Query", + "ActionRequestAll", + data + ); + return promise.then((data) => + QueryAllActionRequestResponse.decode(new Reader(data)) + ); + } + + CollectionOwnerRequest( + request: QueryGetCollectionOwnerRequestRequest + ): Promise { + const data = QueryGetCollectionOwnerRequestRequest.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftoracle.Query", + "CollectionOwnerRequest", + data + ); + return promise.then((data) => + QueryGetCollectionOwnerRequestResponse.decode(new Reader(data)) + ); + } + + CollectionOwnerRequestAll( + request: QueryAllCollectionOwnerRequestRequest + ): Promise { + const data = QueryAllCollectionOwnerRequestRequest.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftoracle.Query", + "CollectionOwnerRequestAll", + data + ); + return promise.then((data) => + QueryAllCollectionOwnerRequestResponse.decode(new Reader(data)) + ); + } +} + +interface Rpc { + request( + service: string, + method: string, + data: Uint8Array + ): Promise; +} + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/request.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/request.ts new file mode 100644 index 00000000..e1464132 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/request.ts @@ -0,0 +1,311 @@ +/* eslint-disable */ +import { Trait } from "../nftoracle/opensea"; +import { Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.nftoracle"; + +export enum RequestStatus { + PENDING = 0, + SUCCESS_WITH_CONSENSUS = 1, + FAILED_WITHOUT_CONCENSUS = 2, + EXPIRED = 3, + FAILED_ON_EXECUTION = 4, + UNRECOGNIZED = -1, +} + +export function requestStatusFromJSON(object: any): RequestStatus { + switch (object) { + case 0: + case "PENDING": + return RequestStatus.PENDING; + case 1: + case "SUCCESS_WITH_CONSENSUS": + return RequestStatus.SUCCESS_WITH_CONSENSUS; + case 2: + case "FAILED_WITHOUT_CONCENSUS": + return RequestStatus.FAILED_WITHOUT_CONCENSUS; + case 3: + case "EXPIRED": + return RequestStatus.EXPIRED; + case 4: + case "FAILED_ON_EXECUTION": + return RequestStatus.FAILED_ON_EXECUTION; + case -1: + case "UNRECOGNIZED": + default: + return RequestStatus.UNRECOGNIZED; + } +} + +export function requestStatusToJSON(object: RequestStatus): string { + switch (object) { + case RequestStatus.PENDING: + return "PENDING"; + case RequestStatus.SUCCESS_WITH_CONSENSUS: + return "SUCCESS_WITH_CONSENSUS"; + case RequestStatus.FAILED_WITHOUT_CONCENSUS: + return "FAILED_WITHOUT_CONCENSUS"; + case RequestStatus.EXPIRED: + return "EXPIRED"; + case RequestStatus.FAILED_ON_EXECUTION: + return "FAILED_ON_EXECUTION"; + default: + return "UNKNOWN"; + } +} + +export interface NftOriginData { + image: string; + holder_address: string; + traits: Trait[]; +} + +export interface DataHash { + origin_data: NftOriginData | undefined; + hash: Uint8Array; + confirmers: string[]; +} + +const baseNftOriginData: object = { image: "", holder_address: "" }; + +export const NftOriginData = { + encode(message: NftOriginData, writer: Writer = Writer.create()): Writer { + if (message.image !== "") { + writer.uint32(10).string(message.image); + } + if (message.holder_address !== "") { + writer.uint32(18).string(message.holder_address); + } + for (const v of message.traits) { + Trait.encode(v!, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): NftOriginData { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseNftOriginData } as NftOriginData; + message.traits = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.image = reader.string(); + break; + case 2: + message.holder_address = reader.string(); + break; + case 3: + message.traits.push(Trait.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): NftOriginData { + const message = { ...baseNftOriginData } as NftOriginData; + message.traits = []; + if (object.image !== undefined && object.image !== null) { + message.image = String(object.image); + } else { + message.image = ""; + } + if (object.holder_address !== undefined && object.holder_address !== null) { + message.holder_address = String(object.holder_address); + } else { + message.holder_address = ""; + } + if (object.traits !== undefined && object.traits !== null) { + for (const e of object.traits) { + message.traits.push(Trait.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: NftOriginData): unknown { + const obj: any = {}; + message.image !== undefined && (obj.image = message.image); + message.holder_address !== undefined && + (obj.holder_address = message.holder_address); + if (message.traits) { + obj.traits = message.traits.map((e) => (e ? Trait.toJSON(e) : undefined)); + } else { + obj.traits = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): NftOriginData { + const message = { ...baseNftOriginData } as NftOriginData; + message.traits = []; + if (object.image !== undefined && object.image !== null) { + message.image = object.image; + } else { + message.image = ""; + } + if (object.holder_address !== undefined && object.holder_address !== null) { + message.holder_address = object.holder_address; + } else { + message.holder_address = ""; + } + if (object.traits !== undefined && object.traits !== null) { + for (const e of object.traits) { + message.traits.push(Trait.fromPartial(e)); + } + } + return message; + }, +}; + +const baseDataHash: object = { confirmers: "" }; + +export const DataHash = { + encode(message: DataHash, writer: Writer = Writer.create()): Writer { + if (message.origin_data !== undefined) { + NftOriginData.encode( + message.origin_data, + writer.uint32(10).fork() + ).ldelim(); + } + if (message.hash.length !== 0) { + writer.uint32(18).bytes(message.hash); + } + for (const v of message.confirmers) { + writer.uint32(26).string(v!); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): DataHash { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseDataHash } as DataHash; + message.confirmers = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.origin_data = NftOriginData.decode(reader, reader.uint32()); + break; + case 2: + message.hash = reader.bytes(); + break; + case 3: + message.confirmers.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): DataHash { + const message = { ...baseDataHash } as DataHash; + message.confirmers = []; + if (object.origin_data !== undefined && object.origin_data !== null) { + message.origin_data = NftOriginData.fromJSON(object.origin_data); + } else { + message.origin_data = undefined; + } + if (object.hash !== undefined && object.hash !== null) { + message.hash = bytesFromBase64(object.hash); + } + if (object.confirmers !== undefined && object.confirmers !== null) { + for (const e of object.confirmers) { + message.confirmers.push(String(e)); + } + } + return message; + }, + + toJSON(message: DataHash): unknown { + const obj: any = {}; + message.origin_data !== undefined && + (obj.origin_data = message.origin_data + ? NftOriginData.toJSON(message.origin_data) + : undefined); + message.hash !== undefined && + (obj.hash = base64FromBytes( + message.hash !== undefined ? message.hash : new Uint8Array() + )); + if (message.confirmers) { + obj.confirmers = message.confirmers.map((e) => e); + } else { + obj.confirmers = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): DataHash { + const message = { ...baseDataHash } as DataHash; + message.confirmers = []; + if (object.origin_data !== undefined && object.origin_data !== null) { + message.origin_data = NftOriginData.fromPartial(object.origin_data); + } else { + message.origin_data = undefined; + } + if (object.hash !== undefined && object.hash !== null) { + message.hash = object.hash; + } else { + message.hash = new Uint8Array(); + } + if (object.confirmers !== undefined && object.confirmers !== null) { + for (const e of object.confirmers) { + message.confirmers.push(e); + } + } + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +const atob: (b64: string) => string = + globalThis.atob || + ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +function bytesFromBase64(b64: string): Uint8Array { + const bin = atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; +} + +const btoa: (bin: string) => string = + globalThis.btoa || + ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +function base64FromBytes(arr: Uint8Array): string { + const bin: string[] = []; + for (let i = 0; i < arr.byteLength; ++i) { + bin.push(String.fromCharCode(arr[i])); + } + return btoa(bin.join("")); +} + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/tx.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/tx.ts new file mode 100644 index 00000000..bb1121b2 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/types/nftoracle/tx.ts @@ -0,0 +1,956 @@ +/* eslint-disable */ +import { Reader, util, configure, Writer } from "protobufjs/minimal"; +import * as Long from "long"; + +export const protobufPackage = "thesixnetwork.sixnft.nftoracle"; + +export interface MsgCreateMintRequest { + creator: string; + nftSchemaCode: string; + tokenId: string; + requiredConfirm: number; +} + +export interface MsgCreateMintRequestResponse { + id: number; + nftSchemaCode: string; + tokenId: string; +} + +export interface MsgSubmitMintResponse { + creator: string; + mintRequestID: number; + base64NftData: string; +} + +export interface MsgSubmitMintResponseResponse { + mintRequestID: string; +} + +export interface MsgCreateActionRequest { + creator: string; + vm: string; + base64ActionSignature: string; + requiredConfirm: number; +} + +export interface MsgCreateActionRequestResponse { + id: number; +} + +export interface MsgSubmitActionResponse { + creator: string; + actionRequestID: number; + base64NftData: string; +} + +export interface MsgSubmitActionResponseResponse { + actionRequestID: string; +} + +const baseMsgCreateMintRequest: object = { + creator: "", + nftSchemaCode: "", + tokenId: "", + requiredConfirm: 0, +}; + +export const MsgCreateMintRequest = { + encode( + message: MsgCreateMintRequest, + writer: Writer = Writer.create() + ): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.nftSchemaCode !== "") { + writer.uint32(18).string(message.nftSchemaCode); + } + if (message.tokenId !== "") { + writer.uint32(26).string(message.tokenId); + } + if (message.requiredConfirm !== 0) { + writer.uint32(32).uint64(message.requiredConfirm); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgCreateMintRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMsgCreateMintRequest } as MsgCreateMintRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.nftSchemaCode = reader.string(); + break; + case 3: + message.tokenId = reader.string(); + break; + case 4: + message.requiredConfirm = longToNumber(reader.uint64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgCreateMintRequest { + const message = { ...baseMsgCreateMintRequest } as MsgCreateMintRequest; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if (object.nftSchemaCode !== undefined && object.nftSchemaCode !== null) { + message.nftSchemaCode = String(object.nftSchemaCode); + } else { + message.nftSchemaCode = ""; + } + if (object.tokenId !== undefined && object.tokenId !== null) { + message.tokenId = String(object.tokenId); + } else { + message.tokenId = ""; + } + if ( + object.requiredConfirm !== undefined && + object.requiredConfirm !== null + ) { + message.requiredConfirm = Number(object.requiredConfirm); + } else { + message.requiredConfirm = 0; + } + return message; + }, + + toJSON(message: MsgCreateMintRequest): unknown { + const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.nftSchemaCode !== undefined && + (obj.nftSchemaCode = message.nftSchemaCode); + message.tokenId !== undefined && (obj.tokenId = message.tokenId); + message.requiredConfirm !== undefined && + (obj.requiredConfirm = message.requiredConfirm); + return obj; + }, + + fromPartial(object: DeepPartial): MsgCreateMintRequest { + const message = { ...baseMsgCreateMintRequest } as MsgCreateMintRequest; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if (object.nftSchemaCode !== undefined && object.nftSchemaCode !== null) { + message.nftSchemaCode = object.nftSchemaCode; + } else { + message.nftSchemaCode = ""; + } + if (object.tokenId !== undefined && object.tokenId !== null) { + message.tokenId = object.tokenId; + } else { + message.tokenId = ""; + } + if ( + object.requiredConfirm !== undefined && + object.requiredConfirm !== null + ) { + message.requiredConfirm = object.requiredConfirm; + } else { + message.requiredConfirm = 0; + } + return message; + }, +}; + +const baseMsgCreateMintRequestResponse: object = { + id: 0, + nftSchemaCode: "", + tokenId: "", +}; + +export const MsgCreateMintRequestResponse = { + encode( + message: MsgCreateMintRequestResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.id !== 0) { + writer.uint32(8).uint64(message.id); + } + if (message.nftSchemaCode !== "") { + writer.uint32(18).string(message.nftSchemaCode); + } + if (message.tokenId !== "") { + writer.uint32(26).string(message.tokenId); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): MsgCreateMintRequestResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseMsgCreateMintRequestResponse, + } as MsgCreateMintRequestResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = longToNumber(reader.uint64() as Long); + break; + case 2: + message.nftSchemaCode = reader.string(); + break; + case 3: + message.tokenId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgCreateMintRequestResponse { + const message = { + ...baseMsgCreateMintRequestResponse, + } as MsgCreateMintRequestResponse; + if (object.id !== undefined && object.id !== null) { + message.id = Number(object.id); + } else { + message.id = 0; + } + if (object.nftSchemaCode !== undefined && object.nftSchemaCode !== null) { + message.nftSchemaCode = String(object.nftSchemaCode); + } else { + message.nftSchemaCode = ""; + } + if (object.tokenId !== undefined && object.tokenId !== null) { + message.tokenId = String(object.tokenId); + } else { + message.tokenId = ""; + } + return message; + }, + + toJSON(message: MsgCreateMintRequestResponse): unknown { + const obj: any = {}; + message.id !== undefined && (obj.id = message.id); + message.nftSchemaCode !== undefined && + (obj.nftSchemaCode = message.nftSchemaCode); + message.tokenId !== undefined && (obj.tokenId = message.tokenId); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MsgCreateMintRequestResponse { + const message = { + ...baseMsgCreateMintRequestResponse, + } as MsgCreateMintRequestResponse; + if (object.id !== undefined && object.id !== null) { + message.id = object.id; + } else { + message.id = 0; + } + if (object.nftSchemaCode !== undefined && object.nftSchemaCode !== null) { + message.nftSchemaCode = object.nftSchemaCode; + } else { + message.nftSchemaCode = ""; + } + if (object.tokenId !== undefined && object.tokenId !== null) { + message.tokenId = object.tokenId; + } else { + message.tokenId = ""; + } + return message; + }, +}; + +const baseMsgSubmitMintResponse: object = { + creator: "", + mintRequestID: 0, + base64NftData: "", +}; + +export const MsgSubmitMintResponse = { + encode( + message: MsgSubmitMintResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.mintRequestID !== 0) { + writer.uint32(16).uint64(message.mintRequestID); + } + if (message.base64NftData !== "") { + writer.uint32(26).string(message.base64NftData); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgSubmitMintResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMsgSubmitMintResponse } as MsgSubmitMintResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.mintRequestID = longToNumber(reader.uint64() as Long); + break; + case 3: + message.base64NftData = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgSubmitMintResponse { + const message = { ...baseMsgSubmitMintResponse } as MsgSubmitMintResponse; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if (object.mintRequestID !== undefined && object.mintRequestID !== null) { + message.mintRequestID = Number(object.mintRequestID); + } else { + message.mintRequestID = 0; + } + if (object.base64NftData !== undefined && object.base64NftData !== null) { + message.base64NftData = String(object.base64NftData); + } else { + message.base64NftData = ""; + } + return message; + }, + + toJSON(message: MsgSubmitMintResponse): unknown { + const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.mintRequestID !== undefined && + (obj.mintRequestID = message.mintRequestID); + message.base64NftData !== undefined && + (obj.base64NftData = message.base64NftData); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MsgSubmitMintResponse { + const message = { ...baseMsgSubmitMintResponse } as MsgSubmitMintResponse; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if (object.mintRequestID !== undefined && object.mintRequestID !== null) { + message.mintRequestID = object.mintRequestID; + } else { + message.mintRequestID = 0; + } + if (object.base64NftData !== undefined && object.base64NftData !== null) { + message.base64NftData = object.base64NftData; + } else { + message.base64NftData = ""; + } + return message; + }, +}; + +const baseMsgSubmitMintResponseResponse: object = { mintRequestID: "" }; + +export const MsgSubmitMintResponseResponse = { + encode( + message: MsgSubmitMintResponseResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.mintRequestID !== "") { + writer.uint32(10).string(message.mintRequestID); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): MsgSubmitMintResponseResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseMsgSubmitMintResponseResponse, + } as MsgSubmitMintResponseResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mintRequestID = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgSubmitMintResponseResponse { + const message = { + ...baseMsgSubmitMintResponseResponse, + } as MsgSubmitMintResponseResponse; + if (object.mintRequestID !== undefined && object.mintRequestID !== null) { + message.mintRequestID = String(object.mintRequestID); + } else { + message.mintRequestID = ""; + } + return message; + }, + + toJSON(message: MsgSubmitMintResponseResponse): unknown { + const obj: any = {}; + message.mintRequestID !== undefined && + (obj.mintRequestID = message.mintRequestID); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MsgSubmitMintResponseResponse { + const message = { + ...baseMsgSubmitMintResponseResponse, + } as MsgSubmitMintResponseResponse; + if (object.mintRequestID !== undefined && object.mintRequestID !== null) { + message.mintRequestID = object.mintRequestID; + } else { + message.mintRequestID = ""; + } + return message; + }, +}; + +const baseMsgCreateActionRequest: object = { + creator: "", + vm: "", + base64ActionSignature: "", + requiredConfirm: 0, +}; + +export const MsgCreateActionRequest = { + encode( + message: MsgCreateActionRequest, + writer: Writer = Writer.create() + ): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.vm !== "") { + writer.uint32(18).string(message.vm); + } + if (message.base64ActionSignature !== "") { + writer.uint32(26).string(message.base64ActionSignature); + } + if (message.requiredConfirm !== 0) { + writer.uint32(32).uint64(message.requiredConfirm); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgCreateActionRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMsgCreateActionRequest } as MsgCreateActionRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.vm = reader.string(); + break; + case 3: + message.base64ActionSignature = reader.string(); + break; + case 4: + message.requiredConfirm = longToNumber(reader.uint64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgCreateActionRequest { + const message = { ...baseMsgCreateActionRequest } as MsgCreateActionRequest; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if (object.vm !== undefined && object.vm !== null) { + message.vm = String(object.vm); + } else { + message.vm = ""; + } + if ( + object.base64ActionSignature !== undefined && + object.base64ActionSignature !== null + ) { + message.base64ActionSignature = String(object.base64ActionSignature); + } else { + message.base64ActionSignature = ""; + } + if ( + object.requiredConfirm !== undefined && + object.requiredConfirm !== null + ) { + message.requiredConfirm = Number(object.requiredConfirm); + } else { + message.requiredConfirm = 0; + } + return message; + }, + + toJSON(message: MsgCreateActionRequest): unknown { + const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.vm !== undefined && (obj.vm = message.vm); + message.base64ActionSignature !== undefined && + (obj.base64ActionSignature = message.base64ActionSignature); + message.requiredConfirm !== undefined && + (obj.requiredConfirm = message.requiredConfirm); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MsgCreateActionRequest { + const message = { ...baseMsgCreateActionRequest } as MsgCreateActionRequest; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if (object.vm !== undefined && object.vm !== null) { + message.vm = object.vm; + } else { + message.vm = ""; + } + if ( + object.base64ActionSignature !== undefined && + object.base64ActionSignature !== null + ) { + message.base64ActionSignature = object.base64ActionSignature; + } else { + message.base64ActionSignature = ""; + } + if ( + object.requiredConfirm !== undefined && + object.requiredConfirm !== null + ) { + message.requiredConfirm = object.requiredConfirm; + } else { + message.requiredConfirm = 0; + } + return message; + }, +}; + +const baseMsgCreateActionRequestResponse: object = { id: 0 }; + +export const MsgCreateActionRequestResponse = { + encode( + message: MsgCreateActionRequestResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.id !== 0) { + writer.uint32(8).uint64(message.id); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): MsgCreateActionRequestResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseMsgCreateActionRequestResponse, + } as MsgCreateActionRequestResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = longToNumber(reader.uint64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgCreateActionRequestResponse { + const message = { + ...baseMsgCreateActionRequestResponse, + } as MsgCreateActionRequestResponse; + if (object.id !== undefined && object.id !== null) { + message.id = Number(object.id); + } else { + message.id = 0; + } + return message; + }, + + toJSON(message: MsgCreateActionRequestResponse): unknown { + const obj: any = {}; + message.id !== undefined && (obj.id = message.id); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MsgCreateActionRequestResponse { + const message = { + ...baseMsgCreateActionRequestResponse, + } as MsgCreateActionRequestResponse; + if (object.id !== undefined && object.id !== null) { + message.id = object.id; + } else { + message.id = 0; + } + return message; + }, +}; + +const baseMsgSubmitActionResponse: object = { + creator: "", + actionRequestID: 0, + base64NftData: "", +}; + +export const MsgSubmitActionResponse = { + encode( + message: MsgSubmitActionResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.actionRequestID !== 0) { + writer.uint32(16).uint64(message.actionRequestID); + } + if (message.base64NftData !== "") { + writer.uint32(26).string(message.base64NftData); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgSubmitActionResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseMsgSubmitActionResponse, + } as MsgSubmitActionResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.actionRequestID = longToNumber(reader.uint64() as Long); + break; + case 3: + message.base64NftData = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgSubmitActionResponse { + const message = { + ...baseMsgSubmitActionResponse, + } as MsgSubmitActionResponse; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if ( + object.actionRequestID !== undefined && + object.actionRequestID !== null + ) { + message.actionRequestID = Number(object.actionRequestID); + } else { + message.actionRequestID = 0; + } + if (object.base64NftData !== undefined && object.base64NftData !== null) { + message.base64NftData = String(object.base64NftData); + } else { + message.base64NftData = ""; + } + return message; + }, + + toJSON(message: MsgSubmitActionResponse): unknown { + const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.actionRequestID !== undefined && + (obj.actionRequestID = message.actionRequestID); + message.base64NftData !== undefined && + (obj.base64NftData = message.base64NftData); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MsgSubmitActionResponse { + const message = { + ...baseMsgSubmitActionResponse, + } as MsgSubmitActionResponse; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if ( + object.actionRequestID !== undefined && + object.actionRequestID !== null + ) { + message.actionRequestID = object.actionRequestID; + } else { + message.actionRequestID = 0; + } + if (object.base64NftData !== undefined && object.base64NftData !== null) { + message.base64NftData = object.base64NftData; + } else { + message.base64NftData = ""; + } + return message; + }, +}; + +const baseMsgSubmitActionResponseResponse: object = { actionRequestID: "" }; + +export const MsgSubmitActionResponseResponse = { + encode( + message: MsgSubmitActionResponseResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.actionRequestID !== "") { + writer.uint32(10).string(message.actionRequestID); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): MsgSubmitActionResponseResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseMsgSubmitActionResponseResponse, + } as MsgSubmitActionResponseResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.actionRequestID = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgSubmitActionResponseResponse { + const message = { + ...baseMsgSubmitActionResponseResponse, + } as MsgSubmitActionResponseResponse; + if ( + object.actionRequestID !== undefined && + object.actionRequestID !== null + ) { + message.actionRequestID = String(object.actionRequestID); + } else { + message.actionRequestID = ""; + } + return message; + }, + + toJSON(message: MsgSubmitActionResponseResponse): unknown { + const obj: any = {}; + message.actionRequestID !== undefined && + (obj.actionRequestID = message.actionRequestID); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MsgSubmitActionResponseResponse { + const message = { + ...baseMsgSubmitActionResponseResponse, + } as MsgSubmitActionResponseResponse; + if ( + object.actionRequestID !== undefined && + object.actionRequestID !== null + ) { + message.actionRequestID = object.actionRequestID; + } else { + message.actionRequestID = ""; + } + return message; + }, +}; + +/** Msg defines the Msg service. */ +export interface Msg { + CreateMintRequest( + request: MsgCreateMintRequest + ): Promise; + SubmitMintResponse( + request: MsgSubmitMintResponse + ): Promise; + CreateActionRequest( + request: MsgCreateActionRequest + ): Promise; + /** this line is used by starport scaffolding # proto/tx/rpc */ + SubmitActionResponse( + request: MsgSubmitActionResponse + ): Promise; +} + +export class MsgClientImpl implements Msg { + private readonly rpc: Rpc; + constructor(rpc: Rpc) { + this.rpc = rpc; + } + CreateMintRequest( + request: MsgCreateMintRequest + ): Promise { + const data = MsgCreateMintRequest.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftoracle.Msg", + "CreateMintRequest", + data + ); + return promise.then((data) => + MsgCreateMintRequestResponse.decode(new Reader(data)) + ); + } + + SubmitMintResponse( + request: MsgSubmitMintResponse + ): Promise { + const data = MsgSubmitMintResponse.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftoracle.Msg", + "SubmitMintResponse", + data + ); + return promise.then((data) => + MsgSubmitMintResponseResponse.decode(new Reader(data)) + ); + } + + CreateActionRequest( + request: MsgCreateActionRequest + ): Promise { + const data = MsgCreateActionRequest.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftoracle.Msg", + "CreateActionRequest", + data + ); + return promise.then((data) => + MsgCreateActionRequestResponse.decode(new Reader(data)) + ); + } + + SubmitActionResponse( + request: MsgSubmitActionResponse + ): Promise { + const data = MsgSubmitActionResponse.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftoracle.Msg", + "SubmitActionResponse", + data + ); + return promise.then((data) => + MsgSubmitActionResponseResponse.decode(new Reader(data)) + ); + } +} + +interface Rpc { + request( + service: string, + method: string, + data: Uint8Array + ): Promise; +} + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/package.json b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/package.json new file mode 100755 index 00000000..e2b59ef5 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/package.json @@ -0,0 +1,18 @@ +{ + "name": "thesixnetwork-sixnft-nftoracle-js", + "version": "0.1.0", + "description": "Autogenerated vuex store for Cosmos module thesixnetwork.sixnft.nftoracle", + "author": "Starport Codegen ", + "homepage": "http://github.com/thesixnetwork/sixnft/x/nftoracle/types", + "license": "Apache-2.0", + "licenses": [ + { + "type": "Apache-2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0" + } + ], + "main": "index.js", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/vuex-root b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/vuex-root new file mode 100755 index 00000000..0fcc121a --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/vuex-root @@ -0,0 +1 @@ +THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/x/nftoracle/client/cli/query.go b/x/nftoracle/client/cli/query.go index 19915681..6ac973af 100644 --- a/x/nftoracle/client/cli/query.go +++ b/x/nftoracle/client/cli/query.go @@ -29,6 +29,8 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdShowMintRequest()) cmd.AddCommand(CmdListActionRequest()) cmd.AddCommand(CmdShowActionRequest()) + cmd.AddCommand(CmdListCollectionOwnerRequest()) + cmd.AddCommand(CmdShowCollectionOwnerRequest()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/nftoracle/client/cli/query_collection_owner_request.go b/x/nftoracle/client/cli/query_collection_owner_request.go new file mode 100644 index 00000000..683000e6 --- /dev/null +++ b/x/nftoracle/client/cli/query_collection_owner_request.go @@ -0,0 +1,77 @@ +package cli + +import ( + "context" + "strconv" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + "github.com/thesixnetwork/sixnft/x/nftoracle/types" +) + +func CmdListCollectionOwnerRequest() *cobra.Command { + cmd := &cobra.Command{ + Use: "list-collection-owner-request", + Short: "list all CollectionOwnerRequest", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryAllCollectionOwnerRequestRequest{ + Pagination: pageReq, + } + + res, err := queryClient.CollectionOwnerRequestAll(context.Background(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddPaginationFlagsToCmd(cmd, cmd.Use) + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func CmdShowCollectionOwnerRequest() *cobra.Command { + cmd := &cobra.Command{ + Use: "show-collection-owner-request [id]", + Short: "shows a CollectionOwnerRequest", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + id, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + params := &types.QueryGetCollectionOwnerRequestRequest{ + Id: id, + } + + res, err := queryClient.CollectionOwnerRequest(context.Background(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/nftoracle/client/cli/query_collection_owner_request_test.go b/x/nftoracle/client/cli/query_collection_owner_request_test.go new file mode 100644 index 00000000..a130c821 --- /dev/null +++ b/x/nftoracle/client/cli/query_collection_owner_request_test.go @@ -0,0 +1,153 @@ +package cli_test + +import ( + "fmt" + "testing" + + "github.com/cosmos/cosmos-sdk/client/flags" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/stretchr/testify/require" + tmcli "github.com/tendermint/tendermint/libs/cli" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/thesixnetwork/sixnft/testutil/network" + "github.com/thesixnetwork/sixnft/testutil/nullify" + "github.com/thesixnetwork/sixnft/x/nftoracle/client/cli" + "github.com/thesixnetwork/sixnft/x/nftoracle/types" +) + +func networkWithCollectionOwnerRequestObjects(t *testing.T, n int) (*network.Network, []types.CollectionOwnerRequest) { + t.Helper() + cfg := network.DefaultConfig() + state := types.GenesisState{} + require.NoError(t, cfg.Codec.UnmarshalJSON(cfg.GenesisState[types.ModuleName], &state)) + + for i := 0; i < n; i++ { + collectionOwnerRequest := types.CollectionOwnerRequest{ + Id: uint64(i), + } + nullify.Fill(&collectionOwnerRequest) + state.CollectionOwnerRequestList = append(state.CollectionOwnerRequestList, collectionOwnerRequest) + } + buf, err := cfg.Codec.MarshalJSON(&state) + require.NoError(t, err) + cfg.GenesisState[types.ModuleName] = buf + return network.New(t, cfg), state.CollectionOwnerRequestList +} + +func TestShowCollectionOwnerRequest(t *testing.T) { + net, objs := networkWithCollectionOwnerRequestObjects(t, 2) + + ctx := net.Validators[0].ClientCtx + common := []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + for _, tc := range []struct { + desc string + id string + args []string + err error + obj types.CollectionOwnerRequest + }{ + { + desc: "found", + id: fmt.Sprintf("%d", objs[0].Id), + args: common, + obj: objs[0], + }, + { + desc: "not found", + id: "not_found", + args: common, + err: status.Error(codes.NotFound, "not found"), + }, + } { + tc := tc + t.Run(tc.desc, func(t *testing.T) { + args := []string{tc.id} + args = append(args, tc.args...) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdShowCollectionOwnerRequest(), args) + if tc.err != nil { + stat, ok := status.FromError(tc.err) + require.True(t, ok) + require.ErrorIs(t, stat.Err(), tc.err) + } else { + require.NoError(t, err) + var resp types.QueryGetCollectionOwnerRequestResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.NotNil(t, resp.CollectionOwnerRequest) + require.Equal(t, + nullify.Fill(&tc.obj), + nullify.Fill(&resp.CollectionOwnerRequest), + ) + } + }) + } +} + +func TestListCollectionOwnerRequest(t *testing.T) { + net, objs := networkWithCollectionOwnerRequestObjects(t, 5) + + ctx := net.Validators[0].ClientCtx + request := func(next []byte, offset, limit uint64, total bool) []string { + args := []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + if next == nil { + args = append(args, fmt.Sprintf("--%s=%d", flags.FlagOffset, offset)) + } else { + args = append(args, fmt.Sprintf("--%s=%s", flags.FlagPageKey, next)) + } + args = append(args, fmt.Sprintf("--%s=%d", flags.FlagLimit, limit)) + if total { + args = append(args, fmt.Sprintf("--%s", flags.FlagCountTotal)) + } + return args + } + t.Run("ByOffset", func(t *testing.T) { + step := 2 + for i := 0; i < len(objs); i += step { + args := request(nil, uint64(i), uint64(step), false) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListCollectionOwnerRequest(), args) + require.NoError(t, err) + var resp types.QueryAllCollectionOwnerRequestResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.LessOrEqual(t, len(resp.CollectionOwnerRequest), step) + require.Subset(t, + nullify.Fill(objs), + nullify.Fill(resp.CollectionOwnerRequest), + ) + } + }) + t.Run("ByKey", func(t *testing.T) { + step := 2 + var next []byte + for i := 0; i < len(objs); i += step { + args := request(next, 0, uint64(step), false) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListCollectionOwnerRequest(), args) + require.NoError(t, err) + var resp types.QueryAllCollectionOwnerRequestResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.LessOrEqual(t, len(resp.CollectionOwnerRequest), step) + require.Subset(t, + nullify.Fill(objs), + nullify.Fill(resp.CollectionOwnerRequest), + ) + next = resp.Pagination.NextKey + } + }) + t.Run("Total", func(t *testing.T) { + args := request(nil, 0, uint64(len(objs)), true) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListCollectionOwnerRequest(), args) + require.NoError(t, err) + var resp types.QueryAllCollectionOwnerRequestResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.NoError(t, err) + require.Equal(t, len(objs), int(resp.Pagination.Total)) + require.ElementsMatch(t, + nullify.Fill(objs), + nullify.Fill(resp.CollectionOwnerRequest), + ) + }) +} diff --git a/x/nftoracle/genesis.go b/x/nftoracle/genesis.go index 18c9ecfc..a746ddbb 100644 --- a/x/nftoracle/genesis.go +++ b/x/nftoracle/genesis.go @@ -28,6 +28,13 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) // Set actionRequest count k.SetActionRequestCount(ctx, genState.ActionRequestCount) + // Set all the collectionOwnerRequest + for _, elem := range genState.CollectionOwnerRequestList { + k.SetCollectionOwnerRequest(ctx, elem) + } + + // Set collectionOwnerRequest count + k.SetCollectionOwnerRequestCount(ctx, genState.CollectionOwnerRequestCount) // this line is used by starport scaffolding # genesis/module/init k.SetParams(ctx, genState.Params) } @@ -41,6 +48,8 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { genesis.MintRequestCount = k.GetMintRequestCount(ctx) genesis.ActionRequestList = k.GetAllActionRequest(ctx) genesis.ActionRequestCount = k.GetActionRequestCount(ctx) + genesis.CollectionOwnerRequestList = k.GetAllCollectionOwnerRequest(ctx) + genesis.CollectionOwnerRequestCount = k.GetCollectionOwnerRequestCount(ctx) // this line is used by starport scaffolding # genesis/module/export return genesis diff --git a/x/nftoracle/genesis_test.go b/x/nftoracle/genesis_test.go index b1d4ab8b..379e27a7 100644 --- a/x/nftoracle/genesis_test.go +++ b/x/nftoracle/genesis_test.go @@ -33,6 +33,15 @@ func TestGenesis(t *testing.T) { }, }, ActionRequestCount: 2, + CollectionOwnerRequestList: []types.CollectionOwnerRequest{ + { + Id: 0, + }, + { + Id: 1, + }, + }, + CollectionOwnerRequestCount: 2, // this line is used by starport scaffolding # genesis/test/state } @@ -48,5 +57,7 @@ func TestGenesis(t *testing.T) { require.Equal(t, genesisState.MintRequestCount, got.MintRequestCount) require.ElementsMatch(t, genesisState.ActionRequestList, got.ActionRequestList) require.Equal(t, genesisState.ActionRequestCount, got.ActionRequestCount) + require.ElementsMatch(t, genesisState.CollectionOwnerRequestList, got.CollectionOwnerRequestList) + require.Equal(t, genesisState.CollectionOwnerRequestCount, got.CollectionOwnerRequestCount) // this line is used by starport scaffolding # genesis/test/assert } diff --git a/x/nftoracle/keeper/collection_owner_request.go b/x/nftoracle/keeper/collection_owner_request.go new file mode 100644 index 00000000..a43cdce0 --- /dev/null +++ b/x/nftoracle/keeper/collection_owner_request.go @@ -0,0 +1,106 @@ +package keeper + +import ( + "encoding/binary" + + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/thesixnetwork/sixnft/x/nftoracle/types" +) + +// GetCollectionOwnerRequestCount get the total number of collectionOwnerRequest +func (k Keeper) GetCollectionOwnerRequestCount(ctx sdk.Context) uint64 { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte{}) + byteKey := types.KeyPrefix(types.CollectionOwnerRequestCountKey) + bz := store.Get(byteKey) + + // Count doesn't exist: no element + if bz == nil { + return 0 + } + + // Parse bytes + return binary.BigEndian.Uint64(bz) +} + +// SetCollectionOwnerRequestCount set the total number of collectionOwnerRequest +func (k Keeper) SetCollectionOwnerRequestCount(ctx sdk.Context, count uint64) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte{}) + byteKey := types.KeyPrefix(types.CollectionOwnerRequestCountKey) + bz := make([]byte, 8) + binary.BigEndian.PutUint64(bz, count) + store.Set(byteKey, bz) +} + +// AppendCollectionOwnerRequest appends a collectionOwnerRequest in the store with a new id and update the count +func (k Keeper) AppendCollectionOwnerRequest( + ctx sdk.Context, + collectionOwnerRequest types.CollectionOwnerRequest, +) uint64 { + // Create the collectionOwnerRequest + count := k.GetCollectionOwnerRequestCount(ctx) + + // Set the ID of the appended value + collectionOwnerRequest.Id = count + + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.CollectionOwnerRequestKey)) + appendedValue := k.cdc.MustMarshal(&collectionOwnerRequest) + store.Set(GetCollectionOwnerRequestIDBytes(collectionOwnerRequest.Id), appendedValue) + + // Update collectionOwnerRequest count + k.SetCollectionOwnerRequestCount(ctx, count+1) + + return count +} + +// SetCollectionOwnerRequest set a specific collectionOwnerRequest in the store +func (k Keeper) SetCollectionOwnerRequest(ctx sdk.Context, collectionOwnerRequest types.CollectionOwnerRequest) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.CollectionOwnerRequestKey)) + b := k.cdc.MustMarshal(&collectionOwnerRequest) + store.Set(GetCollectionOwnerRequestIDBytes(collectionOwnerRequest.Id), b) +} + +// GetCollectionOwnerRequest returns a collectionOwnerRequest from its id +func (k Keeper) GetCollectionOwnerRequest(ctx sdk.Context, id uint64) (val types.CollectionOwnerRequest, found bool) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.CollectionOwnerRequestKey)) + b := store.Get(GetCollectionOwnerRequestIDBytes(id)) + if b == nil { + return val, false + } + k.cdc.MustUnmarshal(b, &val) + return val, true +} + +// RemoveCollectionOwnerRequest removes a collectionOwnerRequest from the store +func (k Keeper) RemoveCollectionOwnerRequest(ctx sdk.Context, id uint64) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.CollectionOwnerRequestKey)) + store.Delete(GetCollectionOwnerRequestIDBytes(id)) +} + +// GetAllCollectionOwnerRequest returns all collectionOwnerRequest +func (k Keeper) GetAllCollectionOwnerRequest(ctx sdk.Context) (list []types.CollectionOwnerRequest) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.CollectionOwnerRequestKey)) + iterator := sdk.KVStorePrefixIterator(store, []byte{}) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var val types.CollectionOwnerRequest + k.cdc.MustUnmarshal(iterator.Value(), &val) + list = append(list, val) + } + + return +} + +// GetCollectionOwnerRequestIDBytes returns the byte representation of the ID +func GetCollectionOwnerRequestIDBytes(id uint64) []byte { + bz := make([]byte, 8) + binary.BigEndian.PutUint64(bz, id) + return bz +} + +// GetCollectionOwnerRequestIDFromBytes returns ID in uint64 format from a byte array +func GetCollectionOwnerRequestIDFromBytes(bz []byte) uint64 { + return binary.BigEndian.Uint64(bz) +} diff --git a/x/nftoracle/keeper/collection_owner_request_test.go b/x/nftoracle/keeper/collection_owner_request_test.go new file mode 100644 index 00000000..961387ac --- /dev/null +++ b/x/nftoracle/keeper/collection_owner_request_test.go @@ -0,0 +1,59 @@ +package keeper_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + keepertest "github.com/thesixnetwork/sixnft/testutil/keeper" + "github.com/thesixnetwork/sixnft/testutil/nullify" + "github.com/thesixnetwork/sixnft/x/nftoracle/keeper" + "github.com/thesixnetwork/sixnft/x/nftoracle/types" +) + +func createNCollectionOwnerRequest(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.CollectionOwnerRequest { + items := make([]types.CollectionOwnerRequest, n) + for i := range items { + items[i].Id = keeper.AppendCollectionOwnerRequest(ctx, items[i]) + } + return items +} + +func TestCollectionOwnerRequestGet(t *testing.T) { + keeper, ctx := keepertest.NftoracleKeeper(t) + items := createNCollectionOwnerRequest(keeper, ctx, 10) + for _, item := range items { + got, found := keeper.GetCollectionOwnerRequest(ctx, item.Id) + require.True(t, found) + require.Equal(t, + nullify.Fill(&item), + nullify.Fill(&got), + ) + } +} + +func TestCollectionOwnerRequestRemove(t *testing.T) { + keeper, ctx := keepertest.NftoracleKeeper(t) + items := createNCollectionOwnerRequest(keeper, ctx, 10) + for _, item := range items { + keeper.RemoveCollectionOwnerRequest(ctx, item.Id) + _, found := keeper.GetCollectionOwnerRequest(ctx, item.Id) + require.False(t, found) + } +} + +func TestCollectionOwnerRequestGetAll(t *testing.T) { + keeper, ctx := keepertest.NftoracleKeeper(t) + items := createNCollectionOwnerRequest(keeper, ctx, 10) + require.ElementsMatch(t, + nullify.Fill(items), + nullify.Fill(keeper.GetAllCollectionOwnerRequest(ctx)), + ) +} + +func TestCollectionOwnerRequestCount(t *testing.T) { + keeper, ctx := keepertest.NftoracleKeeper(t) + items := createNCollectionOwnerRequest(keeper, ctx, 10) + count := uint64(len(items)) + require.Equal(t, count, keeper.GetCollectionOwnerRequestCount(ctx)) +} diff --git a/x/nftoracle/keeper/grpc_query_collection_owner_request.go b/x/nftoracle/keeper/grpc_query_collection_owner_request.go new file mode 100644 index 00000000..e6ac5da1 --- /dev/null +++ b/x/nftoracle/keeper/grpc_query_collection_owner_request.go @@ -0,0 +1,55 @@ +package keeper + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/thesixnetwork/sixnft/x/nftoracle/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) CollectionOwnerRequestAll(c context.Context, req *types.QueryAllCollectionOwnerRequestRequest) (*types.QueryAllCollectionOwnerRequestResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + var collectionOwnerRequests []types.CollectionOwnerRequest + ctx := sdk.UnwrapSDKContext(c) + + store := ctx.KVStore(k.storeKey) + collectionOwnerRequestStore := prefix.NewStore(store, types.KeyPrefix(types.CollectionOwnerRequestKey)) + + pageRes, err := query.Paginate(collectionOwnerRequestStore, req.Pagination, func(key []byte, value []byte) error { + var collectionOwnerRequest types.CollectionOwnerRequest + if err := k.cdc.Unmarshal(value, &collectionOwnerRequest); err != nil { + return err + } + + collectionOwnerRequests = append(collectionOwnerRequests, collectionOwnerRequest) + return nil + }) + + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryAllCollectionOwnerRequestResponse{CollectionOwnerRequest: collectionOwnerRequests, Pagination: pageRes}, nil +} + +func (k Keeper) CollectionOwnerRequest(c context.Context, req *types.QueryGetCollectionOwnerRequestRequest) (*types.QueryGetCollectionOwnerRequestResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(c) + collectionOwnerRequest, found := k.GetCollectionOwnerRequest(ctx, req.Id) + if !found { + return nil, sdkerrors.ErrKeyNotFound + } + + return &types.QueryGetCollectionOwnerRequestResponse{CollectionOwnerRequest: collectionOwnerRequest}, nil +} diff --git a/x/nftoracle/keeper/grpc_query_collection_owner_request_test.go b/x/nftoracle/keeper/grpc_query_collection_owner_request_test.go new file mode 100644 index 00000000..bf6cccbd --- /dev/null +++ b/x/nftoracle/keeper/grpc_query_collection_owner_request_test.go @@ -0,0 +1,117 @@ +package keeper_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + keepertest "github.com/thesixnetwork/sixnft/testutil/keeper" + "github.com/thesixnetwork/sixnft/testutil/nullify" + "github.com/thesixnetwork/sixnft/x/nftoracle/types" +) + +func TestCollectionOwnerRequestQuerySingle(t *testing.T) { + keeper, ctx := keepertest.NftoracleKeeper(t) + wctx := sdk.WrapSDKContext(ctx) + msgs := createNCollectionOwnerRequest(keeper, ctx, 2) + for _, tc := range []struct { + desc string + request *types.QueryGetCollectionOwnerRequestRequest + response *types.QueryGetCollectionOwnerRequestResponse + err error + }{ + { + desc: "First", + request: &types.QueryGetCollectionOwnerRequestRequest{Id: msgs[0].Id}, + response: &types.QueryGetCollectionOwnerRequestResponse{CollectionOwnerRequest: msgs[0]}, + }, + { + desc: "Second", + request: &types.QueryGetCollectionOwnerRequestRequest{Id: msgs[1].Id}, + response: &types.QueryGetCollectionOwnerRequestResponse{CollectionOwnerRequest: msgs[1]}, + }, + { + desc: "KeyNotFound", + request: &types.QueryGetCollectionOwnerRequestRequest{Id: uint64(len(msgs))}, + err: sdkerrors.ErrKeyNotFound, + }, + { + desc: "InvalidRequest", + err: status.Error(codes.InvalidArgument, "invalid request"), + }, + } { + t.Run(tc.desc, func(t *testing.T) { + response, err := keeper.CollectionOwnerRequest(wctx, tc.request) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + require.Equal(t, + nullify.Fill(tc.response), + nullify.Fill(response), + ) + } + }) + } +} + +func TestCollectionOwnerRequestQueryPaginated(t *testing.T) { + keeper, ctx := keepertest.NftoracleKeeper(t) + wctx := sdk.WrapSDKContext(ctx) + msgs := createNCollectionOwnerRequest(keeper, ctx, 5) + + request := func(next []byte, offset, limit uint64, total bool) *types.QueryAllCollectionOwnerRequestRequest { + return &types.QueryAllCollectionOwnerRequestRequest{ + Pagination: &query.PageRequest{ + Key: next, + Offset: offset, + Limit: limit, + CountTotal: total, + }, + } + } + t.Run("ByOffset", func(t *testing.T) { + step := 2 + for i := 0; i < len(msgs); i += step { + resp, err := keeper.CollectionOwnerRequestAll(wctx, request(nil, uint64(i), uint64(step), false)) + require.NoError(t, err) + require.LessOrEqual(t, len(resp.CollectionOwnerRequest), step) + require.Subset(t, + nullify.Fill(msgs), + nullify.Fill(resp.CollectionOwnerRequest), + ) + } + }) + t.Run("ByKey", func(t *testing.T) { + step := 2 + var next []byte + for i := 0; i < len(msgs); i += step { + resp, err := keeper.CollectionOwnerRequestAll(wctx, request(next, 0, uint64(step), false)) + require.NoError(t, err) + require.LessOrEqual(t, len(resp.CollectionOwnerRequest), step) + require.Subset(t, + nullify.Fill(msgs), + nullify.Fill(resp.CollectionOwnerRequest), + ) + next = resp.Pagination.NextKey + } + }) + t.Run("Total", func(t *testing.T) { + resp, err := keeper.CollectionOwnerRequestAll(wctx, request(nil, 0, 0, true)) + require.NoError(t, err) + require.Equal(t, len(msgs), int(resp.Pagination.Total)) + require.ElementsMatch(t, + nullify.Fill(msgs), + nullify.Fill(resp.CollectionOwnerRequest), + ) + }) + t.Run("InvalidRequest", func(t *testing.T) { + _, err := keeper.CollectionOwnerRequestAll(wctx, nil) + require.ErrorIs(t, err, status.Error(codes.InvalidArgument, "invalid request")) + }) +} diff --git a/x/nftoracle/types/action_request.pb.go b/x/nftoracle/types/action_request.pb.go index 6a3e925b..da71f2de 100644 --- a/x/nftoracle/types/action_request.pb.go +++ b/x/nftoracle/types/action_request.pb.go @@ -111,7 +111,7 @@ type ActionRequest struct { Caller string `protobuf:"bytes,5,opt,name=caller,proto3" json:"caller,omitempty"` RefId string `protobuf:"bytes,6,opt,name=ref_id,json=refId,proto3" json:"ref_id,omitempty"` RequiredConfirm uint64 `protobuf:"varint,7,opt,name=required_confirm,json=requiredConfirm,proto3" json:"required_confirm,omitempty"` - Status RequestStatus `protobuf:"varint,8,opt,name=status,proto3,enum=sixnft.nftoracle.RequestStatus" json:"status,omitempty"` + Status RequestStatus `protobuf:"varint,8,opt,name=status,proto3,enum=thesixnetwork.sixnft.nftoracle.RequestStatus" json:"status,omitempty"` CurrentConfirm uint64 `protobuf:"varint,9,opt,name=current_confirm,json=currentConfirm,proto3" json:"current_confirm,omitempty"` Confirmers map[string]bool `protobuf:"bytes,10,rep,name=confirmers,proto3" json:"confirmers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` CreatedAt time.Time `protobuf:"bytes,11,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` @@ -260,55 +260,55 @@ func (m *ActionRequest) GetExecutionErrorMessage() string { } func init() { - proto.RegisterType((*ActionParam)(nil), "sixnft.nftoracle.ActionParam") - proto.RegisterType((*ActionRequest)(nil), "sixnft.nftoracle.ActionRequest") - proto.RegisterMapType((map[string]bool)(nil), "sixnft.nftoracle.ActionRequest.ConfirmersEntry") + proto.RegisterType((*ActionParam)(nil), "thesixnetwork.sixnft.nftoracle.ActionParam") + proto.RegisterType((*ActionRequest)(nil), "thesixnetwork.sixnft.nftoracle.ActionRequest") + proto.RegisterMapType((map[string]bool)(nil), "thesixnetwork.sixnft.nftoracle.ActionRequest.ConfirmersEntry") } func init() { proto.RegisterFile("nftoracle/action_request.proto", fileDescriptor_36b7260720dc8e70) } var fileDescriptor_36b7260720dc8e70 = []byte{ - // 630 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xc7, 0xe3, 0xa4, 0x49, 0x93, 0x0d, 0x49, 0xaa, 0x55, 0x3f, 0x4c, 0x0e, 0x4e, 0x54, 0x09, - 0x08, 0x17, 0x5b, 0x14, 0x09, 0x10, 0x88, 0x43, 0x1b, 0x2a, 0xb5, 0x42, 0x08, 0xe4, 0xc2, 0x85, - 0x8b, 0xb5, 0xb5, 0xc7, 0x1f, 0xaa, 0xed, 0x0d, 0xbb, 0xe3, 0x92, 0xbe, 0x45, 0x1f, 0x8a, 0x43, - 0x8f, 0x3d, 0x72, 0x02, 0xd4, 0xde, 0x79, 0x06, 0xe4, 0xb5, 0x93, 0xa6, 0x2d, 0x08, 0xf5, 0xb6, - 0xf3, 0x9f, 0x99, 0x9d, 0xf9, 0xcd, 0xac, 0x4d, 0x8c, 0xd4, 0x47, 0x2e, 0x98, 0x1b, 0x83, 0xc5, - 0x5c, 0x8c, 0x78, 0xea, 0x08, 0xf8, 0x92, 0x81, 0x44, 0x73, 0x22, 0x38, 0x72, 0xba, 0x22, 0xa3, - 0x69, 0xea, 0xa3, 0x39, 0x0f, 0xeb, 0x6f, 0x5c, 0x65, 0xf0, 0x09, 0xa4, 0x12, 0x58, 0x11, 0xba, - 0xe8, 0xb8, 0x76, 0x47, 0x7f, 0x35, 0xe0, 0x01, 0x57, 0x47, 0x2b, 0x3f, 0x95, 0xea, 0x20, 0xe0, - 0x3c, 0x88, 0xc1, 0x52, 0xd6, 0x61, 0xe6, 0x5b, 0x18, 0x25, 0x20, 0x91, 0x25, 0x93, 0x22, 0x60, - 0xf3, 0x9b, 0x46, 0xda, 0xdb, 0xaa, 0xa7, 0x0f, 0x4c, 0xb0, 0x84, 0x3e, 0x24, 0xbd, 0xd4, 0x47, - 0x47, 0xba, 0x21, 0x24, 0xcc, 0x71, 0xb9, 0x07, 0xba, 0x36, 0xd4, 0x46, 0x2d, 0xbb, 0x93, 0xfa, - 0x78, 0xa0, 0xd4, 0x31, 0xf7, 0x80, 0xde, 0x27, 0x4d, 0xe4, 0x47, 0x90, 0x3a, 0x91, 0xa7, 0x57, - 0x55, 0xc0, 0xb2, 0xb2, 0xf7, 0x3d, 0xba, 0x4e, 0x1a, 0x05, 0xa5, 0x5e, 0x53, 0x8e, 0xd2, 0xa2, - 0x6b, 0xa4, 0x21, 0xc0, 0xcf, 0x13, 0x96, 0x94, 0x5e, 0x17, 0xe0, 0xef, 0x7b, 0x74, 0x4c, 0x08, - 0x4c, 0x27, 0x91, 0x00, 0xcf, 0x61, 0xa8, 0xd7, 0x87, 0xda, 0xa8, 0xbd, 0xd5, 0x37, 0x8b, 0xbe, - 0xcd, 0x59, 0xdf, 0xe6, 0xc7, 0x59, 0xdf, 0x3b, 0xcd, 0xb3, 0x1f, 0x83, 0xca, 0xe9, 0xcf, 0x81, - 0x66, 0xb7, 0xca, 0xbc, 0x6d, 0xdc, 0xfc, 0x5d, 0x27, 0x9d, 0x02, 0xc3, 0x2e, 0xa6, 0x42, 0xbb, - 0xa4, 0x1a, 0x79, 0xaa, 0xf7, 0x25, 0xbb, 0x1a, 0x79, 0x7f, 0x03, 0xab, 0xfe, 0x0f, 0xac, 0xf6, - 0x2f, 0xb0, 0xa5, 0x6b, 0x60, 0xeb, 0xa4, 0xe1, 0xb2, 0x38, 0x06, 0xa1, 0xba, 0x6f, 0xd9, 0xa5, - 0xb5, 0x00, 0xdc, 0x58, 0x04, 0x7e, 0x4c, 0x56, 0xf2, 0xd5, 0x29, 0x62, 0x97, 0xa7, 0x7e, 0x24, - 0x12, 0x7d, 0x59, 0xf5, 0xd9, 0x9b, 0xe9, 0xe3, 0x42, 0xa6, 0xcf, 0x49, 0x43, 0x22, 0xc3, 0x4c, - 0xea, 0xcd, 0xa1, 0x36, 0xea, 0x6e, 0x0d, 0xcc, 0x9b, 0x2f, 0xc5, 0x2c, 0x79, 0x0f, 0x54, 0x98, - 0x5d, 0x86, 0xd3, 0x47, 0xa4, 0xe7, 0x66, 0x42, 0x40, 0x8a, 0xf3, 0x12, 0x2d, 0x55, 0xa2, 0x5b, - 0xca, 0xb3, 0x0a, 0xef, 0x09, 0x29, 0x03, 0x40, 0x48, 0x9d, 0x0c, 0x6b, 0xa3, 0xf6, 0x96, 0x75, - 0xbb, 0xca, 0xb5, 0xd9, 0x9a, 0xe3, 0x79, 0xc6, 0x6e, 0x8a, 0xe2, 0xc4, 0x5e, 0xb8, 0x22, 0x5f, - 0xa7, 0x2b, 0x80, 0x61, 0xb1, 0xce, 0xf6, 0x5d, 0xd6, 0x59, 0xe6, 0x6d, 0x23, 0xdd, 0x25, 0xed, - 0x63, 0x16, 0x47, 0x9e, 0x93, 0xa5, 0x18, 0xc5, 0xfa, 0xbd, 0x3b, 0xdc, 0x42, 0x54, 0xe2, 0xa7, - 0x3c, 0x8f, 0xbe, 0x22, 0x6d, 0x8f, 0x21, 0x73, 0x42, 0x26, 0x43, 0x90, 0x7a, 0x47, 0xd1, 0xf5, - 0x6f, 0xd3, 0xbd, 0x61, 0xc8, 0xf6, 0x98, 0x0c, 0x6d, 0xe2, 0x95, 0x27, 0x90, 0xf4, 0x01, 0xe9, - 0xce, 0xde, 0x65, 0x08, 0x51, 0x10, 0xa2, 0xde, 0x1d, 0x6a, 0xa3, 0x9a, 0xdd, 0x29, 0xd5, 0x3d, - 0x25, 0xd2, 0x67, 0x64, 0x03, 0xa6, 0xe0, 0x66, 0xea, 0xb3, 0x06, 0x21, 0xb8, 0x70, 0x12, 0x90, - 0x92, 0x05, 0xa0, 0xf7, 0xd4, 0xd6, 0xd7, 0xe6, 0xee, 0xdd, 0xdc, 0xfb, 0xae, 0x70, 0xf6, 0x5f, - 0x93, 0xde, 0x8d, 0x31, 0xd2, 0x15, 0x52, 0x3b, 0x82, 0x93, 0xf2, 0x7b, 0xcb, 0x8f, 0x74, 0x95, - 0xd4, 0x8f, 0x59, 0x9c, 0x15, 0x4f, 0xb5, 0x69, 0x17, 0xc6, 0xcb, 0xea, 0x0b, 0x6d, 0xe7, 0xed, - 0xd9, 0x85, 0xa1, 0x9d, 0x5f, 0x18, 0xda, 0xaf, 0x0b, 0x43, 0x3b, 0xbd, 0x34, 0x2a, 0xe7, 0x97, - 0x46, 0xe5, 0xfb, 0xa5, 0x51, 0xf9, 0xfc, 0x24, 0x88, 0x30, 0xcc, 0x0e, 0x4d, 0x97, 0x27, 0x16, - 0x86, 0x90, 0xc3, 0x02, 0x7e, 0xe5, 0xe2, 0xc8, 0x2a, 0xb8, 0xad, 0xa9, 0x75, 0xf5, 0x0f, 0xc1, - 0x93, 0x09, 0xc8, 0xc3, 0x86, 0x9a, 0xe8, 0xd3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc5, 0xbd, - 0xa7, 0xd2, 0xa8, 0x04, 0x00, 0x00, + // 636 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4d, 0x6b, 0xdb, 0x4a, + 0x14, 0xb5, 0xec, 0x44, 0xb1, 0xc7, 0xcf, 0x76, 0x18, 0xf2, 0xa1, 0xe7, 0x85, 0x62, 0x02, 0xef, + 0x3d, 0xbf, 0x45, 0x25, 0x9a, 0x42, 0x29, 0x85, 0x2c, 0x12, 0xd7, 0x90, 0x50, 0x0a, 0x45, 0x69, + 0x37, 0x85, 0x22, 0x26, 0xd2, 0xd5, 0x07, 0x91, 0x34, 0xee, 0xcc, 0x55, 0xea, 0xfc, 0x8b, 0x2c, + 0xfb, 0x83, 0xba, 0xc8, 0x32, 0xcb, 0xae, 0xda, 0x92, 0xfc, 0x91, 0xa2, 0x91, 0xec, 0xd8, 0xa5, + 0x6d, 0xc8, 0xee, 0xde, 0x73, 0xe7, 0xcc, 0x9c, 0x73, 0xef, 0x95, 0x88, 0x99, 0x05, 0xc8, 0x05, + 0xf3, 0x12, 0xb0, 0x99, 0x87, 0x31, 0xcf, 0x5c, 0x01, 0x1f, 0x72, 0x90, 0x68, 0x4d, 0x04, 0x47, + 0x4e, 0x4d, 0x8c, 0x40, 0xc6, 0xd3, 0x0c, 0xf0, 0x23, 0x17, 0x67, 0x56, 0x11, 0x06, 0x68, 0xcd, + 0x49, 0xfd, 0xed, 0x3b, 0x3e, 0x9f, 0x40, 0x26, 0x81, 0x95, 0xc4, 0xc5, 0xc2, 0xd2, 0x8d, 0xfd, + 0x8d, 0x90, 0x87, 0x5c, 0x85, 0x76, 0x11, 0x55, 0xe8, 0x4e, 0xc8, 0x79, 0x98, 0x80, 0xad, 0xb2, + 0xd3, 0x3c, 0xb0, 0x31, 0x4e, 0x41, 0x22, 0x4b, 0x27, 0xe5, 0x81, 0xdd, 0xcf, 0x1a, 0x69, 0x1f, + 0x28, 0x85, 0xaf, 0x99, 0x60, 0x29, 0xfd, 0x97, 0xf4, 0xb2, 0x00, 0x5d, 0xe9, 0x45, 0x90, 0x32, + 0xd7, 0xe3, 0x3e, 0x18, 0xda, 0x40, 0x1b, 0xb6, 0x9c, 0x4e, 0x16, 0xe0, 0x89, 0x42, 0x47, 0xdc, + 0x07, 0xfa, 0x37, 0x69, 0x22, 0x3f, 0x83, 0xcc, 0x8d, 0x7d, 0xa3, 0xae, 0x0e, 0xac, 0xa9, 0xfc, + 0xd8, 0xa7, 0x5b, 0x44, 0x2f, 0x3d, 0x1b, 0x0d, 0x55, 0xa8, 0x32, 0xba, 0x49, 0x74, 0x01, 0x41, + 0x41, 0x58, 0x51, 0xf8, 0xaa, 0x80, 0xe0, 0xd8, 0xa7, 0x23, 0x42, 0x60, 0x3a, 0x89, 0x05, 0xf8, + 0x2e, 0x43, 0x63, 0x75, 0xa0, 0x0d, 0xdb, 0x7b, 0x7d, 0xab, 0xd4, 0x6d, 0xcd, 0x74, 0x5b, 0x6f, + 0x66, 0xba, 0x0f, 0x9b, 0x57, 0x5f, 0x77, 0x6a, 0x97, 0xdf, 0x76, 0x34, 0xa7, 0x55, 0xf1, 0x0e, + 0x70, 0xf7, 0x93, 0x4e, 0x3a, 0xa5, 0x0d, 0xa7, 0xec, 0x0a, 0xed, 0x92, 0x7a, 0xec, 0x2b, 0xed, + 0x2b, 0x4e, 0x3d, 0xf6, 0x7f, 0x65, 0xac, 0x7e, 0x9f, 0xb1, 0xc6, 0xef, 0x8c, 0xad, 0x2c, 0x19, + 0xdb, 0x22, 0xba, 0xc7, 0x92, 0x04, 0x84, 0x52, 0xdf, 0x72, 0xaa, 0x6c, 0xc1, 0xb0, 0xbe, 0x68, + 0xf8, 0x7f, 0xb2, 0x5e, 0x8c, 0x4e, 0x39, 0xf6, 0x78, 0x16, 0xc4, 0x22, 0x35, 0xd6, 0x94, 0xce, + 0xde, 0x0c, 0x1f, 0x95, 0x30, 0x1d, 0x13, 0x5d, 0x22, 0xc3, 0x5c, 0x1a, 0xcd, 0x81, 0x36, 0xec, + 0xee, 0x3d, 0xb2, 0xfe, 0xbc, 0x37, 0x56, 0xe5, 0xfe, 0x44, 0x91, 0x9c, 0x8a, 0x4c, 0xff, 0x23, + 0x3d, 0x2f, 0x17, 0x02, 0x32, 0x9c, 0x3f, 0xd8, 0x52, 0x0f, 0x76, 0x2b, 0x78, 0xf6, 0xde, 0x7b, + 0x42, 0xaa, 0x03, 0x20, 0xa4, 0x41, 0x06, 0x8d, 0x61, 0x7b, 0x6f, 0xff, 0xbe, 0x37, 0x97, 0xfa, + 0x6e, 0x8d, 0xe6, 0xfc, 0x71, 0x86, 0xe2, 0xc2, 0x59, 0xb8, 0xb0, 0x18, 0xb5, 0x27, 0x80, 0x61, + 0x39, 0xea, 0xf6, 0x43, 0x46, 0x5d, 0xf1, 0x0e, 0x90, 0x8e, 0x49, 0xfb, 0x9c, 0x25, 0xb1, 0xef, + 0xe6, 0x19, 0xc6, 0x89, 0xf1, 0xd7, 0x03, 0x6e, 0x21, 0x8a, 0xf8, 0xb6, 0xe0, 0xd1, 0x63, 0xd2, + 0xf6, 0x19, 0x32, 0x37, 0x62, 0x32, 0x02, 0x69, 0x74, 0x94, 0xd7, 0xe1, 0x7d, 0x5e, 0x5f, 0x30, + 0x64, 0x47, 0x4c, 0x46, 0x0e, 0xf1, 0xab, 0x08, 0x24, 0xfd, 0x87, 0x74, 0x67, 0x1b, 0x1c, 0x41, + 0x1c, 0x46, 0x68, 0x74, 0x07, 0xda, 0xb0, 0xe1, 0x74, 0x2a, 0xf4, 0x48, 0x81, 0xf4, 0x29, 0xd9, + 0x86, 0x29, 0x78, 0xb9, 0xfa, 0x1d, 0x80, 0x10, 0x5c, 0xb8, 0x29, 0x48, 0xc9, 0x42, 0x30, 0x7a, + 0x6a, 0x3f, 0x36, 0xe7, 0xe5, 0x71, 0x51, 0x7d, 0x55, 0x16, 0xfb, 0xfb, 0xa4, 0xf7, 0x53, 0x53, + 0xe9, 0x3a, 0x69, 0x9c, 0xc1, 0x45, 0xf5, 0x65, 0x16, 0x21, 0xdd, 0x20, 0xab, 0xe7, 0x2c, 0xc9, + 0xcb, 0xa5, 0x6e, 0x3a, 0x65, 0xf2, 0xbc, 0xfe, 0x4c, 0x3b, 0x7c, 0x79, 0x75, 0x63, 0x6a, 0xd7, + 0x37, 0xa6, 0xf6, 0xfd, 0xc6, 0xd4, 0x2e, 0x6f, 0xcd, 0xda, 0xf5, 0xad, 0x59, 0xfb, 0x72, 0x6b, + 0xd6, 0xde, 0x3d, 0x0e, 0x63, 0x8c, 0xf2, 0x53, 0xcb, 0xe3, 0xa9, 0xbd, 0xe4, 0xdb, 0x2e, 0x7d, + 0xdb, 0x53, 0xfb, 0xee, 0x6f, 0x83, 0x17, 0x13, 0x90, 0xa7, 0xba, 0xea, 0xef, 0x93, 0x1f, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x28, 0x41, 0x5f, 0x53, 0xe0, 0x04, 0x00, 0x00, } func (m *ActionParam) Marshal() (dAtA []byte, err error) { diff --git a/x/nftoracle/types/action_signature.pb.go b/x/nftoracle/types/action_signature.pb.go index c2eb135e..afec0754 100644 --- a/x/nftoracle/types/action_signature.pb.go +++ b/x/nftoracle/types/action_signature.pb.go @@ -75,25 +75,25 @@ func (m *ActionSignature) GetMessage() string { } func init() { - proto.RegisterType((*ActionSignature)(nil), "sixnft.nftoracle.ActionSignature") + proto.RegisterType((*ActionSignature)(nil), "thesixnetwork.sixnft.nftoracle.ActionSignature") } func init() { proto.RegisterFile("nftoracle/action_signature.proto", fileDescriptor_403559aa29f784a9) } var fileDescriptor_403559aa29f784a9 = []byte{ - // 181 bytes of a gzipped FileDescriptorProto + // 184 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xc8, 0x4b, 0x2b, 0xc9, 0x2f, 0x4a, 0x4c, 0xce, 0x49, 0xd5, 0x4f, 0x4c, 0x2e, 0xc9, 0xcc, 0xcf, 0x8b, 0x2f, 0xce, 0x4c, - 0xcf, 0x4b, 0x2c, 0x29, 0x2d, 0x4a, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x28, 0xce, - 0xac, 0xc8, 0x4b, 0x2b, 0xd1, 0x83, 0x2b, 0x54, 0xf2, 0xe4, 0xe2, 0x77, 0x04, 0xab, 0x0d, 0x86, - 0x29, 0x15, 0x92, 0xe1, 0xe2, 0x84, 0xeb, 0x93, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x42, 0x08, - 0x08, 0x49, 0x70, 0xb1, 0xe7, 0xa6, 0x16, 0x17, 0x27, 0xa6, 0xa7, 0x4a, 0x30, 0x81, 0xe5, 0x60, - 0x5c, 0x27, 0xef, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, - 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, 0x4c, 0xcf, - 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0xc9, 0x48, 0x05, 0x39, 0x22, 0xb5, - 0xa4, 0x3c, 0xbf, 0x28, 0x5b, 0x1f, 0xe2, 0x1e, 0xfd, 0x0a, 0x7d, 0x84, 0xd3, 0x4b, 0x2a, 0x0b, - 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x0e, 0x36, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x2b, 0xbf, - 0x58, 0xd4, 0x00, 0x00, 0x00, + 0xcf, 0x4b, 0x2c, 0x29, 0x2d, 0x4a, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x2b, 0xc9, + 0x48, 0x2d, 0xce, 0xac, 0xc8, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0xd6, 0x03, 0x31, 0xd3, 0x4a, + 0xf4, 0xe0, 0xda, 0x94, 0x3c, 0xb9, 0xf8, 0x1d, 0xc1, 0x3a, 0x83, 0x61, 0x1a, 0x85, 0x64, 0xb8, + 0x38, 0xe1, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x21, 0x04, 0x84, 0x24, 0xb8, 0xd8, + 0x73, 0x53, 0x8b, 0x8b, 0x13, 0xd3, 0x53, 0x25, 0x98, 0xc0, 0x72, 0x30, 0xae, 0x93, 0xf7, 0x89, + 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, + 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x19, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, + 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa3, 0xb8, 0x47, 0x1f, 0xe2, 0x1e, 0xfd, 0x0a, 0x7d, 0x84, 0x47, + 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xce, 0x37, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, + 0x3a, 0x78, 0xac, 0xcc, 0xe2, 0x00, 0x00, 0x00, } func (m *ActionSignature) Marshal() (dAtA []byte, err error) { diff --git a/x/nftoracle/types/collection_owner_request.pb.go b/x/nftoracle/types/collection_owner_request.pb.go new file mode 100644 index 00000000..005fe1c6 --- /dev/null +++ b/x/nftoracle/types/collection_owner_request.pb.go @@ -0,0 +1,407 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: nftoracle/collection_owner_request.proto + +package types + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type CollectionOwnerRequest struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + NftSchemaCode string `protobuf:"bytes,2,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` + Base64OwnerSignature string `protobuf:"bytes,3,opt,name=base64OwnerSignature,proto3" json:"base64OwnerSignature,omitempty"` +} + +func (m *CollectionOwnerRequest) Reset() { *m = CollectionOwnerRequest{} } +func (m *CollectionOwnerRequest) String() string { return proto.CompactTextString(m) } +func (*CollectionOwnerRequest) ProtoMessage() {} +func (*CollectionOwnerRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5b5e5fd2fa665471, []int{0} +} +func (m *CollectionOwnerRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CollectionOwnerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CollectionOwnerRequest.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 *CollectionOwnerRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CollectionOwnerRequest.Merge(m, src) +} +func (m *CollectionOwnerRequest) XXX_Size() int { + return m.Size() +} +func (m *CollectionOwnerRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CollectionOwnerRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CollectionOwnerRequest proto.InternalMessageInfo + +func (m *CollectionOwnerRequest) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *CollectionOwnerRequest) GetNftSchemaCode() string { + if m != nil { + return m.NftSchemaCode + } + return "" +} + +func (m *CollectionOwnerRequest) GetBase64OwnerSignature() string { + if m != nil { + return m.Base64OwnerSignature + } + return "" +} + +func init() { + proto.RegisterType((*CollectionOwnerRequest)(nil), "thesixnetwork.sixnft.nftoracle.CollectionOwnerRequest") +} + +func init() { + proto.RegisterFile("nftoracle/collection_owner_request.proto", fileDescriptor_5b5e5fd2fa665471) +} + +var fileDescriptor_5b5e5fd2fa665471 = []byte{ + // 234 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xc8, 0x4b, 0x2b, 0xc9, + 0x2f, 0x4a, 0x4c, 0xce, 0x49, 0xd5, 0x4f, 0xce, 0xcf, 0xc9, 0x49, 0x4d, 0x2e, 0xc9, 0xcc, 0xcf, + 0x8b, 0xcf, 0x2f, 0xcf, 0x4b, 0x2d, 0x8a, 0x2f, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0xd1, 0x2b, + 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x2b, 0xc9, 0x48, 0x2d, 0xce, 0xac, 0xc8, 0x4b, 0x2d, 0x29, + 0xcf, 0x2f, 0xca, 0xd6, 0x03, 0x31, 0xd3, 0x4a, 0xf4, 0xe0, 0xda, 0x95, 0x9a, 0x18, 0xb9, 0xc4, + 0x9c, 0xe1, 0x46, 0xf8, 0x83, 0x4c, 0x08, 0x82, 0x18, 0x20, 0xc4, 0xc7, 0xc5, 0x94, 0x99, 0x22, + 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x12, 0xc4, 0x94, 0x99, 0x22, 0xa4, 0xc2, 0xc5, 0x9b, 0x97, 0x56, + 0x12, 0x9c, 0x9c, 0x91, 0x9a, 0x9b, 0xe8, 0x9c, 0x9f, 0x92, 0x2a, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, + 0x19, 0x84, 0x2a, 0x28, 0x64, 0xc4, 0x25, 0x92, 0x94, 0x58, 0x9c, 0x6a, 0x66, 0x02, 0x36, 0x2b, + 0x38, 0x33, 0x3d, 0x2f, 0xb1, 0xa4, 0xb4, 0x28, 0x55, 0x82, 0x19, 0xac, 0x18, 0xab, 0x9c, 0x93, + 0xf7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, + 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x19, 0xa6, 0x67, 0x96, 0x64, + 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa3, 0xf8, 0x44, 0x1f, 0xe2, 0x13, 0xfd, 0x0a, 0x7d, + 0x44, 0x50, 0x94, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x3d, 0x6e, 0x0c, 0x08, 0x00, 0x00, + 0xff, 0xff, 0xd9, 0x08, 0x82, 0x0f, 0x24, 0x01, 0x00, 0x00, +} + +func (m *CollectionOwnerRequest) 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 *CollectionOwnerRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CollectionOwnerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Base64OwnerSignature) > 0 { + i -= len(m.Base64OwnerSignature) + copy(dAtA[i:], m.Base64OwnerSignature) + i = encodeVarintCollectionOwnerRequest(dAtA, i, uint64(len(m.Base64OwnerSignature))) + i-- + dAtA[i] = 0x1a + } + if len(m.NftSchemaCode) > 0 { + i -= len(m.NftSchemaCode) + copy(dAtA[i:], m.NftSchemaCode) + i = encodeVarintCollectionOwnerRequest(dAtA, i, uint64(len(m.NftSchemaCode))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintCollectionOwnerRequest(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintCollectionOwnerRequest(dAtA []byte, offset int, v uint64) int { + offset -= sovCollectionOwnerRequest(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CollectionOwnerRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovCollectionOwnerRequest(uint64(m.Id)) + } + l = len(m.NftSchemaCode) + if l > 0 { + n += 1 + l + sovCollectionOwnerRequest(uint64(l)) + } + l = len(m.Base64OwnerSignature) + if l > 0 { + n += 1 + l + sovCollectionOwnerRequest(uint64(l)) + } + return n +} + +func sovCollectionOwnerRequest(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozCollectionOwnerRequest(x uint64) (n int) { + return sovCollectionOwnerRequest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CollectionOwnerRequest) 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 ErrIntOverflowCollectionOwnerRequest + } + 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: CollectionOwnerRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CollectionOwnerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCollectionOwnerRequest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCollectionOwnerRequest + } + 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 ErrInvalidLengthCollectionOwnerRequest + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCollectionOwnerRequest + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Base64OwnerSignature", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCollectionOwnerRequest + } + 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 ErrInvalidLengthCollectionOwnerRequest + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCollectionOwnerRequest + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Base64OwnerSignature = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCollectionOwnerRequest(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCollectionOwnerRequest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCollectionOwnerRequest(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, ErrIntOverflowCollectionOwnerRequest + } + 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, ErrIntOverflowCollectionOwnerRequest + } + 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, ErrIntOverflowCollectionOwnerRequest + } + 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, ErrInvalidLengthCollectionOwnerRequest + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCollectionOwnerRequest + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthCollectionOwnerRequest + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthCollectionOwnerRequest = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCollectionOwnerRequest = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCollectionOwnerRequest = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/nftoracle/types/genesis.go b/x/nftoracle/types/genesis.go index 3c89a919..81d8e54f 100644 --- a/x/nftoracle/types/genesis.go +++ b/x/nftoracle/types/genesis.go @@ -10,8 +10,9 @@ const DefaultIndex uint64 = 1 // DefaultGenesis returns the default Capability genesis state func DefaultGenesis() *GenesisState { return &GenesisState{ - MintRequestList: []MintRequest{}, - ActionRequestList: []ActionRequest{}, + MintRequestList: []MintRequest{}, + ActionRequestList: []ActionRequest{}, + CollectionOwnerRequestList: []CollectionOwnerRequest{}, // this line is used by starport scaffolding # genesis/types/default Params: DefaultParams(), } @@ -44,6 +45,18 @@ func (gs GenesisState) Validate() error { } actionRequestIdMap[elem.Id] = true } + // Check for duplicated ID in collectionOwnerRequest + collectionOwnerRequestIdMap := make(map[uint64]bool) + collectionOwnerRequestCount := gs.GetCollectionOwnerRequestCount() + for _, elem := range gs.CollectionOwnerRequestList { + if _, ok := collectionOwnerRequestIdMap[elem.Id]; ok { + return fmt.Errorf("duplicated id for collectionOwnerRequest") + } + if elem.Id >= collectionOwnerRequestCount { + return fmt.Errorf("collectionOwnerRequest id should be lower or equal than the last id") + } + collectionOwnerRequestIdMap[elem.Id] = true + } // this line is used by starport scaffolding # genesis/types/validate return gs.Params.Validate() diff --git a/x/nftoracle/types/genesis.pb.go b/x/nftoracle/types/genesis.pb.go index afe0ba41..f4f9e1f1 100644 --- a/x/nftoracle/types/genesis.pb.go +++ b/x/nftoracle/types/genesis.pb.go @@ -25,11 +25,13 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the nftoracle module's genesis state. type GenesisState struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - MintRequestList []MintRequest `protobuf:"bytes,2,rep,name=mintRequestList,proto3" json:"mintRequestList"` - MintRequestCount uint64 `protobuf:"varint,3,opt,name=mintRequestCount,proto3" json:"mintRequestCount,omitempty"` - ActionRequestList []ActionRequest `protobuf:"bytes,4,rep,name=actionRequestList,proto3" json:"actionRequestList"` - ActionRequestCount uint64 `protobuf:"varint,5,opt,name=actionRequestCount,proto3" json:"actionRequestCount,omitempty"` + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + MintRequestList []MintRequest `protobuf:"bytes,2,rep,name=mintRequestList,proto3" json:"mintRequestList"` + MintRequestCount uint64 `protobuf:"varint,3,opt,name=mintRequestCount,proto3" json:"mintRequestCount,omitempty"` + ActionRequestList []ActionRequest `protobuf:"bytes,4,rep,name=actionRequestList,proto3" json:"actionRequestList"` + ActionRequestCount uint64 `protobuf:"varint,5,opt,name=actionRequestCount,proto3" json:"actionRequestCount,omitempty"` + CollectionOwnerRequestList []CollectionOwnerRequest `protobuf:"bytes,6,rep,name=collectionOwnerRequestList,proto3" json:"collectionOwnerRequestList"` + CollectionOwnerRequestCount uint64 `protobuf:"varint,7,opt,name=collectionOwnerRequestCount,proto3" json:"collectionOwnerRequestCount,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -100,34 +102,52 @@ func (m *GenesisState) GetActionRequestCount() uint64 { return 0 } +func (m *GenesisState) GetCollectionOwnerRequestList() []CollectionOwnerRequest { + if m != nil { + return m.CollectionOwnerRequestList + } + return nil +} + +func (m *GenesisState) GetCollectionOwnerRequestCount() uint64 { + if m != nil { + return m.CollectionOwnerRequestCount + } + return 0 +} + func init() { - proto.RegisterType((*GenesisState)(nil), "sixnft.nftoracle.GenesisState") + proto.RegisterType((*GenesisState)(nil), "thesixnetwork.sixnft.nftoracle.GenesisState") } func init() { proto.RegisterFile("nftoracle/genesis.proto", fileDescriptor_7a4e710a676a8edd) } var fileDescriptor_7a4e710a676a8edd = []byte{ - // 314 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0x4b, 0x2b, 0xc9, - 0x2f, 0x4a, 0x4c, 0xce, 0x49, 0xd5, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, - 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x28, 0xce, 0xac, 0xc8, 0x4b, 0x2b, 0xd1, 0x83, 0xcb, 0x4b, 0x89, - 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x25, 0xf5, 0x41, 0x2c, 0x88, 0x3a, 0x29, 0x31, 0x84, 0x01, 0x05, - 0x89, 0x45, 0x89, 0xb9, 0x50, 0xfd, 0x52, 0x32, 0x08, 0xf1, 0xdc, 0xcc, 0xbc, 0x92, 0xf8, 0xa2, - 0xd4, 0xc2, 0xd2, 0xd4, 0xe2, 0x12, 0xa8, 0xac, 0x1c, 0x42, 0x36, 0x31, 0xb9, 0x24, 0x33, 0x3f, - 0x0f, 0x55, 0x5e, 0xe9, 0x18, 0x13, 0x17, 0x8f, 0x3b, 0xc4, 0x3d, 0xc1, 0x25, 0x89, 0x25, 0xa9, - 0x42, 0x66, 0x5c, 0x6c, 0x10, 0xe3, 0x25, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0x24, 0xf4, 0xd0, - 0xdd, 0xa7, 0x17, 0x00, 0x96, 0x77, 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x08, 0xaa, 0x5a, 0xc8, - 0x97, 0x8b, 0x1f, 0x64, 0x7d, 0x10, 0xc4, 0x74, 0x9f, 0xcc, 0xe2, 0x12, 0x09, 0x26, 0x05, 0x66, - 0x0d, 0x6e, 0x23, 0x59, 0x4c, 0x03, 0x7c, 0x11, 0x0a, 0xa1, 0xa6, 0xa0, 0xeb, 0x15, 0xd2, 0xe2, - 0x12, 0x40, 0x12, 0x72, 0xce, 0x2f, 0xcd, 0x2b, 0x91, 0x60, 0x56, 0x60, 0xd4, 0x60, 0x09, 0xc2, - 0x10, 0x17, 0x0a, 0xe6, 0x12, 0x84, 0xf8, 0x0d, 0xd9, 0x72, 0x16, 0xb0, 0xe5, 0xf2, 0x98, 0x96, - 0x3b, 0x22, 0x2b, 0x85, 0x5a, 0x8f, 0xa9, 0x5f, 0x48, 0x8f, 0x4b, 0x08, 0x45, 0x10, 0xe2, 0x04, - 0x56, 0xb0, 0x13, 0xb0, 0xc8, 0x38, 0x79, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, - 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, - 0x43, 0x94, 0x61, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x49, 0x46, - 0x2a, 0xc8, 0x41, 0xa9, 0x25, 0xe5, 0xf9, 0x45, 0xd9, 0xfa, 0x10, 0xb7, 0xe9, 0x57, 0xe8, 0x23, - 0x22, 0xa9, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0x39, 0xc6, 0x80, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xe7, 0x54, 0xeb, 0xe2, 0x35, 0x02, 0x00, 0x00, + // 372 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x4f, 0x4b, 0xfb, 0x30, + 0x18, 0xc7, 0xdb, 0xdf, 0xfa, 0x9b, 0x90, 0x09, 0x6a, 0x10, 0x1d, 0x55, 0xe2, 0xf0, 0x20, 0x45, + 0x31, 0xc5, 0x09, 0x9e, 0x75, 0x13, 0x3c, 0xa8, 0x28, 0xf3, 0xa6, 0x07, 0xe9, 0x4a, 0xd6, 0x15, + 0xb7, 0x64, 0xb6, 0xcf, 0xd8, 0x04, 0x5f, 0x84, 0x2f, 0xc5, 0x97, 0xb1, 0xe3, 0x8e, 0x9e, 0x44, + 0xb6, 0x37, 0x22, 0x4d, 0x8a, 0xe9, 0xfe, 0xb0, 0xdd, 0xc2, 0xf3, 0xfd, 0xd3, 0x4f, 0x9a, 0x07, + 0x6d, 0xf3, 0x06, 0x88, 0xc8, 0xf3, 0x5b, 0xcc, 0x0d, 0x18, 0x67, 0x71, 0x18, 0xd3, 0x4e, 0x24, + 0x40, 0x60, 0x02, 0x4d, 0x16, 0x87, 0x7d, 0xce, 0xa0, 0x27, 0xa2, 0x17, 0x9a, 0x1c, 0x1b, 0x40, + 0xff, 0xdc, 0xf6, 0x66, 0x20, 0x02, 0x21, 0xad, 0x6e, 0x72, 0x52, 0x29, 0x7b, 0x4b, 0xd7, 0x75, + 0xbc, 0xc8, 0x6b, 0xa7, 0x6d, 0xf6, 0xae, 0x9e, 0xb7, 0x43, 0x0e, 0xcf, 0x11, 0x7b, 0xed, 0xb2, + 0x18, 0x52, 0x95, 0x68, 0xd5, 0xf3, 0x21, 0x14, 0x7c, 0x4a, 0x77, 0xb4, 0xee, 0x8b, 0x56, 0x8b, + 0x29, 0x8f, 0xe8, 0x71, 0x16, 0x4d, 0x3a, 0xf7, 0x3f, 0x2d, 0xb4, 0x7a, 0xa5, 0xee, 0xf1, 0x00, + 0x1e, 0x30, 0x7c, 0x89, 0xf2, 0x0a, 0xa4, 0x68, 0x96, 0x4c, 0xa7, 0x50, 0x3e, 0xa0, 0x8b, 0xef, + 0x45, 0xef, 0xa5, 0xbb, 0x62, 0x0d, 0xbe, 0xf7, 0x8c, 0x5a, 0x9a, 0xc5, 0x4f, 0x68, 0x2d, 0xc1, + 0xae, 0xa9, 0x6f, 0xdd, 0x84, 0x31, 0x14, 0xff, 0x95, 0x72, 0x4e, 0xa1, 0x7c, 0xb4, 0xac, 0xee, + 0x56, 0xc7, 0xd2, 0xce, 0xe9, 0x26, 0x7c, 0x88, 0xd6, 0x33, 0xa3, 0xaa, 0xe8, 0x72, 0x28, 0xe6, + 0x4a, 0xa6, 0x63, 0xd5, 0x66, 0xe6, 0xd8, 0x43, 0x1b, 0xea, 0x0f, 0x65, 0x51, 0x2c, 0x89, 0x72, + 0xbc, 0x0c, 0xe5, 0x22, 0x1b, 0x4c, 0x61, 0x66, 0xdb, 0x30, 0x45, 0x78, 0x62, 0xa8, 0x80, 0xfe, + 0x4b, 0xa0, 0x39, 0x0a, 0x7e, 0x47, 0xb6, 0x7e, 0x94, 0xbb, 0xe4, 0x4d, 0xb2, 0x6c, 0x79, 0xc9, + 0x76, 0xb6, 0x8c, 0xad, 0x3a, 0xb7, 0x21, 0x85, 0x5c, 0xd0, 0x8f, 0xcf, 0xd1, 0xce, 0x7c, 0x55, + 0x61, 0xaf, 0x48, 0xec, 0x45, 0x96, 0xca, 0xf5, 0x60, 0x44, 0xcc, 0xe1, 0x88, 0x98, 0x3f, 0x23, + 0x62, 0x7e, 0x8c, 0x89, 0x31, 0x1c, 0x13, 0xe3, 0x6b, 0x4c, 0x8c, 0xc7, 0x93, 0x20, 0x84, 0x66, + 0xb7, 0x4e, 0x7d, 0xd1, 0x76, 0x27, 0xf8, 0x5d, 0xc5, 0xef, 0xf6, 0x5d, 0xbd, 0x98, 0xf0, 0xd6, + 0x61, 0x71, 0x3d, 0x2f, 0xd7, 0xf0, 0xf4, 0x37, 0x00, 0x00, 0xff, 0xff, 0xca, 0xa1, 0x8c, 0xce, + 0x57, 0x03, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -150,6 +170,25 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.CollectionOwnerRequestCount != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.CollectionOwnerRequestCount)) + i-- + dAtA[i] = 0x38 + } + if len(m.CollectionOwnerRequestList) > 0 { + for iNdEx := len(m.CollectionOwnerRequestList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CollectionOwnerRequestList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } if m.ActionRequestCount != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.ActionRequestCount)) i-- @@ -238,6 +277,15 @@ func (m *GenesisState) Size() (n int) { if m.ActionRequestCount != 0 { n += 1 + sovGenesis(uint64(m.ActionRequestCount)) } + if len(m.CollectionOwnerRequestList) > 0 { + for _, e := range m.CollectionOwnerRequestList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.CollectionOwnerRequestCount != 0 { + n += 1 + sovGenesis(uint64(m.CollectionOwnerRequestCount)) + } return n } @@ -415,6 +463,59 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { break } } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CollectionOwnerRequestList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CollectionOwnerRequestList = append(m.CollectionOwnerRequestList, CollectionOwnerRequest{}) + if err := m.CollectionOwnerRequestList[len(m.CollectionOwnerRequestList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CollectionOwnerRequestCount", wireType) + } + m.CollectionOwnerRequestCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CollectionOwnerRequestCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/nftoracle/types/genesis_test.go b/x/nftoracle/types/genesis_test.go index 5435803e..4ceb365c 100644 --- a/x/nftoracle/types/genesis_test.go +++ b/x/nftoracle/types/genesis_test.go @@ -40,6 +40,15 @@ func TestGenesisState_Validate(t *testing.T) { }, }, ActionRequestCount: 2, + CollectionOwnerRequestList: []types.CollectionOwnerRequest{ + { + Id: 0, + }, + { + Id: 1, + }, + }, + CollectionOwnerRequestCount: 2, // this line is used by starport scaffolding # types/genesis/validField }, valid: true, @@ -96,6 +105,32 @@ func TestGenesisState_Validate(t *testing.T) { }, valid: false, }, + { + desc: "duplicated collectionOwnerRequest", + genState: &types.GenesisState{ + CollectionOwnerRequestList: []types.CollectionOwnerRequest{ + { + Id: 0, + }, + { + Id: 0, + }, + }, + }, + valid: false, + }, + { + desc: "invalid collectionOwnerRequest count", + genState: &types.GenesisState{ + CollectionOwnerRequestList: []types.CollectionOwnerRequest{ + { + Id: 1, + }, + }, + CollectionOwnerRequestCount: 0, + }, + valid: false, + }, // this line is used by starport scaffolding # types/genesis/testcase } { t.Run(tc.desc, func(t *testing.T) { diff --git a/x/nftoracle/types/keys.go b/x/nftoracle/types/keys.go index 51a8673b..8432a41d 100644 --- a/x/nftoracle/types/keys.go +++ b/x/nftoracle/types/keys.go @@ -32,3 +32,8 @@ const ( ActionRequestKey = "ActionRequest-value-" ActionRequestCountKey = "ActionRequest-count-" ) + +const ( + CollectionOwnerRequestKey = "CollectionOwnerRequest-value-" + CollectionOwnerRequestCountKey = "CollectionOwnerRequest-count-" +) diff --git a/x/nftoracle/types/mint_request.pb.go b/x/nftoracle/types/mint_request.pb.go index 584fce3d..09650eb1 100644 --- a/x/nftoracle/types/mint_request.pb.go +++ b/x/nftoracle/types/mint_request.pb.go @@ -32,7 +32,7 @@ type MintRequest struct { NftSchemaCode string `protobuf:"bytes,2,opt,name=nft_schema_code,json=nftSchemaCode,proto3" json:"nft_schema_code,omitempty"` TokenId string `protobuf:"bytes,3,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` RequiredConfirm uint64 `protobuf:"varint,4,opt,name=required_confirm,json=requiredConfirm,proto3" json:"required_confirm,omitempty"` - Status RequestStatus `protobuf:"varint,5,opt,name=status,proto3,enum=sixnft.nftoracle.RequestStatus" json:"status,omitempty"` + Status RequestStatus `protobuf:"varint,5,opt,name=status,proto3,enum=thesixnetwork.sixnft.nftoracle.RequestStatus" json:"status,omitempty"` CurrentConfirm uint64 `protobuf:"varint,6,opt,name=current_confirm,json=currentConfirm,proto3" json:"current_confirm,omitempty"` Confirmers map[string]bool `protobuf:"bytes,7,rep,name=confirmers,proto3" json:"confirmers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // NftOriginData nft_origin_data = 8; @@ -153,47 +153,47 @@ func (m *MintRequest) GetExpiredHeight() int64 { } func init() { - proto.RegisterType((*MintRequest)(nil), "sixnft.nftoracle.MintRequest") - proto.RegisterMapType((map[string]bool)(nil), "sixnft.nftoracle.MintRequest.ConfirmersEntry") + proto.RegisterType((*MintRequest)(nil), "thesixnetwork.sixnft.nftoracle.MintRequest") + proto.RegisterMapType((map[string]bool)(nil), "thesixnetwork.sixnft.nftoracle.MintRequest.ConfirmersEntry") } func init() { proto.RegisterFile("nftoracle/mint_request.proto", fileDescriptor_3b5fc42e48c76b2e) } var fileDescriptor_3b5fc42e48c76b2e = []byte{ - // 524 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x4d, 0x6f, 0xd3, 0x4c, - 0x10, 0xc7, 0xe3, 0xa4, 0x2f, 0xc9, 0x5a, 0x4d, 0xaa, 0x55, 0xa5, 0xc7, 0x4f, 0x84, 0x1c, 0x0b, - 0x09, 0x30, 0x07, 0x6c, 0x51, 0x0e, 0x20, 0x10, 0x07, 0x1a, 0x2a, 0x15, 0xa1, 0x5e, 0x5c, 0xb8, - 0x70, 0xb1, 0x36, 0xf6, 0xd8, 0x5e, 0x25, 0xde, 0x0d, 0xde, 0x71, 0x49, 0xbe, 0x45, 0x3f, 0x56, - 0x8f, 0x3d, 0x72, 0x02, 0x94, 0x1c, 0xf9, 0x12, 0x28, 0x6b, 0x27, 0x0d, 0xed, 0x89, 0xdb, 0xcc, - 0xdf, 0xbf, 0x79, 0xd9, 0xbf, 0x87, 0x3c, 0x10, 0x09, 0xca, 0x82, 0x45, 0x13, 0xf0, 0x73, 0x2e, - 0x30, 0x2c, 0xe0, 0x6b, 0x09, 0x0a, 0xbd, 0x69, 0x21, 0x51, 0xd2, 0x43, 0xc5, 0x67, 0x22, 0x41, - 0x6f, 0x03, 0xf5, 0xff, 0xbb, 0xe5, 0xe5, 0x14, 0x84, 0x02, 0x56, 0xa1, 0xdb, 0x1f, 0xfe, 0xea, - 0xd1, 0x3f, 0x4a, 0x65, 0x2a, 0x75, 0xe8, 0xaf, 0xa2, 0x5a, 0x1d, 0xa4, 0x52, 0xa6, 0x13, 0xf0, - 0x75, 0x36, 0x2a, 0x13, 0x1f, 0x79, 0x0e, 0x0a, 0x59, 0x3e, 0xad, 0x80, 0x87, 0xbf, 0x77, 0x88, - 0x79, 0xce, 0x05, 0x06, 0x55, 0x33, 0xda, 0x25, 0x4d, 0x1e, 0x5b, 0x86, 0x63, 0xb8, 0x3b, 0x41, - 0x93, 0xc7, 0xf4, 0x31, 0xe9, 0x89, 0x04, 0x43, 0x15, 0x65, 0x90, 0xb3, 0x30, 0x92, 0x31, 0x58, - 0x4d, 0xc7, 0x70, 0x3b, 0xc1, 0x81, 0x48, 0xf0, 0x42, 0xab, 0x43, 0x19, 0x03, 0xfd, 0x9f, 0xb4, - 0x51, 0x8e, 0x41, 0x84, 0x3c, 0xb6, 0x5a, 0x1a, 0xd8, 0xd7, 0xf9, 0x87, 0x98, 0x3e, 0x25, 0x87, - 0xab, 0x55, 0x79, 0x01, 0x71, 0x18, 0x49, 0x91, 0xf0, 0x22, 0xb7, 0x76, 0xf4, 0x80, 0xde, 0x5a, - 0x1f, 0x56, 0x32, 0x7d, 0x49, 0xf6, 0x14, 0x32, 0x2c, 0x95, 0xb5, 0xeb, 0x18, 0x6e, 0xf7, 0x78, - 0xe0, 0xdd, 0x75, 0xc6, 0xab, 0x17, 0xbd, 0xd0, 0x58, 0x50, 0xe3, 0xf4, 0x09, 0xe9, 0x45, 0x65, - 0x51, 0x80, 0xc0, 0xcd, 0x88, 0x3d, 0x3d, 0xa2, 0x5b, 0xcb, 0xeb, 0x09, 0xe7, 0x84, 0xd4, 0x00, - 0x14, 0xca, 0xda, 0x77, 0x5a, 0xae, 0x79, 0xfc, 0xec, 0xfe, 0x94, 0x2d, 0x4b, 0xbc, 0xe1, 0x86, - 0x3f, 0x15, 0x58, 0xcc, 0x83, 0xad, 0x06, 0x74, 0x48, 0x48, 0x54, 0x00, 0x43, 0x88, 0x43, 0x86, - 0x56, 0xdb, 0x31, 0x5c, 0xf3, 0xb8, 0xef, 0x55, 0xa6, 0x7b, 0x6b, 0xd3, 0xbd, 0x4f, 0x6b, 0xd3, - 0x4f, 0xda, 0xd7, 0x3f, 0x06, 0x8d, 0xab, 0x9f, 0x03, 0x23, 0xe8, 0xd4, 0x75, 0xef, 0x90, 0x9e, - 0x12, 0xf3, 0x92, 0x4d, 0x78, 0x1c, 0x96, 0x02, 0xf9, 0xc4, 0xea, 0xfc, 0x43, 0x17, 0xa2, 0x0b, - 0x3f, 0xaf, 0xea, 0xe8, 0x1b, 0x62, 0xc6, 0x0c, 0x59, 0x98, 0x31, 0x95, 0x81, 0xb2, 0x88, 0x7e, - 0x5b, 0xff, 0xfe, 0xdb, 0xde, 0x33, 0x64, 0x67, 0x4c, 0x65, 0x01, 0x89, 0xeb, 0x08, 0x14, 0x7d, - 0x44, 0xba, 0x30, 0x9b, 0xea, 0x7f, 0x94, 0x01, 0x4f, 0x33, 0xb4, 0x4c, 0xc7, 0x70, 0x5b, 0xc1, - 0x41, 0xad, 0x9e, 0x69, 0xb1, 0xff, 0x96, 0xf4, 0xee, 0xd8, 0x41, 0x0f, 0x49, 0x6b, 0x0c, 0x73, - 0x7d, 0x32, 0x9d, 0x60, 0x15, 0xd2, 0x23, 0xb2, 0x7b, 0xc9, 0x26, 0x65, 0x75, 0x29, 0xed, 0xa0, - 0x4a, 0x5e, 0x37, 0x5f, 0x19, 0x27, 0x1f, 0xaf, 0x17, 0xb6, 0x71, 0xb3, 0xb0, 0x8d, 0x5f, 0x0b, - 0xdb, 0xb8, 0x5a, 0xda, 0x8d, 0x9b, 0xa5, 0xdd, 0xf8, 0xbe, 0xb4, 0x1b, 0x5f, 0x9e, 0xa7, 0x1c, - 0xb3, 0x72, 0xe4, 0x45, 0x32, 0xf7, 0x31, 0x83, 0xd5, 0xd2, 0x80, 0xdf, 0x64, 0x31, 0xf6, 0xab, - 0xfd, 0xfd, 0x99, 0x7f, 0x7b, 0xf9, 0x38, 0x9f, 0x82, 0x1a, 0xed, 0x69, 0x67, 0x5e, 0xfc, 0x09, - 0x00, 0x00, 0xff, 0xff, 0x51, 0x09, 0xb5, 0x44, 0x5c, 0x03, 0x00, 0x00, + // 527 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4d, 0x6f, 0xd3, 0x40, + 0x10, 0x8d, 0x93, 0x7e, 0x24, 0x6b, 0x35, 0xa9, 0x56, 0x95, 0x30, 0x11, 0x72, 0x2d, 0x24, 0xc0, + 0x1c, 0xb0, 0x45, 0xb9, 0x20, 0x10, 0x07, 0x1a, 0x2a, 0xb5, 0x42, 0x5c, 0x5c, 0xb8, 0xc0, 0xc1, + 0xda, 0xd8, 0x63, 0x7b, 0x95, 0x78, 0x37, 0x78, 0xc7, 0x25, 0xf9, 0x17, 0xbd, 0xf0, 0x9f, 0x7a, + 0xec, 0x91, 0x13, 0xa0, 0xe4, 0x8f, 0xa0, 0xac, 0x9d, 0x34, 0xe5, 0x40, 0xc5, 0xed, 0xcd, 0xf3, + 0xbc, 0x79, 0xb3, 0x33, 0x63, 0xf2, 0x40, 0x24, 0x28, 0x0b, 0x16, 0x8d, 0xc1, 0xcf, 0xb9, 0xc0, + 0xb0, 0x80, 0xaf, 0x25, 0x28, 0xf4, 0x26, 0x85, 0x44, 0x49, 0x6d, 0xcc, 0x40, 0xf1, 0xa9, 0x00, + 0xfc, 0x26, 0x8b, 0x91, 0xb7, 0x84, 0x09, 0x7a, 0x6b, 0x49, 0xff, 0xde, 0x8d, 0x5a, 0x4e, 0x40, + 0x28, 0x60, 0x95, 0x70, 0xf3, 0xc3, 0xad, 0x8a, 0xfd, 0x83, 0x54, 0xa6, 0x52, 0x43, 0x7f, 0x89, + 0x6a, 0xf6, 0x30, 0x95, 0x32, 0x1d, 0x83, 0xaf, 0xa3, 0x61, 0x99, 0xf8, 0xc8, 0x73, 0x50, 0xc8, + 0xf2, 0x49, 0x95, 0xf0, 0xf0, 0xfb, 0x36, 0x31, 0x3f, 0x70, 0x81, 0x41, 0x55, 0x8c, 0x76, 0x49, + 0x93, 0xc7, 0x96, 0xe1, 0x18, 0xee, 0x56, 0xd0, 0xe4, 0x31, 0x7d, 0x4c, 0x7a, 0x22, 0xc1, 0x50, + 0x45, 0x19, 0xe4, 0x2c, 0x8c, 0x64, 0x0c, 0x56, 0xd3, 0x31, 0xdc, 0x4e, 0xb0, 0x27, 0x12, 0x3c, + 0xd7, 0xec, 0x40, 0xc6, 0x40, 0xef, 0x93, 0x36, 0xca, 0x11, 0x88, 0x90, 0xc7, 0x56, 0x4b, 0x27, + 0xec, 0xea, 0xf8, 0x2c, 0xa6, 0x4f, 0xc9, 0xfe, 0xb2, 0x55, 0x5e, 0x40, 0x1c, 0x46, 0x52, 0x24, + 0xbc, 0xc8, 0xad, 0x2d, 0x6d, 0xd0, 0x5b, 0xf1, 0x83, 0x8a, 0xa6, 0x27, 0x64, 0x47, 0x21, 0xc3, + 0x52, 0x59, 0xdb, 0x8e, 0xe1, 0x76, 0x8f, 0x9e, 0x79, 0xff, 0x9e, 0x93, 0x57, 0xb7, 0x7d, 0xae, + 0x45, 0x41, 0x2d, 0xa6, 0x4f, 0x48, 0x2f, 0x2a, 0x8b, 0x02, 0x04, 0xae, 0x0d, 0x77, 0xb4, 0x61, + 0xb7, 0xa6, 0x57, 0x7e, 0x5f, 0x08, 0xa9, 0x13, 0xa0, 0x50, 0xd6, 0xae, 0xd3, 0x72, 0xcd, 0xa3, + 0xd7, 0x77, 0x79, 0x6e, 0x8c, 0xcb, 0x1b, 0xac, 0xd5, 0x27, 0x02, 0x8b, 0x59, 0xb0, 0x51, 0x8e, + 0x0e, 0x08, 0x89, 0x0a, 0x60, 0x08, 0x71, 0xc8, 0xd0, 0x6a, 0x3b, 0x86, 0x6b, 0x1e, 0xf5, 0xbd, + 0x6a, 0x21, 0xde, 0x6a, 0x21, 0xde, 0xc7, 0xd5, 0x42, 0x8e, 0xdb, 0x57, 0x3f, 0x0f, 0x1b, 0x97, + 0xbf, 0x0e, 0x8d, 0xa0, 0x53, 0xeb, 0xde, 0x22, 0x3d, 0x21, 0xe6, 0x05, 0x1b, 0xf3, 0x38, 0x2c, + 0x05, 0xf2, 0xb1, 0xd5, 0xf9, 0x8f, 0x2a, 0x44, 0x0b, 0x3f, 0x2d, 0x75, 0xf4, 0x8c, 0x98, 0x31, + 0x43, 0x16, 0x66, 0x4c, 0x65, 0xa0, 0x2c, 0xa2, 0x5f, 0xea, 0xde, 0xf5, 0xd2, 0x77, 0x0c, 0xd9, + 0x29, 0x53, 0x59, 0x40, 0xe2, 0x1a, 0x81, 0xa2, 0x8f, 0x48, 0x17, 0xa6, 0x13, 0xbd, 0xcd, 0x0c, + 0x78, 0x9a, 0xa1, 0x65, 0x3a, 0x86, 0xdb, 0x0a, 0xf6, 0x6a, 0xf6, 0x54, 0x93, 0xfd, 0x37, 0xa4, + 0xf7, 0xd7, 0x70, 0xe8, 0x3e, 0x69, 0x8d, 0x60, 0xa6, 0x8f, 0xab, 0x13, 0x2c, 0x21, 0x3d, 0x20, + 0xdb, 0x17, 0x6c, 0x5c, 0x56, 0x37, 0xd5, 0x0e, 0xaa, 0xe0, 0x55, 0xf3, 0xa5, 0x71, 0xfc, 0xfe, + 0x6a, 0x6e, 0x1b, 0xd7, 0x73, 0xdb, 0xf8, 0x3d, 0xb7, 0x8d, 0xcb, 0x85, 0xdd, 0xb8, 0x5e, 0xd8, + 0x8d, 0x1f, 0x0b, 0xbb, 0xf1, 0xf9, 0x79, 0xca, 0x31, 0x2b, 0x87, 0x5e, 0x24, 0x73, 0xff, 0x56, + 0xff, 0x7e, 0xd5, 0xbf, 0x3f, 0xf5, 0x6f, 0xfe, 0x11, 0x9c, 0x4d, 0x40, 0x0d, 0x77, 0xf4, 0x9c, + 0x5e, 0xfc, 0x09, 0x00, 0x00, 0xff, 0xff, 0x25, 0xfd, 0xea, 0xb7, 0x94, 0x03, 0x00, 0x00, } func (m *MintRequest) Marshal() (dAtA []byte, err error) { diff --git a/x/nftoracle/types/opensea.pb.go b/x/nftoracle/types/opensea.pb.go index 5fa9a4c4..fc252f01 100644 --- a/x/nftoracle/types/opensea.pb.go +++ b/x/nftoracle/types/opensea.pb.go @@ -91,27 +91,27 @@ func (m *Trait) GetMaxValue() string { } func init() { - proto.RegisterType((*Trait)(nil), "sixnft.nftoracle.Trait") + proto.RegisterType((*Trait)(nil), "thesixnetwork.sixnft.nftoracle.Trait") } func init() { proto.RegisterFile("nftoracle/opensea.proto", fileDescriptor_b592987820f26afc) } var fileDescriptor_b592987820f26afc = []byte{ - // 217 bytes of a gzipped FileDescriptorProto + // 220 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0x4b, 0x2b, 0xc9, 0x2f, 0x4a, 0x4c, 0xce, 0x49, 0xd5, 0xcf, 0x2f, 0x48, 0xcd, 0x2b, 0x4e, 0x4d, 0xd4, 0x2b, 0x28, - 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x28, 0xce, 0xac, 0xc8, 0x4b, 0x2b, 0xd1, 0x83, 0xcb, 0x2b, 0xd5, - 0x70, 0xb1, 0x86, 0x14, 0x25, 0x66, 0x96, 0x08, 0xc9, 0x72, 0x71, 0x95, 0x80, 0x18, 0xf1, 0x25, - 0x95, 0x05, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x9c, 0x60, 0x91, 0x90, 0xca, 0x82, - 0x54, 0x21, 0x11, 0x2e, 0xd6, 0xb2, 0xc4, 0x9c, 0xd2, 0x54, 0x09, 0x26, 0xb0, 0x0c, 0x84, 0x23, - 0xa4, 0xc8, 0xc5, 0x93, 0x92, 0x59, 0x5c, 0x90, 0x93, 0x58, 0x09, 0xd1, 0xc6, 0x0c, 0x96, 0xe4, - 0x86, 0x8a, 0x81, 0x35, 0x4a, 0x73, 0x71, 0xe6, 0x26, 0x56, 0xc4, 0x43, 0x34, 0xb3, 0x80, 0xe5, - 0x39, 0x72, 0x13, 0x2b, 0xc2, 0x40, 0x7c, 0x27, 0xef, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, - 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, - 0x96, 0x63, 0x88, 0x32, 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, - 0xc9, 0x48, 0x05, 0xb9, 0x3b, 0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x5b, 0x1f, 0xe2, 0x05, 0xfd, 0x0a, - 0x7d, 0x84, 0x27, 0x41, 0x76, 0x17, 0x27, 0xb1, 0x81, 0xfd, 0x68, 0x0c, 0x08, 0x00, 0x00, 0xff, - 0xff, 0xfb, 0x4d, 0xa9, 0x15, 0xfe, 0x00, 0x00, 0x00, + 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x2b, 0xc9, 0x48, 0x2d, 0xce, 0xac, 0xc8, 0x4b, 0x2d, 0x29, 0xcf, + 0x2f, 0xca, 0xd6, 0x03, 0x31, 0xd3, 0x4a, 0xf4, 0xe0, 0xaa, 0x95, 0x6a, 0xb8, 0x58, 0x43, 0x8a, + 0x12, 0x33, 0x4b, 0x84, 0x64, 0xb9, 0xb8, 0x4a, 0x40, 0x8c, 0xf8, 0x92, 0xca, 0x82, 0x54, 0x09, + 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x4e, 0xb0, 0x48, 0x48, 0x65, 0x41, 0xaa, 0x90, 0x08, 0x17, + 0x6b, 0x59, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0x13, 0x58, 0x06, 0xc2, 0x11, 0x52, 0xe4, 0xe2, 0x49, + 0xc9, 0x2c, 0x2e, 0xc8, 0x49, 0xac, 0x84, 0x68, 0x63, 0x06, 0x4b, 0x72, 0x43, 0xc5, 0xc0, 0x1a, + 0xa5, 0xb9, 0x38, 0x73, 0x13, 0x2b, 0xe2, 0x21, 0x9a, 0x59, 0xc0, 0xf2, 0x1c, 0xb9, 0x89, 0x15, + 0x61, 0x20, 0xbe, 0x93, 0xf7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, + 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x19, + 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa3, 0x78, 0x41, 0x1f, 0xe2, + 0x05, 0xfd, 0x0a, 0x7d, 0x84, 0x97, 0x41, 0x76, 0x17, 0x27, 0xb1, 0x81, 0x7d, 0x6c, 0x0c, 0x08, + 0x00, 0x00, 0xff, 0xff, 0xcc, 0x1a, 0xbb, 0x00, 0x0c, 0x01, 0x00, 0x00, } func (m *Trait) Marshal() (dAtA []byte, err error) { diff --git a/x/nftoracle/types/params.pb.go b/x/nftoracle/types/params.pb.go index 8fc1ab1c..6c822c7a 100644 --- a/x/nftoracle/types/params.pb.go +++ b/x/nftoracle/types/params.pb.go @@ -80,32 +80,32 @@ func (m *Params) GetActionRequestActiveDuration() time.Duration { } func init() { - proto.RegisterType((*Params)(nil), "sixnft.nftoracle.Params") + proto.RegisterType((*Params)(nil), "thesixnetwork.sixnft.nftoracle.Params") } func init() { proto.RegisterFile("nftoracle/params.proto", fileDescriptor_83d28596b5eb4570) } var fileDescriptor_83d28596b5eb4570 = []byte{ - // 294 bytes of a gzipped FileDescriptorProto + // 297 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcb, 0x4b, 0x2b, 0xc9, 0x2f, 0x4a, 0x4c, 0xce, 0x49, 0xd5, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, - 0x2f, 0xc9, 0x17, 0x12, 0x28, 0xce, 0xac, 0xc8, 0x4b, 0x2b, 0xd1, 0x83, 0x4b, 0x4b, 0x89, 0xa4, - 0xe7, 0xa7, 0xe7, 0x83, 0x25, 0xf5, 0x41, 0x2c, 0x88, 0x3a, 0x29, 0xb9, 0xf4, 0xfc, 0xfc, 0x74, - 0x90, 0x66, 0x10, 0x2f, 0xa9, 0x34, 0x4d, 0x3f, 0xa5, 0xb4, 0x28, 0xb1, 0x24, 0x33, 0x3f, 0x0f, - 0x22, 0xaf, 0xb4, 0x81, 0x89, 0x8b, 0x2d, 0x00, 0x6c, 0xb0, 0x50, 0x37, 0x23, 0x97, 0x4c, 0x6e, - 0x66, 0x5e, 0x49, 0x7c, 0x51, 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x49, 0x7c, 0x62, 0x72, 0x49, 0x66, - 0x59, 0x6a, 0x3c, 0x4c, 0x87, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0xa4, 0x1e, 0xc4, 0x48, - 0x3d, 0x98, 0x91, 0x7a, 0x2e, 0x50, 0x05, 0x4e, 0xfa, 0x27, 0xee, 0xc9, 0x33, 0x7c, 0xba, 0x27, - 0xaf, 0x5c, 0x99, 0x98, 0x9b, 0x63, 0xa5, 0x84, 0xcf, 0x30, 0xa5, 0x19, 0xf7, 0xe5, 0x19, 0x83, - 0x24, 0x41, 0x4a, 0x82, 0x20, 0x2a, 0x1c, 0xc1, 0x0a, 0x60, 0x66, 0x09, 0x4d, 0x64, 0xe4, 0x92, - 0x03, 0xe9, 0xc9, 0xcf, 0xc3, 0xe9, 0x1e, 0x26, 0x42, 0xee, 0x31, 0x84, 0xba, 0x47, 0x15, 0xe2, - 0x1e, 0xfc, 0xc6, 0x41, 0x5c, 0x24, 0x0d, 0x51, 0x84, 0xd5, 0x4d, 0x56, 0x2c, 0x33, 0x16, 0xc8, - 0x33, 0x38, 0x79, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, - 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x61, 0x7a, - 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x49, 0x46, 0x2a, 0x28, 0x8a, 0x52, - 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0xf5, 0x21, 0xb1, 0xa5, 0x5f, 0xa1, 0x8f, 0x88, 0xce, 0x92, 0xca, - 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xab, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc7, 0xe5, - 0xa7, 0x28, 0xe8, 0x01, 0x00, 0x00, + 0x2f, 0xc9, 0x17, 0x92, 0x2b, 0xc9, 0x48, 0x2d, 0xce, 0xac, 0xc8, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, + 0xca, 0xd6, 0x03, 0x31, 0xd3, 0x4a, 0xf4, 0xe0, 0x8a, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, + 0x4a, 0xf5, 0x41, 0x2c, 0x88, 0x2e, 0x29, 0xb9, 0xf4, 0xfc, 0xfc, 0x74, 0x90, 0x51, 0x20, 0x5e, + 0x52, 0x69, 0x9a, 0x7e, 0x4a, 0x69, 0x51, 0x62, 0x49, 0x66, 0x7e, 0x1e, 0x44, 0x5e, 0x69, 0x03, + 0x13, 0x17, 0x5b, 0x00, 0xd8, 0x1a, 0xa1, 0x6e, 0x46, 0x2e, 0x99, 0xdc, 0xcc, 0xbc, 0x92, 0xf8, + 0xa2, 0xd4, 0xc2, 0xd2, 0xd4, 0xe2, 0x92, 0xf8, 0xc4, 0xe4, 0x92, 0xcc, 0xb2, 0xd4, 0x78, 0x98, + 0x0e, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x49, 0x3d, 0x88, 0x91, 0x7a, 0x30, 0x23, 0xf5, + 0x5c, 0xa0, 0x0a, 0x9c, 0xf4, 0x4f, 0xdc, 0x93, 0x67, 0xf8, 0x74, 0x4f, 0x5e, 0xb9, 0x32, 0x31, + 0x37, 0xc7, 0x4a, 0x09, 0x9f, 0x61, 0x4a, 0x33, 0xee, 0xcb, 0x33, 0x06, 0x49, 0x82, 0x94, 0x04, + 0x41, 0x54, 0x38, 0x82, 0x15, 0xc0, 0xcc, 0x12, 0x9a, 0xc8, 0xc8, 0x25, 0x07, 0xd2, 0x93, 0x9f, + 0x87, 0xd3, 0x3d, 0x4c, 0x84, 0xdc, 0x63, 0x08, 0x75, 0x8f, 0x2a, 0xc4, 0x3d, 0xf8, 0x8d, 0x83, + 0xb8, 0x48, 0x1a, 0xa2, 0x08, 0xab, 0x9b, 0xac, 0x58, 0x66, 0x2c, 0x90, 0x67, 0x70, 0xf2, 0x3e, + 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, 0xc3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, + 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0x94, 0xd8, 0xd2, 0x87, 0xc4, 0x96, 0x7e, 0x85, 0x3e, 0x22, + 0x72, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xae, 0x36, 0x06, 0x04, 0x00, 0x00, 0xff, + 0xff, 0xa9, 0xb2, 0x9e, 0xc0, 0xf6, 0x01, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/nftoracle/types/query.pb.go b/x/nftoracle/types/query.pb.go index 76e8e067..e76c72ff 100644 --- a/x/nftoracle/types/query.pb.go +++ b/x/nftoracle/types/query.pb.go @@ -481,63 +481,264 @@ func (m *QueryAllActionRequestResponse) GetPagination() *query.PageResponse { return nil } +type QueryGetCollectionOwnerRequestRequest struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryGetCollectionOwnerRequestRequest) Reset() { *m = QueryGetCollectionOwnerRequestRequest{} } +func (m *QueryGetCollectionOwnerRequestRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetCollectionOwnerRequestRequest) ProtoMessage() {} +func (*QueryGetCollectionOwnerRequestRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_a7d06501fbd25d28, []int{10} +} +func (m *QueryGetCollectionOwnerRequestRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetCollectionOwnerRequestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetCollectionOwnerRequestRequest.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 *QueryGetCollectionOwnerRequestRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetCollectionOwnerRequestRequest.Merge(m, src) +} +func (m *QueryGetCollectionOwnerRequestRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetCollectionOwnerRequestRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetCollectionOwnerRequestRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetCollectionOwnerRequestRequest proto.InternalMessageInfo + +func (m *QueryGetCollectionOwnerRequestRequest) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +type QueryGetCollectionOwnerRequestResponse struct { + CollectionOwnerRequest CollectionOwnerRequest `protobuf:"bytes,1,opt,name=CollectionOwnerRequest,proto3" json:"CollectionOwnerRequest"` +} + +func (m *QueryGetCollectionOwnerRequestResponse) Reset() { + *m = QueryGetCollectionOwnerRequestResponse{} +} +func (m *QueryGetCollectionOwnerRequestResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetCollectionOwnerRequestResponse) ProtoMessage() {} +func (*QueryGetCollectionOwnerRequestResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a7d06501fbd25d28, []int{11} +} +func (m *QueryGetCollectionOwnerRequestResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetCollectionOwnerRequestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetCollectionOwnerRequestResponse.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 *QueryGetCollectionOwnerRequestResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetCollectionOwnerRequestResponse.Merge(m, src) +} +func (m *QueryGetCollectionOwnerRequestResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetCollectionOwnerRequestResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetCollectionOwnerRequestResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetCollectionOwnerRequestResponse proto.InternalMessageInfo + +func (m *QueryGetCollectionOwnerRequestResponse) GetCollectionOwnerRequest() CollectionOwnerRequest { + if m != nil { + return m.CollectionOwnerRequest + } + return CollectionOwnerRequest{} +} + +type QueryAllCollectionOwnerRequestRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllCollectionOwnerRequestRequest) Reset() { *m = QueryAllCollectionOwnerRequestRequest{} } +func (m *QueryAllCollectionOwnerRequestRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllCollectionOwnerRequestRequest) ProtoMessage() {} +func (*QueryAllCollectionOwnerRequestRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_a7d06501fbd25d28, []int{12} +} +func (m *QueryAllCollectionOwnerRequestRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllCollectionOwnerRequestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllCollectionOwnerRequestRequest.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 *QueryAllCollectionOwnerRequestRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllCollectionOwnerRequestRequest.Merge(m, src) +} +func (m *QueryAllCollectionOwnerRequestRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllCollectionOwnerRequestRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllCollectionOwnerRequestRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllCollectionOwnerRequestRequest proto.InternalMessageInfo + +func (m *QueryAllCollectionOwnerRequestRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryAllCollectionOwnerRequestResponse struct { + CollectionOwnerRequest []CollectionOwnerRequest `protobuf:"bytes,1,rep,name=CollectionOwnerRequest,proto3" json:"CollectionOwnerRequest"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllCollectionOwnerRequestResponse) Reset() { + *m = QueryAllCollectionOwnerRequestResponse{} +} +func (m *QueryAllCollectionOwnerRequestResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllCollectionOwnerRequestResponse) ProtoMessage() {} +func (*QueryAllCollectionOwnerRequestResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a7d06501fbd25d28, []int{13} +} +func (m *QueryAllCollectionOwnerRequestResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllCollectionOwnerRequestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllCollectionOwnerRequestResponse.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 *QueryAllCollectionOwnerRequestResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllCollectionOwnerRequestResponse.Merge(m, src) +} +func (m *QueryAllCollectionOwnerRequestResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllCollectionOwnerRequestResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllCollectionOwnerRequestResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllCollectionOwnerRequestResponse proto.InternalMessageInfo + +func (m *QueryAllCollectionOwnerRequestResponse) GetCollectionOwnerRequest() []CollectionOwnerRequest { + if m != nil { + return m.CollectionOwnerRequest + } + return nil +} + +func (m *QueryAllCollectionOwnerRequestResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "sixnft.nftoracle.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "sixnft.nftoracle.QueryParamsResponse") - proto.RegisterType((*QueryGetMintRequestRequest)(nil), "sixnft.nftoracle.QueryGetMintRequestRequest") - proto.RegisterType((*QueryGetMintRequestResponse)(nil), "sixnft.nftoracle.QueryGetMintRequestResponse") - proto.RegisterType((*QueryAllMintRequestRequest)(nil), "sixnft.nftoracle.QueryAllMintRequestRequest") - proto.RegisterType((*QueryAllMintRequestResponse)(nil), "sixnft.nftoracle.QueryAllMintRequestResponse") - proto.RegisterType((*QueryGetActionRequestRequest)(nil), "sixnft.nftoracle.QueryGetActionRequestRequest") - proto.RegisterType((*QueryGetActionRequestResponse)(nil), "sixnft.nftoracle.QueryGetActionRequestResponse") - proto.RegisterType((*QueryAllActionRequestRequest)(nil), "sixnft.nftoracle.QueryAllActionRequestRequest") - proto.RegisterType((*QueryAllActionRequestResponse)(nil), "sixnft.nftoracle.QueryAllActionRequestResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "thesixnetwork.sixnft.nftoracle.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "thesixnetwork.sixnft.nftoracle.QueryParamsResponse") + proto.RegisterType((*QueryGetMintRequestRequest)(nil), "thesixnetwork.sixnft.nftoracle.QueryGetMintRequestRequest") + proto.RegisterType((*QueryGetMintRequestResponse)(nil), "thesixnetwork.sixnft.nftoracle.QueryGetMintRequestResponse") + proto.RegisterType((*QueryAllMintRequestRequest)(nil), "thesixnetwork.sixnft.nftoracle.QueryAllMintRequestRequest") + proto.RegisterType((*QueryAllMintRequestResponse)(nil), "thesixnetwork.sixnft.nftoracle.QueryAllMintRequestResponse") + proto.RegisterType((*QueryGetActionRequestRequest)(nil), "thesixnetwork.sixnft.nftoracle.QueryGetActionRequestRequest") + proto.RegisterType((*QueryGetActionRequestResponse)(nil), "thesixnetwork.sixnft.nftoracle.QueryGetActionRequestResponse") + proto.RegisterType((*QueryAllActionRequestRequest)(nil), "thesixnetwork.sixnft.nftoracle.QueryAllActionRequestRequest") + proto.RegisterType((*QueryAllActionRequestResponse)(nil), "thesixnetwork.sixnft.nftoracle.QueryAllActionRequestResponse") + proto.RegisterType((*QueryGetCollectionOwnerRequestRequest)(nil), "thesixnetwork.sixnft.nftoracle.QueryGetCollectionOwnerRequestRequest") + proto.RegisterType((*QueryGetCollectionOwnerRequestResponse)(nil), "thesixnetwork.sixnft.nftoracle.QueryGetCollectionOwnerRequestResponse") + proto.RegisterType((*QueryAllCollectionOwnerRequestRequest)(nil), "thesixnetwork.sixnft.nftoracle.QueryAllCollectionOwnerRequestRequest") + proto.RegisterType((*QueryAllCollectionOwnerRequestResponse)(nil), "thesixnetwork.sixnft.nftoracle.QueryAllCollectionOwnerRequestResponse") } func init() { proto.RegisterFile("nftoracle/query.proto", fileDescriptor_a7d06501fbd25d28) } var fileDescriptor_a7d06501fbd25d28 = []byte{ - // 627 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x4f, 0x6f, 0xd3, 0x3e, - 0x18, 0xc7, 0xeb, 0xee, 0xcf, 0xc1, 0xd3, 0x6f, 0x9a, 0xfc, 0x1b, 0xa8, 0x0a, 0x5d, 0x56, 0x19, - 0xba, 0x4d, 0xb0, 0xd9, 0xea, 0x90, 0xb8, 0x77, 0x12, 0xec, 0x30, 0x4d, 0x1a, 0x3d, 0x72, 0x41, - 0x6e, 0xeb, 0x66, 0x11, 0x69, 0x9c, 0x25, 0x2e, 0xdb, 0x84, 0xb8, 0xf0, 0x0a, 0x90, 0x10, 0xe2, - 0x84, 0x78, 0x05, 0x1c, 0x79, 0x0f, 0x3b, 0x4e, 0xe2, 0xc2, 0x09, 0xa1, 0x96, 0x97, 0xc0, 0x0b, - 0x40, 0xb1, 0x5d, 0x9a, 0x34, 0x09, 0x1d, 0xd3, 0x4e, 0xad, 0xfc, 0x7c, 0xfd, 0x7d, 0x3e, 0xcf, - 0xf3, 0xd8, 0x0e, 0xbc, 0xe5, 0xf7, 0xa4, 0x08, 0x59, 0xc7, 0xe3, 0xf4, 0x64, 0xc0, 0xc3, 0x73, - 0x12, 0x84, 0x42, 0x0a, 0xb4, 0x12, 0xb9, 0x67, 0x7e, 0x4f, 0x92, 0x3f, 0x51, 0x6b, 0xd5, 0x11, - 0x8e, 0x50, 0x41, 0x1a, 0xff, 0xd3, 0x3a, 0xab, 0xea, 0x08, 0xe1, 0x78, 0x9c, 0xb2, 0xc0, 0xa5, - 0xcc, 0xf7, 0x85, 0x64, 0xd2, 0x15, 0x7e, 0x64, 0xa2, 0xf7, 0x3b, 0x22, 0xea, 0x8b, 0x88, 0xb6, - 0x59, 0x64, 0xec, 0xe9, 0xcb, 0x46, 0x9b, 0x4b, 0xd6, 0xa0, 0x01, 0x73, 0x5c, 0x5f, 0x89, 0x8d, - 0xf6, 0xf6, 0x04, 0x24, 0x60, 0x21, 0xeb, 0x8f, 0x3d, 0xaa, 0x93, 0xf5, 0xbe, 0xeb, 0xcb, 0xe7, - 0x21, 0x3f, 0x19, 0xf0, 0x48, 0x9a, 0xa8, 0x3d, 0x89, 0xb2, 0x4e, 0xec, 0x96, 0x8e, 0xe3, 0x55, - 0x88, 0x9e, 0xc6, 0x79, 0x8f, 0x94, 0x65, 0x4b, 0xc7, 0xf0, 0x21, 0xfc, 0x3f, 0xb5, 0x1a, 0x05, - 0xc2, 0x8f, 0x38, 0x7a, 0x04, 0x17, 0x75, 0xea, 0x0a, 0xa8, 0x81, 0xad, 0xa5, 0xdd, 0x0a, 0x99, - 0xee, 0x02, 0xd1, 0x3b, 0xf6, 0xe6, 0x2f, 0xbe, 0xaf, 0x97, 0x5a, 0x46, 0x8d, 0xb7, 0xa1, 0xa5, - 0xec, 0xf6, 0xb9, 0x3c, 0x74, 0x7d, 0x69, 0xb2, 0x98, 0x1f, 0xb4, 0x0c, 0xcb, 0x6e, 0x57, 0x39, - 0xce, 0xb7, 0xca, 0x6e, 0x17, 0x77, 0xe1, 0x9d, 0x5c, 0xb5, 0x81, 0x78, 0x0c, 0x97, 0x12, 0xcb, - 0x86, 0x64, 0x2d, 0x4b, 0x92, 0x10, 0x19, 0x9c, 0xe4, 0x3e, 0xdc, 0x35, 0x4c, 0x4d, 0xcf, 0xcb, - 0x61, 0x7a, 0x02, 0xe1, 0x64, 0x00, 0x26, 0xc7, 0x06, 0xd1, 0xd3, 0x22, 0xf1, 0xb4, 0x88, 0x3e, - 0x0c, 0x66, 0x5a, 0xe4, 0x88, 0x39, 0x7c, 0x6c, 0x91, 0xd8, 0x89, 0x3f, 0x03, 0x53, 0xcc, 0x74, - 0x9a, 0xa2, 0x62, 0xe6, 0xae, 0x53, 0x0c, 0xda, 0x4f, 0xe1, 0x96, 0x15, 0xee, 0xe6, 0x4c, 0x5c, - 0xcd, 0x90, 0xe2, 0x25, 0xb0, 0x3a, 0xee, 0x7d, 0x53, 0x1d, 0x97, 0x19, 0xb3, 0xf2, 0xe0, 0x5a, - 0x81, 0xde, 0x14, 0x78, 0x00, 0xff, 0x4b, 0x05, 0x4c, 0x2f, 0xd7, 0xb3, 0x25, 0xa6, 0x64, 0xa6, - 0xc8, 0xf4, 0x5e, 0xdc, 0x33, 0x74, 0x4d, 0xcf, 0xcb, 0xa5, 0xbb, 0xa9, 0xa9, 0x7d, 0x01, 0xa6, - 0xac, 0x6c, 0xa2, 0xe2, 0xb2, 0xe6, 0xae, 0x5b, 0xd6, 0x8d, 0x4d, 0x6f, 0xf7, 0xd7, 0x02, 0x5c, - 0x50, 0xdc, 0xe8, 0x14, 0x2e, 0xea, 0x9b, 0x88, 0xee, 0x65, 0x91, 0xb2, 0x17, 0xde, 0xaa, 0xcf, - 0x50, 0xe9, 0x64, 0xb8, 0xf6, 0xe6, 0xeb, 0xcf, 0x77, 0x65, 0x0b, 0x55, 0xa8, 0x96, 0xd3, 0xe9, - 0x37, 0x09, 0x7d, 0x00, 0xa9, 0x13, 0x8d, 0xb6, 0x0b, 0x8c, 0x73, 0x9f, 0x02, 0x6b, 0xe7, 0x8a, - 0x6a, 0x83, 0xf3, 0x40, 0xe1, 0xd4, 0xd1, 0xdd, 0x2c, 0x4e, 0xf2, 0x29, 0xa4, 0xaf, 0xdc, 0xee, - 0x6b, 0xf4, 0x1e, 0xc0, 0xe5, 0x84, 0x49, 0xd3, 0xf3, 0x0a, 0xe1, 0x72, 0xdf, 0x84, 0x42, 0xb8, - 0xfc, 0xab, 0x8d, 0x37, 0x14, 0x5c, 0x0d, 0xd9, 0x7f, 0x87, 0x43, 0x9f, 0xc0, 0xd4, 0x59, 0x42, - 0xa4, 0xb8, 0x0b, 0x79, 0xc7, 0xde, 0xa2, 0x57, 0xd6, 0x1b, 0xb4, 0x1d, 0x85, 0xb6, 0x89, 0xea, - 0x59, 0xb4, 0xf4, 0x47, 0x42, 0x77, 0xee, 0x23, 0x80, 0x2b, 0x29, 0xa3, 0xb8, 0x77, 0xa4, 0xb8, - 0x1b, 0xff, 0x04, 0x59, 0x74, 0xc5, 0xf0, 0x96, 0x82, 0xc4, 0xa8, 0x36, 0x0b, 0x72, 0xef, 0xe0, - 0x62, 0x68, 0x83, 0xcb, 0xa1, 0x0d, 0x7e, 0x0c, 0x6d, 0xf0, 0x76, 0x64, 0x97, 0x2e, 0x47, 0x76, - 0xe9, 0xdb, 0xc8, 0x2e, 0x3d, 0x6b, 0x38, 0xae, 0x3c, 0x1e, 0xb4, 0x49, 0x47, 0xf4, 0xa9, 0x3c, - 0xe6, 0xb1, 0x11, 0x97, 0xa7, 0x22, 0x7c, 0x31, 0xf6, 0x3c, 0x4b, 0xb8, 0xca, 0xf3, 0x80, 0x47, - 0xed, 0x45, 0xf5, 0x5d, 0x7c, 0xf8, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x48, 0x0a, 0xcc, 0xc5, 0xf8, - 0x07, 0x00, 0x00, + // 776 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x96, 0x4f, 0x4f, 0xd4, 0x4e, + 0x18, 0xc7, 0x77, 0x16, 0x7e, 0x1c, 0x86, 0xfc, 0x88, 0x19, 0x91, 0x60, 0xc5, 0xba, 0xa9, 0xe1, + 0x4f, 0x44, 0xda, 0x00, 0x89, 0x1a, 0x84, 0xe8, 0xa2, 0xc0, 0xc1, 0x18, 0x11, 0x4f, 0xea, 0xc1, + 0x74, 0x77, 0x87, 0xd2, 0xd8, 0xed, 0x2c, 0xed, 0x20, 0xa0, 0xf1, 0xe2, 0x2b, 0x30, 0xe1, 0xee, + 0x7b, 0x30, 0x9e, 0x0c, 0x47, 0x2f, 0x1c, 0x49, 0xbc, 0x78, 0x32, 0x0a, 0x26, 0x5e, 0x8c, 0xaf, + 0xc1, 0x74, 0xe6, 0x59, 0xb6, 0xdd, 0x6d, 0xb7, 0x95, 0x5d, 0x4f, 0xbb, 0xe9, 0x3c, 0x7f, 0x3e, + 0xdf, 0xef, 0xd3, 0x3c, 0x53, 0x7c, 0xce, 0x5d, 0xe7, 0xcc, 0x33, 0xcb, 0x0e, 0x35, 0x36, 0xb7, + 0xa8, 0xb7, 0xab, 0xd7, 0x3c, 0xc6, 0x19, 0x51, 0xf9, 0x06, 0xf5, 0xed, 0x1d, 0x97, 0xf2, 0x6d, + 0xe6, 0x3d, 0xd7, 0x83, 0xbf, 0xeb, 0x5c, 0x3f, 0x89, 0x55, 0x06, 0x2d, 0x66, 0x31, 0x11, 0x6a, + 0x04, 0xff, 0x64, 0x96, 0x32, 0x62, 0x31, 0x66, 0x39, 0xd4, 0x30, 0x6b, 0xb6, 0x61, 0xba, 0x2e, + 0xe3, 0x26, 0xb7, 0x99, 0xeb, 0xc3, 0xe9, 0x95, 0x32, 0xf3, 0xab, 0xcc, 0x37, 0x4a, 0xa6, 0x0f, + 0xcd, 0x8c, 0x17, 0xd3, 0x25, 0xca, 0xcd, 0x69, 0xa3, 0x66, 0x5a, 0xb6, 0x2b, 0x82, 0x21, 0x76, + 0xa8, 0x81, 0x55, 0x33, 0x3d, 0xb3, 0x5a, 0xaf, 0x31, 0xd2, 0x78, 0x5e, 0xb5, 0x5d, 0xfe, 0xcc, + 0xa3, 0x9b, 0x5b, 0xd4, 0xe7, 0x70, 0xaa, 0x36, 0x4e, 0xcd, 0x72, 0x50, 0xad, 0xe9, 0x7c, 0xa2, + 0x71, 0x5e, 0x66, 0x8e, 0x43, 0x65, 0x0c, 0xdb, 0x76, 0xa9, 0x17, 0x8d, 0xd4, 0x06, 0x31, 0x79, + 0x18, 0x10, 0xae, 0x8a, 0xe6, 0x6b, 0xf2, 0x4c, 0x7b, 0x8a, 0xcf, 0x46, 0x9e, 0xfa, 0x35, 0xe6, + 0xfa, 0x94, 0xdc, 0xc5, 0x7d, 0x12, 0x72, 0x18, 0x15, 0xd0, 0x44, 0xff, 0xcc, 0x98, 0xde, 0xde, + 0x3d, 0x5d, 0xe6, 0x2f, 0xf6, 0x1e, 0x7c, 0xbd, 0x94, 0x5b, 0x83, 0x5c, 0xed, 0x2a, 0x56, 0x44, + 0xf1, 0x15, 0xca, 0xef, 0xdb, 0x2e, 0x87, 0x9e, 0xf0, 0x43, 0x06, 0x70, 0xde, 0xae, 0x88, 0xfa, + 0xbd, 0x6b, 0x79, 0xbb, 0xa2, 0x79, 0xf8, 0x42, 0x6c, 0x34, 0x20, 0x3d, 0xc2, 0xfd, 0xa1, 0xc7, + 0xc0, 0x35, 0x99, 0xc6, 0x15, 0x4a, 0x01, 0xb8, 0x70, 0x15, 0xad, 0x02, 0x84, 0x45, 0xc7, 0x89, + 0x21, 0x5c, 0xc6, 0xb8, 0x31, 0xc6, 0x13, 0x27, 0xe4, 0xcc, 0xf5, 0x60, 0xe6, 0xba, 0x7c, 0xc1, + 0x60, 0xe6, 0xfa, 0xaa, 0x69, 0xd1, 0x7a, 0x89, 0x50, 0xa6, 0xb6, 0x8f, 0x40, 0x5a, 0x73, 0x9b, + 0x24, 0x69, 0x3d, 0x9d, 0x4b, 0x23, 0x2b, 0x11, 0xf8, 0xbc, 0x80, 0x1f, 0x4f, 0x85, 0x97, 0x44, + 0x11, 0x7a, 0x1d, 0x8f, 0xd4, 0xe7, 0x52, 0x14, 0xaf, 0x57, 0xca, 0x1c, 0x5f, 0xe2, 0x8b, 0x09, + 0xf1, 0x20, 0xf7, 0x31, 0xfe, 0x3f, 0x72, 0x00, 0xce, 0x4e, 0xa5, 0x09, 0x8e, 0x24, 0x81, 0xe4, + 0x68, 0x25, 0x6d, 0x1d, 0x58, 0x8b, 0x8e, 0x13, 0xcb, 0xda, 0xad, 0x89, 0x7e, 0x42, 0x20, 0xb2, + 0xb5, 0x51, 0xb2, 0xc8, 0x9e, 0xee, 0x88, 0xec, 0xde, 0x64, 0xaf, 0xe3, 0xd1, 0xfa, 0xa4, 0xee, + 0x9c, 0x2c, 0x8f, 0x07, 0xc1, 0xee, 0x48, 0x19, 0xf1, 0x3b, 0x84, 0xc7, 0xd2, 0x32, 0xc1, 0x07, + 0x8e, 0x87, 0xe2, 0x23, 0xc0, 0xfd, 0x6b, 0x69, 0x86, 0xc4, 0x67, 0x83, 0x33, 0x09, 0xb5, 0x35, + 0x06, 0xca, 0x8a, 0x8e, 0xd3, 0x5e, 0x59, 0xb7, 0x5e, 0x88, 0x9f, 0x75, 0x47, 0xda, 0x74, 0xcc, + 0xe0, 0x48, 0xcf, 0xbf, 0x72, 0xa4, 0x6b, 0x2f, 0xcd, 0xcc, 0x77, 0x8c, 0xff, 0x13, 0x4a, 0xc9, + 0x1e, 0xc2, 0x7d, 0x72, 0xef, 0x93, 0x99, 0x34, 0xe6, 0xd6, 0xab, 0x47, 0x99, 0xfd, 0xab, 0x1c, + 0x49, 0xa2, 0x15, 0xde, 0x7c, 0xfe, 0xb1, 0x97, 0x57, 0xc8, 0xb0, 0x21, 0xc3, 0x8d, 0xe6, 0x5b, + 0x95, 0x7c, 0x40, 0x91, 0x6d, 0x4a, 0xe6, 0x32, 0xb5, 0x89, 0xbd, 0xa2, 0x94, 0x9b, 0xa7, 0xca, + 0x05, 0xd4, 0x49, 0x81, 0x3a, 0x4a, 0x2e, 0xb7, 0xa2, 0x86, 0x2f, 0x7a, 0xe3, 0x95, 0x5d, 0x79, + 0x4d, 0xde, 0x23, 0x3c, 0x10, 0x2a, 0x52, 0x74, 0x9c, 0x8c, 0xe0, 0xb1, 0x37, 0x57, 0x46, 0xf0, + 0xf8, 0xeb, 0x48, 0x1b, 0x13, 0xe0, 0x05, 0xa2, 0xb6, 0x07, 0x27, 0xfb, 0xa8, 0x69, 0xc7, 0x91, + 0xf9, 0xac, 0x7e, 0xc5, 0x2d, 0x67, 0x65, 0xe1, 0x94, 0xd9, 0x80, 0x3d, 0x25, 0xb0, 0xc7, 0xc9, + 0x68, 0x2b, 0x76, 0xf4, 0xd3, 0x49, 0x3a, 0xfe, 0x11, 0xe1, 0x33, 0x91, 0x42, 0x81, 0xe7, 0xf3, + 0x59, 0x7d, 0xeb, 0x40, 0x40, 0xd2, 0x95, 0xa1, 0x4d, 0x08, 0x01, 0x1a, 0x29, 0xa4, 0x09, 0x20, + 0xbf, 0x51, 0xd2, 0x0e, 0x21, 0x4b, 0x59, 0x4d, 0x6c, 0xbb, 0x17, 0x95, 0xe5, 0x4e, 0xcb, 0x80, + 0xa6, 0x25, 0xa1, 0xe9, 0x16, 0x59, 0x30, 0x22, 0xf5, 0x5a, 0x15, 0x26, 0x7d, 0xbd, 0xca, 0x61, + 0xfd, 0x42, 0xf8, 0x7c, 0x7c, 0xa7, 0x60, 0x6a, 0x4b, 0x59, 0x7d, 0xef, 0x86, 0xe6, 0xd4, 0x05, + 0xaf, 0xdd, 0x16, 0x9a, 0xe7, 0xc8, 0x8d, 0xd3, 0x6a, 0x5e, 0xbc, 0x77, 0x70, 0xa4, 0xa2, 0xc3, + 0x23, 0x15, 0x7d, 0x3b, 0x52, 0xd1, 0xdb, 0x63, 0x35, 0x77, 0x78, 0xac, 0xe6, 0xbe, 0x1c, 0xab, + 0xb9, 0x27, 0xd3, 0x96, 0xcd, 0x37, 0xb6, 0x4a, 0x7a, 0x99, 0x55, 0xe3, 0xab, 0xef, 0x84, 0xea, + 0xf3, 0xdd, 0x1a, 0xf5, 0x4b, 0x7d, 0xe2, 0xfb, 0x7f, 0xf6, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x83, 0x4a, 0x16, 0xed, 0x18, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -562,6 +763,10 @@ type QueryClient interface { ActionRequest(ctx context.Context, in *QueryGetActionRequestRequest, opts ...grpc.CallOption) (*QueryGetActionRequestResponse, error) // Queries a list of ActionRequest items. ActionRequestAll(ctx context.Context, in *QueryAllActionRequestRequest, opts ...grpc.CallOption) (*QueryAllActionRequestResponse, error) + // Queries a CollectionOwnerRequest by id. + CollectionOwnerRequest(ctx context.Context, in *QueryGetCollectionOwnerRequestRequest, opts ...grpc.CallOption) (*QueryGetCollectionOwnerRequestResponse, error) + // Queries a list of CollectionOwnerRequest items. + CollectionOwnerRequestAll(ctx context.Context, in *QueryAllCollectionOwnerRequestRequest, opts ...grpc.CallOption) (*QueryAllCollectionOwnerRequestResponse, error) } type queryClient struct { @@ -574,7 +779,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftoracle.Query/Params", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftoracle.Query/Params", in, out, opts...) if err != nil { return nil, err } @@ -583,7 +788,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . func (c *queryClient) MintRequest(ctx context.Context, in *QueryGetMintRequestRequest, opts ...grpc.CallOption) (*QueryGetMintRequestResponse, error) { out := new(QueryGetMintRequestResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftoracle.Query/MintRequest", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftoracle.Query/MintRequest", in, out, opts...) if err != nil { return nil, err } @@ -592,7 +797,7 @@ func (c *queryClient) MintRequest(ctx context.Context, in *QueryGetMintRequestRe func (c *queryClient) MintRequestAll(ctx context.Context, in *QueryAllMintRequestRequest, opts ...grpc.CallOption) (*QueryAllMintRequestResponse, error) { out := new(QueryAllMintRequestResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftoracle.Query/MintRequestAll", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftoracle.Query/MintRequestAll", in, out, opts...) if err != nil { return nil, err } @@ -601,7 +806,7 @@ func (c *queryClient) MintRequestAll(ctx context.Context, in *QueryAllMintReques func (c *queryClient) ActionRequest(ctx context.Context, in *QueryGetActionRequestRequest, opts ...grpc.CallOption) (*QueryGetActionRequestResponse, error) { out := new(QueryGetActionRequestResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftoracle.Query/ActionRequest", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftoracle.Query/ActionRequest", in, out, opts...) if err != nil { return nil, err } @@ -610,7 +815,25 @@ func (c *queryClient) ActionRequest(ctx context.Context, in *QueryGetActionReque func (c *queryClient) ActionRequestAll(ctx context.Context, in *QueryAllActionRequestRequest, opts ...grpc.CallOption) (*QueryAllActionRequestResponse, error) { out := new(QueryAllActionRequestResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftoracle.Query/ActionRequestAll", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftoracle.Query/ActionRequestAll", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CollectionOwnerRequest(ctx context.Context, in *QueryGetCollectionOwnerRequestRequest, opts ...grpc.CallOption) (*QueryGetCollectionOwnerRequestResponse, error) { + out := new(QueryGetCollectionOwnerRequestResponse) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftoracle.Query/CollectionOwnerRequest", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CollectionOwnerRequestAll(ctx context.Context, in *QueryAllCollectionOwnerRequestRequest, opts ...grpc.CallOption) (*QueryAllCollectionOwnerRequestResponse, error) { + out := new(QueryAllCollectionOwnerRequestResponse) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftoracle.Query/CollectionOwnerRequestAll", in, out, opts...) if err != nil { return nil, err } @@ -629,6 +852,10 @@ type QueryServer interface { ActionRequest(context.Context, *QueryGetActionRequestRequest) (*QueryGetActionRequestResponse, error) // Queries a list of ActionRequest items. ActionRequestAll(context.Context, *QueryAllActionRequestRequest) (*QueryAllActionRequestResponse, error) + // Queries a CollectionOwnerRequest by id. + CollectionOwnerRequest(context.Context, *QueryGetCollectionOwnerRequestRequest) (*QueryGetCollectionOwnerRequestResponse, error) + // Queries a list of CollectionOwnerRequest items. + CollectionOwnerRequestAll(context.Context, *QueryAllCollectionOwnerRequestRequest) (*QueryAllCollectionOwnerRequestResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -650,6 +877,12 @@ func (*UnimplementedQueryServer) ActionRequest(ctx context.Context, req *QueryGe func (*UnimplementedQueryServer) ActionRequestAll(ctx context.Context, req *QueryAllActionRequestRequest) (*QueryAllActionRequestResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ActionRequestAll not implemented") } +func (*UnimplementedQueryServer) CollectionOwnerRequest(ctx context.Context, req *QueryGetCollectionOwnerRequestRequest) (*QueryGetCollectionOwnerRequestResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CollectionOwnerRequest not implemented") +} +func (*UnimplementedQueryServer) CollectionOwnerRequestAll(ctx context.Context, req *QueryAllCollectionOwnerRequestRequest) (*QueryAllCollectionOwnerRequestResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CollectionOwnerRequestAll not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -665,7 +898,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftoracle.Query/Params", + FullMethod: "/thesixnetwork.sixnft.nftoracle.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) @@ -683,7 +916,7 @@ func _Query_MintRequest_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftoracle.Query/MintRequest", + FullMethod: "/thesixnetwork.sixnft.nftoracle.Query/MintRequest", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).MintRequest(ctx, req.(*QueryGetMintRequestRequest)) @@ -701,7 +934,7 @@ func _Query_MintRequestAll_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftoracle.Query/MintRequestAll", + FullMethod: "/thesixnetwork.sixnft.nftoracle.Query/MintRequestAll", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).MintRequestAll(ctx, req.(*QueryAllMintRequestRequest)) @@ -719,7 +952,7 @@ func _Query_ActionRequest_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftoracle.Query/ActionRequest", + FullMethod: "/thesixnetwork.sixnft.nftoracle.Query/ActionRequest", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ActionRequest(ctx, req.(*QueryGetActionRequestRequest)) @@ -737,7 +970,7 @@ func _Query_ActionRequestAll_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftoracle.Query/ActionRequestAll", + FullMethod: "/thesixnetwork.sixnft.nftoracle.Query/ActionRequestAll", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ActionRequestAll(ctx, req.(*QueryAllActionRequestRequest)) @@ -745,8 +978,44 @@ func _Query_ActionRequestAll_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Query_CollectionOwnerRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetCollectionOwnerRequestRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CollectionOwnerRequest(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/thesixnetwork.sixnft.nftoracle.Query/CollectionOwnerRequest", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CollectionOwnerRequest(ctx, req.(*QueryGetCollectionOwnerRequestRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CollectionOwnerRequestAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllCollectionOwnerRequestRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CollectionOwnerRequestAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/thesixnetwork.sixnft.nftoracle.Query/CollectionOwnerRequestAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CollectionOwnerRequestAll(ctx, req.(*QueryAllCollectionOwnerRequestRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "sixnft.nftoracle.Query", + ServiceName: "thesixnetwork.sixnft.nftoracle.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -769,6 +1038,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ActionRequestAll", Handler: _Query_ActionRequestAll_Handler, }, + { + MethodName: "CollectionOwnerRequest", + Handler: _Query_CollectionOwnerRequest_Handler, + }, + { + MethodName: "CollectionOwnerRequestAll", + Handler: _Query_CollectionOwnerRequestAll_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "nftoracle/query.proto", @@ -1120,93 +1397,238 @@ func (m *QueryAllActionRequestResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryGetCollectionOwnerRequestRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n +func (m *QueryGetCollectionOwnerRequestRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetMintRequestRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryGetCollectionOwnerRequestRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l if m.Id != 0 { - n += 1 + sovQuery(uint64(m.Id)) + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *QueryGetMintRequestResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryGetCollectionOwnerRequestResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - l = m.MintRequest.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + return dAtA[:n], nil } -func (m *QueryAllMintRequestRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n +func (m *QueryGetCollectionOwnerRequestResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllMintRequestResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryGetCollectionOwnerRequestResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.MintRequest) > 0 { - for _, e := range m.MintRequest { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + { + size, err := m.CollectionOwnerRequest.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *QueryGetActionRequestRequest) Size() (n int) { +func (m *QueryAllCollectionOwnerRequestRequest) 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 *QueryAllCollectionOwnerRequestRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllCollectionOwnerRequestRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllCollectionOwnerRequestResponse) 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 *QueryAllCollectionOwnerRequestResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllCollectionOwnerRequestResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.CollectionOwnerRequest) > 0 { + for iNdEx := len(m.CollectionOwnerRequest) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CollectionOwnerRequest[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGetMintRequestRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n +} + +func (m *QueryGetMintRequestResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.MintRequest.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllMintRequestRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllMintRequestResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.MintRequest) > 0 { + for _, e := range m.MintRequest { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetActionRequestRequest) Size() (n int) { if m == nil { return 0 } @@ -1239,35 +1661,375 @@ func (m *QueryAllActionRequestRequest) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } - return n -} + return n +} + +func (m *QueryAllActionRequestResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ActionRequest) > 0 { + for _, e := range m.ActionRequest { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetCollectionOwnerRequestRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n +} + +func (m *QueryGetCollectionOwnerRequestResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CollectionOwnerRequest.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllCollectionOwnerRequestRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllCollectionOwnerRequestResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.CollectionOwnerRequest) > 0 { + for _, e := range m.CollectionOwnerRequest { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetMintRequestRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetMintRequestRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetMintRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } -func (m *QueryAllActionRequestResponse) Size() (n int) { - if m == nil { - return 0 + if iNdEx > l { + return io.ErrUnexpectedEOF } - var l int - _ = l - if len(m.ActionRequest) > 0 { - for _, e := range m.ActionRequest { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + return nil +} +func (m *QueryGetMintRequestResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetMintRequestResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetMintRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MintRequest", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MintRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllMintRequestRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1290,12 +2052,48 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllMintRequestRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllMintRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -1317,7 +2115,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllMintRequestResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1340,15 +2138,15 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllMintRequestResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllMintRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MintRequest", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1375,7 +2173,44 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.MintRequest = append(m.MintRequest, MintRequest{}) + if err := m.MintRequest[len(m.MintRequest)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1400,7 +2235,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetMintRequestRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetActionRequestRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1423,10 +2258,10 @@ func (m *QueryGetMintRequestRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetMintRequestRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetActionRequestRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetMintRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetActionRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1469,7 +2304,7 @@ func (m *QueryGetMintRequestRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetMintRequestResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetActionRequestResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1492,15 +2327,15 @@ func (m *QueryGetMintRequestResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetMintRequestResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetActionRequestResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetMintRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetActionRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MintRequest", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ActionRequest", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1527,7 +2362,7 @@ func (m *QueryGetMintRequestResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.MintRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ActionRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1552,7 +2387,7 @@ func (m *QueryGetMintRequestResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllMintRequestRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllActionRequestRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1575,10 +2410,10 @@ func (m *QueryAllMintRequestRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllMintRequestRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllActionRequestRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllMintRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllActionRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1638,7 +2473,7 @@ func (m *QueryAllMintRequestRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllMintRequestResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllActionRequestResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1661,15 +2496,15 @@ func (m *QueryAllMintRequestResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllMintRequestResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllActionRequestResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllMintRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllActionRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MintRequest", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ActionRequest", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1696,8 +2531,8 @@ func (m *QueryAllMintRequestResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.MintRequest = append(m.MintRequest, MintRequest{}) - if err := m.MintRequest[len(m.MintRequest)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ActionRequest = append(m.ActionRequest, ActionRequest{}) + if err := m.ActionRequest[len(m.ActionRequest)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1758,7 +2593,7 @@ func (m *QueryAllMintRequestResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetActionRequestRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetCollectionOwnerRequestRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1781,10 +2616,10 @@ func (m *QueryGetActionRequestRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetActionRequestRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetCollectionOwnerRequestRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetActionRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetCollectionOwnerRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1827,7 +2662,7 @@ func (m *QueryGetActionRequestRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetActionRequestResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetCollectionOwnerRequestResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1850,15 +2685,15 @@ func (m *QueryGetActionRequestResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetActionRequestResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetCollectionOwnerRequestResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetActionRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetCollectionOwnerRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionRequest", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CollectionOwnerRequest", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1885,7 +2720,7 @@ func (m *QueryGetActionRequestResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ActionRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.CollectionOwnerRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1910,7 +2745,7 @@ func (m *QueryGetActionRequestResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllActionRequestRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllCollectionOwnerRequestRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1933,10 +2768,10 @@ func (m *QueryAllActionRequestRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllActionRequestRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllCollectionOwnerRequestRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllActionRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllCollectionOwnerRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1996,7 +2831,7 @@ func (m *QueryAllActionRequestRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllActionRequestResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllCollectionOwnerRequestResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2019,15 +2854,15 @@ func (m *QueryAllActionRequestResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllActionRequestResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllCollectionOwnerRequestResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllActionRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllCollectionOwnerRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionRequest", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CollectionOwnerRequest", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2054,8 +2889,8 @@ func (m *QueryAllActionRequestResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ActionRequest = append(m.ActionRequest, ActionRequest{}) - if err := m.ActionRequest[len(m.ActionRequest)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.CollectionOwnerRequest = append(m.CollectionOwnerRequest, CollectionOwnerRequest{}) + if err := m.CollectionOwnerRequest[len(m.CollectionOwnerRequest)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/nftoracle/types/query.pb.gw.go b/x/nftoracle/types/query.pb.gw.go index e556b92d..83737c4a 100644 --- a/x/nftoracle/types/query.pb.gw.go +++ b/x/nftoracle/types/query.pb.gw.go @@ -231,6 +231,96 @@ func local_request_Query_ActionRequestAll_0(ctx context.Context, marshaler runti } +func request_Query_CollectionOwnerRequest_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetCollectionOwnerRequestRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.CollectionOwnerRequest(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CollectionOwnerRequest_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetCollectionOwnerRequestRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.CollectionOwnerRequest(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_CollectionOwnerRequestAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_CollectionOwnerRequestAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllCollectionOwnerRequestRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CollectionOwnerRequestAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CollectionOwnerRequestAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CollectionOwnerRequestAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllCollectionOwnerRequestRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CollectionOwnerRequestAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CollectionOwnerRequestAll(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -352,6 +442,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_CollectionOwnerRequest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_CollectionOwnerRequest_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CollectionOwnerRequest_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CollectionOwnerRequestAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_CollectionOwnerRequestAll_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CollectionOwnerRequestAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -493,6 +629,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_CollectionOwnerRequest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_CollectionOwnerRequest_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CollectionOwnerRequest_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CollectionOwnerRequestAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_CollectionOwnerRequestAll_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CollectionOwnerRequestAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -506,6 +682,10 @@ var ( pattern_Query_ActionRequest_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"sixnft", "nftoracle", "action_request", "id"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_ActionRequestAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"sixnft", "nftoracle", "action_request"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_CollectionOwnerRequest_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"thesixnetwork", "sixnft", "nftoracle", "collection_owner_request", "id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_CollectionOwnerRequestAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"thesixnetwork", "sixnft", "nftoracle", "collection_owner_request"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -518,4 +698,8 @@ var ( forward_Query_ActionRequest_0 = runtime.ForwardResponseMessage forward_Query_ActionRequestAll_0 = runtime.ForwardResponseMessage + + forward_Query_CollectionOwnerRequest_0 = runtime.ForwardResponseMessage + + forward_Query_CollectionOwnerRequestAll_0 = runtime.ForwardResponseMessage ) diff --git a/x/nftoracle/types/request.pb.go b/x/nftoracle/types/request.pb.go index 98fefb07..1962f947 100644 --- a/x/nftoracle/types/request.pb.go +++ b/x/nftoracle/types/request.pb.go @@ -179,42 +179,43 @@ func (m *DataHash) GetConfirmers() []string { } func init() { - proto.RegisterEnum("sixnft.nftoracle.RequestStatus", RequestStatus_name, RequestStatus_value) - proto.RegisterType((*NftOriginData)(nil), "sixnft.nftoracle.NftOriginData") - proto.RegisterType((*DataHash)(nil), "sixnft.nftoracle.DataHash") + proto.RegisterEnum("thesixnetwork.sixnft.nftoracle.RequestStatus", RequestStatus_name, RequestStatus_value) + proto.RegisterType((*NftOriginData)(nil), "thesixnetwork.sixnft.nftoracle.NftOriginData") + proto.RegisterType((*DataHash)(nil), "thesixnetwork.sixnft.nftoracle.DataHash") } func init() { proto.RegisterFile("nftoracle/request.proto", fileDescriptor_f60220a52ce49438) } var fileDescriptor_f60220a52ce49438 = []byte{ - // 429 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0xdf, 0x6e, 0xd3, 0x30, - 0x14, 0xc6, 0x9b, 0x75, 0x0c, 0x76, 0x4a, 0x51, 0x64, 0x26, 0x5a, 0x55, 0x28, 0x9b, 0x26, 0x21, - 0x4d, 0x5c, 0xc4, 0x62, 0xbc, 0x00, 0x23, 0x0d, 0x2c, 0x02, 0x25, 0x53, 0xd2, 0x8a, 0x89, 0x9b, - 0xc8, 0x6d, 0x9d, 0x3f, 0xa2, 0x89, 0x8b, 0x7d, 0x22, 0x86, 0x04, 0x12, 0x8f, 0xc0, 0x63, 0x71, - 0xb9, 0x4b, 0x2e, 0x51, 0xfb, 0x22, 0x28, 0x76, 0xc5, 0x06, 0xdc, 0x9d, 0xf3, 0x7d, 0x9f, 0x8e, - 0x7f, 0x3e, 0x36, 0x0c, 0xea, 0x0c, 0x85, 0x64, 0xf3, 0x25, 0xa7, 0x92, 0x7f, 0x6c, 0xb8, 0x42, - 0x77, 0x25, 0x05, 0x0a, 0x62, 0xab, 0xf2, 0xaa, 0xce, 0xd0, 0xfd, 0xe3, 0x8f, 0x6e, 0x45, 0xc5, - 0x8a, 0xd7, 0x8a, 0x33, 0x13, 0x1d, 0x1d, 0xe4, 0x22, 0x17, 0xba, 0xa4, 0x6d, 0xb5, 0x55, 0x0f, - 0x73, 0x21, 0xf2, 0x25, 0xa7, 0xba, 0x9b, 0x35, 0x19, 0xc5, 0xb2, 0xe2, 0x0a, 0x59, 0xb5, 0x32, - 0x81, 0xe3, 0xaf, 0xd0, 0x0f, 0x33, 0x8c, 0x64, 0x99, 0x97, 0xf5, 0x98, 0x21, 0x23, 0x07, 0x70, - 0xa7, 0xac, 0x58, 0xce, 0x87, 0xd6, 0x91, 0x75, 0xb2, 0x1f, 0x9b, 0x86, 0x3c, 0x81, 0x07, 0x85, - 0x58, 0x2e, 0xb8, 0x4c, 0xd9, 0x62, 0x21, 0xb9, 0x52, 0xc3, 0x1d, 0x6d, 0xf7, 0x8d, 0x7a, 0x66, - 0x44, 0x42, 0x61, 0x0f, 0x25, 0x2b, 0x51, 0x0d, 0xbb, 0x47, 0xdd, 0x93, 0xde, 0xe9, 0xc0, 0xfd, - 0xf7, 0x02, 0xee, 0xa4, 0xf5, 0xe3, 0x6d, 0xec, 0xf8, 0x9b, 0x05, 0xf7, 0xda, 0x63, 0xcf, 0x99, - 0x2a, 0xc8, 0x0b, 0xe8, 0x09, 0x0d, 0x92, 0x2e, 0x18, 0x32, 0x0d, 0xd0, 0x3b, 0x3d, 0xfc, 0x7f, - 0xc4, 0x5f, 0xc0, 0x31, 0x88, 0x1b, 0x78, 0x02, 0xbb, 0x05, 0x53, 0x85, 0x86, 0xbb, 0x1f, 0xeb, - 0x9a, 0x38, 0x00, 0x73, 0x51, 0x67, 0xa5, 0xac, 0xb8, 0x34, 0x5c, 0xfb, 0xf1, 0x2d, 0xe5, 0xe9, - 0x17, 0xe8, 0xc7, 0x66, 0xe9, 0x09, 0x32, 0x6c, 0x14, 0xe9, 0xc1, 0xdd, 0x0b, 0x3f, 0x1c, 0x07, - 0xe1, 0x6b, 0xbb, 0x43, 0x46, 0xf0, 0x28, 0x99, 0x7a, 0x9e, 0x9f, 0x24, 0xe9, 0xbb, 0x60, 0x72, - 0x9e, 0x7a, 0x51, 0x98, 0xf8, 0x61, 0x32, 0x4d, 0x6c, 0x8b, 0x3c, 0x86, 0xe1, 0xab, 0xb3, 0xe0, - 0xad, 0x3f, 0xd6, 0x56, 0x34, 0x9d, 0xb4, 0xae, 0x67, 0xdc, 0x9d, 0x76, 0x8c, 0x7f, 0x79, 0x11, - 0xc4, 0xfe, 0xd8, 0xee, 0x92, 0x01, 0x3c, 0xdc, 0x46, 0xa3, 0x30, 0xf5, 0x2f, 0x7d, 0x6f, 0x3a, - 0x09, 0xa2, 0xd0, 0xde, 0x7d, 0xf9, 0xe6, 0xc7, 0xda, 0xb1, 0xae, 0xd7, 0x8e, 0xf5, 0x6b, 0xed, - 0x58, 0xdf, 0x37, 0x4e, 0xe7, 0x7a, 0xe3, 0x74, 0x7e, 0x6e, 0x9c, 0xce, 0xfb, 0x67, 0x79, 0x89, - 0x45, 0x33, 0x73, 0xe7, 0xa2, 0xa2, 0x58, 0xf0, 0x76, 0x0b, 0x1c, 0x3f, 0x09, 0xf9, 0x81, 0x9a, - 0x85, 0xd0, 0x2b, 0x7a, 0xf3, 0x17, 0xf0, 0xf3, 0x8a, 0xab, 0xd9, 0x9e, 0x7e, 0xd3, 0xe7, 0xbf, - 0x03, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x07, 0x41, 0x75, 0x50, 0x02, 0x00, 0x00, + // 435 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x41, 0x6b, 0x13, 0x41, + 0x14, 0xce, 0x36, 0xb5, 0xda, 0x17, 0x23, 0x61, 0x2c, 0x36, 0x04, 0x59, 0x4b, 0xa1, 0x50, 0x04, + 0x77, 0xb1, 0x9e, 0x3d, 0xd4, 0xcd, 0x6a, 0x17, 0x65, 0xb6, 0xec, 0x26, 0x58, 0xbc, 0x2c, 0x93, + 0x64, 0x76, 0x77, 0x30, 0xbb, 0x13, 0x67, 0x5e, 0xb0, 0x82, 0xff, 0x40, 0x10, 0x7f, 0x96, 0xc7, + 0x1e, 0x3d, 0x4a, 0xf2, 0x47, 0x64, 0x67, 0x82, 0x6d, 0x2f, 0x7a, 0xfb, 0xe6, 0xfb, 0xbe, 0xf7, + 0xf8, 0xde, 0x7b, 0x03, 0xfb, 0x75, 0x8e, 0x52, 0xb1, 0xe9, 0x9c, 0xfb, 0x8a, 0x7f, 0x5a, 0x72, + 0x8d, 0xde, 0x42, 0x49, 0x94, 0xc4, 0xc5, 0x92, 0x6b, 0x71, 0x59, 0x73, 0xfc, 0x2c, 0xd5, 0x47, + 0xaf, 0x81, 0x39, 0x7a, 0x7f, 0xdd, 0x83, 0x1b, 0x85, 0x72, 0xc1, 0x6b, 0xcd, 0x99, 0x2d, 0x1c, + 0xec, 0x15, 0xb2, 0x90, 0x06, 0xfa, 0x0d, 0xda, 0xb0, 0x4f, 0x0a, 0x29, 0x8b, 0x39, 0xf7, 0xcd, + 0x6b, 0xb2, 0xcc, 0x7d, 0x14, 0x15, 0xd7, 0xc8, 0xaa, 0x85, 0x35, 0x1c, 0x7e, 0x73, 0xa0, 0x4b, + 0x73, 0x8c, 0x95, 0x28, 0x44, 0x3d, 0x64, 0xc8, 0xc8, 0x1e, 0xdc, 0x11, 0x15, 0x2b, 0x78, 0xdf, + 0x39, 0x70, 0x8e, 0x77, 0x13, 0xfb, 0x20, 0x47, 0xf0, 0xa0, 0x94, 0xf3, 0x19, 0x57, 0x19, 0x9b, + 0xcd, 0x14, 0xd7, 0xba, 0xbf, 0x65, 0xe4, 0xae, 0x65, 0x4f, 0x2d, 0x49, 0x5e, 0xc2, 0x0e, 0x2a, + 0x26, 0x50, 0xf7, 0xdb, 0x07, 0xed, 0xe3, 0xce, 0xc9, 0x91, 0xf7, 0xef, 0x79, 0xbc, 0x51, 0xe3, + 0x4e, 0x36, 0x45, 0x87, 0xdf, 0x1d, 0xb8, 0xd7, 0x84, 0x38, 0x63, 0xba, 0x24, 0x14, 0x3a, 0xd2, + 0xc4, 0xca, 0x66, 0x0c, 0x99, 0x89, 0xd3, 0x39, 0x79, 0xf6, 0xbf, 0x86, 0xb7, 0x86, 0x49, 0x40, + 0x5e, 0x0f, 0x46, 0x60, 0xbb, 0x64, 0xba, 0x34, 0xc1, 0xef, 0x27, 0x06, 0x13, 0x17, 0x60, 0x2a, + 0xeb, 0x5c, 0xa8, 0x8a, 0x2b, 0x9b, 0x79, 0x37, 0xb9, 0xc1, 0x3c, 0xfd, 0x0a, 0xdd, 0xc4, 0xde, + 0x27, 0x45, 0x86, 0x4b, 0x4d, 0x3a, 0x70, 0xf7, 0x3c, 0xa4, 0xc3, 0x88, 0xbe, 0xe9, 0xb5, 0xc8, + 0x00, 0x1e, 0xa5, 0xe3, 0x20, 0x08, 0xd3, 0x34, 0x7b, 0x1f, 0x8d, 0xce, 0xb2, 0x20, 0xa6, 0x69, + 0x48, 0xd3, 0x71, 0xda, 0x73, 0xc8, 0x63, 0xe8, 0xbf, 0x3e, 0x8d, 0xde, 0x85, 0x43, 0x23, 0xc5, + 0xe3, 0x51, 0xa3, 0x06, 0x56, 0xdd, 0x6a, 0xda, 0x84, 0x17, 0xe7, 0x51, 0x12, 0x0e, 0x7b, 0x6d, + 0xb2, 0x0f, 0x0f, 0x37, 0xd6, 0x98, 0x66, 0xe1, 0x45, 0x18, 0x8c, 0x47, 0x51, 0x4c, 0x7b, 0xdb, + 0xaf, 0xde, 0xfe, 0x5c, 0xb9, 0xce, 0xd5, 0xca, 0x75, 0x7e, 0xaf, 0x5c, 0xe7, 0xc7, 0xda, 0x6d, + 0x5d, 0xad, 0xdd, 0xd6, 0xaf, 0xb5, 0xdb, 0xfa, 0xf0, 0xbc, 0x10, 0x58, 0x2e, 0x27, 0xde, 0x54, + 0x56, 0xfe, 0xad, 0x85, 0xf8, 0x76, 0x21, 0xfe, 0xa5, 0x7f, 0xfd, 0x51, 0xf0, 0xcb, 0x82, 0xeb, + 0xc9, 0x8e, 0x39, 0xf8, 0x8b, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x94, 0x18, 0xb1, 0xf3, 0x7b, + 0x02, 0x00, 0x00, } func (m *NftOriginData) Marshal() (dAtA []byte, err error) { diff --git a/x/nftoracle/types/tx.pb.go b/x/nftoracle/types/tx.pb.go index 1d7d0b03..c1147a72 100644 --- a/x/nftoracle/types/tx.pb.go +++ b/x/nftoracle/types/tx.pb.go @@ -476,51 +476,52 @@ func (m *MsgSubmitActionResponseResponse) GetActionRequestID() string { } func init() { - proto.RegisterType((*MsgCreateMintRequest)(nil), "sixnft.nftoracle.MsgCreateMintRequest") - proto.RegisterType((*MsgCreateMintRequestResponse)(nil), "sixnft.nftoracle.MsgCreateMintRequestResponse") - proto.RegisterType((*MsgSubmitMintResponse)(nil), "sixnft.nftoracle.MsgSubmitMintResponse") - proto.RegisterType((*MsgSubmitMintResponseResponse)(nil), "sixnft.nftoracle.MsgSubmitMintResponseResponse") - proto.RegisterType((*MsgCreateActionRequest)(nil), "sixnft.nftoracle.MsgCreateActionRequest") - proto.RegisterType((*MsgCreateActionRequestResponse)(nil), "sixnft.nftoracle.MsgCreateActionRequestResponse") - proto.RegisterType((*MsgSubmitActionResponse)(nil), "sixnft.nftoracle.MsgSubmitActionResponse") - proto.RegisterType((*MsgSubmitActionResponseResponse)(nil), "sixnft.nftoracle.MsgSubmitActionResponseResponse") + proto.RegisterType((*MsgCreateMintRequest)(nil), "thesixnetwork.sixnft.nftoracle.MsgCreateMintRequest") + proto.RegisterType((*MsgCreateMintRequestResponse)(nil), "thesixnetwork.sixnft.nftoracle.MsgCreateMintRequestResponse") + proto.RegisterType((*MsgSubmitMintResponse)(nil), "thesixnetwork.sixnft.nftoracle.MsgSubmitMintResponse") + proto.RegisterType((*MsgSubmitMintResponseResponse)(nil), "thesixnetwork.sixnft.nftoracle.MsgSubmitMintResponseResponse") + proto.RegisterType((*MsgCreateActionRequest)(nil), "thesixnetwork.sixnft.nftoracle.MsgCreateActionRequest") + proto.RegisterType((*MsgCreateActionRequestResponse)(nil), "thesixnetwork.sixnft.nftoracle.MsgCreateActionRequestResponse") + proto.RegisterType((*MsgSubmitActionResponse)(nil), "thesixnetwork.sixnft.nftoracle.MsgSubmitActionResponse") + proto.RegisterType((*MsgSubmitActionResponseResponse)(nil), "thesixnetwork.sixnft.nftoracle.MsgSubmitActionResponseResponse") } func init() { proto.RegisterFile("nftoracle/tx.proto", fileDescriptor_b7fb5383b6da1e6e) } var fileDescriptor_b7fb5383b6da1e6e = []byte{ - // 494 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x31, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0xe3, 0x24, 0x02, 0xf1, 0x24, 0x5a, 0x30, 0x2d, 0x58, 0x11, 0x98, 0xca, 0x42, 0x60, - 0x16, 0xbb, 0x85, 0x8a, 0x1d, 0x52, 0x86, 0xaa, 0x0a, 0x83, 0xb3, 0xb1, 0x39, 0xf6, 0xd9, 0x39, - 0x05, 0xdf, 0x25, 0x77, 0xcf, 0x25, 0x0c, 0x4c, 0x7c, 0x01, 0x66, 0x46, 0x3e, 0x0d, 0x12, 0x4b, - 0x47, 0x46, 0x94, 0x7c, 0x11, 0x94, 0xd8, 0x39, 0xea, 0xe4, 0x9a, 0x1a, 0x31, 0x59, 0xfe, 0xdf, - 0xff, 0xde, 0xff, 0xa7, 0xf7, 0xee, 0x0e, 0x4c, 0x96, 0x20, 0x17, 0x61, 0xf4, 0x81, 0xf8, 0x38, - 0xf5, 0xc6, 0x82, 0x23, 0x37, 0xef, 0x48, 0x3a, 0x65, 0x09, 0x7a, 0x6a, 0xc9, 0xf9, 0x66, 0xc0, - 0x5e, 0x4f, 0xa6, 0x5d, 0x41, 0x42, 0x24, 0x3d, 0xca, 0x30, 0x20, 0x93, 0x9c, 0x48, 0x34, 0x2d, - 0xb8, 0x19, 0x2d, 0x44, 0x2e, 0x2c, 0xe3, 0xc0, 0x70, 0x6f, 0x05, 0xab, 0x5f, 0xf3, 0x09, 0xdc, - 0x66, 0x09, 0xf6, 0xa3, 0x21, 0xc9, 0xc2, 0x2e, 0x8f, 0x89, 0xd5, 0x5c, 0xae, 0x57, 0xc5, 0xc5, - 0x7e, 0xe4, 0x23, 0xc2, 0x4e, 0x63, 0xab, 0x55, 0xec, 0x2f, 0x7f, 0x4d, 0x17, 0x76, 0x05, 0x99, - 0xe4, 0x54, 0x90, 0xb8, 0xcb, 0x59, 0x42, 0x45, 0x66, 0xb5, 0x0f, 0x0c, 0xb7, 0x1d, 0xac, 0xcb, - 0x0e, 0x83, 0x87, 0x3a, 0xb6, 0x80, 0xc8, 0x31, 0x67, 0x92, 0x98, 0x3b, 0xd0, 0xa4, 0xf1, 0x12, - 0xaf, 0x1d, 0x34, 0x69, 0xfc, 0xbf, 0x64, 0xce, 0x67, 0xd8, 0xef, 0xc9, 0xb4, 0x9f, 0x0f, 0x32, - 0x8a, 0x45, 0x5e, 0x19, 0xb4, 0xb5, 0x19, 0xd9, 0x5f, 0xb2, 0xd3, 0x93, 0x65, 0x64, 0x3b, 0xa8, - 0x8a, 0x0b, 0xd7, 0x20, 0x94, 0xe4, 0xd5, 0xf1, 0xbb, 0x04, 0x4f, 0x42, 0x0c, 0xcb, 0xe0, 0xaa, - 0xe8, 0xbc, 0x85, 0x47, 0xda, 0x78, 0x85, 0xb1, 0x11, 0x56, 0xc0, 0x54, 0x45, 0xe7, 0xbb, 0x01, - 0xf7, 0x55, 0xdb, 0x5e, 0x47, 0x48, 0x39, 0xbb, 0x7e, 0xa8, 0x3b, 0xd0, 0x3c, 0xcf, 0xca, 0x7e, - 0x35, 0xcf, 0x33, 0xf3, 0x18, 0xf6, 0x0b, 0xb8, 0xa2, 0x40, 0x9f, 0xa6, 0x2c, 0xc4, 0x5c, 0x90, - 0x92, 0x5c, 0xbf, 0xf8, 0x0f, 0xa3, 0x3d, 0x04, 0x5b, 0xcf, 0x78, 0xd5, 0x70, 0x9d, 0x2f, 0x06, - 0x3c, 0x50, 0xed, 0x59, 0x6d, 0xb9, 0x76, 0x3e, 0x2e, 0xec, 0x86, 0x97, 0xcb, 0xab, 0x09, 0xad, - 0xcb, 0x35, 0x67, 0x74, 0x06, 0x8f, 0xaf, 0x80, 0x50, 0x30, 0x9a, 0xc8, 0x02, 0x6a, 0x5d, 0x7e, - 0xf1, 0xb3, 0x05, 0xad, 0x9e, 0x4c, 0xcd, 0x11, 0xdc, 0xdd, 0xbc, 0x80, 0x4f, 0xbd, 0xf5, 0xcb, - 0xea, 0xe9, 0x2e, 0x43, 0xc7, 0xab, 0xe7, 0x53, 0x78, 0x0c, 0x4c, 0xcd, 0x09, 0x7f, 0xa6, 0xad, - 0xb2, 0x69, 0xec, 0xf8, 0x35, 0x8d, 0xaa, 0xf2, 0x04, 0xee, 0xe9, 0x8e, 0xa2, 0xbb, 0x05, 0xbb, - 0xe2, 0xec, 0x1c, 0xd6, 0x75, 0xaa, 0x48, 0x84, 0x3d, 0xed, 0x31, 0x79, 0xbe, 0x85, 0xbd, 0x6a, - 0xed, 0x1c, 0xd5, 0xb6, 0xae, 0xbe, 0x6f, 0xce, 0x7e, 0xcc, 0x6c, 0xe3, 0x62, 0x66, 0x1b, 0xbf, - 0x67, 0xb6, 0xf1, 0x75, 0x6e, 0x37, 0x2e, 0xe6, 0x76, 0xe3, 0xd7, 0xdc, 0x6e, 0xbc, 0x3f, 0x4a, - 0x29, 0x0e, 0xf3, 0x81, 0x17, 0xf1, 0xcc, 0xc7, 0x21, 0x59, 0x54, 0x26, 0xf8, 0x91, 0x8b, 0x91, - 0x5f, 0x84, 0xf8, 0x53, 0xff, 0xd2, 0x63, 0xfd, 0x69, 0x4c, 0xe4, 0xe0, 0xc6, 0xf2, 0xc1, 0x7e, - 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0x70, 0xbb, 0x7d, 0xe0, 0xc6, 0x05, 0x00, 0x00, + // 509 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x4f, 0x6f, 0xd3, 0x30, + 0x18, 0xc6, 0xeb, 0x2e, 0x02, 0xf1, 0x4a, 0x6c, 0xc2, 0x6c, 0x10, 0x55, 0x10, 0xa6, 0x88, 0x43, + 0x4f, 0x09, 0x7f, 0xca, 0xb8, 0xf0, 0x47, 0xd0, 0x71, 0x98, 0xa6, 0x72, 0x48, 0x6f, 0xdc, 0xd2, + 0xc4, 0x49, 0xad, 0x11, 0xbb, 0xb3, 0x9d, 0x51, 0x0e, 0x9c, 0x38, 0x20, 0x21, 0x21, 0xed, 0xcc, + 0x91, 0x2f, 0xc2, 0x95, 0xe3, 0x8e, 0x1c, 0x51, 0xfb, 0x45, 0x50, 0x9b, 0xd4, 0x2c, 0xad, 0xb7, + 0x95, 0xee, 0xd4, 0xe6, 0xb1, 0x1f, 0x3f, 0x3f, 0xbf, 0xaf, 0x2d, 0x03, 0x66, 0x89, 0xe2, 0x22, + 0x8c, 0xde, 0x13, 0x5f, 0x0d, 0xbd, 0x81, 0xe0, 0x8a, 0x63, 0x47, 0xf5, 0x89, 0xa4, 0x43, 0x46, + 0xd4, 0x07, 0x2e, 0x0e, 0xbc, 0xc9, 0xdf, 0x44, 0x79, 0x7a, 0xa2, 0xfb, 0x1d, 0xc1, 0x66, 0x47, + 0xa6, 0x6d, 0x41, 0x42, 0x45, 0x3a, 0x94, 0xa9, 0x80, 0x1c, 0xe6, 0x44, 0x2a, 0x6c, 0xc3, 0xd5, + 0x68, 0x22, 0x72, 0x61, 0xa3, 0x6d, 0xd4, 0xbc, 0x16, 0xcc, 0x3e, 0xf1, 0x7d, 0xb8, 0xce, 0x12, + 0xd5, 0x8d, 0xfa, 0x24, 0x0b, 0xdb, 0x3c, 0x26, 0x76, 0x7d, 0x3a, 0x5e, 0x15, 0x27, 0x7e, 0xc5, + 0x0f, 0x08, 0xdb, 0x8b, 0xed, 0xb5, 0xc2, 0x5f, 0x7e, 0xe2, 0x26, 0x6c, 0x08, 0x72, 0x98, 0x53, + 0x41, 0xe2, 0x36, 0x67, 0x09, 0x15, 0x99, 0x6d, 0x6d, 0xa3, 0xa6, 0x15, 0xcc, 0xcb, 0x2e, 0x83, + 0x3b, 0x26, 0xb6, 0x80, 0xc8, 0x01, 0x67, 0x92, 0xe0, 0x75, 0xa8, 0xd3, 0x78, 0x8a, 0x67, 0x05, + 0x75, 0x1a, 0x5f, 0x96, 0xcc, 0xfd, 0x04, 0x5b, 0x1d, 0x99, 0x76, 0xf3, 0x5e, 0x46, 0x55, 0x91, + 0x57, 0x06, 0x9d, 0x5b, 0x8c, 0xec, 0x1f, 0xd9, 0xde, 0xee, 0x34, 0xd2, 0x0a, 0xaa, 0xe2, 0x64, + 0x56, 0x2f, 0x94, 0x64, 0xa7, 0xf5, 0x36, 0x51, 0xbb, 0xa1, 0x0a, 0xcb, 0xe0, 0xaa, 0xe8, 0xbe, + 0x81, 0xbb, 0xc6, 0x78, 0x8d, 0xb1, 0x10, 0x56, 0xc0, 0x54, 0x45, 0xf7, 0x07, 0x82, 0x5b, 0xba, + 0x6c, 0xaf, 0x22, 0x45, 0x39, 0xbb, 0xb8, 0xa9, 0xeb, 0x50, 0x3f, 0xca, 0xca, 0x7a, 0xd5, 0x8f, + 0x32, 0xdc, 0x82, 0xad, 0x02, 0xae, 0x58, 0xa0, 0x4b, 0x53, 0x16, 0xaa, 0x5c, 0x90, 0x92, 0xdc, + 0x3c, 0xf8, 0x1f, 0xad, 0x7d, 0x00, 0x8e, 0x99, 0xf1, 0xac, 0xe6, 0xba, 0x9f, 0x11, 0xdc, 0xd6, + 0xe5, 0x99, 0x59, 0x2e, 0xec, 0x4f, 0x13, 0x36, 0xc2, 0xd3, 0xcb, 0xeb, 0x0e, 0xcd, 0xcb, 0x4b, + 0xf6, 0x68, 0x1f, 0xee, 0x9d, 0x01, 0xa1, 0x61, 0x0c, 0x91, 0x05, 0xd4, 0xbc, 0xfc, 0xe8, 0xa7, + 0x05, 0x6b, 0x1d, 0x99, 0xe2, 0x2f, 0x08, 0x6e, 0x2c, 0xde, 0xc0, 0x96, 0x77, 0xfe, 0xdd, 0xf5, + 0x4c, 0x77, 0xa3, 0xf1, 0x6c, 0x15, 0x97, 0x66, 0xff, 0x8a, 0x00, 0x1b, 0xce, 0xff, 0x93, 0x25, + 0x16, 0x5d, 0xb4, 0x35, 0x9e, 0xaf, 0x64, 0xd3, 0xa9, 0xdf, 0x10, 0xdc, 0x34, 0x9d, 0xe2, 0x9d, + 0xa5, 0xb7, 0x58, 0xf1, 0x35, 0x5e, 0xac, 0xe6, 0xd3, 0x3c, 0xc7, 0x08, 0x36, 0x8d, 0xc7, 0xef, + 0xe9, 0xd2, 0xfb, 0xac, 0x1a, 0x1b, 0x2f, 0x57, 0x34, 0xce, 0x7e, 0x5f, 0xef, 0xff, 0x1a, 0x39, + 0xe8, 0x64, 0xe4, 0xa0, 0x3f, 0x23, 0x07, 0x1d, 0x8f, 0x9d, 0xda, 0xc9, 0xd8, 0xa9, 0xfd, 0x1e, + 0x3b, 0xb5, 0x77, 0x0f, 0x53, 0xaa, 0xfa, 0x79, 0xcf, 0x8b, 0x78, 0xe6, 0x57, 0x42, 0xfc, 0x22, + 0xc4, 0x1f, 0xfa, 0xa7, 0x9e, 0x8b, 0x8f, 0x03, 0x22, 0x7b, 0x57, 0xa6, 0x4f, 0xc6, 0xe3, 0xbf, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x00, 0x15, 0x1f, 0x6f, 0x48, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -551,7 +552,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { func (c *msgClient) CreateMintRequest(ctx context.Context, in *MsgCreateMintRequest, opts ...grpc.CallOption) (*MsgCreateMintRequestResponse, error) { out := new(MsgCreateMintRequestResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftoracle.Msg/CreateMintRequest", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftoracle.Msg/CreateMintRequest", in, out, opts...) if err != nil { return nil, err } @@ -560,7 +561,7 @@ func (c *msgClient) CreateMintRequest(ctx context.Context, in *MsgCreateMintRequ func (c *msgClient) SubmitMintResponse(ctx context.Context, in *MsgSubmitMintResponse, opts ...grpc.CallOption) (*MsgSubmitMintResponseResponse, error) { out := new(MsgSubmitMintResponseResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftoracle.Msg/SubmitMintResponse", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftoracle.Msg/SubmitMintResponse", in, out, opts...) if err != nil { return nil, err } @@ -569,7 +570,7 @@ func (c *msgClient) SubmitMintResponse(ctx context.Context, in *MsgSubmitMintRes func (c *msgClient) CreateActionRequest(ctx context.Context, in *MsgCreateActionRequest, opts ...grpc.CallOption) (*MsgCreateActionRequestResponse, error) { out := new(MsgCreateActionRequestResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftoracle.Msg/CreateActionRequest", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftoracle.Msg/CreateActionRequest", in, out, opts...) if err != nil { return nil, err } @@ -578,7 +579,7 @@ func (c *msgClient) CreateActionRequest(ctx context.Context, in *MsgCreateAction func (c *msgClient) SubmitActionResponse(ctx context.Context, in *MsgSubmitActionResponse, opts ...grpc.CallOption) (*MsgSubmitActionResponseResponse, error) { out := new(MsgSubmitActionResponseResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftoracle.Msg/SubmitActionResponse", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftoracle.Msg/SubmitActionResponse", in, out, opts...) if err != nil { return nil, err } @@ -624,7 +625,7 @@ func _Msg_CreateMintRequest_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftoracle.Msg/CreateMintRequest", + FullMethod: "/thesixnetwork.sixnft.nftoracle.Msg/CreateMintRequest", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CreateMintRequest(ctx, req.(*MsgCreateMintRequest)) @@ -642,7 +643,7 @@ func _Msg_SubmitMintResponse_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftoracle.Msg/SubmitMintResponse", + FullMethod: "/thesixnetwork.sixnft.nftoracle.Msg/SubmitMintResponse", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).SubmitMintResponse(ctx, req.(*MsgSubmitMintResponse)) @@ -660,7 +661,7 @@ func _Msg_CreateActionRequest_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftoracle.Msg/CreateActionRequest", + FullMethod: "/thesixnetwork.sixnft.nftoracle.Msg/CreateActionRequest", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CreateActionRequest(ctx, req.(*MsgCreateActionRequest)) @@ -678,7 +679,7 @@ func _Msg_SubmitActionResponse_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftoracle.Msg/SubmitActionResponse", + FullMethod: "/thesixnetwork.sixnft.nftoracle.Msg/SubmitActionResponse", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).SubmitActionResponse(ctx, req.(*MsgSubmitActionResponse)) @@ -687,7 +688,7 @@ func _Msg_SubmitActionResponse_Handler(srv interface{}, ctx context.Context, dec } var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "sixnft.nftoracle.Msg", + ServiceName: "thesixnetwork.sixnft.nftoracle.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { From 149cd89adbec48fea0798816e0a081b216a5859b Mon Sep 17 00:00:00 2001 From: dDee-D-six Date: Fri, 30 Sep 2022 11:40:12 +0700 Subject: [PATCH 2/5] merge proto update with develop --- docs/static/openapi.yml | 1526 +++-- vue/src/store/generated/index.ts | 4 + .../sixnft/sixnft.nftmngr/index.ts | 112 +- .../sixnft/sixnft.nftmngr/module/index.ts | 30 +- .../thesixnetwork.sixnft.evmsupport/index.ts | 261 + .../module/index.ts | 63 + .../module/rest.ts | 378 ++ .../cosmos/base/query/v1beta1/pagination.ts | 300 + .../types/evmsupport/address_binding.ts | 93 + .../module/types/evmsupport/genesis.ts | 114 + .../module/types/evmsupport/params.ts | 56 + .../module/types/evmsupport/query.ts | 556 ++ .../module/types/evmsupport/tx.ts | 479 ++ .../module/types/gogoproto/gogo.ts | 2 + .../module/types/google/api/annotations.ts | 2 + .../module/types/google/api/http.ts | 706 +++ .../types/google/protobuf/descriptor.ts | 5314 +++++++++++++++++ .../package.json | 18 + .../thesixnetwork.sixnft.evmsupport/vuex-root | 1 + .../thesixnetwork.sixnft.nftadmin/index.ts | 288 + .../module/index.ts | 69 + .../module/rest.ts | 298 + .../cosmos/base/query/v1beta1/pagination.ts | 328 + .../module/types/gogoproto/gogo.ts | 2 + .../module/types/google/api/annotations.ts | 2 + .../module/types/google/api/http.ts | 706 +++ .../types/google/protobuf/descriptor.ts | 5314 +++++++++++++++++ .../module/types/nftadmin/authorization.ts | 99 + .../module/types/nftadmin/genesis.ts | 103 + .../module/types/nftadmin/params.ts | 56 + .../module/types/nftadmin/permissions.ts | 253 + .../module/types/nftadmin/query.ts | 304 + .../module/types/nftadmin/tx.ts | 799 +++ .../package.json | 18 + .../thesixnetwork.sixnft.nftadmin/vuex-root | 1 + .../thesixnetwork.sixnft.nftoracle/index.ts | 32 +- .../module/index.ts | 12 +- x/evmsupport/types/address_binding.pb.go | 24 +- x/evmsupport/types/genesis.pb.go | 32 +- x/evmsupport/types/params.pb.go | 20 +- x/evmsupport/types/query.pb.go | 96 +- x/evmsupport/types/tx.pb.go | 62 +- x/nftadmin/types/authorization.pb.go | 27 +- x/nftadmin/types/genesis.pb.go | 30 +- x/nftadmin/types/params.pb.go | 20 +- x/nftadmin/types/permissions.pb.go | 38 +- x/nftadmin/types/query.pb.go | 69 +- x/nftadmin/types/tx.pb.go | 86 +- 48 files changed, 18086 insertions(+), 1117 deletions(-) create mode 100755 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/index.ts create mode 100755 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/index.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/rest.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/cosmos/base/query/v1beta1/pagination.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/address_binding.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/genesis.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/params.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/query.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/tx.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/gogoproto/gogo.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/google/api/annotations.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/google/api/http.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/google/protobuf/descriptor.ts create mode 100755 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/package.json create mode 100755 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/vuex-root create mode 100755 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/index.ts create mode 100755 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/index.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/rest.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/cosmos/base/query/v1beta1/pagination.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/gogoproto/gogo.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/google/api/annotations.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/google/api/http.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/google/protobuf/descriptor.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/authorization.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/genesis.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/params.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/permissions.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/query.ts create mode 100644 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/tx.ts create mode 100755 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/package.json create mode 100755 vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/vuex-root diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 8dcaf548..ced20643 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -30176,24 +30176,30 @@ paths: format: uint64 tags: - Query - /sixnft/evmsupport/address_binding: + /sixnft/nftmngr/action_by_ref_id: get: - summary: Queries a list of AddressBinding items. - operationId: SixnftEvmsupportAddressBindingAll + summary: Queries a list of ActionByRefId items. + operationId: SixnftNftmngrActionByRefIdAll responses: '200': description: A successful response. schema: type: object properties: - addressBinding: + actionByRefId: type: array items: type: object properties: - ethAddress: + refId: type: string - nativeAddress: + creator: + type: string + nftSchemaCode: + type: string + tokenId: + type: string + action: type: string pagination: type: object @@ -30239,7 +30245,174 @@ paths: properties: '@type': type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - name: pagination.key description: |- @@ -30287,225 +30460,41 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query - '/sixnft/evmsupport/address_binding/{ethAddress}/{nativeAddress}': + '/sixnft/nftmngr/action_by_ref_id/{refId}': get: - summary: Queries a AddressBinding by index. - operationId: SixnftEvmsupportAddressBinding + summary: Queries a ActionByRefId by index. + operationId: SixnftNftmngrActionByRefId responses: '200': description: A successful response. schema: type: object properties: - addressBinding: + actionByRefId: type: object properties: - ethAddress: + refId: type: string - nativeAddress: + creator: + type: string + nftSchemaCode: + type: string + tokenId: + type: string + action: type: string - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: ethAddress - in: path - required: true - type: string - - name: nativeAddress - in: path - required: true - type: string - tags: - - Query - /sixnft/evmsupport/params: - get: - summary: Parameters queries the parameters of the module. - operationId: SixnftEvmsupportParams - responses: - '200': - description: A successful response. - schema: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - description: >- - QueryParamsResponse is response type for the Query/Params RPC - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query - /sixnft/nftadmin/authorization: - get: - summary: Queries a Authorization by index. - operationId: SixnftNftadminAuthorization - responses: - '200': - description: A successful response. - schema: - type: object - properties: - Authorization: - type: object - properties: - root_admin: - type: string - permissions: - type: object - properties: - map_name: - type: object - additionalProperties: - type: object - properties: - addresses: - type: array - items: - type: string - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query - /sixnft/nftadmin/params: - get: - summary: Parameters queries the parameters of the module. - operationId: SixnftNftadminParams - responses: - '200': - description: A successful response. - schema: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - description: >- - QueryParamsResponse is response type for the Query/Params RPC - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query - /sixnft/nftmngr/action_by_ref_id: - get: - summary: Queries a list of ActionByRefId items. - operationId: SixnftNftmngrActionByRefIdAll - responses: - '200': - description: A successful response. - schema: - type: object - properties: - actionByRefId: - type: array - items: - type: object - properties: - refId: - type: string - creator: - type: string - nftSchemaCode: - type: string - tokenId: - type: string - action: - type: string - pagination: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the - - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } default: description: An unexpected error response. schema: @@ -30692,295 +30681,28 @@ paths: "value": "1.212s" } parameters: - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false + - name: refId + in: path + required: true type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query - '/sixnft/nftmngr/action_by_ref_id/{refId}': + /sixnft/nftmngr/nft_data: get: - summary: Queries a ActionByRefId by index. - operationId: SixnftNftmngrActionByRefId + summary: Queries a list of NftData items. + operationId: SixnftNftmngrNftDataAll responses: '200': description: A successful response. schema: type: object properties: - actionByRefId: - type: object - properties: - refId: - type: string - creator: - type: string - nftSchemaCode: - type: string - tokenId: - type: string - action: - type: string - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: + nftData: type: array items: type: object properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: refId - in: path - required: true - type: string - tags: - - Query - /sixnft/nftmngr/nft_data: - get: - summary: Queries a list of NftData items. - operationId: SixnftNftmngrNftDataAll - responses: - '200': - description: A successful response. - schema: - type: object - properties: - nftData: - type: array - items: - type: object - properties: - nft_schema_code: + nft_schema_code: type: string token_id: type: string @@ -33539,6 +33261,294 @@ paths: additionalProperties: {} tags: - Query + /sixnft/evmsupport/address_binding: + get: + summary: Queries a list of AddressBinding items. + operationId: ThesixnetworkSixnftEvmsupportAddressBindingAll + responses: + '200': + description: A successful response. + schema: + type: object + properties: + addressBinding: + type: array + items: + type: object + properties: + ethAddress: + type: string + nativeAddress: + type: string + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + '/sixnft/evmsupport/address_binding/{ethAddress}/{nativeAddress}': + get: + summary: Queries a AddressBinding by index. + operationId: ThesixnetworkSixnftEvmsupportAddressBinding + responses: + '200': + description: A successful response. + schema: + type: object + properties: + addressBinding: + type: object + properties: + ethAddress: + type: string + nativeAddress: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: ethAddress + in: path + required: true + type: string + - name: nativeAddress + in: path + required: true + type: string + tags: + - Query + /sixnft/evmsupport/params: + get: + summary: Parameters queries the parameters of the module. + operationId: ThesixnetworkSixnftEvmsupportParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /sixnft/nftadmin/authorization: + get: + summary: Queries a Authorization by index. + operationId: ThesixnetworkSixnftNftadminAuthorization + responses: + '200': + description: A successful response. + schema: + type: object + properties: + Authorization: + type: object + properties: + root_admin: + type: string + permissions: + type: object + properties: + map_name: + type: object + additionalProperties: + type: object + properties: + addresses: + type: array + items: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /sixnft/nftadmin/params: + get: + summary: Parameters queries the parameters of the module. + operationId: ThesixnetworkSixnftNftadminParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query /sixnft/nftoracle/action_request: get: summary: Queries a list of ActionRequest items. @@ -33721,16 +33731,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/sixnft/nftoracle/action_request/{id}': @@ -34022,16 +34022,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/sixnft/nftoracle/mint_request/{id}': @@ -34296,16 +34286,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/thesixnetwork/sixnft/nftoracle/collection_owner_request/{id}': @@ -55447,267 +55427,99 @@ definitions: format: uint64 description: delay period associated with this connection. description: |- - IdentifiedConnection defines a connection with additional connection - identifier field. - description: list of stored connections of the chain. - pagination: - title: pagination response - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - height: - title: query block height - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height while - keeping - - RevisionNumber the same. However some consensus algorithms may choose - to - - reset the height in certain conditions e.g. hard forks, state-machine - - breaking changes In these cases, the RevisionNumber is incremented so - that - - height continues to be monitonically increasing even as the - RevisionHeight - - gets reset - description: >- - QueryConnectionsResponse is the response type for the Query/Connections - RPC - - method. - ibc.core.connection.v1.State: - type: string - enum: - - STATE_UNINITIALIZED_UNSPECIFIED - - STATE_INIT - - STATE_TRYOPEN - - STATE_OPEN - default: STATE_UNINITIALIZED_UNSPECIFIED - description: |- - State defines if a connection is in one of the following states: - INIT, TRYOPEN, OPEN or UNINITIALIZED. - - - STATE_UNINITIALIZED_UNSPECIFIED: Default State - - STATE_INIT: A connection end has just started the opening handshake. - - STATE_TRYOPEN: A connection end has acknowledged the handshake step on the counterparty - chain. - - STATE_OPEN: A connection end has completed the handshake. - ibc.core.connection.v1.Version: - type: object - properties: - identifier: - type: string - title: unique version identifier - features: - type: array - items: - type: string - title: list of features compatible with the specified identifier - description: |- - Version defines the versioning scheme used to negotiate the IBC verison in - the connection handshake. - sixnft.evmsupport.AddressBinding: - type: object - properties: - ethAddress: - type: string - nativeAddress: - type: string - sixnft.evmsupport.MsgBindAddressResponse: - type: object - properties: - ethAddress: - type: string - nativeAddress: - type: string - sixnft.evmsupport.MsgRemoveBindingResponse: - type: object - properties: - ethAddress: - type: string - nativeAddress: - type: string - sixnft.evmsupport.Params: - type: object - description: Params defines the parameters for the module. - sixnft.evmsupport.QueryAllAddressBindingResponse: - type: object - properties: - addressBinding: - type: array - items: - type: object - properties: - ethAddress: - type: string - nativeAddress: - type: string - pagination: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - sixnft.evmsupport.QueryGetAddressBindingResponse: - type: object - properties: - addressBinding: - type: object - properties: - ethAddress: - type: string - nativeAddress: - type: string - sixnft.evmsupport.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - description: QueryParamsResponse is response type for the Query/Params RPC method. - sixnft.nftadmin.AddressList: - type: object - properties: - addresses: - type: array - items: - type: string - sixnft.nftadmin.Authorization: - type: object - properties: - root_admin: - type: string - permissions: - type: object - properties: - map_name: - type: object - additionalProperties: - type: object - properties: - addresses: - type: array - items: - type: string - sixnft.nftadmin.MsgBurnResponse: - type: object - properties: - amount: - type: string - token: - type: string - sixnft.nftadmin.MsgGrantPermissionResponse: - type: object - properties: - grantee: - type: string - sixnft.nftadmin.MsgMintResponse: - type: object - properties: - amount: - type: string - token: - type: string - sixnft.nftadmin.MsgRevokePermissionResponse: - type: object - properties: - revokee: - type: string - sixnft.nftadmin.Params: - type: object - description: Params defines the parameters for the module. - sixnft.nftadmin.Permissions: - type: object - properties: - map_name: - type: object - additionalProperties: - type: object - properties: - addresses: - type: array - items: - type: string - sixnft.nftadmin.QueryGetAuthorizationResponse: - type: object - properties: - Authorization: + IdentifiedConnection defines a connection with additional connection + identifier field. + description: list of stored connections of the chain. + pagination: + title: pagination response type: object properties: - root_admin: + next_key: type: string - permissions: - type: object - properties: - map_name: - type: object - additionalProperties: - type: object - properties: - addresses: - type: array - items: - type: string - sixnft.nftadmin.QueryParamsResponse: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryConnectionsResponse is the response type for the Query/Connections + RPC + + method. + ibc.core.connection.v1.State: + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a connection is in one of the following states: + INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A connection end has just started the opening handshake. + - STATE_TRYOPEN: A connection end has acknowledged the handshake step on the counterparty + chain. + - STATE_OPEN: A connection end has completed the handshake. + ibc.core.connection.v1.Version: type: object properties: - params: - description: params holds all the parameters of this module. - type: object - description: QueryParamsResponse is response type for the Query/Params RPC method. + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: |- + Version defines the versioning scheme used to negotiate the IBC verison in + the connection handshake. sixnft.nftmngr.Action: type: object properties: @@ -58436,6 +58248,174 @@ definitions: title: >- SignatureCounts contains information about signature reporting for a number of blocks + thesixnetwork.sixnft.evmsupport.AddressBinding: + type: object + properties: + ethAddress: + type: string + nativeAddress: + type: string + thesixnetwork.sixnft.evmsupport.MsgBindAddressResponse: + type: object + properties: + ethAddress: + type: string + nativeAddress: + type: string + thesixnetwork.sixnft.evmsupport.MsgRemoveBindingResponse: + type: object + properties: + ethAddress: + type: string + nativeAddress: + type: string + thesixnetwork.sixnft.evmsupport.Params: + type: object + description: Params defines the parameters for the module. + thesixnetwork.sixnft.evmsupport.QueryAllAddressBindingResponse: + type: object + properties: + addressBinding: + type: array + items: + type: object + properties: + ethAddress: + type: string + nativeAddress: + type: string + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + thesixnetwork.sixnft.evmsupport.QueryGetAddressBindingResponse: + type: object + properties: + addressBinding: + type: object + properties: + ethAddress: + type: string + nativeAddress: + type: string + thesixnetwork.sixnft.evmsupport.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + description: QueryParamsResponse is response type for the Query/Params RPC method. + thesixnetwork.sixnft.nftadmin.AddressList: + type: object + properties: + addresses: + type: array + items: + type: string + thesixnetwork.sixnft.nftadmin.Authorization: + type: object + properties: + root_admin: + type: string + permissions: + type: object + properties: + map_name: + type: object + additionalProperties: + type: object + properties: + addresses: + type: array + items: + type: string + thesixnetwork.sixnft.nftadmin.MsgBurnResponse: + type: object + properties: + amount: + type: string + token: + type: string + thesixnetwork.sixnft.nftadmin.MsgGrantPermissionResponse: + type: object + properties: + grantee: + type: string + thesixnetwork.sixnft.nftadmin.MsgMintResponse: + type: object + properties: + amount: + type: string + token: + type: string + thesixnetwork.sixnft.nftadmin.MsgRevokePermissionResponse: + type: object + properties: + revokee: + type: string + thesixnetwork.sixnft.nftadmin.Params: + type: object + description: Params defines the parameters for the module. + thesixnetwork.sixnft.nftadmin.Permissions: + type: object + properties: + map_name: + type: object + additionalProperties: + type: object + properties: + addresses: + type: array + items: + type: string + thesixnetwork.sixnft.nftadmin.QueryGetAuthorizationResponse: + type: object + properties: + Authorization: + type: object + properties: + root_admin: + type: string + permissions: + type: object + properties: + map_name: + type: object + additionalProperties: + type: object + properties: + addresses: + type: array + items: + type: string + thesixnetwork.sixnft.nftadmin.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + description: QueryParamsResponse is response type for the Query/Params RPC method. thesixnetwork.sixnft.nftoracle.ActionRequest: type: object properties: diff --git a/vue/src/store/generated/index.ts b/vue/src/store/generated/index.ts index 91cec479..8a5b8143 100644 --- a/vue/src/store/generated/index.ts +++ b/vue/src/store/generated/index.ts @@ -37,6 +37,8 @@ import ThesixnetworkSixnftSixnftEvmsupport from './thesixnetwork/sixnft/sixnft.e import ThesixnetworkSixnftSixnftNftadmin from './thesixnetwork/sixnft/sixnft.nftadmin' import ThesixnetworkSixnftSixnftNftmngr from './thesixnetwork/sixnft/sixnft.nftmngr' import ThesixnetworkSixnftSixnftNftoracle from './thesixnetwork/sixnft/sixnft.nftoracle' +import ThesixnetworkSixnftThesixnetworkSixnftEvmsupport from './thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport' +import ThesixnetworkSixnftThesixnetworkSixnftNftadmin from './thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin' import ThesixnetworkSixnftThesixnetworkSixnftNftoracle from './thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle' @@ -78,6 +80,8 @@ export default { ThesixnetworkSixnftSixnftNftadmin: load(ThesixnetworkSixnftSixnftNftadmin, 'sixnft.nftadmin'), ThesixnetworkSixnftSixnftNftmngr: load(ThesixnetworkSixnftSixnftNftmngr, 'sixnft.nftmngr'), ThesixnetworkSixnftSixnftNftoracle: load(ThesixnetworkSixnftSixnftNftoracle, 'sixnft.nftoracle'), + ThesixnetworkSixnftThesixnetworkSixnftEvmsupport: load(ThesixnetworkSixnftThesixnetworkSixnftEvmsupport, 'thesixnetwork.sixnft.evmsupport'), + ThesixnetworkSixnftThesixnetworkSixnftNftadmin: load(ThesixnetworkSixnftThesixnetworkSixnftNftadmin, 'thesixnetwork.sixnft.nftadmin'), ThesixnetworkSixnftThesixnetworkSixnftNftoracle: load(ThesixnetworkSixnftThesixnetworkSixnftNftoracle, 'thesixnetwork.sixnft.nftoracle'), } diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts index ea236a94..5d1c8fc9 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts @@ -425,18 +425,18 @@ export default { }, - async sendMsgAddTokenAttribute({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgPerformActionByAdmin({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddTokenAttribute(value) + const msg = await txClient.msgPerformActionByAdmin(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddTokenAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgPerformActionByAdmin:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgAddTokenAttribute:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgPerformActionByAdmin:Send Could not broadcast Tx: '+ e.message) } } }, @@ -455,78 +455,78 @@ export default { } } }, - async sendMsgPerformActionByAdmin({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgAddAction({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgPerformActionByAdmin(value) + const msg = await txClient.msgAddAction(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgPerformActionByAdmin:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddAction:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgPerformActionByAdmin:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgAddAction:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgCreateMetadata({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgSetBaseUri({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateMetadata(value) + const msg = await txClient.msgSetBaseUri(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateMetadata:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateMetadata:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgSetBaseUri:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgCreateNFTSchema({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateMetadata({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateNFTSchema(value) + const msg = await txClient.msgCreateMetadata(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateMetadata:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateNFTSchema:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateMetadata:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgAddAction({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateNFTSchema({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddAction(value) + const msg = await txClient.msgCreateNFTSchema(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddAction:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgAddAction:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateNFTSchema:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgToggleAction({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgAddTokenAttribute({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgToggleAction(value) + const msg = await txClient.msgAddTokenAttribute(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddTokenAttribute:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgToggleAction:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgAddTokenAttribute:Send Could not broadcast Tx: '+ e.message) } } }, @@ -560,32 +560,32 @@ export default { } } }, - async sendMsgSetBaseUri({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgToggleAction({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetBaseUri(value) + const msg = await txClient.msgToggleAction(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgSetBaseUri:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgToggleAction:Send Could not broadcast Tx: '+ e.message) } } }, - async MsgAddTokenAttribute({ rootGetters }, { value }) { + async MsgPerformActionByAdmin({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddTokenAttribute(value) + const msg = await txClient.msgPerformActionByAdmin(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddTokenAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgPerformActionByAdmin:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgAddTokenAttribute:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgPerformActionByAdmin:Create Could not create message: ' + e.message) } } }, @@ -602,68 +602,68 @@ export default { } } }, - async MsgPerformActionByAdmin({ rootGetters }, { value }) { + async MsgAddAction({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgPerformActionByAdmin(value) + const msg = await txClient.msgAddAction(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgPerformActionByAdmin:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddAction:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgPerformActionByAdmin:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgAddAction:Create Could not create message: ' + e.message) } } }, - async MsgCreateMetadata({ rootGetters }, { value }) { + async MsgSetBaseUri({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateMetadata(value) + const msg = await txClient.msgSetBaseUri(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateMetadata:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateMetadata:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgSetBaseUri:Create Could not create message: ' + e.message) } } }, - async MsgCreateNFTSchema({ rootGetters }, { value }) { + async MsgCreateMetadata({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateNFTSchema(value) + const msg = await txClient.msgCreateMetadata(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateMetadata:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateNFTSchema:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateMetadata:Create Could not create message: ' + e.message) } } }, - async MsgAddAction({ rootGetters }, { value }) { + async MsgCreateNFTSchema({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddAction(value) + const msg = await txClient.msgCreateNFTSchema(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddAction:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgAddAction:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateNFTSchema:Create Could not create message: ' + e.message) } } }, - async MsgToggleAction({ rootGetters }, { value }) { + async MsgAddTokenAttribute({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgToggleAction(value) + const msg = await txClient.msgAddTokenAttribute(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddTokenAttribute:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgToggleAction:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgAddTokenAttribute:Create Could not create message: ' + e.message) } } }, @@ -693,16 +693,16 @@ export default { } } }, - async MsgSetBaseUri({ rootGetters }, { value }) { + async MsgToggleAction({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetBaseUri(value) + const msg = await txClient.msgToggleAction(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgSetBaseUri:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgToggleAction:Create Could not create message: ' + e.message) } } }, diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts index df4b3360..7419f65e 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts @@ -4,29 +4,29 @@ import { StdFee } from "@cosmjs/launchpad"; import { SigningStargateClient } from "@cosmjs/stargate"; import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { Api } from "./rest"; -import { MsgAddTokenAttribute } from "./types/nftmngr/tx"; -import { MsgChangeSchemaOwner } from "./types/nftmngr/tx"; import { MsgPerformActionByAdmin } from "./types/nftmngr/tx"; +import { MsgChangeSchemaOwner } from "./types/nftmngr/tx"; +import { MsgAddAction } from "./types/nftmngr/tx"; +import { MsgSetBaseUri } from "./types/nftmngr/tx"; import { MsgCreateMetadata } from "./types/nftmngr/tx"; import { MsgCreateNFTSchema } from "./types/nftmngr/tx"; -import { MsgAddAction } from "./types/nftmngr/tx"; -import { MsgToggleAction } from "./types/nftmngr/tx"; +import { MsgAddTokenAttribute } from "./types/nftmngr/tx"; import { MsgAddAttribute } from "./types/nftmngr/tx"; import { MsgSetNFTAttribute } from "./types/nftmngr/tx"; -import { MsgSetBaseUri } from "./types/nftmngr/tx"; +import { MsgToggleAction } from "./types/nftmngr/tx"; const types = [ - ["/sixnft.nftmngr.MsgAddTokenAttribute", MsgAddTokenAttribute], - ["/sixnft.nftmngr.MsgChangeSchemaOwner", MsgChangeSchemaOwner], ["/sixnft.nftmngr.MsgPerformActionByAdmin", MsgPerformActionByAdmin], + ["/sixnft.nftmngr.MsgChangeSchemaOwner", MsgChangeSchemaOwner], + ["/sixnft.nftmngr.MsgAddAction", MsgAddAction], + ["/sixnft.nftmngr.MsgSetBaseUri", MsgSetBaseUri], ["/sixnft.nftmngr.MsgCreateMetadata", MsgCreateMetadata], ["/sixnft.nftmngr.MsgCreateNFTSchema", MsgCreateNFTSchema], - ["/sixnft.nftmngr.MsgAddAction", MsgAddAction], - ["/sixnft.nftmngr.MsgToggleAction", MsgToggleAction], + ["/sixnft.nftmngr.MsgAddTokenAttribute", MsgAddTokenAttribute], ["/sixnft.nftmngr.MsgAddAttribute", MsgAddAttribute], ["/sixnft.nftmngr.MsgSetNFTAttribute", MsgSetNFTAttribute], - ["/sixnft.nftmngr.MsgSetBaseUri", MsgSetBaseUri], + ["/sixnft.nftmngr.MsgToggleAction", MsgToggleAction], ]; export const MissingWalletError = new Error("wallet is required"); @@ -59,16 +59,16 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = return { signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgAddTokenAttribute: (data: MsgAddTokenAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddTokenAttribute", value: MsgAddTokenAttribute.fromPartial( data ) }), - msgChangeSchemaOwner: (data: MsgChangeSchemaOwner): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgChangeSchemaOwner", value: MsgChangeSchemaOwner.fromPartial( data ) }), msgPerformActionByAdmin: (data: MsgPerformActionByAdmin): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgPerformActionByAdmin", value: MsgPerformActionByAdmin.fromPartial( data ) }), + msgChangeSchemaOwner: (data: MsgChangeSchemaOwner): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgChangeSchemaOwner", value: MsgChangeSchemaOwner.fromPartial( data ) }), + msgAddAction: (data: MsgAddAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddAction", value: MsgAddAction.fromPartial( data ) }), + msgSetBaseUri: (data: MsgSetBaseUri): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgSetBaseUri", value: MsgSetBaseUri.fromPartial( data ) }), msgCreateMetadata: (data: MsgCreateMetadata): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgCreateMetadata", value: MsgCreateMetadata.fromPartial( data ) }), msgCreateNFTSchema: (data: MsgCreateNFTSchema): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgCreateNFTSchema", value: MsgCreateNFTSchema.fromPartial( data ) }), - msgAddAction: (data: MsgAddAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddAction", value: MsgAddAction.fromPartial( data ) }), - msgToggleAction: (data: MsgToggleAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgToggleAction", value: MsgToggleAction.fromPartial( data ) }), + msgAddTokenAttribute: (data: MsgAddTokenAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddTokenAttribute", value: MsgAddTokenAttribute.fromPartial( data ) }), msgAddAttribute: (data: MsgAddAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddAttribute", value: MsgAddAttribute.fromPartial( data ) }), msgSetNFTAttribute: (data: MsgSetNFTAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgSetNFTAttribute", value: MsgSetNFTAttribute.fromPartial( data ) }), - msgSetBaseUri: (data: MsgSetBaseUri): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgSetBaseUri", value: MsgSetBaseUri.fromPartial( data ) }), + msgToggleAction: (data: MsgToggleAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgToggleAction", value: MsgToggleAction.fromPartial( data ) }), }; }; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/index.ts new file mode 100755 index 00000000..0d15e8f3 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/index.ts @@ -0,0 +1,261 @@ +import { txClient, queryClient, MissingWalletError , registry} from './module' + +import { AddressBinding } from "./module/types/evmsupport/address_binding" +import { Params } from "./module/types/evmsupport/params" + + +export { AddressBinding, Params }; + +async function initTxClient(vuexGetters) { + return await txClient(vuexGetters['common/wallet/signer'], { + addr: vuexGetters['common/env/apiTendermint'] + }) +} + +async function initQueryClient(vuexGetters) { + return await queryClient({ + addr: vuexGetters['common/env/apiCosmos'] + }) +} + +function mergeResults(value, next_values) { + for (let prop of Object.keys(next_values)) { + if (Array.isArray(next_values[prop])) { + value[prop]=[...value[prop], ...next_values[prop]] + }else{ + value[prop]=next_values[prop] + } + } + return value +} + +function getStructure(template) { + let structure = { fields: [] } + for (const [key, value] of Object.entries(template)) { + let field: any = {} + field.name = key + field.type = typeof value + structure.fields.push(field) + } + return structure +} + +const getDefaultState = () => { + return { + Params: {}, + AddressBinding: {}, + AddressBindingAll: {}, + + _Structure: { + AddressBinding: getStructure(AddressBinding.fromPartial({})), + Params: getStructure(Params.fromPartial({})), + + }, + _Registry: registry, + _Subscriptions: new Set(), + } +} + +// initial state +const state = getDefaultState() + +export default { + namespaced: true, + state, + mutations: { + RESET_STATE(state) { + Object.assign(state, getDefaultState()) + }, + QUERY(state, { query, key, value }) { + state[query][JSON.stringify(key)] = value + }, + SUBSCRIBE(state, subscription) { + state._Subscriptions.add(JSON.stringify(subscription)) + }, + UNSUBSCRIBE(state, subscription) { + state._Subscriptions.delete(JSON.stringify(subscription)) + } + }, + getters: { + getParams: (state) => (params = { params: {}}) => { + if (!( params).query) { + ( params).query=null + } + return state.Params[JSON.stringify(params)] ?? {} + }, + getAddressBinding: (state) => (params = { params: {}}) => { + if (!( params).query) { + ( params).query=null + } + return state.AddressBinding[JSON.stringify(params)] ?? {} + }, + getAddressBindingAll: (state) => (params = { params: {}}) => { + if (!( params).query) { + ( params).query=null + } + return state.AddressBindingAll[JSON.stringify(params)] ?? {} + }, + + getTypeStructure: (state) => (type) => { + return state._Structure[type].fields + }, + getRegistry: (state) => { + return state._Registry + } + }, + actions: { + init({ dispatch, rootGetters }) { + console.log('Vuex module: thesixnetwork.sixnft.evmsupport initialized!') + if (rootGetters['common/env/client']) { + rootGetters['common/env/client'].on('newblock', () => { + dispatch('StoreUpdate') + }) + } + }, + resetState({ commit }) { + commit('RESET_STATE') + }, + unsubscribe({ commit }, subscription) { + commit('UNSUBSCRIBE', subscription) + }, + async StoreUpdate({ state, dispatch }) { + state._Subscriptions.forEach(async (subscription) => { + try { + const sub=JSON.parse(subscription) + await dispatch(sub.action, sub.payload) + }catch(e) { + throw new Error('Subscriptions: ' + e.message) + } + }) + }, + + + + + + + async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { + try { + const key = params ?? {}; + const queryClient=await initQueryClient(rootGetters) + let value= (await queryClient.queryParams()).data + + + commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) + if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) + return getters['getParams']( { params: {...key}, query}) ?? {} + } catch (e) { + throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) + + } + }, + + + + + + + + async QueryAddressBinding({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { + try { + const key = params ?? {}; + const queryClient=await initQueryClient(rootGetters) + let value= (await queryClient.queryAddressBinding( key.ethAddress, key.nativeAddress)).data + + + commit('QUERY', { query: 'AddressBinding', key: { params: {...key}, query}, value }) + if (subscribe) commit('SUBSCRIBE', { action: 'QueryAddressBinding', payload: { options: { all }, params: {...key},query }}) + return getters['getAddressBinding']( { params: {...key}, query}) ?? {} + } catch (e) { + throw new Error('QueryClient:QueryAddressBinding API Node Unavailable. Could not perform query: ' + e.message) + + } + }, + + + + + + + + async QueryAddressBindingAll({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { + try { + const key = params ?? {}; + const queryClient=await initQueryClient(rootGetters) + let value= (await queryClient.queryAddressBindingAll(query)).data + + + while (all && ( value).pagination && ( value).pagination.next_key!=null) { + let next_values=(await queryClient.queryAddressBindingAll({...query, 'pagination.key':( value).pagination.next_key})).data + value = mergeResults(value, next_values); + } + commit('QUERY', { query: 'AddressBindingAll', key: { params: {...key}, query}, value }) + if (subscribe) commit('SUBSCRIBE', { action: 'QueryAddressBindingAll', payload: { options: { all }, params: {...key},query }}) + return getters['getAddressBindingAll']( { params: {...key}, query}) ?? {} + } catch (e) { + throw new Error('QueryClient:QueryAddressBindingAll API Node Unavailable. Could not perform query: ' + e.message) + + } + }, + + + async sendMsgRemoveBinding({ rootGetters }, { value, fee = [], memo = '' }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgRemoveBinding(value) + const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, + gas: "200000" }, memo}) + return result + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgRemoveBinding:Init Could not initialize signing client. Wallet is required.') + }else{ + throw new Error('TxClient:MsgRemoveBinding:Send Could not broadcast Tx: '+ e.message) + } + } + }, + async sendMsgBindAddress({ rootGetters }, { value, fee = [], memo = '' }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgBindAddress(value) + const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, + gas: "200000" }, memo}) + return result + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgBindAddress:Init Could not initialize signing client. Wallet is required.') + }else{ + throw new Error('TxClient:MsgBindAddress:Send Could not broadcast Tx: '+ e.message) + } + } + }, + + async MsgRemoveBinding({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgRemoveBinding(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgRemoveBinding:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgRemoveBinding:Create Could not create message: ' + e.message) + } + } + }, + async MsgBindAddress({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgBindAddress(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgBindAddress:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgBindAddress:Create Could not create message: ' + e.message) + } + } + }, + + } +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/index.ts new file mode 100755 index 00000000..2fa8d3a4 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/index.ts @@ -0,0 +1,63 @@ +// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. + +import { StdFee } from "@cosmjs/launchpad"; +import { SigningStargateClient } from "@cosmjs/stargate"; +import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; +import { Api } from "./rest"; +import { MsgRemoveBinding } from "./types/evmsupport/tx"; +import { MsgBindAddress } from "./types/evmsupport/tx"; + + +const types = [ + ["/thesixnetwork.sixnft.evmsupport.MsgRemoveBinding", MsgRemoveBinding], + ["/thesixnetwork.sixnft.evmsupport.MsgBindAddress", MsgBindAddress], + +]; +export const MissingWalletError = new Error("wallet is required"); + +export const registry = new Registry(types); + +const defaultFee = { + amount: [], + gas: "200000", +}; + +interface TxClientOptions { + addr: string +} + +interface SignAndBroadcastOptions { + fee: StdFee, + memo?: string +} + +const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { + if (!wallet) throw MissingWalletError; + let client; + if (addr) { + client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); + }else{ + client = await SigningStargateClient.offline( wallet, { registry }); + } + const { address } = (await wallet.getAccounts())[0]; + + return { + signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), + msgRemoveBinding: (data: MsgRemoveBinding): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.evmsupport.MsgRemoveBinding", value: MsgRemoveBinding.fromPartial( data ) }), + msgBindAddress: (data: MsgBindAddress): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.evmsupport.MsgBindAddress", value: MsgBindAddress.fromPartial( data ) }), + + }; +}; + +interface QueryClientOptions { + addr: string +} + +const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { + return new Api({ baseUrl: addr }); +}; + +export { + txClient, + queryClient, +}; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/rest.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/rest.ts new file mode 100644 index 00000000..a1659b5f --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/rest.ts @@ -0,0 +1,378 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +export interface EvmsupportAddressBinding { + ethAddress?: string; + nativeAddress?: string; +} + +export interface EvmsupportMsgBindAddressResponse { + ethAddress?: string; + nativeAddress?: string; +} + +export interface EvmsupportMsgRemoveBindingResponse { + ethAddress?: string; + nativeAddress?: string; +} + +/** + * Params defines the parameters for the module. + */ +export type EvmsupportParams = object; + +export interface EvmsupportQueryAllAddressBindingResponse { + addressBinding?: EvmsupportAddressBinding[]; + + /** + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ + pagination?: V1Beta1PageResponse; +} + +export interface EvmsupportQueryGetAddressBindingResponse { + addressBinding?: EvmsupportAddressBinding; +} + +/** + * QueryParamsResponse is response type for the Query/Params RPC method. + */ +export interface EvmsupportQueryParamsResponse { + /** params holds all the parameters of this module. */ + params?: EvmsupportParams; +} + +export interface ProtobufAny { + "@type"?: string; +} + +export interface RpcStatus { + /** @format int32 */ + code?: number; + message?: string; + details?: ProtobufAny[]; +} + +/** +* message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } +*/ +export interface V1Beta1PageRequest { + /** + * key is a value returned in PageResponse.next_key to begin + * querying the next page most efficiently. Only one of offset or key + * should be set. + * @format byte + */ + key?: string; + + /** + * offset is a numeric offset that can be used when key is unavailable. + * It is less efficient than using key. Only one of offset or key should + * be set. + * @format uint64 + */ + offset?: string; + + /** + * limit is the total number of results to be returned in the result page. + * If left empty it will default to a value to be set by each app. + * @format uint64 + */ + limit?: string; + + /** + * count_total is set to true to indicate that the result set should include + * a count of the total number of items available for pagination in UIs. + * count_total is only respected when offset is used. It is ignored when key + * is set. + */ + count_total?: boolean; +} + +/** +* PageResponse is to be embedded in gRPC response messages where the +corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } +*/ +export interface V1Beta1PageResponse { + /** @format byte */ + next_key?: string; + + /** @format uint64 */ + total?: string; +} + +export type QueryParamsType = Record; +export type ResponseFormat = keyof Omit; + +export interface FullRequestParams extends Omit { + /** set parameter to `true` for call `securityWorker` for this request */ + secure?: boolean; + /** request path */ + path: string; + /** content type of request body */ + type?: ContentType; + /** query params */ + query?: QueryParamsType; + /** format of response (i.e. response.json() -> format: "json") */ + format?: keyof Omit; + /** request body */ + body?: unknown; + /** base url */ + baseUrl?: string; + /** request cancellation token */ + cancelToken?: CancelToken; +} + +export type RequestParams = Omit; + +export interface ApiConfig { + baseUrl?: string; + baseApiParams?: Omit; + securityWorker?: (securityData: SecurityDataType) => RequestParams | void; +} + +export interface HttpResponse extends Response { + data: D; + error: E; +} + +type CancelToken = Symbol | string | number; + +export enum ContentType { + Json = "application/json", + FormData = "multipart/form-data", + UrlEncoded = "application/x-www-form-urlencoded", +} + +export class HttpClient { + public baseUrl: string = ""; + private securityData: SecurityDataType = null as any; + private securityWorker: null | ApiConfig["securityWorker"] = null; + private abortControllers = new Map(); + + private baseApiParams: RequestParams = { + credentials: "same-origin", + headers: {}, + redirect: "follow", + referrerPolicy: "no-referrer", + }; + + constructor(apiConfig: ApiConfig = {}) { + Object.assign(this, apiConfig); + } + + public setSecurityData = (data: SecurityDataType) => { + this.securityData = data; + }; + + private addQueryParam(query: QueryParamsType, key: string) { + const value = query[key]; + + return ( + encodeURIComponent(key) + + "=" + + encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) + ); + } + + protected toQueryString(rawQuery?: QueryParamsType): string { + const query = rawQuery || {}; + const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); + return keys + .map((key) => + typeof query[key] === "object" && !Array.isArray(query[key]) + ? this.toQueryString(query[key] as QueryParamsType) + : this.addQueryParam(query, key), + ) + .join("&"); + } + + protected addQueryParams(rawQuery?: QueryParamsType): string { + const queryString = this.toQueryString(rawQuery); + return queryString ? `?${queryString}` : ""; + } + + private contentFormatters: Record any> = { + [ContentType.Json]: (input: any) => + input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, + [ContentType.FormData]: (input: any) => + Object.keys(input || {}).reduce((data, key) => { + data.append(key, input[key]); + return data; + }, new FormData()), + [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), + }; + + private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { + return { + ...this.baseApiParams, + ...params1, + ...(params2 || {}), + headers: { + ...(this.baseApiParams.headers || {}), + ...(params1.headers || {}), + ...((params2 && params2.headers) || {}), + }, + }; + } + + private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { + if (this.abortControllers.has(cancelToken)) { + const abortController = this.abortControllers.get(cancelToken); + if (abortController) { + return abortController.signal; + } + return void 0; + } + + const abortController = new AbortController(); + this.abortControllers.set(cancelToken, abortController); + return abortController.signal; + }; + + public abortRequest = (cancelToken: CancelToken) => { + const abortController = this.abortControllers.get(cancelToken); + + if (abortController) { + abortController.abort(); + this.abortControllers.delete(cancelToken); + } + }; + + public request = ({ + body, + secure, + path, + type, + query, + format = "json", + baseUrl, + cancelToken, + ...params + }: FullRequestParams): Promise> => { + const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; + const requestParams = this.mergeRequestParams(params, secureParams); + const queryString = query && this.toQueryString(query); + const payloadFormatter = this.contentFormatters[type || ContentType.Json]; + + return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { + ...requestParams, + headers: { + ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), + ...(requestParams.headers || {}), + }, + signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, + body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), + }).then(async (response) => { + const r = response as HttpResponse; + r.data = (null as unknown) as T; + r.error = (null as unknown) as E; + + const data = await response[format]() + .then((data) => { + if (r.ok) { + r.data = data; + } else { + r.error = data; + } + return r; + }) + .catch((e) => { + r.error = e; + return r; + }); + + if (cancelToken) { + this.abortControllers.delete(cancelToken); + } + + if (!response.ok) throw data; + return data; + }); + }; +} + +/** + * @title evmsupport/address_binding.proto + * @version version not set + */ +export class Api extends HttpClient { + /** + * No description + * + * @tags Query + * @name QueryAddressBindingAll + * @summary Queries a list of AddressBinding items. + * @request GET:/sixnft/evmsupport/address_binding + */ + queryAddressBindingAll = ( + query?: { + "pagination.key"?: string; + "pagination.offset"?: string; + "pagination.limit"?: string; + "pagination.count_total"?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/sixnft/evmsupport/address_binding`, + method: "GET", + query: query, + format: "json", + ...params, + }); + + /** + * No description + * + * @tags Query + * @name QueryAddressBinding + * @summary Queries a AddressBinding by index. + * @request GET:/sixnft/evmsupport/address_binding/{ethAddress}/{nativeAddress} + */ + queryAddressBinding = (ethAddress: string, nativeAddress: string, params: RequestParams = {}) => + this.request({ + path: `/sixnft/evmsupport/address_binding/${ethAddress}/${nativeAddress}`, + method: "GET", + format: "json", + ...params, + }); + + /** + * No description + * + * @tags Query + * @name QueryParams + * @summary Parameters queries the parameters of the module. + * @request GET:/sixnft/evmsupport/params + */ + queryParams = (params: RequestParams = {}) => + this.request({ + path: `/sixnft/evmsupport/params`, + method: "GET", + format: "json", + ...params, + }); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/cosmos/base/query/v1beta1/pagination.ts new file mode 100644 index 00000000..0bc568f4 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/cosmos/base/query/v1beta1/pagination.ts @@ -0,0 +1,300 @@ +/* eslint-disable */ +import * as Long from "long"; +import { util, configure, Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "cosmos.base.query.v1beta1"; + +/** + * PageRequest is to be embedded in gRPC request messages for efficient + * pagination. Ex: + * + * message SomeRequest { + * Foo some_parameter = 1; + * PageRequest pagination = 2; + * } + */ +export interface PageRequest { + /** + * key is a value returned in PageResponse.next_key to begin + * querying the next page most efficiently. Only one of offset or key + * should be set. + */ + key: Uint8Array; + /** + * offset is a numeric offset that can be used when key is unavailable. + * It is less efficient than using key. Only one of offset or key should + * be set. + */ + offset: number; + /** + * limit is the total number of results to be returned in the result page. + * If left empty it will default to a value to be set by each app. + */ + limit: number; + /** + * count_total is set to true to indicate that the result set should include + * a count of the total number of items available for pagination in UIs. + * count_total is only respected when offset is used. It is ignored when key + * is set. + */ + count_total: boolean; +} + +/** + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ +export interface PageResponse { + /** + * next_key is the key to be passed to PageRequest.key to + * query the next page most efficiently + */ + next_key: Uint8Array; + /** + * total is total number of results available if PageRequest.count_total + * was set, its value is undefined otherwise + */ + total: number; +} + +const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; + +export const PageRequest = { + encode(message: PageRequest, writer: Writer = Writer.create()): Writer { + if (message.key.length !== 0) { + writer.uint32(10).bytes(message.key); + } + if (message.offset !== 0) { + writer.uint32(16).uint64(message.offset); + } + if (message.limit !== 0) { + writer.uint32(24).uint64(message.limit); + } + if (message.count_total === true) { + writer.uint32(32).bool(message.count_total); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): PageRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...basePageRequest } as PageRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.offset = longToNumber(reader.uint64() as Long); + break; + case 3: + message.limit = longToNumber(reader.uint64() as Long); + break; + case 4: + message.count_total = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): PageRequest { + const message = { ...basePageRequest } as PageRequest; + if (object.key !== undefined && object.key !== null) { + message.key = bytesFromBase64(object.key); + } + if (object.offset !== undefined && object.offset !== null) { + message.offset = Number(object.offset); + } else { + message.offset = 0; + } + if (object.limit !== undefined && object.limit !== null) { + message.limit = Number(object.limit); + } else { + message.limit = 0; + } + if (object.count_total !== undefined && object.count_total !== null) { + message.count_total = Boolean(object.count_total); + } else { + message.count_total = false; + } + return message; + }, + + toJSON(message: PageRequest): unknown { + const obj: any = {}; + message.key !== undefined && + (obj.key = base64FromBytes( + message.key !== undefined ? message.key : new Uint8Array() + )); + message.offset !== undefined && (obj.offset = message.offset); + message.limit !== undefined && (obj.limit = message.limit); + message.count_total !== undefined && + (obj.count_total = message.count_total); + return obj; + }, + + fromPartial(object: DeepPartial): PageRequest { + const message = { ...basePageRequest } as PageRequest; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = new Uint8Array(); + } + if (object.offset !== undefined && object.offset !== null) { + message.offset = object.offset; + } else { + message.offset = 0; + } + if (object.limit !== undefined && object.limit !== null) { + message.limit = object.limit; + } else { + message.limit = 0; + } + if (object.count_total !== undefined && object.count_total !== null) { + message.count_total = object.count_total; + } else { + message.count_total = false; + } + return message; + }, +}; + +const basePageResponse: object = { total: 0 }; + +export const PageResponse = { + encode(message: PageResponse, writer: Writer = Writer.create()): Writer { + if (message.next_key.length !== 0) { + writer.uint32(10).bytes(message.next_key); + } + if (message.total !== 0) { + writer.uint32(16).uint64(message.total); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): PageResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...basePageResponse } as PageResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.next_key = reader.bytes(); + break; + case 2: + message.total = longToNumber(reader.uint64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): PageResponse { + const message = { ...basePageResponse } as PageResponse; + if (object.next_key !== undefined && object.next_key !== null) { + message.next_key = bytesFromBase64(object.next_key); + } + if (object.total !== undefined && object.total !== null) { + message.total = Number(object.total); + } else { + message.total = 0; + } + return message; + }, + + toJSON(message: PageResponse): unknown { + const obj: any = {}; + message.next_key !== undefined && + (obj.next_key = base64FromBytes( + message.next_key !== undefined ? message.next_key : new Uint8Array() + )); + message.total !== undefined && (obj.total = message.total); + return obj; + }, + + fromPartial(object: DeepPartial): PageResponse { + const message = { ...basePageResponse } as PageResponse; + if (object.next_key !== undefined && object.next_key !== null) { + message.next_key = object.next_key; + } else { + message.next_key = new Uint8Array(); + } + if (object.total !== undefined && object.total !== null) { + message.total = object.total; + } else { + message.total = 0; + } + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +const atob: (b64: string) => string = + globalThis.atob || + ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +function bytesFromBase64(b64: string): Uint8Array { + const bin = atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; +} + +const btoa: (bin: string) => string = + globalThis.btoa || + ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +function base64FromBytes(arr: Uint8Array): string { + const bin: string[] = []; + for (let i = 0; i < arr.byteLength; ++i) { + bin.push(String.fromCharCode(arr[i])); + } + return btoa(bin.join("")); +} + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/address_binding.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/address_binding.ts new file mode 100644 index 00000000..efb36baf --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/address_binding.ts @@ -0,0 +1,93 @@ +/* eslint-disable */ +import { Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.evmsupport"; + +export interface AddressBinding { + ethAddress: string; + nativeAddress: string; +} + +const baseAddressBinding: object = { ethAddress: "", nativeAddress: "" }; + +export const AddressBinding = { + encode(message: AddressBinding, writer: Writer = Writer.create()): Writer { + if (message.ethAddress !== "") { + writer.uint32(10).string(message.ethAddress); + } + if (message.nativeAddress !== "") { + writer.uint32(18).string(message.nativeAddress); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): AddressBinding { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseAddressBinding } as AddressBinding; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ethAddress = reader.string(); + break; + case 2: + message.nativeAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): AddressBinding { + const message = { ...baseAddressBinding } as AddressBinding; + if (object.ethAddress !== undefined && object.ethAddress !== null) { + message.ethAddress = String(object.ethAddress); + } else { + message.ethAddress = ""; + } + if (object.nativeAddress !== undefined && object.nativeAddress !== null) { + message.nativeAddress = String(object.nativeAddress); + } else { + message.nativeAddress = ""; + } + return message; + }, + + toJSON(message: AddressBinding): unknown { + const obj: any = {}; + message.ethAddress !== undefined && (obj.ethAddress = message.ethAddress); + message.nativeAddress !== undefined && + (obj.nativeAddress = message.nativeAddress); + return obj; + }, + + fromPartial(object: DeepPartial): AddressBinding { + const message = { ...baseAddressBinding } as AddressBinding; + if (object.ethAddress !== undefined && object.ethAddress !== null) { + message.ethAddress = object.ethAddress; + } else { + message.ethAddress = ""; + } + if (object.nativeAddress !== undefined && object.nativeAddress !== null) { + message.nativeAddress = object.nativeAddress; + } else { + message.nativeAddress = ""; + } + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/genesis.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/genesis.ts new file mode 100644 index 00000000..54133ce7 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/genesis.ts @@ -0,0 +1,114 @@ +/* eslint-disable */ +import { Params } from "../evmsupport/params"; +import { AddressBinding } from "../evmsupport/address_binding"; +import { Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.evmsupport"; + +/** GenesisState defines the evmsupport module's genesis state. */ +export interface GenesisState { + params: Params | undefined; + /** this line is used by starport scaffolding # genesis/proto/state */ + addressBindingList: AddressBinding[]; +} + +const baseGenesisState: object = {}; + +export const GenesisState = { + encode(message: GenesisState, writer: Writer = Writer.create()): Writer { + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.addressBindingList) { + AddressBinding.encode(v!, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): GenesisState { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseGenesisState } as GenesisState; + message.addressBindingList = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = Params.decode(reader, reader.uint32()); + break; + case 2: + message.addressBindingList.push( + AddressBinding.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): GenesisState { + const message = { ...baseGenesisState } as GenesisState; + message.addressBindingList = []; + if (object.params !== undefined && object.params !== null) { + message.params = Params.fromJSON(object.params); + } else { + message.params = undefined; + } + if ( + object.addressBindingList !== undefined && + object.addressBindingList !== null + ) { + for (const e of object.addressBindingList) { + message.addressBindingList.push(AddressBinding.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: GenesisState): unknown { + const obj: any = {}; + message.params !== undefined && + (obj.params = message.params ? Params.toJSON(message.params) : undefined); + if (message.addressBindingList) { + obj.addressBindingList = message.addressBindingList.map((e) => + e ? AddressBinding.toJSON(e) : undefined + ); + } else { + obj.addressBindingList = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): GenesisState { + const message = { ...baseGenesisState } as GenesisState; + message.addressBindingList = []; + if (object.params !== undefined && object.params !== null) { + message.params = Params.fromPartial(object.params); + } else { + message.params = undefined; + } + if ( + object.addressBindingList !== undefined && + object.addressBindingList !== null + ) { + for (const e of object.addressBindingList) { + message.addressBindingList.push(AddressBinding.fromPartial(e)); + } + } + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/params.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/params.ts new file mode 100644 index 00000000..c02b1929 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/params.ts @@ -0,0 +1,56 @@ +/* eslint-disable */ +import { Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.evmsupport"; + +/** Params defines the parameters for the module. */ +export interface Params {} + +const baseParams: object = {}; + +export const Params = { + encode(_: Params, writer: Writer = Writer.create()): Writer { + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): Params { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseParams } as Params; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(_: any): Params { + const message = { ...baseParams } as Params; + return message; + }, + + toJSON(_: Params): unknown { + const obj: any = {}; + return obj; + }, + + fromPartial(_: DeepPartial): Params { + const message = { ...baseParams } as Params; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/query.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/query.ts new file mode 100644 index 00000000..7c65ead6 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/query.ts @@ -0,0 +1,556 @@ +/* eslint-disable */ +import { Reader, Writer } from "protobufjs/minimal"; +import { Params } from "../evmsupport/params"; +import { AddressBinding } from "../evmsupport/address_binding"; +import { + PageRequest, + PageResponse, +} from "../cosmos/base/query/v1beta1/pagination"; + +export const protobufPackage = "thesixnetwork.sixnft.evmsupport"; + +/** QueryParamsRequest is request type for the Query/Params RPC method. */ +export interface QueryParamsRequest {} + +/** QueryParamsResponse is response type for the Query/Params RPC method. */ +export interface QueryParamsResponse { + /** params holds all the parameters of this module. */ + params: Params | undefined; +} + +export interface QueryGetAddressBindingRequest { + ethAddress: string; + nativeAddress: string; +} + +export interface QueryGetAddressBindingResponse { + addressBinding: AddressBinding | undefined; +} + +export interface QueryAllAddressBindingRequest { + pagination: PageRequest | undefined; +} + +export interface QueryAllAddressBindingResponse { + addressBinding: AddressBinding[]; + pagination: PageResponse | undefined; +} + +const baseQueryParamsRequest: object = {}; + +export const QueryParamsRequest = { + encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseQueryParamsRequest } as QueryParamsRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(_: any): QueryParamsRequest { + const message = { ...baseQueryParamsRequest } as QueryParamsRequest; + return message; + }, + + toJSON(_: QueryParamsRequest): unknown { + const obj: any = {}; + return obj; + }, + + fromPartial(_: DeepPartial): QueryParamsRequest { + const message = { ...baseQueryParamsRequest } as QueryParamsRequest; + return message; + }, +}; + +const baseQueryParamsResponse: object = {}; + +export const QueryParamsResponse = { + encode( + message: QueryParamsResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseQueryParamsResponse } as QueryParamsResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryParamsResponse { + const message = { ...baseQueryParamsResponse } as QueryParamsResponse; + if (object.params !== undefined && object.params !== null) { + message.params = Params.fromJSON(object.params); + } else { + message.params = undefined; + } + return message; + }, + + toJSON(message: QueryParamsResponse): unknown { + const obj: any = {}; + message.params !== undefined && + (obj.params = message.params ? Params.toJSON(message.params) : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): QueryParamsResponse { + const message = { ...baseQueryParamsResponse } as QueryParamsResponse; + if (object.params !== undefined && object.params !== null) { + message.params = Params.fromPartial(object.params); + } else { + message.params = undefined; + } + return message; + }, +}; + +const baseQueryGetAddressBindingRequest: object = { + ethAddress: "", + nativeAddress: "", +}; + +export const QueryGetAddressBindingRequest = { + encode( + message: QueryGetAddressBindingRequest, + writer: Writer = Writer.create() + ): Writer { + if (message.ethAddress !== "") { + writer.uint32(10).string(message.ethAddress); + } + if (message.nativeAddress !== "") { + writer.uint32(18).string(message.nativeAddress); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryGetAddressBindingRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryGetAddressBindingRequest, + } as QueryGetAddressBindingRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ethAddress = reader.string(); + break; + case 2: + message.nativeAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryGetAddressBindingRequest { + const message = { + ...baseQueryGetAddressBindingRequest, + } as QueryGetAddressBindingRequest; + if (object.ethAddress !== undefined && object.ethAddress !== null) { + message.ethAddress = String(object.ethAddress); + } else { + message.ethAddress = ""; + } + if (object.nativeAddress !== undefined && object.nativeAddress !== null) { + message.nativeAddress = String(object.nativeAddress); + } else { + message.nativeAddress = ""; + } + return message; + }, + + toJSON(message: QueryGetAddressBindingRequest): unknown { + const obj: any = {}; + message.ethAddress !== undefined && (obj.ethAddress = message.ethAddress); + message.nativeAddress !== undefined && + (obj.nativeAddress = message.nativeAddress); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryGetAddressBindingRequest { + const message = { + ...baseQueryGetAddressBindingRequest, + } as QueryGetAddressBindingRequest; + if (object.ethAddress !== undefined && object.ethAddress !== null) { + message.ethAddress = object.ethAddress; + } else { + message.ethAddress = ""; + } + if (object.nativeAddress !== undefined && object.nativeAddress !== null) { + message.nativeAddress = object.nativeAddress; + } else { + message.nativeAddress = ""; + } + return message; + }, +}; + +const baseQueryGetAddressBindingResponse: object = {}; + +export const QueryGetAddressBindingResponse = { + encode( + message: QueryGetAddressBindingResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.addressBinding !== undefined) { + AddressBinding.encode( + message.addressBinding, + writer.uint32(10).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryGetAddressBindingResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryGetAddressBindingResponse, + } as QueryGetAddressBindingResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.addressBinding = AddressBinding.decode( + reader, + reader.uint32() + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryGetAddressBindingResponse { + const message = { + ...baseQueryGetAddressBindingResponse, + } as QueryGetAddressBindingResponse; + if (object.addressBinding !== undefined && object.addressBinding !== null) { + message.addressBinding = AddressBinding.fromJSON(object.addressBinding); + } else { + message.addressBinding = undefined; + } + return message; + }, + + toJSON(message: QueryGetAddressBindingResponse): unknown { + const obj: any = {}; + message.addressBinding !== undefined && + (obj.addressBinding = message.addressBinding + ? AddressBinding.toJSON(message.addressBinding) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryGetAddressBindingResponse { + const message = { + ...baseQueryGetAddressBindingResponse, + } as QueryGetAddressBindingResponse; + if (object.addressBinding !== undefined && object.addressBinding !== null) { + message.addressBinding = AddressBinding.fromPartial( + object.addressBinding + ); + } else { + message.addressBinding = undefined; + } + return message; + }, +}; + +const baseQueryAllAddressBindingRequest: object = {}; + +export const QueryAllAddressBindingRequest = { + encode( + message: QueryAllAddressBindingRequest, + writer: Writer = Writer.create() + ): Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryAllAddressBindingRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryAllAddressBindingRequest, + } as QueryAllAddressBindingRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryAllAddressBindingRequest { + const message = { + ...baseQueryAllAddressBindingRequest, + } as QueryAllAddressBindingRequest; + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageRequest.fromJSON(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, + + toJSON(message: QueryAllAddressBindingRequest): unknown { + const obj: any = {}; + message.pagination !== undefined && + (obj.pagination = message.pagination + ? PageRequest.toJSON(message.pagination) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryAllAddressBindingRequest { + const message = { + ...baseQueryAllAddressBindingRequest, + } as QueryAllAddressBindingRequest; + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageRequest.fromPartial(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, +}; + +const baseQueryAllAddressBindingResponse: object = {}; + +export const QueryAllAddressBindingResponse = { + encode( + message: QueryAllAddressBindingResponse, + writer: Writer = Writer.create() + ): Writer { + for (const v of message.addressBinding) { + AddressBinding.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.pagination !== undefined) { + PageResponse.encode( + message.pagination, + writer.uint32(18).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryAllAddressBindingResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryAllAddressBindingResponse, + } as QueryAllAddressBindingResponse; + message.addressBinding = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.addressBinding.push( + AddressBinding.decode(reader, reader.uint32()) + ); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryAllAddressBindingResponse { + const message = { + ...baseQueryAllAddressBindingResponse, + } as QueryAllAddressBindingResponse; + message.addressBinding = []; + if (object.addressBinding !== undefined && object.addressBinding !== null) { + for (const e of object.addressBinding) { + message.addressBinding.push(AddressBinding.fromJSON(e)); + } + } + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageResponse.fromJSON(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, + + toJSON(message: QueryAllAddressBindingResponse): unknown { + const obj: any = {}; + if (message.addressBinding) { + obj.addressBinding = message.addressBinding.map((e) => + e ? AddressBinding.toJSON(e) : undefined + ); + } else { + obj.addressBinding = []; + } + message.pagination !== undefined && + (obj.pagination = message.pagination + ? PageResponse.toJSON(message.pagination) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryAllAddressBindingResponse { + const message = { + ...baseQueryAllAddressBindingResponse, + } as QueryAllAddressBindingResponse; + message.addressBinding = []; + if (object.addressBinding !== undefined && object.addressBinding !== null) { + for (const e of object.addressBinding) { + message.addressBinding.push(AddressBinding.fromPartial(e)); + } + } + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageResponse.fromPartial(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, +}; + +/** Query defines the gRPC querier service. */ +export interface Query { + /** Parameters queries the parameters of the module. */ + Params(request: QueryParamsRequest): Promise; + /** Queries a AddressBinding by index. */ + AddressBinding( + request: QueryGetAddressBindingRequest + ): Promise; + /** Queries a list of AddressBinding items. */ + AddressBindingAll( + request: QueryAllAddressBindingRequest + ): Promise; +} + +export class QueryClientImpl implements Query { + private readonly rpc: Rpc; + constructor(rpc: Rpc) { + this.rpc = rpc; + } + Params(request: QueryParamsRequest): Promise { + const data = QueryParamsRequest.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.evmsupport.Query", + "Params", + data + ); + return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); + } + + AddressBinding( + request: QueryGetAddressBindingRequest + ): Promise { + const data = QueryGetAddressBindingRequest.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.evmsupport.Query", + "AddressBinding", + data + ); + return promise.then((data) => + QueryGetAddressBindingResponse.decode(new Reader(data)) + ); + } + + AddressBindingAll( + request: QueryAllAddressBindingRequest + ): Promise { + const data = QueryAllAddressBindingRequest.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.evmsupport.Query", + "AddressBindingAll", + data + ); + return promise.then((data) => + QueryAllAddressBindingResponse.decode(new Reader(data)) + ); + } +} + +interface Rpc { + request( + service: string, + method: string, + data: Uint8Array + ): Promise; +} + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/tx.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/tx.ts new file mode 100644 index 00000000..8e562d49 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/evmsupport/tx.ts @@ -0,0 +1,479 @@ +/* eslint-disable */ +import { Reader, Writer } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.evmsupport"; + +export interface MsgBindAddress { + creator: string; + ethAddress: string; + signature: string; + signedMessage: string; +} + +export interface MsgBindAddressResponse { + ethAddress: string; + nativeAddress: string; +} + +export interface MsgRemoveBinding { + creator: string; + ethAddress: string; + signature: string; + signedMessage: string; +} + +export interface MsgRemoveBindingResponse { + ethAddress: string; + nativeAddress: string; +} + +const baseMsgBindAddress: object = { + creator: "", + ethAddress: "", + signature: "", + signedMessage: "", +}; + +export const MsgBindAddress = { + encode(message: MsgBindAddress, writer: Writer = Writer.create()): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.ethAddress !== "") { + writer.uint32(18).string(message.ethAddress); + } + if (message.signature !== "") { + writer.uint32(26).string(message.signature); + } + if (message.signedMessage !== "") { + writer.uint32(34).string(message.signedMessage); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgBindAddress { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMsgBindAddress } as MsgBindAddress; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.ethAddress = reader.string(); + break; + case 3: + message.signature = reader.string(); + break; + case 4: + message.signedMessage = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgBindAddress { + const message = { ...baseMsgBindAddress } as MsgBindAddress; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if (object.ethAddress !== undefined && object.ethAddress !== null) { + message.ethAddress = String(object.ethAddress); + } else { + message.ethAddress = ""; + } + if (object.signature !== undefined && object.signature !== null) { + message.signature = String(object.signature); + } else { + message.signature = ""; + } + if (object.signedMessage !== undefined && object.signedMessage !== null) { + message.signedMessage = String(object.signedMessage); + } else { + message.signedMessage = ""; + } + return message; + }, + + toJSON(message: MsgBindAddress): unknown { + const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.ethAddress !== undefined && (obj.ethAddress = message.ethAddress); + message.signature !== undefined && (obj.signature = message.signature); + message.signedMessage !== undefined && + (obj.signedMessage = message.signedMessage); + return obj; + }, + + fromPartial(object: DeepPartial): MsgBindAddress { + const message = { ...baseMsgBindAddress } as MsgBindAddress; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if (object.ethAddress !== undefined && object.ethAddress !== null) { + message.ethAddress = object.ethAddress; + } else { + message.ethAddress = ""; + } + if (object.signature !== undefined && object.signature !== null) { + message.signature = object.signature; + } else { + message.signature = ""; + } + if (object.signedMessage !== undefined && object.signedMessage !== null) { + message.signedMessage = object.signedMessage; + } else { + message.signedMessage = ""; + } + return message; + }, +}; + +const baseMsgBindAddressResponse: object = { + ethAddress: "", + nativeAddress: "", +}; + +export const MsgBindAddressResponse = { + encode( + message: MsgBindAddressResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.ethAddress !== "") { + writer.uint32(10).string(message.ethAddress); + } + if (message.nativeAddress !== "") { + writer.uint32(18).string(message.nativeAddress); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgBindAddressResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMsgBindAddressResponse } as MsgBindAddressResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ethAddress = reader.string(); + break; + case 2: + message.nativeAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgBindAddressResponse { + const message = { ...baseMsgBindAddressResponse } as MsgBindAddressResponse; + if (object.ethAddress !== undefined && object.ethAddress !== null) { + message.ethAddress = String(object.ethAddress); + } else { + message.ethAddress = ""; + } + if (object.nativeAddress !== undefined && object.nativeAddress !== null) { + message.nativeAddress = String(object.nativeAddress); + } else { + message.nativeAddress = ""; + } + return message; + }, + + toJSON(message: MsgBindAddressResponse): unknown { + const obj: any = {}; + message.ethAddress !== undefined && (obj.ethAddress = message.ethAddress); + message.nativeAddress !== undefined && + (obj.nativeAddress = message.nativeAddress); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MsgBindAddressResponse { + const message = { ...baseMsgBindAddressResponse } as MsgBindAddressResponse; + if (object.ethAddress !== undefined && object.ethAddress !== null) { + message.ethAddress = object.ethAddress; + } else { + message.ethAddress = ""; + } + if (object.nativeAddress !== undefined && object.nativeAddress !== null) { + message.nativeAddress = object.nativeAddress; + } else { + message.nativeAddress = ""; + } + return message; + }, +}; + +const baseMsgRemoveBinding: object = { + creator: "", + ethAddress: "", + signature: "", + signedMessage: "", +}; + +export const MsgRemoveBinding = { + encode(message: MsgRemoveBinding, writer: Writer = Writer.create()): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.ethAddress !== "") { + writer.uint32(18).string(message.ethAddress); + } + if (message.signature !== "") { + writer.uint32(26).string(message.signature); + } + if (message.signedMessage !== "") { + writer.uint32(34).string(message.signedMessage); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgRemoveBinding { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMsgRemoveBinding } as MsgRemoveBinding; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.ethAddress = reader.string(); + break; + case 3: + message.signature = reader.string(); + break; + case 4: + message.signedMessage = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgRemoveBinding { + const message = { ...baseMsgRemoveBinding } as MsgRemoveBinding; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if (object.ethAddress !== undefined && object.ethAddress !== null) { + message.ethAddress = String(object.ethAddress); + } else { + message.ethAddress = ""; + } + if (object.signature !== undefined && object.signature !== null) { + message.signature = String(object.signature); + } else { + message.signature = ""; + } + if (object.signedMessage !== undefined && object.signedMessage !== null) { + message.signedMessage = String(object.signedMessage); + } else { + message.signedMessage = ""; + } + return message; + }, + + toJSON(message: MsgRemoveBinding): unknown { + const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.ethAddress !== undefined && (obj.ethAddress = message.ethAddress); + message.signature !== undefined && (obj.signature = message.signature); + message.signedMessage !== undefined && + (obj.signedMessage = message.signedMessage); + return obj; + }, + + fromPartial(object: DeepPartial): MsgRemoveBinding { + const message = { ...baseMsgRemoveBinding } as MsgRemoveBinding; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if (object.ethAddress !== undefined && object.ethAddress !== null) { + message.ethAddress = object.ethAddress; + } else { + message.ethAddress = ""; + } + if (object.signature !== undefined && object.signature !== null) { + message.signature = object.signature; + } else { + message.signature = ""; + } + if (object.signedMessage !== undefined && object.signedMessage !== null) { + message.signedMessage = object.signedMessage; + } else { + message.signedMessage = ""; + } + return message; + }, +}; + +const baseMsgRemoveBindingResponse: object = { + ethAddress: "", + nativeAddress: "", +}; + +export const MsgRemoveBindingResponse = { + encode( + message: MsgRemoveBindingResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.ethAddress !== "") { + writer.uint32(10).string(message.ethAddress); + } + if (message.nativeAddress !== "") { + writer.uint32(18).string(message.nativeAddress); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): MsgRemoveBindingResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseMsgRemoveBindingResponse, + } as MsgRemoveBindingResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ethAddress = reader.string(); + break; + case 2: + message.nativeAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgRemoveBindingResponse { + const message = { + ...baseMsgRemoveBindingResponse, + } as MsgRemoveBindingResponse; + if (object.ethAddress !== undefined && object.ethAddress !== null) { + message.ethAddress = String(object.ethAddress); + } else { + message.ethAddress = ""; + } + if (object.nativeAddress !== undefined && object.nativeAddress !== null) { + message.nativeAddress = String(object.nativeAddress); + } else { + message.nativeAddress = ""; + } + return message; + }, + + toJSON(message: MsgRemoveBindingResponse): unknown { + const obj: any = {}; + message.ethAddress !== undefined && (obj.ethAddress = message.ethAddress); + message.nativeAddress !== undefined && + (obj.nativeAddress = message.nativeAddress); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MsgRemoveBindingResponse { + const message = { + ...baseMsgRemoveBindingResponse, + } as MsgRemoveBindingResponse; + if (object.ethAddress !== undefined && object.ethAddress !== null) { + message.ethAddress = object.ethAddress; + } else { + message.ethAddress = ""; + } + if (object.nativeAddress !== undefined && object.nativeAddress !== null) { + message.nativeAddress = object.nativeAddress; + } else { + message.nativeAddress = ""; + } + return message; + }, +}; + +/** Msg defines the Msg service. */ +export interface Msg { + BindAddress(request: MsgBindAddress): Promise; + /** this line is used by starport scaffolding # proto/tx/rpc */ + RemoveBinding(request: MsgRemoveBinding): Promise; +} + +export class MsgClientImpl implements Msg { + private readonly rpc: Rpc; + constructor(rpc: Rpc) { + this.rpc = rpc; + } + BindAddress(request: MsgBindAddress): Promise { + const data = MsgBindAddress.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.evmsupport.Msg", + "BindAddress", + data + ); + return promise.then((data) => + MsgBindAddressResponse.decode(new Reader(data)) + ); + } + + RemoveBinding(request: MsgRemoveBinding): Promise { + const data = MsgRemoveBinding.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.evmsupport.Msg", + "RemoveBinding", + data + ); + return promise.then((data) => + MsgRemoveBindingResponse.decode(new Reader(data)) + ); + } +} + +interface Rpc { + request( + service: string, + method: string, + data: Uint8Array + ): Promise; +} + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/gogoproto/gogo.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/gogoproto/gogo.ts new file mode 100644 index 00000000..3f41a047 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/gogoproto/gogo.ts @@ -0,0 +1,2 @@ +/* eslint-disable */ +export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/google/api/annotations.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/google/api/annotations.ts new file mode 100644 index 00000000..aace4787 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/google/api/annotations.ts @@ -0,0 +1,2 @@ +/* eslint-disable */ +export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/google/api/http.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/google/api/http.ts new file mode 100644 index 00000000..ccadff68 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/google/api/http.ts @@ -0,0 +1,706 @@ +/* eslint-disable */ +import { Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "google.api"; + +/** + * Defines the HTTP configuration for an API service. It contains a list of + * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method + * to one or more HTTP REST API methods. + */ +export interface Http { + /** + * A list of HTTP configuration rules that apply to individual API methods. + * + * **NOTE:** All service configuration rules follow "last one wins" order. + */ + rules: HttpRule[]; + /** + * When set to true, URL path parmeters will be fully URI-decoded except in + * cases of single segment matches in reserved expansion, where "%2F" will be + * left encoded. + * + * The default behavior is to not decode RFC 6570 reserved characters in multi + * segment matches. + */ + fully_decode_reserved_expansion: boolean; +} + +/** + * `HttpRule` defines the mapping of an RPC method to one or more HTTP + * REST API methods. The mapping specifies how different portions of the RPC + * request message are mapped to URL path, URL query parameters, and + * HTTP request body. The mapping is typically specified as an + * `google.api.http` annotation on the RPC method, + * see "google/api/annotations.proto" for details. + * + * The mapping consists of a field specifying the path template and + * method kind. The path template can refer to fields in the request + * message, as in the example below which describes a REST GET + * operation on a resource collection of messages: + * + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; + * } + * } + * message GetMessageRequest { + * message SubMessage { + * string subfield = 1; + * } + * string message_id = 1; // mapped to the URL + * SubMessage sub = 2; // `sub.subfield` is url-mapped + * } + * message Message { + * string text = 1; // content of the resource + * } + * + * The same http annotation can alternatively be expressed inside the + * `GRPC API Configuration` YAML file. + * + * http: + * rules: + * - selector: .Messaging.GetMessage + * get: /v1/messages/{message_id}/{sub.subfield} + * + * This definition enables an automatic, bidrectional mapping of HTTP + * JSON to RPC. Example: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` + * + * In general, not only fields but also field paths can be referenced + * from a path pattern. Fields mapped to the path pattern cannot be + * repeated and must have a primitive (non-message) type. + * + * Any fields in the request message which are not bound by the path + * pattern automatically become (optional) HTTP query + * parameters. Assume the following definition of the request message: + * + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http).get = "/v1/messages/{message_id}"; + * } + * } + * message GetMessageRequest { + * message SubMessage { + * string subfield = 1; + * } + * string message_id = 1; // mapped to the URL + * int64 revision = 2; // becomes a parameter + * SubMessage sub = 3; // `sub.subfield` becomes a parameter + * } + * + * + * This enables a HTTP JSON to RPC mapping as below: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` + * + * Note that fields which are mapped to HTTP parameters must have a + * primitive type or a repeated primitive type. Message types are not + * allowed. In the case of a repeated type, the parameter can be + * repeated in the URL, as in `...?param=A¶m=B`. + * + * For HTTP method kinds which allow a request body, the `body` field + * specifies the mapping. Consider a REST update method on the + * message resource collection: + * + * + * service Messaging { + * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { + * option (google.api.http) = { + * put: "/v1/messages/{message_id}" + * body: "message" + * }; + * } + * } + * message UpdateMessageRequest { + * string message_id = 1; // mapped to the URL + * Message message = 2; // mapped to the body + * } + * + * + * The following HTTP JSON to RPC mapping is enabled, where the + * representation of the JSON in the request body is determined by + * protos JSON encoding: + * + * HTTP | RPC + * -----|----- + * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` + * + * The special name `*` can be used in the body mapping to define that + * every field not bound by the path template should be mapped to the + * request body. This enables the following alternative definition of + * the update method: + * + * service Messaging { + * rpc UpdateMessage(Message) returns (Message) { + * option (google.api.http) = { + * put: "/v1/messages/{message_id}" + * body: "*" + * }; + * } + * } + * message Message { + * string message_id = 1; + * string text = 2; + * } + * + * + * The following HTTP JSON to RPC mapping is enabled: + * + * HTTP | RPC + * -----|----- + * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` + * + * Note that when using `*` in the body mapping, it is not possible to + * have HTTP parameters, as all fields not bound by the path end in + * the body. This makes this option more rarely used in practice of + * defining REST APIs. The common usage of `*` is in custom methods + * which don't use the URL at all for transferring data. + * + * It is possible to define multiple HTTP methods for one RPC by using + * the `additional_bindings` option. Example: + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { + * get: "/v1/messages/{message_id}" + * additional_bindings { + * get: "/v1/users/{user_id}/messages/{message_id}" + * } + * }; + * } + * } + * message GetMessageRequest { + * string message_id = 1; + * string user_id = 2; + * } + * + * + * This enables the following two alternative HTTP JSON to RPC + * mappings: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` + * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` + * + * # Rules for HTTP mapping + * + * The rules for mapping HTTP path, query parameters, and body fields + * to the request message are as follows: + * + * 1. The `body` field specifies either `*` or a field path, or is + * omitted. If omitted, it indicates there is no HTTP request body. + * 2. Leaf fields (recursive expansion of nested messages in the + * request) can be classified into three types: + * (a) Matched in the URL template. + * (b) Covered by body (if body is `*`, everything except (a) fields; + * else everything under the body field) + * (c) All other fields. + * 3. URL query parameters found in the HTTP request are mapped to (c) fields. + * 4. Any body sent with an HTTP request can contain only (b) fields. + * + * The syntax of the path template is as follows: + * + * Template = "/" Segments [ Verb ] ; + * Segments = Segment { "/" Segment } ; + * Segment = "*" | "**" | LITERAL | Variable ; + * Variable = "{" FieldPath [ "=" Segments ] "}" ; + * FieldPath = IDENT { "." IDENT } ; + * Verb = ":" LITERAL ; + * + * The syntax `*` matches a single path segment. The syntax `**` matches zero + * or more path segments, which must be the last part of the path except the + * `Verb`. The syntax `LITERAL` matches literal text in the path. + * + * The syntax `Variable` matches part of the URL path as specified by its + * template. A variable template must not contain other variables. If a variable + * matches a single path segment, its template may be omitted, e.g. `{var}` + * is equivalent to `{var=*}`. + * + * If a variable contains exactly one path segment, such as `"{var}"` or + * `"{var=*}"`, when such a variable is expanded into a URL path, all characters + * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the + * Discovery Document as `{var}`. + * + * If a variable contains one or more path segments, such as `"{var=foo/*}"` + * or `"{var=**}"`, when such a variable is expanded into a URL path, all + * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables + * show up in the Discovery Document as `{+var}`. + * + * NOTE: While the single segment variable matches the semantics of + * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 + * Simple String Expansion, the multi segment variable **does not** match + * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion + * does not expand special characters like `?` and `#`, which would lead + * to invalid URLs. + * + * NOTE: the field paths in variables and in the `body` must not refer to + * repeated fields or map fields. + */ +export interface HttpRule { + /** + * Selects methods to which this rule applies. + * + * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + */ + selector: string; + /** Used for listing and getting information about resources. */ + get: string | undefined; + /** Used for updating a resource. */ + put: string | undefined; + /** Used for creating a resource. */ + post: string | undefined; + /** Used for deleting a resource. */ + delete: string | undefined; + /** Used for updating a resource. */ + patch: string | undefined; + /** + * The custom pattern is used for specifying an HTTP method that is not + * included in the `pattern` field, such as HEAD, or "*" to leave the + * HTTP method unspecified for this rule. The wild-card rule is useful + * for services that provide content to Web (HTML) clients. + */ + custom: CustomHttpPattern | undefined; + /** + * The name of the request field whose value is mapped to the HTTP body, or + * `*` for mapping all fields not captured by the path pattern to the HTTP + * body. NOTE: the referred field must not be a repeated field and must be + * present at the top-level of request message type. + */ + body: string; + /** + * Optional. The name of the response field whose value is mapped to the HTTP + * body of response. Other response fields are ignored. When + * not set, the response message will be used as HTTP body of response. + */ + response_body: string; + /** + * Additional HTTP bindings for the selector. Nested bindings must + * not contain an `additional_bindings` field themselves (that is, + * the nesting may only be one level deep). + */ + additional_bindings: HttpRule[]; +} + +/** A custom pattern is used for defining custom HTTP verb. */ +export interface CustomHttpPattern { + /** The name of this custom HTTP verb. */ + kind: string; + /** The path matched by this custom verb. */ + path: string; +} + +const baseHttp: object = { fully_decode_reserved_expansion: false }; + +export const Http = { + encode(message: Http, writer: Writer = Writer.create()): Writer { + for (const v of message.rules) { + HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.fully_decode_reserved_expansion === true) { + writer.uint32(16).bool(message.fully_decode_reserved_expansion); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): Http { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseHttp } as Http; + message.rules = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rules.push(HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fully_decode_reserved_expansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): Http { + const message = { ...baseHttp } as Http; + message.rules = []; + if (object.rules !== undefined && object.rules !== null) { + for (const e of object.rules) { + message.rules.push(HttpRule.fromJSON(e)); + } + } + if ( + object.fully_decode_reserved_expansion !== undefined && + object.fully_decode_reserved_expansion !== null + ) { + message.fully_decode_reserved_expansion = Boolean( + object.fully_decode_reserved_expansion + ); + } else { + message.fully_decode_reserved_expansion = false; + } + return message; + }, + + toJSON(message: Http): unknown { + const obj: any = {}; + if (message.rules) { + obj.rules = message.rules.map((e) => + e ? HttpRule.toJSON(e) : undefined + ); + } else { + obj.rules = []; + } + message.fully_decode_reserved_expansion !== undefined && + (obj.fully_decode_reserved_expansion = + message.fully_decode_reserved_expansion); + return obj; + }, + + fromPartial(object: DeepPartial): Http { + const message = { ...baseHttp } as Http; + message.rules = []; + if (object.rules !== undefined && object.rules !== null) { + for (const e of object.rules) { + message.rules.push(HttpRule.fromPartial(e)); + } + } + if ( + object.fully_decode_reserved_expansion !== undefined && + object.fully_decode_reserved_expansion !== null + ) { + message.fully_decode_reserved_expansion = + object.fully_decode_reserved_expansion; + } else { + message.fully_decode_reserved_expansion = false; + } + return message; + }, +}; + +const baseHttpRule: object = { selector: "", body: "", response_body: "" }; + +export const HttpRule = { + encode(message: HttpRule, writer: Writer = Writer.create()): Writer { + if (message.selector !== "") { + writer.uint32(10).string(message.selector); + } + if (message.get !== undefined) { + writer.uint32(18).string(message.get); + } + if (message.put !== undefined) { + writer.uint32(26).string(message.put); + } + if (message.post !== undefined) { + writer.uint32(34).string(message.post); + } + if (message.delete !== undefined) { + writer.uint32(42).string(message.delete); + } + if (message.patch !== undefined) { + writer.uint32(50).string(message.patch); + } + if (message.custom !== undefined) { + CustomHttpPattern.encode( + message.custom, + writer.uint32(66).fork() + ).ldelim(); + } + if (message.body !== "") { + writer.uint32(58).string(message.body); + } + if (message.response_body !== "") { + writer.uint32(98).string(message.response_body); + } + for (const v of message.additional_bindings) { + HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): HttpRule { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseHttpRule } as HttpRule; + message.additional_bindings = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message.delete = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.response_body = reader.string(); + break; + case 11: + message.additional_bindings.push( + HttpRule.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): HttpRule { + const message = { ...baseHttpRule } as HttpRule; + message.additional_bindings = []; + if (object.selector !== undefined && object.selector !== null) { + message.selector = String(object.selector); + } else { + message.selector = ""; + } + if (object.get !== undefined && object.get !== null) { + message.get = String(object.get); + } else { + message.get = undefined; + } + if (object.put !== undefined && object.put !== null) { + message.put = String(object.put); + } else { + message.put = undefined; + } + if (object.post !== undefined && object.post !== null) { + message.post = String(object.post); + } else { + message.post = undefined; + } + if (object.delete !== undefined && object.delete !== null) { + message.delete = String(object.delete); + } else { + message.delete = undefined; + } + if (object.patch !== undefined && object.patch !== null) { + message.patch = String(object.patch); + } else { + message.patch = undefined; + } + if (object.custom !== undefined && object.custom !== null) { + message.custom = CustomHttpPattern.fromJSON(object.custom); + } else { + message.custom = undefined; + } + if (object.body !== undefined && object.body !== null) { + message.body = String(object.body); + } else { + message.body = ""; + } + if (object.response_body !== undefined && object.response_body !== null) { + message.response_body = String(object.response_body); + } else { + message.response_body = ""; + } + if ( + object.additional_bindings !== undefined && + object.additional_bindings !== null + ) { + for (const e of object.additional_bindings) { + message.additional_bindings.push(HttpRule.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: HttpRule): unknown { + const obj: any = {}; + message.selector !== undefined && (obj.selector = message.selector); + message.get !== undefined && (obj.get = message.get); + message.put !== undefined && (obj.put = message.put); + message.post !== undefined && (obj.post = message.post); + message.delete !== undefined && (obj.delete = message.delete); + message.patch !== undefined && (obj.patch = message.patch); + message.custom !== undefined && + (obj.custom = message.custom + ? CustomHttpPattern.toJSON(message.custom) + : undefined); + message.body !== undefined && (obj.body = message.body); + message.response_body !== undefined && + (obj.response_body = message.response_body); + if (message.additional_bindings) { + obj.additional_bindings = message.additional_bindings.map((e) => + e ? HttpRule.toJSON(e) : undefined + ); + } else { + obj.additional_bindings = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): HttpRule { + const message = { ...baseHttpRule } as HttpRule; + message.additional_bindings = []; + if (object.selector !== undefined && object.selector !== null) { + message.selector = object.selector; + } else { + message.selector = ""; + } + if (object.get !== undefined && object.get !== null) { + message.get = object.get; + } else { + message.get = undefined; + } + if (object.put !== undefined && object.put !== null) { + message.put = object.put; + } else { + message.put = undefined; + } + if (object.post !== undefined && object.post !== null) { + message.post = object.post; + } else { + message.post = undefined; + } + if (object.delete !== undefined && object.delete !== null) { + message.delete = object.delete; + } else { + message.delete = undefined; + } + if (object.patch !== undefined && object.patch !== null) { + message.patch = object.patch; + } else { + message.patch = undefined; + } + if (object.custom !== undefined && object.custom !== null) { + message.custom = CustomHttpPattern.fromPartial(object.custom); + } else { + message.custom = undefined; + } + if (object.body !== undefined && object.body !== null) { + message.body = object.body; + } else { + message.body = ""; + } + if (object.response_body !== undefined && object.response_body !== null) { + message.response_body = object.response_body; + } else { + message.response_body = ""; + } + if ( + object.additional_bindings !== undefined && + object.additional_bindings !== null + ) { + for (const e of object.additional_bindings) { + message.additional_bindings.push(HttpRule.fromPartial(e)); + } + } + return message; + }, +}; + +const baseCustomHttpPattern: object = { kind: "", path: "" }; + +export const CustomHttpPattern = { + encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { + if (message.kind !== "") { + writer.uint32(10).string(message.kind); + } + if (message.path !== "") { + writer.uint32(18).string(message.path); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseCustomHttpPattern } as CustomHttpPattern; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): CustomHttpPattern { + const message = { ...baseCustomHttpPattern } as CustomHttpPattern; + if (object.kind !== undefined && object.kind !== null) { + message.kind = String(object.kind); + } else { + message.kind = ""; + } + if (object.path !== undefined && object.path !== null) { + message.path = String(object.path); + } else { + message.path = ""; + } + return message; + }, + + toJSON(message: CustomHttpPattern): unknown { + const obj: any = {}; + message.kind !== undefined && (obj.kind = message.kind); + message.path !== undefined && (obj.path = message.path); + return obj; + }, + + fromPartial(object: DeepPartial): CustomHttpPattern { + const message = { ...baseCustomHttpPattern } as CustomHttpPattern; + if (object.kind !== undefined && object.kind !== null) { + message.kind = object.kind; + } else { + message.kind = ""; + } + if (object.path !== undefined && object.path !== null) { + message.path = object.path; + } else { + message.path = ""; + } + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/google/protobuf/descriptor.ts new file mode 100644 index 00000000..a0167cb2 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/google/protobuf/descriptor.ts @@ -0,0 +1,5314 @@ +/* eslint-disable */ +import * as Long from "long"; +import { util, configure, Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "google.protobuf"; + +/** + * The protocol compiler can output a FileDescriptorSet containing the .proto + * files it parses. + */ +export interface FileDescriptorSet { + file: FileDescriptorProto[]; +} + +/** Describes a complete .proto file. */ +export interface FileDescriptorProto { + /** file name, relative to root of source tree */ + name: string; + /** e.g. "foo", "foo.bar", etc. */ + package: string; + /** Names of files imported by this file. */ + dependency: string[]; + /** Indexes of the public imported files in the dependency list above. */ + public_dependency: number[]; + /** + * Indexes of the weak imported files in the dependency list. + * For Google-internal migration only. Do not use. + */ + weak_dependency: number[]; + /** All top-level definitions in this file. */ + message_type: DescriptorProto[]; + enum_type: EnumDescriptorProto[]; + service: ServiceDescriptorProto[]; + extension: FieldDescriptorProto[]; + options: FileOptions | undefined; + /** + * This field contains optional information about the original source code. + * You may safely remove this entire field without harming runtime + * functionality of the descriptors -- the information is needed only by + * development tools. + */ + source_code_info: SourceCodeInfo | undefined; + /** + * The syntax of the proto file. + * The supported values are "proto2" and "proto3". + */ + syntax: string; +} + +/** Describes a message type. */ +export interface DescriptorProto { + name: string; + field: FieldDescriptorProto[]; + extension: FieldDescriptorProto[]; + nested_type: DescriptorProto[]; + enum_type: EnumDescriptorProto[]; + extension_range: DescriptorProto_ExtensionRange[]; + oneof_decl: OneofDescriptorProto[]; + options: MessageOptions | undefined; + reserved_range: DescriptorProto_ReservedRange[]; + /** + * Reserved field names, which may not be used by fields in the same message. + * A given name may only be reserved once. + */ + reserved_name: string[]; +} + +export interface DescriptorProto_ExtensionRange { + /** Inclusive. */ + start: number; + /** Exclusive. */ + end: number; + options: ExtensionRangeOptions | undefined; +} + +/** + * Range of reserved tag numbers. Reserved tag numbers may not be used by + * fields or extension ranges in the same message. Reserved ranges may + * not overlap. + */ +export interface DescriptorProto_ReservedRange { + /** Inclusive. */ + start: number; + /** Exclusive. */ + end: number; +} + +export interface ExtensionRangeOptions { + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +/** Describes a field within a message. */ +export interface FieldDescriptorProto { + name: string; + number: number; + label: FieldDescriptorProto_Label; + /** + * If type_name is set, this need not be set. If both this and type_name + * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + */ + type: FieldDescriptorProto_Type; + /** + * For message and enum types, this is the name of the type. If the name + * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + * rules are used to find the type (i.e. first the nested types within this + * message are searched, then within the parent, on up to the root + * namespace). + */ + type_name: string; + /** + * For extensions, this is the name of the type being extended. It is + * resolved in the same manner as type_name. + */ + extendee: string; + /** + * For numeric types, contains the original text representation of the value. + * For booleans, "true" or "false". + * For strings, contains the default text contents (not escaped in any way). + * For bytes, contains the C escaped value. All bytes >= 128 are escaped. + * TODO(kenton): Base-64 encode? + */ + default_value: string; + /** + * If set, gives the index of a oneof in the containing type's oneof_decl + * list. This field is a member of that oneof. + */ + oneof_index: number; + /** + * JSON name of this field. The value is set by protocol compiler. If the + * user has set a "json_name" option on this field, that option's value + * will be used. Otherwise, it's deduced from the field's name by converting + * it to camelCase. + */ + json_name: string; + options: FieldOptions | undefined; + /** + * If true, this is a proto3 "optional". When a proto3 field is optional, it + * tracks presence regardless of field type. + * + * When proto3_optional is true, this field must be belong to a oneof to + * signal to old proto3 clients that presence is tracked for this field. This + * oneof is known as a "synthetic" oneof, and this field must be its sole + * member (each proto3 optional field gets its own synthetic oneof). Synthetic + * oneofs exist in the descriptor only, and do not generate any API. Synthetic + * oneofs must be ordered after all "real" oneofs. + * + * For message fields, proto3_optional doesn't create any semantic change, + * since non-repeated message fields always track presence. However it still + * indicates the semantic detail of whether the user wrote "optional" or not. + * This can be useful for round-tripping the .proto file. For consistency we + * give message fields a synthetic oneof also, even though it is not required + * to track presence. This is especially important because the parser can't + * tell if a field is a message or an enum, so it must always create a + * synthetic oneof. + * + * Proto2 optional fields do not set this flag, because they already indicate + * optional with `LABEL_OPTIONAL`. + */ + proto3_optional: boolean; +} + +export enum FieldDescriptorProto_Type { + /** + * TYPE_DOUBLE - 0 is reserved for errors. + * Order is weird for historical reasons. + */ + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + /** + * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + * negative values are likely. + */ + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + /** + * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + * negative values are likely. + */ + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + /** + * TYPE_GROUP - Tag-delimited aggregate. + * Group type is deprecated and not supported in proto3. However, Proto3 + * implementations should still be able to parse the group wire format and + * treat group fields as unknown fields. + */ + TYPE_GROUP = 10, + /** TYPE_MESSAGE - Length-delimited aggregate. */ + TYPE_MESSAGE = 11, + /** TYPE_BYTES - New in version 2. */ + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + /** TYPE_SINT32 - Uses ZigZag encoding. */ + TYPE_SINT32 = 17, + /** TYPE_SINT64 - Uses ZigZag encoding. */ + TYPE_SINT64 = 18, + UNRECOGNIZED = -1, +} + +export function fieldDescriptorProto_TypeFromJSON( + object: any +): FieldDescriptorProto_Type { + switch (object) { + case 1: + case "TYPE_DOUBLE": + return FieldDescriptorProto_Type.TYPE_DOUBLE; + case 2: + case "TYPE_FLOAT": + return FieldDescriptorProto_Type.TYPE_FLOAT; + case 3: + case "TYPE_INT64": + return FieldDescriptorProto_Type.TYPE_INT64; + case 4: + case "TYPE_UINT64": + return FieldDescriptorProto_Type.TYPE_UINT64; + case 5: + case "TYPE_INT32": + return FieldDescriptorProto_Type.TYPE_INT32; + case 6: + case "TYPE_FIXED64": + return FieldDescriptorProto_Type.TYPE_FIXED64; + case 7: + case "TYPE_FIXED32": + return FieldDescriptorProto_Type.TYPE_FIXED32; + case 8: + case "TYPE_BOOL": + return FieldDescriptorProto_Type.TYPE_BOOL; + case 9: + case "TYPE_STRING": + return FieldDescriptorProto_Type.TYPE_STRING; + case 10: + case "TYPE_GROUP": + return FieldDescriptorProto_Type.TYPE_GROUP; + case 11: + case "TYPE_MESSAGE": + return FieldDescriptorProto_Type.TYPE_MESSAGE; + case 12: + case "TYPE_BYTES": + return FieldDescriptorProto_Type.TYPE_BYTES; + case 13: + case "TYPE_UINT32": + return FieldDescriptorProto_Type.TYPE_UINT32; + case 14: + case "TYPE_ENUM": + return FieldDescriptorProto_Type.TYPE_ENUM; + case 15: + case "TYPE_SFIXED32": + return FieldDescriptorProto_Type.TYPE_SFIXED32; + case 16: + case "TYPE_SFIXED64": + return FieldDescriptorProto_Type.TYPE_SFIXED64; + case 17: + case "TYPE_SINT32": + return FieldDescriptorProto_Type.TYPE_SINT32; + case 18: + case "TYPE_SINT64": + return FieldDescriptorProto_Type.TYPE_SINT64; + case -1: + case "UNRECOGNIZED": + default: + return FieldDescriptorProto_Type.UNRECOGNIZED; + } +} + +export function fieldDescriptorProto_TypeToJSON( + object: FieldDescriptorProto_Type +): string { + switch (object) { + case FieldDescriptorProto_Type.TYPE_DOUBLE: + return "TYPE_DOUBLE"; + case FieldDescriptorProto_Type.TYPE_FLOAT: + return "TYPE_FLOAT"; + case FieldDescriptorProto_Type.TYPE_INT64: + return "TYPE_INT64"; + case FieldDescriptorProto_Type.TYPE_UINT64: + return "TYPE_UINT64"; + case FieldDescriptorProto_Type.TYPE_INT32: + return "TYPE_INT32"; + case FieldDescriptorProto_Type.TYPE_FIXED64: + return "TYPE_FIXED64"; + case FieldDescriptorProto_Type.TYPE_FIXED32: + return "TYPE_FIXED32"; + case FieldDescriptorProto_Type.TYPE_BOOL: + return "TYPE_BOOL"; + case FieldDescriptorProto_Type.TYPE_STRING: + return "TYPE_STRING"; + case FieldDescriptorProto_Type.TYPE_GROUP: + return "TYPE_GROUP"; + case FieldDescriptorProto_Type.TYPE_MESSAGE: + return "TYPE_MESSAGE"; + case FieldDescriptorProto_Type.TYPE_BYTES: + return "TYPE_BYTES"; + case FieldDescriptorProto_Type.TYPE_UINT32: + return "TYPE_UINT32"; + case FieldDescriptorProto_Type.TYPE_ENUM: + return "TYPE_ENUM"; + case FieldDescriptorProto_Type.TYPE_SFIXED32: + return "TYPE_SFIXED32"; + case FieldDescriptorProto_Type.TYPE_SFIXED64: + return "TYPE_SFIXED64"; + case FieldDescriptorProto_Type.TYPE_SINT32: + return "TYPE_SINT32"; + case FieldDescriptorProto_Type.TYPE_SINT64: + return "TYPE_SINT64"; + default: + return "UNKNOWN"; + } +} + +export enum FieldDescriptorProto_Label { + /** LABEL_OPTIONAL - 0 is reserved for errors */ + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3, + UNRECOGNIZED = -1, +} + +export function fieldDescriptorProto_LabelFromJSON( + object: any +): FieldDescriptorProto_Label { + switch (object) { + case 1: + case "LABEL_OPTIONAL": + return FieldDescriptorProto_Label.LABEL_OPTIONAL; + case 2: + case "LABEL_REQUIRED": + return FieldDescriptorProto_Label.LABEL_REQUIRED; + case 3: + case "LABEL_REPEATED": + return FieldDescriptorProto_Label.LABEL_REPEATED; + case -1: + case "UNRECOGNIZED": + default: + return FieldDescriptorProto_Label.UNRECOGNIZED; + } +} + +export function fieldDescriptorProto_LabelToJSON( + object: FieldDescriptorProto_Label +): string { + switch (object) { + case FieldDescriptorProto_Label.LABEL_OPTIONAL: + return "LABEL_OPTIONAL"; + case FieldDescriptorProto_Label.LABEL_REQUIRED: + return "LABEL_REQUIRED"; + case FieldDescriptorProto_Label.LABEL_REPEATED: + return "LABEL_REPEATED"; + default: + return "UNKNOWN"; + } +} + +/** Describes a oneof. */ +export interface OneofDescriptorProto { + name: string; + options: OneofOptions | undefined; +} + +/** Describes an enum type. */ +export interface EnumDescriptorProto { + name: string; + value: EnumValueDescriptorProto[]; + options: EnumOptions | undefined; + /** + * Range of reserved numeric values. Reserved numeric values may not be used + * by enum values in the same enum declaration. Reserved ranges may not + * overlap. + */ + reserved_range: EnumDescriptorProto_EnumReservedRange[]; + /** + * Reserved enum value names, which may not be reused. A given name may only + * be reserved once. + */ + reserved_name: string[]; +} + +/** + * Range of reserved numeric values. Reserved values may not be used by + * entries in the same enum. Reserved ranges may not overlap. + * + * Note that this is distinct from DescriptorProto.ReservedRange in that it + * is inclusive such that it can appropriately represent the entire int32 + * domain. + */ +export interface EnumDescriptorProto_EnumReservedRange { + /** Inclusive. */ + start: number; + /** Inclusive. */ + end: number; +} + +/** Describes a value within an enum. */ +export interface EnumValueDescriptorProto { + name: string; + number: number; + options: EnumValueOptions | undefined; +} + +/** Describes a service. */ +export interface ServiceDescriptorProto { + name: string; + method: MethodDescriptorProto[]; + options: ServiceOptions | undefined; +} + +/** Describes a method of a service. */ +export interface MethodDescriptorProto { + name: string; + /** + * Input and output type names. These are resolved in the same way as + * FieldDescriptorProto.type_name, but must refer to a message type. + */ + input_type: string; + output_type: string; + options: MethodOptions | undefined; + /** Identifies if client streams multiple client messages */ + client_streaming: boolean; + /** Identifies if server streams multiple server messages */ + server_streaming: boolean; +} + +export interface FileOptions { + /** + * Sets the Java package where classes generated from this .proto will be + * placed. By default, the proto package is used, but this is often + * inappropriate because proto packages do not normally start with backwards + * domain names. + */ + java_package: string; + /** + * Controls the name of the wrapper Java class generated for the .proto file. + * That class will always contain the .proto file's getDescriptor() method as + * well as any top-level extensions defined in the .proto file. + * If java_multiple_files is disabled, then all the other classes from the + * .proto file will be nested inside the single wrapper outer class. + */ + java_outer_classname: string; + /** + * If enabled, then the Java code generator will generate a separate .java + * file for each top-level message, enum, and service defined in the .proto + * file. Thus, these types will *not* be nested inside the wrapper class + * named by java_outer_classname. However, the wrapper class will still be + * generated to contain the file's getDescriptor() method as well as any + * top-level extensions defined in the file. + */ + java_multiple_files: boolean; + /** + * This option does nothing. + * + * @deprecated + */ + java_generate_equals_and_hash: boolean; + /** + * If set true, then the Java2 code generator will generate code that + * throws an exception whenever an attempt is made to assign a non-UTF-8 + * byte sequence to a string field. + * Message reflection will do the same. + * However, an extension field still accepts non-UTF-8 byte sequences. + * This option has no effect on when used with the lite runtime. + */ + java_string_check_utf8: boolean; + optimize_for: FileOptions_OptimizeMode; + /** + * Sets the Go package where structs generated from this .proto will be + * placed. If omitted, the Go package will be derived from the following: + * - The basename of the package import path, if provided. + * - Otherwise, the package statement in the .proto file, if present. + * - Otherwise, the basename of the .proto file, without extension. + */ + go_package: string; + /** + * Should generic services be generated in each language? "Generic" services + * are not specific to any particular RPC system. They are generated by the + * main code generators in each language (without additional plugins). + * Generic services were the only kind of service generation supported by + * early versions of google.protobuf. + * + * Generic services are now considered deprecated in favor of using plugins + * that generate code specific to your particular RPC system. Therefore, + * these default to false. Old code which depends on generic services should + * explicitly set them to true. + */ + cc_generic_services: boolean; + java_generic_services: boolean; + py_generic_services: boolean; + php_generic_services: boolean; + /** + * Is this file deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for everything in the file, or it will be completely ignored; in the very + * least, this is a formalization for deprecating files. + */ + deprecated: boolean; + /** + * Enables the use of arenas for the proto messages in this file. This applies + * only to generated classes for C++. + */ + cc_enable_arenas: boolean; + /** + * Sets the objective c class prefix which is prepended to all objective c + * generated classes from this .proto. There is no default. + */ + objc_class_prefix: string; + /** Namespace for generated classes; defaults to the package. */ + csharp_namespace: string; + /** + * By default Swift generators will take the proto package and CamelCase it + * replacing '.' with underscore and use that to prefix the types/symbols + * defined. When this options is provided, they will use this value instead + * to prefix the types/symbols defined. + */ + swift_prefix: string; + /** + * Sets the php class prefix which is prepended to all php generated classes + * from this .proto. Default is empty. + */ + php_class_prefix: string; + /** + * Use this option to change the namespace of php generated classes. Default + * is empty. When this option is empty, the package name will be used for + * determining the namespace. + */ + php_namespace: string; + /** + * Use this option to change the namespace of php generated metadata classes. + * Default is empty. When this option is empty, the proto file name will be + * used for determining the namespace. + */ + php_metadata_namespace: string; + /** + * Use this option to change the package of ruby generated classes. Default + * is empty. When this option is not set, the package name will be used for + * determining the ruby package. + */ + ruby_package: string; + /** + * The parser stores options it doesn't recognize here. + * See the documentation for the "Options" section above. + */ + uninterpreted_option: UninterpretedOption[]; +} + +/** Generated classes can be optimized for speed or code size. */ +export enum FileOptions_OptimizeMode { + /** SPEED - Generate complete code for parsing, serialization, */ + SPEED = 1, + /** CODE_SIZE - etc. */ + CODE_SIZE = 2, + /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ + LITE_RUNTIME = 3, + UNRECOGNIZED = -1, +} + +export function fileOptions_OptimizeModeFromJSON( + object: any +): FileOptions_OptimizeMode { + switch (object) { + case 1: + case "SPEED": + return FileOptions_OptimizeMode.SPEED; + case 2: + case "CODE_SIZE": + return FileOptions_OptimizeMode.CODE_SIZE; + case 3: + case "LITE_RUNTIME": + return FileOptions_OptimizeMode.LITE_RUNTIME; + case -1: + case "UNRECOGNIZED": + default: + return FileOptions_OptimizeMode.UNRECOGNIZED; + } +} + +export function fileOptions_OptimizeModeToJSON( + object: FileOptions_OptimizeMode +): string { + switch (object) { + case FileOptions_OptimizeMode.SPEED: + return "SPEED"; + case FileOptions_OptimizeMode.CODE_SIZE: + return "CODE_SIZE"; + case FileOptions_OptimizeMode.LITE_RUNTIME: + return "LITE_RUNTIME"; + default: + return "UNKNOWN"; + } +} + +export interface MessageOptions { + /** + * Set true to use the old proto1 MessageSet wire format for extensions. + * This is provided for backwards-compatibility with the MessageSet wire + * format. You should not use this for any other reason: It's less + * efficient, has fewer features, and is more complicated. + * + * The message must be defined exactly as follows: + * message Foo { + * option message_set_wire_format = true; + * extensions 4 to max; + * } + * Note that the message cannot have any defined fields; MessageSets only + * have extensions. + * + * All extensions of your type must be singular messages; e.g. they cannot + * be int32s, enums, or repeated messages. + * + * Because this is an option, the above two restrictions are not enforced by + * the protocol compiler. + */ + message_set_wire_format: boolean; + /** + * Disables the generation of the standard "descriptor()" accessor, which can + * conflict with a field of the same name. This is meant to make migration + * from proto1 easier; new code should avoid fields named "descriptor". + */ + no_standard_descriptor_accessor: boolean; + /** + * Is this message deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the message, or it will be completely ignored; in the very least, + * this is a formalization for deprecating messages. + */ + deprecated: boolean; + /** + * Whether the message is an automatically generated map entry type for the + * maps field. + * + * For maps fields: + * map map_field = 1; + * The parsed descriptor looks like: + * message MapFieldEntry { + * option map_entry = true; + * optional KeyType key = 1; + * optional ValueType value = 2; + * } + * repeated MapFieldEntry map_field = 1; + * + * Implementations may choose not to generate the map_entry=true message, but + * use a native map in the target language to hold the keys and values. + * The reflection APIs in such implementations still need to work as + * if the field is a repeated message field. + * + * NOTE: Do not set the option in .proto files. Always use the maps syntax + * instead. The option should only be implicitly set by the proto compiler + * parser. + */ + map_entry: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface FieldOptions { + /** + * The ctype option instructs the C++ code generator to use a different + * representation of the field than it normally would. See the specific + * options below. This option is not yet implemented in the open source + * release -- sorry, we'll try to include it in a future version! + */ + ctype: FieldOptions_CType; + /** + * The packed option can be enabled for repeated primitive fields to enable + * a more efficient representation on the wire. Rather than repeatedly + * writing the tag and type for each element, the entire array is encoded as + * a single length-delimited blob. In proto3, only explicit setting it to + * false will avoid using packed encoding. + */ + packed: boolean; + /** + * The jstype option determines the JavaScript type used for values of the + * field. The option is permitted only for 64 bit integral and fixed types + * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + * is represented as JavaScript string, which avoids loss of precision that + * can happen when a large value is converted to a floating point JavaScript. + * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + * use the JavaScript "number" type. The behavior of the default option + * JS_NORMAL is implementation dependent. + * + * This option is an enum to permit additional types to be added, e.g. + * goog.math.Integer. + */ + jstype: FieldOptions_JSType; + /** + * Should this field be parsed lazily? Lazy applies only to message-type + * fields. It means that when the outer message is initially parsed, the + * inner message's contents will not be parsed but instead stored in encoded + * form. The inner message will actually be parsed when it is first accessed. + * + * This is only a hint. Implementations are free to choose whether to use + * eager or lazy parsing regardless of the value of this option. However, + * setting this option true suggests that the protocol author believes that + * using lazy parsing on this field is worth the additional bookkeeping + * overhead typically needed to implement it. + * + * This option does not affect the public interface of any generated code; + * all method signatures remain the same. Furthermore, thread-safety of the + * interface is not affected by this option; const methods remain safe to + * call from multiple threads concurrently, while non-const methods continue + * to require exclusive access. + * + * + * Note that implementations may choose not to check required fields within + * a lazy sub-message. That is, calling IsInitialized() on the outer message + * may return true even if the inner message has missing required fields. + * This is necessary because otherwise the inner message would have to be + * parsed in order to perform the check, defeating the purpose of lazy + * parsing. An implementation which chooses not to check required fields + * must be consistent about it. That is, for any particular sub-message, the + * implementation must either *always* check its required fields, or *never* + * check its required fields, regardless of whether or not the message has + * been parsed. + */ + lazy: boolean; + /** + * Is this field deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for accessors, or it will be completely ignored; in the very least, this + * is a formalization for deprecating fields. + */ + deprecated: boolean; + /** For Google-internal migration only. Do not use. */ + weak: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export enum FieldOptions_CType { + /** STRING - Default mode. */ + STRING = 0, + CORD = 1, + STRING_PIECE = 2, + UNRECOGNIZED = -1, +} + +export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { + switch (object) { + case 0: + case "STRING": + return FieldOptions_CType.STRING; + case 1: + case "CORD": + return FieldOptions_CType.CORD; + case 2: + case "STRING_PIECE": + return FieldOptions_CType.STRING_PIECE; + case -1: + case "UNRECOGNIZED": + default: + return FieldOptions_CType.UNRECOGNIZED; + } +} + +export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { + switch (object) { + case FieldOptions_CType.STRING: + return "STRING"; + case FieldOptions_CType.CORD: + return "CORD"; + case FieldOptions_CType.STRING_PIECE: + return "STRING_PIECE"; + default: + return "UNKNOWN"; + } +} + +export enum FieldOptions_JSType { + /** JS_NORMAL - Use the default type. */ + JS_NORMAL = 0, + /** JS_STRING - Use JavaScript strings. */ + JS_STRING = 1, + /** JS_NUMBER - Use JavaScript numbers. */ + JS_NUMBER = 2, + UNRECOGNIZED = -1, +} + +export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { + switch (object) { + case 0: + case "JS_NORMAL": + return FieldOptions_JSType.JS_NORMAL; + case 1: + case "JS_STRING": + return FieldOptions_JSType.JS_STRING; + case 2: + case "JS_NUMBER": + return FieldOptions_JSType.JS_NUMBER; + case -1: + case "UNRECOGNIZED": + default: + return FieldOptions_JSType.UNRECOGNIZED; + } +} + +export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { + switch (object) { + case FieldOptions_JSType.JS_NORMAL: + return "JS_NORMAL"; + case FieldOptions_JSType.JS_STRING: + return "JS_STRING"; + case FieldOptions_JSType.JS_NUMBER: + return "JS_NUMBER"; + default: + return "UNKNOWN"; + } +} + +export interface OneofOptions { + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface EnumOptions { + /** + * Set this option to true to allow mapping different tag names to the same + * value. + */ + allow_alias: boolean; + /** + * Is this enum deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum, or it will be completely ignored; in the very least, this + * is a formalization for deprecating enums. + */ + deprecated: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface EnumValueOptions { + /** + * Is this enum value deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum value, or it will be completely ignored; in the very least, + * this is a formalization for deprecating enum values. + */ + deprecated: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface ServiceOptions { + /** + * Is this service deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the service, or it will be completely ignored; in the very least, + * this is a formalization for deprecating services. + */ + deprecated: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface MethodOptions { + /** + * Is this method deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the method, or it will be completely ignored; in the very least, + * this is a formalization for deprecating methods. + */ + deprecated: boolean; + idempotency_level: MethodOptions_IdempotencyLevel; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +/** + * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + * or neither? HTTP based RPC implementation may choose GET verb for safe + * methods, and PUT verb for idempotent methods instead of the default POST. + */ +export enum MethodOptions_IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + /** NO_SIDE_EFFECTS - implies idempotent */ + NO_SIDE_EFFECTS = 1, + /** IDEMPOTENT - idempotent, but may have side effects */ + IDEMPOTENT = 2, + UNRECOGNIZED = -1, +} + +export function methodOptions_IdempotencyLevelFromJSON( + object: any +): MethodOptions_IdempotencyLevel { + switch (object) { + case 0: + case "IDEMPOTENCY_UNKNOWN": + return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; + case 1: + case "NO_SIDE_EFFECTS": + return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; + case 2: + case "IDEMPOTENT": + return MethodOptions_IdempotencyLevel.IDEMPOTENT; + case -1: + case "UNRECOGNIZED": + default: + return MethodOptions_IdempotencyLevel.UNRECOGNIZED; + } +} + +export function methodOptions_IdempotencyLevelToJSON( + object: MethodOptions_IdempotencyLevel +): string { + switch (object) { + case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: + return "IDEMPOTENCY_UNKNOWN"; + case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: + return "NO_SIDE_EFFECTS"; + case MethodOptions_IdempotencyLevel.IDEMPOTENT: + return "IDEMPOTENT"; + default: + return "UNKNOWN"; + } +} + +/** + * A message representing a option the parser does not recognize. This only + * appears in options protos created by the compiler::Parser class. + * DescriptorPool resolves these when building Descriptor objects. Therefore, + * options protos in descriptor objects (e.g. returned by Descriptor::options(), + * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions + * in them. + */ +export interface UninterpretedOption { + name: UninterpretedOption_NamePart[]; + /** + * The value of the uninterpreted option, in whatever type the tokenizer + * identified it as during parsing. Exactly one of these should be set. + */ + identifier_value: string; + positive_int_value: number; + negative_int_value: number; + double_value: number; + string_value: Uint8Array; + aggregate_value: string; +} + +/** + * The name of the uninterpreted option. Each string represents a segment in + * a dot-separated name. is_extension is true iff a segment represents an + * extension (denoted with parentheses in options specs in .proto files). + * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents + * "foo.(bar.baz).qux". + */ +export interface UninterpretedOption_NamePart { + name_part: string; + is_extension: boolean; +} + +/** + * Encapsulates information about the original source file from which a + * FileDescriptorProto was generated. + */ +export interface SourceCodeInfo { + /** + * A Location identifies a piece of source code in a .proto file which + * corresponds to a particular definition. This information is intended + * to be useful to IDEs, code indexers, documentation generators, and similar + * tools. + * + * For example, say we have a file like: + * message Foo { + * optional string foo = 1; + * } + * Let's look at just the field definition: + * optional string foo = 1; + * ^ ^^ ^^ ^ ^^^ + * a bc de f ghi + * We have the following locations: + * span path represents + * [a,i) [ 4, 0, 2, 0 ] The whole field definition. + * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + * + * Notes: + * - A location may refer to a repeated field itself (i.e. not to any + * particular index within it). This is used whenever a set of elements are + * logically enclosed in a single code segment. For example, an entire + * extend block (possibly containing multiple extension definitions) will + * have an outer location whose path refers to the "extensions" repeated + * field without an index. + * - Multiple locations may have the same path. This happens when a single + * logical declaration is spread out across multiple places. The most + * obvious example is the "extend" block again -- there may be multiple + * extend blocks in the same scope, each of which will have the same path. + * - A location's span is not always a subset of its parent's span. For + * example, the "extendee" of an extension declaration appears at the + * beginning of the "extend" block and is shared by all extensions within + * the block. + * - Just because a location's span is a subset of some other location's span + * does not mean that it is a descendant. For example, a "group" defines + * both a type and a field in a single declaration. Thus, the locations + * corresponding to the type and field and their components will overlap. + * - Code which tries to interpret locations should probably be designed to + * ignore those that it doesn't understand, as more types of locations could + * be recorded in the future. + */ + location: SourceCodeInfo_Location[]; +} + +export interface SourceCodeInfo_Location { + /** + * Identifies which part of the FileDescriptorProto was defined at this + * location. + * + * Each element is a field number or an index. They form a path from + * the root FileDescriptorProto to the place where the definition. For + * example, this path: + * [ 4, 3, 2, 7, 1 ] + * refers to: + * file.message_type(3) // 4, 3 + * .field(7) // 2, 7 + * .name() // 1 + * This is because FileDescriptorProto.message_type has field number 4: + * repeated DescriptorProto message_type = 4; + * and DescriptorProto.field has field number 2: + * repeated FieldDescriptorProto field = 2; + * and FieldDescriptorProto.name has field number 1: + * optional string name = 1; + * + * Thus, the above path gives the location of a field name. If we removed + * the last element: + * [ 4, 3, 2, 7 ] + * this path refers to the whole field declaration (from the beginning + * of the label to the terminating semicolon). + */ + path: number[]; + /** + * Always has exactly three or four elements: start line, start column, + * end line (optional, otherwise assumed same as start line), end column. + * These are packed into a single field for efficiency. Note that line + * and column numbers are zero-based -- typically you will want to add + * 1 to each before displaying to a user. + */ + span: number[]; + /** + * If this SourceCodeInfo represents a complete declaration, these are any + * comments appearing before and after the declaration which appear to be + * attached to the declaration. + * + * A series of line comments appearing on consecutive lines, with no other + * tokens appearing on those lines, will be treated as a single comment. + * + * leading_detached_comments will keep paragraphs of comments that appear + * before (but not connected to) the current element. Each paragraph, + * separated by empty lines, will be one comment element in the repeated + * field. + * + * Only the comment content is provided; comment markers (e.g. //) are + * stripped out. For block comments, leading whitespace and an asterisk + * will be stripped from the beginning of each line other than the first. + * Newlines are included in the output. + * + * Examples: + * + * optional int32 foo = 1; // Comment attached to foo. + * // Comment attached to bar. + * optional int32 bar = 2; + * + * optional string baz = 3; + * // Comment attached to baz. + * // Another line attached to baz. + * + * // Comment attached to qux. + * // + * // Another line attached to qux. + * optional double qux = 4; + * + * // Detached comment for corge. This is not leading or trailing comments + * // to qux or corge because there are blank lines separating it from + * // both. + * + * // Detached comment for corge paragraph 2. + * + * optional string corge = 5; + * /* Block comment attached + * * to corge. Leading asterisks + * * will be removed. * / + * /* Block comment attached to + * * grault. * / + * optional int32 grault = 6; + * + * // ignored detached comments. + */ + leading_comments: string; + trailing_comments: string; + leading_detached_comments: string[]; +} + +/** + * Describes the relationship between generated code and its original source + * file. A GeneratedCodeInfo message is associated with only one generated + * source file, but may contain references to different source .proto files. + */ +export interface GeneratedCodeInfo { + /** + * An Annotation connects some span of text in generated code to an element + * of its generating .proto file. + */ + annotation: GeneratedCodeInfo_Annotation[]; +} + +export interface GeneratedCodeInfo_Annotation { + /** + * Identifies the element in the original source .proto file. This field + * is formatted the same as SourceCodeInfo.Location.path. + */ + path: number[]; + /** Identifies the filesystem path to the original source .proto. */ + source_file: string; + /** + * Identifies the starting offset in bytes in the generated code + * that relates to the identified object. + */ + begin: number; + /** + * Identifies the ending offset in bytes in the generated code that + * relates to the identified offset. The end offset should be one past + * the last relevant byte (so the length of the text = end - begin). + */ + end: number; +} + +const baseFileDescriptorSet: object = {}; + +export const FileDescriptorSet = { + encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { + for (const v of message.file) { + FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFileDescriptorSet } as FileDescriptorSet; + message.file = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.file.push( + FileDescriptorProto.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FileDescriptorSet { + const message = { ...baseFileDescriptorSet } as FileDescriptorSet; + message.file = []; + if (object.file !== undefined && object.file !== null) { + for (const e of object.file) { + message.file.push(FileDescriptorProto.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: FileDescriptorSet): unknown { + const obj: any = {}; + if (message.file) { + obj.file = message.file.map((e) => + e ? FileDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.file = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): FileDescriptorSet { + const message = { ...baseFileDescriptorSet } as FileDescriptorSet; + message.file = []; + if (object.file !== undefined && object.file !== null) { + for (const e of object.file) { + message.file.push(FileDescriptorProto.fromPartial(e)); + } + } + return message; + }, +}; + +const baseFileDescriptorProto: object = { + name: "", + package: "", + dependency: "", + public_dependency: 0, + weak_dependency: 0, + syntax: "", +}; + +export const FileDescriptorProto = { + encode( + message: FileDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.package !== "") { + writer.uint32(18).string(message.package); + } + for (const v of message.dependency) { + writer.uint32(26).string(v!); + } + writer.uint32(82).fork(); + for (const v of message.public_dependency) { + writer.int32(v); + } + writer.ldelim(); + writer.uint32(90).fork(); + for (const v of message.weak_dependency) { + writer.int32(v); + } + writer.ldelim(); + for (const v of message.message_type) { + DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); + } + for (const v of message.enum_type) { + EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); + } + for (const v of message.service) { + ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); + } + for (const v of message.extension) { + FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); + } + if (message.options !== undefined) { + FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); + } + if (message.source_code_info !== undefined) { + SourceCodeInfo.encode( + message.source_code_info, + writer.uint32(74).fork() + ).ldelim(); + } + if (message.syntax !== "") { + writer.uint32(98).string(message.syntax); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFileDescriptorProto } as FileDescriptorProto; + message.dependency = []; + message.public_dependency = []; + message.weak_dependency = []; + message.message_type = []; + message.enum_type = []; + message.service = []; + message.extension = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.package = reader.string(); + break; + case 3: + message.dependency.push(reader.string()); + break; + case 10: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.public_dependency.push(reader.int32()); + } + } else { + message.public_dependency.push(reader.int32()); + } + break; + case 11: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.weak_dependency.push(reader.int32()); + } + } else { + message.weak_dependency.push(reader.int32()); + } + break; + case 4: + message.message_type.push( + DescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 5: + message.enum_type.push( + EnumDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 6: + message.service.push( + ServiceDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 7: + message.extension.push( + FieldDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 8: + message.options = FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.source_code_info = SourceCodeInfo.decode( + reader, + reader.uint32() + ); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FileDescriptorProto { + const message = { ...baseFileDescriptorProto } as FileDescriptorProto; + message.dependency = []; + message.public_dependency = []; + message.weak_dependency = []; + message.message_type = []; + message.enum_type = []; + message.service = []; + message.extension = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.package !== undefined && object.package !== null) { + message.package = String(object.package); + } else { + message.package = ""; + } + if (object.dependency !== undefined && object.dependency !== null) { + for (const e of object.dependency) { + message.dependency.push(String(e)); + } + } + if ( + object.public_dependency !== undefined && + object.public_dependency !== null + ) { + for (const e of object.public_dependency) { + message.public_dependency.push(Number(e)); + } + } + if ( + object.weak_dependency !== undefined && + object.weak_dependency !== null + ) { + for (const e of object.weak_dependency) { + message.weak_dependency.push(Number(e)); + } + } + if (object.message_type !== undefined && object.message_type !== null) { + for (const e of object.message_type) { + message.message_type.push(DescriptorProto.fromJSON(e)); + } + } + if (object.enum_type !== undefined && object.enum_type !== null) { + for (const e of object.enum_type) { + message.enum_type.push(EnumDescriptorProto.fromJSON(e)); + } + } + if (object.service !== undefined && object.service !== null) { + for (const e of object.service) { + message.service.push(ServiceDescriptorProto.fromJSON(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = FileOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if ( + object.source_code_info !== undefined && + object.source_code_info !== null + ) { + message.source_code_info = SourceCodeInfo.fromJSON( + object.source_code_info + ); + } else { + message.source_code_info = undefined; + } + if (object.syntax !== undefined && object.syntax !== null) { + message.syntax = String(object.syntax); + } else { + message.syntax = ""; + } + return message; + }, + + toJSON(message: FileDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.package !== undefined && (obj.package = message.package); + if (message.dependency) { + obj.dependency = message.dependency.map((e) => e); + } else { + obj.dependency = []; + } + if (message.public_dependency) { + obj.public_dependency = message.public_dependency.map((e) => e); + } else { + obj.public_dependency = []; + } + if (message.weak_dependency) { + obj.weak_dependency = message.weak_dependency.map((e) => e); + } else { + obj.weak_dependency = []; + } + if (message.message_type) { + obj.message_type = message.message_type.map((e) => + e ? DescriptorProto.toJSON(e) : undefined + ); + } else { + obj.message_type = []; + } + if (message.enum_type) { + obj.enum_type = message.enum_type.map((e) => + e ? EnumDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.enum_type = []; + } + if (message.service) { + obj.service = message.service.map((e) => + e ? ServiceDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.service = []; + } + if (message.extension) { + obj.extension = message.extension.map((e) => + e ? FieldDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.extension = []; + } + message.options !== undefined && + (obj.options = message.options + ? FileOptions.toJSON(message.options) + : undefined); + message.source_code_info !== undefined && + (obj.source_code_info = message.source_code_info + ? SourceCodeInfo.toJSON(message.source_code_info) + : undefined); + message.syntax !== undefined && (obj.syntax = message.syntax); + return obj; + }, + + fromPartial(object: DeepPartial): FileDescriptorProto { + const message = { ...baseFileDescriptorProto } as FileDescriptorProto; + message.dependency = []; + message.public_dependency = []; + message.weak_dependency = []; + message.message_type = []; + message.enum_type = []; + message.service = []; + message.extension = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.package !== undefined && object.package !== null) { + message.package = object.package; + } else { + message.package = ""; + } + if (object.dependency !== undefined && object.dependency !== null) { + for (const e of object.dependency) { + message.dependency.push(e); + } + } + if ( + object.public_dependency !== undefined && + object.public_dependency !== null + ) { + for (const e of object.public_dependency) { + message.public_dependency.push(e); + } + } + if ( + object.weak_dependency !== undefined && + object.weak_dependency !== null + ) { + for (const e of object.weak_dependency) { + message.weak_dependency.push(e); + } + } + if (object.message_type !== undefined && object.message_type !== null) { + for (const e of object.message_type) { + message.message_type.push(DescriptorProto.fromPartial(e)); + } + } + if (object.enum_type !== undefined && object.enum_type !== null) { + for (const e of object.enum_type) { + message.enum_type.push(EnumDescriptorProto.fromPartial(e)); + } + } + if (object.service !== undefined && object.service !== null) { + for (const e of object.service) { + message.service.push(ServiceDescriptorProto.fromPartial(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = FileOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if ( + object.source_code_info !== undefined && + object.source_code_info !== null + ) { + message.source_code_info = SourceCodeInfo.fromPartial( + object.source_code_info + ); + } else { + message.source_code_info = undefined; + } + if (object.syntax !== undefined && object.syntax !== null) { + message.syntax = object.syntax; + } else { + message.syntax = ""; + } + return message; + }, +}; + +const baseDescriptorProto: object = { name: "", reserved_name: "" }; + +export const DescriptorProto = { + encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + for (const v of message.field) { + FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); + } + for (const v of message.extension) { + FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); + } + for (const v of message.nested_type) { + DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); + } + for (const v of message.enum_type) { + EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); + } + for (const v of message.extension_range) { + DescriptorProto_ExtensionRange.encode( + v!, + writer.uint32(42).fork() + ).ldelim(); + } + for (const v of message.oneof_decl) { + OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); + } + if (message.options !== undefined) { + MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); + } + for (const v of message.reserved_range) { + DescriptorProto_ReservedRange.encode( + v!, + writer.uint32(74).fork() + ).ldelim(); + } + for (const v of message.reserved_name) { + writer.uint32(82).string(v!); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): DescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseDescriptorProto } as DescriptorProto; + message.field = []; + message.extension = []; + message.nested_type = []; + message.enum_type = []; + message.extension_range = []; + message.oneof_decl = []; + message.reserved_range = []; + message.reserved_name = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.field.push( + FieldDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 6: + message.extension.push( + FieldDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 3: + message.nested_type.push( + DescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 4: + message.enum_type.push( + EnumDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 5: + message.extension_range.push( + DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) + ); + break; + case 8: + message.oneof_decl.push( + OneofDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 7: + message.options = MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + message.reserved_range.push( + DescriptorProto_ReservedRange.decode(reader, reader.uint32()) + ); + break; + case 10: + message.reserved_name.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): DescriptorProto { + const message = { ...baseDescriptorProto } as DescriptorProto; + message.field = []; + message.extension = []; + message.nested_type = []; + message.enum_type = []; + message.extension_range = []; + message.oneof_decl = []; + message.reserved_range = []; + message.reserved_name = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.field !== undefined && object.field !== null) { + for (const e of object.field) { + message.field.push(FieldDescriptorProto.fromJSON(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromJSON(e)); + } + } + if (object.nested_type !== undefined && object.nested_type !== null) { + for (const e of object.nested_type) { + message.nested_type.push(DescriptorProto.fromJSON(e)); + } + } + if (object.enum_type !== undefined && object.enum_type !== null) { + for (const e of object.enum_type) { + message.enum_type.push(EnumDescriptorProto.fromJSON(e)); + } + } + if ( + object.extension_range !== undefined && + object.extension_range !== null + ) { + for (const e of object.extension_range) { + message.extension_range.push( + DescriptorProto_ExtensionRange.fromJSON(e) + ); + } + } + if (object.oneof_decl !== undefined && object.oneof_decl !== null) { + for (const e of object.oneof_decl) { + message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = MessageOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if (object.reserved_range !== undefined && object.reserved_range !== null) { + for (const e of object.reserved_range) { + message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); + } + } + if (object.reserved_name !== undefined && object.reserved_name !== null) { + for (const e of object.reserved_name) { + message.reserved_name.push(String(e)); + } + } + return message; + }, + + toJSON(message: DescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + if (message.field) { + obj.field = message.field.map((e) => + e ? FieldDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.field = []; + } + if (message.extension) { + obj.extension = message.extension.map((e) => + e ? FieldDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.extension = []; + } + if (message.nested_type) { + obj.nested_type = message.nested_type.map((e) => + e ? DescriptorProto.toJSON(e) : undefined + ); + } else { + obj.nested_type = []; + } + if (message.enum_type) { + obj.enum_type = message.enum_type.map((e) => + e ? EnumDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.enum_type = []; + } + if (message.extension_range) { + obj.extension_range = message.extension_range.map((e) => + e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined + ); + } else { + obj.extension_range = []; + } + if (message.oneof_decl) { + obj.oneof_decl = message.oneof_decl.map((e) => + e ? OneofDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.oneof_decl = []; + } + message.options !== undefined && + (obj.options = message.options + ? MessageOptions.toJSON(message.options) + : undefined); + if (message.reserved_range) { + obj.reserved_range = message.reserved_range.map((e) => + e ? DescriptorProto_ReservedRange.toJSON(e) : undefined + ); + } else { + obj.reserved_range = []; + } + if (message.reserved_name) { + obj.reserved_name = message.reserved_name.map((e) => e); + } else { + obj.reserved_name = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): DescriptorProto { + const message = { ...baseDescriptorProto } as DescriptorProto; + message.field = []; + message.extension = []; + message.nested_type = []; + message.enum_type = []; + message.extension_range = []; + message.oneof_decl = []; + message.reserved_range = []; + message.reserved_name = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.field !== undefined && object.field !== null) { + for (const e of object.field) { + message.field.push(FieldDescriptorProto.fromPartial(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromPartial(e)); + } + } + if (object.nested_type !== undefined && object.nested_type !== null) { + for (const e of object.nested_type) { + message.nested_type.push(DescriptorProto.fromPartial(e)); + } + } + if (object.enum_type !== undefined && object.enum_type !== null) { + for (const e of object.enum_type) { + message.enum_type.push(EnumDescriptorProto.fromPartial(e)); + } + } + if ( + object.extension_range !== undefined && + object.extension_range !== null + ) { + for (const e of object.extension_range) { + message.extension_range.push( + DescriptorProto_ExtensionRange.fromPartial(e) + ); + } + } + if (object.oneof_decl !== undefined && object.oneof_decl !== null) { + for (const e of object.oneof_decl) { + message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = MessageOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if (object.reserved_range !== undefined && object.reserved_range !== null) { + for (const e of object.reserved_range) { + message.reserved_range.push( + DescriptorProto_ReservedRange.fromPartial(e) + ); + } + } + if (object.reserved_name !== undefined && object.reserved_name !== null) { + for (const e of object.reserved_name) { + message.reserved_name.push(e); + } + } + return message; + }, +}; + +const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; + +export const DescriptorProto_ExtensionRange = { + encode( + message: DescriptorProto_ExtensionRange, + writer: Writer = Writer.create() + ): Writer { + if (message.start !== 0) { + writer.uint32(8).int32(message.start); + } + if (message.end !== 0) { + writer.uint32(16).int32(message.end); + } + if (message.options !== undefined) { + ExtensionRangeOptions.encode( + message.options, + writer.uint32(26).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): DescriptorProto_ExtensionRange { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseDescriptorProto_ExtensionRange, + } as DescriptorProto_ExtensionRange; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = ExtensionRangeOptions.decode( + reader, + reader.uint32() + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): DescriptorProto_ExtensionRange { + const message = { + ...baseDescriptorProto_ExtensionRange, + } as DescriptorProto_ExtensionRange; + if (object.start !== undefined && object.start !== null) { + message.start = Number(object.start); + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = ExtensionRangeOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; + }, + + toJSON(message: DescriptorProto_ExtensionRange): unknown { + const obj: any = {}; + message.start !== undefined && (obj.start = message.start); + message.end !== undefined && (obj.end = message.end); + message.options !== undefined && + (obj.options = message.options + ? ExtensionRangeOptions.toJSON(message.options) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): DescriptorProto_ExtensionRange { + const message = { + ...baseDescriptorProto_ExtensionRange, + } as DescriptorProto_ExtensionRange; + if (object.start !== undefined && object.start !== null) { + message.start = object.start; + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = ExtensionRangeOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + return message; + }, +}; + +const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; + +export const DescriptorProto_ReservedRange = { + encode( + message: DescriptorProto_ReservedRange, + writer: Writer = Writer.create() + ): Writer { + if (message.start !== 0) { + writer.uint32(8).int32(message.start); + } + if (message.end !== 0) { + writer.uint32(16).int32(message.end); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): DescriptorProto_ReservedRange { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseDescriptorProto_ReservedRange, + } as DescriptorProto_ReservedRange; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): DescriptorProto_ReservedRange { + const message = { + ...baseDescriptorProto_ReservedRange, + } as DescriptorProto_ReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = Number(object.start); + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + return message; + }, + + toJSON(message: DescriptorProto_ReservedRange): unknown { + const obj: any = {}; + message.start !== undefined && (obj.start = message.start); + message.end !== undefined && (obj.end = message.end); + return obj; + }, + + fromPartial( + object: DeepPartial + ): DescriptorProto_ReservedRange { + const message = { + ...baseDescriptorProto_ReservedRange, + } as DescriptorProto_ReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = object.start; + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } + return message; + }, +}; + +const baseExtensionRangeOptions: object = {}; + +export const ExtensionRangeOptions = { + encode( + message: ExtensionRangeOptions, + writer: Writer = Writer.create() + ): Writer { + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ExtensionRangeOptions { + const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; + message.uninterpreted_option = []; + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: ExtensionRangeOptions): unknown { + const obj: any = {}; + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial( + object: DeepPartial + ): ExtensionRangeOptions { + const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; + message.uninterpreted_option = []; + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseFieldDescriptorProto: object = { + name: "", + number: 0, + label: 1, + type: 1, + type_name: "", + extendee: "", + default_value: "", + oneof_index: 0, + json_name: "", + proto3_optional: false, +}; + +export const FieldDescriptorProto = { + encode( + message: FieldDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.number !== 0) { + writer.uint32(24).int32(message.number); + } + if (message.label !== 1) { + writer.uint32(32).int32(message.label); + } + if (message.type !== 1) { + writer.uint32(40).int32(message.type); + } + if (message.type_name !== "") { + writer.uint32(50).string(message.type_name); + } + if (message.extendee !== "") { + writer.uint32(18).string(message.extendee); + } + if (message.default_value !== "") { + writer.uint32(58).string(message.default_value); + } + if (message.oneof_index !== 0) { + writer.uint32(72).int32(message.oneof_index); + } + if (message.json_name !== "") { + writer.uint32(82).string(message.json_name); + } + if (message.options !== undefined) { + FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); + } + if (message.proto3_optional === true) { + writer.uint32(136).bool(message.proto3_optional); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32() as any; + break; + case 5: + message.type = reader.int32() as any; + break; + case 6: + message.type_name = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.default_value = reader.string(); + break; + case 9: + message.oneof_index = reader.int32(); + break; + case 10: + message.json_name = reader.string(); + break; + case 8: + message.options = FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3_optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FieldDescriptorProto { + const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = Number(object.number); + } else { + message.number = 0; + } + if (object.label !== undefined && object.label !== null) { + message.label = fieldDescriptorProto_LabelFromJSON(object.label); + } else { + message.label = 1; + } + if (object.type !== undefined && object.type !== null) { + message.type = fieldDescriptorProto_TypeFromJSON(object.type); + } else { + message.type = 1; + } + if (object.type_name !== undefined && object.type_name !== null) { + message.type_name = String(object.type_name); + } else { + message.type_name = ""; + } + if (object.extendee !== undefined && object.extendee !== null) { + message.extendee = String(object.extendee); + } else { + message.extendee = ""; + } + if (object.default_value !== undefined && object.default_value !== null) { + message.default_value = String(object.default_value); + } else { + message.default_value = ""; + } + if (object.oneof_index !== undefined && object.oneof_index !== null) { + message.oneof_index = Number(object.oneof_index); + } else { + message.oneof_index = 0; + } + if (object.json_name !== undefined && object.json_name !== null) { + message.json_name = String(object.json_name); + } else { + message.json_name = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = FieldOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if ( + object.proto3_optional !== undefined && + object.proto3_optional !== null + ) { + message.proto3_optional = Boolean(object.proto3_optional); + } else { + message.proto3_optional = false; + } + return message; + }, + + toJSON(message: FieldDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.number !== undefined && (obj.number = message.number); + message.label !== undefined && + (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); + message.type !== undefined && + (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); + message.type_name !== undefined && (obj.type_name = message.type_name); + message.extendee !== undefined && (obj.extendee = message.extendee); + message.default_value !== undefined && + (obj.default_value = message.default_value); + message.oneof_index !== undefined && + (obj.oneof_index = message.oneof_index); + message.json_name !== undefined && (obj.json_name = message.json_name); + message.options !== undefined && + (obj.options = message.options + ? FieldOptions.toJSON(message.options) + : undefined); + message.proto3_optional !== undefined && + (obj.proto3_optional = message.proto3_optional); + return obj; + }, + + fromPartial(object: DeepPartial): FieldDescriptorProto { + const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = object.number; + } else { + message.number = 0; + } + if (object.label !== undefined && object.label !== null) { + message.label = object.label; + } else { + message.label = 1; + } + if (object.type !== undefined && object.type !== null) { + message.type = object.type; + } else { + message.type = 1; + } + if (object.type_name !== undefined && object.type_name !== null) { + message.type_name = object.type_name; + } else { + message.type_name = ""; + } + if (object.extendee !== undefined && object.extendee !== null) { + message.extendee = object.extendee; + } else { + message.extendee = ""; + } + if (object.default_value !== undefined && object.default_value !== null) { + message.default_value = object.default_value; + } else { + message.default_value = ""; + } + if (object.oneof_index !== undefined && object.oneof_index !== null) { + message.oneof_index = object.oneof_index; + } else { + message.oneof_index = 0; + } + if (object.json_name !== undefined && object.json_name !== null) { + message.json_name = object.json_name; + } else { + message.json_name = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = FieldOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if ( + object.proto3_optional !== undefined && + object.proto3_optional !== null + ) { + message.proto3_optional = object.proto3_optional; + } else { + message.proto3_optional = false; + } + return message; + }, +}; + +const baseOneofDescriptorProto: object = { name: "" }; + +export const OneofDescriptorProto = { + encode( + message: OneofDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.options !== undefined) { + OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): OneofDescriptorProto { + const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = OneofOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; + }, + + toJSON(message: OneofDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.options !== undefined && + (obj.options = message.options + ? OneofOptions.toJSON(message.options) + : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): OneofDescriptorProto { + const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = OneofOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + return message; + }, +}; + +const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; + +export const EnumDescriptorProto = { + encode( + message: EnumDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + for (const v of message.value) { + EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); + } + if (message.options !== undefined) { + EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); + } + for (const v of message.reserved_range) { + EnumDescriptorProto_EnumReservedRange.encode( + v!, + writer.uint32(34).fork() + ).ldelim(); + } + for (const v of message.reserved_name) { + writer.uint32(42).string(v!); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; + message.value = []; + message.reserved_range = []; + message.reserved_name = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.value.push( + EnumValueDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 3: + message.options = EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + message.reserved_range.push( + EnumDescriptorProto_EnumReservedRange.decode( + reader, + reader.uint32() + ) + ); + break; + case 5: + message.reserved_name.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumDescriptorProto { + const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; + message.value = []; + message.reserved_range = []; + message.reserved_name = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.value !== undefined && object.value !== null) { + for (const e of object.value) { + message.value.push(EnumValueDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if (object.reserved_range !== undefined && object.reserved_range !== null) { + for (const e of object.reserved_range) { + message.reserved_range.push( + EnumDescriptorProto_EnumReservedRange.fromJSON(e) + ); + } + } + if (object.reserved_name !== undefined && object.reserved_name !== null) { + for (const e of object.reserved_name) { + message.reserved_name.push(String(e)); + } + } + return message; + }, + + toJSON(message: EnumDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + if (message.value) { + obj.value = message.value.map((e) => + e ? EnumValueDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.value = []; + } + message.options !== undefined && + (obj.options = message.options + ? EnumOptions.toJSON(message.options) + : undefined); + if (message.reserved_range) { + obj.reserved_range = message.reserved_range.map((e) => + e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined + ); + } else { + obj.reserved_range = []; + } + if (message.reserved_name) { + obj.reserved_name = message.reserved_name.map((e) => e); + } else { + obj.reserved_name = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): EnumDescriptorProto { + const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; + message.value = []; + message.reserved_range = []; + message.reserved_name = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.value !== undefined && object.value !== null) { + for (const e of object.value) { + message.value.push(EnumValueDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if (object.reserved_range !== undefined && object.reserved_range !== null) { + for (const e of object.reserved_range) { + message.reserved_range.push( + EnumDescriptorProto_EnumReservedRange.fromPartial(e) + ); + } + } + if (object.reserved_name !== undefined && object.reserved_name !== null) { + for (const e of object.reserved_name) { + message.reserved_name.push(e); + } + } + return message; + }, +}; + +const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; + +export const EnumDescriptorProto_EnumReservedRange = { + encode( + message: EnumDescriptorProto_EnumReservedRange, + writer: Writer = Writer.create() + ): Writer { + if (message.start !== 0) { + writer.uint32(8).int32(message.start); + } + if (message.end !== 0) { + writer.uint32(16).int32(message.end); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): EnumDescriptorProto_EnumReservedRange { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseEnumDescriptorProto_EnumReservedRange, + } as EnumDescriptorProto_EnumReservedRange; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { + const message = { + ...baseEnumDescriptorProto_EnumReservedRange, + } as EnumDescriptorProto_EnumReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = Number(object.start); + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + return message; + }, + + toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { + const obj: any = {}; + message.start !== undefined && (obj.start = message.start); + message.end !== undefined && (obj.end = message.end); + return obj; + }, + + fromPartial( + object: DeepPartial + ): EnumDescriptorProto_EnumReservedRange { + const message = { + ...baseEnumDescriptorProto_EnumReservedRange, + } as EnumDescriptorProto_EnumReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = object.start; + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } + return message; + }, +}; + +const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; + +export const EnumValueDescriptorProto = { + encode( + message: EnumValueDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.number !== 0) { + writer.uint32(16).int32(message.number); + } + if (message.options !== undefined) { + EnumValueOptions.encode( + message.options, + writer.uint32(26).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): EnumValueDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseEnumValueDescriptorProto, + } as EnumValueDescriptorProto; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumValueDescriptorProto { + const message = { + ...baseEnumValueDescriptorProto, + } as EnumValueDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = Number(object.number); + } else { + message.number = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumValueOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; + }, + + toJSON(message: EnumValueDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.number !== undefined && (obj.number = message.number); + message.options !== undefined && + (obj.options = message.options + ? EnumValueOptions.toJSON(message.options) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): EnumValueDescriptorProto { + const message = { + ...baseEnumValueDescriptorProto, + } as EnumValueDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = object.number; + } else { + message.number = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumValueOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + return message; + }, +}; + +const baseServiceDescriptorProto: object = { name: "" }; + +export const ServiceDescriptorProto = { + encode( + message: ServiceDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + for (const v of message.method) { + MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); + } + if (message.options !== undefined) { + ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; + message.method = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.method.push( + MethodDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 3: + message.options = ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ServiceDescriptorProto { + const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; + message.method = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.method !== undefined && object.method !== null) { + for (const e of object.method) { + message.method.push(MethodDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = ServiceOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; + }, + + toJSON(message: ServiceDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + if (message.method) { + obj.method = message.method.map((e) => + e ? MethodDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.method = []; + } + message.options !== undefined && + (obj.options = message.options + ? ServiceOptions.toJSON(message.options) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): ServiceDescriptorProto { + const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; + message.method = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.method !== undefined && object.method !== null) { + for (const e of object.method) { + message.method.push(MethodDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = ServiceOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + return message; + }, +}; + +const baseMethodDescriptorProto: object = { + name: "", + input_type: "", + output_type: "", + client_streaming: false, + server_streaming: false, +}; + +export const MethodDescriptorProto = { + encode( + message: MethodDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.input_type !== "") { + writer.uint32(18).string(message.input_type); + } + if (message.output_type !== "") { + writer.uint32(26).string(message.output_type); + } + if (message.options !== undefined) { + MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); + } + if (message.client_streaming === true) { + writer.uint32(40).bool(message.client_streaming); + } + if (message.server_streaming === true) { + writer.uint32(48).bool(message.server_streaming); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.input_type = reader.string(); + break; + case 3: + message.output_type = reader.string(); + break; + case 4: + message.options = MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.client_streaming = reader.bool(); + break; + case 6: + message.server_streaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MethodDescriptorProto { + const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.input_type !== undefined && object.input_type !== null) { + message.input_type = String(object.input_type); + } else { + message.input_type = ""; + } + if (object.output_type !== undefined && object.output_type !== null) { + message.output_type = String(object.output_type); + } else { + message.output_type = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = MethodOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if ( + object.client_streaming !== undefined && + object.client_streaming !== null + ) { + message.client_streaming = Boolean(object.client_streaming); + } else { + message.client_streaming = false; + } + if ( + object.server_streaming !== undefined && + object.server_streaming !== null + ) { + message.server_streaming = Boolean(object.server_streaming); + } else { + message.server_streaming = false; + } + return message; + }, + + toJSON(message: MethodDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.input_type !== undefined && (obj.input_type = message.input_type); + message.output_type !== undefined && + (obj.output_type = message.output_type); + message.options !== undefined && + (obj.options = message.options + ? MethodOptions.toJSON(message.options) + : undefined); + message.client_streaming !== undefined && + (obj.client_streaming = message.client_streaming); + message.server_streaming !== undefined && + (obj.server_streaming = message.server_streaming); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MethodDescriptorProto { + const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.input_type !== undefined && object.input_type !== null) { + message.input_type = object.input_type; + } else { + message.input_type = ""; + } + if (object.output_type !== undefined && object.output_type !== null) { + message.output_type = object.output_type; + } else { + message.output_type = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = MethodOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if ( + object.client_streaming !== undefined && + object.client_streaming !== null + ) { + message.client_streaming = object.client_streaming; + } else { + message.client_streaming = false; + } + if ( + object.server_streaming !== undefined && + object.server_streaming !== null + ) { + message.server_streaming = object.server_streaming; + } else { + message.server_streaming = false; + } + return message; + }, +}; + +const baseFileOptions: object = { + java_package: "", + java_outer_classname: "", + java_multiple_files: false, + java_generate_equals_and_hash: false, + java_string_check_utf8: false, + optimize_for: 1, + go_package: "", + cc_generic_services: false, + java_generic_services: false, + py_generic_services: false, + php_generic_services: false, + deprecated: false, + cc_enable_arenas: false, + objc_class_prefix: "", + csharp_namespace: "", + swift_prefix: "", + php_class_prefix: "", + php_namespace: "", + php_metadata_namespace: "", + ruby_package: "", +}; + +export const FileOptions = { + encode(message: FileOptions, writer: Writer = Writer.create()): Writer { + if (message.java_package !== "") { + writer.uint32(10).string(message.java_package); + } + if (message.java_outer_classname !== "") { + writer.uint32(66).string(message.java_outer_classname); + } + if (message.java_multiple_files === true) { + writer.uint32(80).bool(message.java_multiple_files); + } + if (message.java_generate_equals_and_hash === true) { + writer.uint32(160).bool(message.java_generate_equals_and_hash); + } + if (message.java_string_check_utf8 === true) { + writer.uint32(216).bool(message.java_string_check_utf8); + } + if (message.optimize_for !== 1) { + writer.uint32(72).int32(message.optimize_for); + } + if (message.go_package !== "") { + writer.uint32(90).string(message.go_package); + } + if (message.cc_generic_services === true) { + writer.uint32(128).bool(message.cc_generic_services); + } + if (message.java_generic_services === true) { + writer.uint32(136).bool(message.java_generic_services); + } + if (message.py_generic_services === true) { + writer.uint32(144).bool(message.py_generic_services); + } + if (message.php_generic_services === true) { + writer.uint32(336).bool(message.php_generic_services); + } + if (message.deprecated === true) { + writer.uint32(184).bool(message.deprecated); + } + if (message.cc_enable_arenas === true) { + writer.uint32(248).bool(message.cc_enable_arenas); + } + if (message.objc_class_prefix !== "") { + writer.uint32(290).string(message.objc_class_prefix); + } + if (message.csharp_namespace !== "") { + writer.uint32(298).string(message.csharp_namespace); + } + if (message.swift_prefix !== "") { + writer.uint32(314).string(message.swift_prefix); + } + if (message.php_class_prefix !== "") { + writer.uint32(322).string(message.php_class_prefix); + } + if (message.php_namespace !== "") { + writer.uint32(330).string(message.php_namespace); + } + if (message.php_metadata_namespace !== "") { + writer.uint32(354).string(message.php_metadata_namespace); + } + if (message.ruby_package !== "") { + writer.uint32(362).string(message.ruby_package); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FileOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFileOptions } as FileOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.java_package = reader.string(); + break; + case 8: + message.java_outer_classname = reader.string(); + break; + case 10: + message.java_multiple_files = reader.bool(); + break; + case 20: + message.java_generate_equals_and_hash = reader.bool(); + break; + case 27: + message.java_string_check_utf8 = reader.bool(); + break; + case 9: + message.optimize_for = reader.int32() as any; + break; + case 11: + message.go_package = reader.string(); + break; + case 16: + message.cc_generic_services = reader.bool(); + break; + case 17: + message.java_generic_services = reader.bool(); + break; + case 18: + message.py_generic_services = reader.bool(); + break; + case 42: + message.php_generic_services = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.cc_enable_arenas = reader.bool(); + break; + case 36: + message.objc_class_prefix = reader.string(); + break; + case 37: + message.csharp_namespace = reader.string(); + break; + case 39: + message.swift_prefix = reader.string(); + break; + case 40: + message.php_class_prefix = reader.string(); + break; + case 41: + message.php_namespace = reader.string(); + break; + case 44: + message.php_metadata_namespace = reader.string(); + break; + case 45: + message.ruby_package = reader.string(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FileOptions { + const message = { ...baseFileOptions } as FileOptions; + message.uninterpreted_option = []; + if (object.java_package !== undefined && object.java_package !== null) { + message.java_package = String(object.java_package); + } else { + message.java_package = ""; + } + if ( + object.java_outer_classname !== undefined && + object.java_outer_classname !== null + ) { + message.java_outer_classname = String(object.java_outer_classname); + } else { + message.java_outer_classname = ""; + } + if ( + object.java_multiple_files !== undefined && + object.java_multiple_files !== null + ) { + message.java_multiple_files = Boolean(object.java_multiple_files); + } else { + message.java_multiple_files = false; + } + if ( + object.java_generate_equals_and_hash !== undefined && + object.java_generate_equals_and_hash !== null + ) { + message.java_generate_equals_and_hash = Boolean( + object.java_generate_equals_and_hash + ); + } else { + message.java_generate_equals_and_hash = false; + } + if ( + object.java_string_check_utf8 !== undefined && + object.java_string_check_utf8 !== null + ) { + message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); + } else { + message.java_string_check_utf8 = false; + } + if (object.optimize_for !== undefined && object.optimize_for !== null) { + message.optimize_for = fileOptions_OptimizeModeFromJSON( + object.optimize_for + ); + } else { + message.optimize_for = 1; + } + if (object.go_package !== undefined && object.go_package !== null) { + message.go_package = String(object.go_package); + } else { + message.go_package = ""; + } + if ( + object.cc_generic_services !== undefined && + object.cc_generic_services !== null + ) { + message.cc_generic_services = Boolean(object.cc_generic_services); + } else { + message.cc_generic_services = false; + } + if ( + object.java_generic_services !== undefined && + object.java_generic_services !== null + ) { + message.java_generic_services = Boolean(object.java_generic_services); + } else { + message.java_generic_services = false; + } + if ( + object.py_generic_services !== undefined && + object.py_generic_services !== null + ) { + message.py_generic_services = Boolean(object.py_generic_services); + } else { + message.py_generic_services = false; + } + if ( + object.php_generic_services !== undefined && + object.php_generic_services !== null + ) { + message.php_generic_services = Boolean(object.php_generic_services); + } else { + message.php_generic_services = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.cc_enable_arenas !== undefined && + object.cc_enable_arenas !== null + ) { + message.cc_enable_arenas = Boolean(object.cc_enable_arenas); + } else { + message.cc_enable_arenas = false; + } + if ( + object.objc_class_prefix !== undefined && + object.objc_class_prefix !== null + ) { + message.objc_class_prefix = String(object.objc_class_prefix); + } else { + message.objc_class_prefix = ""; + } + if ( + object.csharp_namespace !== undefined && + object.csharp_namespace !== null + ) { + message.csharp_namespace = String(object.csharp_namespace); + } else { + message.csharp_namespace = ""; + } + if (object.swift_prefix !== undefined && object.swift_prefix !== null) { + message.swift_prefix = String(object.swift_prefix); + } else { + message.swift_prefix = ""; + } + if ( + object.php_class_prefix !== undefined && + object.php_class_prefix !== null + ) { + message.php_class_prefix = String(object.php_class_prefix); + } else { + message.php_class_prefix = ""; + } + if (object.php_namespace !== undefined && object.php_namespace !== null) { + message.php_namespace = String(object.php_namespace); + } else { + message.php_namespace = ""; + } + if ( + object.php_metadata_namespace !== undefined && + object.php_metadata_namespace !== null + ) { + message.php_metadata_namespace = String(object.php_metadata_namespace); + } else { + message.php_metadata_namespace = ""; + } + if (object.ruby_package !== undefined && object.ruby_package !== null) { + message.ruby_package = String(object.ruby_package); + } else { + message.ruby_package = ""; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: FileOptions): unknown { + const obj: any = {}; + message.java_package !== undefined && + (obj.java_package = message.java_package); + message.java_outer_classname !== undefined && + (obj.java_outer_classname = message.java_outer_classname); + message.java_multiple_files !== undefined && + (obj.java_multiple_files = message.java_multiple_files); + message.java_generate_equals_and_hash !== undefined && + (obj.java_generate_equals_and_hash = + message.java_generate_equals_and_hash); + message.java_string_check_utf8 !== undefined && + (obj.java_string_check_utf8 = message.java_string_check_utf8); + message.optimize_for !== undefined && + (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); + message.go_package !== undefined && (obj.go_package = message.go_package); + message.cc_generic_services !== undefined && + (obj.cc_generic_services = message.cc_generic_services); + message.java_generic_services !== undefined && + (obj.java_generic_services = message.java_generic_services); + message.py_generic_services !== undefined && + (obj.py_generic_services = message.py_generic_services); + message.php_generic_services !== undefined && + (obj.php_generic_services = message.php_generic_services); + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + message.cc_enable_arenas !== undefined && + (obj.cc_enable_arenas = message.cc_enable_arenas); + message.objc_class_prefix !== undefined && + (obj.objc_class_prefix = message.objc_class_prefix); + message.csharp_namespace !== undefined && + (obj.csharp_namespace = message.csharp_namespace); + message.swift_prefix !== undefined && + (obj.swift_prefix = message.swift_prefix); + message.php_class_prefix !== undefined && + (obj.php_class_prefix = message.php_class_prefix); + message.php_namespace !== undefined && + (obj.php_namespace = message.php_namespace); + message.php_metadata_namespace !== undefined && + (obj.php_metadata_namespace = message.php_metadata_namespace); + message.ruby_package !== undefined && + (obj.ruby_package = message.ruby_package); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): FileOptions { + const message = { ...baseFileOptions } as FileOptions; + message.uninterpreted_option = []; + if (object.java_package !== undefined && object.java_package !== null) { + message.java_package = object.java_package; + } else { + message.java_package = ""; + } + if ( + object.java_outer_classname !== undefined && + object.java_outer_classname !== null + ) { + message.java_outer_classname = object.java_outer_classname; + } else { + message.java_outer_classname = ""; + } + if ( + object.java_multiple_files !== undefined && + object.java_multiple_files !== null + ) { + message.java_multiple_files = object.java_multiple_files; + } else { + message.java_multiple_files = false; + } + if ( + object.java_generate_equals_and_hash !== undefined && + object.java_generate_equals_and_hash !== null + ) { + message.java_generate_equals_and_hash = + object.java_generate_equals_and_hash; + } else { + message.java_generate_equals_and_hash = false; + } + if ( + object.java_string_check_utf8 !== undefined && + object.java_string_check_utf8 !== null + ) { + message.java_string_check_utf8 = object.java_string_check_utf8; + } else { + message.java_string_check_utf8 = false; + } + if (object.optimize_for !== undefined && object.optimize_for !== null) { + message.optimize_for = object.optimize_for; + } else { + message.optimize_for = 1; + } + if (object.go_package !== undefined && object.go_package !== null) { + message.go_package = object.go_package; + } else { + message.go_package = ""; + } + if ( + object.cc_generic_services !== undefined && + object.cc_generic_services !== null + ) { + message.cc_generic_services = object.cc_generic_services; + } else { + message.cc_generic_services = false; + } + if ( + object.java_generic_services !== undefined && + object.java_generic_services !== null + ) { + message.java_generic_services = object.java_generic_services; + } else { + message.java_generic_services = false; + } + if ( + object.py_generic_services !== undefined && + object.py_generic_services !== null + ) { + message.py_generic_services = object.py_generic_services; + } else { + message.py_generic_services = false; + } + if ( + object.php_generic_services !== undefined && + object.php_generic_services !== null + ) { + message.php_generic_services = object.php_generic_services; + } else { + message.php_generic_services = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.cc_enable_arenas !== undefined && + object.cc_enable_arenas !== null + ) { + message.cc_enable_arenas = object.cc_enable_arenas; + } else { + message.cc_enable_arenas = false; + } + if ( + object.objc_class_prefix !== undefined && + object.objc_class_prefix !== null + ) { + message.objc_class_prefix = object.objc_class_prefix; + } else { + message.objc_class_prefix = ""; + } + if ( + object.csharp_namespace !== undefined && + object.csharp_namespace !== null + ) { + message.csharp_namespace = object.csharp_namespace; + } else { + message.csharp_namespace = ""; + } + if (object.swift_prefix !== undefined && object.swift_prefix !== null) { + message.swift_prefix = object.swift_prefix; + } else { + message.swift_prefix = ""; + } + if ( + object.php_class_prefix !== undefined && + object.php_class_prefix !== null + ) { + message.php_class_prefix = object.php_class_prefix; + } else { + message.php_class_prefix = ""; + } + if (object.php_namespace !== undefined && object.php_namespace !== null) { + message.php_namespace = object.php_namespace; + } else { + message.php_namespace = ""; + } + if ( + object.php_metadata_namespace !== undefined && + object.php_metadata_namespace !== null + ) { + message.php_metadata_namespace = object.php_metadata_namespace; + } else { + message.php_metadata_namespace = ""; + } + if (object.ruby_package !== undefined && object.ruby_package !== null) { + message.ruby_package = object.ruby_package; + } else { + message.ruby_package = ""; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseMessageOptions: object = { + message_set_wire_format: false, + no_standard_descriptor_accessor: false, + deprecated: false, + map_entry: false, +}; + +export const MessageOptions = { + encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { + if (message.message_set_wire_format === true) { + writer.uint32(8).bool(message.message_set_wire_format); + } + if (message.no_standard_descriptor_accessor === true) { + writer.uint32(16).bool(message.no_standard_descriptor_accessor); + } + if (message.deprecated === true) { + writer.uint32(24).bool(message.deprecated); + } + if (message.map_entry === true) { + writer.uint32(56).bool(message.map_entry); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MessageOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMessageOptions } as MessageOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message_set_wire_format = reader.bool(); + break; + case 2: + message.no_standard_descriptor_accessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.map_entry = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MessageOptions { + const message = { ...baseMessageOptions } as MessageOptions; + message.uninterpreted_option = []; + if ( + object.message_set_wire_format !== undefined && + object.message_set_wire_format !== null + ) { + message.message_set_wire_format = Boolean(object.message_set_wire_format); + } else { + message.message_set_wire_format = false; + } + if ( + object.no_standard_descriptor_accessor !== undefined && + object.no_standard_descriptor_accessor !== null + ) { + message.no_standard_descriptor_accessor = Boolean( + object.no_standard_descriptor_accessor + ); + } else { + message.no_standard_descriptor_accessor = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if (object.map_entry !== undefined && object.map_entry !== null) { + message.map_entry = Boolean(object.map_entry); + } else { + message.map_entry = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: MessageOptions): unknown { + const obj: any = {}; + message.message_set_wire_format !== undefined && + (obj.message_set_wire_format = message.message_set_wire_format); + message.no_standard_descriptor_accessor !== undefined && + (obj.no_standard_descriptor_accessor = + message.no_standard_descriptor_accessor); + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + message.map_entry !== undefined && (obj.map_entry = message.map_entry); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): MessageOptions { + const message = { ...baseMessageOptions } as MessageOptions; + message.uninterpreted_option = []; + if ( + object.message_set_wire_format !== undefined && + object.message_set_wire_format !== null + ) { + message.message_set_wire_format = object.message_set_wire_format; + } else { + message.message_set_wire_format = false; + } + if ( + object.no_standard_descriptor_accessor !== undefined && + object.no_standard_descriptor_accessor !== null + ) { + message.no_standard_descriptor_accessor = + object.no_standard_descriptor_accessor; + } else { + message.no_standard_descriptor_accessor = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if (object.map_entry !== undefined && object.map_entry !== null) { + message.map_entry = object.map_entry; + } else { + message.map_entry = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseFieldOptions: object = { + ctype: 0, + packed: false, + jstype: 0, + lazy: false, + deprecated: false, + weak: false, +}; + +export const FieldOptions = { + encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { + if (message.ctype !== 0) { + writer.uint32(8).int32(message.ctype); + } + if (message.packed === true) { + writer.uint32(16).bool(message.packed); + } + if (message.jstype !== 0) { + writer.uint32(48).int32(message.jstype); + } + if (message.lazy === true) { + writer.uint32(40).bool(message.lazy); + } + if (message.deprecated === true) { + writer.uint32(24).bool(message.deprecated); + } + if (message.weak === true) { + writer.uint32(80).bool(message.weak); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FieldOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFieldOptions } as FieldOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32() as any; + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32() as any; + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FieldOptions { + const message = { ...baseFieldOptions } as FieldOptions; + message.uninterpreted_option = []; + if (object.ctype !== undefined && object.ctype !== null) { + message.ctype = fieldOptions_CTypeFromJSON(object.ctype); + } else { + message.ctype = 0; + } + if (object.packed !== undefined && object.packed !== null) { + message.packed = Boolean(object.packed); + } else { + message.packed = false; + } + if (object.jstype !== undefined && object.jstype !== null) { + message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); + } else { + message.jstype = 0; + } + if (object.lazy !== undefined && object.lazy !== null) { + message.lazy = Boolean(object.lazy); + } else { + message.lazy = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if (object.weak !== undefined && object.weak !== null) { + message.weak = Boolean(object.weak); + } else { + message.weak = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: FieldOptions): unknown { + const obj: any = {}; + message.ctype !== undefined && + (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); + message.packed !== undefined && (obj.packed = message.packed); + message.jstype !== undefined && + (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); + message.lazy !== undefined && (obj.lazy = message.lazy); + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + message.weak !== undefined && (obj.weak = message.weak); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): FieldOptions { + const message = { ...baseFieldOptions } as FieldOptions; + message.uninterpreted_option = []; + if (object.ctype !== undefined && object.ctype !== null) { + message.ctype = object.ctype; + } else { + message.ctype = 0; + } + if (object.packed !== undefined && object.packed !== null) { + message.packed = object.packed; + } else { + message.packed = false; + } + if (object.jstype !== undefined && object.jstype !== null) { + message.jstype = object.jstype; + } else { + message.jstype = 0; + } + if (object.lazy !== undefined && object.lazy !== null) { + message.lazy = object.lazy; + } else { + message.lazy = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if (object.weak !== undefined && object.weak !== null) { + message.weak = object.weak; + } else { + message.weak = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseOneofOptions: object = {}; + +export const OneofOptions = { + encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): OneofOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseOneofOptions } as OneofOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): OneofOptions { + const message = { ...baseOneofOptions } as OneofOptions; + message.uninterpreted_option = []; + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: OneofOptions): unknown { + const obj: any = {}; + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): OneofOptions { + const message = { ...baseOneofOptions } as OneofOptions; + message.uninterpreted_option = []; + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseEnumOptions: object = { allow_alias: false, deprecated: false }; + +export const EnumOptions = { + encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { + if (message.allow_alias === true) { + writer.uint32(16).bool(message.allow_alias); + } + if (message.deprecated === true) { + writer.uint32(24).bool(message.deprecated); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): EnumOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseEnumOptions } as EnumOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allow_alias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumOptions { + const message = { ...baseEnumOptions } as EnumOptions; + message.uninterpreted_option = []; + if (object.allow_alias !== undefined && object.allow_alias !== null) { + message.allow_alias = Boolean(object.allow_alias); + } else { + message.allow_alias = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: EnumOptions): unknown { + const obj: any = {}; + message.allow_alias !== undefined && + (obj.allow_alias = message.allow_alias); + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): EnumOptions { + const message = { ...baseEnumOptions } as EnumOptions; + message.uninterpreted_option = []; + if (object.allow_alias !== undefined && object.allow_alias !== null) { + message.allow_alias = object.allow_alias; + } else { + message.allow_alias = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseEnumValueOptions: object = { deprecated: false }; + +export const EnumValueOptions = { + encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { + if (message.deprecated === true) { + writer.uint32(8).bool(message.deprecated); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseEnumValueOptions } as EnumValueOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumValueOptions { + const message = { ...baseEnumValueOptions } as EnumValueOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: EnumValueOptions): unknown { + const obj: any = {}; + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): EnumValueOptions { + const message = { ...baseEnumValueOptions } as EnumValueOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseServiceOptions: object = { deprecated: false }; + +export const ServiceOptions = { + encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { + if (message.deprecated === true) { + writer.uint32(264).bool(message.deprecated); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): ServiceOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseServiceOptions } as ServiceOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ServiceOptions { + const message = { ...baseServiceOptions } as ServiceOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: ServiceOptions): unknown { + const obj: any = {}; + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): ServiceOptions { + const message = { ...baseServiceOptions } as ServiceOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; + +export const MethodOptions = { + encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { + if (message.deprecated === true) { + writer.uint32(264).bool(message.deprecated); + } + if (message.idempotency_level !== 0) { + writer.uint32(272).int32(message.idempotency_level); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MethodOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMethodOptions } as MethodOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotency_level = reader.int32() as any; + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MethodOptions { + const message = { ...baseMethodOptions } as MethodOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.idempotency_level !== undefined && + object.idempotency_level !== null + ) { + message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( + object.idempotency_level + ); + } else { + message.idempotency_level = 0; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: MethodOptions): unknown { + const obj: any = {}; + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + message.idempotency_level !== undefined && + (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( + message.idempotency_level + )); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): MethodOptions { + const message = { ...baseMethodOptions } as MethodOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.idempotency_level !== undefined && + object.idempotency_level !== null + ) { + message.idempotency_level = object.idempotency_level; + } else { + message.idempotency_level = 0; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseUninterpretedOption: object = { + identifier_value: "", + positive_int_value: 0, + negative_int_value: 0, + double_value: 0, + aggregate_value: "", +}; + +export const UninterpretedOption = { + encode( + message: UninterpretedOption, + writer: Writer = Writer.create() + ): Writer { + for (const v of message.name) { + UninterpretedOption_NamePart.encode( + v!, + writer.uint32(18).fork() + ).ldelim(); + } + if (message.identifier_value !== "") { + writer.uint32(26).string(message.identifier_value); + } + if (message.positive_int_value !== 0) { + writer.uint32(32).uint64(message.positive_int_value); + } + if (message.negative_int_value !== 0) { + writer.uint32(40).int64(message.negative_int_value); + } + if (message.double_value !== 0) { + writer.uint32(49).double(message.double_value); + } + if (message.string_value.length !== 0) { + writer.uint32(58).bytes(message.string_value); + } + if (message.aggregate_value !== "") { + writer.uint32(66).string(message.aggregate_value); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseUninterpretedOption } as UninterpretedOption; + message.name = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.name.push( + UninterpretedOption_NamePart.decode(reader, reader.uint32()) + ); + break; + case 3: + message.identifier_value = reader.string(); + break; + case 4: + message.positive_int_value = longToNumber(reader.uint64() as Long); + break; + case 5: + message.negative_int_value = longToNumber(reader.int64() as Long); + break; + case 6: + message.double_value = reader.double(); + break; + case 7: + message.string_value = reader.bytes(); + break; + case 8: + message.aggregate_value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): UninterpretedOption { + const message = { ...baseUninterpretedOption } as UninterpretedOption; + message.name = []; + if (object.name !== undefined && object.name !== null) { + for (const e of object.name) { + message.name.push(UninterpretedOption_NamePart.fromJSON(e)); + } + } + if ( + object.identifier_value !== undefined && + object.identifier_value !== null + ) { + message.identifier_value = String(object.identifier_value); + } else { + message.identifier_value = ""; + } + if ( + object.positive_int_value !== undefined && + object.positive_int_value !== null + ) { + message.positive_int_value = Number(object.positive_int_value); + } else { + message.positive_int_value = 0; + } + if ( + object.negative_int_value !== undefined && + object.negative_int_value !== null + ) { + message.negative_int_value = Number(object.negative_int_value); + } else { + message.negative_int_value = 0; + } + if (object.double_value !== undefined && object.double_value !== null) { + message.double_value = Number(object.double_value); + } else { + message.double_value = 0; + } + if (object.string_value !== undefined && object.string_value !== null) { + message.string_value = bytesFromBase64(object.string_value); + } + if ( + object.aggregate_value !== undefined && + object.aggregate_value !== null + ) { + message.aggregate_value = String(object.aggregate_value); + } else { + message.aggregate_value = ""; + } + return message; + }, + + toJSON(message: UninterpretedOption): unknown { + const obj: any = {}; + if (message.name) { + obj.name = message.name.map((e) => + e ? UninterpretedOption_NamePart.toJSON(e) : undefined + ); + } else { + obj.name = []; + } + message.identifier_value !== undefined && + (obj.identifier_value = message.identifier_value); + message.positive_int_value !== undefined && + (obj.positive_int_value = message.positive_int_value); + message.negative_int_value !== undefined && + (obj.negative_int_value = message.negative_int_value); + message.double_value !== undefined && + (obj.double_value = message.double_value); + message.string_value !== undefined && + (obj.string_value = base64FromBytes( + message.string_value !== undefined + ? message.string_value + : new Uint8Array() + )); + message.aggregate_value !== undefined && + (obj.aggregate_value = message.aggregate_value); + return obj; + }, + + fromPartial(object: DeepPartial): UninterpretedOption { + const message = { ...baseUninterpretedOption } as UninterpretedOption; + message.name = []; + if (object.name !== undefined && object.name !== null) { + for (const e of object.name) { + message.name.push(UninterpretedOption_NamePart.fromPartial(e)); + } + } + if ( + object.identifier_value !== undefined && + object.identifier_value !== null + ) { + message.identifier_value = object.identifier_value; + } else { + message.identifier_value = ""; + } + if ( + object.positive_int_value !== undefined && + object.positive_int_value !== null + ) { + message.positive_int_value = object.positive_int_value; + } else { + message.positive_int_value = 0; + } + if ( + object.negative_int_value !== undefined && + object.negative_int_value !== null + ) { + message.negative_int_value = object.negative_int_value; + } else { + message.negative_int_value = 0; + } + if (object.double_value !== undefined && object.double_value !== null) { + message.double_value = object.double_value; + } else { + message.double_value = 0; + } + if (object.string_value !== undefined && object.string_value !== null) { + message.string_value = object.string_value; + } else { + message.string_value = new Uint8Array(); + } + if ( + object.aggregate_value !== undefined && + object.aggregate_value !== null + ) { + message.aggregate_value = object.aggregate_value; + } else { + message.aggregate_value = ""; + } + return message; + }, +}; + +const baseUninterpretedOption_NamePart: object = { + name_part: "", + is_extension: false, +}; + +export const UninterpretedOption_NamePart = { + encode( + message: UninterpretedOption_NamePart, + writer: Writer = Writer.create() + ): Writer { + if (message.name_part !== "") { + writer.uint32(10).string(message.name_part); + } + if (message.is_extension === true) { + writer.uint32(16).bool(message.is_extension); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): UninterpretedOption_NamePart { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseUninterpretedOption_NamePart, + } as UninterpretedOption_NamePart; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name_part = reader.string(); + break; + case 2: + message.is_extension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): UninterpretedOption_NamePart { + const message = { + ...baseUninterpretedOption_NamePart, + } as UninterpretedOption_NamePart; + if (object.name_part !== undefined && object.name_part !== null) { + message.name_part = String(object.name_part); + } else { + message.name_part = ""; + } + if (object.is_extension !== undefined && object.is_extension !== null) { + message.is_extension = Boolean(object.is_extension); + } else { + message.is_extension = false; + } + return message; + }, + + toJSON(message: UninterpretedOption_NamePart): unknown { + const obj: any = {}; + message.name_part !== undefined && (obj.name_part = message.name_part); + message.is_extension !== undefined && + (obj.is_extension = message.is_extension); + return obj; + }, + + fromPartial( + object: DeepPartial + ): UninterpretedOption_NamePart { + const message = { + ...baseUninterpretedOption_NamePart, + } as UninterpretedOption_NamePart; + if (object.name_part !== undefined && object.name_part !== null) { + message.name_part = object.name_part; + } else { + message.name_part = ""; + } + if (object.is_extension !== undefined && object.is_extension !== null) { + message.is_extension = object.is_extension; + } else { + message.is_extension = false; + } + return message; + }, +}; + +const baseSourceCodeInfo: object = {}; + +export const SourceCodeInfo = { + encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { + for (const v of message.location) { + SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseSourceCodeInfo } as SourceCodeInfo; + message.location = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location.push( + SourceCodeInfo_Location.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): SourceCodeInfo { + const message = { ...baseSourceCodeInfo } as SourceCodeInfo; + message.location = []; + if (object.location !== undefined && object.location !== null) { + for (const e of object.location) { + message.location.push(SourceCodeInfo_Location.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: SourceCodeInfo): unknown { + const obj: any = {}; + if (message.location) { + obj.location = message.location.map((e) => + e ? SourceCodeInfo_Location.toJSON(e) : undefined + ); + } else { + obj.location = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): SourceCodeInfo { + const message = { ...baseSourceCodeInfo } as SourceCodeInfo; + message.location = []; + if (object.location !== undefined && object.location !== null) { + for (const e of object.location) { + message.location.push(SourceCodeInfo_Location.fromPartial(e)); + } + } + return message; + }, +}; + +const baseSourceCodeInfo_Location: object = { + path: 0, + span: 0, + leading_comments: "", + trailing_comments: "", + leading_detached_comments: "", +}; + +export const SourceCodeInfo_Location = { + encode( + message: SourceCodeInfo_Location, + writer: Writer = Writer.create() + ): Writer { + writer.uint32(10).fork(); + for (const v of message.path) { + writer.int32(v); + } + writer.ldelim(); + writer.uint32(18).fork(); + for (const v of message.span) { + writer.int32(v); + } + writer.ldelim(); + if (message.leading_comments !== "") { + writer.uint32(26).string(message.leading_comments); + } + if (message.trailing_comments !== "") { + writer.uint32(34).string(message.trailing_comments); + } + for (const v of message.leading_detached_comments) { + writer.uint32(50).string(v!); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseSourceCodeInfo_Location, + } as SourceCodeInfo_Location; + message.path = []; + message.span = []; + message.leading_detached_comments = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.path.push(reader.int32()); + } + } else { + message.path.push(reader.int32()); + } + break; + case 2: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.span.push(reader.int32()); + } + } else { + message.span.push(reader.int32()); + } + break; + case 3: + message.leading_comments = reader.string(); + break; + case 4: + message.trailing_comments = reader.string(); + break; + case 6: + message.leading_detached_comments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): SourceCodeInfo_Location { + const message = { + ...baseSourceCodeInfo_Location, + } as SourceCodeInfo_Location; + message.path = []; + message.span = []; + message.leading_detached_comments = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(Number(e)); + } + } + if (object.span !== undefined && object.span !== null) { + for (const e of object.span) { + message.span.push(Number(e)); + } + } + if ( + object.leading_comments !== undefined && + object.leading_comments !== null + ) { + message.leading_comments = String(object.leading_comments); + } else { + message.leading_comments = ""; + } + if ( + object.trailing_comments !== undefined && + object.trailing_comments !== null + ) { + message.trailing_comments = String(object.trailing_comments); + } else { + message.trailing_comments = ""; + } + if ( + object.leading_detached_comments !== undefined && + object.leading_detached_comments !== null + ) { + for (const e of object.leading_detached_comments) { + message.leading_detached_comments.push(String(e)); + } + } + return message; + }, + + toJSON(message: SourceCodeInfo_Location): unknown { + const obj: any = {}; + if (message.path) { + obj.path = message.path.map((e) => e); + } else { + obj.path = []; + } + if (message.span) { + obj.span = message.span.map((e) => e); + } else { + obj.span = []; + } + message.leading_comments !== undefined && + (obj.leading_comments = message.leading_comments); + message.trailing_comments !== undefined && + (obj.trailing_comments = message.trailing_comments); + if (message.leading_detached_comments) { + obj.leading_detached_comments = message.leading_detached_comments.map( + (e) => e + ); + } else { + obj.leading_detached_comments = []; + } + return obj; + }, + + fromPartial( + object: DeepPartial + ): SourceCodeInfo_Location { + const message = { + ...baseSourceCodeInfo_Location, + } as SourceCodeInfo_Location; + message.path = []; + message.span = []; + message.leading_detached_comments = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(e); + } + } + if (object.span !== undefined && object.span !== null) { + for (const e of object.span) { + message.span.push(e); + } + } + if ( + object.leading_comments !== undefined && + object.leading_comments !== null + ) { + message.leading_comments = object.leading_comments; + } else { + message.leading_comments = ""; + } + if ( + object.trailing_comments !== undefined && + object.trailing_comments !== null + ) { + message.trailing_comments = object.trailing_comments; + } else { + message.trailing_comments = ""; + } + if ( + object.leading_detached_comments !== undefined && + object.leading_detached_comments !== null + ) { + for (const e of object.leading_detached_comments) { + message.leading_detached_comments.push(e); + } + } + return message; + }, +}; + +const baseGeneratedCodeInfo: object = {}; + +export const GeneratedCodeInfo = { + encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { + for (const v of message.annotation) { + GeneratedCodeInfo_Annotation.encode( + v!, + writer.uint32(10).fork() + ).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; + message.annotation = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.annotation.push( + GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): GeneratedCodeInfo { + const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; + message.annotation = []; + if (object.annotation !== undefined && object.annotation !== null) { + for (const e of object.annotation) { + message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: GeneratedCodeInfo): unknown { + const obj: any = {}; + if (message.annotation) { + obj.annotation = message.annotation.map((e) => + e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined + ); + } else { + obj.annotation = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): GeneratedCodeInfo { + const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; + message.annotation = []; + if (object.annotation !== undefined && object.annotation !== null) { + for (const e of object.annotation) { + message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); + } + } + return message; + }, +}; + +const baseGeneratedCodeInfo_Annotation: object = { + path: 0, + source_file: "", + begin: 0, + end: 0, +}; + +export const GeneratedCodeInfo_Annotation = { + encode( + message: GeneratedCodeInfo_Annotation, + writer: Writer = Writer.create() + ): Writer { + writer.uint32(10).fork(); + for (const v of message.path) { + writer.int32(v); + } + writer.ldelim(); + if (message.source_file !== "") { + writer.uint32(18).string(message.source_file); + } + if (message.begin !== 0) { + writer.uint32(24).int32(message.begin); + } + if (message.end !== 0) { + writer.uint32(32).int32(message.end); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): GeneratedCodeInfo_Annotation { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseGeneratedCodeInfo_Annotation, + } as GeneratedCodeInfo_Annotation; + message.path = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.path.push(reader.int32()); + } + } else { + message.path.push(reader.int32()); + } + break; + case 2: + message.source_file = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): GeneratedCodeInfo_Annotation { + const message = { + ...baseGeneratedCodeInfo_Annotation, + } as GeneratedCodeInfo_Annotation; + message.path = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(Number(e)); + } + } + if (object.source_file !== undefined && object.source_file !== null) { + message.source_file = String(object.source_file); + } else { + message.source_file = ""; + } + if (object.begin !== undefined && object.begin !== null) { + message.begin = Number(object.begin); + } else { + message.begin = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + return message; + }, + + toJSON(message: GeneratedCodeInfo_Annotation): unknown { + const obj: any = {}; + if (message.path) { + obj.path = message.path.map((e) => e); + } else { + obj.path = []; + } + message.source_file !== undefined && + (obj.source_file = message.source_file); + message.begin !== undefined && (obj.begin = message.begin); + message.end !== undefined && (obj.end = message.end); + return obj; + }, + + fromPartial( + object: DeepPartial + ): GeneratedCodeInfo_Annotation { + const message = { + ...baseGeneratedCodeInfo_Annotation, + } as GeneratedCodeInfo_Annotation; + message.path = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(e); + } + } + if (object.source_file !== undefined && object.source_file !== null) { + message.source_file = object.source_file; + } else { + message.source_file = ""; + } + if (object.begin !== undefined && object.begin !== null) { + message.begin = object.begin; + } else { + message.begin = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +const atob: (b64: string) => string = + globalThis.atob || + ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +function bytesFromBase64(b64: string): Uint8Array { + const bin = atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; +} + +const btoa: (bin: string) => string = + globalThis.btoa || + ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +function base64FromBytes(arr: Uint8Array): string { + const bin: string[] = []; + for (let i = 0; i < arr.byteLength; ++i) { + bin.push(String.fromCharCode(arr[i])); + } + return btoa(bin.join("")); +} + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/package.json b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/package.json new file mode 100755 index 00000000..ded35e33 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/package.json @@ -0,0 +1,18 @@ +{ + "name": "thesixnetwork-sixnft-evmsupport-js", + "version": "0.1.0", + "description": "Autogenerated vuex store for Cosmos module thesixnetwork.sixnft.evmsupport", + "author": "Starport Codegen ", + "homepage": "http://github.com/thesixnetwork/sixnft/x/evmsupport/types", + "license": "Apache-2.0", + "licenses": [ + { + "type": "Apache-2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0" + } + ], + "main": "index.js", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/vuex-root b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/vuex-root new file mode 100755 index 00000000..0fcc121a --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/vuex-root @@ -0,0 +1 @@ +THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/index.ts new file mode 100755 index 00000000..7d003ff7 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/index.ts @@ -0,0 +1,288 @@ +import { txClient, queryClient, MissingWalletError , registry} from './module' + +import { Authorization } from "./module/types/nftadmin/authorization" +import { Params } from "./module/types/nftadmin/params" +import { AddressList } from "./module/types/nftadmin/permissions" +import { Permissions } from "./module/types/nftadmin/permissions" + + +export { Authorization, Params, AddressList, Permissions }; + +async function initTxClient(vuexGetters) { + return await txClient(vuexGetters['common/wallet/signer'], { + addr: vuexGetters['common/env/apiTendermint'] + }) +} + +async function initQueryClient(vuexGetters) { + return await queryClient({ + addr: vuexGetters['common/env/apiCosmos'] + }) +} + +function mergeResults(value, next_values) { + for (let prop of Object.keys(next_values)) { + if (Array.isArray(next_values[prop])) { + value[prop]=[...value[prop], ...next_values[prop]] + }else{ + value[prop]=next_values[prop] + } + } + return value +} + +function getStructure(template) { + let structure = { fields: [] } + for (const [key, value] of Object.entries(template)) { + let field: any = {} + field.name = key + field.type = typeof value + structure.fields.push(field) + } + return structure +} + +const getDefaultState = () => { + return { + Params: {}, + Authorization: {}, + + _Structure: { + Authorization: getStructure(Authorization.fromPartial({})), + Params: getStructure(Params.fromPartial({})), + AddressList: getStructure(AddressList.fromPartial({})), + Permissions: getStructure(Permissions.fromPartial({})), + + }, + _Registry: registry, + _Subscriptions: new Set(), + } +} + +// initial state +const state = getDefaultState() + +export default { + namespaced: true, + state, + mutations: { + RESET_STATE(state) { + Object.assign(state, getDefaultState()) + }, + QUERY(state, { query, key, value }) { + state[query][JSON.stringify(key)] = value + }, + SUBSCRIBE(state, subscription) { + state._Subscriptions.add(JSON.stringify(subscription)) + }, + UNSUBSCRIBE(state, subscription) { + state._Subscriptions.delete(JSON.stringify(subscription)) + } + }, + getters: { + getParams: (state) => (params = { params: {}}) => { + if (!( params).query) { + ( params).query=null + } + return state.Params[JSON.stringify(params)] ?? {} + }, + getAuthorization: (state) => (params = { params: {}}) => { + if (!( params).query) { + ( params).query=null + } + return state.Authorization[JSON.stringify(params)] ?? {} + }, + + getTypeStructure: (state) => (type) => { + return state._Structure[type].fields + }, + getRegistry: (state) => { + return state._Registry + } + }, + actions: { + init({ dispatch, rootGetters }) { + console.log('Vuex module: thesixnetwork.sixnft.nftadmin initialized!') + if (rootGetters['common/env/client']) { + rootGetters['common/env/client'].on('newblock', () => { + dispatch('StoreUpdate') + }) + } + }, + resetState({ commit }) { + commit('RESET_STATE') + }, + unsubscribe({ commit }, subscription) { + commit('UNSUBSCRIBE', subscription) + }, + async StoreUpdate({ state, dispatch }) { + state._Subscriptions.forEach(async (subscription) => { + try { + const sub=JSON.parse(subscription) + await dispatch(sub.action, sub.payload) + }catch(e) { + throw new Error('Subscriptions: ' + e.message) + } + }) + }, + + + + + + + async QueryParams({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { + try { + const key = params ?? {}; + const queryClient=await initQueryClient(rootGetters) + let value= (await queryClient.queryParams()).data + + + commit('QUERY', { query: 'Params', key: { params: {...key}, query}, value }) + if (subscribe) commit('SUBSCRIBE', { action: 'QueryParams', payload: { options: { all }, params: {...key},query }}) + return getters['getParams']( { params: {...key}, query}) ?? {} + } catch (e) { + throw new Error('QueryClient:QueryParams API Node Unavailable. Could not perform query: ' + e.message) + + } + }, + + + + + + + + async QueryAuthorization({ commit, rootGetters, getters }, { options: { subscribe, all} = { subscribe:false, all:false}, params, query=null }) { + try { + const key = params ?? {}; + const queryClient=await initQueryClient(rootGetters) + let value= (await queryClient.queryAuthorization()).data + + + commit('QUERY', { query: 'Authorization', key: { params: {...key}, query}, value }) + if (subscribe) commit('SUBSCRIBE', { action: 'QueryAuthorization', payload: { options: { all }, params: {...key},query }}) + return getters['getAuthorization']( { params: {...key}, query}) ?? {} + } catch (e) { + throw new Error('QueryClient:QueryAuthorization API Node Unavailable. Could not perform query: ' + e.message) + + } + }, + + + async sendMsgBurn({ rootGetters }, { value, fee = [], memo = '' }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgBurn(value) + const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, + gas: "200000" }, memo}) + return result + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.') + }else{ + throw new Error('TxClient:MsgBurn:Send Could not broadcast Tx: '+ e.message) + } + } + }, + async sendMsgRevokePermission({ rootGetters }, { value, fee = [], memo = '' }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgRevokePermission(value) + const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, + gas: "200000" }, memo}) + return result + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgRevokePermission:Init Could not initialize signing client. Wallet is required.') + }else{ + throw new Error('TxClient:MsgRevokePermission:Send Could not broadcast Tx: '+ e.message) + } + } + }, + async sendMsgMint({ rootGetters }, { value, fee = [], memo = '' }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgMint(value) + const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, + gas: "200000" }, memo}) + return result + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgMint:Init Could not initialize signing client. Wallet is required.') + }else{ + throw new Error('TxClient:MsgMint:Send Could not broadcast Tx: '+ e.message) + } + } + }, + async sendMsgGrantPermission({ rootGetters }, { value, fee = [], memo = '' }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgGrantPermission(value) + const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, + gas: "200000" }, memo}) + return result + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgGrantPermission:Init Could not initialize signing client. Wallet is required.') + }else{ + throw new Error('TxClient:MsgGrantPermission:Send Could not broadcast Tx: '+ e.message) + } + } + }, + + async MsgBurn({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgBurn(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgBurn:Create Could not create message: ' + e.message) + } + } + }, + async MsgRevokePermission({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgRevokePermission(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgRevokePermission:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgRevokePermission:Create Could not create message: ' + e.message) + } + } + }, + async MsgMint({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgMint(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgMint:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgMint:Create Could not create message: ' + e.message) + } + } + }, + async MsgGrantPermission({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgGrantPermission(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgGrantPermission:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgGrantPermission:Create Could not create message: ' + e.message) + } + } + }, + + } +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/index.ts new file mode 100755 index 00000000..3b7c730e --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/index.ts @@ -0,0 +1,69 @@ +// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. + +import { StdFee } from "@cosmjs/launchpad"; +import { SigningStargateClient } from "@cosmjs/stargate"; +import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; +import { Api } from "./rest"; +import { MsgBurn } from "./types/nftadmin/tx"; +import { MsgRevokePermission } from "./types/nftadmin/tx"; +import { MsgMint } from "./types/nftadmin/tx"; +import { MsgGrantPermission } from "./types/nftadmin/tx"; + + +const types = [ + ["/thesixnetwork.sixnft.nftadmin.MsgBurn", MsgBurn], + ["/thesixnetwork.sixnft.nftadmin.MsgRevokePermission", MsgRevokePermission], + ["/thesixnetwork.sixnft.nftadmin.MsgMint", MsgMint], + ["/thesixnetwork.sixnft.nftadmin.MsgGrantPermission", MsgGrantPermission], + +]; +export const MissingWalletError = new Error("wallet is required"); + +export const registry = new Registry(types); + +const defaultFee = { + amount: [], + gas: "200000", +}; + +interface TxClientOptions { + addr: string +} + +interface SignAndBroadcastOptions { + fee: StdFee, + memo?: string +} + +const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { + if (!wallet) throw MissingWalletError; + let client; + if (addr) { + client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); + }else{ + client = await SigningStargateClient.offline( wallet, { registry }); + } + const { address } = (await wallet.getAccounts())[0]; + + return { + signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), + msgBurn: (data: MsgBurn): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftadmin.MsgBurn", value: MsgBurn.fromPartial( data ) }), + msgRevokePermission: (data: MsgRevokePermission): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftadmin.MsgRevokePermission", value: MsgRevokePermission.fromPartial( data ) }), + msgMint: (data: MsgMint): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftadmin.MsgMint", value: MsgMint.fromPartial( data ) }), + msgGrantPermission: (data: MsgGrantPermission): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftadmin.MsgGrantPermission", value: MsgGrantPermission.fromPartial( data ) }), + + }; +}; + +interface QueryClientOptions { + addr: string +} + +const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { + return new Api({ baseUrl: addr }); +}; + +export { + txClient, + queryClient, +}; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/rest.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/rest.ts new file mode 100644 index 00000000..c3549ed1 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/rest.ts @@ -0,0 +1,298 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +export interface NftadminAddressList { + addresses?: string[]; +} + +export interface NftadminAuthorization { + root_admin?: string; + permissions?: NftadminPermissions; +} + +export interface NftadminMsgBurnResponse { + amount?: string; + token?: string; +} + +export interface NftadminMsgGrantPermissionResponse { + grantee?: string; +} + +export interface NftadminMsgMintResponse { + amount?: string; + token?: string; +} + +export interface NftadminMsgRevokePermissionResponse { + revokee?: string; +} + +/** + * Params defines the parameters for the module. + */ +export type NftadminParams = object; + +export interface NftadminPermissions { + map_name?: Record; +} + +export interface NftadminQueryGetAuthorizationResponse { + Authorization?: NftadminAuthorization; +} + +/** + * QueryParamsResponse is response type for the Query/Params RPC method. + */ +export interface NftadminQueryParamsResponse { + /** params holds all the parameters of this module. */ + params?: NftadminParams; +} + +export interface ProtobufAny { + "@type"?: string; +} + +export interface RpcStatus { + /** @format int32 */ + code?: number; + message?: string; + details?: ProtobufAny[]; +} + +export type QueryParamsType = Record; +export type ResponseFormat = keyof Omit; + +export interface FullRequestParams extends Omit { + /** set parameter to `true` for call `securityWorker` for this request */ + secure?: boolean; + /** request path */ + path: string; + /** content type of request body */ + type?: ContentType; + /** query params */ + query?: QueryParamsType; + /** format of response (i.e. response.json() -> format: "json") */ + format?: keyof Omit; + /** request body */ + body?: unknown; + /** base url */ + baseUrl?: string; + /** request cancellation token */ + cancelToken?: CancelToken; +} + +export type RequestParams = Omit; + +export interface ApiConfig { + baseUrl?: string; + baseApiParams?: Omit; + securityWorker?: (securityData: SecurityDataType) => RequestParams | void; +} + +export interface HttpResponse extends Response { + data: D; + error: E; +} + +type CancelToken = Symbol | string | number; + +export enum ContentType { + Json = "application/json", + FormData = "multipart/form-data", + UrlEncoded = "application/x-www-form-urlencoded", +} + +export class HttpClient { + public baseUrl: string = ""; + private securityData: SecurityDataType = null as any; + private securityWorker: null | ApiConfig["securityWorker"] = null; + private abortControllers = new Map(); + + private baseApiParams: RequestParams = { + credentials: "same-origin", + headers: {}, + redirect: "follow", + referrerPolicy: "no-referrer", + }; + + constructor(apiConfig: ApiConfig = {}) { + Object.assign(this, apiConfig); + } + + public setSecurityData = (data: SecurityDataType) => { + this.securityData = data; + }; + + private addQueryParam(query: QueryParamsType, key: string) { + const value = query[key]; + + return ( + encodeURIComponent(key) + + "=" + + encodeURIComponent(Array.isArray(value) ? value.join(",") : typeof value === "number" ? value : `${value}`) + ); + } + + protected toQueryString(rawQuery?: QueryParamsType): string { + const query = rawQuery || {}; + const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); + return keys + .map((key) => + typeof query[key] === "object" && !Array.isArray(query[key]) + ? this.toQueryString(query[key] as QueryParamsType) + : this.addQueryParam(query, key), + ) + .join("&"); + } + + protected addQueryParams(rawQuery?: QueryParamsType): string { + const queryString = this.toQueryString(rawQuery); + return queryString ? `?${queryString}` : ""; + } + + private contentFormatters: Record any> = { + [ContentType.Json]: (input: any) => + input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, + [ContentType.FormData]: (input: any) => + Object.keys(input || {}).reduce((data, key) => { + data.append(key, input[key]); + return data; + }, new FormData()), + [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), + }; + + private mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { + return { + ...this.baseApiParams, + ...params1, + ...(params2 || {}), + headers: { + ...(this.baseApiParams.headers || {}), + ...(params1.headers || {}), + ...((params2 && params2.headers) || {}), + }, + }; + } + + private createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { + if (this.abortControllers.has(cancelToken)) { + const abortController = this.abortControllers.get(cancelToken); + if (abortController) { + return abortController.signal; + } + return void 0; + } + + const abortController = new AbortController(); + this.abortControllers.set(cancelToken, abortController); + return abortController.signal; + }; + + public abortRequest = (cancelToken: CancelToken) => { + const abortController = this.abortControllers.get(cancelToken); + + if (abortController) { + abortController.abort(); + this.abortControllers.delete(cancelToken); + } + }; + + public request = ({ + body, + secure, + path, + type, + query, + format = "json", + baseUrl, + cancelToken, + ...params + }: FullRequestParams): Promise> => { + const secureParams = (secure && this.securityWorker && this.securityWorker(this.securityData)) || {}; + const requestParams = this.mergeRequestParams(params, secureParams); + const queryString = query && this.toQueryString(query); + const payloadFormatter = this.contentFormatters[type || ContentType.Json]; + + return fetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { + ...requestParams, + headers: { + ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), + ...(requestParams.headers || {}), + }, + signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, + body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), + }).then(async (response) => { + const r = response as HttpResponse; + r.data = (null as unknown) as T; + r.error = (null as unknown) as E; + + const data = await response[format]() + .then((data) => { + if (r.ok) { + r.data = data; + } else { + r.error = data; + } + return r; + }) + .catch((e) => { + r.error = e; + return r; + }); + + if (cancelToken) { + this.abortControllers.delete(cancelToken); + } + + if (!response.ok) throw data; + return data; + }); + }; +} + +/** + * @title nftadmin/authorization.proto + * @version version not set + */ +export class Api extends HttpClient { + /** + * No description + * + * @tags Query + * @name QueryAuthorization + * @summary Queries a Authorization by index. + * @request GET:/sixnft/nftadmin/authorization + */ + queryAuthorization = (params: RequestParams = {}) => + this.request({ + path: `/sixnft/nftadmin/authorization`, + method: "GET", + format: "json", + ...params, + }); + + /** + * No description + * + * @tags Query + * @name QueryParams + * @summary Parameters queries the parameters of the module. + * @request GET:/sixnft/nftadmin/params + */ + queryParams = (params: RequestParams = {}) => + this.request({ + path: `/sixnft/nftadmin/params`, + method: "GET", + format: "json", + ...params, + }); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/cosmos/base/query/v1beta1/pagination.ts new file mode 100644 index 00000000..9c87ac0c --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/cosmos/base/query/v1beta1/pagination.ts @@ -0,0 +1,328 @@ +/* eslint-disable */ +import * as Long from "long"; +import { util, configure, Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "cosmos.base.query.v1beta1"; + +/** + * PageRequest is to be embedded in gRPC request messages for efficient + * pagination. Ex: + * + * message SomeRequest { + * Foo some_parameter = 1; + * PageRequest pagination = 2; + * } + */ +export interface PageRequest { + /** + * key is a value returned in PageResponse.next_key to begin + * querying the next page most efficiently. Only one of offset or key + * should be set. + */ + key: Uint8Array; + /** + * offset is a numeric offset that can be used when key is unavailable. + * It is less efficient than using key. Only one of offset or key should + * be set. + */ + offset: number; + /** + * limit is the total number of results to be returned in the result page. + * If left empty it will default to a value to be set by each app. + */ + limit: number; + /** + * count_total is set to true to indicate that the result set should include + * a count of the total number of items available for pagination in UIs. + * count_total is only respected when offset is used. It is ignored when key + * is set. + */ + count_total: boolean; + /** + * reverse is set to true if results are to be returned in the descending order. + * + * Since: cosmos-sdk 0.43 + */ + reverse: boolean; +} + +/** + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ +export interface PageResponse { + /** + * next_key is the key to be passed to PageRequest.key to + * query the next page most efficiently + */ + next_key: Uint8Array; + /** + * total is total number of results available if PageRequest.count_total + * was set, its value is undefined otherwise + */ + total: number; +} + +const basePageRequest: object = { + offset: 0, + limit: 0, + count_total: false, + reverse: false, +}; + +export const PageRequest = { + encode(message: PageRequest, writer: Writer = Writer.create()): Writer { + if (message.key.length !== 0) { + writer.uint32(10).bytes(message.key); + } + if (message.offset !== 0) { + writer.uint32(16).uint64(message.offset); + } + if (message.limit !== 0) { + writer.uint32(24).uint64(message.limit); + } + if (message.count_total === true) { + writer.uint32(32).bool(message.count_total); + } + if (message.reverse === true) { + writer.uint32(40).bool(message.reverse); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): PageRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...basePageRequest } as PageRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.offset = longToNumber(reader.uint64() as Long); + break; + case 3: + message.limit = longToNumber(reader.uint64() as Long); + break; + case 4: + message.count_total = reader.bool(); + break; + case 5: + message.reverse = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): PageRequest { + const message = { ...basePageRequest } as PageRequest; + if (object.key !== undefined && object.key !== null) { + message.key = bytesFromBase64(object.key); + } + if (object.offset !== undefined && object.offset !== null) { + message.offset = Number(object.offset); + } else { + message.offset = 0; + } + if (object.limit !== undefined && object.limit !== null) { + message.limit = Number(object.limit); + } else { + message.limit = 0; + } + if (object.count_total !== undefined && object.count_total !== null) { + message.count_total = Boolean(object.count_total); + } else { + message.count_total = false; + } + if (object.reverse !== undefined && object.reverse !== null) { + message.reverse = Boolean(object.reverse); + } else { + message.reverse = false; + } + return message; + }, + + toJSON(message: PageRequest): unknown { + const obj: any = {}; + message.key !== undefined && + (obj.key = base64FromBytes( + message.key !== undefined ? message.key : new Uint8Array() + )); + message.offset !== undefined && (obj.offset = message.offset); + message.limit !== undefined && (obj.limit = message.limit); + message.count_total !== undefined && + (obj.count_total = message.count_total); + message.reverse !== undefined && (obj.reverse = message.reverse); + return obj; + }, + + fromPartial(object: DeepPartial): PageRequest { + const message = { ...basePageRequest } as PageRequest; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = new Uint8Array(); + } + if (object.offset !== undefined && object.offset !== null) { + message.offset = object.offset; + } else { + message.offset = 0; + } + if (object.limit !== undefined && object.limit !== null) { + message.limit = object.limit; + } else { + message.limit = 0; + } + if (object.count_total !== undefined && object.count_total !== null) { + message.count_total = object.count_total; + } else { + message.count_total = false; + } + if (object.reverse !== undefined && object.reverse !== null) { + message.reverse = object.reverse; + } else { + message.reverse = false; + } + return message; + }, +}; + +const basePageResponse: object = { total: 0 }; + +export const PageResponse = { + encode(message: PageResponse, writer: Writer = Writer.create()): Writer { + if (message.next_key.length !== 0) { + writer.uint32(10).bytes(message.next_key); + } + if (message.total !== 0) { + writer.uint32(16).uint64(message.total); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): PageResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...basePageResponse } as PageResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.next_key = reader.bytes(); + break; + case 2: + message.total = longToNumber(reader.uint64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): PageResponse { + const message = { ...basePageResponse } as PageResponse; + if (object.next_key !== undefined && object.next_key !== null) { + message.next_key = bytesFromBase64(object.next_key); + } + if (object.total !== undefined && object.total !== null) { + message.total = Number(object.total); + } else { + message.total = 0; + } + return message; + }, + + toJSON(message: PageResponse): unknown { + const obj: any = {}; + message.next_key !== undefined && + (obj.next_key = base64FromBytes( + message.next_key !== undefined ? message.next_key : new Uint8Array() + )); + message.total !== undefined && (obj.total = message.total); + return obj; + }, + + fromPartial(object: DeepPartial): PageResponse { + const message = { ...basePageResponse } as PageResponse; + if (object.next_key !== undefined && object.next_key !== null) { + message.next_key = object.next_key; + } else { + message.next_key = new Uint8Array(); + } + if (object.total !== undefined && object.total !== null) { + message.total = object.total; + } else { + message.total = 0; + } + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +const atob: (b64: string) => string = + globalThis.atob || + ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +function bytesFromBase64(b64: string): Uint8Array { + const bin = atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; +} + +const btoa: (bin: string) => string = + globalThis.btoa || + ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +function base64FromBytes(arr: Uint8Array): string { + const bin: string[] = []; + for (let i = 0; i < arr.byteLength; ++i) { + bin.push(String.fromCharCode(arr[i])); + } + return btoa(bin.join("")); +} + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/gogoproto/gogo.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/gogoproto/gogo.ts new file mode 100644 index 00000000..3f41a047 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/gogoproto/gogo.ts @@ -0,0 +1,2 @@ +/* eslint-disable */ +export const protobufPackage = "gogoproto"; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/google/api/annotations.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/google/api/annotations.ts new file mode 100644 index 00000000..aace4787 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/google/api/annotations.ts @@ -0,0 +1,2 @@ +/* eslint-disable */ +export const protobufPackage = "google.api"; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/google/api/http.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/google/api/http.ts new file mode 100644 index 00000000..ccadff68 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/google/api/http.ts @@ -0,0 +1,706 @@ +/* eslint-disable */ +import { Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "google.api"; + +/** + * Defines the HTTP configuration for an API service. It contains a list of + * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method + * to one or more HTTP REST API methods. + */ +export interface Http { + /** + * A list of HTTP configuration rules that apply to individual API methods. + * + * **NOTE:** All service configuration rules follow "last one wins" order. + */ + rules: HttpRule[]; + /** + * When set to true, URL path parmeters will be fully URI-decoded except in + * cases of single segment matches in reserved expansion, where "%2F" will be + * left encoded. + * + * The default behavior is to not decode RFC 6570 reserved characters in multi + * segment matches. + */ + fully_decode_reserved_expansion: boolean; +} + +/** + * `HttpRule` defines the mapping of an RPC method to one or more HTTP + * REST API methods. The mapping specifies how different portions of the RPC + * request message are mapped to URL path, URL query parameters, and + * HTTP request body. The mapping is typically specified as an + * `google.api.http` annotation on the RPC method, + * see "google/api/annotations.proto" for details. + * + * The mapping consists of a field specifying the path template and + * method kind. The path template can refer to fields in the request + * message, as in the example below which describes a REST GET + * operation on a resource collection of messages: + * + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; + * } + * } + * message GetMessageRequest { + * message SubMessage { + * string subfield = 1; + * } + * string message_id = 1; // mapped to the URL + * SubMessage sub = 2; // `sub.subfield` is url-mapped + * } + * message Message { + * string text = 1; // content of the resource + * } + * + * The same http annotation can alternatively be expressed inside the + * `GRPC API Configuration` YAML file. + * + * http: + * rules: + * - selector: .Messaging.GetMessage + * get: /v1/messages/{message_id}/{sub.subfield} + * + * This definition enables an automatic, bidrectional mapping of HTTP + * JSON to RPC. Example: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` + * + * In general, not only fields but also field paths can be referenced + * from a path pattern. Fields mapped to the path pattern cannot be + * repeated and must have a primitive (non-message) type. + * + * Any fields in the request message which are not bound by the path + * pattern automatically become (optional) HTTP query + * parameters. Assume the following definition of the request message: + * + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http).get = "/v1/messages/{message_id}"; + * } + * } + * message GetMessageRequest { + * message SubMessage { + * string subfield = 1; + * } + * string message_id = 1; // mapped to the URL + * int64 revision = 2; // becomes a parameter + * SubMessage sub = 3; // `sub.subfield` becomes a parameter + * } + * + * + * This enables a HTTP JSON to RPC mapping as below: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` + * + * Note that fields which are mapped to HTTP parameters must have a + * primitive type or a repeated primitive type. Message types are not + * allowed. In the case of a repeated type, the parameter can be + * repeated in the URL, as in `...?param=A¶m=B`. + * + * For HTTP method kinds which allow a request body, the `body` field + * specifies the mapping. Consider a REST update method on the + * message resource collection: + * + * + * service Messaging { + * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { + * option (google.api.http) = { + * put: "/v1/messages/{message_id}" + * body: "message" + * }; + * } + * } + * message UpdateMessageRequest { + * string message_id = 1; // mapped to the URL + * Message message = 2; // mapped to the body + * } + * + * + * The following HTTP JSON to RPC mapping is enabled, where the + * representation of the JSON in the request body is determined by + * protos JSON encoding: + * + * HTTP | RPC + * -----|----- + * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` + * + * The special name `*` can be used in the body mapping to define that + * every field not bound by the path template should be mapped to the + * request body. This enables the following alternative definition of + * the update method: + * + * service Messaging { + * rpc UpdateMessage(Message) returns (Message) { + * option (google.api.http) = { + * put: "/v1/messages/{message_id}" + * body: "*" + * }; + * } + * } + * message Message { + * string message_id = 1; + * string text = 2; + * } + * + * + * The following HTTP JSON to RPC mapping is enabled: + * + * HTTP | RPC + * -----|----- + * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` + * + * Note that when using `*` in the body mapping, it is not possible to + * have HTTP parameters, as all fields not bound by the path end in + * the body. This makes this option more rarely used in practice of + * defining REST APIs. The common usage of `*` is in custom methods + * which don't use the URL at all for transferring data. + * + * It is possible to define multiple HTTP methods for one RPC by using + * the `additional_bindings` option. Example: + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { + * get: "/v1/messages/{message_id}" + * additional_bindings { + * get: "/v1/users/{user_id}/messages/{message_id}" + * } + * }; + * } + * } + * message GetMessageRequest { + * string message_id = 1; + * string user_id = 2; + * } + * + * + * This enables the following two alternative HTTP JSON to RPC + * mappings: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` + * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` + * + * # Rules for HTTP mapping + * + * The rules for mapping HTTP path, query parameters, and body fields + * to the request message are as follows: + * + * 1. The `body` field specifies either `*` or a field path, or is + * omitted. If omitted, it indicates there is no HTTP request body. + * 2. Leaf fields (recursive expansion of nested messages in the + * request) can be classified into three types: + * (a) Matched in the URL template. + * (b) Covered by body (if body is `*`, everything except (a) fields; + * else everything under the body field) + * (c) All other fields. + * 3. URL query parameters found in the HTTP request are mapped to (c) fields. + * 4. Any body sent with an HTTP request can contain only (b) fields. + * + * The syntax of the path template is as follows: + * + * Template = "/" Segments [ Verb ] ; + * Segments = Segment { "/" Segment } ; + * Segment = "*" | "**" | LITERAL | Variable ; + * Variable = "{" FieldPath [ "=" Segments ] "}" ; + * FieldPath = IDENT { "." IDENT } ; + * Verb = ":" LITERAL ; + * + * The syntax `*` matches a single path segment. The syntax `**` matches zero + * or more path segments, which must be the last part of the path except the + * `Verb`. The syntax `LITERAL` matches literal text in the path. + * + * The syntax `Variable` matches part of the URL path as specified by its + * template. A variable template must not contain other variables. If a variable + * matches a single path segment, its template may be omitted, e.g. `{var}` + * is equivalent to `{var=*}`. + * + * If a variable contains exactly one path segment, such as `"{var}"` or + * `"{var=*}"`, when such a variable is expanded into a URL path, all characters + * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the + * Discovery Document as `{var}`. + * + * If a variable contains one or more path segments, such as `"{var=foo/*}"` + * or `"{var=**}"`, when such a variable is expanded into a URL path, all + * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables + * show up in the Discovery Document as `{+var}`. + * + * NOTE: While the single segment variable matches the semantics of + * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 + * Simple String Expansion, the multi segment variable **does not** match + * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion + * does not expand special characters like `?` and `#`, which would lead + * to invalid URLs. + * + * NOTE: the field paths in variables and in the `body` must not refer to + * repeated fields or map fields. + */ +export interface HttpRule { + /** + * Selects methods to which this rule applies. + * + * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + */ + selector: string; + /** Used for listing and getting information about resources. */ + get: string | undefined; + /** Used for updating a resource. */ + put: string | undefined; + /** Used for creating a resource. */ + post: string | undefined; + /** Used for deleting a resource. */ + delete: string | undefined; + /** Used for updating a resource. */ + patch: string | undefined; + /** + * The custom pattern is used for specifying an HTTP method that is not + * included in the `pattern` field, such as HEAD, or "*" to leave the + * HTTP method unspecified for this rule. The wild-card rule is useful + * for services that provide content to Web (HTML) clients. + */ + custom: CustomHttpPattern | undefined; + /** + * The name of the request field whose value is mapped to the HTTP body, or + * `*` for mapping all fields not captured by the path pattern to the HTTP + * body. NOTE: the referred field must not be a repeated field and must be + * present at the top-level of request message type. + */ + body: string; + /** + * Optional. The name of the response field whose value is mapped to the HTTP + * body of response. Other response fields are ignored. When + * not set, the response message will be used as HTTP body of response. + */ + response_body: string; + /** + * Additional HTTP bindings for the selector. Nested bindings must + * not contain an `additional_bindings` field themselves (that is, + * the nesting may only be one level deep). + */ + additional_bindings: HttpRule[]; +} + +/** A custom pattern is used for defining custom HTTP verb. */ +export interface CustomHttpPattern { + /** The name of this custom HTTP verb. */ + kind: string; + /** The path matched by this custom verb. */ + path: string; +} + +const baseHttp: object = { fully_decode_reserved_expansion: false }; + +export const Http = { + encode(message: Http, writer: Writer = Writer.create()): Writer { + for (const v of message.rules) { + HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.fully_decode_reserved_expansion === true) { + writer.uint32(16).bool(message.fully_decode_reserved_expansion); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): Http { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseHttp } as Http; + message.rules = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rules.push(HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fully_decode_reserved_expansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): Http { + const message = { ...baseHttp } as Http; + message.rules = []; + if (object.rules !== undefined && object.rules !== null) { + for (const e of object.rules) { + message.rules.push(HttpRule.fromJSON(e)); + } + } + if ( + object.fully_decode_reserved_expansion !== undefined && + object.fully_decode_reserved_expansion !== null + ) { + message.fully_decode_reserved_expansion = Boolean( + object.fully_decode_reserved_expansion + ); + } else { + message.fully_decode_reserved_expansion = false; + } + return message; + }, + + toJSON(message: Http): unknown { + const obj: any = {}; + if (message.rules) { + obj.rules = message.rules.map((e) => + e ? HttpRule.toJSON(e) : undefined + ); + } else { + obj.rules = []; + } + message.fully_decode_reserved_expansion !== undefined && + (obj.fully_decode_reserved_expansion = + message.fully_decode_reserved_expansion); + return obj; + }, + + fromPartial(object: DeepPartial): Http { + const message = { ...baseHttp } as Http; + message.rules = []; + if (object.rules !== undefined && object.rules !== null) { + for (const e of object.rules) { + message.rules.push(HttpRule.fromPartial(e)); + } + } + if ( + object.fully_decode_reserved_expansion !== undefined && + object.fully_decode_reserved_expansion !== null + ) { + message.fully_decode_reserved_expansion = + object.fully_decode_reserved_expansion; + } else { + message.fully_decode_reserved_expansion = false; + } + return message; + }, +}; + +const baseHttpRule: object = { selector: "", body: "", response_body: "" }; + +export const HttpRule = { + encode(message: HttpRule, writer: Writer = Writer.create()): Writer { + if (message.selector !== "") { + writer.uint32(10).string(message.selector); + } + if (message.get !== undefined) { + writer.uint32(18).string(message.get); + } + if (message.put !== undefined) { + writer.uint32(26).string(message.put); + } + if (message.post !== undefined) { + writer.uint32(34).string(message.post); + } + if (message.delete !== undefined) { + writer.uint32(42).string(message.delete); + } + if (message.patch !== undefined) { + writer.uint32(50).string(message.patch); + } + if (message.custom !== undefined) { + CustomHttpPattern.encode( + message.custom, + writer.uint32(66).fork() + ).ldelim(); + } + if (message.body !== "") { + writer.uint32(58).string(message.body); + } + if (message.response_body !== "") { + writer.uint32(98).string(message.response_body); + } + for (const v of message.additional_bindings) { + HttpRule.encode(v!, writer.uint32(90).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): HttpRule { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseHttpRule } as HttpRule; + message.additional_bindings = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message.delete = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.response_body = reader.string(); + break; + case 11: + message.additional_bindings.push( + HttpRule.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): HttpRule { + const message = { ...baseHttpRule } as HttpRule; + message.additional_bindings = []; + if (object.selector !== undefined && object.selector !== null) { + message.selector = String(object.selector); + } else { + message.selector = ""; + } + if (object.get !== undefined && object.get !== null) { + message.get = String(object.get); + } else { + message.get = undefined; + } + if (object.put !== undefined && object.put !== null) { + message.put = String(object.put); + } else { + message.put = undefined; + } + if (object.post !== undefined && object.post !== null) { + message.post = String(object.post); + } else { + message.post = undefined; + } + if (object.delete !== undefined && object.delete !== null) { + message.delete = String(object.delete); + } else { + message.delete = undefined; + } + if (object.patch !== undefined && object.patch !== null) { + message.patch = String(object.patch); + } else { + message.patch = undefined; + } + if (object.custom !== undefined && object.custom !== null) { + message.custom = CustomHttpPattern.fromJSON(object.custom); + } else { + message.custom = undefined; + } + if (object.body !== undefined && object.body !== null) { + message.body = String(object.body); + } else { + message.body = ""; + } + if (object.response_body !== undefined && object.response_body !== null) { + message.response_body = String(object.response_body); + } else { + message.response_body = ""; + } + if ( + object.additional_bindings !== undefined && + object.additional_bindings !== null + ) { + for (const e of object.additional_bindings) { + message.additional_bindings.push(HttpRule.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: HttpRule): unknown { + const obj: any = {}; + message.selector !== undefined && (obj.selector = message.selector); + message.get !== undefined && (obj.get = message.get); + message.put !== undefined && (obj.put = message.put); + message.post !== undefined && (obj.post = message.post); + message.delete !== undefined && (obj.delete = message.delete); + message.patch !== undefined && (obj.patch = message.patch); + message.custom !== undefined && + (obj.custom = message.custom + ? CustomHttpPattern.toJSON(message.custom) + : undefined); + message.body !== undefined && (obj.body = message.body); + message.response_body !== undefined && + (obj.response_body = message.response_body); + if (message.additional_bindings) { + obj.additional_bindings = message.additional_bindings.map((e) => + e ? HttpRule.toJSON(e) : undefined + ); + } else { + obj.additional_bindings = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): HttpRule { + const message = { ...baseHttpRule } as HttpRule; + message.additional_bindings = []; + if (object.selector !== undefined && object.selector !== null) { + message.selector = object.selector; + } else { + message.selector = ""; + } + if (object.get !== undefined && object.get !== null) { + message.get = object.get; + } else { + message.get = undefined; + } + if (object.put !== undefined && object.put !== null) { + message.put = object.put; + } else { + message.put = undefined; + } + if (object.post !== undefined && object.post !== null) { + message.post = object.post; + } else { + message.post = undefined; + } + if (object.delete !== undefined && object.delete !== null) { + message.delete = object.delete; + } else { + message.delete = undefined; + } + if (object.patch !== undefined && object.patch !== null) { + message.patch = object.patch; + } else { + message.patch = undefined; + } + if (object.custom !== undefined && object.custom !== null) { + message.custom = CustomHttpPattern.fromPartial(object.custom); + } else { + message.custom = undefined; + } + if (object.body !== undefined && object.body !== null) { + message.body = object.body; + } else { + message.body = ""; + } + if (object.response_body !== undefined && object.response_body !== null) { + message.response_body = object.response_body; + } else { + message.response_body = ""; + } + if ( + object.additional_bindings !== undefined && + object.additional_bindings !== null + ) { + for (const e of object.additional_bindings) { + message.additional_bindings.push(HttpRule.fromPartial(e)); + } + } + return message; + }, +}; + +const baseCustomHttpPattern: object = { kind: "", path: "" }; + +export const CustomHttpPattern = { + encode(message: CustomHttpPattern, writer: Writer = Writer.create()): Writer { + if (message.kind !== "") { + writer.uint32(10).string(message.kind); + } + if (message.path !== "") { + writer.uint32(18).string(message.path); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): CustomHttpPattern { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseCustomHttpPattern } as CustomHttpPattern; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): CustomHttpPattern { + const message = { ...baseCustomHttpPattern } as CustomHttpPattern; + if (object.kind !== undefined && object.kind !== null) { + message.kind = String(object.kind); + } else { + message.kind = ""; + } + if (object.path !== undefined && object.path !== null) { + message.path = String(object.path); + } else { + message.path = ""; + } + return message; + }, + + toJSON(message: CustomHttpPattern): unknown { + const obj: any = {}; + message.kind !== undefined && (obj.kind = message.kind); + message.path !== undefined && (obj.path = message.path); + return obj; + }, + + fromPartial(object: DeepPartial): CustomHttpPattern { + const message = { ...baseCustomHttpPattern } as CustomHttpPattern; + if (object.kind !== undefined && object.kind !== null) { + message.kind = object.kind; + } else { + message.kind = ""; + } + if (object.path !== undefined && object.path !== null) { + message.path = object.path; + } else { + message.path = ""; + } + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/google/protobuf/descriptor.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/google/protobuf/descriptor.ts new file mode 100644 index 00000000..a0167cb2 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/google/protobuf/descriptor.ts @@ -0,0 +1,5314 @@ +/* eslint-disable */ +import * as Long from "long"; +import { util, configure, Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "google.protobuf"; + +/** + * The protocol compiler can output a FileDescriptorSet containing the .proto + * files it parses. + */ +export interface FileDescriptorSet { + file: FileDescriptorProto[]; +} + +/** Describes a complete .proto file. */ +export interface FileDescriptorProto { + /** file name, relative to root of source tree */ + name: string; + /** e.g. "foo", "foo.bar", etc. */ + package: string; + /** Names of files imported by this file. */ + dependency: string[]; + /** Indexes of the public imported files in the dependency list above. */ + public_dependency: number[]; + /** + * Indexes of the weak imported files in the dependency list. + * For Google-internal migration only. Do not use. + */ + weak_dependency: number[]; + /** All top-level definitions in this file. */ + message_type: DescriptorProto[]; + enum_type: EnumDescriptorProto[]; + service: ServiceDescriptorProto[]; + extension: FieldDescriptorProto[]; + options: FileOptions | undefined; + /** + * This field contains optional information about the original source code. + * You may safely remove this entire field without harming runtime + * functionality of the descriptors -- the information is needed only by + * development tools. + */ + source_code_info: SourceCodeInfo | undefined; + /** + * The syntax of the proto file. + * The supported values are "proto2" and "proto3". + */ + syntax: string; +} + +/** Describes a message type. */ +export interface DescriptorProto { + name: string; + field: FieldDescriptorProto[]; + extension: FieldDescriptorProto[]; + nested_type: DescriptorProto[]; + enum_type: EnumDescriptorProto[]; + extension_range: DescriptorProto_ExtensionRange[]; + oneof_decl: OneofDescriptorProto[]; + options: MessageOptions | undefined; + reserved_range: DescriptorProto_ReservedRange[]; + /** + * Reserved field names, which may not be used by fields in the same message. + * A given name may only be reserved once. + */ + reserved_name: string[]; +} + +export interface DescriptorProto_ExtensionRange { + /** Inclusive. */ + start: number; + /** Exclusive. */ + end: number; + options: ExtensionRangeOptions | undefined; +} + +/** + * Range of reserved tag numbers. Reserved tag numbers may not be used by + * fields or extension ranges in the same message. Reserved ranges may + * not overlap. + */ +export interface DescriptorProto_ReservedRange { + /** Inclusive. */ + start: number; + /** Exclusive. */ + end: number; +} + +export interface ExtensionRangeOptions { + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +/** Describes a field within a message. */ +export interface FieldDescriptorProto { + name: string; + number: number; + label: FieldDescriptorProto_Label; + /** + * If type_name is set, this need not be set. If both this and type_name + * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + */ + type: FieldDescriptorProto_Type; + /** + * For message and enum types, this is the name of the type. If the name + * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + * rules are used to find the type (i.e. first the nested types within this + * message are searched, then within the parent, on up to the root + * namespace). + */ + type_name: string; + /** + * For extensions, this is the name of the type being extended. It is + * resolved in the same manner as type_name. + */ + extendee: string; + /** + * For numeric types, contains the original text representation of the value. + * For booleans, "true" or "false". + * For strings, contains the default text contents (not escaped in any way). + * For bytes, contains the C escaped value. All bytes >= 128 are escaped. + * TODO(kenton): Base-64 encode? + */ + default_value: string; + /** + * If set, gives the index of a oneof in the containing type's oneof_decl + * list. This field is a member of that oneof. + */ + oneof_index: number; + /** + * JSON name of this field. The value is set by protocol compiler. If the + * user has set a "json_name" option on this field, that option's value + * will be used. Otherwise, it's deduced from the field's name by converting + * it to camelCase. + */ + json_name: string; + options: FieldOptions | undefined; + /** + * If true, this is a proto3 "optional". When a proto3 field is optional, it + * tracks presence regardless of field type. + * + * When proto3_optional is true, this field must be belong to a oneof to + * signal to old proto3 clients that presence is tracked for this field. This + * oneof is known as a "synthetic" oneof, and this field must be its sole + * member (each proto3 optional field gets its own synthetic oneof). Synthetic + * oneofs exist in the descriptor only, and do not generate any API. Synthetic + * oneofs must be ordered after all "real" oneofs. + * + * For message fields, proto3_optional doesn't create any semantic change, + * since non-repeated message fields always track presence. However it still + * indicates the semantic detail of whether the user wrote "optional" or not. + * This can be useful for round-tripping the .proto file. For consistency we + * give message fields a synthetic oneof also, even though it is not required + * to track presence. This is especially important because the parser can't + * tell if a field is a message or an enum, so it must always create a + * synthetic oneof. + * + * Proto2 optional fields do not set this flag, because they already indicate + * optional with `LABEL_OPTIONAL`. + */ + proto3_optional: boolean; +} + +export enum FieldDescriptorProto_Type { + /** + * TYPE_DOUBLE - 0 is reserved for errors. + * Order is weird for historical reasons. + */ + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + /** + * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + * negative values are likely. + */ + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + /** + * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + * negative values are likely. + */ + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + /** + * TYPE_GROUP - Tag-delimited aggregate. + * Group type is deprecated and not supported in proto3. However, Proto3 + * implementations should still be able to parse the group wire format and + * treat group fields as unknown fields. + */ + TYPE_GROUP = 10, + /** TYPE_MESSAGE - Length-delimited aggregate. */ + TYPE_MESSAGE = 11, + /** TYPE_BYTES - New in version 2. */ + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + /** TYPE_SINT32 - Uses ZigZag encoding. */ + TYPE_SINT32 = 17, + /** TYPE_SINT64 - Uses ZigZag encoding. */ + TYPE_SINT64 = 18, + UNRECOGNIZED = -1, +} + +export function fieldDescriptorProto_TypeFromJSON( + object: any +): FieldDescriptorProto_Type { + switch (object) { + case 1: + case "TYPE_DOUBLE": + return FieldDescriptorProto_Type.TYPE_DOUBLE; + case 2: + case "TYPE_FLOAT": + return FieldDescriptorProto_Type.TYPE_FLOAT; + case 3: + case "TYPE_INT64": + return FieldDescriptorProto_Type.TYPE_INT64; + case 4: + case "TYPE_UINT64": + return FieldDescriptorProto_Type.TYPE_UINT64; + case 5: + case "TYPE_INT32": + return FieldDescriptorProto_Type.TYPE_INT32; + case 6: + case "TYPE_FIXED64": + return FieldDescriptorProto_Type.TYPE_FIXED64; + case 7: + case "TYPE_FIXED32": + return FieldDescriptorProto_Type.TYPE_FIXED32; + case 8: + case "TYPE_BOOL": + return FieldDescriptorProto_Type.TYPE_BOOL; + case 9: + case "TYPE_STRING": + return FieldDescriptorProto_Type.TYPE_STRING; + case 10: + case "TYPE_GROUP": + return FieldDescriptorProto_Type.TYPE_GROUP; + case 11: + case "TYPE_MESSAGE": + return FieldDescriptorProto_Type.TYPE_MESSAGE; + case 12: + case "TYPE_BYTES": + return FieldDescriptorProto_Type.TYPE_BYTES; + case 13: + case "TYPE_UINT32": + return FieldDescriptorProto_Type.TYPE_UINT32; + case 14: + case "TYPE_ENUM": + return FieldDescriptorProto_Type.TYPE_ENUM; + case 15: + case "TYPE_SFIXED32": + return FieldDescriptorProto_Type.TYPE_SFIXED32; + case 16: + case "TYPE_SFIXED64": + return FieldDescriptorProto_Type.TYPE_SFIXED64; + case 17: + case "TYPE_SINT32": + return FieldDescriptorProto_Type.TYPE_SINT32; + case 18: + case "TYPE_SINT64": + return FieldDescriptorProto_Type.TYPE_SINT64; + case -1: + case "UNRECOGNIZED": + default: + return FieldDescriptorProto_Type.UNRECOGNIZED; + } +} + +export function fieldDescriptorProto_TypeToJSON( + object: FieldDescriptorProto_Type +): string { + switch (object) { + case FieldDescriptorProto_Type.TYPE_DOUBLE: + return "TYPE_DOUBLE"; + case FieldDescriptorProto_Type.TYPE_FLOAT: + return "TYPE_FLOAT"; + case FieldDescriptorProto_Type.TYPE_INT64: + return "TYPE_INT64"; + case FieldDescriptorProto_Type.TYPE_UINT64: + return "TYPE_UINT64"; + case FieldDescriptorProto_Type.TYPE_INT32: + return "TYPE_INT32"; + case FieldDescriptorProto_Type.TYPE_FIXED64: + return "TYPE_FIXED64"; + case FieldDescriptorProto_Type.TYPE_FIXED32: + return "TYPE_FIXED32"; + case FieldDescriptorProto_Type.TYPE_BOOL: + return "TYPE_BOOL"; + case FieldDescriptorProto_Type.TYPE_STRING: + return "TYPE_STRING"; + case FieldDescriptorProto_Type.TYPE_GROUP: + return "TYPE_GROUP"; + case FieldDescriptorProto_Type.TYPE_MESSAGE: + return "TYPE_MESSAGE"; + case FieldDescriptorProto_Type.TYPE_BYTES: + return "TYPE_BYTES"; + case FieldDescriptorProto_Type.TYPE_UINT32: + return "TYPE_UINT32"; + case FieldDescriptorProto_Type.TYPE_ENUM: + return "TYPE_ENUM"; + case FieldDescriptorProto_Type.TYPE_SFIXED32: + return "TYPE_SFIXED32"; + case FieldDescriptorProto_Type.TYPE_SFIXED64: + return "TYPE_SFIXED64"; + case FieldDescriptorProto_Type.TYPE_SINT32: + return "TYPE_SINT32"; + case FieldDescriptorProto_Type.TYPE_SINT64: + return "TYPE_SINT64"; + default: + return "UNKNOWN"; + } +} + +export enum FieldDescriptorProto_Label { + /** LABEL_OPTIONAL - 0 is reserved for errors */ + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3, + UNRECOGNIZED = -1, +} + +export function fieldDescriptorProto_LabelFromJSON( + object: any +): FieldDescriptorProto_Label { + switch (object) { + case 1: + case "LABEL_OPTIONAL": + return FieldDescriptorProto_Label.LABEL_OPTIONAL; + case 2: + case "LABEL_REQUIRED": + return FieldDescriptorProto_Label.LABEL_REQUIRED; + case 3: + case "LABEL_REPEATED": + return FieldDescriptorProto_Label.LABEL_REPEATED; + case -1: + case "UNRECOGNIZED": + default: + return FieldDescriptorProto_Label.UNRECOGNIZED; + } +} + +export function fieldDescriptorProto_LabelToJSON( + object: FieldDescriptorProto_Label +): string { + switch (object) { + case FieldDescriptorProto_Label.LABEL_OPTIONAL: + return "LABEL_OPTIONAL"; + case FieldDescriptorProto_Label.LABEL_REQUIRED: + return "LABEL_REQUIRED"; + case FieldDescriptorProto_Label.LABEL_REPEATED: + return "LABEL_REPEATED"; + default: + return "UNKNOWN"; + } +} + +/** Describes a oneof. */ +export interface OneofDescriptorProto { + name: string; + options: OneofOptions | undefined; +} + +/** Describes an enum type. */ +export interface EnumDescriptorProto { + name: string; + value: EnumValueDescriptorProto[]; + options: EnumOptions | undefined; + /** + * Range of reserved numeric values. Reserved numeric values may not be used + * by enum values in the same enum declaration. Reserved ranges may not + * overlap. + */ + reserved_range: EnumDescriptorProto_EnumReservedRange[]; + /** + * Reserved enum value names, which may not be reused. A given name may only + * be reserved once. + */ + reserved_name: string[]; +} + +/** + * Range of reserved numeric values. Reserved values may not be used by + * entries in the same enum. Reserved ranges may not overlap. + * + * Note that this is distinct from DescriptorProto.ReservedRange in that it + * is inclusive such that it can appropriately represent the entire int32 + * domain. + */ +export interface EnumDescriptorProto_EnumReservedRange { + /** Inclusive. */ + start: number; + /** Inclusive. */ + end: number; +} + +/** Describes a value within an enum. */ +export interface EnumValueDescriptorProto { + name: string; + number: number; + options: EnumValueOptions | undefined; +} + +/** Describes a service. */ +export interface ServiceDescriptorProto { + name: string; + method: MethodDescriptorProto[]; + options: ServiceOptions | undefined; +} + +/** Describes a method of a service. */ +export interface MethodDescriptorProto { + name: string; + /** + * Input and output type names. These are resolved in the same way as + * FieldDescriptorProto.type_name, but must refer to a message type. + */ + input_type: string; + output_type: string; + options: MethodOptions | undefined; + /** Identifies if client streams multiple client messages */ + client_streaming: boolean; + /** Identifies if server streams multiple server messages */ + server_streaming: boolean; +} + +export interface FileOptions { + /** + * Sets the Java package where classes generated from this .proto will be + * placed. By default, the proto package is used, but this is often + * inappropriate because proto packages do not normally start with backwards + * domain names. + */ + java_package: string; + /** + * Controls the name of the wrapper Java class generated for the .proto file. + * That class will always contain the .proto file's getDescriptor() method as + * well as any top-level extensions defined in the .proto file. + * If java_multiple_files is disabled, then all the other classes from the + * .proto file will be nested inside the single wrapper outer class. + */ + java_outer_classname: string; + /** + * If enabled, then the Java code generator will generate a separate .java + * file for each top-level message, enum, and service defined in the .proto + * file. Thus, these types will *not* be nested inside the wrapper class + * named by java_outer_classname. However, the wrapper class will still be + * generated to contain the file's getDescriptor() method as well as any + * top-level extensions defined in the file. + */ + java_multiple_files: boolean; + /** + * This option does nothing. + * + * @deprecated + */ + java_generate_equals_and_hash: boolean; + /** + * If set true, then the Java2 code generator will generate code that + * throws an exception whenever an attempt is made to assign a non-UTF-8 + * byte sequence to a string field. + * Message reflection will do the same. + * However, an extension field still accepts non-UTF-8 byte sequences. + * This option has no effect on when used with the lite runtime. + */ + java_string_check_utf8: boolean; + optimize_for: FileOptions_OptimizeMode; + /** + * Sets the Go package where structs generated from this .proto will be + * placed. If omitted, the Go package will be derived from the following: + * - The basename of the package import path, if provided. + * - Otherwise, the package statement in the .proto file, if present. + * - Otherwise, the basename of the .proto file, without extension. + */ + go_package: string; + /** + * Should generic services be generated in each language? "Generic" services + * are not specific to any particular RPC system. They are generated by the + * main code generators in each language (without additional plugins). + * Generic services were the only kind of service generation supported by + * early versions of google.protobuf. + * + * Generic services are now considered deprecated in favor of using plugins + * that generate code specific to your particular RPC system. Therefore, + * these default to false. Old code which depends on generic services should + * explicitly set them to true. + */ + cc_generic_services: boolean; + java_generic_services: boolean; + py_generic_services: boolean; + php_generic_services: boolean; + /** + * Is this file deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for everything in the file, or it will be completely ignored; in the very + * least, this is a formalization for deprecating files. + */ + deprecated: boolean; + /** + * Enables the use of arenas for the proto messages in this file. This applies + * only to generated classes for C++. + */ + cc_enable_arenas: boolean; + /** + * Sets the objective c class prefix which is prepended to all objective c + * generated classes from this .proto. There is no default. + */ + objc_class_prefix: string; + /** Namespace for generated classes; defaults to the package. */ + csharp_namespace: string; + /** + * By default Swift generators will take the proto package and CamelCase it + * replacing '.' with underscore and use that to prefix the types/symbols + * defined. When this options is provided, they will use this value instead + * to prefix the types/symbols defined. + */ + swift_prefix: string; + /** + * Sets the php class prefix which is prepended to all php generated classes + * from this .proto. Default is empty. + */ + php_class_prefix: string; + /** + * Use this option to change the namespace of php generated classes. Default + * is empty. When this option is empty, the package name will be used for + * determining the namespace. + */ + php_namespace: string; + /** + * Use this option to change the namespace of php generated metadata classes. + * Default is empty. When this option is empty, the proto file name will be + * used for determining the namespace. + */ + php_metadata_namespace: string; + /** + * Use this option to change the package of ruby generated classes. Default + * is empty. When this option is not set, the package name will be used for + * determining the ruby package. + */ + ruby_package: string; + /** + * The parser stores options it doesn't recognize here. + * See the documentation for the "Options" section above. + */ + uninterpreted_option: UninterpretedOption[]; +} + +/** Generated classes can be optimized for speed or code size. */ +export enum FileOptions_OptimizeMode { + /** SPEED - Generate complete code for parsing, serialization, */ + SPEED = 1, + /** CODE_SIZE - etc. */ + CODE_SIZE = 2, + /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ + LITE_RUNTIME = 3, + UNRECOGNIZED = -1, +} + +export function fileOptions_OptimizeModeFromJSON( + object: any +): FileOptions_OptimizeMode { + switch (object) { + case 1: + case "SPEED": + return FileOptions_OptimizeMode.SPEED; + case 2: + case "CODE_SIZE": + return FileOptions_OptimizeMode.CODE_SIZE; + case 3: + case "LITE_RUNTIME": + return FileOptions_OptimizeMode.LITE_RUNTIME; + case -1: + case "UNRECOGNIZED": + default: + return FileOptions_OptimizeMode.UNRECOGNIZED; + } +} + +export function fileOptions_OptimizeModeToJSON( + object: FileOptions_OptimizeMode +): string { + switch (object) { + case FileOptions_OptimizeMode.SPEED: + return "SPEED"; + case FileOptions_OptimizeMode.CODE_SIZE: + return "CODE_SIZE"; + case FileOptions_OptimizeMode.LITE_RUNTIME: + return "LITE_RUNTIME"; + default: + return "UNKNOWN"; + } +} + +export interface MessageOptions { + /** + * Set true to use the old proto1 MessageSet wire format for extensions. + * This is provided for backwards-compatibility with the MessageSet wire + * format. You should not use this for any other reason: It's less + * efficient, has fewer features, and is more complicated. + * + * The message must be defined exactly as follows: + * message Foo { + * option message_set_wire_format = true; + * extensions 4 to max; + * } + * Note that the message cannot have any defined fields; MessageSets only + * have extensions. + * + * All extensions of your type must be singular messages; e.g. they cannot + * be int32s, enums, or repeated messages. + * + * Because this is an option, the above two restrictions are not enforced by + * the protocol compiler. + */ + message_set_wire_format: boolean; + /** + * Disables the generation of the standard "descriptor()" accessor, which can + * conflict with a field of the same name. This is meant to make migration + * from proto1 easier; new code should avoid fields named "descriptor". + */ + no_standard_descriptor_accessor: boolean; + /** + * Is this message deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the message, or it will be completely ignored; in the very least, + * this is a formalization for deprecating messages. + */ + deprecated: boolean; + /** + * Whether the message is an automatically generated map entry type for the + * maps field. + * + * For maps fields: + * map map_field = 1; + * The parsed descriptor looks like: + * message MapFieldEntry { + * option map_entry = true; + * optional KeyType key = 1; + * optional ValueType value = 2; + * } + * repeated MapFieldEntry map_field = 1; + * + * Implementations may choose not to generate the map_entry=true message, but + * use a native map in the target language to hold the keys and values. + * The reflection APIs in such implementations still need to work as + * if the field is a repeated message field. + * + * NOTE: Do not set the option in .proto files. Always use the maps syntax + * instead. The option should only be implicitly set by the proto compiler + * parser. + */ + map_entry: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface FieldOptions { + /** + * The ctype option instructs the C++ code generator to use a different + * representation of the field than it normally would. See the specific + * options below. This option is not yet implemented in the open source + * release -- sorry, we'll try to include it in a future version! + */ + ctype: FieldOptions_CType; + /** + * The packed option can be enabled for repeated primitive fields to enable + * a more efficient representation on the wire. Rather than repeatedly + * writing the tag and type for each element, the entire array is encoded as + * a single length-delimited blob. In proto3, only explicit setting it to + * false will avoid using packed encoding. + */ + packed: boolean; + /** + * The jstype option determines the JavaScript type used for values of the + * field. The option is permitted only for 64 bit integral and fixed types + * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + * is represented as JavaScript string, which avoids loss of precision that + * can happen when a large value is converted to a floating point JavaScript. + * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + * use the JavaScript "number" type. The behavior of the default option + * JS_NORMAL is implementation dependent. + * + * This option is an enum to permit additional types to be added, e.g. + * goog.math.Integer. + */ + jstype: FieldOptions_JSType; + /** + * Should this field be parsed lazily? Lazy applies only to message-type + * fields. It means that when the outer message is initially parsed, the + * inner message's contents will not be parsed but instead stored in encoded + * form. The inner message will actually be parsed when it is first accessed. + * + * This is only a hint. Implementations are free to choose whether to use + * eager or lazy parsing regardless of the value of this option. However, + * setting this option true suggests that the protocol author believes that + * using lazy parsing on this field is worth the additional bookkeeping + * overhead typically needed to implement it. + * + * This option does not affect the public interface of any generated code; + * all method signatures remain the same. Furthermore, thread-safety of the + * interface is not affected by this option; const methods remain safe to + * call from multiple threads concurrently, while non-const methods continue + * to require exclusive access. + * + * + * Note that implementations may choose not to check required fields within + * a lazy sub-message. That is, calling IsInitialized() on the outer message + * may return true even if the inner message has missing required fields. + * This is necessary because otherwise the inner message would have to be + * parsed in order to perform the check, defeating the purpose of lazy + * parsing. An implementation which chooses not to check required fields + * must be consistent about it. That is, for any particular sub-message, the + * implementation must either *always* check its required fields, or *never* + * check its required fields, regardless of whether or not the message has + * been parsed. + */ + lazy: boolean; + /** + * Is this field deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for accessors, or it will be completely ignored; in the very least, this + * is a formalization for deprecating fields. + */ + deprecated: boolean; + /** For Google-internal migration only. Do not use. */ + weak: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export enum FieldOptions_CType { + /** STRING - Default mode. */ + STRING = 0, + CORD = 1, + STRING_PIECE = 2, + UNRECOGNIZED = -1, +} + +export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { + switch (object) { + case 0: + case "STRING": + return FieldOptions_CType.STRING; + case 1: + case "CORD": + return FieldOptions_CType.CORD; + case 2: + case "STRING_PIECE": + return FieldOptions_CType.STRING_PIECE; + case -1: + case "UNRECOGNIZED": + default: + return FieldOptions_CType.UNRECOGNIZED; + } +} + +export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { + switch (object) { + case FieldOptions_CType.STRING: + return "STRING"; + case FieldOptions_CType.CORD: + return "CORD"; + case FieldOptions_CType.STRING_PIECE: + return "STRING_PIECE"; + default: + return "UNKNOWN"; + } +} + +export enum FieldOptions_JSType { + /** JS_NORMAL - Use the default type. */ + JS_NORMAL = 0, + /** JS_STRING - Use JavaScript strings. */ + JS_STRING = 1, + /** JS_NUMBER - Use JavaScript numbers. */ + JS_NUMBER = 2, + UNRECOGNIZED = -1, +} + +export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { + switch (object) { + case 0: + case "JS_NORMAL": + return FieldOptions_JSType.JS_NORMAL; + case 1: + case "JS_STRING": + return FieldOptions_JSType.JS_STRING; + case 2: + case "JS_NUMBER": + return FieldOptions_JSType.JS_NUMBER; + case -1: + case "UNRECOGNIZED": + default: + return FieldOptions_JSType.UNRECOGNIZED; + } +} + +export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { + switch (object) { + case FieldOptions_JSType.JS_NORMAL: + return "JS_NORMAL"; + case FieldOptions_JSType.JS_STRING: + return "JS_STRING"; + case FieldOptions_JSType.JS_NUMBER: + return "JS_NUMBER"; + default: + return "UNKNOWN"; + } +} + +export interface OneofOptions { + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface EnumOptions { + /** + * Set this option to true to allow mapping different tag names to the same + * value. + */ + allow_alias: boolean; + /** + * Is this enum deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum, or it will be completely ignored; in the very least, this + * is a formalization for deprecating enums. + */ + deprecated: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface EnumValueOptions { + /** + * Is this enum value deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum value, or it will be completely ignored; in the very least, + * this is a formalization for deprecating enum values. + */ + deprecated: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface ServiceOptions { + /** + * Is this service deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the service, or it will be completely ignored; in the very least, + * this is a formalization for deprecating services. + */ + deprecated: boolean; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +export interface MethodOptions { + /** + * Is this method deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the method, or it will be completely ignored; in the very least, + * this is a formalization for deprecating methods. + */ + deprecated: boolean; + idempotency_level: MethodOptions_IdempotencyLevel; + /** The parser stores options it doesn't recognize here. See above. */ + uninterpreted_option: UninterpretedOption[]; +} + +/** + * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + * or neither? HTTP based RPC implementation may choose GET verb for safe + * methods, and PUT verb for idempotent methods instead of the default POST. + */ +export enum MethodOptions_IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + /** NO_SIDE_EFFECTS - implies idempotent */ + NO_SIDE_EFFECTS = 1, + /** IDEMPOTENT - idempotent, but may have side effects */ + IDEMPOTENT = 2, + UNRECOGNIZED = -1, +} + +export function methodOptions_IdempotencyLevelFromJSON( + object: any +): MethodOptions_IdempotencyLevel { + switch (object) { + case 0: + case "IDEMPOTENCY_UNKNOWN": + return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; + case 1: + case "NO_SIDE_EFFECTS": + return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; + case 2: + case "IDEMPOTENT": + return MethodOptions_IdempotencyLevel.IDEMPOTENT; + case -1: + case "UNRECOGNIZED": + default: + return MethodOptions_IdempotencyLevel.UNRECOGNIZED; + } +} + +export function methodOptions_IdempotencyLevelToJSON( + object: MethodOptions_IdempotencyLevel +): string { + switch (object) { + case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: + return "IDEMPOTENCY_UNKNOWN"; + case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: + return "NO_SIDE_EFFECTS"; + case MethodOptions_IdempotencyLevel.IDEMPOTENT: + return "IDEMPOTENT"; + default: + return "UNKNOWN"; + } +} + +/** + * A message representing a option the parser does not recognize. This only + * appears in options protos created by the compiler::Parser class. + * DescriptorPool resolves these when building Descriptor objects. Therefore, + * options protos in descriptor objects (e.g. returned by Descriptor::options(), + * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions + * in them. + */ +export interface UninterpretedOption { + name: UninterpretedOption_NamePart[]; + /** + * The value of the uninterpreted option, in whatever type the tokenizer + * identified it as during parsing. Exactly one of these should be set. + */ + identifier_value: string; + positive_int_value: number; + negative_int_value: number; + double_value: number; + string_value: Uint8Array; + aggregate_value: string; +} + +/** + * The name of the uninterpreted option. Each string represents a segment in + * a dot-separated name. is_extension is true iff a segment represents an + * extension (denoted with parentheses in options specs in .proto files). + * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents + * "foo.(bar.baz).qux". + */ +export interface UninterpretedOption_NamePart { + name_part: string; + is_extension: boolean; +} + +/** + * Encapsulates information about the original source file from which a + * FileDescriptorProto was generated. + */ +export interface SourceCodeInfo { + /** + * A Location identifies a piece of source code in a .proto file which + * corresponds to a particular definition. This information is intended + * to be useful to IDEs, code indexers, documentation generators, and similar + * tools. + * + * For example, say we have a file like: + * message Foo { + * optional string foo = 1; + * } + * Let's look at just the field definition: + * optional string foo = 1; + * ^ ^^ ^^ ^ ^^^ + * a bc de f ghi + * We have the following locations: + * span path represents + * [a,i) [ 4, 0, 2, 0 ] The whole field definition. + * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + * + * Notes: + * - A location may refer to a repeated field itself (i.e. not to any + * particular index within it). This is used whenever a set of elements are + * logically enclosed in a single code segment. For example, an entire + * extend block (possibly containing multiple extension definitions) will + * have an outer location whose path refers to the "extensions" repeated + * field without an index. + * - Multiple locations may have the same path. This happens when a single + * logical declaration is spread out across multiple places. The most + * obvious example is the "extend" block again -- there may be multiple + * extend blocks in the same scope, each of which will have the same path. + * - A location's span is not always a subset of its parent's span. For + * example, the "extendee" of an extension declaration appears at the + * beginning of the "extend" block and is shared by all extensions within + * the block. + * - Just because a location's span is a subset of some other location's span + * does not mean that it is a descendant. For example, a "group" defines + * both a type and a field in a single declaration. Thus, the locations + * corresponding to the type and field and their components will overlap. + * - Code which tries to interpret locations should probably be designed to + * ignore those that it doesn't understand, as more types of locations could + * be recorded in the future. + */ + location: SourceCodeInfo_Location[]; +} + +export interface SourceCodeInfo_Location { + /** + * Identifies which part of the FileDescriptorProto was defined at this + * location. + * + * Each element is a field number or an index. They form a path from + * the root FileDescriptorProto to the place where the definition. For + * example, this path: + * [ 4, 3, 2, 7, 1 ] + * refers to: + * file.message_type(3) // 4, 3 + * .field(7) // 2, 7 + * .name() // 1 + * This is because FileDescriptorProto.message_type has field number 4: + * repeated DescriptorProto message_type = 4; + * and DescriptorProto.field has field number 2: + * repeated FieldDescriptorProto field = 2; + * and FieldDescriptorProto.name has field number 1: + * optional string name = 1; + * + * Thus, the above path gives the location of a field name. If we removed + * the last element: + * [ 4, 3, 2, 7 ] + * this path refers to the whole field declaration (from the beginning + * of the label to the terminating semicolon). + */ + path: number[]; + /** + * Always has exactly three or four elements: start line, start column, + * end line (optional, otherwise assumed same as start line), end column. + * These are packed into a single field for efficiency. Note that line + * and column numbers are zero-based -- typically you will want to add + * 1 to each before displaying to a user. + */ + span: number[]; + /** + * If this SourceCodeInfo represents a complete declaration, these are any + * comments appearing before and after the declaration which appear to be + * attached to the declaration. + * + * A series of line comments appearing on consecutive lines, with no other + * tokens appearing on those lines, will be treated as a single comment. + * + * leading_detached_comments will keep paragraphs of comments that appear + * before (but not connected to) the current element. Each paragraph, + * separated by empty lines, will be one comment element in the repeated + * field. + * + * Only the comment content is provided; comment markers (e.g. //) are + * stripped out. For block comments, leading whitespace and an asterisk + * will be stripped from the beginning of each line other than the first. + * Newlines are included in the output. + * + * Examples: + * + * optional int32 foo = 1; // Comment attached to foo. + * // Comment attached to bar. + * optional int32 bar = 2; + * + * optional string baz = 3; + * // Comment attached to baz. + * // Another line attached to baz. + * + * // Comment attached to qux. + * // + * // Another line attached to qux. + * optional double qux = 4; + * + * // Detached comment for corge. This is not leading or trailing comments + * // to qux or corge because there are blank lines separating it from + * // both. + * + * // Detached comment for corge paragraph 2. + * + * optional string corge = 5; + * /* Block comment attached + * * to corge. Leading asterisks + * * will be removed. * / + * /* Block comment attached to + * * grault. * / + * optional int32 grault = 6; + * + * // ignored detached comments. + */ + leading_comments: string; + trailing_comments: string; + leading_detached_comments: string[]; +} + +/** + * Describes the relationship between generated code and its original source + * file. A GeneratedCodeInfo message is associated with only one generated + * source file, but may contain references to different source .proto files. + */ +export interface GeneratedCodeInfo { + /** + * An Annotation connects some span of text in generated code to an element + * of its generating .proto file. + */ + annotation: GeneratedCodeInfo_Annotation[]; +} + +export interface GeneratedCodeInfo_Annotation { + /** + * Identifies the element in the original source .proto file. This field + * is formatted the same as SourceCodeInfo.Location.path. + */ + path: number[]; + /** Identifies the filesystem path to the original source .proto. */ + source_file: string; + /** + * Identifies the starting offset in bytes in the generated code + * that relates to the identified object. + */ + begin: number; + /** + * Identifies the ending offset in bytes in the generated code that + * relates to the identified offset. The end offset should be one past + * the last relevant byte (so the length of the text = end - begin). + */ + end: number; +} + +const baseFileDescriptorSet: object = {}; + +export const FileDescriptorSet = { + encode(message: FileDescriptorSet, writer: Writer = Writer.create()): Writer { + for (const v of message.file) { + FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FileDescriptorSet { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFileDescriptorSet } as FileDescriptorSet; + message.file = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.file.push( + FileDescriptorProto.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FileDescriptorSet { + const message = { ...baseFileDescriptorSet } as FileDescriptorSet; + message.file = []; + if (object.file !== undefined && object.file !== null) { + for (const e of object.file) { + message.file.push(FileDescriptorProto.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: FileDescriptorSet): unknown { + const obj: any = {}; + if (message.file) { + obj.file = message.file.map((e) => + e ? FileDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.file = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): FileDescriptorSet { + const message = { ...baseFileDescriptorSet } as FileDescriptorSet; + message.file = []; + if (object.file !== undefined && object.file !== null) { + for (const e of object.file) { + message.file.push(FileDescriptorProto.fromPartial(e)); + } + } + return message; + }, +}; + +const baseFileDescriptorProto: object = { + name: "", + package: "", + dependency: "", + public_dependency: 0, + weak_dependency: 0, + syntax: "", +}; + +export const FileDescriptorProto = { + encode( + message: FileDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.package !== "") { + writer.uint32(18).string(message.package); + } + for (const v of message.dependency) { + writer.uint32(26).string(v!); + } + writer.uint32(82).fork(); + for (const v of message.public_dependency) { + writer.int32(v); + } + writer.ldelim(); + writer.uint32(90).fork(); + for (const v of message.weak_dependency) { + writer.int32(v); + } + writer.ldelim(); + for (const v of message.message_type) { + DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); + } + for (const v of message.enum_type) { + EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim(); + } + for (const v of message.service) { + ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); + } + for (const v of message.extension) { + FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim(); + } + if (message.options !== undefined) { + FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); + } + if (message.source_code_info !== undefined) { + SourceCodeInfo.encode( + message.source_code_info, + writer.uint32(74).fork() + ).ldelim(); + } + if (message.syntax !== "") { + writer.uint32(98).string(message.syntax); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FileDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFileDescriptorProto } as FileDescriptorProto; + message.dependency = []; + message.public_dependency = []; + message.weak_dependency = []; + message.message_type = []; + message.enum_type = []; + message.service = []; + message.extension = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.package = reader.string(); + break; + case 3: + message.dependency.push(reader.string()); + break; + case 10: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.public_dependency.push(reader.int32()); + } + } else { + message.public_dependency.push(reader.int32()); + } + break; + case 11: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.weak_dependency.push(reader.int32()); + } + } else { + message.weak_dependency.push(reader.int32()); + } + break; + case 4: + message.message_type.push( + DescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 5: + message.enum_type.push( + EnumDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 6: + message.service.push( + ServiceDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 7: + message.extension.push( + FieldDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 8: + message.options = FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.source_code_info = SourceCodeInfo.decode( + reader, + reader.uint32() + ); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FileDescriptorProto { + const message = { ...baseFileDescriptorProto } as FileDescriptorProto; + message.dependency = []; + message.public_dependency = []; + message.weak_dependency = []; + message.message_type = []; + message.enum_type = []; + message.service = []; + message.extension = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.package !== undefined && object.package !== null) { + message.package = String(object.package); + } else { + message.package = ""; + } + if (object.dependency !== undefined && object.dependency !== null) { + for (const e of object.dependency) { + message.dependency.push(String(e)); + } + } + if ( + object.public_dependency !== undefined && + object.public_dependency !== null + ) { + for (const e of object.public_dependency) { + message.public_dependency.push(Number(e)); + } + } + if ( + object.weak_dependency !== undefined && + object.weak_dependency !== null + ) { + for (const e of object.weak_dependency) { + message.weak_dependency.push(Number(e)); + } + } + if (object.message_type !== undefined && object.message_type !== null) { + for (const e of object.message_type) { + message.message_type.push(DescriptorProto.fromJSON(e)); + } + } + if (object.enum_type !== undefined && object.enum_type !== null) { + for (const e of object.enum_type) { + message.enum_type.push(EnumDescriptorProto.fromJSON(e)); + } + } + if (object.service !== undefined && object.service !== null) { + for (const e of object.service) { + message.service.push(ServiceDescriptorProto.fromJSON(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = FileOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if ( + object.source_code_info !== undefined && + object.source_code_info !== null + ) { + message.source_code_info = SourceCodeInfo.fromJSON( + object.source_code_info + ); + } else { + message.source_code_info = undefined; + } + if (object.syntax !== undefined && object.syntax !== null) { + message.syntax = String(object.syntax); + } else { + message.syntax = ""; + } + return message; + }, + + toJSON(message: FileDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.package !== undefined && (obj.package = message.package); + if (message.dependency) { + obj.dependency = message.dependency.map((e) => e); + } else { + obj.dependency = []; + } + if (message.public_dependency) { + obj.public_dependency = message.public_dependency.map((e) => e); + } else { + obj.public_dependency = []; + } + if (message.weak_dependency) { + obj.weak_dependency = message.weak_dependency.map((e) => e); + } else { + obj.weak_dependency = []; + } + if (message.message_type) { + obj.message_type = message.message_type.map((e) => + e ? DescriptorProto.toJSON(e) : undefined + ); + } else { + obj.message_type = []; + } + if (message.enum_type) { + obj.enum_type = message.enum_type.map((e) => + e ? EnumDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.enum_type = []; + } + if (message.service) { + obj.service = message.service.map((e) => + e ? ServiceDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.service = []; + } + if (message.extension) { + obj.extension = message.extension.map((e) => + e ? FieldDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.extension = []; + } + message.options !== undefined && + (obj.options = message.options + ? FileOptions.toJSON(message.options) + : undefined); + message.source_code_info !== undefined && + (obj.source_code_info = message.source_code_info + ? SourceCodeInfo.toJSON(message.source_code_info) + : undefined); + message.syntax !== undefined && (obj.syntax = message.syntax); + return obj; + }, + + fromPartial(object: DeepPartial): FileDescriptorProto { + const message = { ...baseFileDescriptorProto } as FileDescriptorProto; + message.dependency = []; + message.public_dependency = []; + message.weak_dependency = []; + message.message_type = []; + message.enum_type = []; + message.service = []; + message.extension = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.package !== undefined && object.package !== null) { + message.package = object.package; + } else { + message.package = ""; + } + if (object.dependency !== undefined && object.dependency !== null) { + for (const e of object.dependency) { + message.dependency.push(e); + } + } + if ( + object.public_dependency !== undefined && + object.public_dependency !== null + ) { + for (const e of object.public_dependency) { + message.public_dependency.push(e); + } + } + if ( + object.weak_dependency !== undefined && + object.weak_dependency !== null + ) { + for (const e of object.weak_dependency) { + message.weak_dependency.push(e); + } + } + if (object.message_type !== undefined && object.message_type !== null) { + for (const e of object.message_type) { + message.message_type.push(DescriptorProto.fromPartial(e)); + } + } + if (object.enum_type !== undefined && object.enum_type !== null) { + for (const e of object.enum_type) { + message.enum_type.push(EnumDescriptorProto.fromPartial(e)); + } + } + if (object.service !== undefined && object.service !== null) { + for (const e of object.service) { + message.service.push(ServiceDescriptorProto.fromPartial(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = FileOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if ( + object.source_code_info !== undefined && + object.source_code_info !== null + ) { + message.source_code_info = SourceCodeInfo.fromPartial( + object.source_code_info + ); + } else { + message.source_code_info = undefined; + } + if (object.syntax !== undefined && object.syntax !== null) { + message.syntax = object.syntax; + } else { + message.syntax = ""; + } + return message; + }, +}; + +const baseDescriptorProto: object = { name: "", reserved_name: "" }; + +export const DescriptorProto = { + encode(message: DescriptorProto, writer: Writer = Writer.create()): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + for (const v of message.field) { + FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); + } + for (const v of message.extension) { + FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim(); + } + for (const v of message.nested_type) { + DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim(); + } + for (const v of message.enum_type) { + EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); + } + for (const v of message.extension_range) { + DescriptorProto_ExtensionRange.encode( + v!, + writer.uint32(42).fork() + ).ldelim(); + } + for (const v of message.oneof_decl) { + OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); + } + if (message.options !== undefined) { + MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); + } + for (const v of message.reserved_range) { + DescriptorProto_ReservedRange.encode( + v!, + writer.uint32(74).fork() + ).ldelim(); + } + for (const v of message.reserved_name) { + writer.uint32(82).string(v!); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): DescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseDescriptorProto } as DescriptorProto; + message.field = []; + message.extension = []; + message.nested_type = []; + message.enum_type = []; + message.extension_range = []; + message.oneof_decl = []; + message.reserved_range = []; + message.reserved_name = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.field.push( + FieldDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 6: + message.extension.push( + FieldDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 3: + message.nested_type.push( + DescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 4: + message.enum_type.push( + EnumDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 5: + message.extension_range.push( + DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) + ); + break; + case 8: + message.oneof_decl.push( + OneofDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 7: + message.options = MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + message.reserved_range.push( + DescriptorProto_ReservedRange.decode(reader, reader.uint32()) + ); + break; + case 10: + message.reserved_name.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): DescriptorProto { + const message = { ...baseDescriptorProto } as DescriptorProto; + message.field = []; + message.extension = []; + message.nested_type = []; + message.enum_type = []; + message.extension_range = []; + message.oneof_decl = []; + message.reserved_range = []; + message.reserved_name = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.field !== undefined && object.field !== null) { + for (const e of object.field) { + message.field.push(FieldDescriptorProto.fromJSON(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromJSON(e)); + } + } + if (object.nested_type !== undefined && object.nested_type !== null) { + for (const e of object.nested_type) { + message.nested_type.push(DescriptorProto.fromJSON(e)); + } + } + if (object.enum_type !== undefined && object.enum_type !== null) { + for (const e of object.enum_type) { + message.enum_type.push(EnumDescriptorProto.fromJSON(e)); + } + } + if ( + object.extension_range !== undefined && + object.extension_range !== null + ) { + for (const e of object.extension_range) { + message.extension_range.push( + DescriptorProto_ExtensionRange.fromJSON(e) + ); + } + } + if (object.oneof_decl !== undefined && object.oneof_decl !== null) { + for (const e of object.oneof_decl) { + message.oneof_decl.push(OneofDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = MessageOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if (object.reserved_range !== undefined && object.reserved_range !== null) { + for (const e of object.reserved_range) { + message.reserved_range.push(DescriptorProto_ReservedRange.fromJSON(e)); + } + } + if (object.reserved_name !== undefined && object.reserved_name !== null) { + for (const e of object.reserved_name) { + message.reserved_name.push(String(e)); + } + } + return message; + }, + + toJSON(message: DescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + if (message.field) { + obj.field = message.field.map((e) => + e ? FieldDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.field = []; + } + if (message.extension) { + obj.extension = message.extension.map((e) => + e ? FieldDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.extension = []; + } + if (message.nested_type) { + obj.nested_type = message.nested_type.map((e) => + e ? DescriptorProto.toJSON(e) : undefined + ); + } else { + obj.nested_type = []; + } + if (message.enum_type) { + obj.enum_type = message.enum_type.map((e) => + e ? EnumDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.enum_type = []; + } + if (message.extension_range) { + obj.extension_range = message.extension_range.map((e) => + e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined + ); + } else { + obj.extension_range = []; + } + if (message.oneof_decl) { + obj.oneof_decl = message.oneof_decl.map((e) => + e ? OneofDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.oneof_decl = []; + } + message.options !== undefined && + (obj.options = message.options + ? MessageOptions.toJSON(message.options) + : undefined); + if (message.reserved_range) { + obj.reserved_range = message.reserved_range.map((e) => + e ? DescriptorProto_ReservedRange.toJSON(e) : undefined + ); + } else { + obj.reserved_range = []; + } + if (message.reserved_name) { + obj.reserved_name = message.reserved_name.map((e) => e); + } else { + obj.reserved_name = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): DescriptorProto { + const message = { ...baseDescriptorProto } as DescriptorProto; + message.field = []; + message.extension = []; + message.nested_type = []; + message.enum_type = []; + message.extension_range = []; + message.oneof_decl = []; + message.reserved_range = []; + message.reserved_name = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.field !== undefined && object.field !== null) { + for (const e of object.field) { + message.field.push(FieldDescriptorProto.fromPartial(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromPartial(e)); + } + } + if (object.nested_type !== undefined && object.nested_type !== null) { + for (const e of object.nested_type) { + message.nested_type.push(DescriptorProto.fromPartial(e)); + } + } + if (object.enum_type !== undefined && object.enum_type !== null) { + for (const e of object.enum_type) { + message.enum_type.push(EnumDescriptorProto.fromPartial(e)); + } + } + if ( + object.extension_range !== undefined && + object.extension_range !== null + ) { + for (const e of object.extension_range) { + message.extension_range.push( + DescriptorProto_ExtensionRange.fromPartial(e) + ); + } + } + if (object.oneof_decl !== undefined && object.oneof_decl !== null) { + for (const e of object.oneof_decl) { + message.oneof_decl.push(OneofDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = MessageOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if (object.reserved_range !== undefined && object.reserved_range !== null) { + for (const e of object.reserved_range) { + message.reserved_range.push( + DescriptorProto_ReservedRange.fromPartial(e) + ); + } + } + if (object.reserved_name !== undefined && object.reserved_name !== null) { + for (const e of object.reserved_name) { + message.reserved_name.push(e); + } + } + return message; + }, +}; + +const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; + +export const DescriptorProto_ExtensionRange = { + encode( + message: DescriptorProto_ExtensionRange, + writer: Writer = Writer.create() + ): Writer { + if (message.start !== 0) { + writer.uint32(8).int32(message.start); + } + if (message.end !== 0) { + writer.uint32(16).int32(message.end); + } + if (message.options !== undefined) { + ExtensionRangeOptions.encode( + message.options, + writer.uint32(26).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): DescriptorProto_ExtensionRange { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseDescriptorProto_ExtensionRange, + } as DescriptorProto_ExtensionRange; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = ExtensionRangeOptions.decode( + reader, + reader.uint32() + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): DescriptorProto_ExtensionRange { + const message = { + ...baseDescriptorProto_ExtensionRange, + } as DescriptorProto_ExtensionRange; + if (object.start !== undefined && object.start !== null) { + message.start = Number(object.start); + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = ExtensionRangeOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; + }, + + toJSON(message: DescriptorProto_ExtensionRange): unknown { + const obj: any = {}; + message.start !== undefined && (obj.start = message.start); + message.end !== undefined && (obj.end = message.end); + message.options !== undefined && + (obj.options = message.options + ? ExtensionRangeOptions.toJSON(message.options) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): DescriptorProto_ExtensionRange { + const message = { + ...baseDescriptorProto_ExtensionRange, + } as DescriptorProto_ExtensionRange; + if (object.start !== undefined && object.start !== null) { + message.start = object.start; + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = ExtensionRangeOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + return message; + }, +}; + +const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; + +export const DescriptorProto_ReservedRange = { + encode( + message: DescriptorProto_ReservedRange, + writer: Writer = Writer.create() + ): Writer { + if (message.start !== 0) { + writer.uint32(8).int32(message.start); + } + if (message.end !== 0) { + writer.uint32(16).int32(message.end); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): DescriptorProto_ReservedRange { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseDescriptorProto_ReservedRange, + } as DescriptorProto_ReservedRange; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): DescriptorProto_ReservedRange { + const message = { + ...baseDescriptorProto_ReservedRange, + } as DescriptorProto_ReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = Number(object.start); + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + return message; + }, + + toJSON(message: DescriptorProto_ReservedRange): unknown { + const obj: any = {}; + message.start !== undefined && (obj.start = message.start); + message.end !== undefined && (obj.end = message.end); + return obj; + }, + + fromPartial( + object: DeepPartial + ): DescriptorProto_ReservedRange { + const message = { + ...baseDescriptorProto_ReservedRange, + } as DescriptorProto_ReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = object.start; + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } + return message; + }, +}; + +const baseExtensionRangeOptions: object = {}; + +export const ExtensionRangeOptions = { + encode( + message: ExtensionRangeOptions, + writer: Writer = Writer.create() + ): Writer { + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): ExtensionRangeOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ExtensionRangeOptions { + const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; + message.uninterpreted_option = []; + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: ExtensionRangeOptions): unknown { + const obj: any = {}; + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial( + object: DeepPartial + ): ExtensionRangeOptions { + const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; + message.uninterpreted_option = []; + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseFieldDescriptorProto: object = { + name: "", + number: 0, + label: 1, + type: 1, + type_name: "", + extendee: "", + default_value: "", + oneof_index: 0, + json_name: "", + proto3_optional: false, +}; + +export const FieldDescriptorProto = { + encode( + message: FieldDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.number !== 0) { + writer.uint32(24).int32(message.number); + } + if (message.label !== 1) { + writer.uint32(32).int32(message.label); + } + if (message.type !== 1) { + writer.uint32(40).int32(message.type); + } + if (message.type_name !== "") { + writer.uint32(50).string(message.type_name); + } + if (message.extendee !== "") { + writer.uint32(18).string(message.extendee); + } + if (message.default_value !== "") { + writer.uint32(58).string(message.default_value); + } + if (message.oneof_index !== 0) { + writer.uint32(72).int32(message.oneof_index); + } + if (message.json_name !== "") { + writer.uint32(82).string(message.json_name); + } + if (message.options !== undefined) { + FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); + } + if (message.proto3_optional === true) { + writer.uint32(136).bool(message.proto3_optional); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FieldDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32() as any; + break; + case 5: + message.type = reader.int32() as any; + break; + case 6: + message.type_name = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.default_value = reader.string(); + break; + case 9: + message.oneof_index = reader.int32(); + break; + case 10: + message.json_name = reader.string(); + break; + case 8: + message.options = FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3_optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FieldDescriptorProto { + const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = Number(object.number); + } else { + message.number = 0; + } + if (object.label !== undefined && object.label !== null) { + message.label = fieldDescriptorProto_LabelFromJSON(object.label); + } else { + message.label = 1; + } + if (object.type !== undefined && object.type !== null) { + message.type = fieldDescriptorProto_TypeFromJSON(object.type); + } else { + message.type = 1; + } + if (object.type_name !== undefined && object.type_name !== null) { + message.type_name = String(object.type_name); + } else { + message.type_name = ""; + } + if (object.extendee !== undefined && object.extendee !== null) { + message.extendee = String(object.extendee); + } else { + message.extendee = ""; + } + if (object.default_value !== undefined && object.default_value !== null) { + message.default_value = String(object.default_value); + } else { + message.default_value = ""; + } + if (object.oneof_index !== undefined && object.oneof_index !== null) { + message.oneof_index = Number(object.oneof_index); + } else { + message.oneof_index = 0; + } + if (object.json_name !== undefined && object.json_name !== null) { + message.json_name = String(object.json_name); + } else { + message.json_name = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = FieldOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if ( + object.proto3_optional !== undefined && + object.proto3_optional !== null + ) { + message.proto3_optional = Boolean(object.proto3_optional); + } else { + message.proto3_optional = false; + } + return message; + }, + + toJSON(message: FieldDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.number !== undefined && (obj.number = message.number); + message.label !== undefined && + (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); + message.type !== undefined && + (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); + message.type_name !== undefined && (obj.type_name = message.type_name); + message.extendee !== undefined && (obj.extendee = message.extendee); + message.default_value !== undefined && + (obj.default_value = message.default_value); + message.oneof_index !== undefined && + (obj.oneof_index = message.oneof_index); + message.json_name !== undefined && (obj.json_name = message.json_name); + message.options !== undefined && + (obj.options = message.options + ? FieldOptions.toJSON(message.options) + : undefined); + message.proto3_optional !== undefined && + (obj.proto3_optional = message.proto3_optional); + return obj; + }, + + fromPartial(object: DeepPartial): FieldDescriptorProto { + const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = object.number; + } else { + message.number = 0; + } + if (object.label !== undefined && object.label !== null) { + message.label = object.label; + } else { + message.label = 1; + } + if (object.type !== undefined && object.type !== null) { + message.type = object.type; + } else { + message.type = 1; + } + if (object.type_name !== undefined && object.type_name !== null) { + message.type_name = object.type_name; + } else { + message.type_name = ""; + } + if (object.extendee !== undefined && object.extendee !== null) { + message.extendee = object.extendee; + } else { + message.extendee = ""; + } + if (object.default_value !== undefined && object.default_value !== null) { + message.default_value = object.default_value; + } else { + message.default_value = ""; + } + if (object.oneof_index !== undefined && object.oneof_index !== null) { + message.oneof_index = object.oneof_index; + } else { + message.oneof_index = 0; + } + if (object.json_name !== undefined && object.json_name !== null) { + message.json_name = object.json_name; + } else { + message.json_name = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = FieldOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if ( + object.proto3_optional !== undefined && + object.proto3_optional !== null + ) { + message.proto3_optional = object.proto3_optional; + } else { + message.proto3_optional = false; + } + return message; + }, +}; + +const baseOneofDescriptorProto: object = { name: "" }; + +export const OneofDescriptorProto = { + encode( + message: OneofDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.options !== undefined) { + OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): OneofDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): OneofDescriptorProto { + const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = OneofOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; + }, + + toJSON(message: OneofDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.options !== undefined && + (obj.options = message.options + ? OneofOptions.toJSON(message.options) + : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): OneofDescriptorProto { + const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = OneofOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + return message; + }, +}; + +const baseEnumDescriptorProto: object = { name: "", reserved_name: "" }; + +export const EnumDescriptorProto = { + encode( + message: EnumDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + for (const v of message.value) { + EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); + } + if (message.options !== undefined) { + EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); + } + for (const v of message.reserved_range) { + EnumDescriptorProto_EnumReservedRange.encode( + v!, + writer.uint32(34).fork() + ).ldelim(); + } + for (const v of message.reserved_name) { + writer.uint32(42).string(v!); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): EnumDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; + message.value = []; + message.reserved_range = []; + message.reserved_name = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.value.push( + EnumValueDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 3: + message.options = EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + message.reserved_range.push( + EnumDescriptorProto_EnumReservedRange.decode( + reader, + reader.uint32() + ) + ); + break; + case 5: + message.reserved_name.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumDescriptorProto { + const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; + message.value = []; + message.reserved_range = []; + message.reserved_name = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.value !== undefined && object.value !== null) { + for (const e of object.value) { + message.value.push(EnumValueDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if (object.reserved_range !== undefined && object.reserved_range !== null) { + for (const e of object.reserved_range) { + message.reserved_range.push( + EnumDescriptorProto_EnumReservedRange.fromJSON(e) + ); + } + } + if (object.reserved_name !== undefined && object.reserved_name !== null) { + for (const e of object.reserved_name) { + message.reserved_name.push(String(e)); + } + } + return message; + }, + + toJSON(message: EnumDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + if (message.value) { + obj.value = message.value.map((e) => + e ? EnumValueDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.value = []; + } + message.options !== undefined && + (obj.options = message.options + ? EnumOptions.toJSON(message.options) + : undefined); + if (message.reserved_range) { + obj.reserved_range = message.reserved_range.map((e) => + e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined + ); + } else { + obj.reserved_range = []; + } + if (message.reserved_name) { + obj.reserved_name = message.reserved_name.map((e) => e); + } else { + obj.reserved_name = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): EnumDescriptorProto { + const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; + message.value = []; + message.reserved_range = []; + message.reserved_name = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.value !== undefined && object.value !== null) { + for (const e of object.value) { + message.value.push(EnumValueDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if (object.reserved_range !== undefined && object.reserved_range !== null) { + for (const e of object.reserved_range) { + message.reserved_range.push( + EnumDescriptorProto_EnumReservedRange.fromPartial(e) + ); + } + } + if (object.reserved_name !== undefined && object.reserved_name !== null) { + for (const e of object.reserved_name) { + message.reserved_name.push(e); + } + } + return message; + }, +}; + +const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; + +export const EnumDescriptorProto_EnumReservedRange = { + encode( + message: EnumDescriptorProto_EnumReservedRange, + writer: Writer = Writer.create() + ): Writer { + if (message.start !== 0) { + writer.uint32(8).int32(message.start); + } + if (message.end !== 0) { + writer.uint32(16).int32(message.end); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): EnumDescriptorProto_EnumReservedRange { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseEnumDescriptorProto_EnumReservedRange, + } as EnumDescriptorProto_EnumReservedRange; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { + const message = { + ...baseEnumDescriptorProto_EnumReservedRange, + } as EnumDescriptorProto_EnumReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = Number(object.start); + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + return message; + }, + + toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { + const obj: any = {}; + message.start !== undefined && (obj.start = message.start); + message.end !== undefined && (obj.end = message.end); + return obj; + }, + + fromPartial( + object: DeepPartial + ): EnumDescriptorProto_EnumReservedRange { + const message = { + ...baseEnumDescriptorProto_EnumReservedRange, + } as EnumDescriptorProto_EnumReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = object.start; + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } + return message; + }, +}; + +const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; + +export const EnumValueDescriptorProto = { + encode( + message: EnumValueDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.number !== 0) { + writer.uint32(16).int32(message.number); + } + if (message.options !== undefined) { + EnumValueOptions.encode( + message.options, + writer.uint32(26).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): EnumValueDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseEnumValueDescriptorProto, + } as EnumValueDescriptorProto; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumValueDescriptorProto { + const message = { + ...baseEnumValueDescriptorProto, + } as EnumValueDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = Number(object.number); + } else { + message.number = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumValueOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; + }, + + toJSON(message: EnumValueDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.number !== undefined && (obj.number = message.number); + message.options !== undefined && + (obj.options = message.options + ? EnumValueOptions.toJSON(message.options) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): EnumValueDescriptorProto { + const message = { + ...baseEnumValueDescriptorProto, + } as EnumValueDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = object.number; + } else { + message.number = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumValueOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + return message; + }, +}; + +const baseServiceDescriptorProto: object = { name: "" }; + +export const ServiceDescriptorProto = { + encode( + message: ServiceDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + for (const v of message.method) { + MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim(); + } + if (message.options !== undefined) { + ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): ServiceDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; + message.method = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.method.push( + MethodDescriptorProto.decode(reader, reader.uint32()) + ); + break; + case 3: + message.options = ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ServiceDescriptorProto { + const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; + message.method = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.method !== undefined && object.method !== null) { + for (const e of object.method) { + message.method.push(MethodDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = ServiceOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; + }, + + toJSON(message: ServiceDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + if (message.method) { + obj.method = message.method.map((e) => + e ? MethodDescriptorProto.toJSON(e) : undefined + ); + } else { + obj.method = []; + } + message.options !== undefined && + (obj.options = message.options + ? ServiceOptions.toJSON(message.options) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): ServiceDescriptorProto { + const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; + message.method = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.method !== undefined && object.method !== null) { + for (const e of object.method) { + message.method.push(MethodDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = ServiceOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + return message; + }, +}; + +const baseMethodDescriptorProto: object = { + name: "", + input_type: "", + output_type: "", + client_streaming: false, + server_streaming: false, +}; + +export const MethodDescriptorProto = { + encode( + message: MethodDescriptorProto, + writer: Writer = Writer.create() + ): Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.input_type !== "") { + writer.uint32(18).string(message.input_type); + } + if (message.output_type !== "") { + writer.uint32(26).string(message.output_type); + } + if (message.options !== undefined) { + MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); + } + if (message.client_streaming === true) { + writer.uint32(40).bool(message.client_streaming); + } + if (message.server_streaming === true) { + writer.uint32(48).bool(message.server_streaming); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MethodDescriptorProto { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.input_type = reader.string(); + break; + case 3: + message.output_type = reader.string(); + break; + case 4: + message.options = MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.client_streaming = reader.bool(); + break; + case 6: + message.server_streaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MethodDescriptorProto { + const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.input_type !== undefined && object.input_type !== null) { + message.input_type = String(object.input_type); + } else { + message.input_type = ""; + } + if (object.output_type !== undefined && object.output_type !== null) { + message.output_type = String(object.output_type); + } else { + message.output_type = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = MethodOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if ( + object.client_streaming !== undefined && + object.client_streaming !== null + ) { + message.client_streaming = Boolean(object.client_streaming); + } else { + message.client_streaming = false; + } + if ( + object.server_streaming !== undefined && + object.server_streaming !== null + ) { + message.server_streaming = Boolean(object.server_streaming); + } else { + message.server_streaming = false; + } + return message; + }, + + toJSON(message: MethodDescriptorProto): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.input_type !== undefined && (obj.input_type = message.input_type); + message.output_type !== undefined && + (obj.output_type = message.output_type); + message.options !== undefined && + (obj.options = message.options + ? MethodOptions.toJSON(message.options) + : undefined); + message.client_streaming !== undefined && + (obj.client_streaming = message.client_streaming); + message.server_streaming !== undefined && + (obj.server_streaming = message.server_streaming); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MethodDescriptorProto { + const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.input_type !== undefined && object.input_type !== null) { + message.input_type = object.input_type; + } else { + message.input_type = ""; + } + if (object.output_type !== undefined && object.output_type !== null) { + message.output_type = object.output_type; + } else { + message.output_type = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = MethodOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if ( + object.client_streaming !== undefined && + object.client_streaming !== null + ) { + message.client_streaming = object.client_streaming; + } else { + message.client_streaming = false; + } + if ( + object.server_streaming !== undefined && + object.server_streaming !== null + ) { + message.server_streaming = object.server_streaming; + } else { + message.server_streaming = false; + } + return message; + }, +}; + +const baseFileOptions: object = { + java_package: "", + java_outer_classname: "", + java_multiple_files: false, + java_generate_equals_and_hash: false, + java_string_check_utf8: false, + optimize_for: 1, + go_package: "", + cc_generic_services: false, + java_generic_services: false, + py_generic_services: false, + php_generic_services: false, + deprecated: false, + cc_enable_arenas: false, + objc_class_prefix: "", + csharp_namespace: "", + swift_prefix: "", + php_class_prefix: "", + php_namespace: "", + php_metadata_namespace: "", + ruby_package: "", +}; + +export const FileOptions = { + encode(message: FileOptions, writer: Writer = Writer.create()): Writer { + if (message.java_package !== "") { + writer.uint32(10).string(message.java_package); + } + if (message.java_outer_classname !== "") { + writer.uint32(66).string(message.java_outer_classname); + } + if (message.java_multiple_files === true) { + writer.uint32(80).bool(message.java_multiple_files); + } + if (message.java_generate_equals_and_hash === true) { + writer.uint32(160).bool(message.java_generate_equals_and_hash); + } + if (message.java_string_check_utf8 === true) { + writer.uint32(216).bool(message.java_string_check_utf8); + } + if (message.optimize_for !== 1) { + writer.uint32(72).int32(message.optimize_for); + } + if (message.go_package !== "") { + writer.uint32(90).string(message.go_package); + } + if (message.cc_generic_services === true) { + writer.uint32(128).bool(message.cc_generic_services); + } + if (message.java_generic_services === true) { + writer.uint32(136).bool(message.java_generic_services); + } + if (message.py_generic_services === true) { + writer.uint32(144).bool(message.py_generic_services); + } + if (message.php_generic_services === true) { + writer.uint32(336).bool(message.php_generic_services); + } + if (message.deprecated === true) { + writer.uint32(184).bool(message.deprecated); + } + if (message.cc_enable_arenas === true) { + writer.uint32(248).bool(message.cc_enable_arenas); + } + if (message.objc_class_prefix !== "") { + writer.uint32(290).string(message.objc_class_prefix); + } + if (message.csharp_namespace !== "") { + writer.uint32(298).string(message.csharp_namespace); + } + if (message.swift_prefix !== "") { + writer.uint32(314).string(message.swift_prefix); + } + if (message.php_class_prefix !== "") { + writer.uint32(322).string(message.php_class_prefix); + } + if (message.php_namespace !== "") { + writer.uint32(330).string(message.php_namespace); + } + if (message.php_metadata_namespace !== "") { + writer.uint32(354).string(message.php_metadata_namespace); + } + if (message.ruby_package !== "") { + writer.uint32(362).string(message.ruby_package); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FileOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFileOptions } as FileOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.java_package = reader.string(); + break; + case 8: + message.java_outer_classname = reader.string(); + break; + case 10: + message.java_multiple_files = reader.bool(); + break; + case 20: + message.java_generate_equals_and_hash = reader.bool(); + break; + case 27: + message.java_string_check_utf8 = reader.bool(); + break; + case 9: + message.optimize_for = reader.int32() as any; + break; + case 11: + message.go_package = reader.string(); + break; + case 16: + message.cc_generic_services = reader.bool(); + break; + case 17: + message.java_generic_services = reader.bool(); + break; + case 18: + message.py_generic_services = reader.bool(); + break; + case 42: + message.php_generic_services = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.cc_enable_arenas = reader.bool(); + break; + case 36: + message.objc_class_prefix = reader.string(); + break; + case 37: + message.csharp_namespace = reader.string(); + break; + case 39: + message.swift_prefix = reader.string(); + break; + case 40: + message.php_class_prefix = reader.string(); + break; + case 41: + message.php_namespace = reader.string(); + break; + case 44: + message.php_metadata_namespace = reader.string(); + break; + case 45: + message.ruby_package = reader.string(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FileOptions { + const message = { ...baseFileOptions } as FileOptions; + message.uninterpreted_option = []; + if (object.java_package !== undefined && object.java_package !== null) { + message.java_package = String(object.java_package); + } else { + message.java_package = ""; + } + if ( + object.java_outer_classname !== undefined && + object.java_outer_classname !== null + ) { + message.java_outer_classname = String(object.java_outer_classname); + } else { + message.java_outer_classname = ""; + } + if ( + object.java_multiple_files !== undefined && + object.java_multiple_files !== null + ) { + message.java_multiple_files = Boolean(object.java_multiple_files); + } else { + message.java_multiple_files = false; + } + if ( + object.java_generate_equals_and_hash !== undefined && + object.java_generate_equals_and_hash !== null + ) { + message.java_generate_equals_and_hash = Boolean( + object.java_generate_equals_and_hash + ); + } else { + message.java_generate_equals_and_hash = false; + } + if ( + object.java_string_check_utf8 !== undefined && + object.java_string_check_utf8 !== null + ) { + message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); + } else { + message.java_string_check_utf8 = false; + } + if (object.optimize_for !== undefined && object.optimize_for !== null) { + message.optimize_for = fileOptions_OptimizeModeFromJSON( + object.optimize_for + ); + } else { + message.optimize_for = 1; + } + if (object.go_package !== undefined && object.go_package !== null) { + message.go_package = String(object.go_package); + } else { + message.go_package = ""; + } + if ( + object.cc_generic_services !== undefined && + object.cc_generic_services !== null + ) { + message.cc_generic_services = Boolean(object.cc_generic_services); + } else { + message.cc_generic_services = false; + } + if ( + object.java_generic_services !== undefined && + object.java_generic_services !== null + ) { + message.java_generic_services = Boolean(object.java_generic_services); + } else { + message.java_generic_services = false; + } + if ( + object.py_generic_services !== undefined && + object.py_generic_services !== null + ) { + message.py_generic_services = Boolean(object.py_generic_services); + } else { + message.py_generic_services = false; + } + if ( + object.php_generic_services !== undefined && + object.php_generic_services !== null + ) { + message.php_generic_services = Boolean(object.php_generic_services); + } else { + message.php_generic_services = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.cc_enable_arenas !== undefined && + object.cc_enable_arenas !== null + ) { + message.cc_enable_arenas = Boolean(object.cc_enable_arenas); + } else { + message.cc_enable_arenas = false; + } + if ( + object.objc_class_prefix !== undefined && + object.objc_class_prefix !== null + ) { + message.objc_class_prefix = String(object.objc_class_prefix); + } else { + message.objc_class_prefix = ""; + } + if ( + object.csharp_namespace !== undefined && + object.csharp_namespace !== null + ) { + message.csharp_namespace = String(object.csharp_namespace); + } else { + message.csharp_namespace = ""; + } + if (object.swift_prefix !== undefined && object.swift_prefix !== null) { + message.swift_prefix = String(object.swift_prefix); + } else { + message.swift_prefix = ""; + } + if ( + object.php_class_prefix !== undefined && + object.php_class_prefix !== null + ) { + message.php_class_prefix = String(object.php_class_prefix); + } else { + message.php_class_prefix = ""; + } + if (object.php_namespace !== undefined && object.php_namespace !== null) { + message.php_namespace = String(object.php_namespace); + } else { + message.php_namespace = ""; + } + if ( + object.php_metadata_namespace !== undefined && + object.php_metadata_namespace !== null + ) { + message.php_metadata_namespace = String(object.php_metadata_namespace); + } else { + message.php_metadata_namespace = ""; + } + if (object.ruby_package !== undefined && object.ruby_package !== null) { + message.ruby_package = String(object.ruby_package); + } else { + message.ruby_package = ""; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: FileOptions): unknown { + const obj: any = {}; + message.java_package !== undefined && + (obj.java_package = message.java_package); + message.java_outer_classname !== undefined && + (obj.java_outer_classname = message.java_outer_classname); + message.java_multiple_files !== undefined && + (obj.java_multiple_files = message.java_multiple_files); + message.java_generate_equals_and_hash !== undefined && + (obj.java_generate_equals_and_hash = + message.java_generate_equals_and_hash); + message.java_string_check_utf8 !== undefined && + (obj.java_string_check_utf8 = message.java_string_check_utf8); + message.optimize_for !== undefined && + (obj.optimize_for = fileOptions_OptimizeModeToJSON(message.optimize_for)); + message.go_package !== undefined && (obj.go_package = message.go_package); + message.cc_generic_services !== undefined && + (obj.cc_generic_services = message.cc_generic_services); + message.java_generic_services !== undefined && + (obj.java_generic_services = message.java_generic_services); + message.py_generic_services !== undefined && + (obj.py_generic_services = message.py_generic_services); + message.php_generic_services !== undefined && + (obj.php_generic_services = message.php_generic_services); + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + message.cc_enable_arenas !== undefined && + (obj.cc_enable_arenas = message.cc_enable_arenas); + message.objc_class_prefix !== undefined && + (obj.objc_class_prefix = message.objc_class_prefix); + message.csharp_namespace !== undefined && + (obj.csharp_namespace = message.csharp_namespace); + message.swift_prefix !== undefined && + (obj.swift_prefix = message.swift_prefix); + message.php_class_prefix !== undefined && + (obj.php_class_prefix = message.php_class_prefix); + message.php_namespace !== undefined && + (obj.php_namespace = message.php_namespace); + message.php_metadata_namespace !== undefined && + (obj.php_metadata_namespace = message.php_metadata_namespace); + message.ruby_package !== undefined && + (obj.ruby_package = message.ruby_package); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): FileOptions { + const message = { ...baseFileOptions } as FileOptions; + message.uninterpreted_option = []; + if (object.java_package !== undefined && object.java_package !== null) { + message.java_package = object.java_package; + } else { + message.java_package = ""; + } + if ( + object.java_outer_classname !== undefined && + object.java_outer_classname !== null + ) { + message.java_outer_classname = object.java_outer_classname; + } else { + message.java_outer_classname = ""; + } + if ( + object.java_multiple_files !== undefined && + object.java_multiple_files !== null + ) { + message.java_multiple_files = object.java_multiple_files; + } else { + message.java_multiple_files = false; + } + if ( + object.java_generate_equals_and_hash !== undefined && + object.java_generate_equals_and_hash !== null + ) { + message.java_generate_equals_and_hash = + object.java_generate_equals_and_hash; + } else { + message.java_generate_equals_and_hash = false; + } + if ( + object.java_string_check_utf8 !== undefined && + object.java_string_check_utf8 !== null + ) { + message.java_string_check_utf8 = object.java_string_check_utf8; + } else { + message.java_string_check_utf8 = false; + } + if (object.optimize_for !== undefined && object.optimize_for !== null) { + message.optimize_for = object.optimize_for; + } else { + message.optimize_for = 1; + } + if (object.go_package !== undefined && object.go_package !== null) { + message.go_package = object.go_package; + } else { + message.go_package = ""; + } + if ( + object.cc_generic_services !== undefined && + object.cc_generic_services !== null + ) { + message.cc_generic_services = object.cc_generic_services; + } else { + message.cc_generic_services = false; + } + if ( + object.java_generic_services !== undefined && + object.java_generic_services !== null + ) { + message.java_generic_services = object.java_generic_services; + } else { + message.java_generic_services = false; + } + if ( + object.py_generic_services !== undefined && + object.py_generic_services !== null + ) { + message.py_generic_services = object.py_generic_services; + } else { + message.py_generic_services = false; + } + if ( + object.php_generic_services !== undefined && + object.php_generic_services !== null + ) { + message.php_generic_services = object.php_generic_services; + } else { + message.php_generic_services = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.cc_enable_arenas !== undefined && + object.cc_enable_arenas !== null + ) { + message.cc_enable_arenas = object.cc_enable_arenas; + } else { + message.cc_enable_arenas = false; + } + if ( + object.objc_class_prefix !== undefined && + object.objc_class_prefix !== null + ) { + message.objc_class_prefix = object.objc_class_prefix; + } else { + message.objc_class_prefix = ""; + } + if ( + object.csharp_namespace !== undefined && + object.csharp_namespace !== null + ) { + message.csharp_namespace = object.csharp_namespace; + } else { + message.csharp_namespace = ""; + } + if (object.swift_prefix !== undefined && object.swift_prefix !== null) { + message.swift_prefix = object.swift_prefix; + } else { + message.swift_prefix = ""; + } + if ( + object.php_class_prefix !== undefined && + object.php_class_prefix !== null + ) { + message.php_class_prefix = object.php_class_prefix; + } else { + message.php_class_prefix = ""; + } + if (object.php_namespace !== undefined && object.php_namespace !== null) { + message.php_namespace = object.php_namespace; + } else { + message.php_namespace = ""; + } + if ( + object.php_metadata_namespace !== undefined && + object.php_metadata_namespace !== null + ) { + message.php_metadata_namespace = object.php_metadata_namespace; + } else { + message.php_metadata_namespace = ""; + } + if (object.ruby_package !== undefined && object.ruby_package !== null) { + message.ruby_package = object.ruby_package; + } else { + message.ruby_package = ""; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseMessageOptions: object = { + message_set_wire_format: false, + no_standard_descriptor_accessor: false, + deprecated: false, + map_entry: false, +}; + +export const MessageOptions = { + encode(message: MessageOptions, writer: Writer = Writer.create()): Writer { + if (message.message_set_wire_format === true) { + writer.uint32(8).bool(message.message_set_wire_format); + } + if (message.no_standard_descriptor_accessor === true) { + writer.uint32(16).bool(message.no_standard_descriptor_accessor); + } + if (message.deprecated === true) { + writer.uint32(24).bool(message.deprecated); + } + if (message.map_entry === true) { + writer.uint32(56).bool(message.map_entry); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MessageOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMessageOptions } as MessageOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message_set_wire_format = reader.bool(); + break; + case 2: + message.no_standard_descriptor_accessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.map_entry = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MessageOptions { + const message = { ...baseMessageOptions } as MessageOptions; + message.uninterpreted_option = []; + if ( + object.message_set_wire_format !== undefined && + object.message_set_wire_format !== null + ) { + message.message_set_wire_format = Boolean(object.message_set_wire_format); + } else { + message.message_set_wire_format = false; + } + if ( + object.no_standard_descriptor_accessor !== undefined && + object.no_standard_descriptor_accessor !== null + ) { + message.no_standard_descriptor_accessor = Boolean( + object.no_standard_descriptor_accessor + ); + } else { + message.no_standard_descriptor_accessor = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if (object.map_entry !== undefined && object.map_entry !== null) { + message.map_entry = Boolean(object.map_entry); + } else { + message.map_entry = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: MessageOptions): unknown { + const obj: any = {}; + message.message_set_wire_format !== undefined && + (obj.message_set_wire_format = message.message_set_wire_format); + message.no_standard_descriptor_accessor !== undefined && + (obj.no_standard_descriptor_accessor = + message.no_standard_descriptor_accessor); + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + message.map_entry !== undefined && (obj.map_entry = message.map_entry); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): MessageOptions { + const message = { ...baseMessageOptions } as MessageOptions; + message.uninterpreted_option = []; + if ( + object.message_set_wire_format !== undefined && + object.message_set_wire_format !== null + ) { + message.message_set_wire_format = object.message_set_wire_format; + } else { + message.message_set_wire_format = false; + } + if ( + object.no_standard_descriptor_accessor !== undefined && + object.no_standard_descriptor_accessor !== null + ) { + message.no_standard_descriptor_accessor = + object.no_standard_descriptor_accessor; + } else { + message.no_standard_descriptor_accessor = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if (object.map_entry !== undefined && object.map_entry !== null) { + message.map_entry = object.map_entry; + } else { + message.map_entry = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseFieldOptions: object = { + ctype: 0, + packed: false, + jstype: 0, + lazy: false, + deprecated: false, + weak: false, +}; + +export const FieldOptions = { + encode(message: FieldOptions, writer: Writer = Writer.create()): Writer { + if (message.ctype !== 0) { + writer.uint32(8).int32(message.ctype); + } + if (message.packed === true) { + writer.uint32(16).bool(message.packed); + } + if (message.jstype !== 0) { + writer.uint32(48).int32(message.jstype); + } + if (message.lazy === true) { + writer.uint32(40).bool(message.lazy); + } + if (message.deprecated === true) { + writer.uint32(24).bool(message.deprecated); + } + if (message.weak === true) { + writer.uint32(80).bool(message.weak); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): FieldOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFieldOptions } as FieldOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32() as any; + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32() as any; + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FieldOptions { + const message = { ...baseFieldOptions } as FieldOptions; + message.uninterpreted_option = []; + if (object.ctype !== undefined && object.ctype !== null) { + message.ctype = fieldOptions_CTypeFromJSON(object.ctype); + } else { + message.ctype = 0; + } + if (object.packed !== undefined && object.packed !== null) { + message.packed = Boolean(object.packed); + } else { + message.packed = false; + } + if (object.jstype !== undefined && object.jstype !== null) { + message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); + } else { + message.jstype = 0; + } + if (object.lazy !== undefined && object.lazy !== null) { + message.lazy = Boolean(object.lazy); + } else { + message.lazy = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if (object.weak !== undefined && object.weak !== null) { + message.weak = Boolean(object.weak); + } else { + message.weak = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: FieldOptions): unknown { + const obj: any = {}; + message.ctype !== undefined && + (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); + message.packed !== undefined && (obj.packed = message.packed); + message.jstype !== undefined && + (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); + message.lazy !== undefined && (obj.lazy = message.lazy); + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + message.weak !== undefined && (obj.weak = message.weak); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): FieldOptions { + const message = { ...baseFieldOptions } as FieldOptions; + message.uninterpreted_option = []; + if (object.ctype !== undefined && object.ctype !== null) { + message.ctype = object.ctype; + } else { + message.ctype = 0; + } + if (object.packed !== undefined && object.packed !== null) { + message.packed = object.packed; + } else { + message.packed = false; + } + if (object.jstype !== undefined && object.jstype !== null) { + message.jstype = object.jstype; + } else { + message.jstype = 0; + } + if (object.lazy !== undefined && object.lazy !== null) { + message.lazy = object.lazy; + } else { + message.lazy = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if (object.weak !== undefined && object.weak !== null) { + message.weak = object.weak; + } else { + message.weak = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseOneofOptions: object = {}; + +export const OneofOptions = { + encode(message: OneofOptions, writer: Writer = Writer.create()): Writer { + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): OneofOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseOneofOptions } as OneofOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): OneofOptions { + const message = { ...baseOneofOptions } as OneofOptions; + message.uninterpreted_option = []; + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: OneofOptions): unknown { + const obj: any = {}; + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): OneofOptions { + const message = { ...baseOneofOptions } as OneofOptions; + message.uninterpreted_option = []; + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseEnumOptions: object = { allow_alias: false, deprecated: false }; + +export const EnumOptions = { + encode(message: EnumOptions, writer: Writer = Writer.create()): Writer { + if (message.allow_alias === true) { + writer.uint32(16).bool(message.allow_alias); + } + if (message.deprecated === true) { + writer.uint32(24).bool(message.deprecated); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): EnumOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseEnumOptions } as EnumOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allow_alias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumOptions { + const message = { ...baseEnumOptions } as EnumOptions; + message.uninterpreted_option = []; + if (object.allow_alias !== undefined && object.allow_alias !== null) { + message.allow_alias = Boolean(object.allow_alias); + } else { + message.allow_alias = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: EnumOptions): unknown { + const obj: any = {}; + message.allow_alias !== undefined && + (obj.allow_alias = message.allow_alias); + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): EnumOptions { + const message = { ...baseEnumOptions } as EnumOptions; + message.uninterpreted_option = []; + if (object.allow_alias !== undefined && object.allow_alias !== null) { + message.allow_alias = object.allow_alias; + } else { + message.allow_alias = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseEnumValueOptions: object = { deprecated: false }; + +export const EnumValueOptions = { + encode(message: EnumValueOptions, writer: Writer = Writer.create()): Writer { + if (message.deprecated === true) { + writer.uint32(8).bool(message.deprecated); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): EnumValueOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseEnumValueOptions } as EnumValueOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): EnumValueOptions { + const message = { ...baseEnumValueOptions } as EnumValueOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: EnumValueOptions): unknown { + const obj: any = {}; + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): EnumValueOptions { + const message = { ...baseEnumValueOptions } as EnumValueOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseServiceOptions: object = { deprecated: false }; + +export const ServiceOptions = { + encode(message: ServiceOptions, writer: Writer = Writer.create()): Writer { + if (message.deprecated === true) { + writer.uint32(264).bool(message.deprecated); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): ServiceOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseServiceOptions } as ServiceOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ServiceOptions { + const message = { ...baseServiceOptions } as ServiceOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: ServiceOptions): unknown { + const obj: any = {}; + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): ServiceOptions { + const message = { ...baseServiceOptions } as ServiceOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseMethodOptions: object = { deprecated: false, idempotency_level: 0 }; + +export const MethodOptions = { + encode(message: MethodOptions, writer: Writer = Writer.create()): Writer { + if (message.deprecated === true) { + writer.uint32(264).bool(message.deprecated); + } + if (message.idempotency_level !== 0) { + writer.uint32(272).int32(message.idempotency_level); + } + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MethodOptions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMethodOptions } as MethodOptions; + message.uninterpreted_option = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotency_level = reader.int32() as any; + break; + case 999: + message.uninterpreted_option.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MethodOptions { + const message = { ...baseMethodOptions } as MethodOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.idempotency_level !== undefined && + object.idempotency_level !== null + ) { + message.idempotency_level = methodOptions_IdempotencyLevelFromJSON( + object.idempotency_level + ); + } else { + message.idempotency_level = 0; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: MethodOptions): unknown { + const obj: any = {}; + message.deprecated !== undefined && (obj.deprecated = message.deprecated); + message.idempotency_level !== undefined && + (obj.idempotency_level = methodOptions_IdempotencyLevelToJSON( + message.idempotency_level + )); + if (message.uninterpreted_option) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined + ); + } else { + obj.uninterpreted_option = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): MethodOptions { + const message = { ...baseMethodOptions } as MethodOptions; + message.uninterpreted_option = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.idempotency_level !== undefined && + object.idempotency_level !== null + ) { + message.idempotency_level = object.idempotency_level; + } else { + message.idempotency_level = 0; + } + if ( + object.uninterpreted_option !== undefined && + object.uninterpreted_option !== null + ) { + for (const e of object.uninterpreted_option) { + message.uninterpreted_option.push(UninterpretedOption.fromPartial(e)); + } + } + return message; + }, +}; + +const baseUninterpretedOption: object = { + identifier_value: "", + positive_int_value: 0, + negative_int_value: 0, + double_value: 0, + aggregate_value: "", +}; + +export const UninterpretedOption = { + encode( + message: UninterpretedOption, + writer: Writer = Writer.create() + ): Writer { + for (const v of message.name) { + UninterpretedOption_NamePart.encode( + v!, + writer.uint32(18).fork() + ).ldelim(); + } + if (message.identifier_value !== "") { + writer.uint32(26).string(message.identifier_value); + } + if (message.positive_int_value !== 0) { + writer.uint32(32).uint64(message.positive_int_value); + } + if (message.negative_int_value !== 0) { + writer.uint32(40).int64(message.negative_int_value); + } + if (message.double_value !== 0) { + writer.uint32(49).double(message.double_value); + } + if (message.string_value.length !== 0) { + writer.uint32(58).bytes(message.string_value); + } + if (message.aggregate_value !== "") { + writer.uint32(66).string(message.aggregate_value); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): UninterpretedOption { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseUninterpretedOption } as UninterpretedOption; + message.name = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.name.push( + UninterpretedOption_NamePart.decode(reader, reader.uint32()) + ); + break; + case 3: + message.identifier_value = reader.string(); + break; + case 4: + message.positive_int_value = longToNumber(reader.uint64() as Long); + break; + case 5: + message.negative_int_value = longToNumber(reader.int64() as Long); + break; + case 6: + message.double_value = reader.double(); + break; + case 7: + message.string_value = reader.bytes(); + break; + case 8: + message.aggregate_value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): UninterpretedOption { + const message = { ...baseUninterpretedOption } as UninterpretedOption; + message.name = []; + if (object.name !== undefined && object.name !== null) { + for (const e of object.name) { + message.name.push(UninterpretedOption_NamePart.fromJSON(e)); + } + } + if ( + object.identifier_value !== undefined && + object.identifier_value !== null + ) { + message.identifier_value = String(object.identifier_value); + } else { + message.identifier_value = ""; + } + if ( + object.positive_int_value !== undefined && + object.positive_int_value !== null + ) { + message.positive_int_value = Number(object.positive_int_value); + } else { + message.positive_int_value = 0; + } + if ( + object.negative_int_value !== undefined && + object.negative_int_value !== null + ) { + message.negative_int_value = Number(object.negative_int_value); + } else { + message.negative_int_value = 0; + } + if (object.double_value !== undefined && object.double_value !== null) { + message.double_value = Number(object.double_value); + } else { + message.double_value = 0; + } + if (object.string_value !== undefined && object.string_value !== null) { + message.string_value = bytesFromBase64(object.string_value); + } + if ( + object.aggregate_value !== undefined && + object.aggregate_value !== null + ) { + message.aggregate_value = String(object.aggregate_value); + } else { + message.aggregate_value = ""; + } + return message; + }, + + toJSON(message: UninterpretedOption): unknown { + const obj: any = {}; + if (message.name) { + obj.name = message.name.map((e) => + e ? UninterpretedOption_NamePart.toJSON(e) : undefined + ); + } else { + obj.name = []; + } + message.identifier_value !== undefined && + (obj.identifier_value = message.identifier_value); + message.positive_int_value !== undefined && + (obj.positive_int_value = message.positive_int_value); + message.negative_int_value !== undefined && + (obj.negative_int_value = message.negative_int_value); + message.double_value !== undefined && + (obj.double_value = message.double_value); + message.string_value !== undefined && + (obj.string_value = base64FromBytes( + message.string_value !== undefined + ? message.string_value + : new Uint8Array() + )); + message.aggregate_value !== undefined && + (obj.aggregate_value = message.aggregate_value); + return obj; + }, + + fromPartial(object: DeepPartial): UninterpretedOption { + const message = { ...baseUninterpretedOption } as UninterpretedOption; + message.name = []; + if (object.name !== undefined && object.name !== null) { + for (const e of object.name) { + message.name.push(UninterpretedOption_NamePart.fromPartial(e)); + } + } + if ( + object.identifier_value !== undefined && + object.identifier_value !== null + ) { + message.identifier_value = object.identifier_value; + } else { + message.identifier_value = ""; + } + if ( + object.positive_int_value !== undefined && + object.positive_int_value !== null + ) { + message.positive_int_value = object.positive_int_value; + } else { + message.positive_int_value = 0; + } + if ( + object.negative_int_value !== undefined && + object.negative_int_value !== null + ) { + message.negative_int_value = object.negative_int_value; + } else { + message.negative_int_value = 0; + } + if (object.double_value !== undefined && object.double_value !== null) { + message.double_value = object.double_value; + } else { + message.double_value = 0; + } + if (object.string_value !== undefined && object.string_value !== null) { + message.string_value = object.string_value; + } else { + message.string_value = new Uint8Array(); + } + if ( + object.aggregate_value !== undefined && + object.aggregate_value !== null + ) { + message.aggregate_value = object.aggregate_value; + } else { + message.aggregate_value = ""; + } + return message; + }, +}; + +const baseUninterpretedOption_NamePart: object = { + name_part: "", + is_extension: false, +}; + +export const UninterpretedOption_NamePart = { + encode( + message: UninterpretedOption_NamePart, + writer: Writer = Writer.create() + ): Writer { + if (message.name_part !== "") { + writer.uint32(10).string(message.name_part); + } + if (message.is_extension === true) { + writer.uint32(16).bool(message.is_extension); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): UninterpretedOption_NamePart { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseUninterpretedOption_NamePart, + } as UninterpretedOption_NamePart; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name_part = reader.string(); + break; + case 2: + message.is_extension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): UninterpretedOption_NamePart { + const message = { + ...baseUninterpretedOption_NamePart, + } as UninterpretedOption_NamePart; + if (object.name_part !== undefined && object.name_part !== null) { + message.name_part = String(object.name_part); + } else { + message.name_part = ""; + } + if (object.is_extension !== undefined && object.is_extension !== null) { + message.is_extension = Boolean(object.is_extension); + } else { + message.is_extension = false; + } + return message; + }, + + toJSON(message: UninterpretedOption_NamePart): unknown { + const obj: any = {}; + message.name_part !== undefined && (obj.name_part = message.name_part); + message.is_extension !== undefined && + (obj.is_extension = message.is_extension); + return obj; + }, + + fromPartial( + object: DeepPartial + ): UninterpretedOption_NamePart { + const message = { + ...baseUninterpretedOption_NamePart, + } as UninterpretedOption_NamePart; + if (object.name_part !== undefined && object.name_part !== null) { + message.name_part = object.name_part; + } else { + message.name_part = ""; + } + if (object.is_extension !== undefined && object.is_extension !== null) { + message.is_extension = object.is_extension; + } else { + message.is_extension = false; + } + return message; + }, +}; + +const baseSourceCodeInfo: object = {}; + +export const SourceCodeInfo = { + encode(message: SourceCodeInfo, writer: Writer = Writer.create()): Writer { + for (const v of message.location) { + SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseSourceCodeInfo } as SourceCodeInfo; + message.location = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location.push( + SourceCodeInfo_Location.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): SourceCodeInfo { + const message = { ...baseSourceCodeInfo } as SourceCodeInfo; + message.location = []; + if (object.location !== undefined && object.location !== null) { + for (const e of object.location) { + message.location.push(SourceCodeInfo_Location.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: SourceCodeInfo): unknown { + const obj: any = {}; + if (message.location) { + obj.location = message.location.map((e) => + e ? SourceCodeInfo_Location.toJSON(e) : undefined + ); + } else { + obj.location = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): SourceCodeInfo { + const message = { ...baseSourceCodeInfo } as SourceCodeInfo; + message.location = []; + if (object.location !== undefined && object.location !== null) { + for (const e of object.location) { + message.location.push(SourceCodeInfo_Location.fromPartial(e)); + } + } + return message; + }, +}; + +const baseSourceCodeInfo_Location: object = { + path: 0, + span: 0, + leading_comments: "", + trailing_comments: "", + leading_detached_comments: "", +}; + +export const SourceCodeInfo_Location = { + encode( + message: SourceCodeInfo_Location, + writer: Writer = Writer.create() + ): Writer { + writer.uint32(10).fork(); + for (const v of message.path) { + writer.int32(v); + } + writer.ldelim(); + writer.uint32(18).fork(); + for (const v of message.span) { + writer.int32(v); + } + writer.ldelim(); + if (message.leading_comments !== "") { + writer.uint32(26).string(message.leading_comments); + } + if (message.trailing_comments !== "") { + writer.uint32(34).string(message.trailing_comments); + } + for (const v of message.leading_detached_comments) { + writer.uint32(50).string(v!); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): SourceCodeInfo_Location { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseSourceCodeInfo_Location, + } as SourceCodeInfo_Location; + message.path = []; + message.span = []; + message.leading_detached_comments = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.path.push(reader.int32()); + } + } else { + message.path.push(reader.int32()); + } + break; + case 2: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.span.push(reader.int32()); + } + } else { + message.span.push(reader.int32()); + } + break; + case 3: + message.leading_comments = reader.string(); + break; + case 4: + message.trailing_comments = reader.string(); + break; + case 6: + message.leading_detached_comments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): SourceCodeInfo_Location { + const message = { + ...baseSourceCodeInfo_Location, + } as SourceCodeInfo_Location; + message.path = []; + message.span = []; + message.leading_detached_comments = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(Number(e)); + } + } + if (object.span !== undefined && object.span !== null) { + for (const e of object.span) { + message.span.push(Number(e)); + } + } + if ( + object.leading_comments !== undefined && + object.leading_comments !== null + ) { + message.leading_comments = String(object.leading_comments); + } else { + message.leading_comments = ""; + } + if ( + object.trailing_comments !== undefined && + object.trailing_comments !== null + ) { + message.trailing_comments = String(object.trailing_comments); + } else { + message.trailing_comments = ""; + } + if ( + object.leading_detached_comments !== undefined && + object.leading_detached_comments !== null + ) { + for (const e of object.leading_detached_comments) { + message.leading_detached_comments.push(String(e)); + } + } + return message; + }, + + toJSON(message: SourceCodeInfo_Location): unknown { + const obj: any = {}; + if (message.path) { + obj.path = message.path.map((e) => e); + } else { + obj.path = []; + } + if (message.span) { + obj.span = message.span.map((e) => e); + } else { + obj.span = []; + } + message.leading_comments !== undefined && + (obj.leading_comments = message.leading_comments); + message.trailing_comments !== undefined && + (obj.trailing_comments = message.trailing_comments); + if (message.leading_detached_comments) { + obj.leading_detached_comments = message.leading_detached_comments.map( + (e) => e + ); + } else { + obj.leading_detached_comments = []; + } + return obj; + }, + + fromPartial( + object: DeepPartial + ): SourceCodeInfo_Location { + const message = { + ...baseSourceCodeInfo_Location, + } as SourceCodeInfo_Location; + message.path = []; + message.span = []; + message.leading_detached_comments = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(e); + } + } + if (object.span !== undefined && object.span !== null) { + for (const e of object.span) { + message.span.push(e); + } + } + if ( + object.leading_comments !== undefined && + object.leading_comments !== null + ) { + message.leading_comments = object.leading_comments; + } else { + message.leading_comments = ""; + } + if ( + object.trailing_comments !== undefined && + object.trailing_comments !== null + ) { + message.trailing_comments = object.trailing_comments; + } else { + message.trailing_comments = ""; + } + if ( + object.leading_detached_comments !== undefined && + object.leading_detached_comments !== null + ) { + for (const e of object.leading_detached_comments) { + message.leading_detached_comments.push(e); + } + } + return message; + }, +}; + +const baseGeneratedCodeInfo: object = {}; + +export const GeneratedCodeInfo = { + encode(message: GeneratedCodeInfo, writer: Writer = Writer.create()): Writer { + for (const v of message.annotation) { + GeneratedCodeInfo_Annotation.encode( + v!, + writer.uint32(10).fork() + ).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): GeneratedCodeInfo { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; + message.annotation = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.annotation.push( + GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): GeneratedCodeInfo { + const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; + message.annotation = []; + if (object.annotation !== undefined && object.annotation !== null) { + for (const e of object.annotation) { + message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); + } + } + return message; + }, + + toJSON(message: GeneratedCodeInfo): unknown { + const obj: any = {}; + if (message.annotation) { + obj.annotation = message.annotation.map((e) => + e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined + ); + } else { + obj.annotation = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): GeneratedCodeInfo { + const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; + message.annotation = []; + if (object.annotation !== undefined && object.annotation !== null) { + for (const e of object.annotation) { + message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); + } + } + return message; + }, +}; + +const baseGeneratedCodeInfo_Annotation: object = { + path: 0, + source_file: "", + begin: 0, + end: 0, +}; + +export const GeneratedCodeInfo_Annotation = { + encode( + message: GeneratedCodeInfo_Annotation, + writer: Writer = Writer.create() + ): Writer { + writer.uint32(10).fork(); + for (const v of message.path) { + writer.int32(v); + } + writer.ldelim(); + if (message.source_file !== "") { + writer.uint32(18).string(message.source_file); + } + if (message.begin !== 0) { + writer.uint32(24).int32(message.begin); + } + if (message.end !== 0) { + writer.uint32(32).int32(message.end); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): GeneratedCodeInfo_Annotation { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseGeneratedCodeInfo_Annotation, + } as GeneratedCodeInfo_Annotation; + message.path = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.path.push(reader.int32()); + } + } else { + message.path.push(reader.int32()); + } + break; + case 2: + message.source_file = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): GeneratedCodeInfo_Annotation { + const message = { + ...baseGeneratedCodeInfo_Annotation, + } as GeneratedCodeInfo_Annotation; + message.path = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(Number(e)); + } + } + if (object.source_file !== undefined && object.source_file !== null) { + message.source_file = String(object.source_file); + } else { + message.source_file = ""; + } + if (object.begin !== undefined && object.begin !== null) { + message.begin = Number(object.begin); + } else { + message.begin = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + return message; + }, + + toJSON(message: GeneratedCodeInfo_Annotation): unknown { + const obj: any = {}; + if (message.path) { + obj.path = message.path.map((e) => e); + } else { + obj.path = []; + } + message.source_file !== undefined && + (obj.source_file = message.source_file); + message.begin !== undefined && (obj.begin = message.begin); + message.end !== undefined && (obj.end = message.end); + return obj; + }, + + fromPartial( + object: DeepPartial + ): GeneratedCodeInfo_Annotation { + const message = { + ...baseGeneratedCodeInfo_Annotation, + } as GeneratedCodeInfo_Annotation; + message.path = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(e); + } + } + if (object.source_file !== undefined && object.source_file !== null) { + message.source_file = object.source_file; + } else { + message.source_file = ""; + } + if (object.begin !== undefined && object.begin !== null) { + message.begin = object.begin; + } else { + message.begin = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +const atob: (b64: string) => string = + globalThis.atob || + ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +function bytesFromBase64(b64: string): Uint8Array { + const bin = atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; +} + +const btoa: (bin: string) => string = + globalThis.btoa || + ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +function base64FromBytes(arr: Uint8Array): string { + const bin: string[] = []; + for (let i = 0; i < arr.byteLength; ++i) { + bin.push(String.fromCharCode(arr[i])); + } + return btoa(bin.join("")); +} + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/authorization.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/authorization.ts new file mode 100644 index 00000000..822337d8 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/authorization.ts @@ -0,0 +1,99 @@ +/* eslint-disable */ +import { Permissions } from "../nftadmin/permissions"; +import { Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.nftadmin"; + +export interface Authorization { + root_admin: string; + permissions: Permissions | undefined; +} + +const baseAuthorization: object = { root_admin: "" }; + +export const Authorization = { + encode(message: Authorization, writer: Writer = Writer.create()): Writer { + if (message.root_admin !== "") { + writer.uint32(10).string(message.root_admin); + } + if (message.permissions !== undefined) { + Permissions.encode( + message.permissions, + writer.uint32(18).fork() + ).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): Authorization { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseAuthorization } as Authorization; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.root_admin = reader.string(); + break; + case 2: + message.permissions = Permissions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): Authorization { + const message = { ...baseAuthorization } as Authorization; + if (object.root_admin !== undefined && object.root_admin !== null) { + message.root_admin = String(object.root_admin); + } else { + message.root_admin = ""; + } + if (object.permissions !== undefined && object.permissions !== null) { + message.permissions = Permissions.fromJSON(object.permissions); + } else { + message.permissions = undefined; + } + return message; + }, + + toJSON(message: Authorization): unknown { + const obj: any = {}; + message.root_admin !== undefined && (obj.root_admin = message.root_admin); + message.permissions !== undefined && + (obj.permissions = message.permissions + ? Permissions.toJSON(message.permissions) + : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): Authorization { + const message = { ...baseAuthorization } as Authorization; + if (object.root_admin !== undefined && object.root_admin !== null) { + message.root_admin = object.root_admin; + } else { + message.root_admin = ""; + } + if (object.permissions !== undefined && object.permissions !== null) { + message.permissions = Permissions.fromPartial(object.permissions); + } else { + message.permissions = undefined; + } + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/genesis.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/genesis.ts new file mode 100644 index 00000000..bb1aa7d7 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/genesis.ts @@ -0,0 +1,103 @@ +/* eslint-disable */ +import { Params } from "../nftadmin/params"; +import { Authorization } from "../nftadmin/authorization"; +import { Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.nftadmin"; + +/** GenesisState defines the nftadmin module's genesis state. */ +export interface GenesisState { + params: Params | undefined; + /** this line is used by starport scaffolding # genesis/proto/state */ + authorization: Authorization | undefined; +} + +const baseGenesisState: object = {}; + +export const GenesisState = { + encode(message: GenesisState, writer: Writer = Writer.create()): Writer { + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(10).fork()).ldelim(); + } + if (message.authorization !== undefined) { + Authorization.encode( + message.authorization, + writer.uint32(18).fork() + ).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): GenesisState { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseGenesisState } as GenesisState; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = Params.decode(reader, reader.uint32()); + break; + case 2: + message.authorization = Authorization.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): GenesisState { + const message = { ...baseGenesisState } as GenesisState; + if (object.params !== undefined && object.params !== null) { + message.params = Params.fromJSON(object.params); + } else { + message.params = undefined; + } + if (object.authorization !== undefined && object.authorization !== null) { + message.authorization = Authorization.fromJSON(object.authorization); + } else { + message.authorization = undefined; + } + return message; + }, + + toJSON(message: GenesisState): unknown { + const obj: any = {}; + message.params !== undefined && + (obj.params = message.params ? Params.toJSON(message.params) : undefined); + message.authorization !== undefined && + (obj.authorization = message.authorization + ? Authorization.toJSON(message.authorization) + : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): GenesisState { + const message = { ...baseGenesisState } as GenesisState; + if (object.params !== undefined && object.params !== null) { + message.params = Params.fromPartial(object.params); + } else { + message.params = undefined; + } + if (object.authorization !== undefined && object.authorization !== null) { + message.authorization = Authorization.fromPartial(object.authorization); + } else { + message.authorization = undefined; + } + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/params.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/params.ts new file mode 100644 index 00000000..9cfab790 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/params.ts @@ -0,0 +1,56 @@ +/* eslint-disable */ +import { Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.nftadmin"; + +/** Params defines the parameters for the module. */ +export interface Params {} + +const baseParams: object = {}; + +export const Params = { + encode(_: Params, writer: Writer = Writer.create()): Writer { + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): Params { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseParams } as Params; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(_: any): Params { + const message = { ...baseParams } as Params; + return message; + }, + + toJSON(_: Params): unknown { + const obj: any = {}; + return obj; + }, + + fromPartial(_: DeepPartial): Params { + const message = { ...baseParams } as Params; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/permissions.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/permissions.ts new file mode 100644 index 00000000..adad865c --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/permissions.ts @@ -0,0 +1,253 @@ +/* eslint-disable */ +import { Writer, Reader } from "protobufjs/minimal"; + +export const protobufPackage = "thesixnetwork.sixnft.nftadmin"; + +export interface AddressList { + addresses: string[]; +} + +export interface Permissions { + map_name: { [key: string]: AddressList }; +} + +export interface Permissions_MapNameEntry { + key: string; + value: AddressList | undefined; +} + +const baseAddressList: object = { addresses: "" }; + +export const AddressList = { + encode(message: AddressList, writer: Writer = Writer.create()): Writer { + for (const v of message.addresses) { + writer.uint32(10).string(v!); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): AddressList { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseAddressList } as AddressList; + message.addresses = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.addresses.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): AddressList { + const message = { ...baseAddressList } as AddressList; + message.addresses = []; + if (object.addresses !== undefined && object.addresses !== null) { + for (const e of object.addresses) { + message.addresses.push(String(e)); + } + } + return message; + }, + + toJSON(message: AddressList): unknown { + const obj: any = {}; + if (message.addresses) { + obj.addresses = message.addresses.map((e) => e); + } else { + obj.addresses = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): AddressList { + const message = { ...baseAddressList } as AddressList; + message.addresses = []; + if (object.addresses !== undefined && object.addresses !== null) { + for (const e of object.addresses) { + message.addresses.push(e); + } + } + return message; + }, +}; + +const basePermissions: object = {}; + +export const Permissions = { + encode(message: Permissions, writer: Writer = Writer.create()): Writer { + Object.entries(message.map_name).forEach(([key, value]) => { + Permissions_MapNameEntry.encode( + { key: key as any, value }, + writer.uint32(10).fork() + ).ldelim(); + }); + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): Permissions { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...basePermissions } as Permissions; + message.map_name = {}; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + const entry1 = Permissions_MapNameEntry.decode( + reader, + reader.uint32() + ); + if (entry1.value !== undefined) { + message.map_name[entry1.key] = entry1.value; + } + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): Permissions { + const message = { ...basePermissions } as Permissions; + message.map_name = {}; + if (object.map_name !== undefined && object.map_name !== null) { + Object.entries(object.map_name).forEach(([key, value]) => { + message.map_name[key] = AddressList.fromJSON(value); + }); + } + return message; + }, + + toJSON(message: Permissions): unknown { + const obj: any = {}; + obj.map_name = {}; + if (message.map_name) { + Object.entries(message.map_name).forEach(([k, v]) => { + obj.map_name[k] = AddressList.toJSON(v); + }); + } + return obj; + }, + + fromPartial(object: DeepPartial): Permissions { + const message = { ...basePermissions } as Permissions; + message.map_name = {}; + if (object.map_name !== undefined && object.map_name !== null) { + Object.entries(object.map_name).forEach(([key, value]) => { + if (value !== undefined) { + message.map_name[key] = AddressList.fromPartial(value); + } + }); + } + return message; + }, +}; + +const basePermissions_MapNameEntry: object = { key: "" }; + +export const Permissions_MapNameEntry = { + encode( + message: Permissions_MapNameEntry, + writer: Writer = Writer.create() + ): Writer { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + AddressList.encode(message.value, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): Permissions_MapNameEntry { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...basePermissions_MapNameEntry, + } as Permissions_MapNameEntry; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.value = AddressList.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): Permissions_MapNameEntry { + const message = { + ...basePermissions_MapNameEntry, + } as Permissions_MapNameEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = AddressList.fromJSON(object.value); + } else { + message.value = undefined; + } + return message; + }, + + toJSON(message: Permissions_MapNameEntry): unknown { + const obj: any = {}; + message.key !== undefined && (obj.key = message.key); + message.value !== undefined && + (obj.value = message.value + ? AddressList.toJSON(message.value) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): Permissions_MapNameEntry { + const message = { + ...basePermissions_MapNameEntry, + } as Permissions_MapNameEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = AddressList.fromPartial(object.value); + } else { + message.value = undefined; + } + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/query.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/query.ts new file mode 100644 index 00000000..a6aba13b --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/query.ts @@ -0,0 +1,304 @@ +/* eslint-disable */ +import { Reader, Writer } from "protobufjs/minimal"; +import { Params } from "../nftadmin/params"; +import { Authorization } from "../nftadmin/authorization"; + +export const protobufPackage = "thesixnetwork.sixnft.nftadmin"; + +/** QueryParamsRequest is request type for the Query/Params RPC method. */ +export interface QueryParamsRequest {} + +/** QueryParamsResponse is response type for the Query/Params RPC method. */ +export interface QueryParamsResponse { + /** params holds all the parameters of this module. */ + params: Params | undefined; +} + +export interface QueryGetAuthorizationRequest {} + +export interface QueryGetAuthorizationResponse { + Authorization: Authorization | undefined; +} + +const baseQueryParamsRequest: object = {}; + +export const QueryParamsRequest = { + encode(_: QueryParamsRequest, writer: Writer = Writer.create()): Writer { + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): QueryParamsRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseQueryParamsRequest } as QueryParamsRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(_: any): QueryParamsRequest { + const message = { ...baseQueryParamsRequest } as QueryParamsRequest; + return message; + }, + + toJSON(_: QueryParamsRequest): unknown { + const obj: any = {}; + return obj; + }, + + fromPartial(_: DeepPartial): QueryParamsRequest { + const message = { ...baseQueryParamsRequest } as QueryParamsRequest; + return message; + }, +}; + +const baseQueryParamsResponse: object = {}; + +export const QueryParamsResponse = { + encode( + message: QueryParamsResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.params !== undefined) { + Params.encode(message.params, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): QueryParamsResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseQueryParamsResponse } as QueryParamsResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryParamsResponse { + const message = { ...baseQueryParamsResponse } as QueryParamsResponse; + if (object.params !== undefined && object.params !== null) { + message.params = Params.fromJSON(object.params); + } else { + message.params = undefined; + } + return message; + }, + + toJSON(message: QueryParamsResponse): unknown { + const obj: any = {}; + message.params !== undefined && + (obj.params = message.params ? Params.toJSON(message.params) : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): QueryParamsResponse { + const message = { ...baseQueryParamsResponse } as QueryParamsResponse; + if (object.params !== undefined && object.params !== null) { + message.params = Params.fromPartial(object.params); + } else { + message.params = undefined; + } + return message; + }, +}; + +const baseQueryGetAuthorizationRequest: object = {}; + +export const QueryGetAuthorizationRequest = { + encode( + _: QueryGetAuthorizationRequest, + writer: Writer = Writer.create() + ): Writer { + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryGetAuthorizationRequest { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryGetAuthorizationRequest, + } as QueryGetAuthorizationRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(_: any): QueryGetAuthorizationRequest { + const message = { + ...baseQueryGetAuthorizationRequest, + } as QueryGetAuthorizationRequest; + return message; + }, + + toJSON(_: QueryGetAuthorizationRequest): unknown { + const obj: any = {}; + return obj; + }, + + fromPartial( + _: DeepPartial + ): QueryGetAuthorizationRequest { + const message = { + ...baseQueryGetAuthorizationRequest, + } as QueryGetAuthorizationRequest; + return message; + }, +}; + +const baseQueryGetAuthorizationResponse: object = {}; + +export const QueryGetAuthorizationResponse = { + encode( + message: QueryGetAuthorizationResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.Authorization !== undefined) { + Authorization.encode( + message.Authorization, + writer.uint32(10).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): QueryGetAuthorizationResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseQueryGetAuthorizationResponse, + } as QueryGetAuthorizationResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.Authorization = Authorization.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryGetAuthorizationResponse { + const message = { + ...baseQueryGetAuthorizationResponse, + } as QueryGetAuthorizationResponse; + if (object.Authorization !== undefined && object.Authorization !== null) { + message.Authorization = Authorization.fromJSON(object.Authorization); + } else { + message.Authorization = undefined; + } + return message; + }, + + toJSON(message: QueryGetAuthorizationResponse): unknown { + const obj: any = {}; + message.Authorization !== undefined && + (obj.Authorization = message.Authorization + ? Authorization.toJSON(message.Authorization) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): QueryGetAuthorizationResponse { + const message = { + ...baseQueryGetAuthorizationResponse, + } as QueryGetAuthorizationResponse; + if (object.Authorization !== undefined && object.Authorization !== null) { + message.Authorization = Authorization.fromPartial(object.Authorization); + } else { + message.Authorization = undefined; + } + return message; + }, +}; + +/** Query defines the gRPC querier service. */ +export interface Query { + /** Parameters queries the parameters of the module. */ + Params(request: QueryParamsRequest): Promise; + /** Queries a Authorization by index. */ + Authorization( + request: QueryGetAuthorizationRequest + ): Promise; +} + +export class QueryClientImpl implements Query { + private readonly rpc: Rpc; + constructor(rpc: Rpc) { + this.rpc = rpc; + } + Params(request: QueryParamsRequest): Promise { + const data = QueryParamsRequest.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftadmin.Query", + "Params", + data + ); + return promise.then((data) => QueryParamsResponse.decode(new Reader(data))); + } + + Authorization( + request: QueryGetAuthorizationRequest + ): Promise { + const data = QueryGetAuthorizationRequest.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftadmin.Query", + "Authorization", + data + ); + return promise.then((data) => + QueryGetAuthorizationResponse.decode(new Reader(data)) + ); + } +} + +interface Rpc { + request( + service: string, + method: string, + data: Uint8Array + ): Promise; +} + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/tx.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/tx.ts new file mode 100644 index 00000000..04134b12 --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/types/nftadmin/tx.ts @@ -0,0 +1,799 @@ +/* eslint-disable */ +import { Reader, util, configure, Writer } from "protobufjs/minimal"; +import * as Long from "long"; + +export const protobufPackage = "thesixnetwork.sixnft.nftadmin"; + +export interface MsgGrantPermission { + creator: string; + name: string; + grantee: string; +} + +export interface MsgGrantPermissionResponse { + grantee: string; +} + +export interface MsgRevokePermission { + creator: string; + name: string; + revokee: string; +} + +export interface MsgRevokePermissionResponse { + revokee: string; +} + +export interface MsgMint { + creator: string; + amount: number; + token: string; +} + +export interface MsgMintResponse { + amount: string; + token: string; +} + +export interface MsgBurn { + creator: string; + amount: number; + token: string; +} + +export interface MsgBurnResponse { + amount: string; + token: string; +} + +const baseMsgGrantPermission: object = { creator: "", name: "", grantee: "" }; + +export const MsgGrantPermission = { + encode( + message: MsgGrantPermission, + writer: Writer = Writer.create() + ): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.name !== "") { + writer.uint32(18).string(message.name); + } + if (message.grantee !== "") { + writer.uint32(26).string(message.grantee); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgGrantPermission { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMsgGrantPermission } as MsgGrantPermission; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + case 3: + message.grantee = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgGrantPermission { + const message = { ...baseMsgGrantPermission } as MsgGrantPermission; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.grantee !== undefined && object.grantee !== null) { + message.grantee = String(object.grantee); + } else { + message.grantee = ""; + } + return message; + }, + + toJSON(message: MsgGrantPermission): unknown { + const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.name !== undefined && (obj.name = message.name); + message.grantee !== undefined && (obj.grantee = message.grantee); + return obj; + }, + + fromPartial(object: DeepPartial): MsgGrantPermission { + const message = { ...baseMsgGrantPermission } as MsgGrantPermission; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.grantee !== undefined && object.grantee !== null) { + message.grantee = object.grantee; + } else { + message.grantee = ""; + } + return message; + }, +}; + +const baseMsgGrantPermissionResponse: object = { grantee: "" }; + +export const MsgGrantPermissionResponse = { + encode( + message: MsgGrantPermissionResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.grantee !== "") { + writer.uint32(10).string(message.grantee); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): MsgGrantPermissionResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseMsgGrantPermissionResponse, + } as MsgGrantPermissionResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.grantee = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgGrantPermissionResponse { + const message = { + ...baseMsgGrantPermissionResponse, + } as MsgGrantPermissionResponse; + if (object.grantee !== undefined && object.grantee !== null) { + message.grantee = String(object.grantee); + } else { + message.grantee = ""; + } + return message; + }, + + toJSON(message: MsgGrantPermissionResponse): unknown { + const obj: any = {}; + message.grantee !== undefined && (obj.grantee = message.grantee); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MsgGrantPermissionResponse { + const message = { + ...baseMsgGrantPermissionResponse, + } as MsgGrantPermissionResponse; + if (object.grantee !== undefined && object.grantee !== null) { + message.grantee = object.grantee; + } else { + message.grantee = ""; + } + return message; + }, +}; + +const baseMsgRevokePermission: object = { creator: "", name: "", revokee: "" }; + +export const MsgRevokePermission = { + encode( + message: MsgRevokePermission, + writer: Writer = Writer.create() + ): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.name !== "") { + writer.uint32(18).string(message.name); + } + if (message.revokee !== "") { + writer.uint32(26).string(message.revokee); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgRevokePermission { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMsgRevokePermission } as MsgRevokePermission; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + case 3: + message.revokee = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgRevokePermission { + const message = { ...baseMsgRevokePermission } as MsgRevokePermission; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.revokee !== undefined && object.revokee !== null) { + message.revokee = String(object.revokee); + } else { + message.revokee = ""; + } + return message; + }, + + toJSON(message: MsgRevokePermission): unknown { + const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.name !== undefined && (obj.name = message.name); + message.revokee !== undefined && (obj.revokee = message.revokee); + return obj; + }, + + fromPartial(object: DeepPartial): MsgRevokePermission { + const message = { ...baseMsgRevokePermission } as MsgRevokePermission; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.revokee !== undefined && object.revokee !== null) { + message.revokee = object.revokee; + } else { + message.revokee = ""; + } + return message; + }, +}; + +const baseMsgRevokePermissionResponse: object = { revokee: "" }; + +export const MsgRevokePermissionResponse = { + encode( + message: MsgRevokePermissionResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.revokee !== "") { + writer.uint32(10).string(message.revokee); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): MsgRevokePermissionResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseMsgRevokePermissionResponse, + } as MsgRevokePermissionResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.revokee = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgRevokePermissionResponse { + const message = { + ...baseMsgRevokePermissionResponse, + } as MsgRevokePermissionResponse; + if (object.revokee !== undefined && object.revokee !== null) { + message.revokee = String(object.revokee); + } else { + message.revokee = ""; + } + return message; + }, + + toJSON(message: MsgRevokePermissionResponse): unknown { + const obj: any = {}; + message.revokee !== undefined && (obj.revokee = message.revokee); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MsgRevokePermissionResponse { + const message = { + ...baseMsgRevokePermissionResponse, + } as MsgRevokePermissionResponse; + if (object.revokee !== undefined && object.revokee !== null) { + message.revokee = object.revokee; + } else { + message.revokee = ""; + } + return message; + }, +}; + +const baseMsgMint: object = { creator: "", amount: 0, token: "" }; + +export const MsgMint = { + encode(message: MsgMint, writer: Writer = Writer.create()): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.amount !== 0) { + writer.uint32(16).uint64(message.amount); + } + if (message.token !== "") { + writer.uint32(26).string(message.token); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgMint { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMsgMint } as MsgMint; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.amount = longToNumber(reader.uint64() as Long); + break; + case 3: + message.token = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgMint { + const message = { ...baseMsgMint } as MsgMint; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if (object.amount !== undefined && object.amount !== null) { + message.amount = Number(object.amount); + } else { + message.amount = 0; + } + if (object.token !== undefined && object.token !== null) { + message.token = String(object.token); + } else { + message.token = ""; + } + return message; + }, + + toJSON(message: MsgMint): unknown { + const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.amount !== undefined && (obj.amount = message.amount); + message.token !== undefined && (obj.token = message.token); + return obj; + }, + + fromPartial(object: DeepPartial): MsgMint { + const message = { ...baseMsgMint } as MsgMint; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if (object.amount !== undefined && object.amount !== null) { + message.amount = object.amount; + } else { + message.amount = 0; + } + if (object.token !== undefined && object.token !== null) { + message.token = object.token; + } else { + message.token = ""; + } + return message; + }, +}; + +const baseMsgMintResponse: object = { amount: "", token: "" }; + +export const MsgMintResponse = { + encode(message: MsgMintResponse, writer: Writer = Writer.create()): Writer { + if (message.amount !== "") { + writer.uint32(10).string(message.amount); + } + if (message.token !== "") { + writer.uint32(18).string(message.token); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgMintResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMsgMintResponse } as MsgMintResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.amount = reader.string(); + break; + case 2: + message.token = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgMintResponse { + const message = { ...baseMsgMintResponse } as MsgMintResponse; + if (object.amount !== undefined && object.amount !== null) { + message.amount = String(object.amount); + } else { + message.amount = ""; + } + if (object.token !== undefined && object.token !== null) { + message.token = String(object.token); + } else { + message.token = ""; + } + return message; + }, + + toJSON(message: MsgMintResponse): unknown { + const obj: any = {}; + message.amount !== undefined && (obj.amount = message.amount); + message.token !== undefined && (obj.token = message.token); + return obj; + }, + + fromPartial(object: DeepPartial): MsgMintResponse { + const message = { ...baseMsgMintResponse } as MsgMintResponse; + if (object.amount !== undefined && object.amount !== null) { + message.amount = object.amount; + } else { + message.amount = ""; + } + if (object.token !== undefined && object.token !== null) { + message.token = object.token; + } else { + message.token = ""; + } + return message; + }, +}; + +const baseMsgBurn: object = { creator: "", amount: 0, token: "" }; + +export const MsgBurn = { + encode(message: MsgBurn, writer: Writer = Writer.create()): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.amount !== 0) { + writer.uint32(16).uint64(message.amount); + } + if (message.token !== "") { + writer.uint32(26).string(message.token); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgBurn { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMsgBurn } as MsgBurn; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.amount = longToNumber(reader.uint64() as Long); + break; + case 3: + message.token = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgBurn { + const message = { ...baseMsgBurn } as MsgBurn; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if (object.amount !== undefined && object.amount !== null) { + message.amount = Number(object.amount); + } else { + message.amount = 0; + } + if (object.token !== undefined && object.token !== null) { + message.token = String(object.token); + } else { + message.token = ""; + } + return message; + }, + + toJSON(message: MsgBurn): unknown { + const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.amount !== undefined && (obj.amount = message.amount); + message.token !== undefined && (obj.token = message.token); + return obj; + }, + + fromPartial(object: DeepPartial): MsgBurn { + const message = { ...baseMsgBurn } as MsgBurn; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if (object.amount !== undefined && object.amount !== null) { + message.amount = object.amount; + } else { + message.amount = 0; + } + if (object.token !== undefined && object.token !== null) { + message.token = object.token; + } else { + message.token = ""; + } + return message; + }, +}; + +const baseMsgBurnResponse: object = { amount: "", token: "" }; + +export const MsgBurnResponse = { + encode(message: MsgBurnResponse, writer: Writer = Writer.create()): Writer { + if (message.amount !== "") { + writer.uint32(10).string(message.amount); + } + if (message.token !== "") { + writer.uint32(18).string(message.token); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgBurnResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMsgBurnResponse } as MsgBurnResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.amount = reader.string(); + break; + case 2: + message.token = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgBurnResponse { + const message = { ...baseMsgBurnResponse } as MsgBurnResponse; + if (object.amount !== undefined && object.amount !== null) { + message.amount = String(object.amount); + } else { + message.amount = ""; + } + if (object.token !== undefined && object.token !== null) { + message.token = String(object.token); + } else { + message.token = ""; + } + return message; + }, + + toJSON(message: MsgBurnResponse): unknown { + const obj: any = {}; + message.amount !== undefined && (obj.amount = message.amount); + message.token !== undefined && (obj.token = message.token); + return obj; + }, + + fromPartial(object: DeepPartial): MsgBurnResponse { + const message = { ...baseMsgBurnResponse } as MsgBurnResponse; + if (object.amount !== undefined && object.amount !== null) { + message.amount = object.amount; + } else { + message.amount = ""; + } + if (object.token !== undefined && object.token !== null) { + message.token = object.token; + } else { + message.token = ""; + } + return message; + }, +}; + +/** Msg defines the Msg service. */ +export interface Msg { + GrantPermission( + request: MsgGrantPermission + ): Promise; + RevokePermission( + request: MsgRevokePermission + ): Promise; + Mint(request: MsgMint): Promise; + /** this line is used by starport scaffolding # proto/tx/rpc */ + Burn(request: MsgBurn): Promise; +} + +export class MsgClientImpl implements Msg { + private readonly rpc: Rpc; + constructor(rpc: Rpc) { + this.rpc = rpc; + } + GrantPermission( + request: MsgGrantPermission + ): Promise { + const data = MsgGrantPermission.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftadmin.Msg", + "GrantPermission", + data + ); + return promise.then((data) => + MsgGrantPermissionResponse.decode(new Reader(data)) + ); + } + + RevokePermission( + request: MsgRevokePermission + ): Promise { + const data = MsgRevokePermission.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftadmin.Msg", + "RevokePermission", + data + ); + return promise.then((data) => + MsgRevokePermissionResponse.decode(new Reader(data)) + ); + } + + Mint(request: MsgMint): Promise { + const data = MsgMint.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftadmin.Msg", + "Mint", + data + ); + return promise.then((data) => MsgMintResponse.decode(new Reader(data))); + } + + Burn(request: MsgBurn): Promise { + const data = MsgBurn.encode(request).finish(); + const promise = this.rpc.request( + "thesixnetwork.sixnft.nftadmin.Msg", + "Burn", + data + ); + return promise.then((data) => MsgBurnResponse.decode(new Reader(data))); + } +} + +interface Rpc { + request( + service: string, + method: string, + data: Uint8Array + ): Promise; +} + +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +type Builtin = Date | Function | Uint8Array | string | number | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (util.Long !== Long) { + util.Long = Long as any; + configure(); +} diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/package.json b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/package.json new file mode 100755 index 00000000..8537b6db --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/package.json @@ -0,0 +1,18 @@ +{ + "name": "thesixnetwork-sixnft-nftadmin-js", + "version": "0.1.0", + "description": "Autogenerated vuex store for Cosmos module thesixnetwork.sixnft.nftadmin", + "author": "Starport Codegen ", + "homepage": "http://github.com/thesixnetwork/sixnft/x/nftadmin/types", + "license": "Apache-2.0", + "licenses": [ + { + "type": "Apache-2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0" + } + ], + "main": "index.js", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/vuex-root b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/vuex-root new file mode 100755 index 00000000..0fcc121a --- /dev/null +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/vuex-root @@ -0,0 +1 @@ +THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/index.ts index 0384daee..22eeee7c 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/index.ts @@ -352,18 +352,18 @@ export default { } } }, - async sendMsgCreateMintRequest({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgSubmitActionResponse({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateMintRequest(value) + const msg = await txClient.msgSubmitActionResponse(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateMintRequest:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSubmitActionResponse:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateMintRequest:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgSubmitActionResponse:Send Could not broadcast Tx: '+ e.message) } } }, @@ -382,18 +382,18 @@ export default { } } }, - async sendMsgSubmitActionResponse({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateMintRequest({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSubmitActionResponse(value) + const msg = await txClient.msgCreateMintRequest(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSubmitActionResponse:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateMintRequest:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgSubmitActionResponse:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateMintRequest:Send Could not broadcast Tx: '+ e.message) } } }, @@ -411,16 +411,16 @@ export default { } } }, - async MsgCreateMintRequest({ rootGetters }, { value }) { + async MsgSubmitActionResponse({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateMintRequest(value) + const msg = await txClient.msgSubmitActionResponse(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateMintRequest:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSubmitActionResponse:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateMintRequest:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgSubmitActionResponse:Create Could not create message: ' + e.message) } } }, @@ -437,16 +437,16 @@ export default { } } }, - async MsgSubmitActionResponse({ rootGetters }, { value }) { + async MsgCreateMintRequest({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSubmitActionResponse(value) + const msg = await txClient.msgCreateMintRequest(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSubmitActionResponse:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateMintRequest:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgSubmitActionResponse:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateMintRequest:Create Could not create message: ' + e.message) } } }, diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/index.ts index 507c50a7..896306e2 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/index.ts @@ -5,16 +5,16 @@ import { SigningStargateClient } from "@cosmjs/stargate"; import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { Api } from "./rest"; import { MsgCreateActionRequest } from "./types/nftoracle/tx"; -import { MsgCreateMintRequest } from "./types/nftoracle/tx"; -import { MsgSubmitMintResponse } from "./types/nftoracle/tx"; import { MsgSubmitActionResponse } from "./types/nftoracle/tx"; +import { MsgSubmitMintResponse } from "./types/nftoracle/tx"; +import { MsgCreateMintRequest } from "./types/nftoracle/tx"; const types = [ ["/thesixnetwork.sixnft.nftoracle.MsgCreateActionRequest", MsgCreateActionRequest], - ["/thesixnetwork.sixnft.nftoracle.MsgCreateMintRequest", MsgCreateMintRequest], - ["/thesixnetwork.sixnft.nftoracle.MsgSubmitMintResponse", MsgSubmitMintResponse], ["/thesixnetwork.sixnft.nftoracle.MsgSubmitActionResponse", MsgSubmitActionResponse], + ["/thesixnetwork.sixnft.nftoracle.MsgSubmitMintResponse", MsgSubmitMintResponse], + ["/thesixnetwork.sixnft.nftoracle.MsgCreateMintRequest", MsgCreateMintRequest], ]; export const MissingWalletError = new Error("wallet is required"); @@ -48,9 +48,9 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = return { signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), msgCreateActionRequest: (data: MsgCreateActionRequest): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgCreateActionRequest", value: MsgCreateActionRequest.fromPartial( data ) }), - msgCreateMintRequest: (data: MsgCreateMintRequest): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgCreateMintRequest", value: MsgCreateMintRequest.fromPartial( data ) }), - msgSubmitMintResponse: (data: MsgSubmitMintResponse): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgSubmitMintResponse", value: MsgSubmitMintResponse.fromPartial( data ) }), msgSubmitActionResponse: (data: MsgSubmitActionResponse): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgSubmitActionResponse", value: MsgSubmitActionResponse.fromPartial( data ) }), + msgSubmitMintResponse: (data: MsgSubmitMintResponse): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgSubmitMintResponse", value: MsgSubmitMintResponse.fromPartial( data ) }), + msgCreateMintRequest: (data: MsgCreateMintRequest): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgCreateMintRequest", value: MsgCreateMintRequest.fromPartial( data ) }), }; }; diff --git a/x/evmsupport/types/address_binding.pb.go b/x/evmsupport/types/address_binding.pb.go index 7619439d..62a55094 100644 --- a/x/evmsupport/types/address_binding.pb.go +++ b/x/evmsupport/types/address_binding.pb.go @@ -75,25 +75,25 @@ func (m *AddressBinding) GetNativeAddress() string { } func init() { - proto.RegisterType((*AddressBinding)(nil), "sixnft.evmsupport.AddressBinding") + proto.RegisterType((*AddressBinding)(nil), "thesixnetwork.sixnft.evmsupport.AddressBinding") } func init() { proto.RegisterFile("evmsupport/address_binding.proto", fileDescriptor_7a6553e87de44d97) } var fileDescriptor_7a6553e87de44d97 = []byte{ - // 185 bytes of a gzipped FileDescriptorProto + // 187 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0x2d, 0xcb, 0x2d, 0x2e, 0x2d, 0x28, 0xc8, 0x2f, 0x2a, 0xd1, 0x4f, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x8e, 0x4f, - 0xca, 0xcc, 0x4b, 0xc9, 0xcc, 0x4b, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x2c, 0xce, - 0xac, 0xc8, 0x4b, 0x2b, 0xd1, 0x43, 0x28, 0x54, 0x0a, 0xe3, 0xe2, 0x73, 0x84, 0xa8, 0x75, 0x82, - 0x28, 0x15, 0x92, 0xe3, 0xe2, 0x4a, 0x2d, 0xc9, 0x80, 0x0a, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, - 0x06, 0x21, 0x89, 0x08, 0xa9, 0x70, 0xf1, 0xe6, 0x25, 0x96, 0x64, 0x96, 0xa5, 0xc2, 0x94, 0x30, - 0x81, 0x95, 0xa0, 0x0a, 0x3a, 0xf9, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, - 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, - 0x94, 0x51, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x49, 0x46, 0x2a, - 0xc8, 0x49, 0xa9, 0x25, 0xe5, 0xf9, 0x45, 0xd9, 0xfa, 0x10, 0xd7, 0xe9, 0x57, 0xe8, 0x23, 0x79, - 0xa4, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x7e, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0xf8, 0x4a, 0x94, 0xe3, 0x00, 0x00, 0x00, + 0xca, 0xcc, 0x4b, 0xc9, 0xcc, 0x4b, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x2f, 0xc9, + 0x48, 0x2d, 0xce, 0xac, 0xc8, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0xd6, 0x03, 0x31, 0xd3, 0x4a, + 0xf4, 0x10, 0xda, 0x94, 0xc2, 0xb8, 0xf8, 0x1c, 0x21, 0x3a, 0x9d, 0x20, 0x1a, 0x85, 0xe4, 0xb8, + 0xb8, 0x52, 0x4b, 0x32, 0xa0, 0x82, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x48, 0x22, 0x42, + 0x2a, 0x5c, 0xbc, 0x79, 0x89, 0x25, 0x99, 0x65, 0xa9, 0x30, 0x25, 0x4c, 0x60, 0x25, 0xa8, 0x82, + 0x4e, 0x3e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, + 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x94, 0x9e, 0x59, + 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x8f, 0xe2, 0x3a, 0x7d, 0x88, 0xeb, 0xf4, 0x2b, + 0xf4, 0x91, 0xbc, 0x55, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0xf6, 0x8d, 0x31, 0x20, 0x00, + 0x00, 0xff, 0xff, 0x19, 0x20, 0x1e, 0x51, 0xf1, 0x00, 0x00, 0x00, } func (m *AddressBinding) Marshal() (dAtA []byte, err error) { diff --git a/x/evmsupport/types/genesis.pb.go b/x/evmsupport/types/genesis.pb.go index b35991d8..4f7f372e 100644 --- a/x/evmsupport/types/genesis.pb.go +++ b/x/evmsupport/types/genesis.pb.go @@ -77,29 +77,29 @@ func (m *GenesisState) GetAddressBindingList() []AddressBinding { } func init() { - proto.RegisterType((*GenesisState)(nil), "sixnft.evmsupport.GenesisState") + proto.RegisterType((*GenesisState)(nil), "thesixnetwork.sixnft.evmsupport.GenesisState") } func init() { proto.RegisterFile("evmsupport/genesis.proto", fileDescriptor_33ae5bd2571160ef) } var fileDescriptor_33ae5bd2571160ef = []byte{ - // 252 bytes of a gzipped FileDescriptorProto + // 255 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x48, 0x2d, 0xcb, 0x2d, 0x2e, 0x2d, 0x28, 0xc8, 0x2f, 0x2a, 0xd1, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, - 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x2c, 0xce, 0xac, 0xc8, 0x4b, 0x2b, 0xd1, 0x43, 0x28, 0x90, - 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xea, 0x83, 0x58, 0x10, 0x85, 0x52, 0xe2, 0x48, 0x46, - 0x14, 0x24, 0x16, 0x25, 0xe6, 0x42, 0x4d, 0x90, 0x52, 0x40, 0x92, 0x48, 0x4c, 0x49, 0x29, 0x4a, - 0x2d, 0x2e, 0x8e, 0x4f, 0xca, 0xcc, 0x4b, 0xc9, 0xcc, 0x4b, 0x87, 0xa8, 0x50, 0x5a, 0xc0, 0xc8, - 0xc5, 0xe3, 0x0e, 0xb1, 0x35, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0xc8, 0x9c, 0x8b, 0x0d, 0x62, 0x84, - 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0xa4, 0x1e, 0x86, 0x2b, 0xf4, 0x02, 0xc0, 0x0a, 0x9c, - 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x82, 0x2a, 0x17, 0x0a, 0xe7, 0x12, 0x82, 0x5a, 0xe1, 0x04, - 0xb1, 0xc1, 0x27, 0xb3, 0xb8, 0x44, 0x82, 0x49, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x11, 0x8b, 0x21, - 0x8e, 0x28, 0x8a, 0xa1, 0x86, 0x61, 0x31, 0xc2, 0xc9, 0xe7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, - 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, - 0x8f, 0xe5, 0x18, 0xa2, 0x8c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, - 0x4b, 0x32, 0x52, 0x41, 0x76, 0xa4, 0x96, 0x94, 0xe7, 0x17, 0x65, 0xeb, 0x43, 0xac, 0xd3, 0xaf, - 0xd0, 0x47, 0x0a, 0x80, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xbf, 0x8d, 0x01, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x6c, 0x12, 0xb8, 0x94, 0x77, 0x01, 0x00, 0x00, + 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x2f, 0xc9, 0x48, 0x2d, 0xce, 0xac, 0xc8, 0x4b, 0x2d, 0x29, + 0xcf, 0x2f, 0xca, 0xd6, 0x03, 0x31, 0xd3, 0x4a, 0xf4, 0x10, 0xca, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, + 0xf3, 0xc1, 0x6a, 0xf5, 0x41, 0x2c, 0x88, 0x36, 0x29, 0x71, 0x24, 0x03, 0x0b, 0x12, 0x8b, 0x12, + 0x73, 0xa1, 0xe6, 0x49, 0x29, 0x20, 0x49, 0x24, 0xa6, 0xa4, 0x14, 0xa5, 0x16, 0x17, 0xc7, 0x27, + 0x65, 0xe6, 0xa5, 0x64, 0xe6, 0xa5, 0x43, 0x54, 0x28, 0xed, 0x61, 0xe4, 0xe2, 0x71, 0x87, 0xb8, + 0x21, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0xc8, 0x95, 0x8b, 0x0d, 0x62, 0x84, 0x04, 0xa3, 0x02, 0xa3, + 0x06, 0xb7, 0x91, 0xba, 0x1e, 0x01, 0x37, 0xe9, 0x05, 0x80, 0x95, 0x3b, 0xb1, 0x9c, 0xb8, 0x27, + 0xcf, 0x10, 0x04, 0xd5, 0x2c, 0x94, 0xca, 0x25, 0x04, 0xb5, 0xd0, 0x09, 0x62, 0x9f, 0x4f, 0x66, + 0x71, 0x89, 0x04, 0x93, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0x3e, 0x41, 0x23, 0x1d, 0x51, 0xb4, 0x42, + 0x8d, 0xc6, 0x62, 0xa0, 0x93, 0xcf, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, + 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, + 0x19, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa3, 0x58, 0xa7, 0x0f, + 0xb1, 0x4e, 0xbf, 0x42, 0x1f, 0x29, 0x70, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x61, + 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x29, 0x0a, 0xa4, 0xd0, 0xa1, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/evmsupport/types/params.pb.go b/x/evmsupport/types/params.pb.go index 452803c0..11ae109a 100644 --- a/x/evmsupport/types/params.pb.go +++ b/x/evmsupport/types/params.pb.go @@ -60,23 +60,23 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo func init() { - proto.RegisterType((*Params)(nil), "sixnft.evmsupport.Params") + proto.RegisterType((*Params)(nil), "thesixnetwork.sixnft.evmsupport.Params") } func init() { proto.RegisterFile("evmsupport/params.proto", fileDescriptor_481892b86ff8f257) } var fileDescriptor_481892b86ff8f257 = []byte{ - // 156 bytes of a gzipped FileDescriptorProto + // 159 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0x2d, 0xcb, 0x2d, 0x2e, 0x2d, 0x28, 0xc8, 0x2f, 0x2a, 0xd1, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, - 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x2c, 0xce, 0xac, 0xc8, 0x4b, 0x2b, 0xd1, 0x43, 0xc8, 0x4b, 0x89, - 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x65, 0xf5, 0x41, 0x2c, 0x88, 0x42, 0x25, 0x3e, 0x2e, 0xb6, 0x00, - 0xb0, 0x46, 0x2b, 0x96, 0x19, 0x0b, 0xe4, 0x19, 0x9c, 0x7c, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, - 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, - 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x28, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, - 0xbf, 0x24, 0x23, 0x15, 0x64, 0x41, 0x6a, 0x49, 0x79, 0x7e, 0x51, 0xb6, 0x3e, 0xc4, 0x2e, 0xfd, - 0x0a, 0x7d, 0x24, 0xd7, 0x94, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x2d, 0x31, 0x06, 0x04, - 0x00, 0x00, 0xff, 0xff, 0x55, 0x27, 0x0c, 0x8c, 0xa8, 0x00, 0x00, 0x00, + 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x2f, 0xc9, 0x48, 0x2d, 0xce, 0xac, 0xc8, 0x4b, 0x2d, 0x29, 0xcf, + 0x2f, 0xca, 0xd6, 0x03, 0x31, 0xd3, 0x4a, 0xf4, 0x10, 0xaa, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, + 0xc1, 0x6a, 0xf5, 0x41, 0x2c, 0x88, 0x36, 0x25, 0x3e, 0x2e, 0xb6, 0x00, 0xb0, 0x31, 0x56, 0x2c, + 0x33, 0x16, 0xc8, 0x33, 0x38, 0xf9, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, + 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, + 0x94, 0x51, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0x8a, 0x5d, 0xfa, + 0x10, 0xbb, 0xf4, 0x2b, 0xf4, 0x91, 0xdc, 0x56, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0xb6, + 0xc4, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xab, 0x13, 0x7b, 0x3e, 0xb6, 0x00, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/evmsupport/types/query.pb.go b/x/evmsupport/types/query.pb.go index 09b9e295..2e0ba69e 100644 --- a/x/evmsupport/types/query.pb.go +++ b/x/evmsupport/types/query.pb.go @@ -306,52 +306,52 @@ func (m *QueryAllAddressBindingResponse) GetPagination() *query.PageResponse { } func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "sixnft.evmsupport.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "sixnft.evmsupport.QueryParamsResponse") - proto.RegisterType((*QueryGetAddressBindingRequest)(nil), "sixnft.evmsupport.QueryGetAddressBindingRequest") - proto.RegisterType((*QueryGetAddressBindingResponse)(nil), "sixnft.evmsupport.QueryGetAddressBindingResponse") - proto.RegisterType((*QueryAllAddressBindingRequest)(nil), "sixnft.evmsupport.QueryAllAddressBindingRequest") - proto.RegisterType((*QueryAllAddressBindingResponse)(nil), "sixnft.evmsupport.QueryAllAddressBindingResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "thesixnetwork.sixnft.evmsupport.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "thesixnetwork.sixnft.evmsupport.QueryParamsResponse") + proto.RegisterType((*QueryGetAddressBindingRequest)(nil), "thesixnetwork.sixnft.evmsupport.QueryGetAddressBindingRequest") + proto.RegisterType((*QueryGetAddressBindingResponse)(nil), "thesixnetwork.sixnft.evmsupport.QueryGetAddressBindingResponse") + proto.RegisterType((*QueryAllAddressBindingRequest)(nil), "thesixnetwork.sixnft.evmsupport.QueryAllAddressBindingRequest") + proto.RegisterType((*QueryAllAddressBindingResponse)(nil), "thesixnetwork.sixnft.evmsupport.QueryAllAddressBindingResponse") } func init() { proto.RegisterFile("evmsupport/query.proto", fileDescriptor_08c1066b9e14fb0e) } var fileDescriptor_08c1066b9e14fb0e = []byte{ - // 533 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x31, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0xe3, 0x14, 0x22, 0x71, 0x88, 0x4a, 0x3d, 0x2a, 0xa0, 0x01, 0x4c, 0x6b, 0x95, 0x82, - 0x3a, 0xdc, 0x91, 0x30, 0x30, 0xa2, 0x64, 0x20, 0x0b, 0x82, 0x92, 0x91, 0x05, 0x9d, 0x9b, 0xc7, - 0xc5, 0xc2, 0xf1, 0x39, 0xbe, 0x4b, 0x68, 0xa9, 0xba, 0xf0, 0x09, 0x90, 0xf8, 0x0a, 0x7c, 0x0a, - 0x06, 0xe6, 0x8e, 0x95, 0x58, 0x98, 0x10, 0x4a, 0xd8, 0xf8, 0x12, 0xc8, 0x77, 0x17, 0xc5, 0x4e, - 0x6c, 0x22, 0xd4, 0x2d, 0xba, 0xf7, 0x7f, 0xff, 0xf7, 0xff, 0xe9, 0x3d, 0x07, 0xdd, 0x80, 0xf1, - 0x40, 0x8e, 0xe2, 0x58, 0x24, 0x8a, 0x0e, 0x47, 0x90, 0x1c, 0x93, 0x38, 0x11, 0x4a, 0xe0, 0x0d, - 0x19, 0x1c, 0x45, 0x6f, 0x15, 0x99, 0x97, 0xeb, 0x9b, 0x5c, 0x70, 0xa1, 0xab, 0x34, 0xfd, 0x65, - 0x84, 0xf5, 0x3b, 0x5c, 0x08, 0x1e, 0x02, 0x65, 0x71, 0x40, 0x59, 0x14, 0x09, 0xc5, 0x54, 0x20, - 0x22, 0x69, 0xab, 0xfb, 0x87, 0x42, 0x0e, 0x84, 0xa4, 0x3e, 0x93, 0x60, 0xfc, 0xe9, 0xb8, 0xe1, - 0x83, 0x62, 0x0d, 0x1a, 0x33, 0x1e, 0x44, 0x5a, 0x6c, 0xb5, 0x37, 0x33, 0x51, 0x62, 0x96, 0xb0, - 0xc1, 0xcc, 0x64, 0x3b, 0x53, 0x60, 0xbd, 0x5e, 0x02, 0x52, 0xbe, 0xf1, 0x83, 0xa8, 0x17, 0x44, - 0xdc, 0x28, 0xbc, 0x4d, 0x84, 0x5f, 0xa5, 0xe6, 0x07, 0xba, 0xad, 0x0b, 0xc3, 0x11, 0x48, 0xe5, - 0xbd, 0x40, 0xd7, 0x73, 0xaf, 0x32, 0x16, 0x91, 0x04, 0xfc, 0x04, 0xd5, 0x8c, 0xfd, 0x2d, 0x67, - 0xdb, 0x79, 0x78, 0xb5, 0xb9, 0x45, 0x96, 0x58, 0x89, 0x69, 0x69, 0x5f, 0x3a, 0xfb, 0x79, 0xaf, - 0xd2, 0xb5, 0x72, 0x0f, 0xd0, 0x5d, 0xed, 0xd7, 0x01, 0xd5, 0x32, 0x31, 0xda, 0x26, 0x85, 0x1d, - 0x88, 0x5d, 0x84, 0x40, 0xf5, 0x6d, 0x4d, 0xbb, 0x5f, 0xe9, 0x66, 0x5e, 0xf0, 0x2e, 0xba, 0x96, - 0x12, 0x8f, 0x61, 0x26, 0xa9, 0x6a, 0x49, 0xfe, 0xd1, 0x1b, 0x22, 0xb7, 0x6c, 0x8c, 0x25, 0x78, - 0x89, 0xd6, 0x59, 0xae, 0x62, 0x49, 0x76, 0x0a, 0x48, 0xf2, 0x16, 0x96, 0x68, 0xa1, 0xdd, 0xe3, - 0x96, 0xac, 0x15, 0x86, 0xc5, 0x64, 0xcf, 0x10, 0x9a, 0xef, 0xcb, 0x4e, 0xdb, 0x23, 0x66, 0xb9, - 0x24, 0x5d, 0x2e, 0x31, 0xc7, 0x63, 0x97, 0x4b, 0x0e, 0x18, 0x07, 0xdb, 0xdb, 0xcd, 0x74, 0x7a, - 0x5f, 0x1d, 0x0b, 0x57, 0x30, 0xe9, 0x1f, 0x70, 0x6b, 0x17, 0x80, 0xc3, 0x9d, 0x5c, 0xf6, 0xaa, - 0xce, 0xfe, 0x60, 0x65, 0x76, 0x93, 0x26, 0x1b, 0xbe, 0xf9, 0x67, 0x0d, 0x5d, 0xd6, 0xe1, 0xf1, - 0x07, 0x54, 0x33, 0x17, 0x82, 0xef, 0x17, 0xa4, 0x5a, 0x3e, 0xc5, 0xfa, 0xde, 0x2a, 0x99, 0x19, - 0xe7, 0xed, 0x7c, 0xfc, 0xfe, 0xfb, 0x73, 0xf5, 0x36, 0xde, 0xa2, 0x46, 0x4f, 0x97, 0xbe, 0x09, - 0xfc, 0xcd, 0x41, 0xeb, 0x79, 0x6e, 0xfc, 0xa8, 0xcc, 0xbd, 0xec, 0x52, 0xeb, 0x8d, 0xff, 0xe8, - 0xb0, 0xd1, 0x3a, 0x3a, 0x5a, 0x0b, 0x3f, 0x2d, 0x88, 0xb6, 0xf0, 0x55, 0xd2, 0x93, 0xf9, 0xd1, - 0x9f, 0xd2, 0x93, 0xdc, 0x79, 0x9f, 0xe2, 0x2f, 0x0e, 0xda, 0xc8, 0xcf, 0x68, 0x85, 0x61, 0x39, - 0x43, 0xd9, 0x4d, 0x96, 0x33, 0x94, 0xde, 0x96, 0xb7, 0xaf, 0x19, 0x76, 0xb1, 0xb7, 0x9a, 0xa1, - 0xfd, 0xfc, 0x6c, 0xe2, 0x3a, 0xe7, 0x13, 0xd7, 0xf9, 0x35, 0x71, 0x9d, 0x4f, 0x53, 0xb7, 0x72, - 0x3e, 0x75, 0x2b, 0x3f, 0xa6, 0x6e, 0xe5, 0x75, 0x93, 0x07, 0xaa, 0x3f, 0xf2, 0xc9, 0xa1, 0x18, - 0x50, 0xd5, 0x87, 0xd4, 0x0a, 0xd4, 0x7b, 0x91, 0xbc, 0x9b, 0xb9, 0x1e, 0x65, 0x7d, 0xd5, 0x71, - 0x0c, 0xd2, 0xaf, 0xe9, 0x3f, 0xaa, 0xc7, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xdd, 0xb7, 0x37, - 0x5e, 0x70, 0x05, 0x00, 0x00, + // 538 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x4f, 0x6b, 0x13, 0x4f, + 0x18, 0xc7, 0x33, 0xf9, 0xf5, 0x17, 0x70, 0xc4, 0x82, 0x63, 0xf1, 0x4f, 0xd4, 0x6d, 0x1d, 0x8a, + 0x4a, 0x0f, 0x33, 0x34, 0xf5, 0x6c, 0x49, 0x40, 0x73, 0xf1, 0x50, 0x73, 0x14, 0x45, 0x66, 0x9b, + 0x71, 0xb2, 0xb8, 0xd9, 0xd9, 0xee, 0x4c, 0x62, 0x4b, 0x29, 0x82, 0xaf, 0x40, 0x10, 0x7c, 0x3d, + 0x3d, 0xe6, 0x58, 0xf0, 0x22, 0x1e, 0x44, 0x12, 0x5f, 0x88, 0xec, 0xcc, 0x84, 0xec, 0xb4, 0x89, + 0x1b, 0xc5, 0xdb, 0x32, 0xf3, 0x3c, 0xdf, 0xef, 0xf7, 0x93, 0x79, 0x9e, 0xc0, 0xeb, 0x7c, 0xd8, + 0x57, 0x83, 0x34, 0x95, 0x99, 0xa6, 0x07, 0x03, 0x9e, 0x1d, 0x91, 0x34, 0x93, 0x5a, 0xa2, 0x75, + 0xdd, 0xe3, 0x2a, 0x3a, 0x4c, 0xb8, 0x7e, 0x27, 0xb3, 0xb7, 0x24, 0xff, 0x7c, 0xa3, 0xc9, 0xac, + 0xb8, 0xbe, 0x26, 0xa4, 0x90, 0xa6, 0x96, 0xe6, 0x5f, 0xb6, 0xad, 0x7e, 0x47, 0x48, 0x29, 0x62, + 0x4e, 0x59, 0x1a, 0x51, 0x96, 0x24, 0x52, 0x33, 0x1d, 0xc9, 0x44, 0xb9, 0xdb, 0xad, 0x7d, 0xa9, + 0xfa, 0x52, 0xd1, 0x90, 0x29, 0x6e, 0xdd, 0xe8, 0x70, 0x3b, 0xe4, 0x9a, 0x6d, 0xd3, 0x94, 0x89, + 0x28, 0x31, 0xc5, 0xae, 0xf6, 0x46, 0x21, 0x58, 0xca, 0x32, 0xd6, 0x9f, 0x8a, 0x6c, 0x14, 0x2e, + 0x58, 0xb7, 0x9b, 0x71, 0xa5, 0x5e, 0x87, 0x51, 0xd2, 0x8d, 0x12, 0x61, 0x2b, 0xf0, 0x1a, 0x44, + 0xcf, 0x73, 0xf1, 0x3d, 0xd3, 0xd6, 0xe1, 0x07, 0x03, 0xae, 0x34, 0x7e, 0x09, 0xaf, 0x79, 0xa7, + 0x2a, 0x95, 0x89, 0xe2, 0xe8, 0x09, 0xac, 0x59, 0xf9, 0x9b, 0x60, 0x03, 0x3c, 0xbc, 0xdc, 0x78, + 0x40, 0x4a, 0xc8, 0x89, 0x15, 0x68, 0xad, 0x8c, 0xbe, 0xaf, 0x57, 0x3a, 0xae, 0x19, 0x73, 0x78, + 0xd7, 0xa8, 0xb7, 0xb9, 0x6e, 0xda, 0x50, 0x2d, 0x9b, 0xc9, 0xd9, 0xa3, 0x00, 0x42, 0xae, 0x7b, + 0xee, 0xce, 0x78, 0x5d, 0xea, 0x14, 0x4e, 0xd0, 0x26, 0xbc, 0x92, 0xf3, 0x0f, 0xf9, 0xb4, 0xa4, + 0x6a, 0x4a, 0xfc, 0x43, 0xfc, 0x1e, 0x06, 0x8b, 0x6c, 0x1c, 0xcf, 0x2b, 0xb8, 0xca, 0xbc, 0x1b, + 0xc7, 0x45, 0x4b, 0xb9, 0x7c, 0x41, 0xc7, 0x77, 0x4e, 0x0c, 0x0b, 0xc7, 0xd9, 0x8c, 0xe3, 0xf9, + 0x9c, 0x4f, 0x21, 0x9c, 0xbd, 0xa5, 0xf3, 0xbe, 0x4f, 0xec, 0xc3, 0x93, 0xfc, 0xe1, 0x89, 0x1d, + 0x33, 0xf7, 0xf0, 0x64, 0x8f, 0x09, 0xee, 0x7a, 0x3b, 0x85, 0x4e, 0x3c, 0x02, 0x0e, 0x75, 0x8e, + 0xd3, 0x6f, 0x50, 0xff, 0xfb, 0x67, 0xa8, 0xa8, 0xed, 0x91, 0x54, 0xdd, 0x74, 0x94, 0x91, 0xd8, + 0x6c, 0x45, 0x94, 0xc6, 0xe9, 0x0a, 0xfc, 0xdf, 0xa0, 0xa0, 0xcf, 0x00, 0xd6, 0xec, 0xf8, 0xa0, + 0x9d, 0xd2, 0x90, 0x17, 0x67, 0xb8, 0xfe, 0xe8, 0xcf, 0x9a, 0x6c, 0x16, 0x7c, 0xef, 0xc3, 0x97, + 0x9f, 0x9f, 0xaa, 0xb7, 0xd1, 0x2d, 0x6a, 0xeb, 0xe9, 0x85, 0xd5, 0x42, 0xdf, 0x00, 0x5c, 0xf5, + 0x7f, 0x14, 0xf4, 0x78, 0x39, 0xaf, 0x45, 0x03, 0x5f, 0xdf, 0xfd, 0xeb, 0x7e, 0x17, 0xbb, 0x6d, + 0x62, 0x37, 0xd1, 0xee, 0x9c, 0xd8, 0xe7, 0x16, 0x9f, 0x1e, 0xcf, 0x36, 0xe9, 0x84, 0x1e, 0x7b, + 0x3b, 0x73, 0x82, 0x4e, 0x01, 0xbc, 0xea, 0x7b, 0x34, 0xe3, 0x78, 0x59, 0xbe, 0x45, 0x83, 0xbe, + 0x2c, 0xdf, 0xc2, 0xf1, 0xc5, 0x5b, 0x86, 0x6f, 0x13, 0xe1, 0x72, 0xbe, 0xd6, 0xb3, 0xd1, 0x38, + 0x00, 0x67, 0xe3, 0x00, 0xfc, 0x18, 0x07, 0xe0, 0xe3, 0x24, 0xa8, 0x9c, 0x4d, 0x82, 0xca, 0xd7, + 0x49, 0x50, 0x79, 0xd1, 0x10, 0x91, 0xee, 0x0d, 0x42, 0xb2, 0x2f, 0xfb, 0xd4, 0x0b, 0x34, 0x55, + 0x3d, 0x2c, 0xea, 0xea, 0xa3, 0x94, 0xab, 0xb0, 0x66, 0xfe, 0x27, 0x77, 0x7e, 0x05, 0x00, 0x00, + 0xff, 0xff, 0x15, 0x7f, 0x8a, 0xdf, 0xfd, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -384,7 +384,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/sixnft.evmsupport.Query/Params", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.evmsupport.Query/Params", in, out, opts...) if err != nil { return nil, err } @@ -393,7 +393,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . func (c *queryClient) AddressBinding(ctx context.Context, in *QueryGetAddressBindingRequest, opts ...grpc.CallOption) (*QueryGetAddressBindingResponse, error) { out := new(QueryGetAddressBindingResponse) - err := c.cc.Invoke(ctx, "/sixnft.evmsupport.Query/AddressBinding", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.evmsupport.Query/AddressBinding", in, out, opts...) if err != nil { return nil, err } @@ -402,7 +402,7 @@ func (c *queryClient) AddressBinding(ctx context.Context, in *QueryGetAddressBin func (c *queryClient) AddressBindingAll(ctx context.Context, in *QueryAllAddressBindingRequest, opts ...grpc.CallOption) (*QueryAllAddressBindingResponse, error) { out := new(QueryAllAddressBindingResponse) - err := c.cc.Invoke(ctx, "/sixnft.evmsupport.Query/AddressBindingAll", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.evmsupport.Query/AddressBindingAll", in, out, opts...) if err != nil { return nil, err } @@ -447,7 +447,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.evmsupport.Query/Params", + FullMethod: "/thesixnetwork.sixnft.evmsupport.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) @@ -465,7 +465,7 @@ func _Query_AddressBinding_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.evmsupport.Query/AddressBinding", + FullMethod: "/thesixnetwork.sixnft.evmsupport.Query/AddressBinding", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AddressBinding(ctx, req.(*QueryGetAddressBindingRequest)) @@ -483,7 +483,7 @@ func _Query_AddressBindingAll_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.evmsupport.Query/AddressBindingAll", + FullMethod: "/thesixnetwork.sixnft.evmsupport.Query/AddressBindingAll", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AddressBindingAll(ctx, req.(*QueryAllAddressBindingRequest)) @@ -492,7 +492,7 @@ func _Query_AddressBindingAll_Handler(srv interface{}, ctx context.Context, dec } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "sixnft.evmsupport.Query", + ServiceName: "thesixnetwork.sixnft.evmsupport.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { diff --git a/x/evmsupport/types/tx.pb.go b/x/evmsupport/types/tx.pb.go index 99e856ea..2695f923 100644 --- a/x/evmsupport/types/tx.pb.go +++ b/x/evmsupport/types/tx.pb.go @@ -268,37 +268,37 @@ func (m *MsgRemoveBindingResponse) GetNativeAddress() string { } func init() { - proto.RegisterType((*MsgBindAddress)(nil), "sixnft.evmsupport.MsgBindAddress") - proto.RegisterType((*MsgBindAddressResponse)(nil), "sixnft.evmsupport.MsgBindAddressResponse") - proto.RegisterType((*MsgRemoveBinding)(nil), "sixnft.evmsupport.MsgRemoveBinding") - proto.RegisterType((*MsgRemoveBindingResponse)(nil), "sixnft.evmsupport.MsgRemoveBindingResponse") + proto.RegisterType((*MsgBindAddress)(nil), "thesixnetwork.sixnft.evmsupport.MsgBindAddress") + proto.RegisterType((*MsgBindAddressResponse)(nil), "thesixnetwork.sixnft.evmsupport.MsgBindAddressResponse") + proto.RegisterType((*MsgRemoveBinding)(nil), "thesixnetwork.sixnft.evmsupport.MsgRemoveBinding") + proto.RegisterType((*MsgRemoveBindingResponse)(nil), "thesixnetwork.sixnft.evmsupport.MsgRemoveBindingResponse") } func init() { proto.RegisterFile("evmsupport/tx.proto", fileDescriptor_4c158637930fb260) } var fileDescriptor_4c158637930fb260 = []byte{ - // 324 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x53, 0xc1, 0x4a, 0x03, 0x31, - 0x10, 0x6d, 0xac, 0x28, 0x1d, 0xa9, 0xe8, 0x0a, 0x12, 0x8a, 0x04, 0xad, 0x3d, 0x28, 0xc2, 0x2e, - 0xd4, 0x2f, 0xb0, 0x67, 0xf7, 0xd2, 0xa3, 0x82, 0xb8, 0xed, 0x8e, 0x69, 0x90, 0x26, 0x4b, 0x26, - 0xad, 0xf5, 0x27, 0xa4, 0x3f, 0x25, 0x78, 0xec, 0xd1, 0xa3, 0xb4, 0x3f, 0x22, 0x5d, 0xad, 0x6d, - 0x5a, 0x41, 0x0f, 0x82, 0xc7, 0x79, 0xef, 0xed, 0xbc, 0x37, 0xb3, 0x19, 0xd8, 0xc3, 0x7e, 0x97, - 0x7a, 0x59, 0x66, 0xac, 0x8b, 0xdc, 0x20, 0xcc, 0xac, 0x71, 0x26, 0xd8, 0x25, 0x35, 0xd0, 0x77, - 0x2e, 0x9c, 0x73, 0xd5, 0x27, 0x06, 0xdb, 0x31, 0xc9, 0x86, 0xd2, 0xe9, 0x45, 0x9a, 0x5a, 0x24, - 0x0a, 0x38, 0x6c, 0xb6, 0x2d, 0x26, 0xce, 0x58, 0xce, 0x0e, 0xd9, 0x49, 0xa9, 0x39, 0x2b, 0x03, - 0x01, 0x80, 0xae, 0xf3, 0xa9, 0xe3, 0x6b, 0x39, 0xb9, 0x80, 0x04, 0x07, 0x50, 0x22, 0x25, 0x75, - 0xe2, 0x7a, 0x16, 0x79, 0x31, 0xa7, 0xe7, 0x40, 0x50, 0x83, 0xf2, 0xb4, 0xc0, 0x34, 0x46, 0xa2, - 0x44, 0x22, 0x5f, 0xcf, 0x15, 0x3e, 0x58, 0xbd, 0x81, 0x7d, 0x3f, 0x4f, 0x13, 0x29, 0x33, 0x9a, - 0x70, 0xc9, 0x9d, 0xad, 0xb8, 0xd7, 0xa0, 0xac, 0x13, 0xa7, 0xfa, 0xe8, 0x07, 0xf4, 0xc1, 0xea, - 0x90, 0xc1, 0x4e, 0x4c, 0xb2, 0x89, 0x5d, 0xd3, 0xc7, 0xa9, 0x8d, 0xd2, 0xf2, 0x9f, 0x47, 0xbe, - 0x05, 0xbe, 0x9c, 0xe8, 0x6f, 0x87, 0xae, 0x3f, 0x33, 0x28, 0xc6, 0x24, 0x83, 0x6b, 0xd8, 0x5a, - 0xfc, 0xd3, 0x47, 0xe1, 0xca, 0x83, 0x08, 0xfd, 0xe5, 0x57, 0x4e, 0x7f, 0x94, 0x7c, 0x45, 0x4d, - 0xa0, 0xec, 0x6f, 0xf5, 0xf8, 0xfb, 0x6f, 0x3d, 0x51, 0xe5, 0xec, 0x17, 0xa2, 0x99, 0x45, 0xe3, - 0xf2, 0x65, 0x2c, 0xd8, 0x68, 0x2c, 0xd8, 0xdb, 0x58, 0xb0, 0xe1, 0x44, 0x14, 0x46, 0x13, 0x51, - 0x78, 0x9d, 0x88, 0xc2, 0x55, 0x5d, 0x2a, 0xd7, 0xe9, 0xb5, 0xc2, 0xb6, 0xe9, 0x46, 0xae, 0x83, - 0xd3, 0x9e, 0xe8, 0x1e, 0x8c, 0xbd, 0x8f, 0x3e, 0xda, 0x47, 0x83, 0x68, 0xf1, 0x22, 0x1e, 0x33, - 0xa4, 0xd6, 0x46, 0x7e, 0x15, 0xe7, 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0x36, 0x9c, 0xa3, 0x03, - 0x2c, 0x03, 0x00, 0x00, + // 329 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x53, 0x3d, 0x4b, 0x03, 0x41, + 0x10, 0xcd, 0x1a, 0x51, 0x32, 0x12, 0x91, 0x13, 0xe4, 0x08, 0xb2, 0x4a, 0x48, 0x61, 0x75, 0x8b, + 0xb1, 0x10, 0x4b, 0x53, 0x7b, 0x4d, 0x4a, 0x0b, 0xf1, 0x92, 0x1b, 0x37, 0x8b, 0x64, 0xf7, 0xd8, + 0xd9, 0x7c, 0x58, 0xf8, 0x17, 0x24, 0x3f, 0xcb, 0x32, 0xa5, 0xa5, 0x24, 0xbf, 0x43, 0x90, 0x9c, + 0xc6, 0x64, 0x63, 0xa1, 0x01, 0xc1, 0xee, 0xe6, 0xcd, 0xc7, 0x7b, 0xef, 0x66, 0x07, 0xf6, 0xb1, + 0xdf, 0xa5, 0x5e, 0x96, 0x19, 0xeb, 0x84, 0x1b, 0x46, 0x99, 0x35, 0xce, 0x04, 0x47, 0xae, 0x83, + 0xa4, 0x86, 0x1a, 0xdd, 0xc0, 0xd8, 0xfb, 0x68, 0xf6, 0x79, 0xe7, 0xa2, 0x45, 0x65, 0xf5, 0x89, + 0xc1, 0x6e, 0x4c, 0xb2, 0xa1, 0x74, 0x7a, 0x99, 0xa6, 0x16, 0x89, 0x82, 0x10, 0xb6, 0xdb, 0x16, + 0x13, 0x67, 0x6c, 0xc8, 0x8e, 0xd9, 0x49, 0xa9, 0x39, 0x0f, 0x03, 0x0e, 0x80, 0xae, 0xf3, 0x59, + 0x17, 0x6e, 0xe4, 0xc9, 0x25, 0x24, 0x38, 0x84, 0x12, 0x29, 0xa9, 0x13, 0xd7, 0xb3, 0x18, 0x16, + 0xf3, 0xf4, 0x02, 0x08, 0x6a, 0x50, 0x9e, 0x05, 0x98, 0xc6, 0x48, 0x94, 0x48, 0x0c, 0x37, 0xf3, + 0x0a, 0x1f, 0xac, 0xde, 0xc0, 0x81, 0xaf, 0xa7, 0x89, 0x94, 0x19, 0x4d, 0xb8, 0xc2, 0xce, 0xbe, + 0xb1, 0xd7, 0xa0, 0xac, 0x13, 0xa7, 0xfa, 0xe8, 0x0b, 0xf4, 0xc1, 0xea, 0x88, 0xc1, 0x5e, 0x4c, + 0xb2, 0x89, 0x5d, 0xd3, 0xc7, 0x19, 0x8d, 0xd2, 0xf2, 0x9f, 0x2d, 0xdf, 0x42, 0xb8, 0xaa, 0xe8, + 0x6f, 0x4d, 0xd7, 0xdf, 0x18, 0x14, 0x63, 0x92, 0xc1, 0x00, 0x76, 0x96, 0x37, 0x2d, 0xa2, 0x1f, + 0x9e, 0x47, 0xe4, 0xaf, 0xa2, 0x72, 0xbe, 0x66, 0xc3, 0x97, 0x8d, 0x47, 0x28, 0xfb, 0x7f, 0xfc, + 0xf4, 0x37, 0x93, 0xbc, 0x96, 0xca, 0xc5, 0xda, 0x2d, 0x73, 0xfa, 0xc6, 0xd5, 0xf3, 0x84, 0xb3, + 0xf1, 0x84, 0xb3, 0xd7, 0x09, 0x67, 0xa3, 0x29, 0x2f, 0x8c, 0xa7, 0xbc, 0xf0, 0x32, 0xe5, 0x85, + 0xeb, 0xba, 0x54, 0xae, 0xd3, 0x6b, 0x45, 0x6d, 0xd3, 0x15, 0xde, 0x78, 0xf1, 0x31, 0x5e, 0x0c, + 0xc5, 0xf2, 0x5d, 0x3d, 0x64, 0x48, 0xad, 0xad, 0xfc, 0xb6, 0xce, 0xde, 0x03, 0x00, 0x00, 0xff, + 0xff, 0x92, 0x36, 0x37, 0x9a, 0x72, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -327,7 +327,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { func (c *msgClient) BindAddress(ctx context.Context, in *MsgBindAddress, opts ...grpc.CallOption) (*MsgBindAddressResponse, error) { out := new(MsgBindAddressResponse) - err := c.cc.Invoke(ctx, "/sixnft.evmsupport.Msg/BindAddress", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.evmsupport.Msg/BindAddress", in, out, opts...) if err != nil { return nil, err } @@ -336,7 +336,7 @@ func (c *msgClient) BindAddress(ctx context.Context, in *MsgBindAddress, opts .. func (c *msgClient) RemoveBinding(ctx context.Context, in *MsgRemoveBinding, opts ...grpc.CallOption) (*MsgRemoveBindingResponse, error) { out := new(MsgRemoveBindingResponse) - err := c.cc.Invoke(ctx, "/sixnft.evmsupport.Msg/RemoveBinding", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.evmsupport.Msg/RemoveBinding", in, out, opts...) if err != nil { return nil, err } @@ -374,7 +374,7 @@ func _Msg_BindAddress_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.evmsupport.Msg/BindAddress", + FullMethod: "/thesixnetwork.sixnft.evmsupport.Msg/BindAddress", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).BindAddress(ctx, req.(*MsgBindAddress)) @@ -392,7 +392,7 @@ func _Msg_RemoveBinding_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.evmsupport.Msg/RemoveBinding", + FullMethod: "/thesixnetwork.sixnft.evmsupport.Msg/RemoveBinding", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RemoveBinding(ctx, req.(*MsgRemoveBinding)) @@ -401,7 +401,7 @@ func _Msg_RemoveBinding_Handler(srv interface{}, ctx context.Context, dec func(i } var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "sixnft.evmsupport.Msg", + ServiceName: "thesixnetwork.sixnft.evmsupport.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { diff --git a/x/nftadmin/types/authorization.pb.go b/x/nftadmin/types/authorization.pb.go index da9febd3..454e2c4a 100644 --- a/x/nftadmin/types/authorization.pb.go +++ b/x/nftadmin/types/authorization.pb.go @@ -75,26 +75,27 @@ func (m *Authorization) GetPermissions() *Permissions { } func init() { - proto.RegisterType((*Authorization)(nil), "sixnft.nftadmin.Authorization") + proto.RegisterType((*Authorization)(nil), "thesixnetwork.sixnft.nftadmin.Authorization") } func init() { proto.RegisterFile("nftadmin/authorization.proto", fileDescriptor_4e2d6ec743ddf166) } var fileDescriptor_4e2d6ec743ddf166 = []byte{ - // 208 bytes of a gzipped FileDescriptorProto + // 211 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xc9, 0x4b, 0x2b, 0x49, 0x4c, 0xc9, 0xcd, 0xcc, 0xd3, 0x4f, 0x2c, 0x2d, 0xc9, 0xc8, 0x2f, 0xca, 0xac, 0x4a, 0x2c, 0xc9, - 0xcc, 0xcf, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2f, 0xce, 0xac, 0xc8, 0x4b, 0x2b, - 0xd1, 0x83, 0x29, 0x92, 0x92, 0x82, 0x2b, 0x2f, 0x48, 0x2d, 0xca, 0xcd, 0x2c, 0x2e, 0xce, 0xcc, - 0xcf, 0x2b, 0x86, 0x28, 0x56, 0xca, 0xe3, 0xe2, 0x75, 0x44, 0x36, 0x43, 0x48, 0x96, 0x8b, 0xab, - 0x28, 0x3f, 0xbf, 0x24, 0x1e, 0xac, 0x41, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x88, 0x13, 0x24, - 0xe2, 0x08, 0x12, 0x10, 0xb2, 0xe3, 0xe2, 0x46, 0x32, 0x44, 0x82, 0x49, 0x81, 0x51, 0x83, 0xdb, - 0x48, 0x46, 0x0f, 0xcd, 0x4a, 0xbd, 0x00, 0x84, 0x9a, 0x20, 0x64, 0x0d, 0x4e, 0x5e, 0x27, 0x1e, - 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, - 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x90, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, - 0x97, 0x9c, 0x9f, 0xab, 0x5f, 0x92, 0x91, 0x0a, 0x32, 0x31, 0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x5b, - 0x1f, 0x62, 0xb8, 0x7e, 0x85, 0x3e, 0xdc, 0x1f, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, - 0x2f, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4c, 0xb1, 0xdb, 0xb0, 0x0f, 0x01, 0x00, 0x00, + 0xcc, 0xcf, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x2d, 0xc9, 0x48, 0x2d, 0xce, 0xac, + 0xc8, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0xd6, 0x03, 0x31, 0xd3, 0x4a, 0xf4, 0x60, 0x5a, 0xa4, + 0xa4, 0xe0, 0x9a, 0x0b, 0x52, 0x8b, 0x72, 0x33, 0x8b, 0x8b, 0x33, 0xf3, 0xf3, 0x8a, 0x21, 0x5a, + 0x95, 0x6a, 0xb8, 0x78, 0x1d, 0x91, 0x4d, 0x14, 0x92, 0xe5, 0xe2, 0x2a, 0xca, 0xcf, 0x2f, 0x89, + 0x07, 0x6b, 0x90, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0xe2, 0x04, 0x89, 0x38, 0x82, 0x04, 0x84, + 0x7c, 0xb8, 0xb8, 0x91, 0x0c, 0x91, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x36, 0xd2, 0xd2, 0xc3, 0xeb, + 0x00, 0xbd, 0x00, 0x84, 0x8e, 0x20, 0x64, 0xed, 0x4e, 0x5e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, + 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, + 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x90, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, + 0x8f, 0x62, 0xb8, 0x3e, 0xc4, 0x70, 0xfd, 0x0a, 0x7d, 0xb8, 0xaf, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, + 0x93, 0xd8, 0xc0, 0x1e, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x37, 0x94, 0x1c, 0xb4, 0x2b, + 0x01, 0x00, 0x00, } func (m *Authorization) Marshal() (dAtA []byte, err error) { diff --git a/x/nftadmin/types/genesis.pb.go b/x/nftadmin/types/genesis.pb.go index 41d46c0c..99257195 100644 --- a/x/nftadmin/types/genesis.pb.go +++ b/x/nftadmin/types/genesis.pb.go @@ -77,28 +77,28 @@ func (m *GenesisState) GetAuthorization() *Authorization { } func init() { - proto.RegisterType((*GenesisState)(nil), "sixnft.nftadmin.GenesisState") + proto.RegisterType((*GenesisState)(nil), "thesixnetwork.sixnft.nftadmin.GenesisState") } func init() { proto.RegisterFile("nftadmin/genesis.proto", fileDescriptor_8c7820b8f9bf6f68) } var fileDescriptor_8c7820b8f9bf6f68 = []byte{ - // 235 bytes of a gzipped FileDescriptorProto + // 239 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcb, 0x4b, 0x2b, 0x49, 0x4c, 0xc9, 0xcd, 0xcc, 0xd3, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, - 0x2f, 0xc9, 0x17, 0xe2, 0x2f, 0xce, 0xac, 0xc8, 0x4b, 0x2b, 0xd1, 0x83, 0x49, 0x4b, 0x89, 0xa4, - 0xe7, 0xa7, 0xe7, 0x83, 0xe5, 0xf4, 0x41, 0x2c, 0x88, 0x32, 0x29, 0x51, 0xb8, 0xf6, 0x82, 0xc4, - 0xa2, 0xc4, 0x5c, 0xa8, 0x6e, 0x29, 0x19, 0xb8, 0x70, 0x62, 0x69, 0x49, 0x46, 0x7e, 0x51, 0x66, - 0x55, 0x62, 0x49, 0x66, 0x7e, 0x1e, 0x44, 0x56, 0xa9, 0x9b, 0x91, 0x8b, 0xc7, 0x1d, 0x62, 0x5b, - 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x29, 0x17, 0x1b, 0x44, 0xbb, 0x04, 0xa3, 0x02, 0xa3, 0x06, - 0xb7, 0x91, 0xb8, 0x1e, 0x9a, 0xed, 0x7a, 0x01, 0x60, 0x69, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, - 0x82, 0xa0, 0x8a, 0x85, 0x5c, 0xb8, 0x78, 0x51, 0x8c, 0x97, 0x60, 0x02, 0xeb, 0x96, 0xc3, 0xd0, - 0xed, 0x88, 0xac, 0x2a, 0x08, 0x55, 0x93, 0x93, 0xd7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, - 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, - 0xcb, 0x31, 0x44, 0x19, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x97, - 0x64, 0xa4, 0x82, 0x4c, 0x4d, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0xd6, 0x87, 0x58, 0xa0, 0x5f, 0xa1, - 0x0f, 0xf7, 0x67, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0x83, 0xc6, 0x80, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xd7, 0xea, 0x2d, 0xe0, 0x56, 0x01, 0x00, 0x00, + 0x2f, 0xc9, 0x17, 0x92, 0x2d, 0xc9, 0x48, 0x2d, 0xce, 0xac, 0xc8, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, + 0xca, 0xd6, 0x03, 0x31, 0xd3, 0x4a, 0xf4, 0x60, 0x8a, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, + 0x2a, 0xf5, 0x41, 0x2c, 0x88, 0x26, 0x29, 0x51, 0xb8, 0x61, 0x05, 0x89, 0x45, 0x89, 0xb9, 0x50, + 0xb3, 0xa4, 0x64, 0xe0, 0xc2, 0x89, 0xa5, 0x25, 0x19, 0xf9, 0x45, 0x99, 0x55, 0x89, 0x25, 0x99, + 0xf9, 0x79, 0x10, 0x59, 0xa5, 0xe5, 0x8c, 0x5c, 0x3c, 0xee, 0x10, 0xbb, 0x83, 0x4b, 0x12, 0x4b, + 0x52, 0x85, 0x9c, 0xb9, 0xd8, 0x20, 0xda, 0x25, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0x54, 0xf5, + 0xf0, 0xba, 0x45, 0x2f, 0x00, 0xac, 0xd8, 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0xa8, 0x56, + 0xa1, 0x20, 0x2e, 0x5e, 0x14, 0xcb, 0x24, 0x98, 0xc0, 0x66, 0xe9, 0x10, 0x30, 0xcb, 0x11, 0x59, + 0x4f, 0x10, 0xaa, 0x11, 0x4e, 0x5e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, + 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, + 0x65, 0x90, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x8f, 0x62, 0x81, 0x3e, + 0xc4, 0x02, 0xfd, 0x0a, 0x7d, 0x78, 0x18, 0x94, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x3d, + 0x6f, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x87, 0x4e, 0x28, 0xbb, 0x80, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/nftadmin/types/params.pb.go b/x/nftadmin/types/params.pb.go index 003a14aa..9f71611a 100644 --- a/x/nftadmin/types/params.pb.go +++ b/x/nftadmin/types/params.pb.go @@ -60,23 +60,23 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo func init() { - proto.RegisterType((*Params)(nil), "sixnft.nftadmin.Params") + proto.RegisterType((*Params)(nil), "thesixnetwork.sixnft.nftadmin.Params") } func init() { proto.RegisterFile("nftadmin/params.proto", fileDescriptor_5788f267195f6e73) } var fileDescriptor_5788f267195f6e73 = []byte{ - // 154 bytes of a gzipped FileDescriptorProto + // 157 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0x4b, 0x2b, 0x49, 0x4c, 0xc9, 0xcd, 0xcc, 0xd3, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0x17, 0xe2, 0x2f, 0xce, 0xac, 0xc8, 0x4b, 0x2b, 0xd1, 0x83, 0xc9, 0x4a, 0x89, 0xa4, 0xe7, - 0xa7, 0xe7, 0x83, 0xe5, 0xf4, 0x41, 0x2c, 0x88, 0x32, 0x25, 0x3e, 0x2e, 0xb6, 0x00, 0xb0, 0x36, - 0x2b, 0x96, 0x19, 0x0b, 0xe4, 0x19, 0x9c, 0xbc, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, - 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, - 0x8e, 0x21, 0xca, 0x20, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0xbf, 0x24, - 0x23, 0x15, 0x64, 0x7c, 0x6a, 0x49, 0x79, 0x7e, 0x51, 0xb6, 0x3e, 0xc4, 0x26, 0xfd, 0x0a, 0x7d, - 0xb8, 0x4b, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x56, 0x18, 0x03, 0x02, 0x00, 0x00, - 0xff, 0xff, 0xb3, 0x6d, 0x04, 0xc3, 0xa2, 0x00, 0x00, 0x00, + 0xc9, 0x17, 0x92, 0x2d, 0xc9, 0x48, 0x2d, 0xce, 0xac, 0xc8, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, + 0xd6, 0x03, 0x31, 0xd3, 0x4a, 0xf4, 0x60, 0x6a, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x2a, + 0xf5, 0x41, 0x2c, 0x88, 0x26, 0x25, 0x3e, 0x2e, 0xb6, 0x00, 0xb0, 0x21, 0x56, 0x2c, 0x33, 0x16, + 0xc8, 0x33, 0x38, 0x79, 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, + 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x41, + 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0x8a, 0x4d, 0xfa, 0x10, 0x9b, + 0xf4, 0x2b, 0xf4, 0xe1, 0xee, 0x2a, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0x5b, 0x61, 0x0c, + 0x08, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x3c, 0x65, 0x59, 0xb0, 0x00, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/nftadmin/types/permissions.pb.go b/x/nftadmin/types/permissions.pb.go index 34eb3115..4011a5ba 100644 --- a/x/nftadmin/types/permissions.pb.go +++ b/x/nftadmin/types/permissions.pb.go @@ -111,32 +111,32 @@ func (m *Permissions) GetMapName() map[string]*AddressList { } func init() { - proto.RegisterType((*AddressList)(nil), "sixnft.nftadmin.AddressList") - proto.RegisterType((*Permissions)(nil), "sixnft.nftadmin.Permissions") - proto.RegisterMapType((map[string]*AddressList)(nil), "sixnft.nftadmin.Permissions.MapNameEntry") + proto.RegisterType((*AddressList)(nil), "thesixnetwork.sixnft.nftadmin.AddressList") + proto.RegisterType((*Permissions)(nil), "thesixnetwork.sixnft.nftadmin.Permissions") + proto.RegisterMapType((map[string]*AddressList)(nil), "thesixnetwork.sixnft.nftadmin.Permissions.MapNameEntry") } func init() { proto.RegisterFile("nftadmin/permissions.proto", fileDescriptor_9fe2704a94f2d0ea) } var fileDescriptor_9fe2704a94f2d0ea = []byte{ - // 266 bytes of a gzipped FileDescriptorProto + // 269 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x4b, 0x2b, 0x49, 0x4c, 0xc9, 0xcd, 0xcc, 0xd3, 0x2f, 0x48, 0x2d, 0xca, 0xcd, 0x2c, 0x2e, 0xce, 0xcc, 0xcf, 0x2b, - 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2f, 0xce, 0xac, 0xc8, 0x4b, 0x2b, 0xd1, 0x83, - 0x29, 0x51, 0xd2, 0xe6, 0xe2, 0x76, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0xf6, 0xc9, 0x2c, 0x2e, - 0x11, 0x92, 0xe1, 0xe2, 0x4c, 0x84, 0x70, 0x53, 0x8b, 0x25, 0x18, 0x15, 0x98, 0x35, 0x38, 0x83, - 0x10, 0x02, 0x4a, 0x6b, 0x19, 0xb9, 0xb8, 0x03, 0x10, 0x66, 0x0a, 0xb9, 0x70, 0x71, 0xe4, 0x26, - 0x16, 0xc4, 0xe7, 0x25, 0xe6, 0xa6, 0x82, 0x15, 0x73, 0x1b, 0x69, 0xea, 0xa1, 0x59, 0xa0, 0x87, - 0xa4, 0x5e, 0xcf, 0x37, 0xb1, 0xc0, 0x2f, 0x31, 0x37, 0xd5, 0x35, 0xaf, 0xa4, 0xa8, 0x32, 0x88, - 0x3d, 0x17, 0xc2, 0x93, 0x8a, 0xe0, 0xe2, 0x41, 0x96, 0x10, 0x12, 0xe0, 0x62, 0xce, 0x4e, 0xad, - 0x94, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0x31, 0x85, 0x8c, 0xb8, 0x58, 0xcb, 0x12, 0x73, - 0x4a, 0x53, 0x25, 0x98, 0x14, 0x18, 0x35, 0xb8, 0x8d, 0x64, 0x30, 0x2c, 0x41, 0xf2, 0x42, 0x10, - 0x44, 0xa9, 0x15, 0x93, 0x05, 0xa3, 0x93, 0xd7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, - 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, - 0x31, 0x44, 0x19, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x97, 0x64, - 0xa4, 0x82, 0xcc, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0xd6, 0x87, 0x18, 0xad, 0x5f, 0xa1, 0x0f, - 0x0f, 0xc5, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0x70, 0x00, 0x1a, 0x03, 0x02, 0x00, 0x00, - 0xff, 0xff, 0x65, 0xe6, 0x17, 0x6a, 0x5e, 0x01, 0x00, 0x00, + 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x2d, 0xc9, 0x48, 0x2d, 0xce, 0xac, 0xc8, 0x4b, + 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0xd6, 0x03, 0x31, 0xd3, 0x4a, 0xf4, 0x60, 0x1a, 0x94, 0xb4, 0xb9, + 0xb8, 0x1d, 0x53, 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x7d, 0x32, 0x8b, 0x4b, 0x84, 0x64, 0xb8, 0x38, + 0x13, 0x21, 0xdc, 0xd4, 0x62, 0x09, 0x46, 0x05, 0x66, 0x0d, 0xce, 0x20, 0x84, 0x80, 0xd2, 0x49, + 0x46, 0x2e, 0xee, 0x00, 0x84, 0x0d, 0x42, 0x41, 0x5c, 0x1c, 0xb9, 0x89, 0x05, 0xf1, 0x79, 0x89, + 0xb9, 0xa9, 0x60, 0xc5, 0xdc, 0x46, 0xe6, 0x7a, 0x78, 0xad, 0xd3, 0x43, 0xd2, 0xad, 0xe7, 0x9b, + 0x58, 0xe0, 0x97, 0x98, 0x9b, 0xea, 0x9a, 0x57, 0x52, 0x54, 0x19, 0xc4, 0x9e, 0x0b, 0xe1, 0x49, + 0xa5, 0x71, 0xf1, 0x20, 0x4b, 0x08, 0x09, 0x70, 0x31, 0x67, 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, + 0x6a, 0x70, 0x06, 0x81, 0x98, 0x42, 0x0e, 0x5c, 0xac, 0x65, 0x89, 0x39, 0xa5, 0xa9, 0x12, 0x4c, + 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0x5a, 0x04, 0xac, 0x44, 0xf2, 0x5e, 0x10, 0x44, 0xa3, 0x15, 0x93, + 0x05, 0xa3, 0x93, 0xd7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, + 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x19, 0xa4, + 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa3, 0x18, 0xad, 0x0f, 0x31, 0x5a, + 0xbf, 0x42, 0x1f, 0x1e, 0xde, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, 0xa0, 0x36, 0x06, + 0x04, 0x00, 0x00, 0xff, 0xff, 0x91, 0x24, 0x3f, 0xbb, 0x88, 0x01, 0x00, 0x00, } func (m *AddressList) Marshal() (dAtA []byte, err error) { diff --git a/x/nftadmin/types/query.pb.go b/x/nftadmin/types/query.pb.go index 4f1cb01f..2c92ef52 100644 --- a/x/nftadmin/types/query.pb.go +++ b/x/nftadmin/types/query.pb.go @@ -194,40 +194,41 @@ func (m *QueryGetAuthorizationResponse) GetAuthorization() Authorization { } func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "sixnft.nftadmin.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "sixnft.nftadmin.QueryParamsResponse") - proto.RegisterType((*QueryGetAuthorizationRequest)(nil), "sixnft.nftadmin.QueryGetAuthorizationRequest") - proto.RegisterType((*QueryGetAuthorizationResponse)(nil), "sixnft.nftadmin.QueryGetAuthorizationResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "thesixnetwork.sixnft.nftadmin.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "thesixnetwork.sixnft.nftadmin.QueryParamsResponse") + proto.RegisterType((*QueryGetAuthorizationRequest)(nil), "thesixnetwork.sixnft.nftadmin.QueryGetAuthorizationRequest") + proto.RegisterType((*QueryGetAuthorizationResponse)(nil), "thesixnetwork.sixnft.nftadmin.QueryGetAuthorizationResponse") } func init() { proto.RegisterFile("nftadmin/query.proto", fileDescriptor_e204fd8fb94d1b57) } var fileDescriptor_e204fd8fb94d1b57 = []byte{ - // 383 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x4f, 0xf2, 0x30, - 0x1c, 0xc6, 0x37, 0xf2, 0xbe, 0x1c, 0x6a, 0x8c, 0x49, 0xc5, 0xa0, 0x0b, 0x16, 0x32, 0x8d, 0x31, - 0x26, 0xae, 0x82, 0xf1, 0x03, 0xc8, 0xc5, 0x84, 0x78, 0x50, 0x8e, 0xde, 0x3a, 0x2c, 0x63, 0xc1, - 0xb5, 0x63, 0xed, 0x14, 0x3c, 0xfa, 0x09, 0x4c, 0x4c, 0xf8, 0x4c, 0x1c, 0x49, 0xbc, 0x78, 0x32, - 0x06, 0xfc, 0x20, 0x86, 0xad, 0x43, 0xc6, 0xc4, 0x78, 0x5b, 0xfa, 0x3c, 0xff, 0xdf, 0xf3, 0xb4, - 0xfb, 0x83, 0x02, 0x6b, 0x4b, 0x72, 0xeb, 0xb9, 0x0c, 0xf7, 0x42, 0x1a, 0x0c, 0x2c, 0x3f, 0xe0, - 0x92, 0xc3, 0x0d, 0xe1, 0xf6, 0x59, 0x5b, 0x5a, 0x89, 0x68, 0x14, 0x1c, 0xee, 0xf0, 0x48, 0xc3, - 0xb3, 0xaf, 0xd8, 0x66, 0x94, 0x1c, 0xce, 0x9d, 0x3b, 0x8a, 0x89, 0xef, 0x62, 0xc2, 0x18, 0x97, - 0x44, 0xba, 0x9c, 0x09, 0xa5, 0x1e, 0xb5, 0xb8, 0xf0, 0xb8, 0xc0, 0x36, 0x11, 0x34, 0xa6, 0xe3, - 0xfb, 0xaa, 0x4d, 0x25, 0xa9, 0x62, 0x9f, 0x38, 0x2e, 0x8b, 0xcc, 0xca, 0xbb, 0x35, 0xaf, 0xe1, - 0x93, 0x80, 0x78, 0x09, 0xa2, 0x34, 0x3f, 0x26, 0xa1, 0xec, 0xf0, 0xc0, 0x7d, 0x5c, 0x18, 0x32, - 0x0b, 0x00, 0x5e, 0xcf, 0xb0, 0x57, 0xd1, 0x48, 0x93, 0xf6, 0x42, 0x2a, 0xa4, 0x79, 0x09, 0x36, - 0x53, 0xa7, 0xc2, 0xe7, 0x4c, 0x50, 0x78, 0x06, 0xf2, 0x31, 0x7a, 0x5b, 0xaf, 0xe8, 0x87, 0x6b, - 0xb5, 0xa2, 0xb5, 0x74, 0x47, 0x2b, 0x1e, 0xa8, 0xff, 0x1b, 0xbd, 0x97, 0xb5, 0xa6, 0x32, 0x9b, - 0x08, 0x94, 0x22, 0xda, 0x05, 0x95, 0xe7, 0x8b, 0x15, 0x92, 0xb4, 0x2e, 0xd8, 0x5d, 0xa1, 0xab, - 0xdc, 0x06, 0x58, 0x4f, 0x09, 0x2a, 0x1e, 0x65, 0xe2, 0x53, 0x2e, 0xd5, 0x22, 0x3d, 0x5a, 0x1b, - 0xe6, 0xc0, 0xff, 0x28, 0x0d, 0x4a, 0x90, 0x8f, 0xeb, 0xc2, 0xbd, 0x0c, 0x28, 0xfb, 0x26, 0xc6, - 0xfe, 0xef, 0xa6, 0xb8, 0xaa, 0x59, 0x7e, 0x7a, 0xfd, 0x7c, 0xc9, 0xed, 0xc0, 0x22, 0x8e, 0xdd, - 0x78, 0xe9, 0xa7, 0xc0, 0xa1, 0xbe, 0x74, 0x19, 0x78, 0xfc, 0x33, 0x78, 0xc5, 0x6b, 0x19, 0xd6, - 0x5f, 0xed, 0xaa, 0xd1, 0x41, 0xd4, 0xa8, 0x02, 0x51, 0xa6, 0x51, 0x6a, 0x1f, 0xea, 0x8d, 0xd1, - 0x04, 0xe9, 0xe3, 0x09, 0xd2, 0x3f, 0x26, 0x48, 0x7f, 0x9e, 0x22, 0x6d, 0x3c, 0x45, 0xda, 0xdb, - 0x14, 0x69, 0x37, 0x27, 0x8e, 0x2b, 0x3b, 0xa1, 0x6d, 0xb5, 0xb8, 0x87, 0x65, 0x87, 0xce, 0x30, - 0x54, 0x3e, 0xf0, 0xa0, 0x9b, 0x10, 0xfb, 0xdf, 0x4c, 0x39, 0xf0, 0xa9, 0xb0, 0xf3, 0xd1, 0x72, - 0x9d, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0xcb, 0x45, 0x5b, 0x6e, 0x1a, 0x03, 0x00, 0x00, + // 392 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xc1, 0x4e, 0xea, 0x40, + 0x14, 0x86, 0x5b, 0x72, 0x2f, 0x8b, 0xb9, 0xb9, 0x9b, 0x11, 0xa3, 0x36, 0x30, 0x90, 0x26, 0x1a, + 0x63, 0x4c, 0x47, 0x70, 0xa9, 0x1b, 0x71, 0x61, 0xe2, 0x4a, 0x59, 0x19, 0x76, 0x53, 0x1c, 0x4a, + 0xa3, 0x9d, 0x29, 0x9d, 0xa9, 0x82, 0x4b, 0x9f, 0x80, 0xc4, 0x37, 0xf1, 0x29, 0xd8, 0x49, 0xe2, + 0xc6, 0x95, 0x31, 0xe0, 0x83, 0x18, 0xda, 0x29, 0x52, 0x08, 0xa2, 0xee, 0x26, 0x73, 0xfe, 0xff, + 0x3f, 0xdf, 0x99, 0x39, 0x20, 0xc7, 0x9a, 0x92, 0x5c, 0x7a, 0x2e, 0xc3, 0xed, 0x90, 0x06, 0x5d, + 0xcb, 0x0f, 0xb8, 0xe4, 0xb0, 0x20, 0x5b, 0x54, 0xb8, 0x1d, 0x46, 0xe5, 0x2d, 0x0f, 0xae, 0xac, + 0xf1, 0xb1, 0x29, 0xad, 0x44, 0x6a, 0xe4, 0x1c, 0xee, 0xf0, 0x48, 0x89, 0xc7, 0xa7, 0xd8, 0x64, + 0xe4, 0x1d, 0xce, 0x9d, 0x6b, 0x8a, 0x89, 0xef, 0x62, 0xc2, 0x18, 0x97, 0x44, 0xba, 0x9c, 0x09, + 0x55, 0xdd, 0x69, 0x70, 0xe1, 0x71, 0x81, 0x6d, 0x22, 0x68, 0xdc, 0x0b, 0xdf, 0x94, 0x6d, 0x2a, + 0x49, 0x19, 0xfb, 0xc4, 0x71, 0x59, 0x24, 0x56, 0xda, 0xd5, 0x09, 0x94, 0x4f, 0x02, 0xe2, 0x25, + 0x11, 0xf9, 0xc9, 0x35, 0x09, 0x65, 0x8b, 0x07, 0xee, 0xdd, 0x94, 0xc9, 0xcc, 0x01, 0x78, 0x3e, + 0x8e, 0x3d, 0x8b, 0x2c, 0x35, 0xda, 0x0e, 0xa9, 0x90, 0x66, 0x1d, 0xac, 0xa4, 0x6e, 0x85, 0xcf, + 0x99, 0xa0, 0xf0, 0x18, 0x64, 0xe3, 0xe8, 0x75, 0xbd, 0xa4, 0x6f, 0xff, 0xab, 0x6c, 0x5a, 0x5f, + 0x4e, 0x6c, 0xc5, 0xf6, 0xea, 0x9f, 0xfe, 0x6b, 0x51, 0xab, 0x29, 0xab, 0x89, 0x40, 0x3e, 0xca, + 0x3e, 0xa1, 0xf2, 0x68, 0x1a, 0x28, 0xe9, 0xdd, 0x05, 0x85, 0x05, 0x75, 0x45, 0x71, 0x01, 0xfe, + 0xa7, 0x0a, 0x0a, 0x66, 0x77, 0x09, 0x4c, 0xca, 0xa3, 0x98, 0xd2, 0x41, 0x95, 0xa7, 0x0c, 0xf8, + 0x1b, 0xf5, 0x86, 0x3d, 0x1d, 0x64, 0x63, 0x7a, 0x58, 0x5e, 0x92, 0x3b, 0xff, 0x7c, 0x46, 0xe5, + 0x27, 0x96, 0x78, 0x2a, 0xb3, 0x78, 0xff, 0xfc, 0xfe, 0x90, 0xd9, 0x80, 0x6b, 0x38, 0x56, 0xe3, + 0x99, 0xdf, 0x84, 0x8f, 0xfa, 0xcc, 0xdc, 0xf0, 0xe0, 0x3b, 0x6d, 0x16, 0x3c, 0xb3, 0x71, 0xf8, + 0x3b, 0xb3, 0xa2, 0xdd, 0x8a, 0x68, 0x4b, 0x10, 0xcd, 0xd1, 0xa6, 0x96, 0xac, 0x7a, 0xda, 0x1f, + 0x22, 0x7d, 0x30, 0x44, 0xfa, 0xdb, 0x10, 0xe9, 0xbd, 0x11, 0xd2, 0x06, 0x23, 0xa4, 0xbd, 0x8c, + 0x90, 0x56, 0xdf, 0x73, 0x5c, 0xd9, 0x0a, 0x6d, 0xab, 0xc1, 0x3d, 0x9c, 0x22, 0x49, 0x12, 0x3b, + 0x9f, 0x99, 0xb2, 0xeb, 0x53, 0x61, 0x67, 0xa3, 0x8d, 0xdd, 0xff, 0x08, 0x00, 0x00, 0xff, 0xff, + 0x12, 0x99, 0x51, 0xe8, 0x7d, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -258,7 +259,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftadmin.Query/Params", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftadmin.Query/Params", in, out, opts...) if err != nil { return nil, err } @@ -267,7 +268,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . func (c *queryClient) Authorization(ctx context.Context, in *QueryGetAuthorizationRequest, opts ...grpc.CallOption) (*QueryGetAuthorizationResponse, error) { out := new(QueryGetAuthorizationResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftadmin.Query/Authorization", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftadmin.Query/Authorization", in, out, opts...) if err != nil { return nil, err } @@ -307,7 +308,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftadmin.Query/Params", + FullMethod: "/thesixnetwork.sixnft.nftadmin.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) @@ -325,7 +326,7 @@ func _Query_Authorization_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftadmin.Query/Authorization", + FullMethod: "/thesixnetwork.sixnft.nftadmin.Query/Authorization", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Authorization(ctx, req.(*QueryGetAuthorizationRequest)) @@ -334,7 +335,7 @@ func _Query_Authorization_Handler(srv interface{}, ctx context.Context, dec func } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "sixnft.nftadmin.Query", + ServiceName: "thesixnetwork.sixnft.nftadmin.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { diff --git a/x/nftadmin/types/tx.pb.go b/x/nftadmin/types/tx.pb.go index fb4ea430..ac0c7975 100644 --- a/x/nftadmin/types/tx.pb.go +++ b/x/nftadmin/types/tx.pb.go @@ -460,45 +460,45 @@ func (m *MsgBurnResponse) GetToken() string { } func init() { - proto.RegisterType((*MsgGrantPermission)(nil), "sixnft.nftadmin.MsgGrantPermission") - proto.RegisterType((*MsgGrantPermissionResponse)(nil), "sixnft.nftadmin.MsgGrantPermissionResponse") - proto.RegisterType((*MsgRevokePermission)(nil), "sixnft.nftadmin.MsgRevokePermission") - proto.RegisterType((*MsgRevokePermissionResponse)(nil), "sixnft.nftadmin.MsgRevokePermissionResponse") - proto.RegisterType((*MsgMint)(nil), "sixnft.nftadmin.MsgMint") - proto.RegisterType((*MsgMintResponse)(nil), "sixnft.nftadmin.MsgMintResponse") - proto.RegisterType((*MsgBurn)(nil), "sixnft.nftadmin.MsgBurn") - proto.RegisterType((*MsgBurnResponse)(nil), "sixnft.nftadmin.MsgBurnResponse") + proto.RegisterType((*MsgGrantPermission)(nil), "thesixnetwork.sixnft.nftadmin.MsgGrantPermission") + proto.RegisterType((*MsgGrantPermissionResponse)(nil), "thesixnetwork.sixnft.nftadmin.MsgGrantPermissionResponse") + proto.RegisterType((*MsgRevokePermission)(nil), "thesixnetwork.sixnft.nftadmin.MsgRevokePermission") + proto.RegisterType((*MsgRevokePermissionResponse)(nil), "thesixnetwork.sixnft.nftadmin.MsgRevokePermissionResponse") + proto.RegisterType((*MsgMint)(nil), "thesixnetwork.sixnft.nftadmin.MsgMint") + proto.RegisterType((*MsgMintResponse)(nil), "thesixnetwork.sixnft.nftadmin.MsgMintResponse") + proto.RegisterType((*MsgBurn)(nil), "thesixnetwork.sixnft.nftadmin.MsgBurn") + proto.RegisterType((*MsgBurnResponse)(nil), "thesixnetwork.sixnft.nftadmin.MsgBurnResponse") } func init() { proto.RegisterFile("nftadmin/tx.proto", fileDescriptor_09fca6179e413e77) } var fileDescriptor_09fca6179e413e77 = []byte{ - // 385 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xc1, 0x4a, 0xf3, 0x40, - 0x10, 0xc7, 0xbb, 0x6d, 0xbf, 0x96, 0x6f, 0x2e, 0xd5, 0x55, 0x24, 0x44, 0x08, 0x25, 0x7a, 0x10, - 0x94, 0x44, 0x14, 0xf4, 0x28, 0xf4, 0x22, 0x08, 0x01, 0xcd, 0x51, 0xf4, 0x90, 0xd6, 0x6d, 0x1a, - 0x4a, 0x76, 0xcb, 0xee, 0x56, 0xeb, 0x5b, 0xf8, 0x58, 0x1e, 0x7b, 0x14, 0x4f, 0xd2, 0xbe, 0x88, - 0x24, 0x9b, 0xa6, 0x69, 0x12, 0xa5, 0xa8, 0xb7, 0x4c, 0xe6, 0x3f, 0xbf, 0xfd, 0xc1, 0x0e, 0x0b, - 0x9b, 0xb4, 0x2f, 0xbd, 0x87, 0x30, 0xa0, 0xb6, 0x9c, 0x58, 0x23, 0xce, 0x24, 0xc3, 0x2d, 0x11, - 0x4c, 0x68, 0x5f, 0x5a, 0x8b, 0x8e, 0x79, 0x07, 0xd8, 0x11, 0xfe, 0x25, 0xf7, 0xa8, 0xbc, 0x26, - 0x3c, 0x0c, 0x84, 0x08, 0x18, 0xc5, 0x1a, 0x34, 0x7b, 0x9c, 0x78, 0x92, 0x71, 0x0d, 0xb5, 0xd1, - 0xc1, 0x7f, 0x77, 0x51, 0x62, 0x0c, 0x75, 0xea, 0x85, 0x44, 0xab, 0xc6, 0xbf, 0xe3, 0xef, 0x28, - 0xed, 0x47, 0x00, 0x42, 0xb4, 0x9a, 0x4a, 0x27, 0xa5, 0x79, 0x06, 0x7a, 0x91, 0xee, 0x12, 0x31, - 0x62, 0x54, 0xac, 0xcc, 0xa1, 0xd5, 0xb9, 0x7b, 0xd8, 0x72, 0x84, 0xef, 0x92, 0x47, 0x36, 0x24, - 0xbf, 0xd1, 0xe2, 0x31, 0x21, 0xd5, 0x4a, 0x4a, 0xf3, 0x1c, 0x76, 0x4b, 0xf0, 0x59, 0xaf, 0xc5, - 0x20, 0x5a, 0x1d, 0xbc, 0x81, 0xa6, 0x23, 0x7c, 0x27, 0xa0, 0xf2, 0x1b, 0x97, 0x1d, 0x68, 0x78, - 0x21, 0x1b, 0x53, 0x19, 0xdb, 0xd4, 0xdd, 0xa4, 0xc2, 0xdb, 0xf0, 0x4f, 0xb2, 0x21, 0xa1, 0x89, - 0x8d, 0x2a, 0xcc, 0x0b, 0x68, 0x25, 0xc8, 0xf4, 0xfc, 0x25, 0x40, 0x91, 0x0b, 0x80, 0x6a, 0x16, - 0xa0, 0x9c, 0x3a, 0x63, 0x4e, 0xff, 0xd8, 0x29, 0x42, 0xfe, 0xcc, 0xe9, 0xe4, 0xbd, 0x0a, 0x35, - 0x47, 0xf8, 0xb8, 0x07, 0xad, 0xfc, 0x6a, 0xed, 0x59, 0xb9, 0x15, 0xb4, 0x8a, 0x1b, 0xa2, 0x1f, - 0xae, 0x11, 0x4a, 0xd5, 0xfa, 0xb0, 0x51, 0xd8, 0x94, 0xfd, 0x32, 0x40, 0x3e, 0xa5, 0x1f, 0xad, - 0x93, 0x4a, 0xcf, 0xe9, 0x40, 0x5d, 0xdd, 0x7c, 0xd9, 0x54, 0xd4, 0xd1, 0xdb, 0x5f, 0x75, 0xb2, - 0x0c, 0x75, 0x53, 0x65, 0xc9, 0xa8, 0x53, 0xce, 0xc8, 0x5e, 0x45, 0xe7, 0xea, 0x75, 0x66, 0xa0, - 0xe9, 0xcc, 0x40, 0x1f, 0x33, 0x03, 0xbd, 0xcc, 0x8d, 0xca, 0x74, 0x6e, 0x54, 0xde, 0xe6, 0x46, - 0xe5, 0xf6, 0xd8, 0x0f, 0xe4, 0x60, 0xdc, 0xb5, 0x7a, 0x2c, 0xb4, 0xe5, 0x80, 0x44, 0x20, 0x22, - 0x9f, 0x18, 0x1f, 0xda, 0x8a, 0x69, 0x4f, 0xec, 0xe5, 0x93, 0xf0, 0x3c, 0x22, 0xa2, 0xdb, 0x88, - 0x9f, 0x85, 0xd3, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdb, 0xde, 0x75, 0x5a, 0x2b, 0x04, 0x00, - 0x00, + // 394 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcf, 0x4a, 0xeb, 0x40, + 0x14, 0xc6, 0x3b, 0x6d, 0x6f, 0xcb, 0x3d, 0x9b, 0xde, 0x1b, 0x45, 0x42, 0xc4, 0x20, 0x59, 0x88, + 0xab, 0x44, 0x2b, 0x28, 0xba, 0x11, 0xba, 0x11, 0x84, 0x80, 0x66, 0x29, 0x2a, 0xa4, 0x75, 0x9a, + 0x86, 0x92, 0x99, 0x32, 0x33, 0xd5, 0xba, 0x12, 0x7c, 0x02, 0x1f, 0x4b, 0x70, 0xd3, 0xa5, 0x4b, + 0x69, 0x5f, 0x44, 0x32, 0x49, 0xd3, 0xa4, 0x91, 0xfe, 0x51, 0x77, 0x73, 0xc2, 0xf7, 0xfd, 0xf2, + 0x83, 0x39, 0x0c, 0xfc, 0x27, 0x6d, 0xe1, 0xde, 0x05, 0x3e, 0xb1, 0xc4, 0xc0, 0xec, 0x31, 0x2a, + 0xa8, 0xb2, 0x25, 0x3a, 0x98, 0xfb, 0x03, 0x82, 0xc5, 0x03, 0x65, 0x5d, 0x33, 0x3c, 0xb6, 0x85, + 0x39, 0xc9, 0x19, 0xd7, 0xa0, 0xd8, 0xdc, 0x3b, 0x63, 0x2e, 0x11, 0x17, 0x98, 0x05, 0x3e, 0xe7, + 0x3e, 0x25, 0x8a, 0x0a, 0xd5, 0x16, 0xc3, 0xae, 0xa0, 0x4c, 0x45, 0xdb, 0x68, 0xf7, 0xaf, 0x33, + 0x19, 0x15, 0x05, 0xca, 0xc4, 0x0d, 0xb0, 0x5a, 0x94, 0x9f, 0xe5, 0x39, 0x4c, 0x7b, 0x21, 0x00, + 0x63, 0xb5, 0x14, 0xa5, 0xe3, 0xd1, 0x38, 0x04, 0x2d, 0x4f, 0x77, 0x30, 0xef, 0x51, 0xc2, 0x33, + 0x3d, 0x94, 0xed, 0xdd, 0xc0, 0x9a, 0xcd, 0x3d, 0x07, 0xdf, 0xd3, 0x2e, 0xfe, 0x89, 0x16, 0x93, + 0x84, 0x44, 0x2b, 0x1e, 0x8d, 0x23, 0xd8, 0xfc, 0x02, 0x9f, 0xf6, 0x9a, 0x14, 0x51, 0xb6, 0x78, + 0x09, 0x55, 0x9b, 0x7b, 0xb6, 0x4f, 0xc4, 0x1c, 0x97, 0x0d, 0xa8, 0xb8, 0x01, 0xed, 0x13, 0x21, + 0x6d, 0xca, 0x4e, 0x3c, 0x29, 0xeb, 0xf0, 0x47, 0xd0, 0x2e, 0x26, 0xb1, 0x4d, 0x34, 0x18, 0xa7, + 0x50, 0x8b, 0x91, 0xc9, 0xff, 0xa7, 0x80, 0x88, 0x9c, 0x03, 0x14, 0xd3, 0x80, 0xc8, 0xa9, 0xd1, + 0x67, 0xe4, 0x97, 0x9d, 0x42, 0xe4, 0xf7, 0x9c, 0xea, 0x6f, 0x25, 0x28, 0xd9, 0xdc, 0x53, 0x9e, + 0xa0, 0x36, 0xbb, 0x5a, 0xfb, 0xe6, 0xdc, 0x85, 0x34, 0xf3, 0xfb, 0xa2, 0x1d, 0xaf, 0x5c, 0x49, + 0xb4, 0x9f, 0x11, 0xfc, 0xcb, 0xad, 0x51, 0x7d, 0x31, 0x6f, 0xb6, 0xa3, 0x9d, 0xac, 0xde, 0x49, + 0x24, 0x6e, 0xa1, 0x2c, 0x57, 0x66, 0x67, 0x31, 0x23, 0xcc, 0x69, 0xe6, 0x72, 0xb9, 0x34, 0x5f, + 0x5e, 0xff, 0x12, 0xfc, 0x30, 0xb7, 0x0c, 0x3f, 0x7d, 0xf7, 0x8d, 0xf3, 0xd7, 0x91, 0x8e, 0x86, + 0x23, 0x1d, 0x7d, 0x8c, 0x74, 0xf4, 0x32, 0xd6, 0x0b, 0xc3, 0xb1, 0x5e, 0x78, 0x1f, 0xeb, 0x85, + 0xab, 0x3d, 0xcf, 0x17, 0x9d, 0x7e, 0xd3, 0x6c, 0xd1, 0xc0, 0xca, 0x30, 0xad, 0x88, 0x69, 0x0d, + 0xac, 0xe9, 0x8b, 0xf4, 0xd8, 0xc3, 0xbc, 0x59, 0x91, 0xaf, 0xd2, 0xc1, 0x67, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xfb, 0x86, 0xc5, 0xc5, 0xaa, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -529,7 +529,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { func (c *msgClient) GrantPermission(ctx context.Context, in *MsgGrantPermission, opts ...grpc.CallOption) (*MsgGrantPermissionResponse, error) { out := new(MsgGrantPermissionResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftadmin.Msg/GrantPermission", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftadmin.Msg/GrantPermission", in, out, opts...) if err != nil { return nil, err } @@ -538,7 +538,7 @@ func (c *msgClient) GrantPermission(ctx context.Context, in *MsgGrantPermission, func (c *msgClient) RevokePermission(ctx context.Context, in *MsgRevokePermission, opts ...grpc.CallOption) (*MsgRevokePermissionResponse, error) { out := new(MsgRevokePermissionResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftadmin.Msg/RevokePermission", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftadmin.Msg/RevokePermission", in, out, opts...) if err != nil { return nil, err } @@ -547,7 +547,7 @@ func (c *msgClient) RevokePermission(ctx context.Context, in *MsgRevokePermissio func (c *msgClient) Mint(ctx context.Context, in *MsgMint, opts ...grpc.CallOption) (*MsgMintResponse, error) { out := new(MsgMintResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftadmin.Msg/Mint", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftadmin.Msg/Mint", in, out, opts...) if err != nil { return nil, err } @@ -556,7 +556,7 @@ func (c *msgClient) Mint(ctx context.Context, in *MsgMint, opts ...grpc.CallOpti func (c *msgClient) Burn(ctx context.Context, in *MsgBurn, opts ...grpc.CallOption) (*MsgBurnResponse, error) { out := new(MsgBurnResponse) - err := c.cc.Invoke(ctx, "/sixnft.nftadmin.Msg/Burn", in, out, opts...) + err := c.cc.Invoke(ctx, "/thesixnetwork.sixnft.nftadmin.Msg/Burn", in, out, opts...) if err != nil { return nil, err } @@ -602,7 +602,7 @@ func _Msg_GrantPermission_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftadmin.Msg/GrantPermission", + FullMethod: "/thesixnetwork.sixnft.nftadmin.Msg/GrantPermission", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).GrantPermission(ctx, req.(*MsgGrantPermission)) @@ -620,7 +620,7 @@ func _Msg_RevokePermission_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftadmin.Msg/RevokePermission", + FullMethod: "/thesixnetwork.sixnft.nftadmin.Msg/RevokePermission", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RevokePermission(ctx, req.(*MsgRevokePermission)) @@ -638,7 +638,7 @@ func _Msg_Mint_Handler(srv interface{}, ctx context.Context, dec func(interface{ } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftadmin.Msg/Mint", + FullMethod: "/thesixnetwork.sixnft.nftadmin.Msg/Mint", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Mint(ctx, req.(*MsgMint)) @@ -656,7 +656,7 @@ func _Msg_Burn_Handler(srv interface{}, ctx context.Context, dec func(interface{ } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/sixnft.nftadmin.Msg/Burn", + FullMethod: "/thesixnetwork.sixnft.nftadmin.Msg/Burn", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Burn(ctx, req.(*MsgBurn)) @@ -665,7 +665,7 @@ func _Msg_Burn_Handler(srv interface{}, ctx context.Context, dec func(interface{ } var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "sixnft.nftadmin.Msg", + ServiceName: "thesixnetwork.sixnft.nftadmin.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { From 1830e4451be57aac6a7e534435e808d7cff20f01 Mon Sep 17 00:00:00 2001 From: jonathan-six <97500179+jonathan-six@users.noreply.github.com> Date: Tue, 4 Oct 2022 10:41:47 +0700 Subject: [PATCH 3/5] added: mainnet script --- scripts/menu_mainnet.sh | 123 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 scripts/menu_mainnet.sh diff --git a/scripts/menu_mainnet.sh b/scripts/menu_mainnet.sh new file mode 100644 index 00000000..0775e3b8 --- /dev/null +++ b/scripts/menu_mainnet.sh @@ -0,0 +1,123 @@ +default_schema_code=$1 +echo "#############################################" +echo "## ##" +echo "## Welcome to the menu script ##" +echo "## ##" +echo "## Please select an option ##" +echo "## ##" +echo "## 1. Show Schema ##" +echo "## 2. Show NFTs ##" +echo "## 3. Mockup Token ##" +echo "## 4. Do Action ##" +echo "## 5. Set NFT Attribute ##" +echo "## 6. Oracle - Create Mint Request ##" +echo "## 7. Oracle - Get Mint Request ##" +echo "## 8. Oracle - Submit Mint Response ##" +echo "## Your choice: ##" +echo "## ##" +echo "#############################################" +read -p "Your choice: " choice +case $choice in + 1) echo "Showing Schema" + read -p "Enter Schema Code: " schema_code + if [ -z "$schema_code" ]; then + schema_code=$default_schema_code + fi + sixnftd q nftmngr show-nft-schema ${schema_code} --output json | jq . + ;; + 2) echo "Showing NFT" + read -p "Enter Schema Code: " schema_code + read -p "Enter Token ID: " token_id + if [ -z "$schema_code" ]; then + schema_code=$default_schema_code + fi + sixnftd q nftmngr show-nft-data ${schema_code} ${token_id} --output json | jq . + ;; + 3) echo "Mockup Token" + read -p "Enter Schema Code: " schema_code + read -p "Enter Token ID: " token_id + if [ -z "$schema_code" ]; then + schema_code=$default_schema_code + fi + BASE64_META=`cat nft-data.json | sed "s/TOKENID/${token_id}/g" | sed "s/SCHEMA_CODE/${schema_code}/g" | base64 | tr -d '\n'` + sixnftd tx nftmngr create-metadata "${schema_code}" ${token_id} --from klaytntest --gas auto --gas-adjustment 1.5 --gas-prices 0.1usixnft -y --node https://sixnft-rpc.sixprotocol.net:443 --keyring-backend file \ + ${BASE64_META} + ;; + 4) echo "Do Action" + read -p "Enter Schema Code: " schema_code + read -p "Enter Token ID: " token_id + read -p "Enter Action: " action + if [ -z "$schema_code" ]; then + schema_code=$default_schema_code + fi + sixnftd tx nftmngr perform-action-by-nftadmin ${schema_code} ${token_id} ${action} --from klaytntest --gas auto --gas-adjustment 1.5 --gas-prices 0.1usixnft -y --node https://sixnft-rpc.sixprotocol.net:443 --keyring-backend file + ;; + 5) echo "Set NFT Attribute" + read -p "Enter Schema Code: " schema_code + read -p "Enter Value (attribute_name=N[value]): " value + if [ -z "$schema_code" ]; then + schema_code=$default_schema_code + fi + + ATTRIBUTE_NAME=`echo $value | cut -d'=' -f1` + ATTRIBUTE_VALUE_STRING=`echo $value | cut -d'=' -f2` + # get one character from ATTRIBUTE_VALUE + ATTRIBUTE_VALUE_CHAR=`echo $ATTRIBUTE_VALUE_STRING | cut -c1` + # get characters between [] from ATTRIBUTE_VALUE_CHAR + ATTRIBUTE_VALUE_VALUE=`echo $ATTRIBUTE_VALUE_STRING | cut -d'[' -f2 | cut -d']' -f1` + + if [ "$ATTRIBUTE_VALUE_CHAR" = "N" ]; then + ATTRIBUTE_VALUE_TYPE="number" + ATTRIBUTE_VALUE_TYPE_VALUE=${ATTRIBUTE_VALUE_VALUE} + elif [ "$ATTRIBUTE_VALUE_CHAR" = "S" ]; then + ATTRIBUTE_VALUE_TYPE="string" + ATTRIBUTE_VALUE_TYPE_VALUE="\"${ATTRIBUTE_VALUE_VALUE}\"" + elif [ "$ATTRIBUTE_VALUE_CHAR" = "B" ]; then + ATTRIBUTE_VALUE_TYPE="boolean" + # check if ATTRIBUTE_VALUE_VALUE is true or false + if [ "$ATTRIBUTE_VALUE_VALUE" = "true" ]; then + ATTRIBUTE_VALUE_TYPE_VALUE="true" + elif [ "$ATTRIBUTE_VALUE_VALUE" = "false" ]; then + ATTRIBUTE_VALUE_TYPE_VALUE="false" + else + echo "Invalid boolean value" + exit 1 + fi + elif [ "$ATTRIBUTE_VALUE_CHAR" = "F" ]; then + ATTRIBUTE_VALUE_TYPE="float" + ATTRIBUTE_VALUE_TYPE_VALUE=${ATTRIBUTE_VALUE_VALUE} + fi + + BASE64_ATTR=`cat nft-data.json \ + | sed "s/#ATTRIBUTE_NAME#/${ATTRIBUTE_NAME}/g" \ + | sed "s/#ATTRIBUTE_VALUE_TYPE#/${ATTRIBUTE_VALUE_TYPE}/g" \ + | sed "s/#ATTRIBUTE_VALUE_TYPE_VALUE#/${ATTRIBUTE_VALUE_TYPE_VALUE}/g" \ + | base64 | tr -d '\n'` + + echo "BASE64_ATTR: ${BASE64_ATTR}" + + sixnftd tx nftmngr set-nft-attribute ${schema_code} ${BASE64_ATTR} --from klaytntest --gas auto --gas-adjustment 1.5 --gas-prices 0.1usixnft -y --node https://sixnft-rpc.sixprotocol.net:443 + ;; + 6) echo "Oracle - Create Mint Request" + read -p "Enter Schema Code: " schema_code + read -p "Enter Token ID: " token_id + read -p "Require confirmations: " require_confirmations + if [ -z "$schema_code" ]; then + schema_code=$default_schema_code + fi + sixnftd tx nftoracle create-mint-request ${schema_code} ${token_id} ${require_confirmations} --from klaytntest --gas auto --gas-adjustment 1.5 --gas-prices 0.1usixnft -y --node https://sixnft-rpc.sixprotocol.net:443 + ;; + 7) echo "Oracle - Get Mint Request" + read -p "Mint Request ID: " mint_request_id + sixnftd q nftoracle show-mint-request ${mint_request_id} --output json | jq . + ;; + 8) echo "Oracle - Submit Mint Response" + read -p "Mint Request ID: " mint_request_id + read -p "Oracle : " oracle_key_name + BASE64_ORIGINDATA=`cat nft-origin-data.json | base64 | tr -d '\n'` + + sixnftd tx nftoracle submit-mint-response ${mint_request_id} ${BASE64_ORIGINDATA} --from ${oracle_key_name} --gas auto --gas-adjustment 1.5 --gas-prices 0.1usixnft -y --node https://sixnft-rpc.sixprotocol.net:443 + ;; + *) echo "Invalid choice" + ;; +esac \ No newline at end of file From 8b2532090bc8a67458b3294e38831e4aa2b69f0e Mon Sep 17 00:00:00 2001 From: ngam Date: Tue, 4 Oct 2022 12:59:17 +0700 Subject: [PATCH 4/5] complete --- docs/static/openapi.yml | 50 ++++-- proto/nftmngr/nft_data.proto | 5 +- .../sixnft/sixnft.nftmngr/index.ts | 160 +++++++++--------- .../sixnft/sixnft.nftmngr/module/index.ts | 36 ++-- .../sixnft/sixnft.nftmngr/module/rest.ts | 12 ++ .../cosmos/base/query/v1beta1/pagination.ts | 30 +++- .../module/types/nftmngr/nft_data.ts | 25 ++- .../module/rest.ts | 8 + .../cosmos/base/query/v1beta1/pagination.ts | 30 +++- .../thesixnetwork.sixnft.nftadmin/index.ts | 48 +++--- .../module/index.ts | 12 +- .../thesixnetwork.sixnft.nftoracle/index.ts | 64 +++---- .../module/index.ts | 12 +- x/nftmngr/types/meta.go | 19 +++ x/nftmngr/types/nft_data.pb.go | 116 +++++++++---- 15 files changed, 412 insertions(+), 215 deletions(-) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index ced20643..777a264e 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -30718,6 +30718,8 @@ paths: type: string onchain_image: type: string + token_uri: + type: string origin_attributes: type: array items: @@ -31076,6 +31078,8 @@ paths: type: string onchain_image: type: string + token_uri: + type: string origin_attributes: type: array items: @@ -33372,16 +33376,6 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query '/sixnft/evmsupport/address_binding/{ethAddress}/{nativeAddress}': @@ -33731,6 +33725,16 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query '/sixnft/nftoracle/action_request/{id}': @@ -34022,6 +34026,16 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query '/sixnft/nftoracle/mint_request/{id}': @@ -34286,6 +34300,16 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query '/thesixnetwork/sixnft/nftoracle/collection_owner_request/{id}': @@ -56783,6 +56807,8 @@ definitions: type: string onchain_image: type: string + token_uri: + type: string origin_attributes: type: array items: @@ -57509,6 +57535,8 @@ definitions: type: string onchain_image: type: string + token_uri: + type: string origin_attributes: type: array items: @@ -57944,6 +57972,8 @@ definitions: type: string onchain_image: type: string + token_uri: + type: string origin_attributes: type: array items: diff --git a/proto/nftmngr/nft_data.proto b/proto/nftmngr/nft_data.proto index 70e5dc30..8f6b84bc 100644 --- a/proto/nftmngr/nft_data.proto +++ b/proto/nftmngr/nft_data.proto @@ -16,6 +16,7 @@ message NftData { OwnerAddressType owner_address_type = 4; string origin_image = 5; string onchain_image = 6; - repeated NftAttributeValue origin_attributes = 7; - repeated NftAttributeValue onchain_attributes = 8; + string token_uri = 7; + repeated NftAttributeValue origin_attributes = 8; + repeated NftAttributeValue onchain_attributes = 9; } \ No newline at end of file diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts index 5d1c8fc9..0f00d38b 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts @@ -425,284 +425,284 @@ export default { }, - async sendMsgPerformActionByAdmin({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgAddAction({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgPerformActionByAdmin(value) + const msg = await txClient.msgAddAction(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgPerformActionByAdmin:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddAction:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgPerformActionByAdmin:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgAddAction:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgChangeSchemaOwner({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgToggleAction({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgChangeSchemaOwner(value) + const msg = await txClient.msgToggleAction(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgChangeSchemaOwner:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgChangeSchemaOwner:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgToggleAction:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgAddAction({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateNFTSchema({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddAction(value) + const msg = await txClient.msgCreateNFTSchema(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddAction:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgAddAction:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateNFTSchema:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgSetBaseUri({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgAddTokenAttribute({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetBaseUri(value) + const msg = await txClient.msgAddTokenAttribute(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddTokenAttribute:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgSetBaseUri:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgAddTokenAttribute:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgCreateMetadata({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgSetNFTAttribute({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateMetadata(value) + const msg = await txClient.msgSetNFTAttribute(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateMetadata:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSetNFTAttribute:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateMetadata:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgSetNFTAttribute:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgCreateNFTSchema({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgSetBaseUri({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateNFTSchema(value) + const msg = await txClient.msgSetBaseUri(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateNFTSchema:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgSetBaseUri:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgAddTokenAttribute({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgPerformActionByAdmin({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddTokenAttribute(value) + const msg = await txClient.msgPerformActionByAdmin(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddTokenAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgPerformActionByAdmin:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgAddTokenAttribute:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgPerformActionByAdmin:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgAddAttribute({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateMetadata({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddAttribute(value) + const msg = await txClient.msgCreateMetadata(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateMetadata:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgAddAttribute:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateMetadata:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgSetNFTAttribute({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgAddAttribute({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetNFTAttribute(value) + const msg = await txClient.msgAddAttribute(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetNFTAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddAttribute:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgSetNFTAttribute:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgAddAttribute:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgToggleAction({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgChangeSchemaOwner({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgToggleAction(value) + const msg = await txClient.msgChangeSchemaOwner(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgChangeSchemaOwner:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgToggleAction:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgChangeSchemaOwner:Send Could not broadcast Tx: '+ e.message) } } }, - async MsgPerformActionByAdmin({ rootGetters }, { value }) { + async MsgAddAction({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgPerformActionByAdmin(value) + const msg = await txClient.msgAddAction(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgPerformActionByAdmin:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddAction:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgPerformActionByAdmin:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgAddAction:Create Could not create message: ' + e.message) } } }, - async MsgChangeSchemaOwner({ rootGetters }, { value }) { + async MsgToggleAction({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgChangeSchemaOwner(value) + const msg = await txClient.msgToggleAction(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgChangeSchemaOwner:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgChangeSchemaOwner:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgToggleAction:Create Could not create message: ' + e.message) } } }, - async MsgAddAction({ rootGetters }, { value }) { + async MsgCreateNFTSchema({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddAction(value) + const msg = await txClient.msgCreateNFTSchema(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddAction:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgAddAction:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateNFTSchema:Create Could not create message: ' + e.message) } } }, - async MsgSetBaseUri({ rootGetters }, { value }) { + async MsgAddTokenAttribute({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetBaseUri(value) + const msg = await txClient.msgAddTokenAttribute(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddTokenAttribute:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgSetBaseUri:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgAddTokenAttribute:Create Could not create message: ' + e.message) } } }, - async MsgCreateMetadata({ rootGetters }, { value }) { + async MsgSetNFTAttribute({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateMetadata(value) + const msg = await txClient.msgSetNFTAttribute(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateMetadata:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSetNFTAttribute:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateMetadata:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgSetNFTAttribute:Create Could not create message: ' + e.message) } } }, - async MsgCreateNFTSchema({ rootGetters }, { value }) { + async MsgSetBaseUri({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateNFTSchema(value) + const msg = await txClient.msgSetBaseUri(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateNFTSchema:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgSetBaseUri:Create Could not create message: ' + e.message) } } }, - async MsgAddTokenAttribute({ rootGetters }, { value }) { + async MsgPerformActionByAdmin({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddTokenAttribute(value) + const msg = await txClient.msgPerformActionByAdmin(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddTokenAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgPerformActionByAdmin:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgAddTokenAttribute:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgPerformActionByAdmin:Create Could not create message: ' + e.message) } } }, - async MsgAddAttribute({ rootGetters }, { value }) { + async MsgCreateMetadata({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddAttribute(value) + const msg = await txClient.msgCreateMetadata(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateMetadata:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgAddAttribute:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateMetadata:Create Could not create message: ' + e.message) } } }, - async MsgSetNFTAttribute({ rootGetters }, { value }) { + async MsgAddAttribute({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetNFTAttribute(value) + const msg = await txClient.msgAddAttribute(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetNFTAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddAttribute:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgSetNFTAttribute:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgAddAttribute:Create Could not create message: ' + e.message) } } }, - async MsgToggleAction({ rootGetters }, { value }) { + async MsgChangeSchemaOwner({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgToggleAction(value) + const msg = await txClient.msgChangeSchemaOwner(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgChangeSchemaOwner:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgToggleAction:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgChangeSchemaOwner:Create Could not create message: ' + e.message) } } }, diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts index 7419f65e..23a5f57e 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts @@ -4,29 +4,29 @@ import { StdFee } from "@cosmjs/launchpad"; import { SigningStargateClient } from "@cosmjs/stargate"; import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { Api } from "./rest"; -import { MsgPerformActionByAdmin } from "./types/nftmngr/tx"; -import { MsgChangeSchemaOwner } from "./types/nftmngr/tx"; import { MsgAddAction } from "./types/nftmngr/tx"; -import { MsgSetBaseUri } from "./types/nftmngr/tx"; -import { MsgCreateMetadata } from "./types/nftmngr/tx"; +import { MsgToggleAction } from "./types/nftmngr/tx"; import { MsgCreateNFTSchema } from "./types/nftmngr/tx"; import { MsgAddTokenAttribute } from "./types/nftmngr/tx"; -import { MsgAddAttribute } from "./types/nftmngr/tx"; import { MsgSetNFTAttribute } from "./types/nftmngr/tx"; -import { MsgToggleAction } from "./types/nftmngr/tx"; +import { MsgSetBaseUri } from "./types/nftmngr/tx"; +import { MsgPerformActionByAdmin } from "./types/nftmngr/tx"; +import { MsgCreateMetadata } from "./types/nftmngr/tx"; +import { MsgAddAttribute } from "./types/nftmngr/tx"; +import { MsgChangeSchemaOwner } from "./types/nftmngr/tx"; const types = [ - ["/sixnft.nftmngr.MsgPerformActionByAdmin", MsgPerformActionByAdmin], - ["/sixnft.nftmngr.MsgChangeSchemaOwner", MsgChangeSchemaOwner], ["/sixnft.nftmngr.MsgAddAction", MsgAddAction], - ["/sixnft.nftmngr.MsgSetBaseUri", MsgSetBaseUri], - ["/sixnft.nftmngr.MsgCreateMetadata", MsgCreateMetadata], + ["/sixnft.nftmngr.MsgToggleAction", MsgToggleAction], ["/sixnft.nftmngr.MsgCreateNFTSchema", MsgCreateNFTSchema], ["/sixnft.nftmngr.MsgAddTokenAttribute", MsgAddTokenAttribute], - ["/sixnft.nftmngr.MsgAddAttribute", MsgAddAttribute], ["/sixnft.nftmngr.MsgSetNFTAttribute", MsgSetNFTAttribute], - ["/sixnft.nftmngr.MsgToggleAction", MsgToggleAction], + ["/sixnft.nftmngr.MsgSetBaseUri", MsgSetBaseUri], + ["/sixnft.nftmngr.MsgPerformActionByAdmin", MsgPerformActionByAdmin], + ["/sixnft.nftmngr.MsgCreateMetadata", MsgCreateMetadata], + ["/sixnft.nftmngr.MsgAddAttribute", MsgAddAttribute], + ["/sixnft.nftmngr.MsgChangeSchemaOwner", MsgChangeSchemaOwner], ]; export const MissingWalletError = new Error("wallet is required"); @@ -59,16 +59,16 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = return { signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgPerformActionByAdmin: (data: MsgPerformActionByAdmin): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgPerformActionByAdmin", value: MsgPerformActionByAdmin.fromPartial( data ) }), - msgChangeSchemaOwner: (data: MsgChangeSchemaOwner): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgChangeSchemaOwner", value: MsgChangeSchemaOwner.fromPartial( data ) }), msgAddAction: (data: MsgAddAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddAction", value: MsgAddAction.fromPartial( data ) }), - msgSetBaseUri: (data: MsgSetBaseUri): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgSetBaseUri", value: MsgSetBaseUri.fromPartial( data ) }), - msgCreateMetadata: (data: MsgCreateMetadata): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgCreateMetadata", value: MsgCreateMetadata.fromPartial( data ) }), + msgToggleAction: (data: MsgToggleAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgToggleAction", value: MsgToggleAction.fromPartial( data ) }), msgCreateNFTSchema: (data: MsgCreateNFTSchema): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgCreateNFTSchema", value: MsgCreateNFTSchema.fromPartial( data ) }), msgAddTokenAttribute: (data: MsgAddTokenAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddTokenAttribute", value: MsgAddTokenAttribute.fromPartial( data ) }), - msgAddAttribute: (data: MsgAddAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddAttribute", value: MsgAddAttribute.fromPartial( data ) }), msgSetNFTAttribute: (data: MsgSetNFTAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgSetNFTAttribute", value: MsgSetNFTAttribute.fromPartial( data ) }), - msgToggleAction: (data: MsgToggleAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgToggleAction", value: MsgToggleAction.fromPartial( data ) }), + msgSetBaseUri: (data: MsgSetBaseUri): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgSetBaseUri", value: MsgSetBaseUri.fromPartial( data ) }), + msgPerformActionByAdmin: (data: MsgPerformActionByAdmin): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgPerformActionByAdmin", value: MsgPerformActionByAdmin.fromPartial( data ) }), + msgCreateMetadata: (data: MsgCreateMetadata): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgCreateMetadata", value: MsgCreateMetadata.fromPartial( data ) }), + msgAddAttribute: (data: MsgAddAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddAttribute", value: MsgAddAttribute.fromPartial( data ) }), + msgChangeSchemaOwner: (data: MsgChangeSchemaOwner): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgChangeSchemaOwner", value: MsgChangeSchemaOwner.fromPartial( data ) }), }; }; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/rest.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/rest.ts index b5ccdd5d..e36d71e7 100644 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/rest.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/rest.ts @@ -149,6 +149,7 @@ export interface NftmngrNftData { owner_address_type?: NftmngrOwnerAddressType; origin_image?: string; onchain_image?: string; + token_uri?: string; origin_attributes?: NftmngrNftAttributeValue[]; onchain_attributes?: NftmngrNftAttributeValue[]; } @@ -451,6 +452,13 @@ export interface V1Beta1PageRequest { * is set. */ count_total?: boolean; + + /** + * reverse is set to true if results are to be returned in the descending order. + * + * Since: cosmos-sdk 0.43 + */ + reverse?: boolean; } /** @@ -680,6 +688,7 @@ export class Api extends HttpClient @@ -721,6 +730,7 @@ export class Api extends HttpClient @@ -762,6 +772,7 @@ export class Api extends HttpClient @@ -803,6 +814,7 @@ export class Api extends HttpClient diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/cosmos/base/query/v1beta1/pagination.ts index 0bc568f4..9c87ac0c 100644 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/cosmos/base/query/v1beta1/pagination.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/cosmos/base/query/v1beta1/pagination.ts @@ -38,6 +38,12 @@ export interface PageRequest { * is set. */ count_total: boolean; + /** + * reverse is set to true if results are to be returned in the descending order. + * + * Since: cosmos-sdk 0.43 + */ + reverse: boolean; } /** @@ -62,7 +68,12 @@ export interface PageResponse { total: number; } -const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; +const basePageRequest: object = { + offset: 0, + limit: 0, + count_total: false, + reverse: false, +}; export const PageRequest = { encode(message: PageRequest, writer: Writer = Writer.create()): Writer { @@ -78,6 +89,9 @@ export const PageRequest = { if (message.count_total === true) { writer.uint32(32).bool(message.count_total); } + if (message.reverse === true) { + writer.uint32(40).bool(message.reverse); + } return writer; }, @@ -100,6 +114,9 @@ export const PageRequest = { case 4: message.count_total = reader.bool(); break; + case 5: + message.reverse = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -128,6 +145,11 @@ export const PageRequest = { } else { message.count_total = false; } + if (object.reverse !== undefined && object.reverse !== null) { + message.reverse = Boolean(object.reverse); + } else { + message.reverse = false; + } return message; }, @@ -141,6 +163,7 @@ export const PageRequest = { message.limit !== undefined && (obj.limit = message.limit); message.count_total !== undefined && (obj.count_total = message.count_total); + message.reverse !== undefined && (obj.reverse = message.reverse); return obj; }, @@ -166,6 +189,11 @@ export const PageRequest = { } else { message.count_total = false; } + if (object.reverse !== undefined && object.reverse !== null) { + message.reverse = object.reverse; + } else { + message.reverse = false; + } return message; }, }; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/nftmngr/nft_data.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/nftmngr/nft_data.ts index ba4cbf87..49e5c024 100644 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/nftmngr/nft_data.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/nftmngr/nft_data.ts @@ -43,6 +43,7 @@ export interface NftData { owner_address_type: OwnerAddressType; origin_image: string; onchain_image: string; + token_uri: string; origin_attributes: NftAttributeValue[]; onchain_attributes: NftAttributeValue[]; } @@ -54,6 +55,7 @@ const baseNftData: object = { owner_address_type: 0, origin_image: "", onchain_image: "", + token_uri: "", }; export const NftData = { @@ -76,11 +78,14 @@ export const NftData = { if (message.onchain_image !== "") { writer.uint32(50).string(message.onchain_image); } + if (message.token_uri !== "") { + writer.uint32(58).string(message.token_uri); + } for (const v of message.origin_attributes) { - NftAttributeValue.encode(v!, writer.uint32(58).fork()).ldelim(); + NftAttributeValue.encode(v!, writer.uint32(66).fork()).ldelim(); } for (const v of message.onchain_attributes) { - NftAttributeValue.encode(v!, writer.uint32(66).fork()).ldelim(); + NftAttributeValue.encode(v!, writer.uint32(74).fork()).ldelim(); } return writer; }, @@ -113,11 +118,14 @@ export const NftData = { message.onchain_image = reader.string(); break; case 7: + message.token_uri = reader.string(); + break; + case 8: message.origin_attributes.push( NftAttributeValue.decode(reader, reader.uint32()) ); break; - case 8: + case 9: message.onchain_attributes.push( NftAttributeValue.decode(reader, reader.uint32()) ); @@ -172,6 +180,11 @@ export const NftData = { } else { message.onchain_image = ""; } + if (object.token_uri !== undefined && object.token_uri !== null) { + message.token_uri = String(object.token_uri); + } else { + message.token_uri = ""; + } if ( object.origin_attributes !== undefined && object.origin_attributes !== null @@ -206,6 +219,7 @@ export const NftData = { (obj.origin_image = message.origin_image); message.onchain_image !== undefined && (obj.onchain_image = message.onchain_image); + message.token_uri !== undefined && (obj.token_uri = message.token_uri); if (message.origin_attributes) { obj.origin_attributes = message.origin_attributes.map((e) => e ? NftAttributeValue.toJSON(e) : undefined @@ -263,6 +277,11 @@ export const NftData = { } else { message.onchain_image = ""; } + if (object.token_uri !== undefined && object.token_uri !== null) { + message.token_uri = object.token_uri; + } else { + message.token_uri = ""; + } if ( object.origin_attributes !== undefined && object.origin_attributes !== null diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/rest.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/rest.ts index a1659b5f..b5d789aa 100644 --- a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/rest.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/rest.ts @@ -104,6 +104,13 @@ export interface V1Beta1PageRequest { * is set. */ count_total?: boolean; + + /** + * reverse is set to true if results are to be returned in the descending order. + * + * Since: cosmos-sdk 0.43 + */ + reverse?: boolean; } /** @@ -333,6 +340,7 @@ export class Api extends HttpClient diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/cosmos/base/query/v1beta1/pagination.ts index 0bc568f4..9c87ac0c 100644 --- a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/cosmos/base/query/v1beta1/pagination.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.evmsupport/module/types/cosmos/base/query/v1beta1/pagination.ts @@ -38,6 +38,12 @@ export interface PageRequest { * is set. */ count_total: boolean; + /** + * reverse is set to true if results are to be returned in the descending order. + * + * Since: cosmos-sdk 0.43 + */ + reverse: boolean; } /** @@ -62,7 +68,12 @@ export interface PageResponse { total: number; } -const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; +const basePageRequest: object = { + offset: 0, + limit: 0, + count_total: false, + reverse: false, +}; export const PageRequest = { encode(message: PageRequest, writer: Writer = Writer.create()): Writer { @@ -78,6 +89,9 @@ export const PageRequest = { if (message.count_total === true) { writer.uint32(32).bool(message.count_total); } + if (message.reverse === true) { + writer.uint32(40).bool(message.reverse); + } return writer; }, @@ -100,6 +114,9 @@ export const PageRequest = { case 4: message.count_total = reader.bool(); break; + case 5: + message.reverse = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -128,6 +145,11 @@ export const PageRequest = { } else { message.count_total = false; } + if (object.reverse !== undefined && object.reverse !== null) { + message.reverse = Boolean(object.reverse); + } else { + message.reverse = false; + } return message; }, @@ -141,6 +163,7 @@ export const PageRequest = { message.limit !== undefined && (obj.limit = message.limit); message.count_total !== undefined && (obj.count_total = message.count_total); + message.reverse !== undefined && (obj.reverse = message.reverse); return obj; }, @@ -166,6 +189,11 @@ export const PageRequest = { } else { message.count_total = false; } + if (object.reverse !== undefined && object.reverse !== null) { + message.reverse = object.reverse; + } else { + message.reverse = false; + } return message; }, }; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/index.ts index 7d003ff7..d8366bde 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/index.ts @@ -170,18 +170,18 @@ export default { }, - async sendMsgBurn({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgMint({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgBurn(value) + const msg = await txClient.msgMint(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgMint:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgBurn:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgMint:Send Could not broadcast Tx: '+ e.message) } } }, @@ -200,47 +200,47 @@ export default { } } }, - async sendMsgMint({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgGrantPermission({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgMint(value) + const msg = await txClient.msgGrantPermission(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgMint:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgGrantPermission:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgMint:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgGrantPermission:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgGrantPermission({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgBurn({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgGrantPermission(value) + const msg = await txClient.msgBurn(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgGrantPermission:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgGrantPermission:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgBurn:Send Could not broadcast Tx: '+ e.message) } } }, - async MsgBurn({ rootGetters }, { value }) { + async MsgMint({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgBurn(value) + const msg = await txClient.msgMint(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgMint:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgBurn:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgMint:Create Could not create message: ' + e.message) } } }, @@ -257,29 +257,29 @@ export default { } } }, - async MsgMint({ rootGetters }, { value }) { + async MsgGrantPermission({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgMint(value) + const msg = await txClient.msgGrantPermission(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgMint:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgGrantPermission:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgMint:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgGrantPermission:Create Could not create message: ' + e.message) } } }, - async MsgGrantPermission({ rootGetters }, { value }) { + async MsgBurn({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgGrantPermission(value) + const msg = await txClient.msgBurn(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgGrantPermission:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgBurn:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgGrantPermission:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgBurn:Create Could not create message: ' + e.message) } } }, diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/index.ts index 3b7c730e..c7b881f3 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftadmin/module/index.ts @@ -4,17 +4,17 @@ import { StdFee } from "@cosmjs/launchpad"; import { SigningStargateClient } from "@cosmjs/stargate"; import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { Api } from "./rest"; -import { MsgBurn } from "./types/nftadmin/tx"; -import { MsgRevokePermission } from "./types/nftadmin/tx"; import { MsgMint } from "./types/nftadmin/tx"; +import { MsgRevokePermission } from "./types/nftadmin/tx"; import { MsgGrantPermission } from "./types/nftadmin/tx"; +import { MsgBurn } from "./types/nftadmin/tx"; const types = [ - ["/thesixnetwork.sixnft.nftadmin.MsgBurn", MsgBurn], - ["/thesixnetwork.sixnft.nftadmin.MsgRevokePermission", MsgRevokePermission], ["/thesixnetwork.sixnft.nftadmin.MsgMint", MsgMint], + ["/thesixnetwork.sixnft.nftadmin.MsgRevokePermission", MsgRevokePermission], ["/thesixnetwork.sixnft.nftadmin.MsgGrantPermission", MsgGrantPermission], + ["/thesixnetwork.sixnft.nftadmin.MsgBurn", MsgBurn], ]; export const MissingWalletError = new Error("wallet is required"); @@ -47,10 +47,10 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = return { signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgBurn: (data: MsgBurn): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftadmin.MsgBurn", value: MsgBurn.fromPartial( data ) }), - msgRevokePermission: (data: MsgRevokePermission): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftadmin.MsgRevokePermission", value: MsgRevokePermission.fromPartial( data ) }), msgMint: (data: MsgMint): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftadmin.MsgMint", value: MsgMint.fromPartial( data ) }), + msgRevokePermission: (data: MsgRevokePermission): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftadmin.MsgRevokePermission", value: MsgRevokePermission.fromPartial( data ) }), msgGrantPermission: (data: MsgGrantPermission): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftadmin.MsgGrantPermission", value: MsgGrantPermission.fromPartial( data ) }), + msgBurn: (data: MsgBurn): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftadmin.MsgBurn", value: MsgBurn.fromPartial( data ) }), }; }; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/index.ts index 22eeee7c..c7285b94 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/index.ts @@ -337,116 +337,116 @@ export default { }, - async sendMsgCreateActionRequest({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgSubmitActionResponse({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateActionRequest(value) + const msg = await txClient.msgSubmitActionResponse(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateActionRequest:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSubmitActionResponse:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateActionRequest:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgSubmitActionResponse:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgSubmitActionResponse({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateMintRequest({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSubmitActionResponse(value) + const msg = await txClient.msgCreateMintRequest(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSubmitActionResponse:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateMintRequest:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgSubmitActionResponse:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateMintRequest:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgSubmitMintResponse({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateActionRequest({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSubmitMintResponse(value) + const msg = await txClient.msgCreateActionRequest(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSubmitMintResponse:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateActionRequest:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgSubmitMintResponse:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateActionRequest:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgCreateMintRequest({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgSubmitMintResponse({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateMintRequest(value) + const msg = await txClient.msgSubmitMintResponse(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateMintRequest:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSubmitMintResponse:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateMintRequest:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgSubmitMintResponse:Send Could not broadcast Tx: '+ e.message) } } }, - async MsgCreateActionRequest({ rootGetters }, { value }) { + async MsgSubmitActionResponse({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateActionRequest(value) + const msg = await txClient.msgSubmitActionResponse(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateActionRequest:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSubmitActionResponse:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateActionRequest:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgSubmitActionResponse:Create Could not create message: ' + e.message) } } }, - async MsgSubmitActionResponse({ rootGetters }, { value }) { + async MsgCreateMintRequest({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSubmitActionResponse(value) + const msg = await txClient.msgCreateMintRequest(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSubmitActionResponse:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateMintRequest:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgSubmitActionResponse:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateMintRequest:Create Could not create message: ' + e.message) } } }, - async MsgSubmitMintResponse({ rootGetters }, { value }) { + async MsgCreateActionRequest({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSubmitMintResponse(value) + const msg = await txClient.msgCreateActionRequest(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSubmitMintResponse:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateActionRequest:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgSubmitMintResponse:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateActionRequest:Create Could not create message: ' + e.message) } } }, - async MsgCreateMintRequest({ rootGetters }, { value }) { + async MsgSubmitMintResponse({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateMintRequest(value) + const msg = await txClient.msgSubmitMintResponse(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateMintRequest:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSubmitMintResponse:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateMintRequest:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgSubmitMintResponse:Create Could not create message: ' + e.message) } } }, diff --git a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/index.ts index 896306e2..f800da45 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/thesixnetwork.sixnft.nftoracle/module/index.ts @@ -4,17 +4,17 @@ import { StdFee } from "@cosmjs/launchpad"; import { SigningStargateClient } from "@cosmjs/stargate"; import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { Api } from "./rest"; -import { MsgCreateActionRequest } from "./types/nftoracle/tx"; import { MsgSubmitActionResponse } from "./types/nftoracle/tx"; -import { MsgSubmitMintResponse } from "./types/nftoracle/tx"; import { MsgCreateMintRequest } from "./types/nftoracle/tx"; +import { MsgCreateActionRequest } from "./types/nftoracle/tx"; +import { MsgSubmitMintResponse } from "./types/nftoracle/tx"; const types = [ - ["/thesixnetwork.sixnft.nftoracle.MsgCreateActionRequest", MsgCreateActionRequest], ["/thesixnetwork.sixnft.nftoracle.MsgSubmitActionResponse", MsgSubmitActionResponse], - ["/thesixnetwork.sixnft.nftoracle.MsgSubmitMintResponse", MsgSubmitMintResponse], ["/thesixnetwork.sixnft.nftoracle.MsgCreateMintRequest", MsgCreateMintRequest], + ["/thesixnetwork.sixnft.nftoracle.MsgCreateActionRequest", MsgCreateActionRequest], + ["/thesixnetwork.sixnft.nftoracle.MsgSubmitMintResponse", MsgSubmitMintResponse], ]; export const MissingWalletError = new Error("wallet is required"); @@ -47,10 +47,10 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = return { signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgCreateActionRequest: (data: MsgCreateActionRequest): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgCreateActionRequest", value: MsgCreateActionRequest.fromPartial( data ) }), msgSubmitActionResponse: (data: MsgSubmitActionResponse): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgSubmitActionResponse", value: MsgSubmitActionResponse.fromPartial( data ) }), - msgSubmitMintResponse: (data: MsgSubmitMintResponse): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgSubmitMintResponse", value: MsgSubmitMintResponse.fromPartial( data ) }), msgCreateMintRequest: (data: MsgCreateMintRequest): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgCreateMintRequest", value: MsgCreateMintRequest.fromPartial( data ) }), + msgCreateActionRequest: (data: MsgCreateActionRequest): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgCreateActionRequest", value: MsgCreateActionRequest.fromPartial( data ) }), + msgSubmitMintResponse: (data: MsgSubmitMintResponse): EncodeObject => ({ typeUrl: "/thesixnetwork.sixnft.nftoracle.MsgSubmitMintResponse", value: MsgSubmitMintResponse.fromPartial( data ) }), }; }; diff --git a/x/nftmngr/types/meta.go b/x/nftmngr/types/meta.go index 6948c5b7..2a19ae36 100644 --- a/x/nftmngr/types/meta.go +++ b/x/nftmngr/types/meta.go @@ -16,6 +16,7 @@ type MetadataChange struct { type Metadata struct { nftData *NftData + schema *NFTSchema attributeOverring AttributeOverriding ChangeList []*MetadataChange `json:"change_list,omitempty"` } @@ -31,6 +32,7 @@ var mapAllKey = map[string]*MetadataAttribute{} func NewMetadata(schema *NFTSchema, tokenData *NftData, attributeOverring AttributeOverriding) *Metadata { meta := &Metadata{ nftData: tokenData, + schema: schema, attributeOverring: attributeOverring, ChangeList: []*MetadataChange{}, } @@ -77,6 +79,23 @@ func (m *Metadata) CurrentTimestamp() int64 { return time.Now().Unix() } +func (m *Metadata) GetBaseURI() string { + return m.schema.OriginData.OriginBaseUri +} + +func (m *Metadata) GetTokenURI() string { + return m.nftData.TokenUri +} + +func (m *Metadata) SetTokenURI(uri string) { + m.ChangeList = append(m.ChangeList, &MetadataChange{ + Key: "tokenURI", + PreviousValue: m.nftData.TokenUri, + NewValue: uri, + }) + m.nftData.TokenUri = uri +} + func (m *Metadata) GetImage() string { if m.nftData.OnchainImage != "" { return m.nftData.OnchainImage diff --git a/x/nftmngr/types/nft_data.pb.go b/x/nftmngr/types/nft_data.pb.go index 6ababf90..764234e6 100644 --- a/x/nftmngr/types/nft_data.pb.go +++ b/x/nftmngr/types/nft_data.pb.go @@ -54,8 +54,9 @@ type NftData struct { OwnerAddressType OwnerAddressType `protobuf:"varint,4,opt,name=owner_address_type,json=ownerAddressType,proto3,enum=sixnft.nftmngr.OwnerAddressType" json:"owner_address_type,omitempty"` OriginImage string `protobuf:"bytes,5,opt,name=origin_image,json=originImage,proto3" json:"origin_image,omitempty"` OnchainImage string `protobuf:"bytes,6,opt,name=onchain_image,json=onchainImage,proto3" json:"onchain_image,omitempty"` - OriginAttributes []*NftAttributeValue `protobuf:"bytes,7,rep,name=origin_attributes,json=originAttributes,proto3" json:"origin_attributes,omitempty"` - OnchainAttributes []*NftAttributeValue `protobuf:"bytes,8,rep,name=onchain_attributes,json=onchainAttributes,proto3" json:"onchain_attributes,omitempty"` + TokenUri string `protobuf:"bytes,7,opt,name=token_uri,json=tokenUri,proto3" json:"token_uri,omitempty"` + OriginAttributes []*NftAttributeValue `protobuf:"bytes,8,rep,name=origin_attributes,json=originAttributes,proto3" json:"origin_attributes,omitempty"` + OnchainAttributes []*NftAttributeValue `protobuf:"bytes,9,rep,name=onchain_attributes,json=onchainAttributes,proto3" json:"onchain_attributes,omitempty"` } func (m *NftData) Reset() { *m = NftData{} } @@ -133,6 +134,13 @@ func (m *NftData) GetOnchainImage() string { return "" } +func (m *NftData) GetTokenUri() string { + if m != nil { + return m.TokenUri + } + return "" +} + func (m *NftData) GetOriginAttributes() []*NftAttributeValue { if m != nil { return m.OriginAttributes @@ -155,33 +163,34 @@ func init() { func init() { proto.RegisterFile("nftmngr/nft_data.proto", fileDescriptor_57c30ce621a5c153) } var fileDescriptor_57c30ce621a5c153 = []byte{ - // 404 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0xee, 0xd2, 0x40, - 0x10, 0xc7, 0x5b, 0xd1, 0x1f, 0xb8, 0xfc, 0xb1, 0x6c, 0x8c, 0xa9, 0x1e, 0x6a, 0xd1, 0xc4, 0x10, - 0x0f, 0x6d, 0x82, 0x57, 0x2f, 0x55, 0x88, 0x69, 0x62, 0x8a, 0x29, 0xc4, 0x83, 0x97, 0xcd, 0xd2, - 0x6e, 0xff, 0x04, 0xbb, 0x4b, 0xda, 0x41, 0xe0, 0x2d, 0x7c, 0x0b, 0x5f, 0xc5, 0x23, 0x47, 0x8f, - 0x06, 0x5e, 0xc4, 0x74, 0x5b, 0x2a, 0x72, 0xf2, 0xd8, 0xcf, 0x7c, 0x66, 0xf6, 0x9b, 0xe9, 0xa0, - 0x27, 0x3c, 0x82, 0x8c, 0xc7, 0xb9, 0xcd, 0x23, 0x20, 0x21, 0x05, 0x6a, 0x6d, 0x72, 0x01, 0x02, - 0x0f, 0x8a, 0x74, 0xcf, 0x23, 0xb0, 0xea, 0xf2, 0xb3, 0xd1, 0xb5, 0x47, 0x01, 0xf2, 0x74, 0xb5, - 0x05, 0x46, 0xbe, 0xd1, 0xaf, 0x5b, 0x56, 0xb5, 0xbc, 0xf8, 0xd1, 0x42, 0x6d, 0x2f, 0x82, 0x29, - 0x05, 0x8a, 0x5f, 0xa1, 0x47, 0xa5, 0x58, 0x04, 0x09, 0xcb, 0x28, 0x09, 0x44, 0xc8, 0x74, 0xd5, - 0x54, 0xc7, 0x0f, 0xfd, 0x3e, 0x8f, 0x60, 0x21, 0xe9, 0x7b, 0x11, 0x32, 0xfc, 0x14, 0x75, 0x40, - 0xac, 0x19, 0x27, 0x69, 0xa8, 0xdf, 0x93, 0x42, 0x5b, 0x7e, 0xbb, 0x21, 0x7e, 0x8e, 0xba, 0x55, - 0x49, 0xec, 0x38, 0xcb, 0xf5, 0x96, 0xac, 0x22, 0x89, 0xe6, 0x25, 0xc1, 0x1e, 0xc2, 0xb2, 0x44, - 0x68, 0x18, 0xe6, 0xac, 0x28, 0x08, 0x1c, 0x36, 0x4c, 0xbf, 0x6f, 0xaa, 0xe3, 0xc1, 0xc4, 0xb4, - 0xfe, 0xcd, 0x6f, 0xc9, 0x16, 0xa7, 0x12, 0x97, 0x87, 0x0d, 0xf3, 0x35, 0x71, 0x43, 0xf0, 0x08, - 0xf5, 0x44, 0x9e, 0xc6, 0x29, 0x27, 0x69, 0x46, 0x63, 0xa6, 0x3f, 0x90, 0x2f, 0x76, 0x2b, 0xe6, - 0x96, 0x08, 0xbf, 0x44, 0x7d, 0xc1, 0x83, 0x84, 0x36, 0xce, 0x9d, 0x74, 0x7a, 0x35, 0xac, 0x24, - 0x0f, 0x0d, 0xeb, 0x39, 0xcd, 0x9e, 0x0a, 0xbd, 0x6d, 0xb6, 0xc6, 0xdd, 0xc9, 0xe8, 0x36, 0x96, - 0x17, 0x81, 0x73, 0x91, 0x3e, 0x97, 0xbb, 0xf4, 0xb5, 0xaa, 0xb7, 0xa1, 0x05, 0xfe, 0x84, 0xf0, - 0xe5, 0xd1, 0xab, 0x81, 0x9d, 0xff, 0x1d, 0x38, 0xac, 0x9b, 0xff, 0x4e, 0x7c, 0xfd, 0x16, 0x69, - 0xb7, 0xfb, 0xc0, 0x18, 0x0d, 0xe6, 0xbe, 0xfb, 0xc1, 0xf5, 0x88, 0x33, 0x9d, 0xfa, 0xb3, 0xc5, - 0x42, 0x53, 0xf0, 0x63, 0xa4, 0xb9, 0xde, 0x72, 0xe6, 0x7b, 0xce, 0xc7, 0x86, 0xaa, 0xef, 0xdc, - 0x9f, 0x27, 0x43, 0x3d, 0x9e, 0x0c, 0xf5, 0xf7, 0xc9, 0x50, 0xbf, 0x9f, 0x0d, 0xe5, 0x78, 0x36, - 0x94, 0x5f, 0x67, 0x43, 0xf9, 0x62, 0xc7, 0x29, 0x24, 0xdb, 0x95, 0x15, 0x88, 0xcc, 0x86, 0x84, - 0x95, 0xd1, 0x18, 0xec, 0x44, 0xbe, 0xb6, 0xab, 0x94, 0xf6, 0xde, 0xbe, 0x9c, 0x51, 0xf9, 0xaf, - 0x8a, 0xd5, 0x9d, 0xbc, 0x9c, 0x37, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x67, 0x65, 0x24, 0xd2, - 0x86, 0x02, 0x00, 0x00, + // 422 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0x1b, 0x0a, 0xeb, 0xea, 0x6e, 0x25, 0xb3, 0x10, 0x0a, 0x20, 0x85, 0x16, 0x24, 0x54, + 0x71, 0x48, 0xa4, 0x71, 0xe5, 0x12, 0xe8, 0x84, 0x22, 0xa1, 0x0c, 0xa5, 0x83, 0x03, 0x17, 0xcb, + 0x4d, 0x9c, 0xc4, 0x1a, 0xb1, 0x2b, 0xe7, 0x85, 0x6d, 0xdf, 0x82, 0x0f, 0xc5, 0x81, 0xe3, 0x8e, + 0x1c, 0x51, 0xfb, 0x45, 0x50, 0xec, 0x34, 0x94, 0x9e, 0x76, 0xcc, 0xef, 0xfd, 0xde, 0xf3, 0x3f, + 0xcf, 0x46, 0x8f, 0x45, 0x06, 0xa5, 0xc8, 0x95, 0x2f, 0x32, 0x20, 0x29, 0x05, 0xea, 0xad, 0x94, + 0x04, 0x89, 0xc7, 0x15, 0xbf, 0x16, 0x19, 0x78, 0x6d, 0xf9, 0xe9, 0x74, 0xd7, 0xa3, 0x00, 0x8a, + 0x2f, 0x6b, 0x60, 0xe4, 0x3b, 0xfd, 0x56, 0x33, 0xd3, 0xf2, 0xe2, 0x67, 0x1f, 0x0d, 0xa2, 0x0c, + 0xe6, 0x14, 0x28, 0x7e, 0x85, 0x1e, 0x36, 0x62, 0x95, 0x14, 0xac, 0xa4, 0x24, 0x91, 0x29, 0x73, + 0xac, 0x89, 0x35, 0x1b, 0xc6, 0xc7, 0x22, 0x83, 0x85, 0xa6, 0xef, 0x65, 0xca, 0xf0, 0x13, 0x74, + 0x08, 0xf2, 0x92, 0x09, 0xc2, 0x53, 0xe7, 0x9e, 0x16, 0x06, 0xfa, 0x3b, 0x4c, 0xf1, 0x73, 0x34, + 0x32, 0x25, 0x79, 0x25, 0x98, 0x72, 0xfa, 0xba, 0x8a, 0x34, 0x3a, 0x6f, 0x08, 0x8e, 0x10, 0xd6, + 0x25, 0x42, 0xd3, 0x54, 0xb1, 0xaa, 0x22, 0x70, 0xb3, 0x62, 0xce, 0xfd, 0x89, 0x35, 0x1b, 0x9f, + 0x4e, 0xbc, 0xff, 0xf3, 0x7b, 0xba, 0x25, 0x30, 0xe2, 0xc5, 0xcd, 0x8a, 0xc5, 0xb6, 0xdc, 0x23, + 0x78, 0x8a, 0x8e, 0xa4, 0xe2, 0x39, 0x17, 0x84, 0x97, 0x34, 0x67, 0xce, 0x03, 0x7d, 0xe2, 0xc8, + 0xb0, 0xb0, 0x41, 0xf8, 0x25, 0x3a, 0x96, 0x22, 0x29, 0x68, 0xe7, 0x1c, 0x68, 0xe7, 0xa8, 0x85, + 0x46, 0x7a, 0x86, 0x86, 0x26, 0x78, 0xad, 0xb8, 0x33, 0xd0, 0x82, 0xf9, 0xc9, 0xcf, 0x8a, 0xe3, + 0x08, 0x9d, 0xb4, 0x87, 0x74, 0x4b, 0xac, 0x9c, 0xc3, 0x49, 0x7f, 0x36, 0x3a, 0x9d, 0xee, 0x67, + 0x8e, 0x32, 0x08, 0xb6, 0xd2, 0x97, 0x66, 0xd1, 0xb1, 0x6d, 0x7a, 0x3b, 0x5a, 0xe1, 0x4f, 0x08, + 0x6f, 0x13, 0xed, 0x0c, 0x1c, 0xde, 0x75, 0xe0, 0x49, 0xdb, 0xfc, 0x6f, 0xe2, 0xeb, 0xb7, 0xc8, + 0xde, 0x5f, 0x16, 0xc6, 0x68, 0x7c, 0x1e, 0x87, 0x1f, 0xc2, 0x88, 0x04, 0xf3, 0x79, 0x7c, 0xb6, + 0x58, 0xd8, 0x3d, 0xfc, 0x08, 0xd9, 0x61, 0x74, 0x71, 0x16, 0x47, 0xc1, 0xc7, 0x8e, 0x5a, 0xef, + 0xc2, 0x5f, 0x6b, 0xd7, 0xba, 0x5d, 0xbb, 0xd6, 0x9f, 0xb5, 0x6b, 0xfd, 0xd8, 0xb8, 0xbd, 0xdb, + 0x8d, 0xdb, 0xfb, 0xbd, 0x71, 0x7b, 0x5f, 0xfd, 0x9c, 0x43, 0x51, 0x2f, 0xbd, 0x44, 0x96, 0x3e, + 0x14, 0xac, 0x89, 0xc6, 0xe0, 0x4a, 0xaa, 0x4b, 0xdf, 0xa4, 0xf4, 0xaf, 0xfd, 0xed, 0x1b, 0x6b, + 0x2e, 0xb2, 0x5a, 0x1e, 0xe8, 0x67, 0xf5, 0xe6, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x54, + 0xd9, 0x58, 0xa3, 0x02, 0x00, 0x00, } func (m *NftData) Marshal() (dAtA []byte, err error) { @@ -215,7 +224,7 @@ func (m *NftData) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintNftData(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x42 + dAtA[i] = 0x4a } } if len(m.OriginAttributes) > 0 { @@ -229,9 +238,16 @@ func (m *NftData) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintNftData(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x3a + dAtA[i] = 0x42 } } + if len(m.TokenUri) > 0 { + i -= len(m.TokenUri) + copy(dAtA[i:], m.TokenUri) + i = encodeVarintNftData(dAtA, i, uint64(len(m.TokenUri))) + i-- + dAtA[i] = 0x3a + } if len(m.OnchainImage) > 0 { i -= len(m.OnchainImage) copy(dAtA[i:], m.OnchainImage) @@ -315,6 +331,10 @@ func (m *NftData) Size() (n int) { if l > 0 { n += 1 + l + sovNftData(uint64(l)) } + l = len(m.TokenUri) + if l > 0 { + n += 1 + l + sovNftData(uint64(l)) + } if len(m.OriginAttributes) > 0 { for _, e := range m.OriginAttributes { l = e.Size() @@ -545,6 +565,38 @@ func (m *NftData) Unmarshal(dAtA []byte) error { m.OnchainImage = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenUri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNftData + } + 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 ErrInvalidLengthNftData + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNftData + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OriginAttributes", wireType) } @@ -578,7 +630,7 @@ func (m *NftData) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 8: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OnchainAttributes", wireType) } From 97f7be5ad72f3853c75d7d590b4481c9a7fa1431 Mon Sep 17 00:00:00 2001 From: ngam Date: Tue, 4 Oct 2022 14:08:34 +0700 Subject: [PATCH 5/5] finished --- config.yml | 9 + docs/static/openapi.yml | 34 + proto/nftmngr/nft_schema.proto | 5 +- proto/nftmngr/tx.proto | 24 + .../sixnft/sixnft.nftmngr/index.ts | 200 +- .../sixnft/sixnft.nftmngr/module/index.ts | 36 +- .../sixnft/sixnft.nftmngr/module/rest.ts | 11 + .../module/types/nftmngr/nft_schema.ts | 44 +- .../sixnft.nftmngr/module/types/nftmngr/tx.ts | 440 ++++- x/nftmngr/client/cli/tx.go | 2 + .../client/cli/tx_add_system_actioner.go | 44 + .../client/cli/tx_remove_system_actioner.go | 44 + x/nftmngr/handler.go | 6 + .../keeper/msg_server_add_system_actioner.go | 51 + .../msg_server_perform_action_by_admin.go | 13 +- .../msg_server_remove_system_actioner.go | 56 + x/nftmngr/types/codec.go | 8 + x/nftmngr/types/errors.go | 5 + x/nftmngr/types/events.go | 4 + .../types/message_add_system_actioner.go | 47 + .../types/message_add_system_actioner_test.go | 40 + .../types/message_remove_system_actioner.go | 47 + .../message_remove_system_actioner_test.go | 40 + x/nftmngr/types/nft_schema.pb.go | 109 +- x/nftmngr/types/tx.pb.go | 1611 ++++++++++++++--- 25 files changed, 2534 insertions(+), 396 deletions(-) create mode 100644 x/nftmngr/client/cli/tx_add_system_actioner.go create mode 100644 x/nftmngr/client/cli/tx_remove_system_actioner.go create mode 100644 x/nftmngr/keeper/msg_server_add_system_actioner.go create mode 100644 x/nftmngr/keeper/msg_server_remove_system_actioner.go create mode 100644 x/nftmngr/types/message_add_system_actioner.go create mode 100644 x/nftmngr/types/message_add_system_actioner_test.go create mode 100644 x/nftmngr/types/message_remove_system_actioner.go create mode 100644 x/nftmngr/types/message_remove_system_actioner_test.go diff --git a/config.yml b/config.yml index 65698f8c..8c62551a 100644 --- a/config.yml +++ b/config.yml @@ -17,6 +17,15 @@ accounts: - name: oracle4 coins: ["10000token", "100000000stake"] mnemonic: clown cabbage clean design mosquito surround citizen virus kite castle sponsor wife lesson coffee alien panel hand together good crazy fabric mouse hat town + - name: actioner1 + coins: ["10000token", "100000000stake"] + mnemonic: boost festival prize turn skate inspire alley opinion blush bright month weekend cage village refuse room remind resource legal favorite entire right convince prison + - name: actioner2 + coins: ["10000token", "100000000stake"] + mnemonic: oyster green arrange wave elegant oven jaguar pass quote profit miracle interest emotion match express merit clock wrestle reunion punch memory action upper draft + - name: actioner3 + coins: ["10000token", "100000000stake"] + mnemonic: first educate action fee physical seek recipe hub anxiety best mango measure chimney sphere once cabbage strike dizzy near knock correct answer skin inside validator: name: alice staked: "100000000stake" diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 777a264e..2323a47a 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -31355,6 +31355,10 @@ paths: type: string owner: type: string + system_actioners: + type: array + items: + type: string origin_data: type: object properties: @@ -31910,6 +31914,10 @@ paths: type: string owner: type: string + system_actioners: + type: array + items: + type: string origin_data: type: object properties: @@ -56067,6 +56075,13 @@ definitions: value: type: number format: double + sixnft.nftmngr.MsgAddSystemActionerResponse: + type: object + properties: + nftSchemaCode: + type: string + actioner: + type: string sixnft.nftmngr.MsgAddTokenAttributeResponse: type: object properties: @@ -56282,6 +56297,13 @@ definitions: type: string token_id: type: string + sixnft.nftmngr.MsgRemoveSystemActionerResponse: + type: object + properties: + nftSchemaCode: + type: string + actioner: + type: string sixnft.nftmngr.MsgSetBaseUriResponse: type: object properties: @@ -56496,6 +56518,10 @@ definitions: type: string owner: type: string + system_actioners: + type: array + items: + type: string origin_data: type: object properties: @@ -57221,6 +57247,10 @@ definitions: type: string owner: type: string + system_actioners: + type: array + items: + type: string origin_data: type: object properties: @@ -57685,6 +57715,10 @@ definitions: type: string owner: type: string + system_actioners: + type: array + items: + type: string origin_data: type: object properties: diff --git a/proto/nftmngr/nft_schema.proto b/proto/nftmngr/nft_schema.proto index 40c56e6f..674ff4e4 100644 --- a/proto/nftmngr/nft_schema.proto +++ b/proto/nftmngr/nft_schema.proto @@ -11,8 +11,9 @@ message NFTSchema { string code = 1; string name = 2; string owner = 3; - OriginData origin_data = 4; - OnChainData onchain_data = 5; + repeated string system_actioners = 4; + OriginData origin_data = 5; + OnChainData onchain_data = 6; } diff --git a/proto/nftmngr/tx.proto b/proto/nftmngr/tx.proto index 3460c61d..8db2d97b 100644 --- a/proto/nftmngr/tx.proto +++ b/proto/nftmngr/tx.proto @@ -21,6 +21,8 @@ service Msg { rpc SetBaseUri(MsgSetBaseUri) returns (MsgSetBaseUriResponse); rpc ToggleAction(MsgToggleAction) returns (MsgToggleActionResponse); rpc ChangeSchemaOwner(MsgChangeSchemaOwner) returns (MsgChangeSchemaOwnerResponse); + rpc AddSystemActioner(MsgAddSystemActioner) returns (MsgAddSystemActionerResponse); + rpc RemoveSystemActioner(MsgRemoveSystemActioner) returns (MsgRemoveSystemActionerResponse); // this line is used by starport scaffolding # proto/tx/rpc } @@ -155,4 +157,26 @@ message MsgChangeSchemaOwnerResponse { string newOwner = 2; } +message MsgAddSystemActioner { + string creator = 1; + string nftSchemaCode = 2; + string actioner = 3; +} + +message MsgAddSystemActionerResponse { + string nftSchemaCode = 1; + string actioner = 2; +} + +message MsgRemoveSystemActioner { + string creator = 1; + string nftSchemaCode = 2; + string actioner = 3; +} + +message MsgRemoveSystemActionerResponse { + string nftSchemaCode = 1; + string actioner = 2; +} + // this line is used by starport scaffolding # proto/tx/message diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts index 0f00d38b..4f72c22b 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/index.ts @@ -425,196 +425,187 @@ export default { }, - async sendMsgAddAction({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgAddTokenAttribute({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddAction(value) + const msg = await txClient.msgAddTokenAttribute(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddAction:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddTokenAttribute:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgAddAction:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgAddTokenAttribute:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgToggleAction({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgSetNFTAttribute({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgToggleAction(value) + const msg = await txClient.msgSetNFTAttribute(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSetNFTAttribute:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgToggleAction:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgSetNFTAttribute:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgCreateNFTSchema({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgChangeSchemaOwner({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateNFTSchema(value) + const msg = await txClient.msgChangeSchemaOwner(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgChangeSchemaOwner:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateNFTSchema:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgChangeSchemaOwner:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgAddTokenAttribute({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgAddAction({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddTokenAttribute(value) + const msg = await txClient.msgAddAction(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddTokenAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddAction:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgAddTokenAttribute:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgAddAction:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgSetNFTAttribute({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgPerformActionByAdmin({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetNFTAttribute(value) + const msg = await txClient.msgPerformActionByAdmin(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetNFTAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgPerformActionByAdmin:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgSetNFTAttribute:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgPerformActionByAdmin:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgSetBaseUri({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateMetadata({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetBaseUri(value) + const msg = await txClient.msgCreateMetadata(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateMetadata:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgSetBaseUri:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateMetadata:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgPerformActionByAdmin({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgAddSystemActioner({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgPerformActionByAdmin(value) + const msg = await txClient.msgAddSystemActioner(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgPerformActionByAdmin:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgAddSystemActioner:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgPerformActionByAdmin:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgAddSystemActioner:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgCreateMetadata({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgRemoveSystemActioner({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateMetadata(value) + const msg = await txClient.msgRemoveSystemActioner(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateMetadata:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgRemoveSystemActioner:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateMetadata:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgRemoveSystemActioner:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgAddAttribute({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgSetBaseUri({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddAttribute(value) + const msg = await txClient.msgSetBaseUri(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddAttribute:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgAddAttribute:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgSetBaseUri:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgChangeSchemaOwner({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgToggleAction({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgChangeSchemaOwner(value) + const msg = await txClient.msgToggleAction(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgChangeSchemaOwner:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgChangeSchemaOwner:Send Could not broadcast Tx: '+ e.message) - } - } - }, - - async MsgAddAction({ rootGetters }, { value }) { - try { - const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgAddAction(value) - return msg - } catch (e) { - if (e == MissingWalletError) { - throw new Error('TxClient:MsgAddAction:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgAddAction:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgToggleAction:Send Could not broadcast Tx: '+ e.message) } } }, - async MsgToggleAction({ rootGetters }, { value }) { + async sendMsgAddAttribute({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgToggleAction(value) - return msg + const msg = await txClient.msgAddAttribute(value) + const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, + gas: "200000" }, memo}) + return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgToggleAction:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgAddAttribute:Init Could not initialize signing client. Wallet is required.') + }else{ + throw new Error('TxClient:MsgAddAttribute:Send Could not broadcast Tx: '+ e.message) } } }, - async MsgCreateNFTSchema({ rootGetters }, { value }) { + async sendMsgCreateNFTSchema({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) const msg = await txClient.msgCreateNFTSchema(value) - return msg + const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, + gas: "200000" }, memo}) + return result } catch (e) { if (e == MissingWalletError) { throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') - } else{ - throw new Error('TxClient:MsgCreateNFTSchema:Create Could not create message: ' + e.message) + }else{ + throw new Error('TxClient:MsgCreateNFTSchema:Send Could not broadcast Tx: '+ e.message) } } }, + async MsgAddTokenAttribute({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) @@ -641,16 +632,29 @@ export default { } } }, - async MsgSetBaseUri({ rootGetters }, { value }) { + async MsgChangeSchemaOwner({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgSetBaseUri(value) + const msg = await txClient.msgChangeSchemaOwner(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgChangeSchemaOwner:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgSetBaseUri:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgChangeSchemaOwner:Create Could not create message: ' + e.message) + } + } + }, + async MsgAddAction({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgAddAction(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgAddAction:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgAddAction:Create Could not create message: ' + e.message) } } }, @@ -680,6 +684,58 @@ export default { } } }, + async MsgAddSystemActioner({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgAddSystemActioner(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgAddSystemActioner:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgAddSystemActioner:Create Could not create message: ' + e.message) + } + } + }, + async MsgRemoveSystemActioner({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgRemoveSystemActioner(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgRemoveSystemActioner:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgRemoveSystemActioner:Create Could not create message: ' + e.message) + } + } + }, + async MsgSetBaseUri({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgSetBaseUri(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgSetBaseUri:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgSetBaseUri:Create Could not create message: ' + e.message) + } + } + }, + async MsgToggleAction({ rootGetters }, { value }) { + try { + const txClient=await initTxClient(rootGetters) + const msg = await txClient.msgToggleAction(value) + return msg + } catch (e) { + if (e == MissingWalletError) { + throw new Error('TxClient:MsgToggleAction:Init Could not initialize signing client. Wallet is required.') + } else{ + throw new Error('TxClient:MsgToggleAction:Create Could not create message: ' + e.message) + } + } + }, async MsgAddAttribute({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) @@ -693,16 +749,16 @@ export default { } } }, - async MsgChangeSchemaOwner({ rootGetters }, { value }) { + async MsgCreateNFTSchema({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgChangeSchemaOwner(value) + const msg = await txClient.msgCreateNFTSchema(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgChangeSchemaOwner:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateNFTSchema:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgChangeSchemaOwner:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateNFTSchema:Create Could not create message: ' + e.message) } } }, diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts index 23a5f57e..5f86b04c 100755 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/index.ts @@ -4,29 +4,33 @@ import { StdFee } from "@cosmjs/launchpad"; import { SigningStargateClient } from "@cosmjs/stargate"; import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { Api } from "./rest"; -import { MsgAddAction } from "./types/nftmngr/tx"; -import { MsgToggleAction } from "./types/nftmngr/tx"; -import { MsgCreateNFTSchema } from "./types/nftmngr/tx"; import { MsgAddTokenAttribute } from "./types/nftmngr/tx"; import { MsgSetNFTAttribute } from "./types/nftmngr/tx"; -import { MsgSetBaseUri } from "./types/nftmngr/tx"; +import { MsgChangeSchemaOwner } from "./types/nftmngr/tx"; +import { MsgAddAction } from "./types/nftmngr/tx"; import { MsgPerformActionByAdmin } from "./types/nftmngr/tx"; import { MsgCreateMetadata } from "./types/nftmngr/tx"; +import { MsgAddSystemActioner } from "./types/nftmngr/tx"; +import { MsgRemoveSystemActioner } from "./types/nftmngr/tx"; +import { MsgSetBaseUri } from "./types/nftmngr/tx"; +import { MsgToggleAction } from "./types/nftmngr/tx"; import { MsgAddAttribute } from "./types/nftmngr/tx"; -import { MsgChangeSchemaOwner } from "./types/nftmngr/tx"; +import { MsgCreateNFTSchema } from "./types/nftmngr/tx"; const types = [ - ["/sixnft.nftmngr.MsgAddAction", MsgAddAction], - ["/sixnft.nftmngr.MsgToggleAction", MsgToggleAction], - ["/sixnft.nftmngr.MsgCreateNFTSchema", MsgCreateNFTSchema], ["/sixnft.nftmngr.MsgAddTokenAttribute", MsgAddTokenAttribute], ["/sixnft.nftmngr.MsgSetNFTAttribute", MsgSetNFTAttribute], - ["/sixnft.nftmngr.MsgSetBaseUri", MsgSetBaseUri], + ["/sixnft.nftmngr.MsgChangeSchemaOwner", MsgChangeSchemaOwner], + ["/sixnft.nftmngr.MsgAddAction", MsgAddAction], ["/sixnft.nftmngr.MsgPerformActionByAdmin", MsgPerformActionByAdmin], ["/sixnft.nftmngr.MsgCreateMetadata", MsgCreateMetadata], + ["/sixnft.nftmngr.MsgAddSystemActioner", MsgAddSystemActioner], + ["/sixnft.nftmngr.MsgRemoveSystemActioner", MsgRemoveSystemActioner], + ["/sixnft.nftmngr.MsgSetBaseUri", MsgSetBaseUri], + ["/sixnft.nftmngr.MsgToggleAction", MsgToggleAction], ["/sixnft.nftmngr.MsgAddAttribute", MsgAddAttribute], - ["/sixnft.nftmngr.MsgChangeSchemaOwner", MsgChangeSchemaOwner], + ["/sixnft.nftmngr.MsgCreateNFTSchema", MsgCreateNFTSchema], ]; export const MissingWalletError = new Error("wallet is required"); @@ -59,16 +63,18 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = return { signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), - msgAddAction: (data: MsgAddAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddAction", value: MsgAddAction.fromPartial( data ) }), - msgToggleAction: (data: MsgToggleAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgToggleAction", value: MsgToggleAction.fromPartial( data ) }), - msgCreateNFTSchema: (data: MsgCreateNFTSchema): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgCreateNFTSchema", value: MsgCreateNFTSchema.fromPartial( data ) }), msgAddTokenAttribute: (data: MsgAddTokenAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddTokenAttribute", value: MsgAddTokenAttribute.fromPartial( data ) }), msgSetNFTAttribute: (data: MsgSetNFTAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgSetNFTAttribute", value: MsgSetNFTAttribute.fromPartial( data ) }), - msgSetBaseUri: (data: MsgSetBaseUri): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgSetBaseUri", value: MsgSetBaseUri.fromPartial( data ) }), + msgChangeSchemaOwner: (data: MsgChangeSchemaOwner): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgChangeSchemaOwner", value: MsgChangeSchemaOwner.fromPartial( data ) }), + msgAddAction: (data: MsgAddAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddAction", value: MsgAddAction.fromPartial( data ) }), msgPerformActionByAdmin: (data: MsgPerformActionByAdmin): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgPerformActionByAdmin", value: MsgPerformActionByAdmin.fromPartial( data ) }), msgCreateMetadata: (data: MsgCreateMetadata): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgCreateMetadata", value: MsgCreateMetadata.fromPartial( data ) }), + msgAddSystemActioner: (data: MsgAddSystemActioner): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddSystemActioner", value: MsgAddSystemActioner.fromPartial( data ) }), + msgRemoveSystemActioner: (data: MsgRemoveSystemActioner): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgRemoveSystemActioner", value: MsgRemoveSystemActioner.fromPartial( data ) }), + msgSetBaseUri: (data: MsgSetBaseUri): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgSetBaseUri", value: MsgSetBaseUri.fromPartial( data ) }), + msgToggleAction: (data: MsgToggleAction): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgToggleAction", value: MsgToggleAction.fromPartial( data ) }), msgAddAttribute: (data: MsgAddAttribute): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgAddAttribute", value: MsgAddAttribute.fromPartial( data ) }), - msgChangeSchemaOwner: (data: MsgChangeSchemaOwner): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgChangeSchemaOwner", value: MsgChangeSchemaOwner.fromPartial( data ) }), + msgCreateNFTSchema: (data: MsgCreateNFTSchema): EncodeObject => ({ typeUrl: "/sixnft.nftmngr.MsgCreateNFTSchema", value: MsgCreateNFTSchema.fromPartial( data ) }), }; }; diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/rest.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/rest.ts index e36d71e7..c097e714 100644 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/rest.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/rest.ts @@ -84,6 +84,11 @@ export interface NftmngrMsgAddAttributeResponse { onchainData?: NftmngrOnChainData; } +export interface NftmngrMsgAddSystemActionerResponse { + nftSchemaCode?: string; + actioner?: string; +} + export interface NftmngrMsgAddTokenAttributeResponse { code?: string; name?: string; @@ -109,6 +114,11 @@ export interface NftmngrMsgPerformActionByAdminResponse { token_id?: string; } +export interface NftmngrMsgRemoveSystemActionerResponse { + nftSchemaCode?: string; + actioner?: string; +} + export interface NftmngrMsgSetBaseUriResponse { code?: string; uri?: string; @@ -130,6 +140,7 @@ export interface NftmngrNFTSchema { code?: string; name?: string; owner?: string; + system_actioners?: string[]; origin_data?: NftmngrOriginData; onchain_data?: NftmngrOnChainData; } diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/nftmngr/nft_schema.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/nftmngr/nft_schema.ts index 4d95e494..6a8dded1 100644 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/nftmngr/nft_schema.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/nftmngr/nft_schema.ts @@ -9,11 +9,17 @@ export interface NFTSchema { code: string; name: string; owner: string; + system_actioners: string[]; origin_data: OriginData | undefined; onchain_data: OnChainData | undefined; } -const baseNFTSchema: object = { code: "", name: "", owner: "" }; +const baseNFTSchema: object = { + code: "", + name: "", + owner: "", + system_actioners: "", +}; export const NFTSchema = { encode(message: NFTSchema, writer: Writer = Writer.create()): Writer { @@ -26,13 +32,16 @@ export const NFTSchema = { if (message.owner !== "") { writer.uint32(26).string(message.owner); } + for (const v of message.system_actioners) { + writer.uint32(34).string(v!); + } if (message.origin_data !== undefined) { - OriginData.encode(message.origin_data, writer.uint32(34).fork()).ldelim(); + OriginData.encode(message.origin_data, writer.uint32(42).fork()).ldelim(); } if (message.onchain_data !== undefined) { OnChainData.encode( message.onchain_data, - writer.uint32(42).fork() + writer.uint32(50).fork() ).ldelim(); } return writer; @@ -42,6 +51,7 @@ export const NFTSchema = { const reader = input instanceof Uint8Array ? new Reader(input) : input; let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseNFTSchema } as NFTSchema; + message.system_actioners = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -55,9 +65,12 @@ export const NFTSchema = { message.owner = reader.string(); break; case 4: - message.origin_data = OriginData.decode(reader, reader.uint32()); + message.system_actioners.push(reader.string()); break; case 5: + message.origin_data = OriginData.decode(reader, reader.uint32()); + break; + case 6: message.onchain_data = OnChainData.decode(reader, reader.uint32()); break; default: @@ -70,6 +83,7 @@ export const NFTSchema = { fromJSON(object: any): NFTSchema { const message = { ...baseNFTSchema } as NFTSchema; + message.system_actioners = []; if (object.code !== undefined && object.code !== null) { message.code = String(object.code); } else { @@ -85,6 +99,14 @@ export const NFTSchema = { } else { message.owner = ""; } + if ( + object.system_actioners !== undefined && + object.system_actioners !== null + ) { + for (const e of object.system_actioners) { + message.system_actioners.push(String(e)); + } + } if (object.origin_data !== undefined && object.origin_data !== null) { message.origin_data = OriginData.fromJSON(object.origin_data); } else { @@ -103,6 +125,11 @@ export const NFTSchema = { message.code !== undefined && (obj.code = message.code); message.name !== undefined && (obj.name = message.name); message.owner !== undefined && (obj.owner = message.owner); + if (message.system_actioners) { + obj.system_actioners = message.system_actioners.map((e) => e); + } else { + obj.system_actioners = []; + } message.origin_data !== undefined && (obj.origin_data = message.origin_data ? OriginData.toJSON(message.origin_data) @@ -116,6 +143,7 @@ export const NFTSchema = { fromPartial(object: DeepPartial): NFTSchema { const message = { ...baseNFTSchema } as NFTSchema; + message.system_actioners = []; if (object.code !== undefined && object.code !== null) { message.code = object.code; } else { @@ -131,6 +159,14 @@ export const NFTSchema = { } else { message.owner = ""; } + if ( + object.system_actioners !== undefined && + object.system_actioners !== null + ) { + for (const e of object.system_actioners) { + message.system_actioners.push(e); + } + } if (object.origin_data !== undefined && object.origin_data !== null) { message.origin_data = OriginData.fromPartial(object.origin_data); } else { diff --git a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/nftmngr/tx.ts b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/nftmngr/tx.ts index d3b649e2..e5782c85 100644 --- a/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/nftmngr/tx.ts +++ b/vue/src/store/generated/thesixnetwork/sixnft/sixnft.nftmngr/module/types/nftmngr/tx.ts @@ -134,6 +134,28 @@ export interface MsgChangeSchemaOwnerResponse { newOwner: string; } +export interface MsgAddSystemActioner { + creator: string; + nftSchemaCode: string; + actioner: string; +} + +export interface MsgAddSystemActionerResponse { + nftSchemaCode: string; + actioner: string; +} + +export interface MsgRemoveSystemActioner { + creator: string; + nftSchemaCode: string; + actioner: string; +} + +export interface MsgRemoveSystemActionerResponse { + nftSchemaCode: string; + actioner: string; +} + const baseMsgCreateNFTSchema: object = { creator: "", nftSchemaBase64: "" }; export const MsgCreateNFTSchema = { @@ -2357,6 +2379,388 @@ export const MsgChangeSchemaOwnerResponse = { }, }; +const baseMsgAddSystemActioner: object = { + creator: "", + nftSchemaCode: "", + actioner: "", +}; + +export const MsgAddSystemActioner = { + encode( + message: MsgAddSystemActioner, + writer: Writer = Writer.create() + ): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.nftSchemaCode !== "") { + writer.uint32(18).string(message.nftSchemaCode); + } + if (message.actioner !== "") { + writer.uint32(26).string(message.actioner); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgAddSystemActioner { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseMsgAddSystemActioner } as MsgAddSystemActioner; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.nftSchemaCode = reader.string(); + break; + case 3: + message.actioner = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgAddSystemActioner { + const message = { ...baseMsgAddSystemActioner } as MsgAddSystemActioner; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if (object.nftSchemaCode !== undefined && object.nftSchemaCode !== null) { + message.nftSchemaCode = String(object.nftSchemaCode); + } else { + message.nftSchemaCode = ""; + } + if (object.actioner !== undefined && object.actioner !== null) { + message.actioner = String(object.actioner); + } else { + message.actioner = ""; + } + return message; + }, + + toJSON(message: MsgAddSystemActioner): unknown { + const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.nftSchemaCode !== undefined && + (obj.nftSchemaCode = message.nftSchemaCode); + message.actioner !== undefined && (obj.actioner = message.actioner); + return obj; + }, + + fromPartial(object: DeepPartial): MsgAddSystemActioner { + const message = { ...baseMsgAddSystemActioner } as MsgAddSystemActioner; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if (object.nftSchemaCode !== undefined && object.nftSchemaCode !== null) { + message.nftSchemaCode = object.nftSchemaCode; + } else { + message.nftSchemaCode = ""; + } + if (object.actioner !== undefined && object.actioner !== null) { + message.actioner = object.actioner; + } else { + message.actioner = ""; + } + return message; + }, +}; + +const baseMsgAddSystemActionerResponse: object = { + nftSchemaCode: "", + actioner: "", +}; + +export const MsgAddSystemActionerResponse = { + encode( + message: MsgAddSystemActionerResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.nftSchemaCode !== "") { + writer.uint32(10).string(message.nftSchemaCode); + } + if (message.actioner !== "") { + writer.uint32(18).string(message.actioner); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): MsgAddSystemActionerResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseMsgAddSystemActionerResponse, + } as MsgAddSystemActionerResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.nftSchemaCode = reader.string(); + break; + case 2: + message.actioner = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgAddSystemActionerResponse { + const message = { + ...baseMsgAddSystemActionerResponse, + } as MsgAddSystemActionerResponse; + if (object.nftSchemaCode !== undefined && object.nftSchemaCode !== null) { + message.nftSchemaCode = String(object.nftSchemaCode); + } else { + message.nftSchemaCode = ""; + } + if (object.actioner !== undefined && object.actioner !== null) { + message.actioner = String(object.actioner); + } else { + message.actioner = ""; + } + return message; + }, + + toJSON(message: MsgAddSystemActionerResponse): unknown { + const obj: any = {}; + message.nftSchemaCode !== undefined && + (obj.nftSchemaCode = message.nftSchemaCode); + message.actioner !== undefined && (obj.actioner = message.actioner); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MsgAddSystemActionerResponse { + const message = { + ...baseMsgAddSystemActionerResponse, + } as MsgAddSystemActionerResponse; + if (object.nftSchemaCode !== undefined && object.nftSchemaCode !== null) { + message.nftSchemaCode = object.nftSchemaCode; + } else { + message.nftSchemaCode = ""; + } + if (object.actioner !== undefined && object.actioner !== null) { + message.actioner = object.actioner; + } else { + message.actioner = ""; + } + return message; + }, +}; + +const baseMsgRemoveSystemActioner: object = { + creator: "", + nftSchemaCode: "", + actioner: "", +}; + +export const MsgRemoveSystemActioner = { + encode( + message: MsgRemoveSystemActioner, + writer: Writer = Writer.create() + ): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.nftSchemaCode !== "") { + writer.uint32(18).string(message.nftSchemaCode); + } + if (message.actioner !== "") { + writer.uint32(26).string(message.actioner); + } + return writer; + }, + + decode(input: Reader | Uint8Array, length?: number): MsgRemoveSystemActioner { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseMsgRemoveSystemActioner, + } as MsgRemoveSystemActioner; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.nftSchemaCode = reader.string(); + break; + case 3: + message.actioner = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgRemoveSystemActioner { + const message = { + ...baseMsgRemoveSystemActioner, + } as MsgRemoveSystemActioner; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if (object.nftSchemaCode !== undefined && object.nftSchemaCode !== null) { + message.nftSchemaCode = String(object.nftSchemaCode); + } else { + message.nftSchemaCode = ""; + } + if (object.actioner !== undefined && object.actioner !== null) { + message.actioner = String(object.actioner); + } else { + message.actioner = ""; + } + return message; + }, + + toJSON(message: MsgRemoveSystemActioner): unknown { + const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.nftSchemaCode !== undefined && + (obj.nftSchemaCode = message.nftSchemaCode); + message.actioner !== undefined && (obj.actioner = message.actioner); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MsgRemoveSystemActioner { + const message = { + ...baseMsgRemoveSystemActioner, + } as MsgRemoveSystemActioner; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if (object.nftSchemaCode !== undefined && object.nftSchemaCode !== null) { + message.nftSchemaCode = object.nftSchemaCode; + } else { + message.nftSchemaCode = ""; + } + if (object.actioner !== undefined && object.actioner !== null) { + message.actioner = object.actioner; + } else { + message.actioner = ""; + } + return message; + }, +}; + +const baseMsgRemoveSystemActionerResponse: object = { + nftSchemaCode: "", + actioner: "", +}; + +export const MsgRemoveSystemActionerResponse = { + encode( + message: MsgRemoveSystemActionerResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.nftSchemaCode !== "") { + writer.uint32(10).string(message.nftSchemaCode); + } + if (message.actioner !== "") { + writer.uint32(18).string(message.actioner); + } + return writer; + }, + + decode( + input: Reader | Uint8Array, + length?: number + ): MsgRemoveSystemActionerResponse { + const reader = input instanceof Uint8Array ? new Reader(input) : input; + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseMsgRemoveSystemActionerResponse, + } as MsgRemoveSystemActionerResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.nftSchemaCode = reader.string(); + break; + case 2: + message.actioner = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgRemoveSystemActionerResponse { + const message = { + ...baseMsgRemoveSystemActionerResponse, + } as MsgRemoveSystemActionerResponse; + if (object.nftSchemaCode !== undefined && object.nftSchemaCode !== null) { + message.nftSchemaCode = String(object.nftSchemaCode); + } else { + message.nftSchemaCode = ""; + } + if (object.actioner !== undefined && object.actioner !== null) { + message.actioner = String(object.actioner); + } else { + message.actioner = ""; + } + return message; + }, + + toJSON(message: MsgRemoveSystemActionerResponse): unknown { + const obj: any = {}; + message.nftSchemaCode !== undefined && + (obj.nftSchemaCode = message.nftSchemaCode); + message.actioner !== undefined && (obj.actioner = message.actioner); + return obj; + }, + + fromPartial( + object: DeepPartial + ): MsgRemoveSystemActionerResponse { + const message = { + ...baseMsgRemoveSystemActionerResponse, + } as MsgRemoveSystemActionerResponse; + if (object.nftSchemaCode !== undefined && object.nftSchemaCode !== null) { + message.nftSchemaCode = object.nftSchemaCode; + } else { + message.nftSchemaCode = ""; + } + if (object.actioner !== undefined && object.actioner !== null) { + message.actioner = object.actioner; + } else { + message.actioner = ""; + } + return message; + }, +}; + /** Msg defines the Msg service. */ export interface Msg { CreateNFTSchema( @@ -2378,10 +2782,16 @@ export interface Msg { ): Promise; SetBaseUri(request: MsgSetBaseUri): Promise; ToggleAction(request: MsgToggleAction): Promise; - /** this line is used by starport scaffolding # proto/tx/rpc */ ChangeSchemaOwner( request: MsgChangeSchemaOwner ): Promise; + AddSystemActioner( + request: MsgAddSystemActioner + ): Promise; + /** this line is used by starport scaffolding # proto/tx/rpc */ + RemoveSystemActioner( + request: MsgRemoveSystemActioner + ): Promise; } export class MsgClientImpl implements Msg { @@ -2512,6 +2922,34 @@ export class MsgClientImpl implements Msg { MsgChangeSchemaOwnerResponse.decode(new Reader(data)) ); } + + AddSystemActioner( + request: MsgAddSystemActioner + ): Promise { + const data = MsgAddSystemActioner.encode(request).finish(); + const promise = this.rpc.request( + "sixnft.nftmngr.Msg", + "AddSystemActioner", + data + ); + return promise.then((data) => + MsgAddSystemActionerResponse.decode(new Reader(data)) + ); + } + + RemoveSystemActioner( + request: MsgRemoveSystemActioner + ): Promise { + const data = MsgRemoveSystemActioner.encode(request).finish(); + const promise = this.rpc.request( + "sixnft.nftmngr.Msg", + "RemoveSystemActioner", + data + ); + return promise.then((data) => + MsgRemoveSystemActionerResponse.decode(new Reader(data)) + ); + } } interface Rpc { diff --git a/x/nftmngr/client/cli/tx.go b/x/nftmngr/client/cli/tx.go index 19eac155..6f62ba70 100644 --- a/x/nftmngr/client/cli/tx.go +++ b/x/nftmngr/client/cli/tx.go @@ -40,6 +40,8 @@ func GetTxCmd() *cobra.Command { cmd.AddCommand(CmdSetBaseUri()) cmd.AddCommand(CmdToggleAction()) cmd.AddCommand(CmdChangeSchemaOwner()) + cmd.AddCommand(CmdAddSystemActioner()) + cmd.AddCommand(CmdRemoveSystemActioner()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/nftmngr/client/cli/tx_add_system_actioner.go b/x/nftmngr/client/cli/tx_add_system_actioner.go new file mode 100644 index 00000000..97ec8eb3 --- /dev/null +++ b/x/nftmngr/client/cli/tx_add_system_actioner.go @@ -0,0 +1,44 @@ +package cli + +import ( + "strconv" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/spf13/cobra" + "github.com/thesixnetwork/sixnft/x/nftmngr/types" +) + +var _ = strconv.Itoa(0) + +func CmdAddSystemActioner() *cobra.Command { + cmd := &cobra.Command{ + Use: "add-system-actioner [nft-schema-code] [actioner]", + Short: "To add system actioner", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) (err error) { + argNftSchemaCode := args[0] + argActioner := args[1] + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgAddSystemActioner( + clientCtx.GetFromAddress().String(), + argNftSchemaCode, + argActioner, + ) + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/nftmngr/client/cli/tx_remove_system_actioner.go b/x/nftmngr/client/cli/tx_remove_system_actioner.go new file mode 100644 index 00000000..d911429f --- /dev/null +++ b/x/nftmngr/client/cli/tx_remove_system_actioner.go @@ -0,0 +1,44 @@ +package cli + +import ( + "strconv" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/spf13/cobra" + "github.com/thesixnetwork/sixnft/x/nftmngr/types" +) + +var _ = strconv.Itoa(0) + +func CmdRemoveSystemActioner() *cobra.Command { + cmd := &cobra.Command{ + Use: "remove-system-actioner [nft-schema-code] [actioner]", + Short: "To remove system actioner", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) (err error) { + argNftSchemaCode := args[0] + argActioner := args[1] + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgRemoveSystemActioner( + clientCtx.GetFromAddress().String(), + argNftSchemaCode, + argActioner, + ) + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/nftmngr/handler.go b/x/nftmngr/handler.go index ff8eb8db..2e542233 100644 --- a/x/nftmngr/handler.go +++ b/x/nftmngr/handler.go @@ -47,6 +47,12 @@ func NewHandler(k keeper.Keeper) sdk.Handler { case *types.MsgChangeSchemaOwner: res, err := msgServer.ChangeSchemaOwner(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgAddSystemActioner: + res, err := msgServer.AddSystemActioner(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgRemoveSystemActioner: + res, err := msgServer.RemoveSystemActioner(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) // this line is used by starport scaffolding # 1 default: errMsg := fmt.Sprintf("unrecognized %s message type: %T", types.ModuleName, msg) diff --git a/x/nftmngr/keeper/msg_server_add_system_actioner.go b/x/nftmngr/keeper/msg_server_add_system_actioner.go new file mode 100644 index 00000000..13c7fe0f --- /dev/null +++ b/x/nftmngr/keeper/msg_server_add_system_actioner.go @@ -0,0 +1,51 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/thesixnetwork/sixnft/x/nftmngr/types" +) + +func (k msgServer) AddSystemActioner(goCtx context.Context, msg *types.MsgAddSystemActioner) (*types.MsgAddSystemActionerResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // Retreive schema + schema, found := k.Keeper.GetNFTSchema(ctx, msg.NftSchemaCode) + if !found { + return nil, sdkerrors.Wrap(types.ErrSchemaDoesNotExists, msg.NftSchemaCode) + } + + // Check if creator is the owner of the schema + if msg.Creator != schema.Owner { + return nil, sdkerrors.Wrap(types.ErrCreatorDoesNotMatch, msg.Creator) + } + // Create a map of syste actioners + mapSystemActioners := make(map[string]bool) + for _, systemActioner := range schema.SystemActioners { + mapSystemActioners[systemActioner] = true + } + // Check if system actioner already exists + if _, ok := mapSystemActioners[msg.Actioner]; ok { + return nil, sdkerrors.Wrap(types.ErrSystemActionerAlreadyExists, msg.Actioner) + } + // Add system actioner to schema + schema.SystemActioners = append(schema.SystemActioners, msg.Actioner) + // Set schema + k.Keeper.SetNFTSchema(ctx, schema) + + // emit events + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeAddSystemActioner, + sdk.NewAttribute(types.AttributeKeyNftSchemaCode, msg.NftSchemaCode), + sdk.NewAttribute(types.AttributeKeyActioner, msg.Actioner), + ), + ) + + return &types.MsgAddSystemActionerResponse{ + NftSchemaCode: msg.NftSchemaCode, + Actioner: msg.Actioner, + }, nil +} diff --git a/x/nftmngr/keeper/msg_server_perform_action_by_admin.go b/x/nftmngr/keeper/msg_server_perform_action_by_admin.go index e22407ea..de3c3b58 100644 --- a/x/nftmngr/keeper/msg_server_perform_action_by_admin.go +++ b/x/nftmngr/keeper/msg_server_perform_action_by_admin.go @@ -23,8 +23,17 @@ func (k msgServer) PerformActionByAdmin(goCtx context.Context, msg *types.MsgPer return nil, sdkerrors.Wrap(types.ErrMetadataDoesNotExists, msg.NftSchemaCode) } - if msg.Creator != schema.Owner { - return nil, sdkerrors.Wrap(types.ErrCreatorDoesNotMatch, msg.Creator) + // Map system actioners + mapSystemActioners := make(map[string]bool) + for _, systemActioner := range schema.SystemActioners { + mapSystemActioners[systemActioner] = true + } + + // Check if Creator is one of system actioners + if _, ok := mapSystemActioners[msg.Creator]; !ok { + if msg.Creator != schema.Owner { + return nil, sdkerrors.Wrap(types.ErrUnauthorized, msg.Creator) + } } mapAction := types.Action{} for _, action := range schema.OnchainData.Actions { diff --git a/x/nftmngr/keeper/msg_server_remove_system_actioner.go b/x/nftmngr/keeper/msg_server_remove_system_actioner.go new file mode 100644 index 00000000..ab0c3afe --- /dev/null +++ b/x/nftmngr/keeper/msg_server_remove_system_actioner.go @@ -0,0 +1,56 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/thesixnetwork/sixnft/x/nftmngr/types" +) + +func (k msgServer) RemoveSystemActioner(goCtx context.Context, msg *types.MsgRemoveSystemActioner) (*types.MsgRemoveSystemActionerResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // Retrieve the schema + schema, found := k.Keeper.GetNFTSchema(ctx, msg.NftSchemaCode) + if !found { + return nil, sdkerrors.Wrap(types.ErrSchemaDoesNotExists, msg.NftSchemaCode) + } + // Check if the creator is the owner of the schema + if msg.Creator != schema.Owner { + return nil, sdkerrors.Wrap(types.ErrCreatorDoesNotMatch, msg.Creator) + } + + // Create map of system actioners + mapSystemActioners := make(map[string]bool) + for _, systemActioner := range schema.SystemActioners { + mapSystemActioners[systemActioner] = true + } + // Check if system actioner exists + if _, ok := mapSystemActioners[msg.Actioner]; !ok { + return nil, sdkerrors.Wrap(types.ErrSystemActionerDoesNotExists, msg.Actioner) + } + // Remove system actioner from schema + for i, systemActioner := range schema.SystemActioners { + if systemActioner == msg.Actioner { + schema.SystemActioners = append(schema.SystemActioners[:i], schema.SystemActioners[i+1:]...) + break + } + } + // Set schema + k.Keeper.SetNFTSchema(ctx, schema) + + // emit events + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeRemoveSystemActioner, + sdk.NewAttribute(types.AttributeKeyNftSchemaCode, msg.NftSchemaCode), + sdk.NewAttribute(types.AttributeKeyActioner, msg.Actioner), + ), + ) + + return &types.MsgRemoveSystemActionerResponse{ + NftSchemaCode: msg.NftSchemaCode, + Actioner: msg.Actioner, + }, nil +} diff --git a/x/nftmngr/types/codec.go b/x/nftmngr/types/codec.go index c6edb7aa..575a3dce 100644 --- a/x/nftmngr/types/codec.go +++ b/x/nftmngr/types/codec.go @@ -18,6 +18,8 @@ func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgSetBaseUri{}, "nftmngr/SetBaseUri", nil) cdc.RegisterConcrete(&MsgToggleAction{}, "nftmngr/ToggleAction", nil) cdc.RegisterConcrete(&MsgChangeSchemaOwner{}, "nftmngr/ChangeSchemaOwner", nil) + cdc.RegisterConcrete(&MsgAddSystemActioner{}, "nftmngr/AddSystemActioner", nil) + cdc.RegisterConcrete(&MsgRemoveSystemActioner{}, "nftmngr/RemoveSystemActioner", nil) // this line is used by starport scaffolding # 2 } @@ -52,6 +54,12 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgChangeSchemaOwner{}, ) + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgAddSystemActioner{}, + ) + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgRemoveSystemActioner{}, + ) // this line is used by starport scaffolding # 3 msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/nftmngr/types/errors.go b/x/nftmngr/types/errors.go index 2c9932ea..7ad6f79e 100644 --- a/x/nftmngr/types/errors.go +++ b/x/nftmngr/types/errors.go @@ -55,4 +55,9 @@ var ( ErrOrganizationOwner = sdkerrors.Register(ModuleName, 400, "Unauthorized organization owner") ErrInvalidAttributeName = sdkerrors.Register(ModuleName, 500, "Invalid attribute name") + + ErrSystemActionerAlreadyExists = sdkerrors.Register(ModuleName, 600, "System actioner already exists") + ErrSystemActionerDoesNotExists = sdkerrors.Register(ModuleName, 601, "System actioner does not exists") + + ErrUnauthorized = sdkerrors.Register(ModuleName, 700, "Unauthorized") ) diff --git a/x/nftmngr/types/events.go b/x/nftmngr/types/events.go index 2864fd78..72d321f3 100644 --- a/x/nftmngr/types/events.go +++ b/x/nftmngr/types/events.go @@ -9,4 +9,8 @@ const ( EventTypeSchemaOwnerChanged = "schema_owner_changed" AttributeKeyNftSchemaCode = "nft_schema_code" AttributeKeyNewOwner = "new_owner" + + EventTypeAddSystemActioner = "add_system_actioner" + EventTypeRemoveSystemActioner = "remove_system_actioner" + AttributeKeyActioner = "actioner" ) diff --git a/x/nftmngr/types/message_add_system_actioner.go b/x/nftmngr/types/message_add_system_actioner.go new file mode 100644 index 00000000..fbacb917 --- /dev/null +++ b/x/nftmngr/types/message_add_system_actioner.go @@ -0,0 +1,47 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const TypeMsgAddSystemActioner = "add_system_actioner" + +var _ sdk.Msg = &MsgAddSystemActioner{} + +func NewMsgAddSystemActioner(creator string, nftSchemaCode string, actioner string) *MsgAddSystemActioner { + return &MsgAddSystemActioner{ + Creator: creator, + NftSchemaCode: nftSchemaCode, + Actioner: actioner, + } +} + +func (msg *MsgAddSystemActioner) Route() string { + return RouterKey +} + +func (msg *MsgAddSystemActioner) Type() string { + return TypeMsgAddSystemActioner +} + +func (msg *MsgAddSystemActioner) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func (msg *MsgAddSystemActioner) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgAddSystemActioner) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + return nil +} diff --git a/x/nftmngr/types/message_add_system_actioner_test.go b/x/nftmngr/types/message_add_system_actioner_test.go new file mode 100644 index 00000000..21dc1f76 --- /dev/null +++ b/x/nftmngr/types/message_add_system_actioner_test.go @@ -0,0 +1,40 @@ +package types + +import ( + "testing" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" + "github.com/thesixnetwork/sixnft/testutil/sample" +) + +func TestMsgAddSystemActioner_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgAddSystemActioner + err error + }{ + { + name: "invalid address", + msg: MsgAddSystemActioner{ + Creator: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgAddSystemActioner{ + Creator: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} diff --git a/x/nftmngr/types/message_remove_system_actioner.go b/x/nftmngr/types/message_remove_system_actioner.go new file mode 100644 index 00000000..bf229ede --- /dev/null +++ b/x/nftmngr/types/message_remove_system_actioner.go @@ -0,0 +1,47 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const TypeMsgRemoveSystemActioner = "remove_system_actioner" + +var _ sdk.Msg = &MsgRemoveSystemActioner{} + +func NewMsgRemoveSystemActioner(creator string, nftSchemaCode string, actioner string) *MsgRemoveSystemActioner { + return &MsgRemoveSystemActioner{ + Creator: creator, + NftSchemaCode: nftSchemaCode, + Actioner: actioner, + } +} + +func (msg *MsgRemoveSystemActioner) Route() string { + return RouterKey +} + +func (msg *MsgRemoveSystemActioner) Type() string { + return TypeMsgRemoveSystemActioner +} + +func (msg *MsgRemoveSystemActioner) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func (msg *MsgRemoveSystemActioner) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgRemoveSystemActioner) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + return nil +} diff --git a/x/nftmngr/types/message_remove_system_actioner_test.go b/x/nftmngr/types/message_remove_system_actioner_test.go new file mode 100644 index 00000000..cf8b8224 --- /dev/null +++ b/x/nftmngr/types/message_remove_system_actioner_test.go @@ -0,0 +1,40 @@ +package types + +import ( + "testing" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" + "github.com/thesixnetwork/sixnft/testutil/sample" +) + +func TestMsgRemoveSystemActioner_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgRemoveSystemActioner + err error + }{ + { + name: "invalid address", + msg: MsgRemoveSystemActioner{ + Creator: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgRemoveSystemActioner{ + Creator: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} diff --git a/x/nftmngr/types/nft_schema.pb.go b/x/nftmngr/types/nft_schema.pb.go index cb6ed1f7..52a2bf42 100644 --- a/x/nftmngr/types/nft_schema.pb.go +++ b/x/nftmngr/types/nft_schema.pb.go @@ -23,11 +23,12 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type NFTSchema struct { - Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` - OriginData *OriginData `protobuf:"bytes,4,opt,name=origin_data,json=originData,proto3" json:"origin_data,omitempty"` - OnchainData *OnChainData `protobuf:"bytes,5,opt,name=onchain_data,json=onchainData,proto3" json:"onchain_data,omitempty"` + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` + SystemActioners []string `protobuf:"bytes,4,rep,name=system_actioners,json=systemActioners,proto3" json:"system_actioners,omitempty"` + OriginData *OriginData `protobuf:"bytes,5,opt,name=origin_data,json=originData,proto3" json:"origin_data,omitempty"` + OnchainData *OnChainData `protobuf:"bytes,6,opt,name=onchain_data,json=onchainData,proto3" json:"onchain_data,omitempty"` } func (m *NFTSchema) Reset() { *m = NFTSchema{} } @@ -84,6 +85,13 @@ func (m *NFTSchema) GetOwner() string { return "" } +func (m *NFTSchema) GetSystemActioners() []string { + if m != nil { + return m.SystemActioners + } + return nil +} + func (m *NFTSchema) GetOriginData() *OriginData { if m != nil { return m.OriginData @@ -105,24 +113,26 @@ func init() { func init() { proto.RegisterFile("nftmngr/nft_schema.proto", fileDescriptor_f35d7a245dabb499) } var fileDescriptor_f35d7a245dabb499 = []byte{ - // 269 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xc8, 0x4b, 0x2b, 0xc9, - 0xcd, 0x4b, 0x2f, 0xd2, 0xcf, 0x4b, 0x2b, 0x89, 0x2f, 0x4e, 0xce, 0x48, 0xcd, 0x4d, 0xd4, 0x2b, - 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2b, 0xce, 0xac, 0xc8, 0x4b, 0x2b, 0xd1, 0x83, 0x2a, 0x90, - 0x92, 0x86, 0xa9, 0xcc, 0xcf, 0x8b, 0x4f, 0xce, 0x48, 0xcc, 0xcc, 0x8b, 0x4f, 0x49, 0x2c, 0x81, - 0x2a, 0x96, 0x92, 0x84, 0x4b, 0x16, 0x65, 0xa6, 0xa3, 0x48, 0x29, 0x1d, 0x63, 0xe4, 0xe2, 0xf4, - 0x73, 0x0b, 0x09, 0x06, 0x9b, 0x2d, 0x24, 0xc4, 0xc5, 0x92, 0x9c, 0x9f, 0x92, 0x2a, 0xc1, 0xa8, - 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0x66, 0x83, 0xc4, 0xf2, 0x12, 0x73, 0x53, 0x25, 0x98, 0x20, 0x62, - 0x20, 0xb6, 0x90, 0x08, 0x17, 0x6b, 0x7e, 0x79, 0x5e, 0x6a, 0x91, 0x04, 0x33, 0x58, 0x10, 0xc2, - 0x11, 0xb2, 0xe6, 0xe2, 0x46, 0xb2, 0x40, 0x82, 0x45, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x4a, 0x0f, - 0xd5, 0xa5, 0x7a, 0xfe, 0x60, 0x25, 0x2e, 0x89, 0x25, 0x89, 0x41, 0x5c, 0xf9, 0x70, 0xb6, 0x90, - 0x1d, 0x17, 0x4f, 0x7e, 0x1e, 0xc2, 0xe5, 0x12, 0xac, 0x60, 0xdd, 0xd2, 0x18, 0xba, 0xf3, 0x9c, - 0x41, 0x6a, 0xc0, 0xda, 0xb9, 0xa1, 0x1a, 0x40, 0x1c, 0x27, 0xcf, 0x13, 0x8f, 0xe4, 0x18, 0x2f, - 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, - 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xd2, 0x4f, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, - 0xd5, 0x2f, 0xc9, 0x48, 0x05, 0x19, 0x98, 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0xad, 0x0f, 0x31, 0x5b, - 0xbf, 0x42, 0x1f, 0x16, 0x3e, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, 0xa0, 0x31, 0x06, - 0x04, 0x00, 0x00, 0xff, 0xff, 0xa4, 0xd8, 0x88, 0x47, 0x7e, 0x01, 0x00, 0x00, + // 302 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xcd, 0x4a, 0x3b, 0x31, + 0x14, 0xc5, 0x9b, 0x7f, 0x3f, 0xa0, 0xe9, 0x1f, 0x95, 0xe0, 0x22, 0xb6, 0x10, 0x8a, 0xab, 0x71, + 0x33, 0x01, 0x5d, 0x0a, 0x82, 0x1f, 0x08, 0x6e, 0x14, 0x46, 0x57, 0x6e, 0x86, 0x74, 0x9a, 0xf9, + 0x40, 0x26, 0x29, 0xc9, 0x95, 0xb6, 0x6f, 0xe1, 0x63, 0xb9, 0xec, 0xd2, 0xa5, 0xcc, 0x3c, 0x81, + 0x6f, 0x20, 0x93, 0x99, 0xa9, 0x16, 0x77, 0x27, 0xe7, 0xfe, 0xce, 0x21, 0xf7, 0x62, 0xaa, 0x62, + 0xc8, 0x55, 0x62, 0xb8, 0x8a, 0x21, 0xb4, 0x51, 0x2a, 0x73, 0xe1, 0x2f, 0x8c, 0x06, 0x4d, 0xf6, + 0x6c, 0xb6, 0x52, 0x31, 0xf8, 0x0d, 0x30, 0x9e, 0xb4, 0xa4, 0x56, 0x61, 0x94, 0x8a, 0x4c, 0x85, + 0x73, 0x01, 0x0d, 0x3c, 0x3e, 0xda, 0x0e, 0x4d, 0x96, 0xec, 0x8c, 0x8e, 0xbf, 0x10, 0x1e, 0xde, + 0xdf, 0x3e, 0x3d, 0xba, 0x6e, 0x42, 0x70, 0x2f, 0xd2, 0x73, 0x49, 0xd1, 0x14, 0x79, 0xc3, 0xc0, + 0xe9, 0xca, 0x53, 0x22, 0x97, 0xf4, 0x5f, 0xed, 0x55, 0x9a, 0x1c, 0xe2, 0xbe, 0x5e, 0x2a, 0x69, + 0x68, 0xd7, 0x99, 0xf5, 0x83, 0x9c, 0xe0, 0x03, 0xbb, 0xb6, 0x20, 0xf3, 0x50, 0x44, 0x90, 0x69, + 0x25, 0x8d, 0xa5, 0xbd, 0x69, 0xd7, 0x1b, 0x06, 0xfb, 0xb5, 0x7f, 0xd9, 0xda, 0xe4, 0x1c, 0x8f, + 0x7e, 0xfd, 0x85, 0xf6, 0xa7, 0xc8, 0x1b, 0x9d, 0x8e, 0xfd, 0xdd, 0xa5, 0xfc, 0x07, 0x87, 0xdc, + 0x08, 0x10, 0x01, 0xd6, 0x5b, 0x4d, 0x2e, 0xf0, 0x7f, 0xad, 0x7e, 0x96, 0xa4, 0x03, 0x97, 0x9e, + 0xfc, 0x49, 0xab, 0xeb, 0x8a, 0x71, 0xf1, 0x51, 0x13, 0xa8, 0x1e, 0x57, 0x77, 0xef, 0x05, 0x43, + 0x9b, 0x82, 0xa1, 0xcf, 0x82, 0xa1, 0xb7, 0x92, 0x75, 0x36, 0x25, 0xeb, 0x7c, 0x94, 0xac, 0xf3, + 0xcc, 0x93, 0x0c, 0xd2, 0xd7, 0x99, 0x1f, 0xe9, 0x9c, 0x43, 0x2a, 0xab, 0x42, 0x09, 0x4b, 0x6d, + 0x5e, 0x78, 0xdd, 0xcd, 0x57, 0xbc, 0x3d, 0x25, 0xac, 0x17, 0xd2, 0xce, 0x06, 0xee, 0x8a, 0x67, + 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc6, 0xb1, 0xf3, 0x26, 0xa9, 0x01, 0x00, 0x00, } func (m *NFTSchema) Marshal() (dAtA []byte, err error) { @@ -155,7 +165,7 @@ func (m *NFTSchema) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintNftSchema(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 } if m.OriginData != nil { { @@ -167,7 +177,16 @@ func (m *NFTSchema) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintNftSchema(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a + } + if len(m.SystemActioners) > 0 { + for iNdEx := len(m.SystemActioners) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SystemActioners[iNdEx]) + copy(dAtA[i:], m.SystemActioners[iNdEx]) + i = encodeVarintNftSchema(dAtA, i, uint64(len(m.SystemActioners[iNdEx]))) + i-- + dAtA[i] = 0x22 + } } if len(m.Owner) > 0 { i -= len(m.Owner) @@ -222,6 +241,12 @@ func (m *NFTSchema) Size() (n int) { if l > 0 { n += 1 + l + sovNftSchema(uint64(l)) } + if len(m.SystemActioners) > 0 { + for _, s := range m.SystemActioners { + l = len(s) + n += 1 + l + sovNftSchema(uint64(l)) + } + } if m.OriginData != nil { l = m.OriginData.Size() n += 1 + l + sovNftSchema(uint64(l)) @@ -365,6 +390,38 @@ func (m *NFTSchema) Unmarshal(dAtA []byte) error { m.Owner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SystemActioners", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNftSchema + } + 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 ErrInvalidLengthNftSchema + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNftSchema + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SystemActioners = append(m.SystemActioners, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OriginData", wireType) } @@ -400,7 +457,7 @@ func (m *NFTSchema) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OnchainData", wireType) } diff --git a/x/nftmngr/types/tx.pb.go b/x/nftmngr/types/tx.pb.go index f98688e2..0d1006e9 100644 --- a/x/nftmngr/types/tx.pb.go +++ b/x/nftmngr/types/tx.pb.go @@ -1364,6 +1364,230 @@ func (m *MsgChangeSchemaOwnerResponse) GetNewOwner() string { return "" } +type MsgAddSystemActioner struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + NftSchemaCode string `protobuf:"bytes,2,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` + Actioner string `protobuf:"bytes,3,opt,name=actioner,proto3" json:"actioner,omitempty"` +} + +func (m *MsgAddSystemActioner) Reset() { *m = MsgAddSystemActioner{} } +func (m *MsgAddSystemActioner) String() string { return proto.CompactTextString(m) } +func (*MsgAddSystemActioner) ProtoMessage() {} +func (*MsgAddSystemActioner) Descriptor() ([]byte, []int) { + return fileDescriptor_17e298b08d1e9780, []int{23} +} +func (m *MsgAddSystemActioner) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddSystemActioner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddSystemActioner.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 *MsgAddSystemActioner) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddSystemActioner.Merge(m, src) +} +func (m *MsgAddSystemActioner) XXX_Size() int { + return m.Size() +} +func (m *MsgAddSystemActioner) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddSystemActioner.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddSystemActioner proto.InternalMessageInfo + +func (m *MsgAddSystemActioner) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgAddSystemActioner) GetNftSchemaCode() string { + if m != nil { + return m.NftSchemaCode + } + return "" +} + +func (m *MsgAddSystemActioner) GetActioner() string { + if m != nil { + return m.Actioner + } + return "" +} + +type MsgAddSystemActionerResponse struct { + NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` + Actioner string `protobuf:"bytes,2,opt,name=actioner,proto3" json:"actioner,omitempty"` +} + +func (m *MsgAddSystemActionerResponse) Reset() { *m = MsgAddSystemActionerResponse{} } +func (m *MsgAddSystemActionerResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAddSystemActionerResponse) ProtoMessage() {} +func (*MsgAddSystemActionerResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_17e298b08d1e9780, []int{24} +} +func (m *MsgAddSystemActionerResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddSystemActionerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddSystemActionerResponse.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 *MsgAddSystemActionerResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddSystemActionerResponse.Merge(m, src) +} +func (m *MsgAddSystemActionerResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAddSystemActionerResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddSystemActionerResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddSystemActionerResponse proto.InternalMessageInfo + +func (m *MsgAddSystemActionerResponse) GetNftSchemaCode() string { + if m != nil { + return m.NftSchemaCode + } + return "" +} + +func (m *MsgAddSystemActionerResponse) GetActioner() string { + if m != nil { + return m.Actioner + } + return "" +} + +type MsgRemoveSystemActioner struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + NftSchemaCode string `protobuf:"bytes,2,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` + Actioner string `protobuf:"bytes,3,opt,name=actioner,proto3" json:"actioner,omitempty"` +} + +func (m *MsgRemoveSystemActioner) Reset() { *m = MsgRemoveSystemActioner{} } +func (m *MsgRemoveSystemActioner) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveSystemActioner) ProtoMessage() {} +func (*MsgRemoveSystemActioner) Descriptor() ([]byte, []int) { + return fileDescriptor_17e298b08d1e9780, []int{25} +} +func (m *MsgRemoveSystemActioner) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveSystemActioner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveSystemActioner.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 *MsgRemoveSystemActioner) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveSystemActioner.Merge(m, src) +} +func (m *MsgRemoveSystemActioner) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveSystemActioner) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveSystemActioner.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveSystemActioner proto.InternalMessageInfo + +func (m *MsgRemoveSystemActioner) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgRemoveSystemActioner) GetNftSchemaCode() string { + if m != nil { + return m.NftSchemaCode + } + return "" +} + +func (m *MsgRemoveSystemActioner) GetActioner() string { + if m != nil { + return m.Actioner + } + return "" +} + +type MsgRemoveSystemActionerResponse struct { + NftSchemaCode string `protobuf:"bytes,1,opt,name=nftSchemaCode,proto3" json:"nftSchemaCode,omitempty"` + Actioner string `protobuf:"bytes,2,opt,name=actioner,proto3" json:"actioner,omitempty"` +} + +func (m *MsgRemoveSystemActionerResponse) Reset() { *m = MsgRemoveSystemActionerResponse{} } +func (m *MsgRemoveSystemActionerResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveSystemActionerResponse) ProtoMessage() {} +func (*MsgRemoveSystemActionerResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_17e298b08d1e9780, []int{26} +} +func (m *MsgRemoveSystemActionerResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveSystemActionerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveSystemActionerResponse.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 *MsgRemoveSystemActionerResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveSystemActionerResponse.Merge(m, src) +} +func (m *MsgRemoveSystemActionerResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveSystemActionerResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveSystemActionerResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveSystemActionerResponse proto.InternalMessageInfo + +func (m *MsgRemoveSystemActionerResponse) GetNftSchemaCode() string { + if m != nil { + return m.NftSchemaCode + } + return "" +} + +func (m *MsgRemoveSystemActionerResponse) GetActioner() string { + if m != nil { + return m.Actioner + } + return "" +} + func init() { proto.RegisterType((*MsgCreateNFTSchema)(nil), "sixnft.nftmngr.MsgCreateNFTSchema") proto.RegisterType((*MsgCreateNFTSchemaResponse)(nil), "sixnft.nftmngr.MsgCreateNFTSchemaResponse") @@ -1388,80 +1612,89 @@ func init() { proto.RegisterType((*MsgToggleActionResponse)(nil), "sixnft.nftmngr.MsgToggleActionResponse") proto.RegisterType((*MsgChangeSchemaOwner)(nil), "sixnft.nftmngr.MsgChangeSchemaOwner") proto.RegisterType((*MsgChangeSchemaOwnerResponse)(nil), "sixnft.nftmngr.MsgChangeSchemaOwnerResponse") + proto.RegisterType((*MsgAddSystemActioner)(nil), "sixnft.nftmngr.MsgAddSystemActioner") + proto.RegisterType((*MsgAddSystemActionerResponse)(nil), "sixnft.nftmngr.MsgAddSystemActionerResponse") + proto.RegisterType((*MsgRemoveSystemActioner)(nil), "sixnft.nftmngr.MsgRemoveSystemActioner") + proto.RegisterType((*MsgRemoveSystemActionerResponse)(nil), "sixnft.nftmngr.MsgRemoveSystemActionerResponse") } func init() { proto.RegisterFile("nftmngr/tx.proto", fileDescriptor_17e298b08d1e9780) } var fileDescriptor_17e298b08d1e9780 = []byte{ - // 1080 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4d, 0x6f, 0xdb, 0x46, - 0x10, 0x35, 0xad, 0xd8, 0x8e, 0xc7, 0xb1, 0x65, 0x31, 0x76, 0x22, 0xd3, 0x89, 0xe2, 0x2c, 0x9c, - 0x46, 0x0d, 0x0a, 0xa9, 0x70, 0x8b, 0x5c, 0x8a, 0x00, 0x91, 0x6d, 0x18, 0xf5, 0x41, 0x76, 0xa1, - 0x28, 0x6d, 0xd0, 0x36, 0x65, 0x57, 0xe2, 0x92, 0x22, 0x62, 0x2d, 0x05, 0x72, 0x55, 0x59, 0x40, - 0x0b, 0xb4, 0x87, 0xde, 0x7a, 0x28, 0x90, 0x63, 0xaf, 0xfd, 0x31, 0x39, 0xe6, 0xd8, 0x63, 0x61, - 0xff, 0x91, 0x82, 0xbb, 0x4b, 0x8a, 0xe2, 0x87, 0x64, 0xb9, 0x40, 0x6e, 0xda, 0xdd, 0x37, 0x33, - 0x8f, 0x33, 0x6f, 0x66, 0x57, 0xb0, 0x4e, 0x4d, 0xd6, 0xa5, 0x96, 0x5b, 0x65, 0xe7, 0x95, 0x9e, - 0xeb, 0x30, 0x47, 0x5d, 0xf3, 0xec, 0x73, 0x6a, 0xb2, 0x8a, 0x3c, 0xd0, 0xb6, 0x03, 0x84, 0x43, - 0xf5, 0x76, 0x07, 0xdb, 0x54, 0x37, 0x30, 0xc3, 0x02, 0xac, 0xa1, 0xe0, 0x10, 0x33, 0xe6, 0xda, - 0xad, 0x3e, 0x23, 0xba, 0x41, 0x4c, 0x9b, 0xda, 0xcc, 0x76, 0xa8, 0xc4, 0x3c, 0x0c, 0x30, 0xd4, - 0x64, 0xfa, 0x08, 0xf7, 0x13, 0x3e, 0xeb, 0x13, 0x09, 0xd9, 0xb2, 0x1c, 0xc7, 0x3a, 0x23, 0x55, - 0xbe, 0x6a, 0xf5, 0xcd, 0x2a, 0xa6, 0x43, 0x71, 0x84, 0x5e, 0x81, 0x5a, 0xf7, 0xac, 0x03, 0x97, - 0x60, 0x46, 0x4e, 0x8e, 0x9a, 0x2f, 0xda, 0x1d, 0xd2, 0xc5, 0x6a, 0x11, 0x96, 0xda, 0xfe, 0x96, - 0xe3, 0x16, 0x95, 0x1d, 0xa5, 0xbc, 0xdc, 0x08, 0x96, 0x6a, 0x19, 0xf2, 0xd4, 0x64, 0x02, 0xb6, - 0x8f, 0x3d, 0xf2, 0xf4, 0xf3, 0xe2, 0x3c, 0x47, 0xc4, 0xb7, 0xd1, 0xa7, 0xa0, 0x25, 0x3d, 0x37, - 0x88, 0xd7, 0x73, 0xa8, 0x47, 0x54, 0x15, 0x6e, 0xb4, 0x1d, 0x83, 0x48, 0xf7, 0xfc, 0x37, 0x7a, - 0xab, 0x40, 0x21, 0x34, 0xa9, 0x13, 0x86, 0xfd, 0x4c, 0x4c, 0xe0, 0xb2, 0x0b, 0xab, 0x61, 0xd0, - 0x03, 0xdf, 0x99, 0x60, 0x32, 0xbe, 0xe9, 0xdb, 0x33, 0xe7, 0x0d, 0xa1, 0xc7, 0x46, 0x31, 0x27, - 0xec, 0xe5, 0xd2, 0xb7, 0x6f, 0x71, 0xae, 0x27, 0x47, 0xcd, 0x43, 0xcc, 0x70, 0xf1, 0x86, 0xb0, - 0x1f, 0xdb, 0x44, 0xdf, 0xc1, 0x56, 0x82, 0x54, 0xf8, 0x19, 0x09, 0x0a, 0xca, 0x14, 0x0a, 0xf3, - 0x63, 0x14, 0xd0, 0x6b, 0x58, 0x3f, 0xed, 0x11, 0xea, 0x11, 0x5c, 0x0b, 0x2a, 0xa7, 0xde, 0x07, - 0x60, 0x2e, 0xb6, 0x99, 0xce, 0x86, 0xbd, 0xc0, 0xe1, 0x32, 0xdf, 0x69, 0x0e, 0x7b, 0x44, 0x7d, - 0x02, 0x0b, 0xbc, 0xb6, 0xdc, 0xd5, 0xca, 0xde, 0x46, 0x45, 0x14, 0xb7, 0x12, 0x14, 0xb7, 0x52, - 0xa3, 0xc3, 0x86, 0x80, 0xa0, 0xef, 0xa1, 0xf8, 0xb2, 0x67, 0x60, 0x46, 0x8c, 0x78, 0x14, 0x4f, - 0x7d, 0x0e, 0x10, 0xaa, 0xc5, 0x2b, 0x2a, 0x3b, 0xb9, 0xf2, 0xca, 0xde, 0x4e, 0x65, 0x5c, 0x9d, - 0x95, 0xb8, 0x59, 0x23, 0x62, 0x83, 0x7a, 0x50, 0x08, 0xbc, 0xbb, 0xb6, 0x65, 0x53, 0x3f, 0x5d, - 0xea, 0x21, 0x2c, 0x39, 0xc2, 0x88, 0x53, 0x5f, 0xd9, 0x2b, 0xc7, 0x7d, 0x66, 0x31, 0xfa, 0x72, - 0xae, 0x11, 0x98, 0xee, 0x6f, 0xc2, 0xed, 0xbe, 0x80, 0xe9, 0x0e, 0xf7, 0xcd, 0xbb, 0x02, 0xfd, - 0xad, 0xc0, 0xdd, 0xba, 0x67, 0x7d, 0x45, 0x5c, 0xd3, 0x71, 0xbb, 0xb5, 0xb6, 0xdf, 0x06, 0xfb, - 0xc3, 0x9a, 0xd1, 0xb5, 0xe9, 0x04, 0x9d, 0x7c, 0xc4, 0x35, 0xab, 0x7b, 0xbc, 0x20, 0x7a, 0xfb, - 0x1a, 0x4a, 0xb9, 0x03, 0x8b, 0x98, 0x07, 0x93, 0x12, 0x91, 0x2b, 0x75, 0x13, 0x16, 0x5d, 0x62, - 0xea, 0xb6, 0x51, 0x5c, 0xe0, 0xfb, 0x0b, 0x2e, 0x31, 0x8f, 0x0d, 0x64, 0xc0, 0x83, 0x0c, 0x96, - 0xa1, 0x70, 0x52, 0x38, 0xa5, 0x4a, 0x67, 0x0b, 0x6e, 0x72, 0x12, 0x7e, 0x8c, 0x98, 0x76, 0x7e, - 0x53, 0x20, 0x5f, 0xf7, 0xac, 0x9a, 0x61, 0x8c, 0xb4, 0x93, 0x9d, 0x84, 0xa0, 0xe1, 0xe6, 0x47, - 0x0d, 0xa7, 0x3e, 0x87, 0x6d, 0xa9, 0x75, 0x32, 0xe0, 0x3e, 0xfa, 0x8c, 0x1c, 0x12, 0x93, 0x88, - 0xf9, 0x22, 0x93, 0x30, 0x09, 0x82, 0x7e, 0x15, 0x05, 0x89, 0x72, 0x98, 0xd4, 0xe2, 0xfe, 0x1e, - 0xc5, 0xdd, 0x90, 0x85, 0xff, 0x5b, 0x7d, 0x06, 0x2b, 0x0e, 0xe5, 0xa3, 0x8f, 0x37, 0x61, 0x8e, - 0xab, 0x66, 0x3b, 0xa1, 0x44, 0x7a, 0x10, 0x40, 0x1a, 0x51, 0x3c, 0xfa, 0x19, 0x36, 0x04, 0x83, - 0xa6, 0x9f, 0x97, 0xeb, 0xa6, 0xe2, 0x29, 0xdc, 0x09, 0xbf, 0x73, 0xe4, 0xa8, 0xcf, 0x88, 0xcc, - 0x42, 0xc6, 0x29, 0xfa, 0x5d, 0x81, 0x7b, 0x69, 0xe1, 0x3f, 0x74, 0x16, 0x4c, 0xb8, 0x25, 0xeb, - 0x20, 0x94, 0x39, 0xdb, 0xd7, 0x97, 0x21, 0x3f, 0xaa, 0x72, 0x3b, 0x52, 0xfc, 0xf8, 0x36, 0xfa, - 0x25, 0xc8, 0xb6, 0x58, 0x7f, 0xe8, 0xcf, 0x7c, 0xab, 0xf0, 0xfb, 0xea, 0x05, 0x61, 0x27, 0x47, - 0xcd, 0xab, 0xd4, 0xfa, 0xaa, 0xbd, 0xff, 0x05, 0x68, 0xe2, 0x53, 0xf5, 0x94, 0x6b, 0x54, 0x26, - 0xe3, 0xae, 0x4c, 0x86, 0xc9, 0xc2, 0xc8, 0x5f, 0xf3, 0x31, 0xfb, 0x97, 0xc2, 0xef, 0xba, 0x18, - 0xab, 0x99, 0x7b, 0xfd, 0x11, 0xac, 0x8d, 0x02, 0x47, 0x32, 0xb7, 0x1a, 0xee, 0x9e, 0xf8, 0x29, - 0xac, 0xc0, 0xed, 0x6c, 0x8e, 0x05, 0x9a, 0x60, 0xf7, 0x1a, 0x56, 0x05, 0x39, 0xff, 0x62, 0x7e, - 0xe9, 0xda, 0x33, 0x6a, 0xa3, 0x04, 0x40, 0xc9, 0x40, 0xda, 0xca, 0x28, 0x91, 0x1d, 0xf4, 0x0c, - 0x36, 0xc7, 0xdc, 0x4f, 0x94, 0xc4, 0x3a, 0xe4, 0xfa, 0xae, 0x2d, 0xfd, 0xfb, 0x3f, 0xd1, 0x37, - 0x7c, 0x88, 0x35, 0x1d, 0xcb, 0x3a, 0x23, 0xd7, 0xd2, 0xee, 0x68, 0x36, 0xe7, 0xa2, 0xb3, 0x19, - 0xfd, 0x21, 0x46, 0x53, 0xd4, 0xf3, 0xcc, 0x6a, 0x3d, 0x86, 0x42, 0x44, 0x7d, 0x91, 0xce, 0x98, - 0xa2, 0xd9, 0xa4, 0x15, 0x72, 0x79, 0xe3, 0x1c, 0x74, 0x30, 0xb5, 0x88, 0xa8, 0xf9, 0xe9, 0x80, - 0x12, 0xf7, 0x7f, 0x3f, 0x6f, 0x34, 0xb8, 0x49, 0xc9, 0x80, 0xfb, 0x92, 0x09, 0x08, 0xd7, 0xe8, - 0x47, 0x3e, 0x9b, 0x12, 0x31, 0x67, 0x7c, 0xbd, 0x44, 0x23, 0xcc, 0x8f, 0x47, 0xd8, 0x7b, 0xb7, - 0x04, 0xb9, 0xba, 0x67, 0xa9, 0x18, 0xf2, 0xf1, 0x37, 0x24, 0x8a, 0x27, 0x28, 0xf9, 0x1a, 0xd4, - 0x9e, 0x4c, 0xc7, 0x84, 0x64, 0x7f, 0x80, 0xb5, 0xd8, 0xcb, 0xf0, 0x61, 0xa6, 0x75, 0x00, 0xd1, - 0x3e, 0x9e, 0x0a, 0x09, 0xfd, 0xf7, 0x60, 0x23, 0xf5, 0x5d, 0xf1, 0x38, 0xc5, 0x45, 0x1a, 0x50, - 0xab, 0x5e, 0x11, 0x18, 0x46, 0x7c, 0x05, 0xb7, 0xc6, 0x2e, 0xef, 0x07, 0x29, 0x0e, 0xa2, 0x00, - 0xed, 0xf1, 0x14, 0x40, 0xe8, 0xd9, 0x82, 0x42, 0xf2, 0x42, 0xdc, 0x4d, 0xb7, 0x1e, 0x47, 0x69, - 0x9f, 0x5c, 0x05, 0x15, 0x06, 0x3a, 0x85, 0xe5, 0xd1, 0x9d, 0x73, 0x2f, 0x83, 0x1e, 0x3f, 0xd5, - 0x76, 0x27, 0x9d, 0x86, 0x0e, 0x31, 0xe4, 0xe3, 0xc3, 0x3d, 0x4d, 0x48, 0x31, 0x4c, 0xaa, 0x90, - 0xb2, 0xc6, 0x71, 0x03, 0x20, 0x32, 0x0c, 0xef, 0xa7, 0x5b, 0xca, 0x63, 0xed, 0xd1, 0xc4, 0xe3, - 0x68, 0x29, 0xc7, 0x46, 0x58, 0x5a, 0x29, 0xa3, 0x80, 0xd4, 0x52, 0xa6, 0x8e, 0x2a, 0x0b, 0x0a, - 0xc9, 0xa1, 0x91, 0x96, 0xcb, 0x04, 0x2a, 0xb5, 0x94, 0x99, 0xc3, 0x60, 0xff, 0xf8, 0xdd, 0x45, - 0x49, 0x79, 0x7f, 0x51, 0x52, 0xfe, 0xbd, 0x28, 0x29, 0x7f, 0x5e, 0x96, 0xe6, 0xde, 0x5f, 0x96, - 0xe6, 0xfe, 0xb9, 0x2c, 0xcd, 0x7d, 0x5b, 0xb5, 0x6c, 0xd6, 0xe9, 0xb7, 0x2a, 0x6d, 0xa7, 0x5b, - 0x65, 0x1d, 0xe2, 0x3b, 0x25, 0x6c, 0xe0, 0xb8, 0x6f, 0xaa, 0xc2, 0x7f, 0xf5, 0xbc, 0x1a, 0xfe, - 0xcd, 0x1d, 0xf6, 0x88, 0xd7, 0x5a, 0xe4, 0xff, 0x45, 0x3e, 0xfb, 0x2f, 0x00, 0x00, 0xff, 0xff, - 0xe4, 0xf7, 0x19, 0x07, 0xfe, 0x0e, 0x00, 0x00, + // 1159 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4d, 0x6f, 0xdb, 0xb6, + 0x1b, 0x8f, 0xe2, 0x26, 0x6d, 0x9e, 0x34, 0x2f, 0x56, 0x93, 0xd6, 0x51, 0x5a, 0x37, 0x25, 0xd2, + 0x7f, 0xf3, 0x2f, 0x06, 0x7b, 0xc8, 0x86, 0x5e, 0x86, 0x02, 0xcd, 0x0b, 0x82, 0xe5, 0x90, 0x64, + 0x70, 0xdc, 0xad, 0xd8, 0xd6, 0x69, 0x8c, 0x45, 0x29, 0x42, 0x63, 0x4a, 0x90, 0xe8, 0x26, 0x06, + 0x36, 0x60, 0x3b, 0xec, 0xb6, 0xc3, 0x80, 0x1e, 0x77, 0xdc, 0x3e, 0xcc, 0x8e, 0x3d, 0xee, 0x38, + 0x24, 0x5f, 0x64, 0x10, 0x49, 0xc9, 0xb2, 0x44, 0xd9, 0x71, 0x56, 0xe4, 0x26, 0x92, 0xbf, 0xe7, + 0xfd, 0xf7, 0x3c, 0xa4, 0x0d, 0xf3, 0xd4, 0x66, 0x6d, 0xea, 0x04, 0x75, 0x76, 0x56, 0xf3, 0x03, + 0x8f, 0x79, 0xfa, 0x6c, 0xe8, 0x9e, 0x51, 0x9b, 0xd5, 0xe4, 0x81, 0xb1, 0x1c, 0x23, 0x3c, 0x6a, + 0xb6, 0x8e, 0xb1, 0x4b, 0x4d, 0x0b, 0x33, 0x2c, 0xc0, 0x06, 0x8a, 0x0f, 0x31, 0x63, 0x81, 0x7b, + 0xd4, 0x61, 0xc4, 0xb4, 0x88, 0xed, 0x52, 0x97, 0xb9, 0x1e, 0x95, 0x98, 0x47, 0x31, 0x86, 0xda, + 0xcc, 0xec, 0xe1, 0xde, 0xe2, 0x93, 0x0e, 0x91, 0x90, 0x25, 0xc7, 0xf3, 0x9c, 0x13, 0x52, 0xe7, + 0xab, 0xa3, 0x8e, 0x5d, 0xc7, 0xb4, 0x2b, 0x8e, 0xd0, 0x2b, 0xd0, 0xf7, 0x42, 0x67, 0x2b, 0x20, + 0x98, 0x91, 0xfd, 0x9d, 0xe6, 0x61, 0xeb, 0x98, 0xb4, 0xb1, 0x5e, 0x81, 0x9b, 0xad, 0x68, 0xcb, + 0x0b, 0x2a, 0xda, 0x8a, 0xb6, 0x36, 0xd5, 0x88, 0x97, 0xfa, 0x1a, 0xcc, 0x51, 0x9b, 0x09, 0xd8, + 0x26, 0x0e, 0xc9, 0xb3, 0x4f, 0x2b, 0xe3, 0x1c, 0x91, 0xdd, 0x46, 0x1f, 0x83, 0x91, 0xd7, 0xdc, + 0x20, 0xa1, 0xef, 0xd1, 0x90, 0xe8, 0x3a, 0xdc, 0x68, 0x79, 0x16, 0x91, 0xea, 0xf9, 0x37, 0x7a, + 0xa7, 0x41, 0x39, 0x11, 0xd9, 0x23, 0x0c, 0x47, 0x99, 0x18, 0xe0, 0xcb, 0x2a, 0xcc, 0x24, 0x46, + 0xb7, 0x22, 0x65, 0xc2, 0x93, 0xfe, 0xcd, 0x48, 0x9e, 0x79, 0x6f, 0x08, 0xdd, 0xb5, 0x2a, 0x25, + 0x21, 0x2f, 0x97, 0x91, 0xfc, 0x11, 0xf7, 0x75, 0x7f, 0xa7, 0xb9, 0x8d, 0x19, 0xae, 0xdc, 0x10, + 0xf2, 0x7d, 0x9b, 0xe8, 0x1b, 0x58, 0xca, 0x39, 0x95, 0x84, 0x91, 0x73, 0x41, 0x1b, 0xe2, 0xc2, + 0x78, 0x9f, 0x0b, 0xe8, 0x35, 0xcc, 0x1f, 0xf8, 0x84, 0x86, 0x04, 0x6f, 0xc4, 0x95, 0xd3, 0x1f, + 0x00, 0xb0, 0x00, 0xbb, 0xcc, 0x64, 0x5d, 0x3f, 0x56, 0x38, 0xc5, 0x77, 0x9a, 0x5d, 0x9f, 0xe8, + 0x4f, 0x61, 0x82, 0xd7, 0x96, 0xab, 0x9a, 0x5e, 0x5f, 0xa8, 0x89, 0xe2, 0xd6, 0xe2, 0xe2, 0xd6, + 0x36, 0x68, 0xb7, 0x21, 0x20, 0xe8, 0x5b, 0xa8, 0xbc, 0xf4, 0x2d, 0xcc, 0x88, 0x95, 0xb5, 0x12, + 0xea, 0x2f, 0x00, 0x12, 0xb6, 0x84, 0x15, 0x6d, 0xa5, 0xb4, 0x36, 0xbd, 0xbe, 0x52, 0xeb, 0x67, + 0x67, 0x2d, 0x2b, 0xd6, 0x48, 0xc9, 0x20, 0x1f, 0xca, 0xb1, 0xf6, 0xc0, 0x75, 0x5c, 0x1a, 0xa5, + 0x4b, 0xdf, 0x86, 0x9b, 0x9e, 0x10, 0xe2, 0xae, 0x4f, 0xaf, 0xaf, 0x65, 0x75, 0x16, 0x79, 0xf4, + 0xf9, 0x58, 0x23, 0x16, 0xdd, 0x5c, 0x84, 0x3b, 0x1d, 0x01, 0x33, 0x3d, 0xae, 0x9b, 0x77, 0x05, + 0xfa, 0x53, 0x83, 0x7b, 0x7b, 0xa1, 0xf3, 0x05, 0x09, 0x6c, 0x2f, 0x68, 0x6f, 0xb4, 0xa2, 0x36, + 0xd8, 0xec, 0x6e, 0x58, 0x6d, 0x97, 0x0e, 0xe0, 0xc9, 0xff, 0x38, 0x67, 0xcd, 0x90, 0x17, 0xc4, + 0x6c, 0x5d, 0x81, 0x29, 0x77, 0x61, 0x12, 0x73, 0x63, 0x92, 0x22, 0x72, 0xa5, 0x2f, 0xc2, 0x64, + 0x40, 0x6c, 0xd3, 0xb5, 0x2a, 0x13, 0x7c, 0x7f, 0x22, 0x20, 0xf6, 0xae, 0x85, 0x2c, 0x78, 0x58, + 0xe0, 0x65, 0x42, 0x1c, 0x85, 0x4f, 0x4a, 0xea, 0x2c, 0xc1, 0x2d, 0xee, 0x44, 0x64, 0x23, 0xc3, + 0x9d, 0x9f, 0x35, 0x98, 0xdb, 0x0b, 0x9d, 0x0d, 0xcb, 0xea, 0x71, 0xa7, 0x38, 0x09, 0x71, 0xc3, + 0x8d, 0xf7, 0x1a, 0x4e, 0x7f, 0x01, 0xcb, 0x92, 0xeb, 0xe4, 0x94, 0xeb, 0xe8, 0x30, 0xb2, 0x4d, + 0x6c, 0x22, 0xe6, 0x8b, 0x4c, 0xc2, 0x20, 0x08, 0xfa, 0x49, 0x14, 0x24, 0xed, 0xc3, 0xa0, 0x16, + 0x8f, 0xf6, 0x28, 0x6e, 0x27, 0x5e, 0x44, 0xdf, 0xfa, 0x73, 0x98, 0xf6, 0x28, 0x1f, 0x7d, 0xbc, + 0x09, 0x4b, 0x9c, 0x35, 0xcb, 0x39, 0x26, 0xd2, 0xad, 0x18, 0xd2, 0x48, 0xe3, 0xd1, 0x0f, 0xb0, + 0x20, 0x3c, 0x68, 0x46, 0x79, 0xb9, 0x6a, 0x2a, 0x9e, 0xc1, 0xdd, 0x24, 0xce, 0x9e, 0xa2, 0x0e, + 0x23, 0x32, 0x0b, 0x05, 0xa7, 0xe8, 0x17, 0x0d, 0xee, 0xab, 0xcc, 0x5f, 0x77, 0x16, 0x6c, 0xb8, + 0x2d, 0xeb, 0x20, 0x98, 0x39, 0x5a, 0xf4, 0x6b, 0x30, 0xd7, 0xab, 0x72, 0x2b, 0x55, 0xfc, 0xec, + 0x36, 0xfa, 0x31, 0xce, 0xb6, 0x58, 0x5f, 0x77, 0x98, 0xef, 0x34, 0x7e, 0x5f, 0x1d, 0x12, 0xb6, + 0xbf, 0xd3, 0xbc, 0x4c, 0xad, 0x2f, 0xdb, 0xfb, 0x9f, 0x81, 0x21, 0x42, 0x35, 0x15, 0xd7, 0xa8, + 0x4c, 0xc6, 0x3d, 0x99, 0x0c, 0x9b, 0x25, 0x96, 0xbf, 0xe4, 0x63, 0xf6, 0x77, 0x8d, 0xdf, 0x75, + 0x19, 0xaf, 0x46, 0xee, 0xf5, 0xc7, 0x30, 0xdb, 0x33, 0x9c, 0xca, 0xdc, 0x4c, 0xb2, 0xbb, 0x1f, + 0xa5, 0xb0, 0x06, 0x77, 0x8a, 0x7d, 0x2c, 0xd3, 0x9c, 0x77, 0xaf, 0x61, 0x46, 0x38, 0x17, 0x5d, + 0xcc, 0x2f, 0x03, 0x77, 0x44, 0x6e, 0x54, 0x01, 0x28, 0x39, 0x95, 0xb2, 0xd2, 0x4a, 0x6a, 0x07, + 0x3d, 0x87, 0xc5, 0x3e, 0xf5, 0x03, 0x29, 0x31, 0x0f, 0xa5, 0x4e, 0xe0, 0x4a, 0xfd, 0xd1, 0x27, + 0xfa, 0x8a, 0x0f, 0xb1, 0xa6, 0xe7, 0x38, 0x27, 0xe4, 0x4a, 0xdc, 0xed, 0xcd, 0xe6, 0x52, 0x7a, + 0x36, 0xa3, 0x5f, 0xc5, 0x68, 0x4a, 0x6b, 0x1e, 0x99, 0xad, 0xbb, 0x50, 0x4e, 0xb1, 0x2f, 0xd5, + 0x19, 0x43, 0x38, 0x9b, 0x97, 0x42, 0x01, 0x6f, 0x9c, 0xad, 0x63, 0x4c, 0x1d, 0x22, 0x6a, 0x7e, + 0x70, 0x4a, 0x49, 0xf0, 0x9f, 0x9f, 0x37, 0x06, 0xdc, 0xa2, 0xe4, 0x94, 0xeb, 0x92, 0x09, 0x48, + 0xd6, 0xe8, 0x7b, 0x3e, 0x9b, 0x72, 0x36, 0x47, 0x7c, 0xbd, 0xa4, 0x2d, 0x8c, 0x67, 0x2c, 0x04, + 0xf1, 0x38, 0x38, 0xec, 0x86, 0x8c, 0xc8, 0xbb, 0xee, 0xc3, 0x44, 0x85, 0xa5, 0xae, 0x38, 0xaa, + 0x78, 0x2d, 0xa3, 0xca, 0xd9, 0x1c, 0x3d, 0xaa, 0xc4, 0xc2, 0x78, 0xc6, 0x42, 0x87, 0x33, 0xa7, + 0x41, 0xda, 0xde, 0x5b, 0x72, 0x8d, 0x81, 0xb5, 0xf8, 0xb3, 0x41, 0x65, 0xf6, 0xc3, 0xc5, 0xb6, + 0xfe, 0xc7, 0x14, 0x94, 0xf6, 0x42, 0x47, 0xc7, 0x30, 0x97, 0x7d, 0xf5, 0xa3, 0x2c, 0xa5, 0xf3, + 0xef, 0x77, 0xe3, 0xe9, 0x70, 0x4c, 0xe2, 0xec, 0x77, 0x30, 0x9b, 0x79, 0xcb, 0x3f, 0x2a, 0x94, + 0x8e, 0x21, 0xc6, 0xff, 0x87, 0x42, 0x12, 0xfd, 0x3e, 0x2c, 0x28, 0x5f, 0x82, 0x4f, 0x14, 0x2a, + 0x54, 0x40, 0xa3, 0x7e, 0x49, 0x60, 0x62, 0xf1, 0x15, 0xdc, 0xee, 0x7b, 0x6e, 0x3d, 0x54, 0x28, + 0x48, 0x03, 0x8c, 0x27, 0x43, 0x00, 0x89, 0x66, 0x07, 0xca, 0xf9, 0x27, 0xcc, 0xaa, 0x5a, 0xba, + 0x1f, 0x65, 0x7c, 0x74, 0x19, 0x54, 0x62, 0xe8, 0x00, 0xa6, 0x7a, 0xaf, 0x84, 0xfb, 0x05, 0xee, + 0xf1, 0x53, 0x63, 0x75, 0xd0, 0x69, 0xa2, 0x10, 0xc3, 0x5c, 0xf6, 0x3a, 0x56, 0x11, 0x29, 0x83, + 0x51, 0x12, 0xa9, 0xe8, 0x02, 0x6d, 0x00, 0xa4, 0xae, 0xaf, 0x07, 0x6a, 0x49, 0x79, 0x6c, 0x3c, + 0x1e, 0x78, 0x9c, 0x2e, 0x65, 0xdf, 0xa5, 0xa3, 0x2a, 0x65, 0x1a, 0xa0, 0x2c, 0xa5, 0xf2, 0x72, + 0x71, 0xa0, 0x9c, 0x1f, 0xf3, 0xaa, 0x5c, 0xe6, 0x50, 0xca, 0x52, 0x16, 0x8f, 0x6f, 0xc1, 0x99, + 0xcc, 0x80, 0x2a, 0x28, 0x5a, 0x3f, 0xaa, 0x88, 0x33, 0x05, 0x53, 0xc7, 0x87, 0x05, 0xe5, 0x30, + 0x54, 0xa5, 0x44, 0x05, 0x54, 0x36, 0xda, 0xa0, 0x39, 0xb7, 0xb9, 0xfb, 0xd7, 0x79, 0x55, 0x7b, + 0x7f, 0x5e, 0xd5, 0xfe, 0x39, 0xaf, 0x6a, 0xbf, 0x5d, 0x54, 0xc7, 0xde, 0x5f, 0x54, 0xc7, 0xfe, + 0xbe, 0xa8, 0x8e, 0x7d, 0x5d, 0x77, 0x5c, 0x76, 0xdc, 0x39, 0xaa, 0xb5, 0xbc, 0x76, 0x9d, 0x1d, + 0x93, 0x48, 0x2f, 0x61, 0xa7, 0x5e, 0xf0, 0xa6, 0x2e, 0x4c, 0xd4, 0xcf, 0xea, 0xc9, 0x7f, 0x2e, + 0x5d, 0x9f, 0x84, 0x47, 0x93, 0xfc, 0x87, 0xf1, 0x27, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xe7, + 0x16, 0x78, 0xb9, 0x8b, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1486,6 +1719,8 @@ type MsgClient interface { SetBaseUri(ctx context.Context, in *MsgSetBaseUri, opts ...grpc.CallOption) (*MsgSetBaseUriResponse, error) ToggleAction(ctx context.Context, in *MsgToggleAction, opts ...grpc.CallOption) (*MsgToggleActionResponse, error) ChangeSchemaOwner(ctx context.Context, in *MsgChangeSchemaOwner, opts ...grpc.CallOption) (*MsgChangeSchemaOwnerResponse, error) + AddSystemActioner(ctx context.Context, in *MsgAddSystemActioner, opts ...grpc.CallOption) (*MsgAddSystemActionerResponse, error) + RemoveSystemActioner(ctx context.Context, in *MsgRemoveSystemActioner, opts ...grpc.CallOption) (*MsgRemoveSystemActionerResponse, error) } type msgClient struct { @@ -1586,6 +1821,24 @@ func (c *msgClient) ChangeSchemaOwner(ctx context.Context, in *MsgChangeSchemaOw return out, nil } +func (c *msgClient) AddSystemActioner(ctx context.Context, in *MsgAddSystemActioner, opts ...grpc.CallOption) (*MsgAddSystemActionerResponse, error) { + out := new(MsgAddSystemActionerResponse) + err := c.cc.Invoke(ctx, "/sixnft.nftmngr.Msg/AddSystemActioner", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RemoveSystemActioner(ctx context.Context, in *MsgRemoveSystemActioner, opts ...grpc.CallOption) (*MsgRemoveSystemActionerResponse, error) { + out := new(MsgRemoveSystemActionerResponse) + err := c.cc.Invoke(ctx, "/sixnft.nftmngr.Msg/RemoveSystemActioner", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { CreateNFTSchema(context.Context, *MsgCreateNFTSchema) (*MsgCreateNFTSchemaResponse, error) @@ -1598,6 +1851,8 @@ type MsgServer interface { SetBaseUri(context.Context, *MsgSetBaseUri) (*MsgSetBaseUriResponse, error) ToggleAction(context.Context, *MsgToggleAction) (*MsgToggleActionResponse, error) ChangeSchemaOwner(context.Context, *MsgChangeSchemaOwner) (*MsgChangeSchemaOwnerResponse, error) + AddSystemActioner(context.Context, *MsgAddSystemActioner) (*MsgAddSystemActionerResponse, error) + RemoveSystemActioner(context.Context, *MsgRemoveSystemActioner) (*MsgRemoveSystemActionerResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1634,6 +1889,12 @@ func (*UnimplementedMsgServer) ToggleAction(ctx context.Context, req *MsgToggleA func (*UnimplementedMsgServer) ChangeSchemaOwner(ctx context.Context, req *MsgChangeSchemaOwner) (*MsgChangeSchemaOwnerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeSchemaOwner not implemented") } +func (*UnimplementedMsgServer) AddSystemActioner(ctx context.Context, req *MsgAddSystemActioner) (*MsgAddSystemActionerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddSystemActioner not implemented") +} +func (*UnimplementedMsgServer) RemoveSystemActioner(ctx context.Context, req *MsgRemoveSystemActioner) (*MsgRemoveSystemActionerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveSystemActioner not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1819,6 +2080,42 @@ func _Msg_ChangeSchemaOwner_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Msg_AddSystemActioner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddSystemActioner) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AddSystemActioner(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sixnft.nftmngr.Msg/AddSystemActioner", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AddSystemActioner(ctx, req.(*MsgAddSystemActioner)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RemoveSystemActioner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRemoveSystemActioner) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RemoveSystemActioner(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sixnft.nftmngr.Msg/RemoveSystemActioner", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RemoveSystemActioner(ctx, req.(*MsgRemoveSystemActioner)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "sixnft.nftmngr.Msg", HandlerType: (*MsgServer)(nil), @@ -1863,6 +2160,14 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "ChangeSchemaOwner", Handler: _Msg_ChangeSchemaOwner_Handler, }, + { + MethodName: "AddSystemActioner", + Handler: _Msg_AddSystemActioner_Handler, + }, + { + MethodName: "RemoveSystemActioner", + Handler: _Msg_RemoveSystemActioner_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "nftmngr/tx.proto", @@ -2872,48 +3177,210 @@ func (m *MsgChangeSchemaOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *MsgAddSystemActioner) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *MsgCreateNFTSchema) Size() (n int) { - if m == nil { - return 0 - } + +func (m *MsgAddSystemActioner) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddSystemActioner) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.Actioner) > 0 { + i -= len(m.Actioner) + copy(dAtA[i:], m.Actioner) + i = encodeVarintTx(dAtA, i, uint64(len(m.Actioner))) + i-- + dAtA[i] = 0x1a } - l = len(m.NftSchemaBase64) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.NftSchemaCode) > 0 { + i -= len(m.NftSchemaCode) + copy(dAtA[i:], m.NftSchemaCode) + i = encodeVarintTx(dAtA, i, uint64(len(m.NftSchemaCode))) + i-- + dAtA[i] = 0x12 } - return n + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *MsgCreateNFTSchemaResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Code) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) +func (m *MsgAddSystemActionerResponse) 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 n + return dAtA[:n], nil } -func (m *MsgCreateMetadata) Size() (n int) { +func (m *MsgAddSystemActionerResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddSystemActionerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Actioner) > 0 { + i -= len(m.Actioner) + copy(dAtA[i:], m.Actioner) + i = encodeVarintTx(dAtA, i, uint64(len(m.Actioner))) + i-- + dAtA[i] = 0x12 + } + if len(m.NftSchemaCode) > 0 { + i -= len(m.NftSchemaCode) + copy(dAtA[i:], m.NftSchemaCode) + i = encodeVarintTx(dAtA, i, uint64(len(m.NftSchemaCode))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRemoveSystemActioner) 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 *MsgRemoveSystemActioner) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveSystemActioner) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Actioner) > 0 { + i -= len(m.Actioner) + copy(dAtA[i:], m.Actioner) + i = encodeVarintTx(dAtA, i, uint64(len(m.Actioner))) + i-- + dAtA[i] = 0x1a + } + if len(m.NftSchemaCode) > 0 { + i -= len(m.NftSchemaCode) + copy(dAtA[i:], m.NftSchemaCode) + i = encodeVarintTx(dAtA, i, uint64(len(m.NftSchemaCode))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRemoveSystemActionerResponse) 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 *MsgRemoveSystemActionerResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveSystemActionerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Actioner) > 0 { + i -= len(m.Actioner) + copy(dAtA[i:], m.Actioner) + i = encodeVarintTx(dAtA, i, uint64(len(m.Actioner))) + i-- + dAtA[i] = 0x12 + } + if len(m.NftSchemaCode) > 0 { + i -= len(m.NftSchemaCode) + copy(dAtA[i:], m.NftSchemaCode) + i = encodeVarintTx(dAtA, i, uint64(len(m.NftSchemaCode))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCreateNFTSchema) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.NftSchemaBase64) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateNFTSchemaResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Code) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateMetadata) Size() (n int) { if m == nil { return 0 } @@ -3343,6 +3810,82 @@ func (m *MsgChangeSchemaOwnerResponse) Size() (n int) { return n } +func (m *MsgAddSystemActioner) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.NftSchemaCode) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Actioner) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgAddSystemActionerResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NftSchemaCode) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Actioner) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRemoveSystemActioner) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.NftSchemaCode) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Actioner) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRemoveSystemActionerResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NftSchemaCode) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Actioner) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4448,7 +4991,599 @@ func (m *MsgPerformActionByAdminResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAddAttribute) Unmarshal(dAtA []byte) error { +func (m *MsgAddAttribute) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddAttribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddAttribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Code = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Base64NewAttriuteDefenition", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Base64NewAttriuteDefenition = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddAttributeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddAttributeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddAttributeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Code = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OnchainData", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OnchainData == nil { + m.OnchainData = &OnChainData{} + } + if err := m.OnchainData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddTokenAttribute) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddTokenAttribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddTokenAttribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Code = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Base64NewTokenAttriute", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Base64NewTokenAttriute = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddTokenAttributeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddTokenAttributeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddTokenAttributeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Code = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OnchainData", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OnchainData == nil { + m.OnchainData = &OnChainData{} + } + if err := m.OnchainData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddAction) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4471,10 +5606,10 @@ func (m *MsgAddAttribute) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAddAttribute: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAddAction: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAddAttribute: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAddAction: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4543,7 +5678,7 @@ func (m *MsgAddAttribute) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Base64NewAttriuteDefenition", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Base64NewAction", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4571,7 +5706,7 @@ func (m *MsgAddAttribute) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Base64NewAttriuteDefenition = string(dAtA[iNdEx:postIndex]) + m.Base64NewAction = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4594,7 +5729,7 @@ func (m *MsgAddAttribute) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAddAttributeResponse) Unmarshal(dAtA []byte) error { +func (m *MsgAddActionResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4617,10 +5752,10 @@ func (m *MsgAddAttributeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAddAttributeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAddActionResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAddAttributeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAddActionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4744,7 +5879,7 @@ func (m *MsgAddAttributeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAddTokenAttribute) Unmarshal(dAtA []byte) error { +func (m *MsgSetNFTAttribute) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4767,10 +5902,10 @@ func (m *MsgAddTokenAttribute) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAddTokenAttribute: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSetNFTAttribute: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAddTokenAttribute: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSetNFTAttribute: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4807,7 +5942,7 @@ func (m *MsgAddTokenAttribute) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4835,11 +5970,11 @@ func (m *MsgAddTokenAttribute) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Code = string(dAtA[iNdEx:postIndex]) + m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Base64NewTokenAttriute", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Base64NftAttributeValue", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4867,7 +6002,7 @@ func (m *MsgAddTokenAttribute) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Base64NewTokenAttriute = string(dAtA[iNdEx:postIndex]) + m.Base64NftAttributeValue = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4890,7 +6025,7 @@ func (m *MsgAddTokenAttribute) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAddTokenAttributeResponse) Unmarshal(dAtA []byte) error { +func (m *MsgSetNFTAttributeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4913,15 +6048,15 @@ func (m *MsgAddTokenAttributeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAddTokenAttributeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSetNFTAttributeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAddTokenAttributeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSetNFTAttributeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4949,11 +6084,11 @@ func (m *MsgAddTokenAttributeResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Code = string(dAtA[iNdEx:postIndex]) + m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AttributeName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4981,13 +6116,13 @@ func (m *MsgAddTokenAttributeResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.AttributeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OnchainData", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NftAttributeValue", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -4997,27 +6132,23 @@ func (m *MsgAddTokenAttributeResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - if m.OnchainData == nil { - m.OnchainData = &OnChainData{} - } - if err := m.OnchainData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.NftAttributeValue = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5040,7 +6171,7 @@ func (m *MsgAddTokenAttributeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAddAction) Unmarshal(dAtA []byte) error { +func (m *MsgSetBaseUri) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5063,10 +6194,10 @@ func (m *MsgAddAction) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAddAction: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSetBaseUri: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAddAction: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSetBaseUri: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5135,7 +6266,7 @@ func (m *MsgAddAction) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Base64NewAction", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NewBaseUri", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5163,7 +6294,7 @@ func (m *MsgAddAction) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Base64NewAction = string(dAtA[iNdEx:postIndex]) + m.NewBaseUri = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5186,7 +6317,7 @@ func (m *MsgAddAction) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAddActionResponse) Unmarshal(dAtA []byte) error { +func (m *MsgSetBaseUriResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5209,10 +6340,10 @@ func (m *MsgAddActionResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAddActionResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSetBaseUriResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAddActionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSetBaseUriResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5249,7 +6380,7 @@ func (m *MsgAddActionResponse) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5277,43 +6408,7 @@ func (m *MsgAddActionResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OnchainData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OnchainData == nil { - m.OnchainData = &OnChainData{} - } - if err := m.OnchainData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Uri = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5336,7 +6431,7 @@ func (m *MsgAddActionResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSetNFTAttribute) Unmarshal(dAtA []byte) error { +func (m *MsgToggleAction) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5359,10 +6454,10 @@ func (m *MsgSetNFTAttribute) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSetNFTAttribute: wiretype end group for non-group") + return fmt.Errorf("proto: MsgToggleAction: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSetNFTAttribute: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgToggleAction: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5399,7 +6494,7 @@ func (m *MsgSetNFTAttribute) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5427,11 +6522,11 @@ func (m *MsgSetNFTAttribute) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) + m.Code = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Base64NftAttributeValue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5459,7 +6554,7 @@ func (m *MsgSetNFTAttribute) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Base64NftAttributeValue = string(dAtA[iNdEx:postIndex]) + m.Action = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5482,7 +6577,7 @@ func (m *MsgSetNFTAttribute) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSetNFTAttributeResponse) Unmarshal(dAtA []byte) error { +func (m *MsgToggleActionResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5505,15 +6600,15 @@ func (m *MsgSetNFTAttributeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSetNFTAttributeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgToggleActionResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSetNFTAttributeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgToggleActionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5541,11 +6636,11 @@ func (m *MsgSetNFTAttributeResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) + m.Code = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5573,13 +6668,13 @@ func (m *MsgSetNFTAttributeResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AttributeName = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NftAttributeValue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OnchainDataAction", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -5589,23 +6684,27 @@ func (m *MsgSetNFTAttributeResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.NftAttributeValue = string(dAtA[iNdEx:postIndex]) + if m.OnchainDataAction == nil { + m.OnchainDataAction = &OnChainData{} + } + if err := m.OnchainDataAction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -5628,7 +6727,7 @@ func (m *MsgSetNFTAttributeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSetBaseUri) Unmarshal(dAtA []byte) error { +func (m *MsgChangeSchemaOwner) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5651,10 +6750,10 @@ func (m *MsgSetBaseUri) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSetBaseUri: wiretype end group for non-group") + return fmt.Errorf("proto: MsgChangeSchemaOwner: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSetBaseUri: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgChangeSchemaOwner: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5691,7 +6790,7 @@ func (m *MsgSetBaseUri) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5719,11 +6818,11 @@ func (m *MsgSetBaseUri) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Code = string(dAtA[iNdEx:postIndex]) + m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewBaseUri", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NewOwner", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5751,7 +6850,7 @@ func (m *MsgSetBaseUri) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NewBaseUri = string(dAtA[iNdEx:postIndex]) + m.NewOwner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5774,7 +6873,7 @@ func (m *MsgSetBaseUri) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSetBaseUriResponse) Unmarshal(dAtA []byte) error { +func (m *MsgChangeSchemaOwnerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5797,15 +6896,15 @@ func (m *MsgSetBaseUriResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSetBaseUriResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgChangeSchemaOwnerResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSetBaseUriResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgChangeSchemaOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5833,11 +6932,11 @@ func (m *MsgSetBaseUriResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Code = string(dAtA[iNdEx:postIndex]) + m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NewOwner", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5865,7 +6964,7 @@ func (m *MsgSetBaseUriResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Uri = string(dAtA[iNdEx:postIndex]) + m.NewOwner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5888,7 +6987,7 @@ func (m *MsgSetBaseUriResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgToggleAction) Unmarshal(dAtA []byte) error { +func (m *MsgAddSystemActioner) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5911,10 +7010,10 @@ func (m *MsgToggleAction) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgToggleAction: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAddSystemActioner: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgToggleAction: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAddSystemActioner: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5951,7 +7050,7 @@ func (m *MsgToggleAction) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5979,11 +7078,11 @@ func (m *MsgToggleAction) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Code = string(dAtA[iNdEx:postIndex]) + m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Actioner", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6011,7 +7110,7 @@ func (m *MsgToggleAction) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Action = string(dAtA[iNdEx:postIndex]) + m.Actioner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -6034,7 +7133,7 @@ func (m *MsgToggleAction) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgToggleActionResponse) Unmarshal(dAtA []byte) error { +func (m *MsgAddSystemActionerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6057,15 +7156,15 @@ func (m *MsgToggleActionResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgToggleActionResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAddSystemActionerResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgToggleActionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAddSystemActionerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NftSchemaCode", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6093,11 +7192,11 @@ func (m *MsgToggleActionResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Code = string(dAtA[iNdEx:postIndex]) + m.NftSchemaCode = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Actioner", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6125,43 +7224,7 @@ func (m *MsgToggleActionResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OnchainDataAction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OnchainDataAction == nil { - m.OnchainDataAction = &OnChainData{} - } - if err := m.OnchainDataAction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Actioner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -6184,7 +7247,7 @@ func (m *MsgToggleActionResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgChangeSchemaOwner) Unmarshal(dAtA []byte) error { +func (m *MsgRemoveSystemActioner) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6207,10 +7270,10 @@ func (m *MsgChangeSchemaOwner) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgChangeSchemaOwner: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRemoveSystemActioner: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgChangeSchemaOwner: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRemoveSystemActioner: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6279,7 +7342,7 @@ func (m *MsgChangeSchemaOwner) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewOwner", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Actioner", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6307,7 +7370,7 @@ func (m *MsgChangeSchemaOwner) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NewOwner = string(dAtA[iNdEx:postIndex]) + m.Actioner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -6330,7 +7393,7 @@ func (m *MsgChangeSchemaOwner) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgChangeSchemaOwnerResponse) Unmarshal(dAtA []byte) error { +func (m *MsgRemoveSystemActionerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6353,10 +7416,10 @@ func (m *MsgChangeSchemaOwnerResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgChangeSchemaOwnerResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRemoveSystemActionerResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgChangeSchemaOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRemoveSystemActionerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6393,7 +7456,7 @@ func (m *MsgChangeSchemaOwnerResponse) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewOwner", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Actioner", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6421,7 +7484,7 @@ func (m *MsgChangeSchemaOwnerResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NewOwner = string(dAtA[iNdEx:postIndex]) + m.Actioner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex