diff --git a/java/Makefile b/java/Makefile index 9eb0da3..5711577 100644 --- a/java/Makefile +++ b/java/Makefile @@ -1,14 +1,9 @@ -all: init proto-gen format - -init: - @echo "Pull External Protofiles" - git submodule init - git submodule update +all: proto-gen format proto-gen: @echo "Generating Protobuf files" ./gradlew cleanProto generateProto publish: - @echo "Publish Protobuf Artifacts" - ./gradlew publish + @echo "Publish Protobuf Artifacts" + ./gradlew publish diff --git a/java/build.gradle.kts b/java/build.gradle.kts index b02bdeb..1886fa7 100644 --- a/java/build.gradle.kts +++ b/java/build.gradle.kts @@ -30,8 +30,7 @@ allprojects { sourceSets { main { proto { - srcDir("${rootProject.rootDir.parent}/terrad/third_party/proto") - srcDir("${rootProject.rootDir.parent}/terrad/proto") + srcDir("${rootProject.rootDir.parent}/proto") } } } @@ -65,7 +64,7 @@ allprojects { pom { name.set(project.name) description.set("Terra Core Protobuf Builds") - url.set("https://github.com/classic-terra/terra.proto") + url.set("https://github.com/terra-money/terra.proto") licenses { license { name.set("The Apache License, Version 2.0") @@ -79,9 +78,9 @@ allprojects { } } scm { - connection.set("scm:git:git://github.com/classic-terra/terra.proto.git") - developerConnection.set("scm:git:git://github.com/classic-terra/terra.proto.git") - url.set("https://github.com/classic-terra/terra.proto") + connection.set("scm:git:git://github.com/terra-money/terra.proto.git") + developerConnection.set("scm:git:git://github.com/terra-money/terra.proto.git") + url.set("https://github.com/terra-money/terra.proto") } } } diff --git a/java/src/main/java/terra/market/v1beta1/Market.java b/java/src/main/java/terra/market/v1beta1/Market.java index d7f893f..923d1ce 100644 --- a/java/src/main/java/terra/market/v1beta1/Market.java +++ b/java/src/main/java/terra/market/v1beta1/Market.java @@ -682,7 +682,7 @@ public terra.market.v1beta1.Market.Params getDefaultInstanceForType() { "\022k\n\024min_stability_spread\030\003 \001(\014BM\362\336\037\033yaml" + ":\"min_stability_spread\"\332\336\037&github.com/co" + "smos/cosmos-sdk/types.Dec\310\336\037\000:\010\350\240\037\001\230\240\037\000B" + - ",Z*github.com/terra-rebels/classic/x/market/" + + ",Z*github.com/terra-money/core/x/market/" + "typesb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor diff --git a/java/src/main/java/terra/market/v1beta1/QueryOuterClass.java b/java/src/main/java/terra/market/v1beta1/QueryOuterClass.java index 6837266..1d6189a 100644 --- a/java/src/main/java/terra/market/v1beta1/QueryOuterClass.java +++ b/java/src/main/java/terra/market/v1beta1/QueryOuterClass.java @@ -3626,7 +3626,7 @@ public terra.market.v1beta1.QueryOuterClass.QueryParamsResponse getDefaultInstan ".v1beta1.QueryParamsRequest\032).terra.mark" + "et.v1beta1.QueryParamsResponse\"$\202\323\344\223\002\036\022\034" + "/terra/market/v1beta1/paramsB,Z*github.c" + - "om/terra-rebels/classic/x/market/typesb\006prot" + + "om/terra-money/core/x/market/typesb\006prot" + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor diff --git a/java/src/main/java/terra/market/v1beta1/Tx.java b/java/src/main/java/terra/market/v1beta1/Tx.java index efbc7cb..16fffbc 100644 --- a/java/src/main/java/terra/market/v1beta1/Tx.java +++ b/java/src/main/java/terra/market/v1beta1/Tx.java @@ -3740,8 +3740,8 @@ public terra.market.v1beta1.Tx.MsgSwapSendResponse getDefaultInstanceForType() { "gSwap\032%.terra.market.v1beta1.MsgSwapResp" + "onse\022X\n\010SwapSend\022!.terra.market.v1beta1." + "MsgSwapSend\032).terra.market.v1beta1.MsgSw" + - "apSendResponseB,Z*github.com/terra-rebels" + - "/classic/x/market/typesb\006proto3" + "apSendResponseB,Z*github.com/terra-money" + + "/core/x/market/typesb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, diff --git a/java/src/main/java/terra/oracle/v1beta1/Genesis.java b/java/src/main/java/terra/oracle/v1beta1/Genesis.java index eb8633a..23c5222 100644 --- a/java/src/main/java/terra/oracle/v1beta1/Genesis.java +++ b/java/src/main/java/terra/oracle/v1beta1/Genesis.java @@ -5037,7 +5037,7 @@ public terra.oracle.v1beta1.Genesis.TobinTax getDefaultInstanceForType() { "address\030\001 \001(\t\022\024\n\014miss_counter\030\002 \001(\004\"\\\n\010T" + "obinTax\022\r\n\005denom\030\001 \001(\t\022A\n\ttobin_tax\030\002 \001(" + "\tB.\332\336\037&github.com/cosmos/cosmos-sdk/type" + - "s.Dec\310\336\037\000B,Z*github.com/terra-rebels/classic" + + "s.Dec\310\336\037\000B,Z*github.com/terra-money/core" + "/x/oracle/typesb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor diff --git a/java/src/main/java/terra/oracle/v1beta1/Oracle.java b/java/src/main/java/terra/oracle/v1beta1/Oracle.java index 9ab5e75..57f0301 100644 --- a/java/src/main/java/terra/oracle/v1beta1/Oracle.java +++ b/java/src/main/java/terra/oracle/v1beta1/Oracle.java @@ -4904,8 +4904,8 @@ public terra.oracle.v1beta1.Oracle.ExchangeRateTuple getDefaultInstanceForType() "\001 \001(\tB\020\362\336\037\014yaml:\"denom\"\022]\n\rexchange_rate" + "\030\002 \001(\tBF\362\336\037\024yaml:\"exchange_rate\"\332\336\037&gith" + "ub.com/cosmos/cosmos-sdk/types.Dec\310\336\037\000:\014" + - "\350\240\037\000\210\240\037\000\230\240\037\000B,Z*github.com/terra-rebels/c" + - "lassic/x/oracle/typesb\006proto3" + "\350\240\037\000\210\240\037\000\230\240\037\000B,Z*github.com/terra-money/c" + + "ore/x/oracle/typesb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, diff --git a/java/src/main/java/terra/oracle/v1beta1/Tx.java b/java/src/main/java/terra/oracle/v1beta1/Tx.java index 948c350..c651b20 100644 --- a/java/src/main/java/terra/oracle/v1beta1/Tx.java +++ b/java/src/main/java/terra/oracle/v1beta1/Tx.java @@ -3992,7 +3992,7 @@ public terra.oracle.v1beta1.Tx.MsgDelegateFeedConsentResponse getDefaultInstance "e\022y\n\023DelegateFeedConsent\022,.terra.oracle." + "v1beta1.MsgDelegateFeedConsent\0324.terra.o" + "racle.v1beta1.MsgDelegateFeedConsentResp" + - "onseB,Z*github.com/terra-rebels/classic/x/or" + + "onseB,Z*github.com/terra-money/core/x/or" + "acle/typesb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor diff --git a/java/src/main/java/terra/treasury/v1beta1/Genesis.java b/java/src/main/java/terra/treasury/v1beta1/Genesis.java index 2b54605..902d3cd 100644 --- a/java/src/main/java/terra/treasury/v1beta1/Genesis.java +++ b/java/src/main/java/terra/treasury/v1beta1/Genesis.java @@ -4157,7 +4157,7 @@ public terra.treasury.v1beta1.Genesis.EpochState getDefaultInstanceForType() { "com/cosmos/cosmos-sdk/types.Dec\310\336\037\000\022I\n\021t" + "otal_staked_luna\030\004 \001(\tB.\332\336\037&github.com/c" + "osmos/cosmos-sdk/types.Int\310\336\037\000B.Z,github" + - ".com/terra-rebels/classic/x/treasury/typesb\006" + + ".com/terra-money/core/x/treasury/typesb\006" + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor diff --git a/java/src/main/java/terra/treasury/v1beta1/QueryOuterClass.java b/java/src/main/java/terra/treasury/v1beta1/QueryOuterClass.java index d7d4527..6f1b9e9 100644 --- a/java/src/main/java/terra/treasury/v1beta1/QueryOuterClass.java +++ b/java/src/main/java/terra/treasury/v1beta1/QueryOuterClass.java @@ -9832,7 +9832,7 @@ public terra.treasury.v1beta1.QueryOuterClass.QueryParamsResponse getDefaultInst "ury.v1beta1.QueryParamsRequest\032+.terra.t" + "reasury.v1beta1.QueryParamsResponse\"&\202\323\344" + "\223\002 \022\036/terra/treasury/v1beta1/paramsB.Z,g" + - "ithub.com/terra-rebels/classic/x/treasury/ty" + + "ithub.com/terra-money/core/x/treasury/ty" + "pesb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor diff --git a/java/src/main/java/terra/treasury/v1beta1/Treasury.java b/java/src/main/java/terra/treasury/v1beta1/Treasury.java index 43b0539..b0d14d9 100644 --- a/java/src/main/java/terra/treasury/v1beta1/Treasury.java +++ b/java/src/main/java/terra/treasury/v1beta1/Treasury.java @@ -4106,8 +4106,8 @@ public terra.treasury.v1beta1.Treasury.EpochInitialIssuance getDefaultInstanceFo "EpochInitialIssuance\022p\n\010issuance\030\001 \003(\0132\031" + ".cosmos.base.v1beta1.CoinBC\362\336\037\017yaml:\"iss" + "uance\"\252\337\037(github.com/cosmos/cosmos-sdk/t" + - "ypes.Coins\310\336\037\000B.Z,github.com/terra-rebels" + - "/classic/x/treasury/typesb\006proto3" + "ypes.Coins\310\336\037\000B.Z,github.com/terra-money" + + "/core/x/treasury/typesb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, diff --git a/java/src/main/java/terra/wasm/v1beta1/Genesis.java b/java/src/main/java/terra/wasm/v1beta1/Genesis.java index 272cc5d..2335371 100644 --- a/java/src/main/java/terra/wasm/v1beta1/Genesis.java +++ b/java/src/main/java/terra/wasm/v1beta1/Genesis.java @@ -3858,7 +3858,7 @@ public terra.wasm.v1beta1.Genesis.Contract getDefaultInstanceForType() { "tract\022=\n\rcontract_info\030\001 \001(\0132 .terra.was" + "m.v1beta1.ContractInfoB\004\310\336\037\000\0227\n\016contract" + "_store\030\002 \003(\0132\031.terra.wasm.v1beta1.ModelB" + - "\004\310\336\037\000B*Z(github.com/terra-rebels/classic/x/w" + + "\004\310\336\037\000B*Z(github.com/terra-money/core/x/w" + "asm/typesb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor diff --git a/java/src/main/java/terra/wasm/v1beta1/Tx.java b/java/src/main/java/terra/wasm/v1beta1/Tx.java index 35f0c4b..f196da9 100644 --- a/java/src/main/java/terra/wasm/v1beta1/Tx.java +++ b/java/src/main/java/terra/wasm/v1beta1/Tx.java @@ -10834,8 +10834,8 @@ public terra.wasm.v1beta1.Tx.MsgClearContractAdminResponse getDefaultInstanceFor "ractAdminResponse\022r\n\022ClearContractAdmin\022" + ").terra.wasm.v1beta1.MsgClearContractAdm" + "in\0321.terra.wasm.v1beta1.MsgClearContract" + - "AdminResponseB*Z(github.com/terra-rebels/" + - "classic/x/wasm/typesb\006proto3" + "AdminResponseB*Z(github.com/terra-money/" + + "core/x/wasm/typesb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, diff --git a/java/src/main/java/terra/wasm/v1beta1/Wasm.java b/java/src/main/java/terra/wasm/v1beta1/Wasm.java index 1d5b331..28c87a3 100644 --- a/java/src/main/java/terra/wasm/v1beta1/Wasm.java +++ b/java/src/main/java/terra/wasm/v1beta1/Wasm.java @@ -2660,7 +2660,7 @@ public terra.wasm.v1beta1.Wasm.ContractInfo getDefaultInstanceForType() { "dmin\"\022-\n\007code_id\030\004 \001(\004B\034\362\336\037\016yaml:\"code_i" + "d\"\342\336\037\006CodeID\022A\n\010init_msg\030\005 \001(\014B/\362\336\037\017yaml" + ":\"init_msg\"\372\336\037\030encoding/json.RawMessage:" + - "\004\350\240\037\001B*Z(github.com/terra-rebels/classic/x/w" + + "\004\350\240\037\001B*Z(github.com/terra-money/core/x/w" + "asm/typesb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor diff --git a/js/Makefile b/js/Makefile index cf8e6da..8b1f96a 100644 --- a/js/Makefile +++ b/js/Makefile @@ -1,10 +1,6 @@ all: init proto-gen format init: - @echo "Pull External Protofiles" - git submodule init - git submodule update --remote - @echo "Install dependencies" npm i diff --git a/js/cosmwasm/wasm/v1/genesis.d.ts b/js/cosmwasm/wasm/v1/genesis.d.ts deleted file mode 100644 index 70ce1a5..0000000 --- a/js/cosmwasm/wasm/v1/genesis.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Params, CodeInfo, ContractInfo, Model } from "../../../cosmwasm/wasm/v1/types"; -import { MsgStoreCode, MsgInstantiateContract, MsgExecuteContract } from "../../../cosmwasm/wasm/v1/tx"; -export declare const protobufPackage = "cosmwasm.wasm.v1"; -/** GenesisState - genesis state of x/wasm */ -export interface GenesisState { - params?: Params; - codes: Code[]; - contracts: Contract[]; - sequences: Sequence[]; - genMsgs: GenesisState_GenMsgs[]; -} -/** - * GenMsgs define the messages that can be executed during genesis phase in - * order. The intention is to have more human readable data that is auditable. - */ -export interface GenesisState_GenMsgs { - storeCode?: MsgStoreCode | undefined; - instantiateContract?: MsgInstantiateContract | undefined; - executeContract?: MsgExecuteContract | undefined; -} -/** Code struct encompasses CodeInfo and CodeBytes */ -export interface Code { - codeId: Long; - codeInfo?: CodeInfo; - codeBytes: Uint8Array; - /** Pinned to wasmvm cache */ - pinned: boolean; -} -/** Contract struct encompasses ContractAddress, ContractInfo, and ContractState */ -export interface Contract { - contractAddress: string; - contractInfo?: ContractInfo; - contractState: Model[]; -} -/** Sequence key and value of an id generation counter */ -export interface Sequence { - idKey: Uint8Array; - value: Long; -} -export declare const GenesisState: { - encode(message: GenesisState, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GenesisState; - fromJSON(object: any): GenesisState; - toJSON(message: GenesisState): unknown; - fromPartial(object: DeepPartial): GenesisState; -}; -export declare const GenesisState_GenMsgs: { - encode(message: GenesisState_GenMsgs, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GenesisState_GenMsgs; - fromJSON(object: any): GenesisState_GenMsgs; - toJSON(message: GenesisState_GenMsgs): unknown; - fromPartial(object: DeepPartial): GenesisState_GenMsgs; -}; -export declare const Code: { - encode(message: Code, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Code; - fromJSON(object: any): Code; - toJSON(message: Code): unknown; - fromPartial(object: DeepPartial): Code; -}; -export declare const Contract: { - encode(message: Contract, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Contract; - fromJSON(object: any): Contract; - toJSON(message: Contract): unknown; - fromPartial(object: DeepPartial): Contract; -}; -export declare const Sequence: { - encode(message: Sequence, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Sequence; - fromJSON(object: any): Sequence; - toJSON(message: Sequence): unknown; - fromPartial(object: DeepPartial): Sequence; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined | Long; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/js/cosmwasm/wasm/v1/genesis.js b/js/cosmwasm/wasm/v1/genesis.js deleted file mode 100644 index c2c6ecb..0000000 --- a/js/cosmwasm/wasm/v1/genesis.js +++ /dev/null @@ -1,567 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Sequence = exports.Contract = exports.Code = exports.GenesisState_GenMsgs = exports.GenesisState = exports.protobufPackage = void 0; -/* eslint-disable */ -const long_1 = __importDefault(require("long")); -const minimal_1 = __importDefault(require("protobufjs/minimal")); -const types_1 = require("../../../cosmwasm/wasm/v1/types"); -const tx_1 = require("../../../cosmwasm/wasm/v1/tx"); -exports.protobufPackage = "cosmwasm.wasm.v1"; -const baseGenesisState = {}; -exports.GenesisState = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.params !== undefined) { - types_1.Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.codes) { - exports.Code.encode(v, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.contracts) { - exports.Contract.encode(v, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.sequences) { - exports.Sequence.encode(v, writer.uint32(34).fork()).ldelim(); - } - for (const v of message.genMsgs) { - exports.GenesisState_GenMsgs.encode(v, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseGenesisState); - message.codes = []; - message.contracts = []; - message.sequences = []; - message.genMsgs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = types_1.Params.decode(reader, reader.uint32()); - break; - case 2: - message.codes.push(exports.Code.decode(reader, reader.uint32())); - break; - case 3: - message.contracts.push(exports.Contract.decode(reader, reader.uint32())); - break; - case 4: - message.sequences.push(exports.Sequence.decode(reader, reader.uint32())); - break; - case 5: - message.genMsgs.push(exports.GenesisState_GenMsgs.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseGenesisState); - message.codes = []; - message.contracts = []; - message.sequences = []; - message.genMsgs = []; - if (object.params !== undefined && object.params !== null) { - message.params = types_1.Params.fromJSON(object.params); - } - else { - message.params = undefined; - } - if (object.codes !== undefined && object.codes !== null) { - for (const e of object.codes) { - message.codes.push(exports.Code.fromJSON(e)); - } - } - if (object.contracts !== undefined && object.contracts !== null) { - for (const e of object.contracts) { - message.contracts.push(exports.Contract.fromJSON(e)); - } - } - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(exports.Sequence.fromJSON(e)); - } - } - if (object.genMsgs !== undefined && object.genMsgs !== null) { - for (const e of object.genMsgs) { - message.genMsgs.push(exports.GenesisState_GenMsgs.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.params !== undefined && (obj.params = message.params ? types_1.Params.toJSON(message.params) : undefined); - if (message.codes) { - obj.codes = message.codes.map((e) => (e ? exports.Code.toJSON(e) : undefined)); - } - else { - obj.codes = []; - } - if (message.contracts) { - obj.contracts = message.contracts.map((e) => (e ? exports.Contract.toJSON(e) : undefined)); - } - else { - obj.contracts = []; - } - if (message.sequences) { - obj.sequences = message.sequences.map((e) => (e ? exports.Sequence.toJSON(e) : undefined)); - } - else { - obj.sequences = []; - } - if (message.genMsgs) { - obj.genMsgs = message.genMsgs.map((e) => (e ? exports.GenesisState_GenMsgs.toJSON(e) : undefined)); - } - else { - obj.genMsgs = []; - } - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseGenesisState); - message.codes = []; - message.contracts = []; - message.sequences = []; - message.genMsgs = []; - if (object.params !== undefined && object.params !== null) { - message.params = types_1.Params.fromPartial(object.params); - } - else { - message.params = undefined; - } - if (object.codes !== undefined && object.codes !== null) { - for (const e of object.codes) { - message.codes.push(exports.Code.fromPartial(e)); - } - } - if (object.contracts !== undefined && object.contracts !== null) { - for (const e of object.contracts) { - message.contracts.push(exports.Contract.fromPartial(e)); - } - } - if (object.sequences !== undefined && object.sequences !== null) { - for (const e of object.sequences) { - message.sequences.push(exports.Sequence.fromPartial(e)); - } - } - if (object.genMsgs !== undefined && object.genMsgs !== null) { - for (const e of object.genMsgs) { - message.genMsgs.push(exports.GenesisState_GenMsgs.fromPartial(e)); - } - } - return message; - }, -}; -const baseGenesisState_GenMsgs = {}; -exports.GenesisState_GenMsgs = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.storeCode !== undefined) { - tx_1.MsgStoreCode.encode(message.storeCode, writer.uint32(10).fork()).ldelim(); - } - if (message.instantiateContract !== undefined) { - tx_1.MsgInstantiateContract.encode(message.instantiateContract, writer.uint32(18).fork()).ldelim(); - } - if (message.executeContract !== undefined) { - tx_1.MsgExecuteContract.encode(message.executeContract, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseGenesisState_GenMsgs); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.storeCode = tx_1.MsgStoreCode.decode(reader, reader.uint32()); - break; - case 2: - message.instantiateContract = tx_1.MsgInstantiateContract.decode(reader, reader.uint32()); - break; - case 3: - message.executeContract = tx_1.MsgExecuteContract.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseGenesisState_GenMsgs); - if (object.storeCode !== undefined && object.storeCode !== null) { - message.storeCode = tx_1.MsgStoreCode.fromJSON(object.storeCode); - } - else { - message.storeCode = undefined; - } - if (object.instantiateContract !== undefined && object.instantiateContract !== null) { - message.instantiateContract = tx_1.MsgInstantiateContract.fromJSON(object.instantiateContract); - } - else { - message.instantiateContract = undefined; - } - if (object.executeContract !== undefined && object.executeContract !== null) { - message.executeContract = tx_1.MsgExecuteContract.fromJSON(object.executeContract); - } - else { - message.executeContract = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.storeCode !== undefined && - (obj.storeCode = message.storeCode ? tx_1.MsgStoreCode.toJSON(message.storeCode) : undefined); - message.instantiateContract !== undefined && - (obj.instantiateContract = message.instantiateContract - ? tx_1.MsgInstantiateContract.toJSON(message.instantiateContract) - : undefined); - message.executeContract !== undefined && - (obj.executeContract = message.executeContract - ? tx_1.MsgExecuteContract.toJSON(message.executeContract) - : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseGenesisState_GenMsgs); - if (object.storeCode !== undefined && object.storeCode !== null) { - message.storeCode = tx_1.MsgStoreCode.fromPartial(object.storeCode); - } - else { - message.storeCode = undefined; - } - if (object.instantiateContract !== undefined && object.instantiateContract !== null) { - message.instantiateContract = tx_1.MsgInstantiateContract.fromPartial(object.instantiateContract); - } - else { - message.instantiateContract = undefined; - } - if (object.executeContract !== undefined && object.executeContract !== null) { - message.executeContract = tx_1.MsgExecuteContract.fromPartial(object.executeContract); - } - else { - message.executeContract = undefined; - } - return message; - }, -}; -const baseCode = { codeId: long_1.default.UZERO, pinned: false }; -exports.Code = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (!message.codeId.isZero()) { - writer.uint32(8).uint64(message.codeId); - } - if (message.codeInfo !== undefined) { - types_1.CodeInfo.encode(message.codeInfo, writer.uint32(18).fork()).ldelim(); - } - if (message.codeBytes.length !== 0) { - writer.uint32(26).bytes(message.codeBytes); - } - if (message.pinned === true) { - writer.uint32(32).bool(message.pinned); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseCode); - message.codeBytes = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.codeInfo = types_1.CodeInfo.decode(reader, reader.uint32()); - break; - case 3: - message.codeBytes = reader.bytes(); - break; - case 4: - message.pinned = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseCode); - message.codeBytes = new Uint8Array(); - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = long_1.default.fromString(object.codeId); - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.codeInfo !== undefined && object.codeInfo !== null) { - message.codeInfo = types_1.CodeInfo.fromJSON(object.codeInfo); - } - else { - message.codeInfo = undefined; - } - if (object.codeBytes !== undefined && object.codeBytes !== null) { - message.codeBytes = bytesFromBase64(object.codeBytes); - } - if (object.pinned !== undefined && object.pinned !== null) { - message.pinned = Boolean(object.pinned); - } - else { - message.pinned = false; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = (message.codeId || long_1.default.UZERO).toString()); - message.codeInfo !== undefined && - (obj.codeInfo = message.codeInfo ? types_1.CodeInfo.toJSON(message.codeInfo) : undefined); - message.codeBytes !== undefined && - (obj.codeBytes = base64FromBytes(message.codeBytes !== undefined ? message.codeBytes : new Uint8Array())); - message.pinned !== undefined && (obj.pinned = message.pinned); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseCode); - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.codeInfo !== undefined && object.codeInfo !== null) { - message.codeInfo = types_1.CodeInfo.fromPartial(object.codeInfo); - } - else { - message.codeInfo = undefined; - } - if (object.codeBytes !== undefined && object.codeBytes !== null) { - message.codeBytes = object.codeBytes; - } - else { - message.codeBytes = new Uint8Array(); - } - if (object.pinned !== undefined && object.pinned !== null) { - message.pinned = object.pinned; - } - else { - message.pinned = false; - } - return message; - }, -}; -const baseContract = { contractAddress: "" }; -exports.Contract = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.contractAddress !== "") { - writer.uint32(10).string(message.contractAddress); - } - if (message.contractInfo !== undefined) { - types_1.ContractInfo.encode(message.contractInfo, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.contractState) { - types_1.Model.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseContract); - message.contractState = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contractAddress = reader.string(); - break; - case 2: - message.contractInfo = types_1.ContractInfo.decode(reader, reader.uint32()); - break; - case 3: - message.contractState.push(types_1.Model.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseContract); - message.contractState = []; - if (object.contractAddress !== undefined && object.contractAddress !== null) { - message.contractAddress = String(object.contractAddress); - } - else { - message.contractAddress = ""; - } - if (object.contractInfo !== undefined && object.contractInfo !== null) { - message.contractInfo = types_1.ContractInfo.fromJSON(object.contractInfo); - } - else { - message.contractInfo = undefined; - } - if (object.contractState !== undefined && object.contractState !== null) { - for (const e of object.contractState) { - message.contractState.push(types_1.Model.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.contractAddress !== undefined && (obj.contractAddress = message.contractAddress); - message.contractInfo !== undefined && - (obj.contractInfo = message.contractInfo ? types_1.ContractInfo.toJSON(message.contractInfo) : undefined); - if (message.contractState) { - obj.contractState = message.contractState.map((e) => (e ? types_1.Model.toJSON(e) : undefined)); - } - else { - obj.contractState = []; - } - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseContract); - message.contractState = []; - if (object.contractAddress !== undefined && object.contractAddress !== null) { - message.contractAddress = object.contractAddress; - } - else { - message.contractAddress = ""; - } - if (object.contractInfo !== undefined && object.contractInfo !== null) { - message.contractInfo = types_1.ContractInfo.fromPartial(object.contractInfo); - } - else { - message.contractInfo = undefined; - } - if (object.contractState !== undefined && object.contractState !== null) { - for (const e of object.contractState) { - message.contractState.push(types_1.Model.fromPartial(e)); - } - } - return message; - }, -}; -const baseSequence = { value: long_1.default.UZERO }; -exports.Sequence = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.idKey.length !== 0) { - writer.uint32(10).bytes(message.idKey); - } - if (!message.value.isZero()) { - writer.uint32(16).uint64(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseSequence); - message.idKey = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.idKey = reader.bytes(); - break; - case 2: - message.value = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseSequence); - message.idKey = new Uint8Array(); - if (object.idKey !== undefined && object.idKey !== null) { - message.idKey = bytesFromBase64(object.idKey); - } - if (object.value !== undefined && object.value !== null) { - message.value = long_1.default.fromString(object.value); - } - else { - message.value = long_1.default.UZERO; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.idKey !== undefined && - (obj.idKey = base64FromBytes(message.idKey !== undefined ? message.idKey : new Uint8Array())); - message.value !== undefined && (obj.value = (message.value || long_1.default.UZERO).toString()); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseSequence); - if (object.idKey !== undefined && object.idKey !== null) { - message.idKey = object.idKey; - } - else { - message.idKey = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = long_1.default.UZERO; - } - return message; - }, -}; -var globalThis = (() => { - 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 = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - 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 = globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (const byte of arr) { - bin.push(String.fromCharCode(byte)); - } - return btoa(bin.join("")); -} -if (minimal_1.default.util.Long !== long_1.default) { - minimal_1.default.util.Long = long_1.default; - minimal_1.default.configure(); -} -//# sourceMappingURL=genesis.js.map \ No newline at end of file diff --git a/js/cosmwasm/wasm/v1/genesis.js.map b/js/cosmwasm/wasm/v1/genesis.js.map deleted file mode 100644 index 8a26bb9..0000000 --- a/js/cosmwasm/wasm/v1/genesis.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"genesis.js","sourceRoot":"","sources":["../../../../src/cosmwasm/wasm/v1/genesis.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,gDAAwB;AACxB,iEAAqC;AACrC,2DAAwF;AACxF,qDAAwG;AAE3F,QAAA,eAAe,GAAG,kBAAkB,CAAC;AA2ClD,MAAM,gBAAgB,GAAW,EAAE,CAAC;AAEvB,QAAA,YAAY,GAAG;IAC1B,MAAM,CAAC,OAAqB,EAAE,SAAqB,iBAAG,CAAC,MAAM,CAAC,MAAM,EAAE;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ode 100644 index 892c811..0000000 --- a/js/cosmwasm/wasm/v1/ibc.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -export declare const protobufPackage = "cosmwasm.wasm.v1"; -/** MsgIBCSend */ -export interface MsgIBCSend { - /** the channel by which the packet will be sent */ - channel: string; - /** - * Timeout height relative to the current block height. - * The timeout is disabled when set to 0. - */ - timeoutHeight: Long; - /** - * Timeout timestamp (in nanoseconds) relative to the current block timestamp. - * The timeout is disabled when set to 0. - */ - timeoutTimestamp: Long; - /** - * Data is the payload to transfer. We must not make assumption what format or - * content is in here. - */ - data: Uint8Array; -} -/** MsgIBCCloseChannel port and channel need to be owned by the contract */ -export interface MsgIBCCloseChannel { - channel: string; -} -export declare const MsgIBCSend: { - encode(message: MsgIBCSend, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgIBCSend; - fromJSON(object: any): MsgIBCSend; - toJSON(message: MsgIBCSend): unknown; - fromPartial(object: DeepPartial): MsgIBCSend; -}; -export declare const MsgIBCCloseChannel: { - encode(message: MsgIBCCloseChannel, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgIBCCloseChannel; - fromJSON(object: any): MsgIBCCloseChannel; - toJSON(message: MsgIBCCloseChannel): unknown; - fromPartial(object: DeepPartial): MsgIBCCloseChannel; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined | Long; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/js/cosmwasm/wasm/v1/ibc.js b/js/cosmwasm/wasm/v1/ibc.js deleted file mode 100644 index 22b5617..0000000 --- a/js/cosmwasm/wasm/v1/ibc.js +++ /dev/null @@ -1,204 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MsgIBCCloseChannel = exports.MsgIBCSend = exports.protobufPackage = void 0; -/* eslint-disable */ -const long_1 = __importDefault(require("long")); -const minimal_1 = __importDefault(require("protobufjs/minimal")); -exports.protobufPackage = "cosmwasm.wasm.v1"; -const baseMsgIBCSend = { channel: "", timeoutHeight: long_1.default.UZERO, timeoutTimestamp: long_1.default.UZERO }; -exports.MsgIBCSend = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.channel !== "") { - writer.uint32(18).string(message.channel); - } - if (!message.timeoutHeight.isZero()) { - writer.uint32(32).uint64(message.timeoutHeight); - } - if (!message.timeoutTimestamp.isZero()) { - writer.uint32(40).uint64(message.timeoutTimestamp); - } - if (message.data.length !== 0) { - writer.uint32(50).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMsgIBCSend); - message.data = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.channel = reader.string(); - break; - case 4: - message.timeoutHeight = reader.uint64(); - break; - case 5: - message.timeoutTimestamp = reader.uint64(); - break; - case 6: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseMsgIBCSend); - message.data = new Uint8Array(); - if (object.channel !== undefined && object.channel !== null) { - message.channel = String(object.channel); - } - else { - message.channel = ""; - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = long_1.default.fromString(object.timeoutHeight); - } - else { - message.timeoutHeight = long_1.default.UZERO; - } - if (object.timeoutTimestamp !== undefined && object.timeoutTimestamp !== null) { - message.timeoutTimestamp = long_1.default.fromString(object.timeoutTimestamp); - } - else { - message.timeoutTimestamp = long_1.default.UZERO; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.channel !== undefined && (obj.channel = message.channel); - message.timeoutHeight !== undefined && - (obj.timeoutHeight = (message.timeoutHeight || long_1.default.UZERO).toString()); - message.timeoutTimestamp !== undefined && - (obj.timeoutTimestamp = (message.timeoutTimestamp || long_1.default.UZERO).toString()); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseMsgIBCSend); - if (object.channel !== undefined && object.channel !== null) { - message.channel = object.channel; - } - else { - message.channel = ""; - } - if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { - message.timeoutHeight = object.timeoutHeight; - } - else { - message.timeoutHeight = long_1.default.UZERO; - } - if (object.timeoutTimestamp !== undefined && object.timeoutTimestamp !== null) { - message.timeoutTimestamp = object.timeoutTimestamp; - } - else { - message.timeoutTimestamp = long_1.default.UZERO; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseMsgIBCCloseChannel = { channel: "" }; -exports.MsgIBCCloseChannel = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.channel !== "") { - writer.uint32(18).string(message.channel); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMsgIBCCloseChannel); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.channel = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseMsgIBCCloseChannel); - if (object.channel !== undefined && object.channel !== null) { - message.channel = String(object.channel); - } - else { - message.channel = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.channel !== undefined && (obj.channel = message.channel); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseMsgIBCCloseChannel); - if (object.channel !== undefined && object.channel !== null) { - message.channel = object.channel; - } - else { - message.channel = ""; - } - return message; - }, -}; -var globalThis = (() => { - 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 = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - 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 = globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (const byte of arr) { - bin.push(String.fromCharCode(byte)); - } - return btoa(bin.join("")); -} -if (minimal_1.default.util.Long !== long_1.default) { - minimal_1.default.util.Long = long_1.default; - minimal_1.default.configure(); -} -//# sourceMappingURL=ibc.js.map \ No newline at end of file diff --git a/js/cosmwasm/wasm/v1/ibc.js.map b/js/cosmwasm/wasm/v1/ibc.js.map deleted file mode 100644 index 62f561a..0000000 --- a/js/cosmwasm/wasm/v1/ibc.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ibc.js","sourceRoot":"","sources":["../../../../src/cosmwasm/wasm/v1/ibc.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,gDAAwB;AACxB,iEAAqC;AAExB,QAAA,eAAe,GAAG,kBAAkB,CAAC;AA4BlD,MAAM,cAAc,GAAW,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,cAAI,CAAC,KAAK,EAAE,gBAAgB,EAAE,cAAI,CAAC,KAAK,EAAE,CAAC;AAE3F,QAAA,UAAU,GAAG;IACxB,MAAM,CAAC,OAAmB,EAAE,SAAqB,iBAAG,CAAC,MAAM,CAAC,MAAM,EAAE;QAClE,IAAI,OAAO,CAAC,OAAO,KAAK,EAAE,EAAE;YA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C,CAAC,CAAC;AACzF,SAAS,eAAe,CAAC,GAAe;IACtC,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,IAAI,IAAI,GAAG,EAAE;QACtB,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;KACrC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5B,CAAC;AAaD,IAAI,iBAAG,CAAC,IAAI,CAAC,IAAI,KAAK,cAAI,EAAE;IAC1B,iBAAG,CAAC,IAAI,CAAC,IAAI,GAAG,cAAW,CAAC;IAC5B,iBAAG,CAAC,SAAS,EAAE,CAAC;CACjB"} \ No newline at end of file diff --git a/js/cosmwasm/wasm/v1/proposal.d.ts b/js/cosmwasm/wasm/v1/proposal.d.ts deleted file mode 100644 index 78945b6..0000000 --- a/js/cosmwasm/wasm/v1/proposal.d.ts +++ /dev/null @@ -1,236 +0,0 @@ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { AccessConfig } from "../../../cosmwasm/wasm/v1/types"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmwasm.wasm.v1"; -/** StoreCodeProposal gov proposal content type to submit WASM code to the system */ -export interface StoreCodeProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - runAs: string; - /** WASMByteCode can be raw or gzip compressed */ - wasmByteCode: Uint8Array; - /** InstantiatePermission to apply on contract creation, optional */ - instantiatePermission?: AccessConfig; -} -/** - * InstantiateContractProposal gov proposal content type to instantiate a - * contract. - */ -export interface InstantiateContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - runAs: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** CodeID is the reference to the stored WASM code */ - codeId: Long; - /** Label is optional metadata to be stored with a constract instance. */ - label: string; - /** Msg json encoded message to be passed to the contract on instantiation */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: Coin[]; -} -/** MigrateContractProposal gov proposal content type to migrate a contract. */ -export interface MigrateContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; - /** CodeID references the new WASM code */ - codeId: Long; - /** Msg json encoded message to be passed to the contract on migration */ - msg: Uint8Array; -} -/** SudoContractProposal gov proposal content type to call sudo on a contract. */ -export interface SudoContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract as sudo */ - msg: Uint8Array; -} -/** - * ExecuteContractProposal gov proposal content type to call execute on a - * contract. - */ -export interface ExecuteContractProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** RunAs is the address that is passed to the contract's environment as sender */ - runAs: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract as execute */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: Coin[]; -} -/** UpdateAdminProposal gov proposal content type to set an admin for a contract. */ -export interface UpdateAdminProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** NewAdmin address to be set */ - newAdmin: string; - /** Contract is the address of the smart contract */ - contract: string; -} -/** - * ClearAdminProposal gov proposal content type to clear the admin of a - * contract. - */ -export interface ClearAdminProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** Contract is the address of the smart contract */ - contract: string; -} -/** - * PinCodesProposal gov proposal content type to pin a set of code ids in the - * wasmvm cache. - */ -export interface PinCodesProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** CodeIDs references the new WASM codes */ - codeIds: Long[]; -} -/** - * UnpinCodesProposal gov proposal content type to unpin a set of code ids in - * the wasmvm cache. - */ -export interface UnpinCodesProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** CodeIDs references the WASM codes */ - codeIds: Long[]; -} -/** - * AccessConfigUpdate contains the code id and the access config to be - * applied. - */ -export interface AccessConfigUpdate { - /** CodeID is the reference to the stored WASM code to be updated */ - codeId: Long; - /** InstantiatePermission to apply to the set of code ids */ - instantiatePermission?: AccessConfig; -} -/** - * UpdateInstantiateConfigProposal gov proposal content type to update - * instantiate config to a set of code ids. - */ -export interface UpdateInstantiateConfigProposal { - /** Title is a short summary */ - title: string; - /** Description is a human readable text */ - description: string; - /** - * AccessConfigUpdate contains the list of code ids and the access config - * to be applied. - */ - accessConfigUpdates: AccessConfigUpdate[]; -} -export declare const StoreCodeProposal: { - encode(message: StoreCodeProposal, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): StoreCodeProposal; - fromJSON(object: any): StoreCodeProposal; - toJSON(message: StoreCodeProposal): unknown; - fromPartial(object: DeepPartial): StoreCodeProposal; -}; -export declare const InstantiateContractProposal: { - encode(message: InstantiateContractProposal, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): InstantiateContractProposal; - fromJSON(object: any): InstantiateContractProposal; - toJSON(message: InstantiateContractProposal): unknown; - fromPartial(object: DeepPartial): InstantiateContractProposal; -}; -export declare const MigrateContractProposal: { - encode(message: MigrateContractProposal, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MigrateContractProposal; - fromJSON(object: any): MigrateContractProposal; - toJSON(message: MigrateContractProposal): unknown; - fromPartial(object: DeepPartial): MigrateContractProposal; -}; -export declare const SudoContractProposal: { - encode(message: SudoContractProposal, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SudoContractProposal; - fromJSON(object: any): SudoContractProposal; - toJSON(message: SudoContractProposal): unknown; - fromPartial(object: DeepPartial): SudoContractProposal; -}; -export declare const ExecuteContractProposal: { - encode(message: ExecuteContractProposal, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ExecuteContractProposal; - fromJSON(object: any): ExecuteContractProposal; - toJSON(message: ExecuteContractProposal): unknown; - fromPartial(object: DeepPartial): ExecuteContractProposal; -}; -export declare const UpdateAdminProposal: { - encode(message: UpdateAdminProposal, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UpdateAdminProposal; - fromJSON(object: any): UpdateAdminProposal; - toJSON(message: UpdateAdminProposal): unknown; - fromPartial(object: DeepPartial): UpdateAdminProposal; -}; -export declare const ClearAdminProposal: { - encode(message: ClearAdminProposal, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ClearAdminProposal; - fromJSON(object: any): ClearAdminProposal; - toJSON(message: ClearAdminProposal): unknown; - fromPartial(object: DeepPartial): ClearAdminProposal; -}; -export declare const PinCodesProposal: { - encode(message: PinCodesProposal, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): PinCodesProposal; - fromJSON(object: any): PinCodesProposal; - toJSON(message: PinCodesProposal): unknown; - fromPartial(object: DeepPartial): PinCodesProposal; -}; -export declare const UnpinCodesProposal: { - encode(message: UnpinCodesProposal, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UnpinCodesProposal; - fromJSON(object: any): UnpinCodesProposal; - toJSON(message: UnpinCodesProposal): unknown; - fromPartial(object: DeepPartial): UnpinCodesProposal; -}; -export declare const AccessConfigUpdate: { - encode(message: AccessConfigUpdate, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): AccessConfigUpdate; - fromJSON(object: any): AccessConfigUpdate; - toJSON(message: AccessConfigUpdate): unknown; - fromPartial(object: DeepPartial): AccessConfigUpdate; -}; -export declare const UpdateInstantiateConfigProposal: { - encode(message: UpdateInstantiateConfigProposal, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UpdateInstantiateConfigProposal; - fromJSON(object: any): UpdateInstantiateConfigProposal; - toJSON(message: UpdateInstantiateConfigProposal): unknown; - fromPartial(object: DeepPartial): UpdateInstantiateConfigProposal; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined | Long; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/js/cosmwasm/wasm/v1/proposal.js b/js/cosmwasm/wasm/v1/proposal.js deleted file mode 100644 index e0e98ba..0000000 --- a/js/cosmwasm/wasm/v1/proposal.js +++ /dev/null @@ -1,1334 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UpdateInstantiateConfigProposal = exports.AccessConfigUpdate = exports.UnpinCodesProposal = exports.PinCodesProposal = exports.ClearAdminProposal = exports.UpdateAdminProposal = exports.ExecuteContractProposal = exports.SudoContractProposal = exports.MigrateContractProposal = exports.InstantiateContractProposal = exports.StoreCodeProposal = exports.protobufPackage = void 0; -/* eslint-disable */ -const long_1 = __importDefault(require("long")); -const minimal_1 = __importDefault(require("protobufjs/minimal")); -const types_1 = require("../../../cosmwasm/wasm/v1/types"); -const coin_1 = require("../../../cosmos/base/v1beta1/coin"); -exports.protobufPackage = "cosmwasm.wasm.v1"; -const baseStoreCodeProposal = { title: "", description: "", runAs: "" }; -exports.StoreCodeProposal = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.runAs !== "") { - writer.uint32(26).string(message.runAs); - } - if (message.wasmByteCode.length !== 0) { - writer.uint32(34).bytes(message.wasmByteCode); - } - if (message.instantiatePermission !== undefined) { - types_1.AccessConfig.encode(message.instantiatePermission, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseStoreCodeProposal); - message.wasmByteCode = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.runAs = reader.string(); - break; - case 4: - message.wasmByteCode = reader.bytes(); - break; - case 7: - message.instantiatePermission = types_1.AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseStoreCodeProposal); - message.wasmByteCode = new Uint8Array(); - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.runAs !== undefined && object.runAs !== null) { - message.runAs = String(object.runAs); - } - else { - message.runAs = ""; - } - if (object.wasmByteCode !== undefined && object.wasmByteCode !== null) { - message.wasmByteCode = bytesFromBase64(object.wasmByteCode); - } - if (object.instantiatePermission !== undefined && object.instantiatePermission !== null) { - message.instantiatePermission = types_1.AccessConfig.fromJSON(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.runAs !== undefined && (obj.runAs = message.runAs); - message.wasmByteCode !== undefined && - (obj.wasmByteCode = base64FromBytes(message.wasmByteCode !== undefined ? message.wasmByteCode : new Uint8Array())); - message.instantiatePermission !== undefined && - (obj.instantiatePermission = message.instantiatePermission - ? types_1.AccessConfig.toJSON(message.instantiatePermission) - : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseStoreCodeProposal); - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.runAs !== undefined && object.runAs !== null) { - message.runAs = object.runAs; - } - else { - message.runAs = ""; - } - if (object.wasmByteCode !== undefined && object.wasmByteCode !== null) { - message.wasmByteCode = object.wasmByteCode; - } - else { - message.wasmByteCode = new Uint8Array(); - } - if (object.instantiatePermission !== undefined && object.instantiatePermission !== null) { - message.instantiatePermission = types_1.AccessConfig.fromPartial(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, -}; -const baseInstantiateContractProposal = { - title: "", - description: "", - runAs: "", - admin: "", - codeId: long_1.default.UZERO, - label: "", -}; -exports.InstantiateContractProposal = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.runAs !== "") { - writer.uint32(26).string(message.runAs); - } - if (message.admin !== "") { - writer.uint32(34).string(message.admin); - } - if (!message.codeId.isZero()) { - writer.uint32(40).uint64(message.codeId); - } - if (message.label !== "") { - writer.uint32(50).string(message.label); - } - if (message.msg.length !== 0) { - writer.uint32(58).bytes(message.msg); - } - for (const v of message.funds) { - coin_1.Coin.encode(v, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseInstantiateContractProposal); - message.funds = []; - message.msg = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.runAs = reader.string(); - break; - case 4: - message.admin = reader.string(); - break; - case 5: - message.codeId = reader.uint64(); - break; - case 6: - message.label = reader.string(); - break; - case 7: - message.msg = reader.bytes(); - break; - case 8: - message.funds.push(coin_1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseInstantiateContractProposal); - message.funds = []; - message.msg = new Uint8Array(); - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.runAs !== undefined && object.runAs !== null) { - message.runAs = String(object.runAs); - } - else { - message.runAs = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = String(object.admin); - } - else { - message.admin = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = long_1.default.fromString(object.codeId); - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.label !== undefined && object.label !== null) { - message.label = String(object.label); - } - else { - message.label = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(coin_1.Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.runAs !== undefined && (obj.runAs = message.runAs); - message.admin !== undefined && (obj.admin = message.admin); - message.codeId !== undefined && (obj.codeId = (message.codeId || long_1.default.UZERO).toString()); - message.label !== undefined && (obj.label = message.label); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - if (message.funds) { - obj.funds = message.funds.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined)); - } - else { - obj.funds = []; - } - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseInstantiateContractProposal); - message.funds = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.runAs !== undefined && object.runAs !== null) { - message.runAs = object.runAs; - } - else { - message.runAs = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = object.admin; - } - else { - message.admin = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(coin_1.Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseMigrateContractProposal = { title: "", description: "", contract: "", codeId: long_1.default.UZERO }; -exports.MigrateContractProposal = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.contract !== "") { - writer.uint32(34).string(message.contract); - } - if (!message.codeId.isZero()) { - writer.uint32(40).uint64(message.codeId); - } - if (message.msg.length !== 0) { - writer.uint32(50).bytes(message.msg); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMigrateContractProposal); - message.msg = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 4: - message.contract = reader.string(); - break; - case 5: - message.codeId = reader.uint64(); - break; - case 6: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseMigrateContractProposal); - message.msg = new Uint8Array(); - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = long_1.default.fromString(object.codeId); - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.contract !== undefined && (obj.contract = message.contract); - message.codeId !== undefined && (obj.codeId = (message.codeId || long_1.default.UZERO).toString()); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseMigrateContractProposal); - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - return message; - }, -}; -const baseSudoContractProposal = { title: "", description: "", contract: "" }; -exports.SudoContractProposal = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - if (message.msg.length !== 0) { - writer.uint32(34).bytes(message.msg); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseSudoContractProposal); - message.msg = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - case 4: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseSudoContractProposal); - message.msg = new Uint8Array(); - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.contract !== undefined && (obj.contract = message.contract); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseSudoContractProposal); - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - return message; - }, -}; -const baseExecuteContractProposal = { title: "", description: "", runAs: "", contract: "" }; -exports.ExecuteContractProposal = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.runAs !== "") { - writer.uint32(26).string(message.runAs); - } - if (message.contract !== "") { - writer.uint32(34).string(message.contract); - } - if (message.msg.length !== 0) { - writer.uint32(42).bytes(message.msg); - } - for (const v of message.funds) { - coin_1.Coin.encode(v, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseExecuteContractProposal); - message.funds = []; - message.msg = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.runAs = reader.string(); - break; - case 4: - message.contract = reader.string(); - break; - case 5: - message.msg = reader.bytes(); - break; - case 6: - message.funds.push(coin_1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseExecuteContractProposal); - message.funds = []; - message.msg = new Uint8Array(); - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.runAs !== undefined && object.runAs !== null) { - message.runAs = String(object.runAs); - } - else { - message.runAs = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(coin_1.Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.runAs !== undefined && (obj.runAs = message.runAs); - message.contract !== undefined && (obj.contract = message.contract); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - if (message.funds) { - obj.funds = message.funds.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined)); - } - else { - obj.funds = []; - } - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseExecuteContractProposal); - message.funds = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.runAs !== undefined && object.runAs !== null) { - message.runAs = object.runAs; - } - else { - message.runAs = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(coin_1.Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseUpdateAdminProposal = { title: "", description: "", newAdmin: "", contract: "" }; -exports.UpdateAdminProposal = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.newAdmin !== "") { - writer.uint32(26).string(message.newAdmin); - } - if (message.contract !== "") { - writer.uint32(34).string(message.contract); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseUpdateAdminProposal); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.newAdmin = reader.string(); - break; - case 4: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseUpdateAdminProposal); - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.newAdmin !== undefined && object.newAdmin !== null) { - message.newAdmin = String(object.newAdmin); - } - else { - message.newAdmin = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.newAdmin !== undefined && (obj.newAdmin = message.newAdmin); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseUpdateAdminProposal); - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.newAdmin !== undefined && object.newAdmin !== null) { - message.newAdmin = object.newAdmin; - } - else { - message.newAdmin = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - return message; - }, -}; -const baseClearAdminProposal = { title: "", description: "", contract: "" }; -exports.ClearAdminProposal = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseClearAdminProposal); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseClearAdminProposal); - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseClearAdminProposal); - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - return message; - }, -}; -const basePinCodesProposal = { title: "", description: "", codeIds: long_1.default.UZERO }; -exports.PinCodesProposal = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - writer.uint32(26).fork(); - for (const v of message.codeIds) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, basePinCodesProposal); - message.codeIds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.codeIds.push(reader.uint64()); - } - } - else { - message.codeIds.push(reader.uint64()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, basePinCodesProposal); - message.codeIds = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.codeIds !== undefined && object.codeIds !== null) { - for (const e of object.codeIds) { - message.codeIds.push(long_1.default.fromString(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - if (message.codeIds) { - obj.codeIds = message.codeIds.map((e) => (e || long_1.default.UZERO).toString()); - } - else { - obj.codeIds = []; - } - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, basePinCodesProposal); - message.codeIds = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.codeIds !== undefined && object.codeIds !== null) { - for (const e of object.codeIds) { - message.codeIds.push(e); - } - } - return message; - }, -}; -const baseUnpinCodesProposal = { title: "", description: "", codeIds: long_1.default.UZERO }; -exports.UnpinCodesProposal = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - writer.uint32(26).fork(); - for (const v of message.codeIds) { - writer.uint64(v); - } - writer.ldelim(); - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseUnpinCodesProposal); - message.codeIds = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if ((tag & 7) === 2) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.codeIds.push(reader.uint64()); - } - } - else { - message.codeIds.push(reader.uint64()); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseUnpinCodesProposal); - message.codeIds = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.codeIds !== undefined && object.codeIds !== null) { - for (const e of object.codeIds) { - message.codeIds.push(long_1.default.fromString(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - if (message.codeIds) { - obj.codeIds = message.codeIds.map((e) => (e || long_1.default.UZERO).toString()); - } - else { - obj.codeIds = []; - } - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseUnpinCodesProposal); - message.codeIds = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.codeIds !== undefined && object.codeIds !== null) { - for (const e of object.codeIds) { - message.codeIds.push(e); - } - } - return message; - }, -}; -const baseAccessConfigUpdate = { codeId: long_1.default.UZERO }; -exports.AccessConfigUpdate = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (!message.codeId.isZero()) { - writer.uint32(8).uint64(message.codeId); - } - if (message.instantiatePermission !== undefined) { - types_1.AccessConfig.encode(message.instantiatePermission, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseAccessConfigUpdate); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.instantiatePermission = types_1.AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseAccessConfigUpdate); - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = long_1.default.fromString(object.codeId); - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.instantiatePermission !== undefined && object.instantiatePermission !== null) { - message.instantiatePermission = types_1.AccessConfig.fromJSON(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = (message.codeId || long_1.default.UZERO).toString()); - message.instantiatePermission !== undefined && - (obj.instantiatePermission = message.instantiatePermission - ? types_1.AccessConfig.toJSON(message.instantiatePermission) - : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseAccessConfigUpdate); - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.instantiatePermission !== undefined && object.instantiatePermission !== null) { - message.instantiatePermission = types_1.AccessConfig.fromPartial(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, -}; -const baseUpdateInstantiateConfigProposal = { title: "", description: "" }; -exports.UpdateInstantiateConfigProposal = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.title !== "") { - writer.uint32(10).string(message.title); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - for (const v of message.accessConfigUpdates) { - exports.AccessConfigUpdate.encode(v, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseUpdateInstantiateConfigProposal); - message.accessConfigUpdates = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.accessConfigUpdates.push(exports.AccessConfigUpdate.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseUpdateInstantiateConfigProposal); - message.accessConfigUpdates = []; - if (object.title !== undefined && object.title !== null) { - message.title = String(object.title); - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = String(object.description); - } - else { - message.description = ""; - } - if (object.accessConfigUpdates !== undefined && object.accessConfigUpdates !== null) { - for (const e of object.accessConfigUpdates) { - message.accessConfigUpdates.push(exports.AccessConfigUpdate.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - if (message.accessConfigUpdates) { - obj.accessConfigUpdates = message.accessConfigUpdates.map((e) => e ? exports.AccessConfigUpdate.toJSON(e) : undefined); - } - else { - obj.accessConfigUpdates = []; - } - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseUpdateInstantiateConfigProposal); - message.accessConfigUpdates = []; - if (object.title !== undefined && object.title !== null) { - message.title = object.title; - } - else { - message.title = ""; - } - if (object.description !== undefined && object.description !== null) { - message.description = object.description; - } - else { - message.description = ""; - } - if (object.accessConfigUpdates !== undefined && object.accessConfigUpdates !== null) { - for (const e of object.accessConfigUpdates) { - message.accessConfigUpdates.push(exports.AccessConfigUpdate.fromPartial(e)); - } - } - return message; - }, -}; -var globalThis = (() => { - 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 = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - 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 = globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (const byte of arr) { - bin.push(String.fromCharCode(byte)); - } - return btoa(bin.join("")); -} -if (minimal_1.default.util.Long !== long_1.default) { - minimal_1.default.util.Long = long_1.default; - minimal_1.default.configure(); -} -//# sourceMappingURL=proposal.js.map \ No newline at end of file diff --git a/js/cosmwasm/wasm/v1/proposal.js.map b/js/cosmwasm/wasm/v1/proposal.js.map deleted file mode 100644 index a3217d6..0000000 --- a/js/cosmwasm/wasm/v1/proposal.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"proposal.js","sourceRoot":"","sources":["../../../../src/cosmwasm/wasm/v1/proposal.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,gDAAwB;AACxB,iEAAqC;AACrC,2DAA+D;AAC/D,4DAAyD;AAE5C,QAAA,eAAe,GAAG,kBAAkB,CAAC;AAkKlD,MAAM,qBAAqB,GAAW,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAEnE,QAAA,iBAAiB,G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ACrC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5B,CAAC;AAaD,IAAI,iBAAG,CAAC,IAAI,CAAC,IAAI,KAAK,cAAI,EAAE;IAC1B,iBAAG,CAAC,IAAI,CAAC,IAAI,GAAG,cAAW,CAAC;IAC5B,iBAAG,CAAC,SAAS,EAAE,CAAC;CACjB"} \ No newline at end of file diff --git a/js/cosmwasm/wasm/v1/query.d.ts b/js/cosmwasm/wasm/v1/query.d.ts deleted file mode 100644 index 896c438..0000000 --- a/js/cosmwasm/wasm/v1/query.d.ts +++ /dev/null @@ -1,364 +0,0 @@ -import Long from "long"; -import { grpc } from "@improbable-eng/grpc-web"; -import _m0 from "protobufjs/minimal"; -import { ContractInfo, AccessConfig, ContractCodeHistoryEntry, Model } from "../../../cosmwasm/wasm/v1/types"; -import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -export declare const protobufPackage = "cosmwasm.wasm.v1"; -/** - * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC - * method - */ -export interface QueryContractInfoRequest { - /** address is the address of the contract to query */ - address: string; -} -/** - * QueryContractInfoResponse is the response type for the Query/ContractInfo RPC - * method - */ -export interface QueryContractInfoResponse { - /** address is the address of the contract */ - address: string; - contractInfo?: ContractInfo; -} -/** - * QueryContractHistoryRequest is the request type for the Query/ContractHistory - * RPC method - */ -export interface QueryContractHistoryRequest { - /** address is the address of the contract to query */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest; -} -/** - * QueryContractHistoryResponse is the response type for the - * Query/ContractHistory RPC method - */ -export interface QueryContractHistoryResponse { - entries: ContractCodeHistoryEntry[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse; -} -/** - * QueryContractsByCodeRequest is the request type for the Query/ContractsByCode - * RPC method - */ -export interface QueryContractsByCodeRequest { - /** grpc-gateway_out does not support Go style CodID */ - codeId: Long; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest; -} -/** - * QueryContractsByCodeResponse is the response type for the - * Query/ContractsByCode RPC method - */ -export interface QueryContractsByCodeResponse { - /** contracts are a set of contract addresses */ - contracts: string[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse; -} -/** - * QueryAllContractStateRequest is the request type for the - * Query/AllContractState RPC method - */ -export interface QueryAllContractStateRequest { - /** address is the address of the contract */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest; -} -/** - * QueryAllContractStateResponse is the response type for the - * Query/AllContractState RPC method - */ -export interface QueryAllContractStateResponse { - models: Model[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse; -} -/** - * QueryRawContractStateRequest is the request type for the - * Query/RawContractState RPC method - */ -export interface QueryRawContractStateRequest { - /** address is the address of the contract */ - address: string; - queryData: Uint8Array; -} -/** - * QueryRawContractStateResponse is the response type for the - * Query/RawContractState RPC method - */ -export interface QueryRawContractStateResponse { - /** Data contains the raw store data */ - data: Uint8Array; -} -/** - * QuerySmartContractStateRequest is the request type for the - * Query/SmartContractState RPC method - */ -export interface QuerySmartContractStateRequest { - /** address is the address of the contract */ - address: string; - /** QueryData contains the query data passed to the contract */ - queryData: Uint8Array; -} -/** - * QuerySmartContractStateResponse is the response type for the - * Query/SmartContractState RPC method - */ -export interface QuerySmartContractStateResponse { - /** Data contains the json data returned from the smart contract */ - data: Uint8Array; -} -/** QueryCodeRequest is the request type for the Query/Code RPC method */ -export interface QueryCodeRequest { - /** grpc-gateway_out does not support Go style CodID */ - codeId: Long; -} -/** CodeInfoResponse contains code meta data from CodeInfo */ -export interface CodeInfoResponse { - /** id for legacy support */ - codeId: Long; - creator: string; - dataHash: Uint8Array; - instantiatePermission?: AccessConfig; -} -/** QueryCodeResponse is the response type for the Query/Code RPC method */ -export interface QueryCodeResponse { - codeInfo?: CodeInfoResponse; - data: Uint8Array; -} -/** QueryCodesRequest is the request type for the Query/Codes RPC method */ -export interface QueryCodesRequest { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest; -} -/** QueryCodesResponse is the response type for the Query/Codes RPC method */ -export interface QueryCodesResponse { - codeInfos: CodeInfoResponse[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse; -} -/** - * QueryPinnedCodesRequest is the request type for the Query/PinnedCodes - * RPC method - */ -export interface QueryPinnedCodesRequest { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest; -} -/** - * QueryPinnedCodesResponse is the response type for the - * Query/PinnedCodes RPC method - */ -export interface QueryPinnedCodesResponse { - codeIds: Long[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse; -} -export declare const QueryContractInfoRequest: { - encode(message: QueryContractInfoRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryContractInfoRequest; - fromJSON(object: any): QueryContractInfoRequest; - toJSON(message: QueryContractInfoRequest): unknown; - fromPartial(object: DeepPartial): QueryContractInfoRequest; -}; -export declare const QueryContractInfoResponse: { - encode(message: QueryContractInfoResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryContractInfoResponse; - fromJSON(object: any): QueryContractInfoResponse; - toJSON(message: QueryContractInfoResponse): unknown; - fromPartial(object: DeepPartial): QueryContractInfoResponse; -}; -export declare const QueryContractHistoryRequest: { - encode(message: QueryContractHistoryRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryContractHistoryRequest; - fromJSON(object: any): QueryContractHistoryRequest; - toJSON(message: QueryContractHistoryRequest): unknown; - fromPartial(object: DeepPartial): QueryContractHistoryRequest; -}; -export declare const QueryContractHistoryResponse: { - encode(message: QueryContractHistoryResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryContractHistoryResponse; - fromJSON(object: any): QueryContractHistoryResponse; - toJSON(message: QueryContractHistoryResponse): unknown; - fromPartial(object: DeepPartial): QueryContractHistoryResponse; -}; -export declare const QueryContractsByCodeRequest: { - encode(message: QueryContractsByCodeRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryContractsByCodeRequest; - fromJSON(object: any): QueryContractsByCodeRequest; - toJSON(message: QueryContractsByCodeRequest): unknown; - fromPartial(object: DeepPartial): QueryContractsByCodeRequest; -}; -export declare const QueryContractsByCodeResponse: { - encode(message: QueryContractsByCodeResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryContractsByCodeResponse; - fromJSON(object: any): QueryContractsByCodeResponse; - toJSON(message: QueryContractsByCodeResponse): unknown; - fromPartial(object: DeepPartial): QueryContractsByCodeResponse; -}; -export declare const QueryAllContractStateRequest: { - encode(message: QueryAllContractStateRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryAllContractStateRequest; - fromJSON(object: any): QueryAllContractStateRequest; - toJSON(message: QueryAllContractStateRequest): unknown; - fromPartial(object: DeepPartial): QueryAllContractStateRequest; -}; -export declare const QueryAllContractStateResponse: { - encode(message: QueryAllContractStateResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryAllContractStateResponse; - fromJSON(object: any): QueryAllContractStateResponse; - toJSON(message: QueryAllContractStateResponse): unknown; - fromPartial(object: DeepPartial): QueryAllContractStateResponse; -}; -export declare const QueryRawContractStateRequest: { - encode(message: QueryRawContractStateRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryRawContractStateRequest; - fromJSON(object: any): QueryRawContractStateRequest; - toJSON(message: QueryRawContractStateRequest): unknown; - fromPartial(object: DeepPartial): QueryRawContractStateRequest; -}; -export declare const QueryRawContractStateResponse: { - encode(message: QueryRawContractStateResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryRawContractStateResponse; - fromJSON(object: any): QueryRawContractStateResponse; - toJSON(message: QueryRawContractStateResponse): unknown; - fromPartial(object: DeepPartial): QueryRawContractStateResponse; -}; -export declare const QuerySmartContractStateRequest: { - encode(message: QuerySmartContractStateRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QuerySmartContractStateRequest; - fromJSON(object: any): QuerySmartContractStateRequest; - toJSON(message: QuerySmartContractStateRequest): unknown; - fromPartial(object: DeepPartial): QuerySmartContractStateRequest; -}; -export declare const QuerySmartContractStateResponse: { - encode(message: QuerySmartContractStateResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QuerySmartContractStateResponse; - fromJSON(object: any): QuerySmartContractStateResponse; - toJSON(message: QuerySmartContractStateResponse): unknown; - fromPartial(object: DeepPartial): QuerySmartContractStateResponse; -}; -export declare const QueryCodeRequest: { - encode(message: QueryCodeRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryCodeRequest; - fromJSON(object: any): QueryCodeRequest; - toJSON(message: QueryCodeRequest): unknown; - fromPartial(object: DeepPartial): QueryCodeRequest; -}; -export declare const CodeInfoResponse: { - encode(message: CodeInfoResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): CodeInfoResponse; - fromJSON(object: any): CodeInfoResponse; - toJSON(message: CodeInfoResponse): unknown; - fromPartial(object: DeepPartial): CodeInfoResponse; -}; -export declare const QueryCodeResponse: { - encode(message: QueryCodeResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryCodeResponse; - fromJSON(object: any): QueryCodeResponse; - toJSON(message: QueryCodeResponse): unknown; - fromPartial(object: DeepPartial): QueryCodeResponse; -}; -export declare const QueryCodesRequest: { - encode(message: QueryCodesRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryCodesRequest; - fromJSON(object: any): QueryCodesRequest; - toJSON(message: QueryCodesRequest): unknown; - fromPartial(object: DeepPartial): QueryCodesRequest; -}; -export declare const QueryCodesResponse: { - encode(message: QueryCodesResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryCodesResponse; - fromJSON(object: any): QueryCodesResponse; - toJSON(message: QueryCodesResponse): unknown; - fromPartial(object: DeepPartial): QueryCodesResponse; -}; -export declare const QueryPinnedCodesRequest: { - encode(message: QueryPinnedCodesRequest, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryPinnedCodesRequest; - fromJSON(object: any): QueryPinnedCodesRequest; - toJSON(message: QueryPinnedCodesRequest): unknown; - fromPartial(object: DeepPartial): QueryPinnedCodesRequest; -}; -export declare const QueryPinnedCodesResponse: { - encode(message: QueryPinnedCodesResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryPinnedCodesResponse; - fromJSON(object: any): QueryPinnedCodesResponse; - toJSON(message: QueryPinnedCodesResponse): unknown; - fromPartial(object: DeepPartial): QueryPinnedCodesResponse; -}; -/** Query provides defines the gRPC querier service */ -export interface Query { - /** ContractInfo gets the contract meta data */ - ContractInfo(request: DeepPartial, metadata?: grpc.Metadata): Promise; - /** ContractHistory gets the contract code history */ - ContractHistory(request: DeepPartial, metadata?: grpc.Metadata): Promise; - /** ContractsByCode lists all smart contracts for a code id */ - ContractsByCode(request: DeepPartial, metadata?: grpc.Metadata): Promise; - /** AllContractState gets all raw store data for a single contract */ - AllContractState(request: DeepPartial, metadata?: grpc.Metadata): Promise; - /** RawContractState gets single key from the raw store data of a contract */ - RawContractState(request: DeepPartial, metadata?: grpc.Metadata): Promise; - /** SmartContractState get smart query result from the contract */ - SmartContractState(request: DeepPartial, metadata?: grpc.Metadata): Promise; - /** Code gets the binary code and metadata for a singe wasm code */ - Code(request: DeepPartial, metadata?: grpc.Metadata): Promise; - /** Codes gets the metadata for all stored wasm codes */ - Codes(request: DeepPartial, metadata?: grpc.Metadata): Promise; - /** PinnedCodes gets the pinned code ids */ - PinnedCodes(request: DeepPartial, metadata?: grpc.Metadata): Promise; -} -export declare class QueryClientImpl implements Query { - private readonly rpc; - constructor(rpc: Rpc); - ContractInfo(request: DeepPartial, metadata?: grpc.Metadata): Promise; - ContractHistory(request: DeepPartial, metadata?: grpc.Metadata): Promise; - ContractsByCode(request: DeepPartial, metadata?: grpc.Metadata): Promise; - AllContractState(request: DeepPartial, metadata?: grpc.Metadata): Promise; - RawContractState(request: DeepPartial, metadata?: grpc.Metadata): Promise; - SmartContractState(request: DeepPartial, metadata?: grpc.Metadata): Promise; - Code(request: DeepPartial, metadata?: grpc.Metadata): Promise; - Codes(request: DeepPartial, metadata?: grpc.Metadata): Promise; - PinnedCodes(request: DeepPartial, metadata?: grpc.Metadata): Promise; -} -export declare const QueryDesc: { - serviceName: string; -}; -export declare const QueryContractInfoDesc: UnaryMethodDefinitionish; -export declare const QueryContractHistoryDesc: UnaryMethodDefinitionish; -export declare const QueryContractsByCodeDesc: UnaryMethodDefinitionish; -export declare const QueryAllContractStateDesc: UnaryMethodDefinitionish; -export declare const QueryRawContractStateDesc: UnaryMethodDefinitionish; -export declare const QuerySmartContractStateDesc: UnaryMethodDefinitionish; -export declare const QueryCodeDesc: UnaryMethodDefinitionish; -export declare const QueryCodesDesc: UnaryMethodDefinitionish; -export declare const QueryPinnedCodesDesc: UnaryMethodDefinitionish; -interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { - requestStream: any; - responseStream: any; -} -declare type UnaryMethodDefinitionish = UnaryMethodDefinitionishR; -interface Rpc { - unary(methodDesc: T, request: any, metadata: grpc.Metadata | undefined): Promise; -} -export declare class GrpcWebImpl { - private host; - private options; - constructor(host: string, options: { - transport?: grpc.TransportFactory; - debug?: boolean; - metadata?: grpc.Metadata; - }); - unary(methodDesc: T, _request: any, metadata: grpc.Metadata | undefined): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined | Long; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/js/cosmwasm/wasm/v1/query.js b/js/cosmwasm/wasm/v1/query.js deleted file mode 100644 index 0849f9e..0000000 --- a/js/cosmwasm/wasm/v1/query.js +++ /dev/null @@ -1,1597 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GrpcWebImpl = exports.QueryPinnedCodesDesc = exports.QueryCodesDesc = exports.QueryCodeDesc = exports.QuerySmartContractStateDesc = exports.QueryRawContractStateDesc = exports.QueryAllContractStateDesc = exports.QueryContractsByCodeDesc = exports.QueryContractHistoryDesc = exports.QueryContractInfoDesc = exports.QueryDesc = exports.QueryClientImpl = exports.QueryPinnedCodesResponse = exports.QueryPinnedCodesRequest = exports.QueryCodesResponse = exports.QueryCodesRequest = exports.QueryCodeResponse = exports.CodeInfoResponse = exports.QueryCodeRequest = exports.QuerySmartContractStateResponse = exports.QuerySmartContractStateRequest = exports.QueryRawContractStateResponse = exports.QueryRawContractStateRequest = exports.QueryAllContractStateResponse = exports.QueryAllContractStateRequest = exports.QueryContractsByCodeResponse = exports.QueryContractsByCodeRequest = exports.QueryContractHistoryResponse = exports.QueryContractHistoryRequest = exports.QueryContractInfoResponse = exports.QueryContractInfoRequest = exports.protobufPackage = void 0; -/* eslint-disable */ -const long_1 = __importDefault(require("long")); -const grpc_web_1 = require("@improbable-eng/grpc-web"); -const minimal_1 = __importDefault(require("protobufjs/minimal")); -const types_1 = require("../../../cosmwasm/wasm/v1/types"); -const pagination_1 = require("../../../cosmos/base/query/v1beta1/pagination"); -const browser_headers_1 = require("browser-headers"); -exports.protobufPackage = "cosmwasm.wasm.v1"; -const baseQueryContractInfoRequest = { address: "" }; -exports.QueryContractInfoRequest = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryContractInfoRequest); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryContractInfoRequest); - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryContractInfoRequest); - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - return message; - }, -}; -const baseQueryContractInfoResponse = { address: "" }; -exports.QueryContractInfoResponse = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.contractInfo !== undefined) { - types_1.ContractInfo.encode(message.contractInfo, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryContractInfoResponse); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.contractInfo = types_1.ContractInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryContractInfoResponse); - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.contractInfo !== undefined && object.contractInfo !== null) { - message.contractInfo = types_1.ContractInfo.fromJSON(object.contractInfo); - } - else { - message.contractInfo = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.contractInfo !== undefined && - (obj.contractInfo = message.contractInfo ? types_1.ContractInfo.toJSON(message.contractInfo) : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryContractInfoResponse); - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.contractInfo !== undefined && object.contractInfo !== null) { - message.contractInfo = types_1.ContractInfo.fromPartial(object.contractInfo); - } - else { - message.contractInfo = undefined; - } - return message; - }, -}; -const baseQueryContractHistoryRequest = { address: "" }; -exports.QueryContractHistoryRequest = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryContractHistoryRequest); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryContractHistoryRequest); - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && - (obj.pagination = message.pagination ? pagination_1.PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryContractHistoryRequest); - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryContractHistoryResponse = {}; -exports.QueryContractHistoryResponse = { - encode(message, writer = minimal_1.default.Writer.create()) { - for (const v of message.entries) { - types_1.ContractCodeHistoryEntry.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryContractHistoryResponse); - message.entries = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.entries.push(types_1.ContractCodeHistoryEntry.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryContractHistoryResponse); - message.entries = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(types_1.ContractCodeHistoryEntry.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.entries) { - obj.entries = message.entries.map((e) => (e ? types_1.ContractCodeHistoryEntry.toJSON(e) : undefined)); - } - else { - obj.entries = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination ? pagination_1.PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryContractHistoryResponse); - message.entries = []; - if (object.entries !== undefined && object.entries !== null) { - for (const e of object.entries) { - message.entries.push(types_1.ContractCodeHistoryEntry.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryContractsByCodeRequest = { codeId: long_1.default.UZERO }; -exports.QueryContractsByCodeRequest = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (!message.codeId.isZero()) { - writer.uint32(8).uint64(message.codeId); - } - if (message.pagination !== undefined) { - pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryContractsByCodeRequest); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryContractsByCodeRequest); - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = long_1.default.fromString(object.codeId); - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = (message.codeId || long_1.default.UZERO).toString()); - message.pagination !== undefined && - (obj.pagination = message.pagination ? pagination_1.PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryContractsByCodeRequest); - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryContractsByCodeResponse = { contracts: "" }; -exports.QueryContractsByCodeResponse = { - encode(message, writer = minimal_1.default.Writer.create()) { - for (const v of message.contracts) { - writer.uint32(10).string(v); - } - if (message.pagination !== undefined) { - pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryContractsByCodeResponse); - message.contracts = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contracts.push(reader.string()); - break; - case 2: - message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryContractsByCodeResponse); - message.contracts = []; - if (object.contracts !== undefined && object.contracts !== null) { - for (const e of object.contracts) { - message.contracts.push(String(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.contracts) { - obj.contracts = message.contracts.map((e) => e); - } - else { - obj.contracts = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination ? pagination_1.PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryContractsByCodeResponse); - message.contracts = []; - if (object.contracts !== undefined && object.contracts !== null) { - for (const e of object.contracts) { - message.contracts.push(e); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryAllContractStateRequest = { address: "" }; -exports.QueryAllContractStateRequest = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryAllContractStateRequest); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryAllContractStateRequest); - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && - (obj.pagination = message.pagination ? pagination_1.PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryAllContractStateRequest); - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryAllContractStateResponse = {}; -exports.QueryAllContractStateResponse = { - encode(message, writer = minimal_1.default.Writer.create()) { - for (const v of message.models) { - types_1.Model.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryAllContractStateResponse); - message.models = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.models.push(types_1.Model.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryAllContractStateResponse); - message.models = []; - if (object.models !== undefined && object.models !== null) { - for (const e of object.models) { - message.models.push(types_1.Model.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.models) { - obj.models = message.models.map((e) => (e ? types_1.Model.toJSON(e) : undefined)); - } - else { - obj.models = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination ? pagination_1.PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryAllContractStateResponse); - message.models = []; - if (object.models !== undefined && object.models !== null) { - for (const e of object.models) { - message.models.push(types_1.Model.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryRawContractStateRequest = { address: "" }; -exports.QueryRawContractStateRequest = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.queryData.length !== 0) { - writer.uint32(18).bytes(message.queryData); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryRawContractStateRequest); - message.queryData = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.queryData = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryRawContractStateRequest); - message.queryData = new Uint8Array(); - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.queryData !== undefined && object.queryData !== null) { - message.queryData = bytesFromBase64(object.queryData); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.queryData !== undefined && - (obj.queryData = base64FromBytes(message.queryData !== undefined ? message.queryData : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryRawContractStateRequest); - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.queryData !== undefined && object.queryData !== null) { - message.queryData = object.queryData; - } - else { - message.queryData = new Uint8Array(); - } - return message; - }, -}; -const baseQueryRawContractStateResponse = {}; -exports.QueryRawContractStateResponse = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryRawContractStateResponse); - message.data = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryRawContractStateResponse); - message.data = new Uint8Array(); - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryRawContractStateResponse); - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseQuerySmartContractStateRequest = { address: "" }; -exports.QuerySmartContractStateRequest = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.queryData.length !== 0) { - writer.uint32(18).bytes(message.queryData); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQuerySmartContractStateRequest); - message.queryData = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.queryData = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQuerySmartContractStateRequest); - message.queryData = new Uint8Array(); - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.queryData !== undefined && object.queryData !== null) { - message.queryData = bytesFromBase64(object.queryData); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.queryData !== undefined && - (obj.queryData = base64FromBytes(message.queryData !== undefined ? message.queryData : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQuerySmartContractStateRequest); - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.queryData !== undefined && object.queryData !== null) { - message.queryData = object.queryData; - } - else { - message.queryData = new Uint8Array(); - } - return message; - }, -}; -const baseQuerySmartContractStateResponse = {}; -exports.QuerySmartContractStateResponse = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQuerySmartContractStateResponse); - message.data = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQuerySmartContractStateResponse); - message.data = new Uint8Array(); - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQuerySmartContractStateResponse); - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseQueryCodeRequest = { codeId: long_1.default.UZERO }; -exports.QueryCodeRequest = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (!message.codeId.isZero()) { - writer.uint32(8).uint64(message.codeId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryCodeRequest); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryCodeRequest); - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = long_1.default.fromString(object.codeId); - } - else { - message.codeId = long_1.default.UZERO; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = (message.codeId || long_1.default.UZERO).toString()); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryCodeRequest); - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = long_1.default.UZERO; - } - return message; - }, -}; -const baseCodeInfoResponse = { codeId: long_1.default.UZERO, creator: "" }; -exports.CodeInfoResponse = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (!message.codeId.isZero()) { - writer.uint32(8).uint64(message.codeId); - } - if (message.creator !== "") { - writer.uint32(18).string(message.creator); - } - if (message.dataHash.length !== 0) { - writer.uint32(26).bytes(message.dataHash); - } - if (message.instantiatePermission !== undefined) { - types_1.AccessConfig.encode(message.instantiatePermission, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseCodeInfoResponse); - message.dataHash = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.creator = reader.string(); - break; - case 3: - message.dataHash = reader.bytes(); - break; - case 6: - message.instantiatePermission = types_1.AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseCodeInfoResponse); - message.dataHash = new Uint8Array(); - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = long_1.default.fromString(object.codeId); - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } - else { - message.creator = ""; - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = bytesFromBase64(object.dataHash); - } - if (object.instantiatePermission !== undefined && object.instantiatePermission !== null) { - message.instantiatePermission = types_1.AccessConfig.fromJSON(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = (message.codeId || long_1.default.UZERO).toString()); - message.creator !== undefined && (obj.creator = message.creator); - message.dataHash !== undefined && - (obj.dataHash = base64FromBytes(message.dataHash !== undefined ? message.dataHash : new Uint8Array())); - message.instantiatePermission !== undefined && - (obj.instantiatePermission = message.instantiatePermission - ? types_1.AccessConfig.toJSON(message.instantiatePermission) - : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseCodeInfoResponse); - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } - else { - message.creator = ""; - } - if (object.dataHash !== undefined && object.dataHash !== null) { - message.dataHash = object.dataHash; - } - else { - message.dataHash = new Uint8Array(); - } - if (object.instantiatePermission !== undefined && object.instantiatePermission !== null) { - message.instantiatePermission = types_1.AccessConfig.fromPartial(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, -}; -const baseQueryCodeResponse = {}; -exports.QueryCodeResponse = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.codeInfo !== undefined) { - exports.CodeInfoResponse.encode(message.codeInfo, writer.uint32(10).fork()).ldelim(); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryCodeResponse); - message.data = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeInfo = exports.CodeInfoResponse.decode(reader, reader.uint32()); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryCodeResponse); - message.data = new Uint8Array(); - if (object.codeInfo !== undefined && object.codeInfo !== null) { - message.codeInfo = exports.CodeInfoResponse.fromJSON(object.codeInfo); - } - else { - message.codeInfo = undefined; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeInfo !== undefined && - (obj.codeInfo = message.codeInfo ? exports.CodeInfoResponse.toJSON(message.codeInfo) : undefined); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryCodeResponse); - if (object.codeInfo !== undefined && object.codeInfo !== null) { - message.codeInfo = exports.CodeInfoResponse.fromPartial(object.codeInfo); - } - else { - message.codeInfo = undefined; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseQueryCodesRequest = {}; -exports.QueryCodesRequest = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.pagination !== undefined) { - pagination_1.PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryCodesRequest); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryCodesRequest); - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination ? pagination_1.PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryCodesRequest); - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryCodesResponse = {}; -exports.QueryCodesResponse = { - encode(message, writer = minimal_1.default.Writer.create()) { - for (const v of message.codeInfos) { - exports.CodeInfoResponse.encode(v, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryCodesResponse); - message.codeInfos = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeInfos.push(exports.CodeInfoResponse.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryCodesResponse); - message.codeInfos = []; - if (object.codeInfos !== undefined && object.codeInfos !== null) { - for (const e of object.codeInfos) { - message.codeInfos.push(exports.CodeInfoResponse.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.codeInfos) { - obj.codeInfos = message.codeInfos.map((e) => (e ? exports.CodeInfoResponse.toJSON(e) : undefined)); - } - else { - obj.codeInfos = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination ? pagination_1.PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryCodesResponse); - message.codeInfos = []; - if (object.codeInfos !== undefined && object.codeInfos !== null) { - for (const e of object.codeInfos) { - message.codeInfos.push(exports.CodeInfoResponse.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryPinnedCodesRequest = {}; -exports.QueryPinnedCodesRequest = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.pagination !== undefined) { - pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryPinnedCodesRequest); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryPinnedCodesRequest); - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageRequest.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination ? pagination_1.PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryPinnedCodesRequest); - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageRequest.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -const baseQueryPinnedCodesResponse = { codeIds: long_1.default.UZERO }; -exports.QueryPinnedCodesResponse = { - encode(message, writer = minimal_1.default.Writer.create()) { - writer.uint32(10).fork(); - for (const v of message.codeIds) { - writer.uint64(v); - } - writer.ldelim(); - if (message.pagination !== undefined) { - pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseQueryPinnedCodesResponse); - message.codeIds = []; - 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.codeIds.push(reader.uint64()); - } - } - else { - message.codeIds.push(reader.uint64()); - } - break; - case 2: - message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseQueryPinnedCodesResponse); - message.codeIds = []; - if (object.codeIds !== undefined && object.codeIds !== null) { - for (const e of object.codeIds) { - message.codeIds.push(long_1.default.fromString(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageResponse.fromJSON(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - if (message.codeIds) { - obj.codeIds = message.codeIds.map((e) => (e || long_1.default.UZERO).toString()); - } - else { - obj.codeIds = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination ? pagination_1.PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseQueryPinnedCodesResponse); - message.codeIds = []; - if (object.codeIds !== undefined && object.codeIds !== null) { - for (const e of object.codeIds) { - message.codeIds.push(e); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = pagination_1.PageResponse.fromPartial(object.pagination); - } - else { - message.pagination = undefined; - } - return message; - }, -}; -class QueryClientImpl { - constructor(rpc) { - this.rpc = rpc; - this.ContractInfo = this.ContractInfo.bind(this); - this.ContractHistory = this.ContractHistory.bind(this); - this.ContractsByCode = this.ContractsByCode.bind(this); - this.AllContractState = this.AllContractState.bind(this); - this.RawContractState = this.RawContractState.bind(this); - this.SmartContractState = this.SmartContractState.bind(this); - this.Code = this.Code.bind(this); - this.Codes = this.Codes.bind(this); - this.PinnedCodes = this.PinnedCodes.bind(this); - } - ContractInfo(request, metadata) { - return this.rpc.unary(exports.QueryContractInfoDesc, exports.QueryContractInfoRequest.fromPartial(request), metadata); - } - ContractHistory(request, metadata) { - return this.rpc.unary(exports.QueryContractHistoryDesc, exports.QueryContractHistoryRequest.fromPartial(request), metadata); - } - ContractsByCode(request, metadata) { - return this.rpc.unary(exports.QueryContractsByCodeDesc, exports.QueryContractsByCodeRequest.fromPartial(request), metadata); - } - AllContractState(request, metadata) { - return this.rpc.unary(exports.QueryAllContractStateDesc, exports.QueryAllContractStateRequest.fromPartial(request), metadata); - } - RawContractState(request, metadata) { - return this.rpc.unary(exports.QueryRawContractStateDesc, exports.QueryRawContractStateRequest.fromPartial(request), metadata); - } - SmartContractState(request, metadata) { - return this.rpc.unary(exports.QuerySmartContractStateDesc, exports.QuerySmartContractStateRequest.fromPartial(request), metadata); - } - Code(request, metadata) { - return this.rpc.unary(exports.QueryCodeDesc, exports.QueryCodeRequest.fromPartial(request), metadata); - } - Codes(request, metadata) { - return this.rpc.unary(exports.QueryCodesDesc, exports.QueryCodesRequest.fromPartial(request), metadata); - } - PinnedCodes(request, metadata) { - return this.rpc.unary(exports.QueryPinnedCodesDesc, exports.QueryPinnedCodesRequest.fromPartial(request), metadata); - } -} -exports.QueryClientImpl = QueryClientImpl; -exports.QueryDesc = { - serviceName: "cosmwasm.wasm.v1.Query", -}; -exports.QueryContractInfoDesc = { - methodName: "ContractInfo", - service: exports.QueryDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.QueryContractInfoRequest.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.QueryContractInfoResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -exports.QueryContractHistoryDesc = { - methodName: "ContractHistory", - service: exports.QueryDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.QueryContractHistoryRequest.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.QueryContractHistoryResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -exports.QueryContractsByCodeDesc = { - methodName: "ContractsByCode", - service: exports.QueryDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.QueryContractsByCodeRequest.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.QueryContractsByCodeResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -exports.QueryAllContractStateDesc = { - methodName: "AllContractState", - service: exports.QueryDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.QueryAllContractStateRequest.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.QueryAllContractStateResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -exports.QueryRawContractStateDesc = { - methodName: "RawContractState", - service: exports.QueryDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.QueryRawContractStateRequest.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.QueryRawContractStateResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -exports.QuerySmartContractStateDesc = { - methodName: "SmartContractState", - service: exports.QueryDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.QuerySmartContractStateRequest.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.QuerySmartContractStateResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -exports.QueryCodeDesc = { - methodName: "Code", - service: exports.QueryDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.QueryCodeRequest.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.QueryCodeResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -exports.QueryCodesDesc = { - methodName: "Codes", - service: exports.QueryDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.QueryCodesRequest.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.QueryCodesResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -exports.QueryPinnedCodesDesc = { - methodName: "PinnedCodes", - service: exports.QueryDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.QueryPinnedCodesRequest.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.QueryPinnedCodesResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -class GrpcWebImpl { - constructor(host, options) { - this.host = host; - this.options = options; - } - unary(methodDesc, _request, metadata) { - var _a; - const request = Object.assign(Object.assign({}, _request), methodDesc.requestType); - const maybeCombinedMetadata = metadata && this.options.metadata - ? new browser_headers_1.BrowserHeaders(Object.assign(Object.assign({}, (_a = this.options) === null || _a === void 0 ? void 0 : _a.metadata.headersMap), metadata === null || metadata === void 0 ? void 0 : metadata.headersMap)) - : metadata || this.options.metadata; - return new Promise((resolve, reject) => { - grpc_web_1.grpc.unary(methodDesc, { - request, - host: this.host, - metadata: maybeCombinedMetadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (response.status === grpc_web_1.grpc.Code.OK) { - resolve(response.message); - } - else { - const err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - reject(err); - } - }, - }); - }); - } -} -exports.GrpcWebImpl = GrpcWebImpl; -var globalThis = (() => { - 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 = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - 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 = globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (const byte of arr) { - bin.push(String.fromCharCode(byte)); - } - return btoa(bin.join("")); -} -if (minimal_1.default.util.Long !== long_1.default) { - minimal_1.default.util.Long = long_1.default; - minimal_1.default.configure(); -} -//# sourceMappingURL=query.js.map \ No newline at end of file diff --git a/js/cosmwasm/wasm/v1/query.js.map b/js/cosmwasm/wasm/v1/query.js.map deleted file mode 100644 index d1f22e9..0000000 --- a/js/cosmwasm/wasm/v1/query.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/cosmwasm/wasm/v1/query.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB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AAW,CAAC;IAC5B,iBAAG,CAAC,SAAS,EAAE,CAAC;CACjB"} \ No newline at end of file diff --git a/js/cosmwasm/wasm/v1/tx.d.ts b/js/cosmwasm/wasm/v1/tx.d.ts deleted file mode 100644 index 496f5b0..0000000 --- a/js/cosmwasm/wasm/v1/tx.d.ts +++ /dev/null @@ -1,246 +0,0 @@ -import Long from "long"; -import { grpc } from "@improbable-eng/grpc-web"; -import _m0 from "protobufjs/minimal"; -import { AccessConfig } from "../../../cosmwasm/wasm/v1/types"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; -export declare const protobufPackage = "cosmwasm.wasm.v1"; -/** MsgStoreCode submit Wasm code to the system */ -export interface MsgStoreCode { - /** Sender is the that actor that signed the messages */ - sender: string; - /** WASMByteCode can be raw or gzip compressed */ - wasmByteCode: Uint8Array; - /** - * InstantiatePermission access control to apply on contract creation, - * optional - */ - instantiatePermission?: AccessConfig; -} -/** MsgStoreCodeResponse returns store result data. */ -export interface MsgStoreCodeResponse { - /** CodeID is the reference to the stored WASM code */ - codeId: Long; -} -/** - * MsgInstantiateContract create a new smart contract instance for the given - * code id. - */ -export interface MsgInstantiateContract { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** CodeID is the reference to the stored WASM code */ - codeId: Long; - /** Label is optional metadata to be stored with a contract instance. */ - label: string; - /** Msg json encoded message to be passed to the contract on instantiation */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on instantiation */ - funds: Coin[]; -} -/** MsgInstantiateContractResponse return instantiation result data */ -export interface MsgInstantiateContractResponse { - /** Address is the bech32 address of the new contract instance. */ - address: string; - /** Data contains base64-encoded bytes to returned from the contract */ - data: Uint8Array; -} -/** MsgExecuteContract submits the given message data to a smart contract */ -export interface MsgExecuteContract { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; - /** Msg json encoded message to be passed to the contract */ - msg: Uint8Array; - /** Funds coins that are transferred to the contract on execution */ - funds: Coin[]; -} -/** MsgExecuteContractResponse returns execution result data. */ -export interface MsgExecuteContractResponse { - /** Data contains base64-encoded bytes to returned from the contract */ - data: Uint8Array; -} -/** MsgMigrateContract runs a code upgrade/ downgrade for a smart contract */ -export interface MsgMigrateContract { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; - /** CodeID references the new WASM code */ - codeId: Long; - /** Msg json encoded message to be passed to the contract on migration */ - msg: Uint8Array; -} -/** MsgMigrateContractResponse returns contract migration result data. */ -export interface MsgMigrateContractResponse { - /** - * Data contains same raw bytes returned as data from the wasm contract. - * (May be empty) - */ - data: Uint8Array; -} -/** MsgUpdateAdmin sets a new admin for a smart contract */ -export interface MsgUpdateAdmin { - /** Sender is the that actor that signed the messages */ - sender: string; - /** NewAdmin address to be set */ - newAdmin: string; - /** Contract is the address of the smart contract */ - contract: string; -} -/** MsgUpdateAdminResponse returns empty data */ -export interface MsgUpdateAdminResponse { -} -/** MsgClearAdmin removes any admin stored for a smart contract */ -export interface MsgClearAdmin { - /** Sender is the that actor that signed the messages */ - sender: string; - /** Contract is the address of the smart contract */ - contract: string; -} -/** MsgClearAdminResponse returns empty data */ -export interface MsgClearAdminResponse { -} -export declare const MsgStoreCode: { - encode(message: MsgStoreCode, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgStoreCode; - fromJSON(object: any): MsgStoreCode; - toJSON(message: MsgStoreCode): unknown; - fromPartial(object: DeepPartial): MsgStoreCode; -}; -export declare const MsgStoreCodeResponse: { - encode(message: MsgStoreCodeResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgStoreCodeResponse; - fromJSON(object: any): MsgStoreCodeResponse; - toJSON(message: MsgStoreCodeResponse): unknown; - fromPartial(object: DeepPartial): MsgStoreCodeResponse; -}; -export declare const MsgInstantiateContract: { - encode(message: MsgInstantiateContract, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgInstantiateContract; - fromJSON(object: any): MsgInstantiateContract; - toJSON(message: MsgInstantiateContract): unknown; - fromPartial(object: DeepPartial): MsgInstantiateContract; -}; -export declare const MsgInstantiateContractResponse: { - encode(message: MsgInstantiateContractResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgInstantiateContractResponse; - fromJSON(object: any): MsgInstantiateContractResponse; - toJSON(message: MsgInstantiateContractResponse): unknown; - fromPartial(object: DeepPartial): MsgInstantiateContractResponse; -}; -export declare const MsgExecuteContract: { - encode(message: MsgExecuteContract, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgExecuteContract; - fromJSON(object: any): MsgExecuteContract; - toJSON(message: MsgExecuteContract): unknown; - fromPartial(object: DeepPartial): MsgExecuteContract; -}; -export declare const MsgExecuteContractResponse: { - encode(message: MsgExecuteContractResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgExecuteContractResponse; - fromJSON(object: any): MsgExecuteContractResponse; - toJSON(message: MsgExecuteContractResponse): unknown; - fromPartial(object: DeepPartial): MsgExecuteContractResponse; -}; -export declare const MsgMigrateContract: { - encode(message: MsgMigrateContract, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgMigrateContract; - fromJSON(object: any): MsgMigrateContract; - toJSON(message: MsgMigrateContract): unknown; - fromPartial(object: DeepPartial): MsgMigrateContract; -}; -export declare const MsgMigrateContractResponse: { - encode(message: MsgMigrateContractResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgMigrateContractResponse; - fromJSON(object: any): MsgMigrateContractResponse; - toJSON(message: MsgMigrateContractResponse): unknown; - fromPartial(object: DeepPartial): MsgMigrateContractResponse; -}; -export declare const MsgUpdateAdmin: { - encode(message: MsgUpdateAdmin, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgUpdateAdmin; - fromJSON(object: any): MsgUpdateAdmin; - toJSON(message: MsgUpdateAdmin): unknown; - fromPartial(object: DeepPartial): MsgUpdateAdmin; -}; -export declare const MsgUpdateAdminResponse: { - encode(_: MsgUpdateAdminResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgUpdateAdminResponse; - fromJSON(_: any): MsgUpdateAdminResponse; - toJSON(_: MsgUpdateAdminResponse): unknown; - fromPartial(_: DeepPartial): MsgUpdateAdminResponse; -}; -export declare const MsgClearAdmin: { - encode(message: MsgClearAdmin, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgClearAdmin; - fromJSON(object: any): MsgClearAdmin; - toJSON(message: MsgClearAdmin): unknown; - fromPartial(object: DeepPartial): MsgClearAdmin; -}; -export declare const MsgClearAdminResponse: { - encode(_: MsgClearAdminResponse, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgClearAdminResponse; - fromJSON(_: any): MsgClearAdminResponse; - toJSON(_: MsgClearAdminResponse): unknown; - fromPartial(_: DeepPartial): MsgClearAdminResponse; -}; -/** Msg defines the wasm Msg service. */ -export interface Msg { - /** StoreCode to submit Wasm code to the system */ - StoreCode(request: DeepPartial, metadata?: grpc.Metadata): Promise; - /** Instantiate creates a new smart contract instance for the given code id. */ - InstantiateContract(request: DeepPartial, metadata?: grpc.Metadata): Promise; - /** Execute submits the given message data to a smart contract */ - ExecuteContract(request: DeepPartial, metadata?: grpc.Metadata): Promise; - /** Migrate runs a code upgrade/ downgrade for a smart contract */ - MigrateContract(request: DeepPartial, metadata?: grpc.Metadata): Promise; - /** UpdateAdmin sets a new admin for a smart contract */ - UpdateAdmin(request: DeepPartial, metadata?: grpc.Metadata): Promise; - /** ClearAdmin removes any admin stored for a smart contract */ - ClearAdmin(request: DeepPartial, metadata?: grpc.Metadata): Promise; -} -export declare class MsgClientImpl implements Msg { - private readonly rpc; - constructor(rpc: Rpc); - StoreCode(request: DeepPartial, metadata?: grpc.Metadata): Promise; - InstantiateContract(request: DeepPartial, metadata?: grpc.Metadata): Promise; - ExecuteContract(request: DeepPartial, metadata?: grpc.Metadata): Promise; - MigrateContract(request: DeepPartial, metadata?: grpc.Metadata): Promise; - UpdateAdmin(request: DeepPartial, metadata?: grpc.Metadata): Promise; - ClearAdmin(request: DeepPartial, metadata?: grpc.Metadata): Promise; -} -export declare const MsgDesc: { - serviceName: string; -}; -export declare const MsgStoreCodeDesc: UnaryMethodDefinitionish; -export declare const MsgInstantiateContractDesc: UnaryMethodDefinitionish; -export declare const MsgExecuteContractDesc: UnaryMethodDefinitionish; -export declare const MsgMigrateContractDesc: UnaryMethodDefinitionish; -export declare const MsgUpdateAdminDesc: UnaryMethodDefinitionish; -export declare const MsgClearAdminDesc: UnaryMethodDefinitionish; -interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { - requestStream: any; - responseStream: any; -} -declare type UnaryMethodDefinitionish = UnaryMethodDefinitionishR; -interface Rpc { - unary(methodDesc: T, request: any, metadata: grpc.Metadata | undefined): Promise; -} -export declare class GrpcWebImpl { - private host; - private options; - constructor(host: string, options: { - transport?: grpc.TransportFactory; - debug?: boolean; - metadata?: grpc.Metadata; - }); - unary(methodDesc: T, _request: any, metadata: grpc.Metadata | undefined): Promise; -} -declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined | Long; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/js/cosmwasm/wasm/v1/tx.js b/js/cosmwasm/wasm/v1/tx.js deleted file mode 100644 index be245d8..0000000 --- a/js/cosmwasm/wasm/v1/tx.js +++ /dev/null @@ -1,1134 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GrpcWebImpl = exports.MsgClearAdminDesc = exports.MsgUpdateAdminDesc = exports.MsgMigrateContractDesc = exports.MsgExecuteContractDesc = exports.MsgInstantiateContractDesc = exports.MsgStoreCodeDesc = exports.MsgDesc = exports.MsgClientImpl = exports.MsgClearAdminResponse = exports.MsgClearAdmin = exports.MsgUpdateAdminResponse = exports.MsgUpdateAdmin = exports.MsgMigrateContractResponse = exports.MsgMigrateContract = exports.MsgExecuteContractResponse = exports.MsgExecuteContract = exports.MsgInstantiateContractResponse = exports.MsgInstantiateContract = exports.MsgStoreCodeResponse = exports.MsgStoreCode = exports.protobufPackage = void 0; -/* eslint-disable */ -const long_1 = __importDefault(require("long")); -const grpc_web_1 = require("@improbable-eng/grpc-web"); -const minimal_1 = __importDefault(require("protobufjs/minimal")); -const types_1 = require("../../../cosmwasm/wasm/v1/types"); -const browser_headers_1 = require("browser-headers"); -const coin_1 = require("../../../cosmos/base/v1beta1/coin"); -exports.protobufPackage = "cosmwasm.wasm.v1"; -const baseMsgStoreCode = { sender: "" }; -exports.MsgStoreCode = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.wasmByteCode.length !== 0) { - writer.uint32(18).bytes(message.wasmByteCode); - } - if (message.instantiatePermission !== undefined) { - types_1.AccessConfig.encode(message.instantiatePermission, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMsgStoreCode); - message.wasmByteCode = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.wasmByteCode = reader.bytes(); - break; - case 5: - message.instantiatePermission = types_1.AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseMsgStoreCode); - message.wasmByteCode = new Uint8Array(); - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.wasmByteCode !== undefined && object.wasmByteCode !== null) { - message.wasmByteCode = bytesFromBase64(object.wasmByteCode); - } - if (object.instantiatePermission !== undefined && object.instantiatePermission !== null) { - message.instantiatePermission = types_1.AccessConfig.fromJSON(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.wasmByteCode !== undefined && - (obj.wasmByteCode = base64FromBytes(message.wasmByteCode !== undefined ? message.wasmByteCode : new Uint8Array())); - message.instantiatePermission !== undefined && - (obj.instantiatePermission = message.instantiatePermission - ? types_1.AccessConfig.toJSON(message.instantiatePermission) - : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseMsgStoreCode); - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.wasmByteCode !== undefined && object.wasmByteCode !== null) { - message.wasmByteCode = object.wasmByteCode; - } - else { - message.wasmByteCode = new Uint8Array(); - } - if (object.instantiatePermission !== undefined && object.instantiatePermission !== null) { - message.instantiatePermission = types_1.AccessConfig.fromPartial(object.instantiatePermission); - } - else { - message.instantiatePermission = undefined; - } - return message; - }, -}; -const baseMsgStoreCodeResponse = { codeId: long_1.default.UZERO }; -exports.MsgStoreCodeResponse = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (!message.codeId.isZero()) { - writer.uint32(8).uint64(message.codeId); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMsgStoreCodeResponse); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseMsgStoreCodeResponse); - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = long_1.default.fromString(object.codeId); - } - else { - message.codeId = long_1.default.UZERO; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = (message.codeId || long_1.default.UZERO).toString()); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseMsgStoreCodeResponse); - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = long_1.default.UZERO; - } - return message; - }, -}; -const baseMsgInstantiateContract = { sender: "", admin: "", codeId: long_1.default.UZERO, label: "" }; -exports.MsgInstantiateContract = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.admin !== "") { - writer.uint32(18).string(message.admin); - } - if (!message.codeId.isZero()) { - writer.uint32(24).uint64(message.codeId); - } - if (message.label !== "") { - writer.uint32(34).string(message.label); - } - if (message.msg.length !== 0) { - writer.uint32(42).bytes(message.msg); - } - for (const v of message.funds) { - coin_1.Coin.encode(v, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMsgInstantiateContract); - message.funds = []; - message.msg = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - case 3: - message.codeId = reader.uint64(); - break; - case 4: - message.label = reader.string(); - break; - case 5: - message.msg = reader.bytes(); - break; - case 6: - message.funds.push(coin_1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseMsgInstantiateContract); - message.funds = []; - message.msg = new Uint8Array(); - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = String(object.admin); - } - else { - message.admin = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = long_1.default.fromString(object.codeId); - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.label !== undefined && object.label !== null) { - message.label = String(object.label); - } - else { - message.label = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(coin_1.Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.admin !== undefined && (obj.admin = message.admin); - message.codeId !== undefined && (obj.codeId = (message.codeId || long_1.default.UZERO).toString()); - message.label !== undefined && (obj.label = message.label); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - if (message.funds) { - obj.funds = message.funds.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined)); - } - else { - obj.funds = []; - } - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseMsgInstantiateContract); - message.funds = []; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = object.admin; - } - else { - message.admin = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(coin_1.Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseMsgInstantiateContractResponse = { address: "" }; -exports.MsgInstantiateContractResponse = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.data.length !== 0) { - writer.uint32(18).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMsgInstantiateContractResponse); - message.data = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseMsgInstantiateContractResponse); - message.data = new Uint8Array(); - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.address !== undefined && (obj.address = message.address); - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseMsgInstantiateContractResponse); - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseMsgExecuteContract = { sender: "", contract: "" }; -exports.MsgExecuteContract = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.contract !== "") { - writer.uint32(18).string(message.contract); - } - if (message.msg.length !== 0) { - writer.uint32(26).bytes(message.msg); - } - for (const v of message.funds) { - coin_1.Coin.encode(v, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMsgExecuteContract); - message.funds = []; - message.msg = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.contract = reader.string(); - break; - case 3: - message.msg = reader.bytes(); - break; - case 5: - message.funds.push(coin_1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseMsgExecuteContract); - message.funds = []; - message.msg = new Uint8Array(); - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(coin_1.Coin.fromJSON(e)); - } - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.contract !== undefined && (obj.contract = message.contract); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - if (message.funds) { - obj.funds = message.funds.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined)); - } - else { - obj.funds = []; - } - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseMsgExecuteContract); - message.funds = []; - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - if (object.funds !== undefined && object.funds !== null) { - for (const e of object.funds) { - message.funds.push(coin_1.Coin.fromPartial(e)); - } - } - return message; - }, -}; -const baseMsgExecuteContractResponse = {}; -exports.MsgExecuteContractResponse = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMsgExecuteContractResponse); - message.data = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseMsgExecuteContractResponse); - message.data = new Uint8Array(); - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseMsgExecuteContractResponse); - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseMsgMigrateContract = { sender: "", contract: "", codeId: long_1.default.UZERO }; -exports.MsgMigrateContract = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.contract !== "") { - writer.uint32(18).string(message.contract); - } - if (!message.codeId.isZero()) { - writer.uint32(24).uint64(message.codeId); - } - if (message.msg.length !== 0) { - writer.uint32(34).bytes(message.msg); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMsgMigrateContract); - message.msg = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.contract = reader.string(); - break; - case 3: - message.codeId = reader.uint64(); - break; - case 4: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseMsgMigrateContract); - message.msg = new Uint8Array(); - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = long_1.default.fromString(object.codeId); - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.contract !== undefined && (obj.contract = message.contract); - message.codeId !== undefined && (obj.codeId = (message.codeId || long_1.default.UZERO).toString()); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseMsgMigrateContract); - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - return message; - }, -}; -const baseMsgMigrateContractResponse = {}; -exports.MsgMigrateContractResponse = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMsgMigrateContractResponse); - message.data = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseMsgMigrateContractResponse); - message.data = new Uint8Array(); - if (object.data !== undefined && object.data !== null) { - message.data = bytesFromBase64(object.data); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.data !== undefined && - (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseMsgMigrateContractResponse); - if (object.data !== undefined && object.data !== null) { - message.data = object.data; - } - else { - message.data = new Uint8Array(); - } - return message; - }, -}; -const baseMsgUpdateAdmin = { sender: "", newAdmin: "", contract: "" }; -exports.MsgUpdateAdmin = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.newAdmin !== "") { - writer.uint32(18).string(message.newAdmin); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMsgUpdateAdmin); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.newAdmin = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseMsgUpdateAdmin); - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.newAdmin !== undefined && object.newAdmin !== null) { - message.newAdmin = String(object.newAdmin); - } - else { - message.newAdmin = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.newAdmin !== undefined && (obj.newAdmin = message.newAdmin); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseMsgUpdateAdmin); - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.newAdmin !== undefined && object.newAdmin !== null) { - message.newAdmin = object.newAdmin; - } - else { - message.newAdmin = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - return message; - }, -}; -const baseMsgUpdateAdminResponse = {}; -exports.MsgUpdateAdminResponse = { - encode(_, writer = minimal_1.default.Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMsgUpdateAdminResponse); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = Object.assign({}, baseMsgUpdateAdminResponse); - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = Object.assign({}, baseMsgUpdateAdminResponse); - return message; - }, -}; -const baseMsgClearAdmin = { sender: "", contract: "" }; -exports.MsgClearAdmin = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.sender !== "") { - writer.uint32(10).string(message.sender); - } - if (message.contract !== "") { - writer.uint32(26).string(message.contract); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMsgClearAdmin); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 3: - message.contract = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseMsgClearAdmin); - if (object.sender !== undefined && object.sender !== null) { - message.sender = String(object.sender); - } - else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = String(object.contract); - } - else { - message.contract = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.sender !== undefined && (obj.sender = message.sender); - message.contract !== undefined && (obj.contract = message.contract); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseMsgClearAdmin); - if (object.sender !== undefined && object.sender !== null) { - message.sender = object.sender; - } - else { - message.sender = ""; - } - if (object.contract !== undefined && object.contract !== null) { - message.contract = object.contract; - } - else { - message.contract = ""; - } - return message; - }, -}; -const baseMsgClearAdminResponse = {}; -exports.MsgClearAdminResponse = { - encode(_, writer = minimal_1.default.Writer.create()) { - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseMsgClearAdminResponse); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(_) { - const message = Object.assign({}, baseMsgClearAdminResponse); - return message; - }, - toJSON(_) { - const obj = {}; - return obj; - }, - fromPartial(_) { - const message = Object.assign({}, baseMsgClearAdminResponse); - return message; - }, -}; -class MsgClientImpl { - constructor(rpc) { - this.rpc = rpc; - this.StoreCode = this.StoreCode.bind(this); - this.InstantiateContract = this.InstantiateContract.bind(this); - this.ExecuteContract = this.ExecuteContract.bind(this); - this.MigrateContract = this.MigrateContract.bind(this); - this.UpdateAdmin = this.UpdateAdmin.bind(this); - this.ClearAdmin = this.ClearAdmin.bind(this); - } - StoreCode(request, metadata) { - return this.rpc.unary(exports.MsgStoreCodeDesc, exports.MsgStoreCode.fromPartial(request), metadata); - } - InstantiateContract(request, metadata) { - return this.rpc.unary(exports.MsgInstantiateContractDesc, exports.MsgInstantiateContract.fromPartial(request), metadata); - } - ExecuteContract(request, metadata) { - return this.rpc.unary(exports.MsgExecuteContractDesc, exports.MsgExecuteContract.fromPartial(request), metadata); - } - MigrateContract(request, metadata) { - return this.rpc.unary(exports.MsgMigrateContractDesc, exports.MsgMigrateContract.fromPartial(request), metadata); - } - UpdateAdmin(request, metadata) { - return this.rpc.unary(exports.MsgUpdateAdminDesc, exports.MsgUpdateAdmin.fromPartial(request), metadata); - } - ClearAdmin(request, metadata) { - return this.rpc.unary(exports.MsgClearAdminDesc, exports.MsgClearAdmin.fromPartial(request), metadata); - } -} -exports.MsgClientImpl = MsgClientImpl; -exports.MsgDesc = { - serviceName: "cosmwasm.wasm.v1.Msg", -}; -exports.MsgStoreCodeDesc = { - methodName: "StoreCode", - service: exports.MsgDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.MsgStoreCode.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.MsgStoreCodeResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -exports.MsgInstantiateContractDesc = { - methodName: "InstantiateContract", - service: exports.MsgDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.MsgInstantiateContract.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.MsgInstantiateContractResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -exports.MsgExecuteContractDesc = { - methodName: "ExecuteContract", - service: exports.MsgDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.MsgExecuteContract.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.MsgExecuteContractResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -exports.MsgMigrateContractDesc = { - methodName: "MigrateContract", - service: exports.MsgDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.MsgMigrateContract.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.MsgMigrateContractResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -exports.MsgUpdateAdminDesc = { - methodName: "UpdateAdmin", - service: exports.MsgDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.MsgUpdateAdmin.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.MsgUpdateAdminResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -exports.MsgClearAdminDesc = { - methodName: "ClearAdmin", - service: exports.MsgDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return exports.MsgClearAdmin.encode(this).finish(); - }, - }, - responseType: { - deserializeBinary(data) { - return Object.assign(Object.assign({}, exports.MsgClearAdminResponse.decode(data)), { toObject() { - return this; - } }); - }, - }, -}; -class GrpcWebImpl { - constructor(host, options) { - this.host = host; - this.options = options; - } - unary(methodDesc, _request, metadata) { - var _a; - const request = Object.assign(Object.assign({}, _request), methodDesc.requestType); - const maybeCombinedMetadata = metadata && this.options.metadata - ? new browser_headers_1.BrowserHeaders(Object.assign(Object.assign({}, (_a = this.options) === null || _a === void 0 ? void 0 : _a.metadata.headersMap), metadata === null || metadata === void 0 ? void 0 : metadata.headersMap)) - : metadata || this.options.metadata; - return new Promise((resolve, reject) => { - grpc_web_1.grpc.unary(methodDesc, { - request, - host: this.host, - metadata: maybeCombinedMetadata, - transport: this.options.transport, - debug: this.options.debug, - onEnd: function (response) { - if (response.status === grpc_web_1.grpc.Code.OK) { - resolve(response.message); - } - else { - const err = new Error(response.statusMessage); - err.code = response.status; - err.metadata = response.trailers; - reject(err); - } - }, - }); - }); - } -} -exports.GrpcWebImpl = GrpcWebImpl; -var globalThis = (() => { - 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 = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - 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 = globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (const byte of arr) { - bin.push(String.fromCharCode(byte)); - } - return btoa(bin.join("")); -} -if (minimal_1.default.util.Long !== long_1.default) { - minimal_1.default.util.Long = long_1.default; - minimal_1.default.configure(); -} -//# sourceMappingURL=tx.js.map \ No newline at end of file diff --git a/js/cosmwasm/wasm/v1/tx.js.map b/js/cosmwasm/wasm/v1/tx.js.map deleted file mode 100644 index ff0f136..0000000 --- a/js/cosmwasm/wasm/v1/tx.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tx.js","sourceRoot":"","sources":["../../../../src/cosmwasm/wasm/v1/tx.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,gDAAwB;AACxB,uDAAgD;AAChD,iEAAqC;AACrC,2DAA+D;AAC/D,qDAAiD;AACjD,4DAAyD;AAE5C,QAAA,eAAe,GAAG,kBAAkB,CAAC;AA+GlD,MAAM,gBAAgB,GAAW,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAEnC,QAAA,YAAY,GAAG;IAC1B,MAAM,CAAC,OAAqB,EAAE,SAAqB,iBAAG,CAAC,MAAM,CAAC,MAAM,EAAE;QACpE,IAAI,OAAO,CAAC,MAAM,KAAK,EAAE,EAAE;YACzB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;SAC1C;QACD,IAAI,OAAO,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;YACrC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;SAC/C;QACD,IAAI,OAAO,CAAC,qBAAqB,KAAK,SAAS,EAAE;YAC/C,oBAAY,CAAC,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;SACvF;QACD,OAAO,MAAM,CAAC;IAChB,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IACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;QACnC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;KAC5B;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,IAAI,GACR,UAAU,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;AACzF,SAAS,eAAe,CAAC,GAAe;IACtC,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,IAAI,IAAI,GAAG,EAAE;QACtB,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;KACrC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5B,CAAC;AAaD,IAAI,iBAAG,CAAC,IAAI,CAAC,IAAI,KAAK,cAAI,EAAE;IAC1B,iBAAG,CAAC,IAAI,CAAC,IAAI,GAAG,cAAW,CAAC;IAC5B,iBAAG,CAAC,SAAS,EAAE,CAAC;CACjB"} \ No newline at end of file diff --git a/js/cosmwasm/wasm/v1/types.d.ts b/js/cosmwasm/wasm/v1/types.d.ts deleted file mode 100644 index 3abfa0b..0000000 --- a/js/cosmwasm/wasm/v1/types.d.ts +++ /dev/null @@ -1,168 +0,0 @@ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -export declare const protobufPackage = "cosmwasm.wasm.v1"; -/** AccessType permission types */ -export declare enum AccessType { - /** ACCESS_TYPE_UNSPECIFIED - AccessTypeUnspecified placeholder for empty value */ - ACCESS_TYPE_UNSPECIFIED = 0, - /** ACCESS_TYPE_NOBODY - AccessTypeNobody forbidden */ - ACCESS_TYPE_NOBODY = 1, - /** ACCESS_TYPE_ONLY_ADDRESS - AccessTypeOnlyAddress restricted to an address */ - ACCESS_TYPE_ONLY_ADDRESS = 2, - /** ACCESS_TYPE_EVERYBODY - AccessTypeEverybody unrestricted */ - ACCESS_TYPE_EVERYBODY = 3, - UNRECOGNIZED = -1 -} -export declare function accessTypeFromJSON(object: any): AccessType; -export declare function accessTypeToJSON(object: AccessType): string; -/** ContractCodeHistoryOperationType actions that caused a code change */ -export declare enum ContractCodeHistoryOperationType { - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED - ContractCodeHistoryOperationTypeUnspecified placeholder for empty value */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED = 0, - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT - ContractCodeHistoryOperationTypeInit on chain contract instantiation */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT = 1, - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE - ContractCodeHistoryOperationTypeMigrate code migration */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE = 2, - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS - ContractCodeHistoryOperationTypeGenesis based on genesis data */ - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS = 3, - UNRECOGNIZED = -1 -} -export declare function contractCodeHistoryOperationTypeFromJSON(object: any): ContractCodeHistoryOperationType; -export declare function contractCodeHistoryOperationTypeToJSON(object: ContractCodeHistoryOperationType): string; -/** AccessTypeParam */ -export interface AccessTypeParam { - value: AccessType; -} -/** AccessConfig access control type. */ -export interface AccessConfig { - permission: AccessType; - address: string; -} -/** Params defines the set of wasm parameters. */ -export interface Params { - codeUploadAccess?: AccessConfig; - instantiateDefaultPermission: AccessType; -} -/** CodeInfo is data for the uploaded contract WASM code */ -export interface CodeInfo { - /** CodeHash is the unique identifier created by wasmvm */ - codeHash: Uint8Array; - /** Creator address who initially stored the code */ - creator: string; - /** InstantiateConfig access control to apply on contract creation, optional */ - instantiateConfig?: AccessConfig; -} -/** ContractInfo stores a WASM contract instance */ -export interface ContractInfo { - /** CodeID is the reference to the stored Wasm code */ - codeId: Long; - /** Creator address who initially instantiated the contract */ - creator: string; - /** Admin is an optional address that can execute migrations */ - admin: string; - /** Label is optional metadata to be stored with a contract instance. */ - label: string; - /** - * Created Tx position when the contract was instantiated. - * This data should kept internal and not be exposed via query results. Just - * use for sorting - */ - created?: AbsoluteTxPosition; - ibcPortId: string; - /** - * Extension is an extension point to store custom metadata within the - * persistence model. - */ - extension?: Any; -} -/** ContractCodeHistoryEntry metadata to a contract. */ -export interface ContractCodeHistoryEntry { - operation: ContractCodeHistoryOperationType; - /** CodeID is the reference to the stored WASM code */ - codeId: Long; - /** Updated Tx position when the operation was executed. */ - updated?: AbsoluteTxPosition; - msg: Uint8Array; -} -/** - * AbsoluteTxPosition is a unique transaction position that allows for global - * ordering of transactions. - */ -export interface AbsoluteTxPosition { - /** BlockHeight is the block the contract was created at */ - blockHeight: Long; - /** - * TxIndex is a monotonic counter within the block (actual transaction index, - * or gas consumed) - */ - txIndex: Long; -} -/** Model is a struct that holds a KV pair */ -export interface Model { - /** hex-encode key to read it better (this is often ascii) */ - key: Uint8Array; - /** base64-encode raw value */ - value: Uint8Array; -} -export declare const AccessTypeParam: { - encode(message: AccessTypeParam, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): AccessTypeParam; - fromJSON(object: any): AccessTypeParam; - toJSON(message: AccessTypeParam): unknown; - fromPartial(object: DeepPartial): AccessTypeParam; -}; -export declare const AccessConfig: { - encode(message: AccessConfig, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): AccessConfig; - fromJSON(object: any): AccessConfig; - toJSON(message: AccessConfig): unknown; - fromPartial(object: DeepPartial): AccessConfig; -}; -export declare const Params: { - encode(message: Params, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Params; - fromJSON(object: any): Params; - toJSON(message: Params): unknown; - fromPartial(object: DeepPartial): Params; -}; -export declare const CodeInfo: { - encode(message: CodeInfo, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): CodeInfo; - fromJSON(object: any): CodeInfo; - toJSON(message: CodeInfo): unknown; - fromPartial(object: DeepPartial): CodeInfo; -}; -export declare const ContractInfo: { - encode(message: ContractInfo, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ContractInfo; - fromJSON(object: any): ContractInfo; - toJSON(message: ContractInfo): unknown; - fromPartial(object: DeepPartial): ContractInfo; -}; -export declare const ContractCodeHistoryEntry: { - encode(message: ContractCodeHistoryEntry, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ContractCodeHistoryEntry; - fromJSON(object: any): ContractCodeHistoryEntry; - toJSON(message: ContractCodeHistoryEntry): unknown; - fromPartial(object: DeepPartial): ContractCodeHistoryEntry; -}; -export declare const AbsoluteTxPosition: { - encode(message: AbsoluteTxPosition, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): AbsoluteTxPosition; - fromJSON(object: any): AbsoluteTxPosition; - toJSON(message: AbsoluteTxPosition): unknown; - fromPartial(object: DeepPartial): AbsoluteTxPosition; -}; -export declare const Model: { - encode(message: Model, writer?: _m0.Writer): _m0.Writer; - decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Model; - fromJSON(object: any): Model; - toJSON(message: Model): unknown; - fromPartial(object: DeepPartial): Model; -}; -declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined | Long; -export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { - [K in keyof T]?: DeepPartial; -} : Partial; -export {}; diff --git a/js/cosmwasm/wasm/v1/types.js b/js/cosmwasm/wasm/v1/types.js deleted file mode 100644 index 17eec82..0000000 --- a/js/cosmwasm/wasm/v1/types.js +++ /dev/null @@ -1,846 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Model = exports.AbsoluteTxPosition = exports.ContractCodeHistoryEntry = exports.ContractInfo = exports.CodeInfo = exports.Params = exports.AccessConfig = exports.AccessTypeParam = exports.contractCodeHistoryOperationTypeToJSON = exports.contractCodeHistoryOperationTypeFromJSON = exports.ContractCodeHistoryOperationType = exports.accessTypeToJSON = exports.accessTypeFromJSON = exports.AccessType = exports.protobufPackage = void 0; -/* eslint-disable */ -const long_1 = __importDefault(require("long")); -const minimal_1 = __importDefault(require("protobufjs/minimal")); -const any_1 = require("../../../google/protobuf/any"); -exports.protobufPackage = "cosmwasm.wasm.v1"; -/** AccessType permission types */ -var AccessType; -(function (AccessType) { - /** ACCESS_TYPE_UNSPECIFIED - AccessTypeUnspecified placeholder for empty value */ - AccessType[AccessType["ACCESS_TYPE_UNSPECIFIED"] = 0] = "ACCESS_TYPE_UNSPECIFIED"; - /** ACCESS_TYPE_NOBODY - AccessTypeNobody forbidden */ - AccessType[AccessType["ACCESS_TYPE_NOBODY"] = 1] = "ACCESS_TYPE_NOBODY"; - /** ACCESS_TYPE_ONLY_ADDRESS - AccessTypeOnlyAddress restricted to an address */ - AccessType[AccessType["ACCESS_TYPE_ONLY_ADDRESS"] = 2] = "ACCESS_TYPE_ONLY_ADDRESS"; - /** ACCESS_TYPE_EVERYBODY - AccessTypeEverybody unrestricted */ - AccessType[AccessType["ACCESS_TYPE_EVERYBODY"] = 3] = "ACCESS_TYPE_EVERYBODY"; - AccessType[AccessType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(AccessType = exports.AccessType || (exports.AccessType = {})); -function accessTypeFromJSON(object) { - switch (object) { - case 0: - case "ACCESS_TYPE_UNSPECIFIED": - return AccessType.ACCESS_TYPE_UNSPECIFIED; - case 1: - case "ACCESS_TYPE_NOBODY": - return AccessType.ACCESS_TYPE_NOBODY; - case 2: - case "ACCESS_TYPE_ONLY_ADDRESS": - return AccessType.ACCESS_TYPE_ONLY_ADDRESS; - case 3: - case "ACCESS_TYPE_EVERYBODY": - return AccessType.ACCESS_TYPE_EVERYBODY; - case -1: - case "UNRECOGNIZED": - default: - return AccessType.UNRECOGNIZED; - } -} -exports.accessTypeFromJSON = accessTypeFromJSON; -function accessTypeToJSON(object) { - switch (object) { - case AccessType.ACCESS_TYPE_UNSPECIFIED: - return "ACCESS_TYPE_UNSPECIFIED"; - case AccessType.ACCESS_TYPE_NOBODY: - return "ACCESS_TYPE_NOBODY"; - case AccessType.ACCESS_TYPE_ONLY_ADDRESS: - return "ACCESS_TYPE_ONLY_ADDRESS"; - case AccessType.ACCESS_TYPE_EVERYBODY: - return "ACCESS_TYPE_EVERYBODY"; - default: - return "UNKNOWN"; - } -} -exports.accessTypeToJSON = accessTypeToJSON; -/** ContractCodeHistoryOperationType actions that caused a code change */ -var ContractCodeHistoryOperationType; -(function (ContractCodeHistoryOperationType) { - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED - ContractCodeHistoryOperationTypeUnspecified placeholder for empty value */ - ContractCodeHistoryOperationType[ContractCodeHistoryOperationType["CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED"] = 0] = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED"; - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT - ContractCodeHistoryOperationTypeInit on chain contract instantiation */ - ContractCodeHistoryOperationType[ContractCodeHistoryOperationType["CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT"] = 1] = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT"; - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE - ContractCodeHistoryOperationTypeMigrate code migration */ - ContractCodeHistoryOperationType[ContractCodeHistoryOperationType["CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE"] = 2] = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE"; - /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS - ContractCodeHistoryOperationTypeGenesis based on genesis data */ - ContractCodeHistoryOperationType[ContractCodeHistoryOperationType["CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"] = 3] = "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"; - ContractCodeHistoryOperationType[ContractCodeHistoryOperationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; -})(ContractCodeHistoryOperationType = exports.ContractCodeHistoryOperationType || (exports.ContractCodeHistoryOperationType = {})); -function contractCodeHistoryOperationTypeFromJSON(object) { - switch (object) { - case 0: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED; - case 1: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT; - case 2: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE; - case 3: - case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS": - return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS; - case -1: - case "UNRECOGNIZED": - default: - return ContractCodeHistoryOperationType.UNRECOGNIZED; - } -} -exports.contractCodeHistoryOperationTypeFromJSON = contractCodeHistoryOperationTypeFromJSON; -function contractCodeHistoryOperationTypeToJSON(object) { - switch (object) { - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE"; - case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: - return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"; - default: - return "UNKNOWN"; - } -} -exports.contractCodeHistoryOperationTypeToJSON = contractCodeHistoryOperationTypeToJSON; -const baseAccessTypeParam = { value: 0 }; -exports.AccessTypeParam = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.value !== 0) { - writer.uint32(8).int32(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseAccessTypeParam); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.value = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseAccessTypeParam); - if (object.value !== undefined && object.value !== null) { - message.value = accessTypeFromJSON(object.value); - } - else { - message.value = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.value !== undefined && (obj.value = accessTypeToJSON(message.value)); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseAccessTypeParam); - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = 0; - } - return message; - }, -}; -const baseAccessConfig = { permission: 0, address: "" }; -exports.AccessConfig = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.permission !== 0) { - writer.uint32(8).int32(message.permission); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseAccessConfig); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.permission = reader.int32(); - break; - case 2: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseAccessConfig); - if (object.permission !== undefined && object.permission !== null) { - message.permission = accessTypeFromJSON(object.permission); - } - else { - message.permission = 0; - } - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } - else { - message.address = ""; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.permission !== undefined && (obj.permission = accessTypeToJSON(message.permission)); - message.address !== undefined && (obj.address = message.address); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseAccessConfig); - if (object.permission !== undefined && object.permission !== null) { - message.permission = object.permission; - } - else { - message.permission = 0; - } - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } - else { - message.address = ""; - } - return message; - }, -}; -const baseParams = { instantiateDefaultPermission: 0 }; -exports.Params = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.codeUploadAccess !== undefined) { - exports.AccessConfig.encode(message.codeUploadAccess, writer.uint32(10).fork()).ldelim(); - } - if (message.instantiateDefaultPermission !== 0) { - writer.uint32(16).int32(message.instantiateDefaultPermission); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseParams); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeUploadAccess = exports.AccessConfig.decode(reader, reader.uint32()); - break; - case 2: - message.instantiateDefaultPermission = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseParams); - if (object.codeUploadAccess !== undefined && object.codeUploadAccess !== null) { - message.codeUploadAccess = exports.AccessConfig.fromJSON(object.codeUploadAccess); - } - else { - message.codeUploadAccess = undefined; - } - if (object.instantiateDefaultPermission !== undefined && object.instantiateDefaultPermission !== null) { - message.instantiateDefaultPermission = accessTypeFromJSON(object.instantiateDefaultPermission); - } - else { - message.instantiateDefaultPermission = 0; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeUploadAccess !== undefined && - (obj.codeUploadAccess = message.codeUploadAccess - ? exports.AccessConfig.toJSON(message.codeUploadAccess) - : undefined); - message.instantiateDefaultPermission !== undefined && - (obj.instantiateDefaultPermission = accessTypeToJSON(message.instantiateDefaultPermission)); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseParams); - if (object.codeUploadAccess !== undefined && object.codeUploadAccess !== null) { - message.codeUploadAccess = exports.AccessConfig.fromPartial(object.codeUploadAccess); - } - else { - message.codeUploadAccess = undefined; - } - if (object.instantiateDefaultPermission !== undefined && object.instantiateDefaultPermission !== null) { - message.instantiateDefaultPermission = object.instantiateDefaultPermission; - } - else { - message.instantiateDefaultPermission = 0; - } - return message; - }, -}; -const baseCodeInfo = { creator: "" }; -exports.CodeInfo = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.codeHash.length !== 0) { - writer.uint32(10).bytes(message.codeHash); - } - if (message.creator !== "") { - writer.uint32(18).string(message.creator); - } - if (message.instantiateConfig !== undefined) { - exports.AccessConfig.encode(message.instantiateConfig, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseCodeInfo); - message.codeHash = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeHash = reader.bytes(); - break; - case 2: - message.creator = reader.string(); - break; - case 5: - message.instantiateConfig = exports.AccessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseCodeInfo); - message.codeHash = new Uint8Array(); - if (object.codeHash !== undefined && object.codeHash !== null) { - message.codeHash = bytesFromBase64(object.codeHash); - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } - else { - message.creator = ""; - } - if (object.instantiateConfig !== undefined && object.instantiateConfig !== null) { - message.instantiateConfig = exports.AccessConfig.fromJSON(object.instantiateConfig); - } - else { - message.instantiateConfig = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeHash !== undefined && - (obj.codeHash = base64FromBytes(message.codeHash !== undefined ? message.codeHash : new Uint8Array())); - message.creator !== undefined && (obj.creator = message.creator); - message.instantiateConfig !== undefined && - (obj.instantiateConfig = message.instantiateConfig - ? exports.AccessConfig.toJSON(message.instantiateConfig) - : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseCodeInfo); - if (object.codeHash !== undefined && object.codeHash !== null) { - message.codeHash = object.codeHash; - } - else { - message.codeHash = new Uint8Array(); - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } - else { - message.creator = ""; - } - if (object.instantiateConfig !== undefined && object.instantiateConfig !== null) { - message.instantiateConfig = exports.AccessConfig.fromPartial(object.instantiateConfig); - } - else { - message.instantiateConfig = undefined; - } - return message; - }, -}; -const baseContractInfo = { codeId: long_1.default.UZERO, creator: "", admin: "", label: "", ibcPortId: "" }; -exports.ContractInfo = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (!message.codeId.isZero()) { - writer.uint32(8).uint64(message.codeId); - } - if (message.creator !== "") { - writer.uint32(18).string(message.creator); - } - if (message.admin !== "") { - writer.uint32(26).string(message.admin); - } - if (message.label !== "") { - writer.uint32(34).string(message.label); - } - if (message.created !== undefined) { - exports.AbsoluteTxPosition.encode(message.created, writer.uint32(42).fork()).ldelim(); - } - if (message.ibcPortId !== "") { - writer.uint32(50).string(message.ibcPortId); - } - if (message.extension !== undefined) { - any_1.Any.encode(message.extension, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseContractInfo); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codeId = reader.uint64(); - break; - case 2: - message.creator = reader.string(); - break; - case 3: - message.admin = reader.string(); - break; - case 4: - message.label = reader.string(); - break; - case 5: - message.created = exports.AbsoluteTxPosition.decode(reader, reader.uint32()); - break; - case 6: - message.ibcPortId = reader.string(); - break; - case 7: - message.extension = any_1.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseContractInfo); - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = long_1.default.fromString(object.codeId); - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = String(object.creator); - } - else { - message.creator = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = String(object.admin); - } - else { - message.admin = ""; - } - if (object.label !== undefined && object.label !== null) { - message.label = String(object.label); - } - else { - message.label = ""; - } - if (object.created !== undefined && object.created !== null) { - message.created = exports.AbsoluteTxPosition.fromJSON(object.created); - } - else { - message.created = undefined; - } - if (object.ibcPortId !== undefined && object.ibcPortId !== null) { - message.ibcPortId = String(object.ibcPortId); - } - else { - message.ibcPortId = ""; - } - if (object.extension !== undefined && object.extension !== null) { - message.extension = any_1.Any.fromJSON(object.extension); - } - else { - message.extension = undefined; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.codeId !== undefined && (obj.codeId = (message.codeId || long_1.default.UZERO).toString()); - message.creator !== undefined && (obj.creator = message.creator); - message.admin !== undefined && (obj.admin = message.admin); - message.label !== undefined && (obj.label = message.label); - message.created !== undefined && - (obj.created = message.created ? exports.AbsoluteTxPosition.toJSON(message.created) : undefined); - message.ibcPortId !== undefined && (obj.ibcPortId = message.ibcPortId); - message.extension !== undefined && - (obj.extension = message.extension ? any_1.Any.toJSON(message.extension) : undefined); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseContractInfo); - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.creator !== undefined && object.creator !== null) { - message.creator = object.creator; - } - else { - message.creator = ""; - } - if (object.admin !== undefined && object.admin !== null) { - message.admin = object.admin; - } - else { - message.admin = ""; - } - if (object.label !== undefined && object.label !== null) { - message.label = object.label; - } - else { - message.label = ""; - } - if (object.created !== undefined && object.created !== null) { - message.created = exports.AbsoluteTxPosition.fromPartial(object.created); - } - else { - message.created = undefined; - } - if (object.ibcPortId !== undefined && object.ibcPortId !== null) { - message.ibcPortId = object.ibcPortId; - } - else { - message.ibcPortId = ""; - } - if (object.extension !== undefined && object.extension !== null) { - message.extension = any_1.Any.fromPartial(object.extension); - } - else { - message.extension = undefined; - } - return message; - }, -}; -const baseContractCodeHistoryEntry = { operation: 0, codeId: long_1.default.UZERO }; -exports.ContractCodeHistoryEntry = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.operation !== 0) { - writer.uint32(8).int32(message.operation); - } - if (!message.codeId.isZero()) { - writer.uint32(16).uint64(message.codeId); - } - if (message.updated !== undefined) { - exports.AbsoluteTxPosition.encode(message.updated, writer.uint32(26).fork()).ldelim(); - } - if (message.msg.length !== 0) { - writer.uint32(34).bytes(message.msg); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseContractCodeHistoryEntry); - message.msg = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.operation = reader.int32(); - break; - case 2: - message.codeId = reader.uint64(); - break; - case 3: - message.updated = exports.AbsoluteTxPosition.decode(reader, reader.uint32()); - break; - case 4: - message.msg = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseContractCodeHistoryEntry); - message.msg = new Uint8Array(); - if (object.operation !== undefined && object.operation !== null) { - message.operation = contractCodeHistoryOperationTypeFromJSON(object.operation); - } - else { - message.operation = 0; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = long_1.default.fromString(object.codeId); - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.updated !== undefined && object.updated !== null) { - message.updated = exports.AbsoluteTxPosition.fromJSON(object.updated); - } - else { - message.updated = undefined; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = bytesFromBase64(object.msg); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.operation !== undefined && - (obj.operation = contractCodeHistoryOperationTypeToJSON(message.operation)); - message.codeId !== undefined && (obj.codeId = (message.codeId || long_1.default.UZERO).toString()); - message.updated !== undefined && - (obj.updated = message.updated ? exports.AbsoluteTxPosition.toJSON(message.updated) : undefined); - message.msg !== undefined && - (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseContractCodeHistoryEntry); - if (object.operation !== undefined && object.operation !== null) { - message.operation = object.operation; - } - else { - message.operation = 0; - } - if (object.codeId !== undefined && object.codeId !== null) { - message.codeId = object.codeId; - } - else { - message.codeId = long_1.default.UZERO; - } - if (object.updated !== undefined && object.updated !== null) { - message.updated = exports.AbsoluteTxPosition.fromPartial(object.updated); - } - else { - message.updated = undefined; - } - if (object.msg !== undefined && object.msg !== null) { - message.msg = object.msg; - } - else { - message.msg = new Uint8Array(); - } - return message; - }, -}; -const baseAbsoluteTxPosition = { blockHeight: long_1.default.UZERO, txIndex: long_1.default.UZERO }; -exports.AbsoluteTxPosition = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (!message.blockHeight.isZero()) { - writer.uint32(8).uint64(message.blockHeight); - } - if (!message.txIndex.isZero()) { - writer.uint32(16).uint64(message.txIndex); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseAbsoluteTxPosition); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.blockHeight = reader.uint64(); - break; - case 2: - message.txIndex = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseAbsoluteTxPosition); - if (object.blockHeight !== undefined && object.blockHeight !== null) { - message.blockHeight = long_1.default.fromString(object.blockHeight); - } - else { - message.blockHeight = long_1.default.UZERO; - } - if (object.txIndex !== undefined && object.txIndex !== null) { - message.txIndex = long_1.default.fromString(object.txIndex); - } - else { - message.txIndex = long_1.default.UZERO; - } - return message; - }, - toJSON(message) { - const obj = {}; - message.blockHeight !== undefined && (obj.blockHeight = (message.blockHeight || long_1.default.UZERO).toString()); - message.txIndex !== undefined && (obj.txIndex = (message.txIndex || long_1.default.UZERO).toString()); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseAbsoluteTxPosition); - if (object.blockHeight !== undefined && object.blockHeight !== null) { - message.blockHeight = object.blockHeight; - } - else { - message.blockHeight = long_1.default.UZERO; - } - if (object.txIndex !== undefined && object.txIndex !== null) { - message.txIndex = object.txIndex; - } - else { - message.txIndex = long_1.default.UZERO; - } - return message; - }, -}; -const baseModel = {}; -exports.Model = { - encode(message, writer = minimal_1.default.Writer.create()) { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - return writer; - }, - decode(input, length) { - const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = Object.assign({}, baseModel); - message.key = new Uint8Array(); - message.value = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - fromJSON(object) { - const message = Object.assign({}, baseModel); - message.key = new Uint8Array(); - message.value = new Uint8Array(); - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - return message; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - return obj; - }, - fromPartial(object) { - const message = Object.assign({}, baseModel); - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } - else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } - else { - message.value = new Uint8Array(); - } - return message; - }, -}; -var globalThis = (() => { - 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 = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); -function bytesFromBase64(b64) { - 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 = globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); -function base64FromBytes(arr) { - const bin = []; - for (const byte of arr) { - bin.push(String.fromCharCode(byte)); - } - return btoa(bin.join("")); -} -if (minimal_1.default.util.Long !== long_1.default) { - minimal_1.default.util.Long = long_1.default; - minimal_1.default.configure(); -} -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/js/cosmwasm/wasm/v1/types.js.map b/js/cosmwasm/wasm/v1/types.js.map deleted file mode 100644 index 3ea79b6..0000000 --- a/js/cosmwasm/wasm/v1/types.js.map +++ /dev/null @@ -1 +0,0 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AAC,CAAC,CAAC;AAC5B,CAAC;AAaD,IAAI,iBAAG,CAAC,IAAI,CAAC,IAAI,KAAK,cAAI,EAAE;IAC1B,iBAAG,CAAC,IAAI,CAAC,IAAI,GAAG,cAAW,CAAC;IAC5B,iBAAG,CAAC,SAAS,EAAE,CAAC;CACjB"} \ No newline at end of file diff --git a/js/package-lock.json b/js/package-lock.json index 2ff3dad..1a5ab45 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -1,143 +1,175 @@ { "name": "@classic-terra/terra.proto", - "version": "1.0.0", - "lockfileVersion": 1, + "version": "1.1.0-rc.1", + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@improbable-eng/grpc-web": { + "packages": { + "": { + "name": "@classic-terra/terra.proto", + "version": "1.1.0-rc.1", + "license": "Apache-2.0", + "dependencies": { + "@improbable-eng/grpc-web": "^0.14.1", + "google-protobuf": "^3.17.3", + "long": "^4.0.0", + "protobufjs": "~6.11.2" + }, + "devDependencies": { + "@types/google-protobuf": "^3.15.5", + "@types/long": "^4.0.1", + "@types/node": "^15.6.2", + "prettier": "^2.3.0", + "ts-proto": "^1.82.5", + "typescript": "~4.0" + } + }, + "node_modules/@improbable-eng/grpc-web": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.14.1.tgz", "integrity": "sha512-XaIYuunepPxoiGVLLHmlnVminUGzBTnXr8Wv7khzmLWbNw4TCwJKX09GSMJlKhu/TRk6gms0ySFxewaETSBqgw==", - "requires": { + "dependencies": { "browser-headers": "^0.4.1" + }, + "peerDependencies": { + "google-protobuf": "^3.14.0" } }, - "@protobufjs/aspromise": { + "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" }, - "@protobufjs/base64": { + "node_modules/@protobufjs/base64": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" }, - "@protobufjs/codegen": { + "node_modules/@protobufjs/codegen": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" }, - "@protobufjs/eventemitter": { + "node_modules/@protobufjs/eventemitter": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" }, - "@protobufjs/fetch": { + "node_modules/@protobufjs/fetch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", - "requires": { + "dependencies": { "@protobufjs/aspromise": "^1.1.1", "@protobufjs/inquire": "^1.1.0" } }, - "@protobufjs/float": { + "node_modules/@protobufjs/float": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" }, - "@protobufjs/inquire": { + "node_modules/@protobufjs/inquire": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" }, - "@protobufjs/path": { + "node_modules/@protobufjs/path": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" }, - "@protobufjs/pool": { + "node_modules/@protobufjs/pool": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" }, - "@protobufjs/utf8": { + "node_modules/@protobufjs/utf8": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, - "@types/google-protobuf": { + "node_modules/@types/google-protobuf": { "version": "3.15.5", "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.15.5.tgz", "integrity": "sha512-6bgv24B+A2bo9AfzReeg5StdiijKzwwnRflA8RLd1V4Yv995LeTmo0z69/MPbBDFSiZWdZHQygLo/ccXhMEDgw==", "dev": true }, - "@types/long": { + "node_modules/@types/long": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==" }, - "@types/node": { + "node_modules/@types/node": { "version": "15.14.9", "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.9.tgz", "integrity": "sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==" }, - "@types/object-hash": { + "node_modules/@types/object-hash": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-1.3.4.tgz", "integrity": "sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA==", "dev": true }, - "@types/prettier": { + "node_modules/@types/prettier": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-1.19.1.tgz", "integrity": "sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ==", "dev": true }, - "browser-headers": { + "node_modules/browser-headers": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==" }, - "dataloader": { + "node_modules/dataloader": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==", "dev": true }, - "google-protobuf": { + "node_modules/google-protobuf": { "version": "3.17.3", "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.17.3.tgz", "integrity": "sha512-OVPzcSWIAJ+d5yiHyeaLrdufQtrvaBrF4JQg+z8ynTkbO3uFcujqXszTumqg1cGsAsjkWnI+M5B1xZ19yR4Wyg==" }, - "lodash": { + "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "long": { + "node_modules/long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, - "object-hash": { + "node_modules/object-hash": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.10.0" + } }, - "prettier": { + "node_modules/prettier": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz", "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==", - "dev": true + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } }, - "protobufjs": { + "node_modules/protobufjs": { "version": "6.11.3", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", - "requires": { + "hasInstallScript": true, + "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", "@protobufjs/codegen": "^2.0.4", @@ -151,48 +183,62 @@ "@types/long": "^4.0.1", "@types/node": ">=13.7.0", "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" } }, - "ts-poet": { + "node_modules/ts-poet": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-4.5.0.tgz", "integrity": "sha512-Vs2Zsiz3zf5qdFulFTIEpaLdgWeHXKh+4pv+ycVqEh+ZuUOVGrN0i9lbxVx7DB1FBogExytz3OuaBMJfWffpSQ==", "dev": true, - "requires": { + "dependencies": { "@types/prettier": "^1.19.0", "lodash": "^4.17.15", "prettier": "^2.0.2" } }, - "ts-proto": { + "node_modules/ts-proto": { "version": "1.82.5", "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.82.5.tgz", "integrity": "sha512-RqlTxosROuYdeWRLa6Qu8Wz9dc3fpAh+R8PELUlhSSZlUiEkTos662SgKHOB8UoJd9CBMSyJPRC7z8k2WvWzhw==", "dev": true, - "requires": { + "dependencies": { "@types/object-hash": "^1.3.0", "dataloader": "^1.4.0", "object-hash": "^1.3.1", "protobufjs": "^6.8.8", "ts-poet": "^4.5.0", "ts-proto-descriptors": "^1.2.1" + }, + "bin": { + "protoc-gen-ts_proto": "protoc-gen-ts_proto" } }, - "ts-proto-descriptors": { + "node_modules/ts-proto-descriptors": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.3.1.tgz", "integrity": "sha512-Cybb3fqceMwA6JzHdC32dIo8eVGVmXrM6TWhdk1XQVVHT/6OQqk0ioyX1dIdu3rCIBhRmWUhUE4HsyK+olmgMw==", "dev": true, - "requires": { + "dependencies": { "long": "^4.0.0", "protobufjs": "^6.8.8" } }, - "typescript": { + "node_modules/typescript": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.8.tgz", "integrity": "sha512-oz1765PN+imfz1MlZzSZPtC/tqcwsCyIYA8L47EkRnRW97ztRk83SzMiWLrnChC0vqoYxSU1fcFUDA5gV/ZiPg==", - "dev": true + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } } } } diff --git a/js/package.json b/js/package.json index f06d906..fc92340 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "@classic-terra/terra.proto", - "version": "1.0.0", + "version": "1.1.0-rc.1", "description": "JS and TS types relating to Protocol Buffers used by Terra project", "contributors": [ "Yun Yeo " @@ -22,11 +22,12 @@ "google/", "ibc/", "tendermint/", + "terra/", "*.md" ], "scripts": { "format": "prettier --write --loglevel warn \"./src/**/*.ts\"", - "build": "rm -rf ./build && tsc --module commonjs && ./scripts/prepare.sh", + "build": "rm -rf ./build && npx tsc --module commonjs && ./scripts/prepare.sh", "prepublishOnly": "npm run build" }, "dependencies": { diff --git a/js/scripts/prepare.sh b/js/scripts/prepare.sh index a32308b..d7b4f9c 100755 --- a/js/scripts/prepare.sh +++ b/js/scripts/prepare.sh @@ -2,7 +2,7 @@ set -o errexit -o nounset -o pipefail command -v shellcheck >/dev/null && shellcheck "$0" -DIRS="confio cosmos cosmos_proto cosmwasm gogoproto google ibc tendermint" +DIRS="confio cosmos cosmos_proto gogoproto google ibc tendermint terra" for dir in $DIRS; do rm -rf "$dir" diff --git a/js/scripts/proto-gen.sh b/js/scripts/proto-gen.sh index 535c2ea..8a6233d 100755 --- a/js/scripts/proto-gen.sh +++ b/js/scripts/proto-gen.sh @@ -9,14 +9,12 @@ PROTOC_GEN_TS_PROTO_PATH="./node_modules/.bin/protoc-gen-ts_proto" mkdir -p "$OUT_DIR" -echo "Processing terrad proto files ..." -TERRAD_DIR="../terrad/proto" -TERRAD_THIRD_PARTY_DIR="../terrad/third_party/proto" +echo "Processing proto files ..." +PROTO_DIR="../proto" protoc \ --plugin="protoc-gen-ts_proto=${PROTOC_GEN_TS_PROTO_PATH}" \ --ts_proto_out="${OUT_DIR}" \ --ts_proto_opt="esModuleInterop=true,forceLong=long,useOptionals=true,outputClientImpl=grpc-web" \ - --proto_path="$TERRAD_DIR" \ - --proto_path="$TERRAD_THIRD_PARTY_DIR" \ - $(find ${TERRAD_DIR} ${TERRAD_THIRD_PARTY_DIR} -path -prune -o -name '*.proto' -print0 | xargs -0) + --proto_path="$PROTO_DIR" \ + $(find ${PROTO_DIR} -path -prune -o -name '*.proto' -print0 | xargs -0) diff --git a/js/src/cosmos/authz/v1beta1/authz.ts b/js/src/cosmos/authz/v1beta1/authz.ts index b88463c..793e1bd 100644 --- a/js/src/cosmos/authz/v1beta1/authz.ts +++ b/js/src/cosmos/authz/v1beta1/authz.ts @@ -26,19 +26,6 @@ export interface Grant { expiration?: Date; } -/** - * GrantAuthorization extends a grant with both the addresses of the grantee and granter. - * It is used in genesis.proto and query.proto - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GrantAuthorization { - granter: string; - grantee: string; - authorization?: Any; - expiration?: Date; -} - const baseGenericAuthorization: object = { msg: "" }; export const GenericAuthorization = { @@ -167,113 +154,6 @@ export const Grant = { }, }; -const baseGrantAuthorization: object = { granter: "", grantee: "" }; - -export const GrantAuthorization = { - encode(message: GrantAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.authorization !== undefined) { - Any.encode(message.authorization, writer.uint32(26).fork()).ldelim(); - } - if (message.expiration !== undefined) { - Timestamp.encode(toTimestamp(message.expiration), writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GrantAuthorization { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGrantAuthorization } as GrantAuthorization; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.grantee = reader.string(); - break; - case 3: - message.authorization = Any.decode(reader, reader.uint32()); - break; - case 4: - message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GrantAuthorization { - const message = { ...baseGrantAuthorization } as GrantAuthorization; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - if (object.authorization !== undefined && object.authorization !== null) { - message.authorization = Any.fromJSON(object.authorization); - } else { - message.authorization = undefined; - } - if (object.expiration !== undefined && object.expiration !== null) { - message.expiration = fromJsonTimestamp(object.expiration); - } else { - message.expiration = undefined; - } - return message; - }, - - toJSON(message: GrantAuthorization): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.authorization !== undefined && - (obj.authorization = message.authorization ? Any.toJSON(message.authorization) : undefined); - message.expiration !== undefined && (obj.expiration = message.expiration.toISOString()); - return obj; - }, - - fromPartial(object: DeepPartial): GrantAuthorization { - const message = { ...baseGrantAuthorization } as GrantAuthorization; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - if (object.authorization !== undefined && object.authorization !== null) { - message.authorization = Any.fromPartial(object.authorization); - } else { - message.authorization = undefined; - } - if (object.expiration !== undefined && object.expiration !== null) { - message.expiration = object.expiration; - } else { - message.expiration = undefined; - } - return message; - }, -}; - type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined | Long; export type DeepPartial = T extends Builtin ? T diff --git a/js/src/cosmos/authz/v1beta1/genesis.ts b/js/src/cosmos/authz/v1beta1/genesis.ts index 07d812f..7299856 100644 --- a/js/src/cosmos/authz/v1beta1/genesis.ts +++ b/js/src/cosmos/authz/v1beta1/genesis.ts @@ -1,7 +1,8 @@ /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; -import { GrantAuthorization } from "../../../cosmos/authz/v1beta1/authz"; +import { Any } from "../../../google/protobuf/any"; +import { Timestamp } from "../../../google/protobuf/timestamp"; export const protobufPackage = "cosmos.authz.v1beta1"; @@ -12,6 +13,14 @@ export interface GenesisState { authorization: GrantAuthorization[]; } +/** GrantAuthorization defines the GenesisState/GrantAuthorization type. */ +export interface GrantAuthorization { + granter: string; + grantee: string; + authorization?: Any; + expiration?: Date; +} + const baseGenesisState: object = {}; export const GenesisState = { @@ -74,6 +83,113 @@ export const GenesisState = { }, }; +const baseGrantAuthorization: object = { granter: "", grantee: "" }; + +export const GrantAuthorization = { + encode(message: GrantAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.granter !== "") { + writer.uint32(10).string(message.granter); + } + if (message.grantee !== "") { + writer.uint32(18).string(message.grantee); + } + if (message.authorization !== undefined) { + Any.encode(message.authorization, writer.uint32(26).fork()).ldelim(); + } + if (message.expiration !== undefined) { + Timestamp.encode(toTimestamp(message.expiration), writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GrantAuthorization { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseGrantAuthorization } as GrantAuthorization; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.granter = reader.string(); + break; + case 2: + message.grantee = reader.string(); + break; + case 3: + message.authorization = Any.decode(reader, reader.uint32()); + break; + case 4: + message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): GrantAuthorization { + const message = { ...baseGrantAuthorization } as GrantAuthorization; + if (object.granter !== undefined && object.granter !== null) { + message.granter = String(object.granter); + } else { + message.granter = ""; + } + if (object.grantee !== undefined && object.grantee !== null) { + message.grantee = String(object.grantee); + } else { + message.grantee = ""; + } + if (object.authorization !== undefined && object.authorization !== null) { + message.authorization = Any.fromJSON(object.authorization); + } else { + message.authorization = undefined; + } + if (object.expiration !== undefined && object.expiration !== null) { + message.expiration = fromJsonTimestamp(object.expiration); + } else { + message.expiration = undefined; + } + return message; + }, + + toJSON(message: GrantAuthorization): unknown { + const obj: any = {}; + message.granter !== undefined && (obj.granter = message.granter); + message.grantee !== undefined && (obj.grantee = message.grantee); + message.authorization !== undefined && + (obj.authorization = message.authorization ? Any.toJSON(message.authorization) : undefined); + message.expiration !== undefined && (obj.expiration = message.expiration.toISOString()); + return obj; + }, + + fromPartial(object: DeepPartial): GrantAuthorization { + const message = { ...baseGrantAuthorization } as GrantAuthorization; + if (object.granter !== undefined && object.granter !== null) { + message.granter = object.granter; + } else { + message.granter = ""; + } + if (object.grantee !== undefined && object.grantee !== null) { + message.grantee = object.grantee; + } else { + message.grantee = ""; + } + if (object.authorization !== undefined && object.authorization !== null) { + message.authorization = Any.fromPartial(object.authorization); + } else { + message.authorization = undefined; + } + if (object.expiration !== undefined && object.expiration !== null) { + message.expiration = object.expiration; + } else { + message.expiration = undefined; + } + return message; + }, +}; + type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined | Long; export type DeepPartial = T extends Builtin ? T @@ -85,6 +201,32 @@ export type DeepPartial = T extends Builtin ? { [K in keyof T]?: DeepPartial } : Partial; +function toTimestamp(date: Date): Timestamp { + const seconds = numberToLong(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.toNumber() * 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 numberToLong(number: number) { + return Long.fromNumber(number); +} + if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; _m0.configure(); diff --git a/js/src/cosmos/authz/v1beta1/query.ts b/js/src/cosmos/authz/v1beta1/query.ts index a3aa13c..9f5a623 100644 --- a/js/src/cosmos/authz/v1beta1/query.ts +++ b/js/src/cosmos/authz/v1beta1/query.ts @@ -4,7 +4,7 @@ import { grpc } from "@improbable-eng/grpc-web"; import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { BrowserHeaders } from "browser-headers"; -import { Grant, GrantAuthorization } from "../../../cosmos/authz/v1beta1/authz"; +import { Grant } from "../../../cosmos/authz/v1beta1/authz"; export const protobufPackage = "cosmos.authz.v1beta1"; @@ -28,36 +28,6 @@ export interface QueryGrantsResponse { pagination?: PageResponse; } -/** QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. */ -export interface QueryGranterGrantsRequest { - granter: string; - /** pagination defines an pagination for the request. */ - pagination?: PageRequest; -} - -/** QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. */ -export interface QueryGranterGrantsResponse { - /** grants is a list of grants granted by the granter. */ - grants: GrantAuthorization[]; - /** pagination defines an pagination for the response. */ - pagination?: PageResponse; -} - -/** QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. */ -export interface QueryGranteeGrantsRequest { - grantee: string; - /** pagination defines an pagination for the request. */ - pagination?: PageRequest; -} - -/** QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. */ -export interface QueryGranteeGrantsResponse { - /** grants is a list of grants granted to the grantee. */ - grants: GrantAuthorization[]; - /** pagination defines an pagination for the response. */ - pagination?: PageResponse; -} - const baseQueryGrantsRequest: object = { granter: "", grantee: "", msgTypeUrl: "" }; export const QueryGrantsRequest = { @@ -245,334 +215,10 @@ export const QueryGrantsResponse = { }, }; -const baseQueryGranterGrantsRequest: object = { granter: "" }; - -export const QueryGranterGrantsRequest = { - encode(message: QueryGranterGrantsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranterGrantsRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGranterGrantsRequest } as QueryGranterGrantsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGranterGrantsRequest { - const message = { ...baseQueryGranterGrantsRequest } as QueryGranterGrantsRequest; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryGranterGrantsRequest): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryGranterGrantsRequest { - const message = { ...baseQueryGranterGrantsRequest } as QueryGranterGrantsRequest; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryGranterGrantsResponse: object = {}; - -export const QueryGranterGrantsResponse = { - encode(message: QueryGranterGrantsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.grants) { - GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranterGrantsResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGranterGrantsResponse } as QueryGranterGrantsResponse; - message.grants = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grants.push(GrantAuthorization.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): QueryGranterGrantsResponse { - const message = { ...baseQueryGranterGrantsResponse } as QueryGranterGrantsResponse; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(GrantAuthorization.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryGranterGrantsResponse): unknown { - const obj: any = {}; - if (message.grants) { - obj.grants = message.grants.map((e) => (e ? GrantAuthorization.toJSON(e) : undefined)); - } else { - obj.grants = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryGranterGrantsResponse { - const message = { ...baseQueryGranterGrantsResponse } as QueryGranterGrantsResponse; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(GrantAuthorization.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryGranteeGrantsRequest: object = { grantee: "" }; - -export const QueryGranteeGrantsRequest = { - encode(message: QueryGranteeGrantsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.grantee !== "") { - writer.uint32(10).string(message.grantee); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranteeGrantsRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGranteeGrantsRequest } as QueryGranteeGrantsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grantee = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGranteeGrantsRequest { - const message = { ...baseQueryGranteeGrantsRequest } as QueryGranteeGrantsRequest; - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = String(object.grantee); - } else { - message.grantee = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryGranteeGrantsRequest): unknown { - const obj: any = {}; - message.grantee !== undefined && (obj.grantee = message.grantee); - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryGranteeGrantsRequest { - const message = { ...baseQueryGranteeGrantsRequest } as QueryGranteeGrantsRequest; - if (object.grantee !== undefined && object.grantee !== null) { - message.grantee = object.grantee; - } else { - message.grantee = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryGranteeGrantsResponse: object = {}; - -export const QueryGranteeGrantsResponse = { - encode(message: QueryGranteeGrantsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.grants) { - GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranteeGrantsResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGranteeGrantsResponse } as QueryGranteeGrantsResponse; - message.grants = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grants.push(GrantAuthorization.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): QueryGranteeGrantsResponse { - const message = { ...baseQueryGranteeGrantsResponse } as QueryGranteeGrantsResponse; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(GrantAuthorization.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryGranteeGrantsResponse): unknown { - const obj: any = {}; - if (message.grants) { - obj.grants = message.grants.map((e) => (e ? GrantAuthorization.toJSON(e) : undefined)); - } else { - obj.grants = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryGranteeGrantsResponse { - const message = { ...baseQueryGranteeGrantsResponse } as QueryGranteeGrantsResponse; - message.grants = []; - if (object.grants !== undefined && object.grants !== null) { - for (const e of object.grants) { - message.grants.push(GrantAuthorization.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 { /** Returns list of `Authorization`, granted to the grantee by the granter. */ Grants(request: DeepPartial, metadata?: grpc.Metadata): Promise; - /** - * GranterGrants returns list of `GrantAuthorization`, granted by granter. - * - * Since: cosmos-sdk 0.45.2 - */ - GranterGrants( - request: DeepPartial, - metadata?: grpc.Metadata, - ): Promise; - /** - * GranteeGrants returns a list of `GrantAuthorization` by grantee. - * - * Since: cosmos-sdk 0.45.2 - */ - GranteeGrants( - request: DeepPartial, - metadata?: grpc.Metadata, - ): Promise; } export class QueryClientImpl implements Query { @@ -581,27 +227,11 @@ export class QueryClientImpl implements Query { constructor(rpc: Rpc) { this.rpc = rpc; this.Grants = this.Grants.bind(this); - this.GranterGrants = this.GranterGrants.bind(this); - this.GranteeGrants = this.GranteeGrants.bind(this); } Grants(request: DeepPartial, metadata?: grpc.Metadata): Promise { return this.rpc.unary(QueryGrantsDesc, QueryGrantsRequest.fromPartial(request), metadata); } - - GranterGrants( - request: DeepPartial, - metadata?: grpc.Metadata, - ): Promise { - return this.rpc.unary(QueryGranterGrantsDesc, QueryGranterGrantsRequest.fromPartial(request), metadata); - } - - GranteeGrants( - request: DeepPartial, - metadata?: grpc.Metadata, - ): Promise { - return this.rpc.unary(QueryGranteeGrantsDesc, QueryGranteeGrantsRequest.fromPartial(request), metadata); - } } export const QueryDesc = { @@ -630,50 +260,6 @@ export const QueryGrantsDesc: UnaryMethodDefinitionish = { } as any, }; -export const QueryGranterGrantsDesc: UnaryMethodDefinitionish = { - methodName: "GranterGrants", - service: QueryDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return QueryGranterGrantsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...QueryGranterGrantsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; - -export const QueryGranteeGrantsDesc: UnaryMethodDefinitionish = { - methodName: "GranteeGrants", - service: QueryDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return QueryGranteeGrantsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...QueryGranteeGrantsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; - interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; diff --git a/js/src/cosmos/bank/v1beta1/query.ts b/js/src/cosmos/bank/v1beta1/query.ts index c5950ab..a9ac4ed 100644 --- a/js/src/cosmos/bank/v1beta1/query.ts +++ b/js/src/cosmos/bank/v1beta1/query.ts @@ -42,28 +42,6 @@ export interface QueryAllBalancesResponse { pagination?: PageResponse; } -/** - * QuerySpendableBalancesRequest defines the gRPC request structure for querying - * an account's spendable balances. - */ -export interface QuerySpendableBalancesRequest { - /** address is the address to query spendable balances for. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest; -} - -/** - * QuerySpendableBalancesResponse defines the gRPC response structure for querying - * an account's spendable balances. - */ -export interface QuerySpendableBalancesResponse { - /** balances is the spendable balances of all the coins. */ - balances: Coin[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse; -} - /** * QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC * method. @@ -425,159 +403,6 @@ export const QueryAllBalancesResponse = { }, }; -const baseQuerySpendableBalancesRequest: object = { address: "" }; - -export const QuerySpendableBalancesRequest = { - encode(message: QuerySpendableBalancesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QuerySpendableBalancesRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQuerySpendableBalancesRequest } as QuerySpendableBalancesRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QuerySpendableBalancesRequest { - const message = { ...baseQuerySpendableBalancesRequest } as QuerySpendableBalancesRequest; - if (object.address !== undefined && object.address !== null) { - message.address = String(object.address); - } else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QuerySpendableBalancesRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QuerySpendableBalancesRequest { - const message = { ...baseQuerySpendableBalancesRequest } as QuerySpendableBalancesRequest; - if (object.address !== undefined && object.address !== null) { - message.address = object.address; - } else { - message.address = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQuerySpendableBalancesResponse: object = {}; - -export const QuerySpendableBalancesResponse = { - encode(message: QuerySpendableBalancesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.balances) { - Coin.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QuerySpendableBalancesResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQuerySpendableBalancesResponse } as QuerySpendableBalancesResponse; - message.balances = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balances.push(Coin.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): QuerySpendableBalancesResponse { - const message = { ...baseQuerySpendableBalancesResponse } as QuerySpendableBalancesResponse; - message.balances = []; - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Coin.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QuerySpendableBalancesResponse): unknown { - const obj: any = {}; - if (message.balances) { - obj.balances = message.balances.map((e) => (e ? Coin.toJSON(e) : undefined)); - } else { - obj.balances = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QuerySpendableBalancesResponse { - const message = { ...baseQuerySpendableBalancesResponse } as QuerySpendableBalancesResponse; - message.balances = []; - if (object.balances !== undefined && object.balances !== null) { - for (const e of object.balances) { - message.balances.push(Coin.fromPartial(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - const baseQueryTotalSupplyRequest: object = {}; export const QueryTotalSupplyRequest = { @@ -1173,14 +998,6 @@ export interface Query { request: DeepPartial, metadata?: grpc.Metadata, ): Promise; - /** - * SpendableBalances queries the spenable balance of all coins for a single - * account. - */ - SpendableBalances( - request: DeepPartial, - metadata?: grpc.Metadata, - ): Promise; /** TotalSupply queries the total supply of all coins. */ TotalSupply( request: DeepPartial, @@ -1212,7 +1029,6 @@ export class QueryClientImpl implements Query { this.rpc = rpc; this.Balance = this.Balance.bind(this); this.AllBalances = this.AllBalances.bind(this); - this.SpendableBalances = this.SpendableBalances.bind(this); this.TotalSupply = this.TotalSupply.bind(this); this.SupplyOf = this.SupplyOf.bind(this); this.Params = this.Params.bind(this); @@ -1234,17 +1050,6 @@ export class QueryClientImpl implements Query { return this.rpc.unary(QueryAllBalancesDesc, QueryAllBalancesRequest.fromPartial(request), metadata); } - SpendableBalances( - request: DeepPartial, - metadata?: grpc.Metadata, - ): Promise { - return this.rpc.unary( - QuerySpendableBalancesDesc, - QuerySpendableBalancesRequest.fromPartial(request), - metadata, - ); - } - TotalSupply( request: DeepPartial, metadata?: grpc.Metadata, @@ -1326,28 +1131,6 @@ export const QueryAllBalancesDesc: UnaryMethodDefinitionish = { } as any, }; -export const QuerySpendableBalancesDesc: UnaryMethodDefinitionish = { - methodName: "SpendableBalances", - service: QueryDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return QuerySpendableBalancesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...QuerySpendableBalancesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; - export const QueryTotalSupplyDesc: UnaryMethodDefinitionish = { methodName: "TotalSupply", service: QueryDesc, diff --git a/js/src/cosmos/base/snapshots/v1beta1/snapshot.ts b/js/src/cosmos/base/snapshots/v1beta1/snapshot.ts index 74cc948..413f9e8 100644 --- a/js/src/cosmos/base/snapshots/v1beta1/snapshot.ts +++ b/js/src/cosmos/base/snapshots/v1beta1/snapshot.ts @@ -19,40 +19,6 @@ export interface Metadata { chunkHashes: Uint8Array[]; } -/** SnapshotItem is an item contained in a rootmulti.Store snapshot. */ -export interface SnapshotItem { - store?: SnapshotStoreItem | undefined; - iavl?: SnapshotIAVLItem | undefined; - extension?: SnapshotExtensionMeta | undefined; - extensionPayload?: SnapshotExtensionPayload | undefined; -} - -/** SnapshotStoreItem contains metadata about a snapshotted store. */ -export interface SnapshotStoreItem { - name: string; -} - -/** SnapshotIAVLItem is an exported IAVL node. */ -export interface SnapshotIAVLItem { - key: Uint8Array; - value: Uint8Array; - /** version is block height */ - version: Long; - /** height is depth of the tree. */ - height: number; -} - -/** SnapshotExtensionMeta contains metadata about an external snapshotter. */ -export interface SnapshotExtensionMeta { - name: string; - format: number; -} - -/** SnapshotExtensionPayload contains payloads of an external snapshotter. */ -export interface SnapshotExtensionPayload { - payload: Uint8Array; -} - const baseSnapshot: object = { height: Long.UZERO, format: 0, chunks: 0 }; export const Snapshot = { @@ -242,409 +208,6 @@ export const Metadata = { }, }; -const baseSnapshotItem: object = {}; - -export const SnapshotItem = { - encode(message: SnapshotItem, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.store !== undefined) { - SnapshotStoreItem.encode(message.store, writer.uint32(10).fork()).ldelim(); - } - if (message.iavl !== undefined) { - SnapshotIAVLItem.encode(message.iavl, writer.uint32(18).fork()).ldelim(); - } - if (message.extension !== undefined) { - SnapshotExtensionMeta.encode(message.extension, writer.uint32(26).fork()).ldelim(); - } - if (message.extensionPayload !== undefined) { - SnapshotExtensionPayload.encode(message.extensionPayload, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotItem { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSnapshotItem } as SnapshotItem; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.store = SnapshotStoreItem.decode(reader, reader.uint32()); - break; - case 2: - message.iavl = SnapshotIAVLItem.decode(reader, reader.uint32()); - break; - case 3: - message.extension = SnapshotExtensionMeta.decode(reader, reader.uint32()); - break; - case 4: - message.extensionPayload = SnapshotExtensionPayload.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SnapshotItem { - const message = { ...baseSnapshotItem } as SnapshotItem; - if (object.store !== undefined && object.store !== null) { - message.store = SnapshotStoreItem.fromJSON(object.store); - } else { - message.store = undefined; - } - if (object.iavl !== undefined && object.iavl !== null) { - message.iavl = SnapshotIAVLItem.fromJSON(object.iavl); - } else { - message.iavl = undefined; - } - if (object.extension !== undefined && object.extension !== null) { - message.extension = SnapshotExtensionMeta.fromJSON(object.extension); - } else { - message.extension = undefined; - } - if (object.extensionPayload !== undefined && object.extensionPayload !== null) { - message.extensionPayload = SnapshotExtensionPayload.fromJSON(object.extensionPayload); - } else { - message.extensionPayload = undefined; - } - return message; - }, - - toJSON(message: SnapshotItem): unknown { - const obj: any = {}; - message.store !== undefined && - (obj.store = message.store ? SnapshotStoreItem.toJSON(message.store) : undefined); - message.iavl !== undefined && - (obj.iavl = message.iavl ? SnapshotIAVLItem.toJSON(message.iavl) : undefined); - message.extension !== undefined && - (obj.extension = message.extension ? SnapshotExtensionMeta.toJSON(message.extension) : undefined); - message.extensionPayload !== undefined && - (obj.extensionPayload = message.extensionPayload - ? SnapshotExtensionPayload.toJSON(message.extensionPayload) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): SnapshotItem { - const message = { ...baseSnapshotItem } as SnapshotItem; - if (object.store !== undefined && object.store !== null) { - message.store = SnapshotStoreItem.fromPartial(object.store); - } else { - message.store = undefined; - } - if (object.iavl !== undefined && object.iavl !== null) { - message.iavl = SnapshotIAVLItem.fromPartial(object.iavl); - } else { - message.iavl = undefined; - } - if (object.extension !== undefined && object.extension !== null) { - message.extension = SnapshotExtensionMeta.fromPartial(object.extension); - } else { - message.extension = undefined; - } - if (object.extensionPayload !== undefined && object.extensionPayload !== null) { - message.extensionPayload = SnapshotExtensionPayload.fromPartial(object.extensionPayload); - } else { - message.extensionPayload = undefined; - } - return message; - }, -}; - -const baseSnapshotStoreItem: object = { name: "" }; - -export const SnapshotStoreItem = { - encode(message: SnapshotStoreItem, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotStoreItem { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSnapshotStoreItem } as SnapshotStoreItem; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SnapshotStoreItem { - const message = { ...baseSnapshotStoreItem } as SnapshotStoreItem; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - return message; - }, - - toJSON(message: SnapshotStoreItem): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - return obj; - }, - - fromPartial(object: DeepPartial): SnapshotStoreItem { - const message = { ...baseSnapshotStoreItem } as SnapshotStoreItem; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - return message; - }, -}; - -const baseSnapshotIAVLItem: object = { version: Long.ZERO, height: 0 }; - -export const SnapshotIAVLItem = { - encode(message: SnapshotIAVLItem, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.key.length !== 0) { - writer.uint32(10).bytes(message.key); - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value); - } - if (!message.version.isZero()) { - writer.uint32(24).int64(message.version); - } - if (message.height !== 0) { - writer.uint32(32).int32(message.height); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotIAVLItem { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSnapshotIAVLItem } as SnapshotIAVLItem; - message.key = new Uint8Array(); - message.value = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.version = reader.int64() as Long; - break; - case 4: - message.height = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SnapshotIAVLItem { - const message = { ...baseSnapshotIAVLItem } as SnapshotIAVLItem; - message.key = new Uint8Array(); - message.value = new Uint8Array(); - if (object.key !== undefined && object.key !== null) { - message.key = bytesFromBase64(object.key); - } - if (object.value !== undefined && object.value !== null) { - message.value = bytesFromBase64(object.value); - } - if (object.version !== undefined && object.version !== null) { - message.version = Long.fromString(object.version); - } else { - message.version = Long.ZERO; - } - if (object.height !== undefined && object.height !== null) { - message.height = Number(object.height); - } else { - message.height = 0; - } - return message; - }, - - toJSON(message: SnapshotIAVLItem): unknown { - const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); - message.version !== undefined && (obj.version = (message.version || Long.ZERO).toString()); - message.height !== undefined && (obj.height = message.height); - return obj; - }, - - fromPartial(object: DeepPartial): SnapshotIAVLItem { - const message = { ...baseSnapshotIAVLItem } as SnapshotIAVLItem; - if (object.key !== undefined && object.key !== null) { - message.key = object.key; - } else { - message.key = new Uint8Array(); - } - if (object.value !== undefined && object.value !== null) { - message.value = object.value; - } else { - message.value = new Uint8Array(); - } - if (object.version !== undefined && object.version !== null) { - message.version = object.version as Long; - } else { - message.version = Long.ZERO; - } - if (object.height !== undefined && object.height !== null) { - message.height = object.height; - } else { - message.height = 0; - } - return message; - }, -}; - -const baseSnapshotExtensionMeta: object = { name: "", format: 0 }; - -export const SnapshotExtensionMeta = { - encode(message: SnapshotExtensionMeta, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotExtensionMeta { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSnapshotExtensionMeta } as SnapshotExtensionMeta; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.format = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SnapshotExtensionMeta { - const message = { ...baseSnapshotExtensionMeta } as SnapshotExtensionMeta; - if (object.name !== undefined && object.name !== null) { - message.name = String(object.name); - } else { - message.name = ""; - } - if (object.format !== undefined && object.format !== null) { - message.format = Number(object.format); - } else { - message.format = 0; - } - return message; - }, - - toJSON(message: SnapshotExtensionMeta): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.format !== undefined && (obj.format = message.format); - return obj; - }, - - fromPartial(object: DeepPartial): SnapshotExtensionMeta { - const message = { ...baseSnapshotExtensionMeta } as SnapshotExtensionMeta; - if (object.name !== undefined && object.name !== null) { - message.name = object.name; - } else { - message.name = ""; - } - if (object.format !== undefined && object.format !== null) { - message.format = object.format; - } else { - message.format = 0; - } - return message; - }, -}; - -const baseSnapshotExtensionPayload: object = {}; - -export const SnapshotExtensionPayload = { - encode(message: SnapshotExtensionPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.payload.length !== 0) { - writer.uint32(10).bytes(message.payload); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotExtensionPayload { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseSnapshotExtensionPayload } as SnapshotExtensionPayload; - message.payload = new Uint8Array(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.payload = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): SnapshotExtensionPayload { - const message = { ...baseSnapshotExtensionPayload } as SnapshotExtensionPayload; - message.payload = new Uint8Array(); - if (object.payload !== undefined && object.payload !== null) { - message.payload = bytesFromBase64(object.payload); - } - return message; - }, - - toJSON(message: SnapshotExtensionPayload): unknown { - const obj: any = {}; - message.payload !== undefined && - (obj.payload = base64FromBytes(message.payload !== undefined ? message.payload : new Uint8Array())); - return obj; - }, - - fromPartial(object: DeepPartial): SnapshotExtensionPayload { - const message = { ...baseSnapshotExtensionPayload } as SnapshotExtensionPayload; - if (object.payload !== undefined && object.payload !== null) { - message.payload = object.payload; - } else { - message.payload = new Uint8Array(); - } - return message; - }, -}; - declare var self: any | undefined; declare var window: any | undefined; var globalThis: any = (() => { diff --git a/js/src/cosmos/feegrant/v1beta1/query.ts b/js/src/cosmos/feegrant/v1beta1/query.ts index a0dc522..498ee16 100644 --- a/js/src/cosmos/feegrant/v1beta1/query.ts +++ b/js/src/cosmos/feegrant/v1beta1/query.ts @@ -39,21 +39,6 @@ export interface QueryAllowancesResponse { pagination?: PageResponse; } -/** QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. */ -export interface QueryAllowancesByGranterRequest { - granter: string; - /** pagination defines an pagination for the request. */ - pagination?: PageRequest; -} - -/** QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. */ -export interface QueryAllowancesByGranterResponse { - /** allowances that have been issued by the granter. */ - allowances: Grant[]; - /** pagination defines an pagination for the response. */ - pagination?: PageResponse; -} - const baseQueryAllowanceRequest: object = { granter: "", grantee: "" }; export const QueryAllowanceRequest = { @@ -335,159 +320,6 @@ export const QueryAllowancesResponse = { }, }; -const baseQueryAllowancesByGranterRequest: object = { granter: "" }; - -export const QueryAllowancesByGranterRequest = { - encode(message: QueryAllowancesByGranterRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllowancesByGranterRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAllowancesByGranterRequest } as QueryAllowancesByGranterRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryAllowancesByGranterRequest { - const message = { ...baseQueryAllowancesByGranterRequest } as QueryAllowancesByGranterRequest; - if (object.granter !== undefined && object.granter !== null) { - message.granter = String(object.granter); - } else { - message.granter = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllowancesByGranterRequest): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryAllowancesByGranterRequest { - const message = { ...baseQueryAllowancesByGranterRequest } as QueryAllowancesByGranterRequest; - if (object.granter !== undefined && object.granter !== null) { - message.granter = object.granter; - } else { - message.granter = ""; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseQueryAllowancesByGranterResponse: object = {}; - -export const QueryAllowancesByGranterResponse = { - encode(message: QueryAllowancesByGranterResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.allowances) { - Grant.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllowancesByGranterResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAllowancesByGranterResponse } as QueryAllowancesByGranterResponse; - message.allowances = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowances.push(Grant.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): QueryAllowancesByGranterResponse { - const message = { ...baseQueryAllowancesByGranterResponse } as QueryAllowancesByGranterResponse; - message.allowances = []; - if (object.allowances !== undefined && object.allowances !== null) { - for (const e of object.allowances) { - message.allowances.push(Grant.fromJSON(e)); - } - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: QueryAllowancesByGranterResponse): unknown { - const obj: any = {}; - if (message.allowances) { - obj.allowances = message.allowances.map((e) => (e ? Grant.toJSON(e) : undefined)); - } else { - obj.allowances = []; - } - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryAllowancesByGranterResponse { - const message = { ...baseQueryAllowancesByGranterResponse } as QueryAllowancesByGranterResponse; - message.allowances = []; - if (object.allowances !== undefined && object.allowances !== null) { - for (const e of object.allowances) { - message.allowances.push(Grant.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 { /** Allowance returns fee granted to the grantee by the granter. */ @@ -500,14 +332,6 @@ export interface Query { request: DeepPartial, metadata?: grpc.Metadata, ): Promise; - /** - * AllowancesByGranter returns all the grants given by an address - * Since v0.46 - */ - AllowancesByGranter( - request: DeepPartial, - metadata?: grpc.Metadata, - ): Promise; } export class QueryClientImpl implements Query { @@ -517,7 +341,6 @@ export class QueryClientImpl implements Query { this.rpc = rpc; this.Allowance = this.Allowance.bind(this); this.Allowances = this.Allowances.bind(this); - this.AllowancesByGranter = this.AllowancesByGranter.bind(this); } Allowance( @@ -533,17 +356,6 @@ export class QueryClientImpl implements Query { ): Promise { return this.rpc.unary(QueryAllowancesDesc, QueryAllowancesRequest.fromPartial(request), metadata); } - - AllowancesByGranter( - request: DeepPartial, - metadata?: grpc.Metadata, - ): Promise { - return this.rpc.unary( - QueryAllowancesByGranterDesc, - QueryAllowancesByGranterRequest.fromPartial(request), - metadata, - ); - } } export const QueryDesc = { @@ -594,28 +406,6 @@ export const QueryAllowancesDesc: UnaryMethodDefinitionish = { } as any, }; -export const QueryAllowancesByGranterDesc: UnaryMethodDefinitionish = { - methodName: "AllowancesByGranter", - service: QueryDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return QueryAllowancesByGranterRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...QueryAllowancesByGranterResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; - interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; diff --git a/js/src/cosmos/tx/signing/v1beta1/signing.ts b/js/src/cosmos/tx/signing/v1beta1/signing.ts index 80584f0..f7732fb 100644 --- a/js/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/js/src/cosmos/tx/signing/v1beta1/signing.ts @@ -29,19 +29,6 @@ export enum SignMode { * Amino JSON and will be removed in the future */ SIGN_MODE_LEGACY_AMINO_JSON = 127, - /** - * SIGN_MODE_EIP_191 - SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos - * SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 - * - * Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, - * but is not implemented on the SDK by default. To enable EIP-191, you need - * to pass a custom `TxConfig` that has an implementation of - * `SignModeHandler` for EIP-191. The SDK may decide to fully support - * EIP-191 in the future. - * - * Since: cosmos-sdk 0.45.2 - */ - SIGN_MODE_EIP_191 = 191, UNRECOGNIZED = -1, } @@ -59,9 +46,6 @@ export function signModeFromJSON(object: any): SignMode { case 127: case "SIGN_MODE_LEGACY_AMINO_JSON": return SignMode.SIGN_MODE_LEGACY_AMINO_JSON; - case 191: - case "SIGN_MODE_EIP_191": - return SignMode.SIGN_MODE_EIP_191; case -1: case "UNRECOGNIZED": default: @@ -79,8 +63,6 @@ export function signModeToJSON(object: SignMode): string { return "SIGN_MODE_TEXTUAL"; case SignMode.SIGN_MODE_LEGACY_AMINO_JSON: return "SIGN_MODE_LEGACY_AMINO_JSON"; - case SignMode.SIGN_MODE_EIP_191: - return "SIGN_MODE_EIP_191"; default: return "UNKNOWN"; } diff --git a/js/src/cosmos/tx/v1beta1/service.ts b/js/src/cosmos/tx/v1beta1/service.ts index 148e83f..7b72222 100644 --- a/js/src/cosmos/tx/v1beta1/service.ts +++ b/js/src/cosmos/tx/v1beta1/service.ts @@ -5,8 +5,6 @@ import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { TxResponse, GasInfo, Result } from "../../../cosmos/base/abci/v1beta1/abci"; import { Tx } from "../../../cosmos/tx/v1beta1/tx"; -import { BlockID } from "../../../tendermint/types/types"; -import { Block } from "../../../tendermint/types/block"; import { BrowserHeaders } from "browser-headers"; export const protobufPackage = "cosmos.tx.v1beta1"; @@ -118,7 +116,7 @@ export function broadcastModeToJSON(object: BroadcastMode): string { export interface GetTxsEventRequest { /** events is the list of transaction event type. */ events: string[]; - /** pagination defines a pagination for the request. */ + /** pagination defines an pagination for the request. */ pagination?: PageRequest; orderBy: OrderBy; } @@ -132,7 +130,7 @@ export interface GetTxsEventResponse { txs: Tx[]; /** tx_responses is the list of queried TxResponses. */ txResponses: TxResponse[]; - /** pagination defines a pagination for the response. */ + /** pagination defines an pagination for the response. */ pagination?: PageResponse; } @@ -203,33 +201,6 @@ export interface GetTxResponse { txResponse?: TxResponse; } -/** - * GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs - * RPC method. - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GetBlockWithTxsRequest { - /** height is the height of the block to query. */ - height: Long; - /** pagination defines a pagination for the request. */ - pagination?: PageRequest; -} - -/** - * GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. - * - * Since: cosmos-sdk 0.45.2 - */ -export interface GetBlockWithTxsResponse { - /** txs are the transactions in the block. */ - txs: Tx[]; - blockId?: BlockID; - block?: Block; - /** pagination defines a pagination for the response. */ - pagination?: PageResponse; -} - const baseGetTxsEventRequest: object = { events: "", orderBy: 0 }; export const GetTxsEventRequest = { @@ -834,194 +805,6 @@ export const GetTxResponse = { }, }; -const baseGetBlockWithTxsRequest: object = { height: Long.ZERO }; - -export const GetBlockWithTxsRequest = { - encode(message: GetBlockWithTxsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (!message.height.isZero()) { - writer.uint32(8).int64(message.height); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetBlockWithTxsRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGetBlockWithTxsRequest } as GetBlockWithTxsRequest; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64() as Long; - break; - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetBlockWithTxsRequest { - const message = { ...baseGetBlockWithTxsRequest } as GetBlockWithTxsRequest; - if (object.height !== undefined && object.height !== null) { - message.height = Long.fromString(object.height); - } else { - message.height = Long.ZERO; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: GetBlockWithTxsRequest): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || Long.ZERO).toString()); - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GetBlockWithTxsRequest { - const message = { ...baseGetBlockWithTxsRequest } as GetBlockWithTxsRequest; - if (object.height !== undefined && object.height !== null) { - message.height = object.height as Long; - } else { - message.height = Long.ZERO; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageRequest.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - -const baseGetBlockWithTxsResponse: object = {}; - -export const GetBlockWithTxsResponse = { - encode(message: GetBlockWithTxsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.txs) { - Tx.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(18).fork()).ldelim(); - } - if (message.block !== undefined) { - Block.encode(message.block, writer.uint32(26).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetBlockWithTxsResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseGetBlockWithTxsResponse } as GetBlockWithTxsResponse; - message.txs = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txs.push(Tx.decode(reader, reader.uint32())); - break; - case 2: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - case 3: - message.block = Block.decode(reader, reader.uint32()); - break; - case 4: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GetBlockWithTxsResponse { - const message = { ...baseGetBlockWithTxsResponse } as GetBlockWithTxsResponse; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(Tx.fromJSON(e)); - } - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromJSON(object.blockId); - } else { - message.blockId = undefined; - } - if (object.block !== undefined && object.block !== null) { - message.block = Block.fromJSON(object.block); - } else { - message.block = undefined; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromJSON(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, - - toJSON(message: GetBlockWithTxsResponse): unknown { - const obj: any = {}; - if (message.txs) { - obj.txs = message.txs.map((e) => (e ? Tx.toJSON(e) : undefined)); - } else { - obj.txs = []; - } - message.blockId !== undefined && - (obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined); - message.block !== undefined && (obj.block = message.block ? Block.toJSON(message.block) : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GetBlockWithTxsResponse { - const message = { ...baseGetBlockWithTxsResponse } as GetBlockWithTxsResponse; - message.txs = []; - if (object.txs !== undefined && object.txs !== null) { - for (const e of object.txs) { - message.txs.push(Tx.fromPartial(e)); - } - } - if (object.blockId !== undefined && object.blockId !== null) { - message.blockId = BlockID.fromPartial(object.blockId); - } else { - message.blockId = undefined; - } - if (object.block !== undefined && object.block !== null) { - message.block = Block.fromPartial(object.block); - } else { - message.block = undefined; - } - if (object.pagination !== undefined && object.pagination !== null) { - message.pagination = PageResponse.fromPartial(object.pagination); - } else { - message.pagination = undefined; - } - return message; - }, -}; - /** Service defines a gRPC service for interacting with transactions. */ export interface Service { /** Simulate simulates executing a transaction for estimating gas usage. */ @@ -1038,15 +821,6 @@ export interface Service { request: DeepPartial, metadata?: grpc.Metadata, ): Promise; - /** - * GetBlockWithTxs fetches a block with decoded txs. - * - * Since: cosmos-sdk 0.45.2 - */ - GetBlockWithTxs( - request: DeepPartial, - metadata?: grpc.Metadata, - ): Promise; } export class ServiceClientImpl implements Service { @@ -1058,7 +832,6 @@ export class ServiceClientImpl implements Service { this.GetTx = this.GetTx.bind(this); this.BroadcastTx = this.BroadcastTx.bind(this); this.GetTxsEvent = this.GetTxsEvent.bind(this); - this.GetBlockWithTxs = this.GetBlockWithTxs.bind(this); } Simulate(request: DeepPartial, metadata?: grpc.Metadata): Promise { @@ -1082,13 +855,6 @@ export class ServiceClientImpl implements Service { ): Promise { return this.rpc.unary(ServiceGetTxsEventDesc, GetTxsEventRequest.fromPartial(request), metadata); } - - GetBlockWithTxs( - request: DeepPartial, - metadata?: grpc.Metadata, - ): Promise { - return this.rpc.unary(ServiceGetBlockWithTxsDesc, GetBlockWithTxsRequest.fromPartial(request), metadata); - } } export const ServiceDesc = { @@ -1183,28 +949,6 @@ export const ServiceGetTxsEventDesc: UnaryMethodDefinitionish = { } as any, }; -export const ServiceGetBlockWithTxsDesc: UnaryMethodDefinitionish = { - methodName: "GetBlockWithTxs", - service: ServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetBlockWithTxsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetBlockWithTxsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; - interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; diff --git a/js/src/cosmos/vesting/v1beta1/tx.ts b/js/src/cosmos/vesting/v1beta1/tx.ts index 736e3ee..27160f9 100644 --- a/js/src/cosmos/vesting/v1beta1/tx.ts +++ b/js/src/cosmos/vesting/v1beta1/tx.ts @@ -4,7 +4,6 @@ import { grpc } from "@improbable-eng/grpc-web"; import _m0 from "protobufjs/minimal"; import { BrowserHeaders } from "browser-headers"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; -import { Period } from "../../../cosmos/vesting/v1beta1/vesting"; export const protobufPackage = "cosmos.vesting.v1beta1"; @@ -23,37 +22,6 @@ export interface MsgCreateVestingAccount { /** MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. */ export interface MsgCreateVestingAccountResponse {} -/** - * MsgCreatePeriodicVestingAccount defines a message that enables creating a vesting - * account. - */ -export interface MsgCreatePeriodicVestingAccount { - fromAddress: string; - toAddress: string; - startTime: Long; - vestingPeriods: Period[]; -} - -/** - * MsgCreatePeriodicVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount - * response type. - */ -export interface MsgCreatePeriodicVestingAccountResponse {} - -/** - * MsgDonateAllVestingTokens defines a message that enables donating all vesting - * token to community pool. - */ -export interface MsgDonateAllVestingTokens { - fromAddress: string; -} - -/** - * MsgDonateAllVestingTokensResponse defines the Msg/MsgDonateAllVestingTokens - * response type. - */ -export interface MsgDonateAllVestingTokensResponse {} - const baseMsgCreateVestingAccount: object = { fromAddress: "", toAddress: "", @@ -227,258 +195,6 @@ export const MsgCreateVestingAccountResponse = { }, }; -const baseMsgCreatePeriodicVestingAccount: object = { fromAddress: "", toAddress: "", startTime: Long.ZERO }; - -export const MsgCreatePeriodicVestingAccount = { - encode(message: MsgCreatePeriodicVestingAccount, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.fromAddress !== "") { - writer.uint32(10).string(message.fromAddress); - } - if (message.toAddress !== "") { - writer.uint32(18).string(message.toAddress); - } - if (!message.startTime.isZero()) { - writer.uint32(24).int64(message.startTime); - } - for (const v of message.vestingPeriods) { - Period.encode(v!, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreatePeriodicVestingAccount { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgCreatePeriodicVestingAccount } as MsgCreatePeriodicVestingAccount; - message.vestingPeriods = []; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - message.startTime = reader.int64() as Long; - break; - case 4: - message.vestingPeriods.push(Period.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgCreatePeriodicVestingAccount { - const message = { ...baseMsgCreatePeriodicVestingAccount } as MsgCreatePeriodicVestingAccount; - message.vestingPeriods = []; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = String(object.fromAddress); - } else { - message.fromAddress = ""; - } - if (object.toAddress !== undefined && object.toAddress !== null) { - message.toAddress = String(object.toAddress); - } else { - message.toAddress = ""; - } - if (object.startTime !== undefined && object.startTime !== null) { - message.startTime = Long.fromString(object.startTime); - } else { - message.startTime = Long.ZERO; - } - if (object.vestingPeriods !== undefined && object.vestingPeriods !== null) { - for (const e of object.vestingPeriods) { - message.vestingPeriods.push(Period.fromJSON(e)); - } - } - return message; - }, - - toJSON(message: MsgCreatePeriodicVestingAccount): unknown { - const obj: any = {}; - message.fromAddress !== undefined && (obj.fromAddress = message.fromAddress); - message.toAddress !== undefined && (obj.toAddress = message.toAddress); - message.startTime !== undefined && (obj.startTime = (message.startTime || Long.ZERO).toString()); - if (message.vestingPeriods) { - obj.vestingPeriods = message.vestingPeriods.map((e) => (e ? Period.toJSON(e) : undefined)); - } else { - obj.vestingPeriods = []; - } - return obj; - }, - - fromPartial(object: DeepPartial): MsgCreatePeriodicVestingAccount { - const message = { ...baseMsgCreatePeriodicVestingAccount } as MsgCreatePeriodicVestingAccount; - message.vestingPeriods = []; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = object.fromAddress; - } else { - message.fromAddress = ""; - } - if (object.toAddress !== undefined && object.toAddress !== null) { - message.toAddress = object.toAddress; - } else { - message.toAddress = ""; - } - if (object.startTime !== undefined && object.startTime !== null) { - message.startTime = object.startTime as Long; - } else { - message.startTime = Long.ZERO; - } - if (object.vestingPeriods !== undefined && object.vestingPeriods !== null) { - for (const e of object.vestingPeriods) { - message.vestingPeriods.push(Period.fromPartial(e)); - } - } - return message; - }, -}; - -const baseMsgCreatePeriodicVestingAccountResponse: object = {}; - -export const MsgCreatePeriodicVestingAccountResponse = { - encode(_: MsgCreatePeriodicVestingAccountResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreatePeriodicVestingAccountResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseMsgCreatePeriodicVestingAccountResponse, - } as MsgCreatePeriodicVestingAccountResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgCreatePeriodicVestingAccountResponse { - const message = { - ...baseMsgCreatePeriodicVestingAccountResponse, - } as MsgCreatePeriodicVestingAccountResponse; - return message; - }, - - toJSON(_: MsgCreatePeriodicVestingAccountResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial( - _: DeepPartial, - ): MsgCreatePeriodicVestingAccountResponse { - const message = { - ...baseMsgCreatePeriodicVestingAccountResponse, - } as MsgCreatePeriodicVestingAccountResponse; - return message; - }, -}; - -const baseMsgDonateAllVestingTokens: object = { fromAddress: "" }; - -export const MsgDonateAllVestingTokens = { - encode(message: MsgDonateAllVestingTokens, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.fromAddress !== "") { - writer.uint32(10).string(message.fromAddress); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgDonateAllVestingTokens { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDonateAllVestingTokens } as MsgDonateAllVestingTokens; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgDonateAllVestingTokens { - const message = { ...baseMsgDonateAllVestingTokens } as MsgDonateAllVestingTokens; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = String(object.fromAddress); - } else { - message.fromAddress = ""; - } - return message; - }, - - toJSON(message: MsgDonateAllVestingTokens): unknown { - const obj: any = {}; - message.fromAddress !== undefined && (obj.fromAddress = message.fromAddress); - return obj; - }, - - fromPartial(object: DeepPartial): MsgDonateAllVestingTokens { - const message = { ...baseMsgDonateAllVestingTokens } as MsgDonateAllVestingTokens; - if (object.fromAddress !== undefined && object.fromAddress !== null) { - message.fromAddress = object.fromAddress; - } else { - message.fromAddress = ""; - } - return message; - }, -}; - -const baseMsgDonateAllVestingTokensResponse: object = {}; - -export const MsgDonateAllVestingTokensResponse = { - encode(_: MsgDonateAllVestingTokensResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgDonateAllVestingTokensResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseMsgDonateAllVestingTokensResponse } as MsgDonateAllVestingTokensResponse; - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): MsgDonateAllVestingTokensResponse { - const message = { ...baseMsgDonateAllVestingTokensResponse } as MsgDonateAllVestingTokensResponse; - return message; - }, - - toJSON(_: MsgDonateAllVestingTokensResponse): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial(_: DeepPartial): MsgDonateAllVestingTokensResponse { - const message = { ...baseMsgDonateAllVestingTokensResponse } as MsgDonateAllVestingTokensResponse; - return message; - }, -}; - /** Msg defines the bank Msg service. */ export interface Msg { /** @@ -489,22 +205,6 @@ export interface Msg { request: DeepPartial, metadata?: grpc.Metadata, ): Promise; - /** - * CreatePeriodicVestingAccount defines a method that enables creating a - * periodic vesting account. - */ - CreatePeriodicVestingAccount( - request: DeepPartial, - metadata?: grpc.Metadata, - ): Promise; - /** - * DonateAllVestingTokens defines a method that enables donating all vesting - * tokens to community pool - */ - DonateAllVestingTokens( - request: DeepPartial, - metadata?: grpc.Metadata, - ): Promise; } export class MsgClientImpl implements Msg { @@ -513,8 +213,6 @@ export class MsgClientImpl implements Msg { constructor(rpc: Rpc) { this.rpc = rpc; this.CreateVestingAccount = this.CreateVestingAccount.bind(this); - this.CreatePeriodicVestingAccount = this.CreatePeriodicVestingAccount.bind(this); - this.DonateAllVestingTokens = this.DonateAllVestingTokens.bind(this); } CreateVestingAccount( @@ -527,28 +225,6 @@ export class MsgClientImpl implements Msg { metadata, ); } - - CreatePeriodicVestingAccount( - request: DeepPartial, - metadata?: grpc.Metadata, - ): Promise { - return this.rpc.unary( - MsgCreatePeriodicVestingAccountDesc, - MsgCreatePeriodicVestingAccount.fromPartial(request), - metadata, - ); - } - - DonateAllVestingTokens( - request: DeepPartial, - metadata?: grpc.Metadata, - ): Promise { - return this.rpc.unary( - MsgDonateAllVestingTokensDesc, - MsgDonateAllVestingTokens.fromPartial(request), - metadata, - ); - } } export const MsgDesc = { @@ -577,50 +253,6 @@ export const MsgCreateVestingAccountDesc: UnaryMethodDefinitionish = { } as any, }; -export const MsgCreatePeriodicVestingAccountDesc: UnaryMethodDefinitionish = { - methodName: "CreatePeriodicVestingAccount", - service: MsgDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return MsgCreatePeriodicVestingAccount.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...MsgCreatePeriodicVestingAccountResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; - -export const MsgDonateAllVestingTokensDesc: UnaryMethodDefinitionish = { - methodName: "DonateAllVestingTokens", - service: MsgDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return MsgDonateAllVestingTokens.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...MsgDonateAllVestingTokensResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; - interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; diff --git a/js/src/terra/treasury/v1beta1/gov.ts b/js/src/terra/treasury/v1beta1/gov.ts new file mode 100644 index 0000000..0e4dbc5 --- /dev/null +++ b/js/src/terra/treasury/v1beta1/gov.ts @@ -0,0 +1,232 @@ +/* eslint-disable */ +import Long from "long"; +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "terra.treasury.v1beta1"; + +/** proposal request structure for adding burn tax exemption address(es) */ +export interface AddBurnTaxExemptionAddressProposal { + title: string; + description: string; + addresses: string[]; +} + +/** proposal request structure for removing burn tax exemption address(es) */ +export interface RemoveBurnTaxExemptionAddressProposal { + title: string; + description: string; + addresses: string[]; +} + +const baseAddBurnTaxExemptionAddressProposal: object = { title: "", description: "", addresses: "" }; + +export const AddBurnTaxExemptionAddressProposal = { + encode(message: AddBurnTaxExemptionAddressProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.title !== "") { + writer.uint32(10).string(message.title); + } + if (message.description !== "") { + writer.uint32(18).string(message.description); + } + for (const v of message.addresses) { + writer.uint32(26).string(v!); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AddBurnTaxExemptionAddressProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseAddBurnTaxExemptionAddressProposal } as AddBurnTaxExemptionAddressProposal; + message.addresses = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.addresses.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): AddBurnTaxExemptionAddressProposal { + const message = { ...baseAddBurnTaxExemptionAddressProposal } as AddBurnTaxExemptionAddressProposal; + message.addresses = []; + if (object.title !== undefined && object.title !== null) { + message.title = String(object.title); + } else { + message.title = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = String(object.description); + } else { + message.description = ""; + } + if (object.addresses !== undefined && object.addresses !== null) { + for (const e of object.addresses) { + message.addresses.push(String(e)); + } + } + return message; + }, + + toJSON(message: AddBurnTaxExemptionAddressProposal): unknown { + const obj: any = {}; + message.title !== undefined && (obj.title = message.title); + message.description !== undefined && (obj.description = message.description); + if (message.addresses) { + obj.addresses = message.addresses.map((e) => e); + } else { + obj.addresses = []; + } + return obj; + }, + + fromPartial(object: DeepPartial): AddBurnTaxExemptionAddressProposal { + const message = { ...baseAddBurnTaxExemptionAddressProposal } as AddBurnTaxExemptionAddressProposal; + message.addresses = []; + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } else { + message.title = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } else { + message.description = ""; + } + if (object.addresses !== undefined && object.addresses !== null) { + for (const e of object.addresses) { + message.addresses.push(e); + } + } + return message; + }, +}; + +const baseRemoveBurnTaxExemptionAddressProposal: object = { title: "", description: "", addresses: "" }; + +export const RemoveBurnTaxExemptionAddressProposal = { + encode( + message: RemoveBurnTaxExemptionAddressProposal, + writer: _m0.Writer = _m0.Writer.create(), + ): _m0.Writer { + if (message.title !== "") { + writer.uint32(10).string(message.title); + } + if (message.description !== "") { + writer.uint32(18).string(message.description); + } + for (const v of message.addresses) { + writer.uint32(26).string(v!); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RemoveBurnTaxExemptionAddressProposal { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseRemoveBurnTaxExemptionAddressProposal } as RemoveBurnTaxExemptionAddressProposal; + message.addresses = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.addresses.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): RemoveBurnTaxExemptionAddressProposal { + const message = { ...baseRemoveBurnTaxExemptionAddressProposal } as RemoveBurnTaxExemptionAddressProposal; + message.addresses = []; + if (object.title !== undefined && object.title !== null) { + message.title = String(object.title); + } else { + message.title = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = String(object.description); + } else { + message.description = ""; + } + if (object.addresses !== undefined && object.addresses !== null) { + for (const e of object.addresses) { + message.addresses.push(String(e)); + } + } + return message; + }, + + toJSON(message: RemoveBurnTaxExemptionAddressProposal): unknown { + const obj: any = {}; + message.title !== undefined && (obj.title = message.title); + message.description !== undefined && (obj.description = message.description); + if (message.addresses) { + obj.addresses = message.addresses.map((e) => e); + } else { + obj.addresses = []; + } + return obj; + }, + + fromPartial( + object: DeepPartial, + ): RemoveBurnTaxExemptionAddressProposal { + const message = { ...baseRemoveBurnTaxExemptionAddressProposal } as RemoveBurnTaxExemptionAddressProposal; + message.addresses = []; + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } else { + message.title = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } else { + message.description = ""; + } + if (object.addresses !== undefined && object.addresses !== null) { + for (const e of object.addresses) { + message.addresses.push(e); + } + } + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined | Long; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +if (_m0.util.Long !== Long) { + _m0.util.Long = Long as any; + _m0.configure(); +} diff --git a/js/src/terra/treasury/v1beta1/query.ts b/js/src/terra/treasury/v1beta1/query.ts index 755510d..a59ad03 100644 --- a/js/src/terra/treasury/v1beta1/query.ts +++ b/js/src/terra/treasury/v1beta1/query.ts @@ -3,6 +3,7 @@ import Long from "long"; import { grpc } from "@improbable-eng/grpc-web"; import _m0 from "protobufjs/minimal"; import { Params } from "../../../terra/treasury/v1beta1/treasury"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { BrowserHeaders } from "browser-headers"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; @@ -107,6 +108,17 @@ export interface QueryParamsResponse { params?: Params; } +/** QueryBurnTaxExemptionListRequest is the request type for the Query/BurnTaxExemptionList RPC method. */ +export interface QueryBurnTaxExemptionListRequest { + pagination?: PageRequest; +} + +/** QueryBurnTaxExemptionListResponse is response type for the Query/BurnTaxExemptionList RPC method. */ +export interface QueryBurnTaxExemptionListResponse { + addresses: string[]; + pagination?: PageResponse; +} + const baseQueryTaxRateRequest: object = {}; export const QueryTaxRateRequest = { @@ -971,6 +983,142 @@ export const QueryParamsResponse = { }, }; +const baseQueryBurnTaxExemptionListRequest: object = {}; + +export const QueryBurnTaxExemptionListRequest = { + encode(message: QueryBurnTaxExemptionListRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryBurnTaxExemptionListRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseQueryBurnTaxExemptionListRequest } as QueryBurnTaxExemptionListRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryBurnTaxExemptionListRequest { + const message = { ...baseQueryBurnTaxExemptionListRequest } as QueryBurnTaxExemptionListRequest; + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageRequest.fromJSON(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, + + toJSON(message: QueryBurnTaxExemptionListRequest): unknown { + const obj: any = {}; + message.pagination !== undefined && + (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): QueryBurnTaxExemptionListRequest { + const message = { ...baseQueryBurnTaxExemptionListRequest } as QueryBurnTaxExemptionListRequest; + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageRequest.fromPartial(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, +}; + +const baseQueryBurnTaxExemptionListResponse: object = { addresses: "" }; + +export const QueryBurnTaxExemptionListResponse = { + encode(message: QueryBurnTaxExemptionListResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.addresses) { + writer.uint32(10).string(v!); + } + if (message.pagination !== undefined) { + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryBurnTaxExemptionListResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseQueryBurnTaxExemptionListResponse } as QueryBurnTaxExemptionListResponse; + message.addresses = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.addresses.push(reader.string()); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryBurnTaxExemptionListResponse { + const message = { ...baseQueryBurnTaxExemptionListResponse } as QueryBurnTaxExemptionListResponse; + message.addresses = []; + if (object.addresses !== undefined && object.addresses !== null) { + for (const e of object.addresses) { + message.addresses.push(String(e)); + } + } + if (object.pagination !== undefined && object.pagination !== null) { + message.pagination = PageResponse.fromJSON(object.pagination); + } else { + message.pagination = undefined; + } + return message; + }, + + toJSON(message: QueryBurnTaxExemptionListResponse): unknown { + const obj: any = {}; + if (message.addresses) { + obj.addresses = message.addresses.map((e) => e); + } else { + obj.addresses = []; + } + message.pagination !== undefined && + (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): QueryBurnTaxExemptionListResponse { + const message = { ...baseQueryBurnTaxExemptionListResponse } as QueryBurnTaxExemptionListResponse; + message.addresses = []; + if (object.addresses !== undefined && object.addresses !== null) { + for (const e of object.addresses) { + message.addresses.push(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 { /** TaxRate return the current tax rate */ @@ -999,6 +1147,11 @@ export interface Query { request: DeepPartial, metadata?: grpc.Metadata, ): Promise; + /** BurnTaxExemptionList returns all registered burn tax exemption addresses */ + BurnTaxExemptionList( + request: DeepPartial, + metadata?: grpc.Metadata, + ): Promise; /** Params queries all parameters. */ Params(request: DeepPartial, metadata?: grpc.Metadata): Promise; } @@ -1015,6 +1168,7 @@ export class QueryClientImpl implements Query { this.SeigniorageProceeds = this.SeigniorageProceeds.bind(this); this.TaxProceeds = this.TaxProceeds.bind(this); this.Indicators = this.Indicators.bind(this); + this.BurnTaxExemptionList = this.BurnTaxExemptionList.bind(this); this.Params = this.Params.bind(this); } @@ -1068,6 +1222,17 @@ export class QueryClientImpl implements Query { return this.rpc.unary(QueryIndicatorsDesc, QueryIndicatorsRequest.fromPartial(request), metadata); } + BurnTaxExemptionList( + request: DeepPartial, + metadata?: grpc.Metadata, + ): Promise { + return this.rpc.unary( + QueryBurnTaxExemptionListDesc, + QueryBurnTaxExemptionListRequest.fromPartial(request), + metadata, + ); + } + Params(request: DeepPartial, metadata?: grpc.Metadata): Promise { return this.rpc.unary(QueryParamsDesc, QueryParamsRequest.fromPartial(request), metadata); } @@ -1231,6 +1396,28 @@ export const QueryIndicatorsDesc: UnaryMethodDefinitionish = { } as any, }; +export const QueryBurnTaxExemptionListDesc: UnaryMethodDefinitionish = { + methodName: "BurnTaxExemptionList", + service: QueryDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return QueryBurnTaxExemptionListRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...QueryBurnTaxExemptionListResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; + export const QueryParamsDesc: UnaryMethodDefinitionish = { methodName: "Params", service: QueryDesc, diff --git a/js/src/terra/treasury/v1beta1/treasury.ts b/js/src/terra/treasury/v1beta1/treasury.ts index 746094e..e2e88a6 100644 --- a/js/src/terra/treasury/v1beta1/treasury.ts +++ b/js/src/terra/treasury/v1beta1/treasury.ts @@ -14,6 +14,7 @@ export interface Params { windowShort: Long; windowLong: Long; windowProbation: Long; + burnTaxSplit: string; } /** PolicyConstraints - defines policy constraints can be applied in tax & reward policies */ @@ -46,6 +47,7 @@ const baseParams: object = { windowShort: Long.UZERO, windowLong: Long.UZERO, windowProbation: Long.UZERO, + burnTaxSplit: "", }; export const Params = { @@ -71,6 +73,9 @@ export const Params = { if (!message.windowProbation.isZero()) { writer.uint32(56).uint64(message.windowProbation); } + if (message.burnTaxSplit !== "") { + writer.uint32(66).string(message.burnTaxSplit); + } return writer; }, @@ -102,6 +107,9 @@ export const Params = { case 7: message.windowProbation = reader.uint64() as Long; break; + case 8: + message.burnTaxSplit = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -147,6 +155,11 @@ export const Params = { } else { message.windowProbation = Long.UZERO; } + if (object.burnTaxSplit !== undefined && object.burnTaxSplit !== null) { + message.burnTaxSplit = String(object.burnTaxSplit); + } else { + message.burnTaxSplit = ""; + } return message; }, @@ -163,6 +176,7 @@ export const Params = { message.windowLong !== undefined && (obj.windowLong = (message.windowLong || Long.UZERO).toString()); message.windowProbation !== undefined && (obj.windowProbation = (message.windowProbation || Long.UZERO).toString()); + message.burnTaxSplit !== undefined && (obj.burnTaxSplit = message.burnTaxSplit); return obj; }, @@ -203,6 +217,11 @@ export const Params = { } else { message.windowProbation = Long.UZERO; } + if (object.burnTaxSplit !== undefined && object.burnTaxSplit !== null) { + message.burnTaxSplit = object.burnTaxSplit; + } else { + message.burnTaxSplit = ""; + } return message; }, }; diff --git a/js/src/terra/tx/v1beta1/service.ts b/js/src/terra/tx/v1beta1/service.ts index c4eefa8..e5df910 100644 --- a/js/src/terra/tx/v1beta1/service.ts +++ b/js/src/terra/tx/v1beta1/service.ts @@ -13,8 +13,15 @@ export const protobufPackage = "terra.tx.v1beta1"; * RPC method. */ export interface ComputeTaxRequest { - /** tx is the transaction to simulate. */ + /** + * tx is the transaction to simulate. + * Deprecated. Send raw tx bytes instead. + * + * @deprecated + */ tx?: Tx; + /** tx_bytes is the raw transaction. */ + txBytes: Uint8Array; } /** @@ -33,6 +40,9 @@ export const ComputeTaxRequest = { if (message.tx !== undefined) { Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); } + if (message.txBytes.length !== 0) { + writer.uint32(18).bytes(message.txBytes); + } return writer; }, @@ -40,12 +50,16 @@ export const ComputeTaxRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseComputeTaxRequest } as ComputeTaxRequest; + message.txBytes = new Uint8Array(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.tx = Tx.decode(reader, reader.uint32()); break; + case 2: + message.txBytes = reader.bytes(); + break; default: reader.skipType(tag & 7); break; @@ -56,17 +70,23 @@ export const ComputeTaxRequest = { fromJSON(object: any): ComputeTaxRequest { const message = { ...baseComputeTaxRequest } as ComputeTaxRequest; + message.txBytes = new Uint8Array(); if (object.tx !== undefined && object.tx !== null) { message.tx = Tx.fromJSON(object.tx); } else { message.tx = undefined; } + if (object.txBytes !== undefined && object.txBytes !== null) { + message.txBytes = bytesFromBase64(object.txBytes); + } return message; }, toJSON(message: ComputeTaxRequest): unknown { const obj: any = {}; message.tx !== undefined && (obj.tx = message.tx ? Tx.toJSON(message.tx) : undefined); + message.txBytes !== undefined && + (obj.txBytes = base64FromBytes(message.txBytes !== undefined ? message.txBytes : new Uint8Array())); return obj; }, @@ -77,6 +97,11 @@ export const ComputeTaxRequest = { } else { message.tx = undefined; } + if (object.txBytes !== undefined && object.txBytes !== null) { + message.txBytes = object.txBytes; + } else { + message.txBytes = new Uint8Array(); + } return message; }, }; @@ -257,6 +282,37 @@ export class GrpcWebImpl { } } +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 (const byte of arr) { + bin.push(String.fromCharCode(byte)); + } + return btoa(bin.join("")); +} + type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined | Long; export type DeepPartial = T extends Builtin ? T diff --git a/proto/confio/proofs.proto b/proto/confio/proofs.proto new file mode 100644 index 0000000..da43503 --- /dev/null +++ b/proto/confio/proofs.proto @@ -0,0 +1,234 @@ +syntax = "proto3"; + +package ics23; +option go_package = "github.com/confio/ics23/go"; + +enum HashOp { + // NO_HASH is the default if no data passed. Note this is an illegal argument some places. + NO_HASH = 0; + SHA256 = 1; + SHA512 = 2; + KECCAK = 3; + RIPEMD160 = 4; + BITCOIN = 5; // ripemd160(sha256(x)) +} + +/** +LengthOp defines how to process the key and value of the LeafOp +to include length information. After encoding the length with the given +algorithm, the length will be prepended to the key and value bytes. +(Each one with it's own encoded length) +*/ +enum LengthOp { + // NO_PREFIX don't include any length info + NO_PREFIX = 0; + // VAR_PROTO uses protobuf (and go-amino) varint encoding of the length + VAR_PROTO = 1; + // VAR_RLP uses rlp int encoding of the length + VAR_RLP = 2; + // FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer + FIXED32_BIG = 3; + // FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer + FIXED32_LITTLE = 4; + // FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer + FIXED64_BIG = 5; + // FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer + FIXED64_LITTLE = 6; + // REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) + REQUIRE_32_BYTES = 7; + // REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) + REQUIRE_64_BYTES = 8; +} + +/** +ExistenceProof takes a key and a value and a set of steps to perform on it. +The result of peforming all these steps will provide a "root hash", which can +be compared to the value in a header. + +Since it is computationally infeasible to produce a hash collission for any of the used +cryptographic hash functions, if someone can provide a series of operations to transform +a given key and value into a root hash that matches some trusted root, these key and values +must be in the referenced merkle tree. + +The only possible issue is maliablity in LeafOp, such as providing extra prefix data, +which should be controlled by a spec. Eg. with lengthOp as NONE, + prefix = FOO, key = BAR, value = CHOICE +and + prefix = F, key = OOBAR, value = CHOICE +would produce the same value. + +With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field +in the ProofSpec is valuable to prevent this mutability. And why all trees should +length-prefix the data before hashing it. +*/ +message ExistenceProof { + bytes key = 1; + bytes value = 2; + LeafOp leaf = 3; + repeated InnerOp path = 4; +} + +/* +NonExistenceProof takes a proof of two neighbors, one left of the desired key, +one right of the desired key. If both proofs are valid AND they are neighbors, +then there is no valid proof for the given key. +*/ +message NonExistenceProof { + bytes key = 1; // TODO: remove this as unnecessary??? we prove a range + ExistenceProof left = 2; + ExistenceProof right = 3; +} + +/* +CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages +*/ +message CommitmentProof { + oneof proof { + ExistenceProof exist = 1; + NonExistenceProof nonexist = 2; + BatchProof batch = 3; + CompressedBatchProof compressed = 4; + } +} + +/** +LeafOp represents the raw key-value data we wish to prove, and +must be flexible to represent the internal transformation from +the original key-value pairs into the basis hash, for many existing +merkle trees. + +key and value are passed in. So that the signature of this operation is: + leafOp(key, value) -> output + +To process this, first prehash the keys and values if needed (ANY means no hash in this case): + hkey = prehashKey(key) + hvalue = prehashValue(value) + +Then combine the bytes, and hash it + output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) +*/ +message LeafOp { + HashOp hash = 1; + HashOp prehash_key = 2; + HashOp prehash_value = 3; + LengthOp length = 4; + // prefix is a fixed bytes that may optionally be included at the beginning to differentiate + // a leaf node from an inner node. + bytes prefix = 5; +} + +/** +InnerOp represents a merkle-proof step that is not a leaf. +It represents concatenating two children and hashing them to provide the next result. + +The result of the previous step is passed in, so the signature of this op is: + innerOp(child) -> output + +The result of applying InnerOp should be: + output = op.hash(op.prefix || child || op.suffix) + + where the || operator is concatenation of binary data, +and child is the result of hashing all the tree below this step. + +Any special data, like prepending child with the length, or prepending the entire operation with +some value to differentiate from leaf nodes, should be included in prefix and suffix. +If either of prefix or suffix is empty, we just treat it as an empty string +*/ +message InnerOp { + HashOp hash = 1; + bytes prefix = 2; + bytes suffix = 3; +} + + +/** +ProofSpec defines what the expected parameters are for a given proof type. +This can be stored in the client and used to validate any incoming proofs. + + verify(ProofSpec, Proof) -> Proof | Error + +As demonstrated in tests, if we don't fix the algorithm used to calculate the +LeafHash for a given tree, there are many possible key-value pairs that can +generate a given hash (by interpretting the preimage differently). +We need this for proper security, requires client knows a priori what +tree format server uses. But not in code, rather a configuration object. +*/ +message ProofSpec { + // any field in the ExistenceProof must be the same as in this spec. + // except Prefix, which is just the first bytes of prefix (spec can be longer) + LeafOp leaf_spec = 1; + InnerSpec inner_spec = 2; + // max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) + int32 max_depth = 3; + // min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) + int32 min_depth = 4; +} + +/* +InnerSpec contains all store-specific structure info to determine if two proofs from a +given store are neighbors. + +This enables: + + isLeftMost(spec: InnerSpec, op: InnerOp) + isRightMost(spec: InnerSpec, op: InnerOp) + isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) +*/ +message InnerSpec { + // Child order is the ordering of the children node, must count from 0 + // iavl tree is [0, 1] (left then right) + // merk is [0, 2, 1] (left, right, here) + repeated int32 child_order = 1; + int32 child_size = 2; + int32 min_prefix_length = 3; + int32 max_prefix_length = 4; + // empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) + bytes empty_child = 5; + // hash is the algorithm that must be used for each InnerOp + HashOp hash = 6; +} + +/* +BatchProof is a group of multiple proof types than can be compressed +*/ +message BatchProof { + repeated BatchEntry entries = 1; +} + +// Use BatchEntry not CommitmentProof, to avoid recursion +message BatchEntry { + oneof proof { + ExistenceProof exist = 1; + NonExistenceProof nonexist = 2; + } +} + + +/****** all items here are compressed forms *******/ + +message CompressedBatchProof { + repeated CompressedBatchEntry entries = 1; + repeated InnerOp lookup_inners = 2; +} + +// Use BatchEntry not CommitmentProof, to avoid recursion +message CompressedBatchEntry { + oneof proof { + CompressedExistenceProof exist = 1; + CompressedNonExistenceProof nonexist = 2; + } +} + +message CompressedExistenceProof { + bytes key = 1; + bytes value = 2; + LeafOp leaf = 3; + // these are indexes into the lookup_inners table in CompressedBatchProof + repeated int32 path = 4; +} + +message CompressedNonExistenceProof { + bytes key = 1; // TODO: remove this as unnecessary??? we prove a range + CompressedExistenceProof left = 2; + CompressedExistenceProof right = 3; +} diff --git a/proto/cosmos/auth/v1beta1/auth.proto b/proto/cosmos/auth/v1beta1/auth.proto new file mode 100644 index 0000000..72e1d9e --- /dev/null +++ b/proto/cosmos/auth/v1beta1/auth.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; +package cosmos.auth.v1beta1; + +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; + +// BaseAccount defines a base account type. It contains all the necessary fields +// for basic account functionality. Any custom account type should extend this +// type for additional functionality (e.g. vesting). +message BaseAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = false; + + option (cosmos_proto.implements_interface) = "AccountI"; + + string address = 1; + google.protobuf.Any pub_key = 2 + [(gogoproto.jsontag) = "public_key,omitempty", (gogoproto.moretags) = "yaml:\"public_key\""]; + uint64 account_number = 3 [(gogoproto.moretags) = "yaml:\"account_number\""]; + uint64 sequence = 4; +} + +// ModuleAccount defines an account for modules that holds coins on a pool. +message ModuleAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (cosmos_proto.implements_interface) = "ModuleAccountI"; + + BaseAccount base_account = 1 [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; + string name = 2; + repeated string permissions = 3; +} + +// Params defines the parameters for the auth module. +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + uint64 max_memo_characters = 1 [(gogoproto.moretags) = "yaml:\"max_memo_characters\""]; + uint64 tx_sig_limit = 2 [(gogoproto.moretags) = "yaml:\"tx_sig_limit\""]; + uint64 tx_size_cost_per_byte = 3 [(gogoproto.moretags) = "yaml:\"tx_size_cost_per_byte\""]; + uint64 sig_verify_cost_ed25519 = 4 + [(gogoproto.customname) = "SigVerifyCostED25519", (gogoproto.moretags) = "yaml:\"sig_verify_cost_ed25519\""]; + uint64 sig_verify_cost_secp256k1 = 5 + [(gogoproto.customname) = "SigVerifyCostSecp256k1", (gogoproto.moretags) = "yaml:\"sig_verify_cost_secp256k1\""]; +} diff --git a/proto/cosmos/auth/v1beta1/genesis.proto b/proto/cosmos/auth/v1beta1/genesis.proto new file mode 100644 index 0000000..c88b94e --- /dev/null +++ b/proto/cosmos/auth/v1beta1/genesis.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package cosmos.auth.v1beta1; + +import "google/protobuf/any.proto"; +import "gogoproto/gogo.proto"; +import "cosmos/auth/v1beta1/auth.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; + +// GenesisState defines the auth module's genesis state. +message GenesisState { + // params defines all the paramaters of the module. + Params params = 1 [(gogoproto.nullable) = false]; + + // accounts are the accounts present at genesis. + repeated google.protobuf.Any accounts = 2; +} diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto new file mode 100644 index 0000000..4d9759c --- /dev/null +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -0,0 +1,74 @@ +syntax = "proto3"; +package cosmos.auth.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "google/api/annotations.proto"; +import "cosmos/auth/v1beta1/auth.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; + +// Query defines the gRPC querier service. +service Query { + // Accounts returns all the existing accounts + // + // Since: cosmos-sdk 0.43 + rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/accounts"; + } + + // Account returns account details based on address. + rpc Account(QueryAccountRequest) returns (QueryAccountResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}"; + } + + // Params queries all parameters. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/params"; + } +} + +// QueryAccountsRequest is the request type for the Query/Accounts RPC method. +// +// Since: cosmos-sdk 0.43 +message QueryAccountsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryAccountsResponse is the response type for the Query/Accounts RPC method. +// +// Since: cosmos-sdk 0.43 +message QueryAccountsResponse { + // accounts are the existing accounts + repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryAccountRequest is the request type for the Query/Account RPC method. +message QueryAccountRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address defines the address to query for. + string address = 1; +} + +// QueryAccountResponse is the response type for the Query/Account RPC method. +message QueryAccountResponse { + // account defines the account of the corresponding address. + google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/authz/v1beta1/authz.proto b/proto/cosmos/authz/v1beta1/authz.proto new file mode 100644 index 0000000..2c37690 --- /dev/null +++ b/proto/cosmos/authz/v1beta1/authz.proto @@ -0,0 +1,27 @@ +// Since: cosmos-sdk 0.43 +syntax = "proto3"; +package cosmos.authz.v1beta1; + +import "cosmos_proto/cosmos.proto"; +import "google/protobuf/timestamp.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; +option (gogoproto.goproto_getters_all) = false; + +// GenericAuthorization gives the grantee unrestricted permissions to execute +// the provided method on behalf of the granter's account. +message GenericAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + // Msg, identified by it's type URL, to grant unrestricted permissions to execute + string msg = 1; +} + +// Grant gives permissions to execute +// the provide method with expiration time. +message Grant { + google.protobuf.Any authorization = 1 [(cosmos_proto.accepts_interface) = "Authorization"]; + google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/authz/v1beta1/event.proto b/proto/cosmos/authz/v1beta1/event.proto new file mode 100644 index 0000000..7a3cf7c --- /dev/null +++ b/proto/cosmos/authz/v1beta1/event.proto @@ -0,0 +1,25 @@ +// Since: cosmos-sdk 0.43 +syntax = "proto3"; +package cosmos.authz.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; + +// EventGrant is emitted on Msg/Grant +message EventGrant { + // Msg type URL for which an autorization is granted + string msg_type_url = 2; + // Granter account address + string granter = 3; + // Grantee account address + string grantee = 4; +} + +// EventRevoke is emitted on Msg/Revoke +message EventRevoke { + // Msg type URL for which an autorization is revoked + string msg_type_url = 2; + // Granter account address + string granter = 3; + // Grantee account address + string grantee = 4; +} diff --git a/proto/cosmos/authz/v1beta1/genesis.proto b/proto/cosmos/authz/v1beta1/genesis.proto new file mode 100644 index 0000000..ea89869 --- /dev/null +++ b/proto/cosmos/authz/v1beta1/genesis.proto @@ -0,0 +1,24 @@ +// Since: cosmos-sdk 0.43 +syntax = "proto3"; +package cosmos.authz.v1beta1; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/any.proto"; +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; + +// GenesisState defines the authz module's genesis state. +message GenesisState { + repeated GrantAuthorization authorization = 1 [(gogoproto.nullable) = false]; +} + +// GrantAuthorization defines the GenesisState/GrantAuthorization type. +message GrantAuthorization { + string granter = 1; + string grantee = 2; + + google.protobuf.Any authorization = 3 [(cosmos_proto.accepts_interface) = "Authorization"]; + google.protobuf.Timestamp expiration = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} diff --git a/proto/cosmos/authz/v1beta1/query.proto b/proto/cosmos/authz/v1beta1/query.proto new file mode 100644 index 0000000..428210d --- /dev/null +++ b/proto/cosmos/authz/v1beta1/query.proto @@ -0,0 +1,35 @@ +// Since: cosmos-sdk 0.43 +syntax = "proto3"; +package cosmos.authz.v1beta1; + +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos/authz/v1beta1/authz.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; + +// Query defines the gRPC querier service. +service Query { + // Returns list of `Authorization`, granted to the grantee by the granter. + rpc Grants(QueryGrantsRequest) returns (QueryGrantsResponse) { + option (google.api.http).get = "/cosmos/authz/v1beta1/grants"; + } +} + +// QueryGrantsRequest is the request type for the Query/Grants RPC method. +message QueryGrantsRequest { + string granter = 1; + string grantee = 2; + // Optional, msg_type_url, when set, will query only grants matching given msg type. + string msg_type_url = 3; + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 4; +} + +// QueryGrantsResponse is the response type for the Query/Authorizations RPC method. +message QueryGrantsResponse { + // authorizations is a list of grants granted for grantee by granter. + repeated cosmos.authz.v1beta1.Grant grants = 1; + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/cosmos/authz/v1beta1/tx.proto b/proto/cosmos/authz/v1beta1/tx.proto new file mode 100644 index 0000000..457f0d6 --- /dev/null +++ b/proto/cosmos/authz/v1beta1/tx.proto @@ -0,0 +1,70 @@ +// Since: cosmos-sdk 0.43 +syntax = "proto3"; +package cosmos.authz.v1beta1; + +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/any.proto"; +import "cosmos/base/abci/v1beta1/abci.proto"; +import "cosmos/authz/v1beta1/authz.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; +option (gogoproto.goproto_getters_all) = false; + +// Msg defines the authz Msg service. +service Msg { + // Grant grants the provided authorization to the grantee on the granter's + // account with the provided expiration time. If there is already a grant + // for the given (granter, grantee, Authorization) triple, then the grant + // will be overwritten. + rpc Grant(MsgGrant) returns (MsgGrantResponse); + + // Exec attempts to execute the provided messages using + // authorizations granted to the grantee. Each message should have only + // one signer corresponding to the granter of the authorization. + rpc Exec(MsgExec) returns (MsgExecResponse); + + // Revoke revokes any authorization corresponding to the provided method name on the + // granter's account that has been granted to the grantee. + rpc Revoke(MsgRevoke) returns (MsgRevokeResponse); +} + +// MsgGrant is a request type for Grant method. It declares authorization to the grantee +// on behalf of the granter with the provided expiration time. +message MsgGrant { + string granter = 1; + string grantee = 2; + + cosmos.authz.v1beta1.Grant grant = 3 [(gogoproto.nullable) = false]; +} + +// MsgExecResponse defines the Msg/MsgExecResponse response type. +message MsgExecResponse { + repeated bytes results = 1; +} + +// MsgExec attempts to execute the provided messages using +// authorizations granted to the grantee. Each message should have only +// one signer corresponding to the granter of the authorization. +message MsgExec { + string grantee = 1; + // Authorization Msg requests to execute. Each msg must implement Authorization interface + // The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) + // triple and validate it. + repeated google.protobuf.Any msgs = 2 [(cosmos_proto.accepts_interface) = "sdk.Msg, authz.Authorization"]; +} + +// MsgGrantResponse defines the Msg/MsgGrant response type. +message MsgGrantResponse {} + +// MsgRevoke revokes any authorization with the provided sdk.Msg type on the +// granter's account with that has been granted to the grantee. +message MsgRevoke { + string granter = 1; + string grantee = 2; + string msg_type_url = 3; +} + +// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. +message MsgRevokeResponse {} diff --git a/proto/cosmos/bank/v1beta1/authz.proto b/proto/cosmos/bank/v1beta1/authz.proto new file mode 100644 index 0000000..4f58b15 --- /dev/null +++ b/proto/cosmos/bank/v1beta1/authz.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; +package cosmos.bank.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; + +// SendAuthorization allows the grantee to spend up to spend_limit coins from +// the granter's account. +// +// Since: cosmos-sdk 0.43 +message SendAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + repeated cosmos.base.v1beta1.Coin spend_limit = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} diff --git a/proto/cosmos/bank/v1beta1/bank.proto b/proto/cosmos/bank/v1beta1/bank.proto new file mode 100644 index 0000000..df91008 --- /dev/null +++ b/proto/cosmos/bank/v1beta1/bank.proto @@ -0,0 +1,96 @@ +syntax = "proto3"; +package cosmos.bank.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; + +// Params defines the parameters for the bank module. +message Params { + option (gogoproto.goproto_stringer) = false; + repeated SendEnabled send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled,omitempty\""]; + bool default_send_enabled = 2 [(gogoproto.moretags) = "yaml:\"default_send_enabled,omitempty\""]; +} + +// SendEnabled maps coin denom to a send_enabled status (whether a denom is +// sendable). +message SendEnabled { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + string denom = 1; + bool enabled = 2; +} + +// Input models transaction input. +message Input { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string address = 1; + repeated cosmos.base.v1beta1.Coin coins = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// Output models transaction outputs. +message Output { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string address = 1; + repeated cosmos.base.v1beta1.Coin coins = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// Supply represents a struct that passively keeps track of the total supply +// amounts in the network. +// This message is deprecated now that supply is indexed by denom. +message Supply { + option deprecated = true; + + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + + option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/legacy/v040.SupplyI"; + + repeated cosmos.base.v1beta1.Coin total = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// DenomUnit represents a struct that describes a given +// denomination unit of the basic token. +message DenomUnit { + // denom represents the string name of the given denom unit (e.g uatom). + string denom = 1; + // exponent represents power of 10 exponent that one must + // raise the base_denom to in order to equal the given DenomUnit's denom + // 1 denom = 1^exponent base_denom + // (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with + // exponent = 6, thus: 1 atom = 10^6 uatom). + uint32 exponent = 2; + // aliases is a list of string aliases for the given denom + repeated string aliases = 3; +} + +// Metadata represents a struct that describes +// a basic token. +message Metadata { + string description = 1; + // denom_units represents the list of DenomUnit's for a given coin + repeated DenomUnit denom_units = 2; + // base represents the base denom (should be the DenomUnit with exponent = 0). + string base = 3; + // display indicates the suggested denom that should be + // displayed in clients. + string display = 4; + // name defines the name of the token (eg: Cosmos Atom) + // + // Since: cosmos-sdk 0.43 + string name = 5; + // symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + // be the same as the display. + // + // Since: cosmos-sdk 0.43 + string symbol = 6; +} diff --git a/proto/cosmos/bank/v1beta1/genesis.proto b/proto/cosmos/bank/v1beta1/genesis.proto new file mode 100644 index 0000000..8fd7329 --- /dev/null +++ b/proto/cosmos/bank/v1beta1/genesis.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; +package cosmos.bank.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/bank/v1beta1/bank.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; + +// GenesisState defines the bank module's genesis state. +message GenesisState { + // params defines all the paramaters of the module. + Params params = 1 [(gogoproto.nullable) = false]; + + // balances is an array containing the balances of all the accounts. + repeated Balance balances = 2 [(gogoproto.nullable) = false]; + + // supply represents the total supply. If it is left empty, then supply will be calculated based on the provided + // balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. + repeated cosmos.base.v1beta1.Coin supply = 3 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; + + // denom_metadata defines the metadata of the differents coins. + repeated Metadata denom_metadata = 4 [(gogoproto.moretags) = "yaml:\"denom_metadata\"", (gogoproto.nullable) = false]; +} + +// Balance defines an account address and balance pair used in the bank module's +// genesis state. +message Balance { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address is the address of the balance holder. + string address = 1; + + // coins defines the different coins this balance holds. + repeated cosmos.base.v1beta1.Coin coins = 2 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/bank/v1beta1/query.proto b/proto/cosmos/bank/v1beta1/query.proto new file mode 100644 index 0000000..6aaa0eb --- /dev/null +++ b/proto/cosmos/bank/v1beta1/query.proto @@ -0,0 +1,163 @@ +syntax = "proto3"; +package cosmos.bank.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/bank/v1beta1/bank.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; + +// Query defines the gRPC querier service. +service Query { + // Balance queries the balance of a single coin for a single account. + rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/by_denom"; + } + + // AllBalances queries the balance of all coins for a single account. + rpc AllBalances(QueryAllBalancesRequest) returns (QueryAllBalancesResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}"; + } + + // TotalSupply queries the total supply of all coins. + rpc TotalSupply(QueryTotalSupplyRequest) returns (QueryTotalSupplyResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/supply"; + } + + // SupplyOf queries the supply of a single coin. + rpc SupplyOf(QuerySupplyOfRequest) returns (QuerySupplyOfResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/supply/{denom}"; + } + + // Params queries the parameters of x/bank module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/params"; + } + + // DenomsMetadata queries the client metadata of a given coin denomination. + rpc DenomMetadata(QueryDenomMetadataRequest) returns (QueryDenomMetadataResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata/{denom}"; + } + + // DenomsMetadata queries the client metadata for all registered coin denominations. + rpc DenomsMetadata(QueryDenomsMetadataRequest) returns (QueryDenomsMetadataResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata"; + } +} + +// QueryBalanceRequest is the request type for the Query/Balance RPC method. +message QueryBalanceRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address is the address to query balances for. + string address = 1; + + // denom is the coin denom to query balances for. + string denom = 2; +} + +// QueryBalanceResponse is the response type for the Query/Balance RPC method. +message QueryBalanceResponse { + // balance is the balance of the coin. + cosmos.base.v1beta1.Coin balance = 1; +} + +// QueryBalanceRequest is the request type for the Query/AllBalances RPC method. +message QueryAllBalancesRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address is the address to query balances for. + string address = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC +// method. +message QueryAllBalancesResponse { + // balances is the balances of all the coins. + repeated cosmos.base.v1beta1.Coin balances = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC +// method. +message QueryTotalSupplyRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // pagination defines an optional pagination for the request. + // + // Since: cosmos-sdk 0.43 + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC +// method +message QueryTotalSupplyResponse { + // supply is the supply of the coins + repeated cosmos.base.v1beta1.Coin supply = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // pagination defines the pagination in the response. + // + // Since: cosmos-sdk 0.43 + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. +message QuerySupplyOfRequest { + // denom is the coin denom to query balances for. + string denom = 1; +} + +// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. +message QuerySupplyOfResponse { + // amount is the supply of the coin. + cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false]; +} + +// QueryParamsRequest defines the request type for querying x/bank parameters. +message QueryParamsRequest {} + +// QueryParamsResponse defines the response type for querying x/bank parameters. +message QueryParamsResponse { + Params params = 1 [(gogoproto.nullable) = false]; +} + +// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. +message QueryDenomsMetadataRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC +// method. +message QueryDenomsMetadataResponse { + // metadata provides the client information for all the registered tokens. + repeated Metadata metadatas = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. +message QueryDenomMetadataRequest { + // denom is the coin denom to query the metadata for. + string denom = 1; +} + +// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC +// method. +message QueryDenomMetadataResponse { + // metadata describes and provides all the client information for the requested token. + Metadata metadata = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/bank/v1beta1/tx.proto b/proto/cosmos/bank/v1beta1/tx.proto new file mode 100644 index 0000000..26b2ab4 --- /dev/null +++ b/proto/cosmos/bank/v1beta1/tx.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; +package cosmos.bank.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/bank/v1beta1/bank.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; + +// Msg defines the bank Msg service. +service Msg { + // Send defines a method for sending coins from one account to another account. + rpc Send(MsgSend) returns (MsgSendResponse); + + // MultiSend defines a method for sending coins from some accounts to other accounts. + rpc MultiSend(MsgMultiSend) returns (MsgMultiSendResponse); +} + +// MsgSend represents a message to send coins from one account to another. +message MsgSend { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; + string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; + repeated cosmos.base.v1beta1.Coin amount = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// MsgSendResponse defines the Msg/Send response type. +message MsgSendResponse {} + +// MsgMultiSend represents an arbitrary multi-in, multi-out send message. +message MsgMultiSend { + option (gogoproto.equal) = false; + + repeated Input inputs = 1 [(gogoproto.nullable) = false]; + repeated Output outputs = 2 [(gogoproto.nullable) = false]; +} + +// MsgMultiSendResponse defines the Msg/MultiSend response type. +message MsgMultiSendResponse {} diff --git a/proto/cosmos/base/abci/v1beta1/abci.proto b/proto/cosmos/base/abci/v1beta1/abci.proto new file mode 100644 index 0000000..e24ae7b --- /dev/null +++ b/proto/cosmos/base/abci/v1beta1/abci.proto @@ -0,0 +1,144 @@ +syntax = "proto3"; +package cosmos.base.abci.v1beta1; + +import "gogoproto/gogo.proto"; +import "tendermint/abci/types.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types"; +option (gogoproto.goproto_stringer_all) = false; + +// TxResponse defines a structure containing relevant tx data and metadata. The +// tags are stringified and the log is JSON decoded. +message TxResponse { + option (gogoproto.goproto_getters) = false; + // The block height + int64 height = 1; + // The transaction hash. + string txhash = 2 [(gogoproto.customname) = "TxHash"]; + // Namespace for the Code + string codespace = 3; + // Response code. + uint32 code = 4; + // Result bytes, if any. + string data = 5; + // The output of the application's logger (raw string). May be + // non-deterministic. + string raw_log = 6; + // The output of the application's logger (typed). May be non-deterministic. + repeated ABCIMessageLog logs = 7 [(gogoproto.castrepeated) = "ABCIMessageLogs", (gogoproto.nullable) = false]; + // Additional information. May be non-deterministic. + string info = 8; + // Amount of gas requested for transaction. + int64 gas_wanted = 9; + // Amount of gas consumed by transaction. + int64 gas_used = 10; + // The request transaction bytes. + google.protobuf.Any tx = 11; + // Time of the previous block. For heights > 1, it's the weighted median of + // the timestamps of the valid votes in the block.LastCommit. For height == 1, + // it's genesis time. + string timestamp = 12; + // Events defines all the events emitted by processing a transaction. Note, + // these events include those emitted by processing all the messages and those + // emitted from the ante handler. Whereas Logs contains the events, with + // additional metadata, emitted only by processing the messages. + // + // Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + repeated tendermint.abci.Event events = 13 [(gogoproto.nullable) = false]; +} + +// ABCIMessageLog defines a structure containing an indexed tx ABCI message log. +message ABCIMessageLog { + option (gogoproto.stringer) = true; + + uint32 msg_index = 1; + string log = 2; + + // Events contains a slice of Event objects that were emitted during some + // execution. + repeated StringEvent events = 3 [(gogoproto.castrepeated) = "StringEvents", (gogoproto.nullable) = false]; +} + +// StringEvent defines en Event object wrapper where all the attributes +// contain key/value pairs that are strings instead of raw bytes. +message StringEvent { + option (gogoproto.stringer) = true; + + string type = 1; + repeated Attribute attributes = 2 [(gogoproto.nullable) = false]; +} + +// Attribute defines an attribute wrapper where the key and value are +// strings instead of raw bytes. +message Attribute { + string key = 1; + string value = 2; +} + +// GasInfo defines tx execution gas context. +message GasInfo { + // GasWanted is the maximum units of work we allow this tx to perform. + uint64 gas_wanted = 1 [(gogoproto.moretags) = "yaml:\"gas_wanted\""]; + + // GasUsed is the amount of gas actually consumed. + uint64 gas_used = 2 [(gogoproto.moretags) = "yaml:\"gas_used\""]; +} + +// Result is the union of ResponseFormat and ResponseCheckTx. +message Result { + option (gogoproto.goproto_getters) = false; + + // Data is any data returned from message or handler execution. It MUST be + // length prefixed in order to separate data from multiple message executions. + bytes data = 1; + + // Log contains the log information from message or handler execution. + string log = 2; + + // Events contains a slice of Event objects that were emitted during message + // or handler execution. + repeated tendermint.abci.Event events = 3 [(gogoproto.nullable) = false]; +} + +// SimulationResponse defines the response generated when a transaction is +// successfully simulated. +message SimulationResponse { + GasInfo gas_info = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + Result result = 2; +} + +// MsgData defines the data returned in a Result object during message +// execution. +message MsgData { + option (gogoproto.stringer) = true; + + string msg_type = 1; + bytes data = 2; +} + +// TxMsgData defines a list of MsgData. A transaction will have a MsgData object +// for each message. +message TxMsgData { + option (gogoproto.stringer) = true; + + repeated MsgData data = 1; +} + +// SearchTxsResult defines a structure for querying txs pageable +message SearchTxsResult { + option (gogoproto.stringer) = true; + + // Count of all txs + uint64 total_count = 1 [(gogoproto.moretags) = "yaml:\"total_count\"", (gogoproto.jsontag) = "total_count"]; + // Count of txs in current page + uint64 count = 2; + // Index of current page, start from 1 + uint64 page_number = 3 [(gogoproto.moretags) = "yaml:\"page_number\"", (gogoproto.jsontag) = "page_number"]; + // Count of total pages + uint64 page_total = 4 [(gogoproto.moretags) = "yaml:\"page_total\"", (gogoproto.jsontag) = "page_total"]; + // Max count txs per page + uint64 limit = 5; + // List of txs in current page + repeated TxResponse txs = 6; +} diff --git a/proto/cosmos/base/kv/v1beta1/kv.proto b/proto/cosmos/base/kv/v1beta1/kv.proto new file mode 100644 index 0000000..4e9b8d2 --- /dev/null +++ b/proto/cosmos/base/kv/v1beta1/kv.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package cosmos.base.kv.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types/kv"; + +// Pairs defines a repeated slice of Pair objects. +message Pairs { + repeated Pair pairs = 1 [(gogoproto.nullable) = false]; +} + +// Pair defines a key/value bytes tuple. +message Pair { + bytes key = 1; + bytes value = 2; +} diff --git a/proto/cosmos/base/query/v1beta1/pagination.proto b/proto/cosmos/base/query/v1beta1/pagination.proto new file mode 100644 index 0000000..cd5eb06 --- /dev/null +++ b/proto/cosmos/base/query/v1beta1/pagination.proto @@ -0,0 +1,55 @@ +syntax = "proto3"; +package cosmos.base.query.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/types/query"; + +// PageRequest is to be embedded in gRPC request messages for efficient +// pagination. Ex: +// +// message SomeRequest { +// Foo some_parameter = 1; +// PageRequest pagination = 2; +// } +message 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. + bytes key = 1; + + // 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. + uint64 offset = 2; + + // 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. + uint64 limit = 3; + + // 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. + bool count_total = 4; + + // reverse is set to true if results are to be returned in the descending order. + // + // Since: cosmos-sdk 0.43 + bool reverse = 5; +} + +// 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; +// } +message PageResponse { + // next_key is the key to be passed to PageRequest.key to + // query the next page most efficiently + bytes next_key = 1; + + // total is total number of results available if PageRequest.count_total + // was set, its value is undefined otherwise + uint64 total = 2; +} diff --git a/proto/cosmos/base/reflection/v1beta1/reflection.proto b/proto/cosmos/base/reflection/v1beta1/reflection.proto new file mode 100644 index 0000000..22670e7 --- /dev/null +++ b/proto/cosmos/base/reflection/v1beta1/reflection.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; +package cosmos.base.reflection.v1beta1; + +import "google/api/annotations.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/reflection"; + +// ReflectionService defines a service for interface reflection. +service ReflectionService { + // ListAllInterfaces lists all the interfaces registered in the interface + // registry. + rpc ListAllInterfaces(ListAllInterfacesRequest) returns (ListAllInterfacesResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces"; + }; + + // ListImplementations list all the concrete types that implement a given + // interface. + rpc ListImplementations(ListImplementationsRequest) returns (ListImplementationsResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/" + "{interface_name}/implementations"; + }; +} + +// ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. +message ListAllInterfacesRequest {} + +// ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. +message ListAllInterfacesResponse { + // interface_names is an array of all the registered interfaces. + repeated string interface_names = 1; +} + +// ListImplementationsRequest is the request type of the ListImplementations +// RPC. +message ListImplementationsRequest { + // interface_name defines the interface to query the implementations for. + string interface_name = 1; +} + +// ListImplementationsResponse is the response type of the ListImplementations +// RPC. +message ListImplementationsResponse { + repeated string implementation_message_names = 1; +} diff --git a/proto/cosmos/base/reflection/v2alpha1/reflection.proto b/proto/cosmos/base/reflection/v2alpha1/reflection.proto new file mode 100644 index 0000000..d5b0485 --- /dev/null +++ b/proto/cosmos/base/reflection/v2alpha1/reflection.proto @@ -0,0 +1,218 @@ +// Since: cosmos-sdk 0.43 +syntax = "proto3"; +package cosmos.base.reflection.v2alpha1; + +import "google/api/annotations.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/server/grpc/reflection/v2alpha1"; + +// AppDescriptor describes a cosmos-sdk based application +message AppDescriptor { + // AuthnDescriptor provides information on how to authenticate transactions on the application + // NOTE: experimental and subject to change in future releases. + AuthnDescriptor authn = 1; + // chain provides the chain descriptor + ChainDescriptor chain = 2; + // codec provides metadata information regarding codec related types + CodecDescriptor codec = 3; + // configuration provides metadata information regarding the sdk.Config type + ConfigurationDescriptor configuration = 4; + // query_services provides metadata information regarding the available queriable endpoints + QueryServicesDescriptor query_services = 5; + // tx provides metadata information regarding how to send transactions to the given application + TxDescriptor tx = 6; +} + +// TxDescriptor describes the accepted transaction type +message TxDescriptor { + // fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) + // it is not meant to support polymorphism of transaction types, it is supposed to be used by + // reflection clients to understand if they can handle a specific transaction type in an application. + string fullname = 1; + // msgs lists the accepted application messages (sdk.Msg) + repeated MsgDescriptor msgs = 2; +} + +// AuthnDescriptor provides information on how to sign transactions without relying +// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures +message AuthnDescriptor { + // sign_modes defines the supported signature algorithm + repeated SigningModeDescriptor sign_modes = 1; +} + +// SigningModeDescriptor provides information on a signing flow of the application +// NOTE(fdymylja): here we could go as far as providing an entire flow on how +// to sign a message given a SigningModeDescriptor, but it's better to think about +// this another time +message SigningModeDescriptor { + // name defines the unique name of the signing mode + string name = 1; + // number is the unique int32 identifier for the sign_mode enum + int32 number = 2; + // authn_info_provider_method_fullname defines the fullname of the method to call to get + // the metadata required to authenticate using the provided sign_modes + string authn_info_provider_method_fullname = 3; +} + +// ChainDescriptor describes chain information of the application +message ChainDescriptor { + // id is the chain id + string id = 1; +} + +// CodecDescriptor describes the registered interfaces and provides metadata information on the types +message CodecDescriptor { + // interfaces is a list of the registerted interfaces descriptors + repeated InterfaceDescriptor interfaces = 1; +} + +// InterfaceDescriptor describes the implementation of an interface +message InterfaceDescriptor { + // fullname is the name of the interface + string fullname = 1; + // interface_accepting_messages contains information regarding the proto messages which contain the interface as + // google.protobuf.Any field + repeated InterfaceAcceptingMessageDescriptor interface_accepting_messages = 2; + // interface_implementers is a list of the descriptors of the interface implementers + repeated InterfaceImplementerDescriptor interface_implementers = 3; +} + +// InterfaceImplementerDescriptor describes an interface implementer +message InterfaceImplementerDescriptor { + // fullname is the protobuf queryable name of the interface implementer + string fullname = 1; + // type_url defines the type URL used when marshalling the type as any + // this is required so we can provide type safe google.protobuf.Any marshalling and + // unmarshalling, making sure that we don't accept just 'any' type + // in our interface fields + string type_url = 2; +} + +// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains +// an interface represented as a google.protobuf.Any +message InterfaceAcceptingMessageDescriptor { + // fullname is the protobuf fullname of the type containing the interface + string fullname = 1; + // field_descriptor_names is a list of the protobuf name (not fullname) of the field + // which contains the interface as google.protobuf.Any (the interface is the same, but + // it can be in multiple fields of the same proto message) + repeated string field_descriptor_names = 2; +} + +// ConfigurationDescriptor contains metadata information on the sdk.Config +message ConfigurationDescriptor { + // bech32_account_address_prefix is the account address prefix + string bech32_account_address_prefix = 1; +} + +// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction +message MsgDescriptor { + // msg_type_url contains the TypeURL of a sdk.Msg. + string msg_type_url = 1; +} + +// ReflectionService defines a service for application reflection. +service ReflectionService { + // GetAuthnDescriptor returns information on how to authenticate transactions in the application + // NOTE: this RPC is still experimental and might be subject to breaking changes or removal in + // future releases of the cosmos-sdk. + rpc GetAuthnDescriptor(GetAuthnDescriptorRequest) returns (GetAuthnDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/authn"; + } + // GetChainDescriptor returns the description of the chain + rpc GetChainDescriptor(GetChainDescriptorRequest) returns (GetChainDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/chain"; + }; + // GetCodecDescriptor returns the descriptor of the codec of the application + rpc GetCodecDescriptor(GetCodecDescriptorRequest) returns (GetCodecDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/codec"; + } + // GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application + rpc GetConfigurationDescriptor(GetConfigurationDescriptorRequest) returns (GetConfigurationDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/configuration"; + } + // GetQueryServicesDescriptor returns the available gRPC queryable services of the application + rpc GetQueryServicesDescriptor(GetQueryServicesDescriptorRequest) returns (GetQueryServicesDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/query_services"; + } + // GetTxDescriptor returns information on the used transaction object and available msgs that can be used + rpc GetTxDescriptor(GetTxDescriptorRequest) returns (GetTxDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor"; + } +} + +// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC +message GetAuthnDescriptorRequest {} +// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC +message GetAuthnDescriptorResponse { + // authn describes how to authenticate to the application when sending transactions + AuthnDescriptor authn = 1; +} + +// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC +message GetChainDescriptorRequest {} +// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC +message GetChainDescriptorResponse { + // chain describes application chain information + ChainDescriptor chain = 1; +} + +// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC +message GetCodecDescriptorRequest {} +// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC +message GetCodecDescriptorResponse { + // codec describes the application codec such as registered interfaces and implementations + CodecDescriptor codec = 1; +} + +// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC +message GetConfigurationDescriptorRequest {} +// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC +message GetConfigurationDescriptorResponse { + // config describes the application's sdk.Config + ConfigurationDescriptor config = 1; +} + +// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC +message GetQueryServicesDescriptorRequest {} +// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC +message GetQueryServicesDescriptorResponse { + // queries provides information on the available queryable services + QueryServicesDescriptor queries = 1; +} + +// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC +message GetTxDescriptorRequest {} +// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC +message GetTxDescriptorResponse { + // tx provides information on msgs that can be forwarded to the application + // alongside the accepted transaction protobuf type + TxDescriptor tx = 1; +} + +// QueryServicesDescriptor contains the list of cosmos-sdk queriable services +message QueryServicesDescriptor { + // query_services is a list of cosmos-sdk QueryServiceDescriptor + repeated QueryServiceDescriptor query_services = 1; +} + +// QueryServiceDescriptor describes a cosmos-sdk queryable service +message QueryServiceDescriptor { + // fullname is the protobuf fullname of the service descriptor + string fullname = 1; + // is_module describes if this service is actually exposed by an application's module + bool is_module = 2; + // methods provides a list of query service methods + repeated QueryMethodDescriptor methods = 3; +} + +// QueryMethodDescriptor describes a queryable method of a query service +// no other info is provided beside method name and tendermint queryable path +// because it would be redundant with the grpc reflection service +message QueryMethodDescriptor { + // name is the protobuf name (not fullname) of the method + string name = 1; + // full_query_path is the path that can be used to query + // this method via tendermint abci.Query + string full_query_path = 2; +} diff --git a/proto/cosmos/base/snapshots/v1beta1/snapshot.proto b/proto/cosmos/base/snapshots/v1beta1/snapshot.proto new file mode 100644 index 0000000..9ac5a7c --- /dev/null +++ b/proto/cosmos/base/snapshots/v1beta1/snapshot.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; +package cosmos.base.snapshots.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/snapshots/types"; + +// Snapshot contains Tendermint state sync snapshot info. +message Snapshot { + uint64 height = 1; + uint32 format = 2; + uint32 chunks = 3; + bytes hash = 4; + Metadata metadata = 5 [(gogoproto.nullable) = false]; +} + +// Metadata contains SDK-specific snapshot metadata. +message Metadata { + repeated bytes chunk_hashes = 1; // SHA-256 chunk hashes +} \ No newline at end of file diff --git a/proto/cosmos/base/store/v1beta1/commit_info.proto b/proto/cosmos/base/store/v1beta1/commit_info.proto new file mode 100644 index 0000000..98a33d3 --- /dev/null +++ b/proto/cosmos/base/store/v1beta1/commit_info.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; +package cosmos.base.store.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/store/types"; + +// CommitInfo defines commit information used by the multi-store when committing +// a version/height. +message CommitInfo { + int64 version = 1; + repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false]; +} + +// StoreInfo defines store-specific commit information. It contains a reference +// between a store name and the commit ID. +message StoreInfo { + string name = 1; + CommitID commit_id = 2 [(gogoproto.nullable) = false]; +} + +// CommitID defines the committment information when a specific store is +// committed. +message CommitID { + option (gogoproto.goproto_stringer) = false; + + int64 version = 1; + bytes hash = 2; +} diff --git a/proto/cosmos/base/store/v1beta1/listening.proto b/proto/cosmos/base/store/v1beta1/listening.proto new file mode 100644 index 0000000..3599971 --- /dev/null +++ b/proto/cosmos/base/store/v1beta1/listening.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package cosmos.base.store.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/store/types"; + +// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) +// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and +// Deletes +// +// Since: cosmos-sdk 0.43 +message StoreKVPair { + string store_key = 1; // the store key for the KVStore this pair originates from + bool delete = 2; // true indicates a delete operation, false indicates a set operation + bytes key = 3; + bytes value = 4; +} diff --git a/proto/cosmos/base/store/v1beta1/snapshot.proto b/proto/cosmos/base/store/v1beta1/snapshot.proto new file mode 100644 index 0000000..8348550 --- /dev/null +++ b/proto/cosmos/base/store/v1beta1/snapshot.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; +package cosmos.base.store.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/store/types"; + +// SnapshotItem is an item contained in a rootmulti.Store snapshot. +message SnapshotItem { + // item is the specific type of snapshot item. + oneof item { + SnapshotStoreItem store = 1; + SnapshotIAVLItem iavl = 2 [(gogoproto.customname) = "IAVL"]; + } +} + +// SnapshotStoreItem contains metadata about a snapshotted store. +message SnapshotStoreItem { + string name = 1; +} + +// SnapshotIAVLItem is an exported IAVL node. +message SnapshotIAVLItem { + bytes key = 1; + bytes value = 2; + int64 version = 3; + int32 height = 4; +} \ No newline at end of file diff --git a/proto/cosmos/base/tendermint/v1beta1/query.proto b/proto/cosmos/base/tendermint/v1beta1/query.proto new file mode 100644 index 0000000..98542d2 --- /dev/null +++ b/proto/cosmos/base/tendermint/v1beta1/query.proto @@ -0,0 +1,138 @@ +syntax = "proto3"; +package cosmos.base.tendermint.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "google/api/annotations.proto"; +import "tendermint/p2p/types.proto"; +import "tendermint/types/block.proto"; +import "tendermint/types/types.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/tmservice"; + +// Service defines the gRPC querier service for tendermint queries. +service Service { + // GetNodeInfo queries the current node info. + rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoResponse) { + option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/node_info"; + } + // GetSyncing queries node syncing. + rpc GetSyncing(GetSyncingRequest) returns (GetSyncingResponse) { + option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/syncing"; + } + // GetLatestBlock returns the latest block. + rpc GetLatestBlock(GetLatestBlockRequest) returns (GetLatestBlockResponse) { + option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/latest"; + } + // GetBlockByHeight queries block for given height. + rpc GetBlockByHeight(GetBlockByHeightRequest) returns (GetBlockByHeightResponse) { + option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/{height}"; + } + + // GetLatestValidatorSet queries latest validator-set. + rpc GetLatestValidatorSet(GetLatestValidatorSetRequest) returns (GetLatestValidatorSetResponse) { + option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/latest"; + } + // GetValidatorSetByHeight queries validator-set at a given height. + rpc GetValidatorSetByHeight(GetValidatorSetByHeightRequest) returns (GetValidatorSetByHeightResponse) { + option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/{height}"; + } +} + +// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. +message GetValidatorSetByHeightRequest { + int64 height = 1; + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. +message GetValidatorSetByHeightResponse { + int64 block_height = 1; + repeated Validator validators = 2; + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 3; +} + +// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. +message GetLatestValidatorSetRequest { + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. +message GetLatestValidatorSetResponse { + int64 block_height = 1; + repeated Validator validators = 2; + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 3; +} + +// Validator is the type for the validator-set. +message Validator { + string address = 1; + google.protobuf.Any pub_key = 2; + int64 voting_power = 3; + int64 proposer_priority = 4; +} + +// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. +message GetBlockByHeightRequest { + int64 height = 1; +} + +// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. +message GetBlockByHeightResponse { + .tendermint.types.BlockID block_id = 1; + .tendermint.types.Block block = 2; +} + +// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. +message GetLatestBlockRequest {} + +// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. +message GetLatestBlockResponse { + .tendermint.types.BlockID block_id = 1; + .tendermint.types.Block block = 2; +} + +// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. +message GetSyncingRequest {} + +// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. +message GetSyncingResponse { + bool syncing = 1; +} + +// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. +message GetNodeInfoRequest {} + +// GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. +message GetNodeInfoResponse { + .tendermint.p2p.DefaultNodeInfo default_node_info = 1; + VersionInfo application_version = 2; +} + +// VersionInfo is the type for the GetNodeInfoResponse message. +message VersionInfo { + string name = 1; + string app_name = 2; + string version = 3; + string git_commit = 4; + string build_tags = 5; + string go_version = 6; + repeated Module build_deps = 7; + // Since: cosmos-sdk 0.43 + string cosmos_sdk_version = 8; +} + +// Module is the type for VersionInfo +message Module { + // module path + string path = 1; + // module version + string version = 2; + // checksum + string sum = 3; +} diff --git a/proto/cosmos/base/v1beta1/coin.proto b/proto/cosmos/base/v1beta1/coin.proto new file mode 100644 index 0000000..fab7528 --- /dev/null +++ b/proto/cosmos/base/v1beta1/coin.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; +package cosmos.base.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types"; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = false; + +// Coin defines a token with a denomination and an amount. +// +// NOTE: The amount field is an Int which implements the custom method +// signatures required by gogoproto. +message Coin { + option (gogoproto.equal) = true; + + string denom = 1; + string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; +} + +// DecCoin defines a token with a denomination and a decimal amount. +// +// NOTE: The amount field is an Dec which implements the custom method +// signatures required by gogoproto. +message DecCoin { + option (gogoproto.equal) = true; + + string denom = 1; + string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; +} + +// IntProto defines a Protobuf wrapper around an Int object. +message IntProto { + string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; +} + +// DecProto defines a Protobuf wrapper around a Dec object. +message DecProto { + string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/capability/v1beta1/capability.proto b/proto/cosmos/capability/v1beta1/capability.proto new file mode 100644 index 0000000..1c8332f --- /dev/null +++ b/proto/cosmos/capability/v1beta1/capability.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package cosmos.capability.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types"; + +import "gogoproto/gogo.proto"; + +// Capability defines an implementation of an object capability. The index +// provided to a Capability must be globally unique. +message Capability { + option (gogoproto.goproto_stringer) = false; + + uint64 index = 1 [(gogoproto.moretags) = "yaml:\"index\""]; +} + +// Owner defines a single capability owner. An owner is defined by the name of +// capability and the module name. +message Owner { + option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_getters) = false; + + string module = 1 [(gogoproto.moretags) = "yaml:\"module\""]; + string name = 2 [(gogoproto.moretags) = "yaml:\"name\""]; +} + +// CapabilityOwners defines a set of owners of a single Capability. The set of +// owners must be unique. +message CapabilityOwners { + repeated Owner owners = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/capability/v1beta1/genesis.proto b/proto/cosmos/capability/v1beta1/genesis.proto new file mode 100644 index 0000000..05bb0af --- /dev/null +++ b/proto/cosmos/capability/v1beta1/genesis.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package cosmos.capability.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/capability/v1beta1/capability.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types"; + +// GenesisOwners defines the capability owners with their corresponding index. +message GenesisOwners { + // index is the index of the capability owner. + uint64 index = 1; + + // index_owners are the owners at the given index. + CapabilityOwners index_owners = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"index_owners\""]; +} + +// GenesisState defines the capability module's genesis state. +message GenesisState { + // index is the capability global index. + uint64 index = 1; + + // owners represents a map from index to owners of the capability index + // index key is string to allow amino marshalling. + repeated GenesisOwners owners = 2 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/crisis/v1beta1/genesis.proto b/proto/cosmos/crisis/v1beta1/genesis.proto new file mode 100644 index 0000000..5b0ff7e --- /dev/null +++ b/proto/cosmos/crisis/v1beta1/genesis.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package cosmos.crisis.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +// GenesisState defines the crisis module's genesis state. +message GenesisState { + // constant_fee is the fee used to verify the invariant in the crisis + // module. + cosmos.base.v1beta1.Coin constant_fee = 3 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"constant_fee\""]; +} diff --git a/proto/cosmos/crisis/v1beta1/tx.proto b/proto/cosmos/crisis/v1beta1/tx.proto new file mode 100644 index 0000000..26457ad --- /dev/null +++ b/proto/cosmos/crisis/v1beta1/tx.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package cosmos.crisis.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; + +import "gogoproto/gogo.proto"; + +// Msg defines the bank Msg service. +service Msg { + // VerifyInvariant defines a method to verify a particular invariance. + rpc VerifyInvariant(MsgVerifyInvariant) returns (MsgVerifyInvariantResponse); +} + +// MsgVerifyInvariant represents a message to verify a particular invariance. +message MsgVerifyInvariant { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string sender = 1; + string invariant_module_name = 2 [(gogoproto.moretags) = "yaml:\"invariant_module_name\""]; + string invariant_route = 3 [(gogoproto.moretags) = "yaml:\"invariant_route\""]; +} + +// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. +message MsgVerifyInvariantResponse {} diff --git a/proto/cosmos/crypto/ed25519/keys.proto b/proto/cosmos/crypto/ed25519/keys.proto new file mode 100644 index 0000000..6ffec34 --- /dev/null +++ b/proto/cosmos/crypto/ed25519/keys.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; +package cosmos.crypto.ed25519; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"; + +// PubKey is an ed25519 public key for handling Tendermint keys in SDK. +// It's needed for Any serialization and SDK compatibility. +// It must not be used in a non Tendermint key context because it doesn't implement +// ADR-28. Nevertheless, you will like to use ed25519 in app user level +// then you must create a new proto message and follow ADR-28 for Address construction. +message PubKey { + option (gogoproto.goproto_stringer) = false; + + bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"]; +} + +// Deprecated: PrivKey defines a ed25519 private key. +// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. +message PrivKey { + bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PrivateKey"]; +} diff --git a/proto/cosmos/crypto/multisig/keys.proto b/proto/cosmos/crypto/multisig/keys.proto new file mode 100644 index 0000000..f8398e8 --- /dev/null +++ b/proto/cosmos/crypto/multisig/keys.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package cosmos.crypto.multisig; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/multisig"; + +// LegacyAminoPubKey specifies a public key type +// which nests multiple public keys and a threshold, +// it uses legacy amino address rules. +message LegacyAminoPubKey { + option (gogoproto.goproto_getters) = false; + + uint32 threshold = 1 [(gogoproto.moretags) = "yaml:\"threshold\""]; + repeated google.protobuf.Any public_keys = 2 + [(gogoproto.customname) = "PubKeys", (gogoproto.moretags) = "yaml:\"pubkeys\""]; +} diff --git a/proto/cosmos/crypto/multisig/v1beta1/multisig.proto b/proto/cosmos/crypto/multisig/v1beta1/multisig.proto new file mode 100644 index 0000000..bf671f1 --- /dev/null +++ b/proto/cosmos/crypto/multisig/v1beta1/multisig.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package cosmos.crypto.multisig.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/crypto/types"; + +// MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. +// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers +// signed and with which modes. +message MultiSignature { + option (gogoproto.goproto_unrecognized) = true; + repeated bytes signatures = 1; +} + +// CompactBitArray is an implementation of a space efficient bit array. +// This is used to ensure that the encoded data takes up a minimal amount of +// space after proto encoding. +// This is not thread safe, and is not intended for concurrent usage. +message CompactBitArray { + option (gogoproto.goproto_stringer) = false; + + uint32 extra_bits_stored = 1; + bytes elems = 2; +} diff --git a/proto/cosmos/crypto/secp256k1/keys.proto b/proto/cosmos/crypto/secp256k1/keys.proto new file mode 100644 index 0000000..a227257 --- /dev/null +++ b/proto/cosmos/crypto/secp256k1/keys.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package cosmos.crypto.secp256k1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"; + +// PubKey defines a secp256k1 public key +// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte +// if the y-coordinate is the lexicographically largest of the two associated with +// the x-coordinate. Otherwise the first byte is a 0x03. +// This prefix is followed with the x-coordinate. +message PubKey { + option (gogoproto.goproto_stringer) = false; + + bytes key = 1; +} + +// PrivKey defines a secp256k1 private key. +message PrivKey { + bytes key = 1; +} diff --git a/proto/cosmos/crypto/secp256r1/keys.proto b/proto/cosmos/crypto/secp256r1/keys.proto new file mode 100644 index 0000000..2e96c6e --- /dev/null +++ b/proto/cosmos/crypto/secp256r1/keys.proto @@ -0,0 +1,23 @@ +// Since: cosmos-sdk 0.43 +syntax = "proto3"; +package cosmos.crypto.secp256r1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1"; +option (gogoproto.messagename_all) = true; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_getters_all) = false; + +// PubKey defines a secp256r1 ECDSA public key. +message PubKey { + // Point on secp256r1 curve in a compressed representation as specified in section + // 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 + bytes key = 1 [(gogoproto.customtype) = "ecdsaPK"]; +} + +// PrivKey defines a secp256r1 ECDSA private key. +message PrivKey { + // secret number serialized using big-endian encoding + bytes secret = 1 [(gogoproto.customtype) = "ecdsaSK"]; +} diff --git a/proto/cosmos/distribution/v1beta1/distribution.proto b/proto/cosmos/distribution/v1beta1/distribution.proto new file mode 100644 index 0000000..ae98ec0 --- /dev/null +++ b/proto/cosmos/distribution/v1beta1/distribution.proto @@ -0,0 +1,157 @@ +syntax = "proto3"; +package cosmos.distribution.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +// Params defines the set of params for the distribution module. +message Params { + option (gogoproto.goproto_stringer) = false; + string community_tax = 1 [ + (gogoproto.moretags) = "yaml:\"community_tax\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + string base_proposer_reward = 2 [ + (gogoproto.moretags) = "yaml:\"base_proposer_reward\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + string bonus_proposer_reward = 3 [ + (gogoproto.moretags) = "yaml:\"bonus_proposer_reward\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + bool withdraw_addr_enabled = 4 [(gogoproto.moretags) = "yaml:\"withdraw_addr_enabled\""]; +} + +// ValidatorHistoricalRewards represents historical rewards for a validator. +// Height is implicit within the store key. +// Cumulative reward ratio is the sum from the zeroeth period +// until this period of rewards / tokens, per the spec. +// The reference count indicates the number of objects +// which might need to reference this historical entry at any point. +// ReferenceCount = +// number of outstanding delegations which ended the associated period (and +// might need to read that record) +// + number of slashes which ended the associated period (and might need to +// read that record) +// + one per validator for the zeroeth period, set on initialization +message ValidatorHistoricalRewards { + repeated cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1 [ + (gogoproto.moretags) = "yaml:\"cumulative_reward_ratio\"", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false + ]; + uint32 reference_count = 2 [(gogoproto.moretags) = "yaml:\"reference_count\""]; +} + +// ValidatorCurrentRewards represents current rewards and current +// period for a validator kept as a running counter and incremented +// each block as long as the validator's tokens remain constant. +message ValidatorCurrentRewards { + repeated cosmos.base.v1beta1.DecCoin rewards = 1 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; + uint64 period = 2; +} + +// ValidatorAccumulatedCommission represents accumulated commission +// for a validator kept as a running counter, can be withdrawn at any time. +message ValidatorAccumulatedCommission { + repeated cosmos.base.v1beta1.DecCoin commission = 1 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; +} + +// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards +// for a validator inexpensive to track, allows simple sanity checks. +message ValidatorOutstandingRewards { + repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ + (gogoproto.moretags) = "yaml:\"rewards\"", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false + ]; +} + +// ValidatorSlashEvent represents a validator slash event. +// Height is implicit within the store key. +// This is needed to calculate appropriate amount of staking tokens +// for delegations which are withdrawn after a slash has occurred. +message ValidatorSlashEvent { + uint64 validator_period = 1 [(gogoproto.moretags) = "yaml:\"validator_period\""]; + string fraction = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. +message ValidatorSlashEvents { + option (gogoproto.goproto_stringer) = false; + repeated ValidatorSlashEvent validator_slash_events = 1 + [(gogoproto.moretags) = "yaml:\"validator_slash_events\"", (gogoproto.nullable) = false]; +} + +// FeePool is the global fee pool for distribution. +message FeePool { + repeated cosmos.base.v1beta1.DecCoin community_pool = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.moretags) = "yaml:\"community_pool\"" + ]; +} + +// CommunityPoolSpendProposal details a proposal for use of community funds, +// together with how many coins are proposed to be spent, and to which +// recipient account. +message CommunityPoolSpendProposal { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string title = 1; + string description = 2; + string recipient = 3; + repeated cosmos.base.v1beta1.Coin amount = 4 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// DelegatorStartingInfo represents the starting info for a delegator reward +// period. It tracks the previous validator period, the delegation's amount of +// staking token, and the creation height (to check later on if any slashes have +// occurred). NOTE: Even though validators are slashed to whole staking tokens, +// the delegators within the validator may be left with less than a full token, +// thus sdk.Dec is used. +message DelegatorStartingInfo { + uint64 previous_period = 1 [(gogoproto.moretags) = "yaml:\"previous_period\""]; + string stake = 2 [ + (gogoproto.moretags) = "yaml:\"stake\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + uint64 height = 3 [(gogoproto.moretags) = "yaml:\"creation_height\"", (gogoproto.jsontag) = "creation_height"]; +} + +// DelegationDelegatorReward represents the properties +// of a delegator's delegation reward. +message DelegationDelegatorReward { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + + repeated cosmos.base.v1beta1.DecCoin reward = 2 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; +} + +// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal +// with a deposit +message CommunityPoolSpendProposalWithDeposit { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + + string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; + string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; + string recipient = 3 [(gogoproto.moretags) = "yaml:\"recipient\""]; + string amount = 4 [(gogoproto.moretags) = "yaml:\"amount\""]; + string deposit = 5 [(gogoproto.moretags) = "yaml:\"deposit\""]; +} diff --git a/proto/cosmos/distribution/v1beta1/genesis.proto b/proto/cosmos/distribution/v1beta1/genesis.proto new file mode 100644 index 0000000..c0b17cd --- /dev/null +++ b/proto/cosmos/distribution/v1beta1/genesis.proto @@ -0,0 +1,155 @@ +syntax = "proto3"; +package cosmos.distribution.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/distribution/v1beta1/distribution.proto"; + +// DelegatorWithdrawInfo is the address for where distributions rewards are +// withdrawn to by default this struct is only used at genesis to feed in +// default withdraw addresses. +message DelegatorWithdrawInfo { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address is the address of the delegator. + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + + // withdraw_address is the address to withdraw the delegation rewards to. + string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""]; +} + +// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. +message ValidatorOutstandingRewardsRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + + // outstanding_rewards represents the oustanding rewards of a validator. + repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"outstanding_rewards\"" + ]; +} + +// ValidatorAccumulatedCommissionRecord is used for import / export via genesis +// json. +message ValidatorAccumulatedCommissionRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + + // accumulated is the accumulated commission of a validator. + ValidatorAccumulatedCommission accumulated = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"accumulated\""]; +} + +// ValidatorHistoricalRewardsRecord is used for import / export via genesis +// json. +message ValidatorHistoricalRewardsRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + + // period defines the period the historical rewards apply to. + uint64 period = 2; + + // rewards defines the historical rewards of a validator. + ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""]; +} + +// ValidatorCurrentRewardsRecord is used for import / export via genesis json. +message ValidatorCurrentRewardsRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + + // rewards defines the current rewards of a validator. + ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""]; +} + +// DelegatorStartingInfoRecord used for import / export via genesis json. +message DelegatorStartingInfoRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address is the address of the delegator. + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + + // validator_address is the address of the validator. + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + + // starting_info defines the starting info of a delegator. + DelegatorStartingInfo starting_info = 3 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"starting_info\""]; +} + +// ValidatorSlashEventRecord is used for import / export via genesis json. +message ValidatorSlashEventRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + // height defines the block height at which the slash event occured. + uint64 height = 2; + // period is the period of the slash event. + uint64 period = 3; + // validator_slash_event describes the slash event. + ValidatorSlashEvent validator_slash_event = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"event\""]; +} + +// GenesisState defines the distribution module's genesis state. +message GenesisState { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // params defines all the paramaters of the module. + Params params = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"params\""]; + + // fee_pool defines the fee pool at genesis. + FeePool fee_pool = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"fee_pool\""]; + + // fee_pool defines the delegator withdraw infos at genesis. + repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_withdraw_infos\""]; + + // fee_pool defines the previous proposer at genesis. + string previous_proposer = 4 [(gogoproto.moretags) = "yaml:\"previous_proposer\""]; + + // fee_pool defines the outstanding rewards of all validators at genesis. + repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"outstanding_rewards\""]; + + // fee_pool defines the accumulated commisions of all validators at genesis. + repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_accumulated_commissions\""]; + + // fee_pool defines the historical rewards of all validators at genesis. + repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_historical_rewards\""]; + + // fee_pool defines the current rewards of all validators at genesis. + repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_current_rewards\""]; + + // fee_pool defines the delegator starting infos at genesis. + repeated DelegatorStartingInfoRecord delegator_starting_infos = 9 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_starting_infos\""]; + + // fee_pool defines the validator slash events at genesis. + repeated ValidatorSlashEventRecord validator_slash_events = 10 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_slash_events\""]; +} diff --git a/proto/cosmos/distribution/v1beta1/query.proto b/proto/cosmos/distribution/v1beta1/query.proto new file mode 100644 index 0000000..2991218 --- /dev/null +++ b/proto/cosmos/distribution/v1beta1/query.proto @@ -0,0 +1,218 @@ +syntax = "proto3"; +package cosmos.distribution.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/distribution/v1beta1/distribution.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; + +// Query defines the gRPC querier service for distribution module. +service Query { + // Params queries params of the distribution module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/params"; + } + + // ValidatorOutstandingRewards queries rewards of a validator address. + rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest) + returns (QueryValidatorOutstandingRewardsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" + "{validator_address}/outstanding_rewards"; + } + + // ValidatorCommission queries accumulated commission for a validator. + rpc ValidatorCommission(QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" + "{validator_address}/commission"; + } + + // ValidatorSlashes queries slash events of a validator. + rpc ValidatorSlashes(QueryValidatorSlashesRequest) returns (QueryValidatorSlashesResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes"; + } + + // DelegationRewards queries the total rewards accrued by a delegation. + rpc DelegationRewards(QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/" + "{validator_address}"; + } + + // DelegationTotalRewards queries the total rewards accrued by a each + // validator. + rpc DelegationTotalRewards(QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards"; + } + + // DelegatorValidators queries the validators of a delegator. + rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" + "{delegator_address}/validators"; + } + + // DelegatorWithdrawAddress queries withdraw address of a delegator. + rpc DelegatorWithdrawAddress(QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" + "{delegator_address}/withdraw_address"; + } + + // CommunityPool queries the community pool coins. + rpc CommunityPool(QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool"; + } +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +// QueryValidatorOutstandingRewardsRequest is the request type for the +// Query/ValidatorOutstandingRewards RPC method. +message QueryValidatorOutstandingRewardsRequest { + // validator_address defines the validator address to query for. + string validator_address = 1; +} + +// QueryValidatorOutstandingRewardsResponse is the response type for the +// Query/ValidatorOutstandingRewards RPC method. +message QueryValidatorOutstandingRewardsResponse { + ValidatorOutstandingRewards rewards = 1 [(gogoproto.nullable) = false]; +} + +// QueryValidatorCommissionRequest is the request type for the +// Query/ValidatorCommission RPC method +message QueryValidatorCommissionRequest { + // validator_address defines the validator address to query for. + string validator_address = 1; +} + +// QueryValidatorCommissionResponse is the response type for the +// Query/ValidatorCommission RPC method +message QueryValidatorCommissionResponse { + // commission defines the commision the validator received. + ValidatorAccumulatedCommission commission = 1 [(gogoproto.nullable) = false]; +} + +// QueryValidatorSlashesRequest is the request type for the +// Query/ValidatorSlashes RPC method +message QueryValidatorSlashesRequest { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + + // validator_address defines the validator address to query for. + string validator_address = 1; + // starting_height defines the optional starting height to query the slashes. + uint64 starting_height = 2; + // starting_height defines the optional ending height to query the slashes. + uint64 ending_height = 3; + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 4; +} + +// QueryValidatorSlashesResponse is the response type for the +// Query/ValidatorSlashes RPC method. +message QueryValidatorSlashesResponse { + // slashes defines the slashes the validator received. + repeated ValidatorSlashEvent slashes = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegationRewardsRequest is the request type for the +// Query/DelegationRewards RPC method. +message QueryDelegationRewardsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address defines the delegator address to query for. + string delegator_address = 1; + // validator_address defines the validator address to query for. + string validator_address = 2; +} + +// QueryDelegationRewardsResponse is the response type for the +// Query/DelegationRewards RPC method. +message QueryDelegationRewardsResponse { + // rewards defines the rewards accrued by a delegation. + repeated cosmos.base.v1beta1.DecCoin rewards = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; +} + +// QueryDelegationTotalRewardsRequest is the request type for the +// Query/DelegationTotalRewards RPC method. +message QueryDelegationTotalRewardsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_address defines the delegator address to query for. + string delegator_address = 1; +} + +// QueryDelegationTotalRewardsResponse is the response type for the +// Query/DelegationTotalRewards RPC method. +message QueryDelegationTotalRewardsResponse { + // rewards defines all the rewards accrued by a delegator. + repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false]; + // total defines the sum of all the rewards. + repeated cosmos.base.v1beta1.DecCoin total = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; +} + +// QueryDelegatorValidatorsRequest is the request type for the +// Query/DelegatorValidators RPC method. +message QueryDelegatorValidatorsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address defines the delegator address to query for. + string delegator_address = 1; +} + +// QueryDelegatorValidatorsResponse is the response type for the +// Query/DelegatorValidators RPC method. +message QueryDelegatorValidatorsResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validators defines the validators a delegator is delegating for. + repeated string validators = 1; +} + +// QueryDelegatorWithdrawAddressRequest is the request type for the +// Query/DelegatorWithdrawAddress RPC method. +message QueryDelegatorWithdrawAddressRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address defines the delegator address to query for. + string delegator_address = 1; +} + +// QueryDelegatorWithdrawAddressResponse is the response type for the +// Query/DelegatorWithdrawAddress RPC method. +message QueryDelegatorWithdrawAddressResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // withdraw_address defines the delegator address to query for. + string withdraw_address = 1; +} + +// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC +// method. +message QueryCommunityPoolRequest {} + +// QueryCommunityPoolResponse is the response type for the Query/CommunityPool +// RPC method. +message QueryCommunityPoolResponse { + // pool defines community pool's coins. + repeated cosmos.base.v1beta1.DecCoin pool = 1 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/distribution/v1beta1/tx.proto b/proto/cosmos/distribution/v1beta1/tx.proto new file mode 100644 index 0000000..e6ce478 --- /dev/null +++ b/proto/cosmos/distribution/v1beta1/tx.proto @@ -0,0 +1,79 @@ +syntax = "proto3"; +package cosmos.distribution.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +// Msg defines the distribution Msg service. +service Msg { + // SetWithdrawAddress defines a method to change the withdraw address + // for a delegator (or validator self-delegation). + rpc SetWithdrawAddress(MsgSetWithdrawAddress) returns (MsgSetWithdrawAddressResponse); + + // WithdrawDelegatorReward defines a method to withdraw rewards of delegator + // from a single validator. + rpc WithdrawDelegatorReward(MsgWithdrawDelegatorReward) returns (MsgWithdrawDelegatorRewardResponse); + + // WithdrawValidatorCommission defines a method to withdraw the + // full commission to the validator address. + rpc WithdrawValidatorCommission(MsgWithdrawValidatorCommission) returns (MsgWithdrawValidatorCommissionResponse); + + // FundCommunityPool defines a method to allow an account to directly + // fund the community pool. + rpc FundCommunityPool(MsgFundCommunityPool) returns (MsgFundCommunityPoolResponse); +} + +// MsgSetWithdrawAddress sets the withdraw address for +// a delegator (or validator self-delegation). +message MsgSetWithdrawAddress { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""]; +} + +// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. +message MsgSetWithdrawAddressResponse {} + +// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator +// from a single validator. +message MsgWithdrawDelegatorReward { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; +} + +// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. +message MsgWithdrawDelegatorRewardResponse {} + +// MsgWithdrawValidatorCommission withdraws the full commission to the validator +// address. +message MsgWithdrawValidatorCommission { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; +} + +// MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. +message MsgWithdrawValidatorCommissionResponse {} + +// MsgFundCommunityPool allows an account to directly +// fund the community pool. +message MsgFundCommunityPool { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + repeated cosmos.base.v1beta1.Coin amount = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + string depositor = 2; +} + +// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. +message MsgFundCommunityPoolResponse {} diff --git a/proto/cosmos/evidence/v1beta1/evidence.proto b/proto/cosmos/evidence/v1beta1/evidence.proto new file mode 100644 index 0000000..14612c3 --- /dev/null +++ b/proto/cosmos/evidence/v1beta1/evidence.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package cosmos.evidence.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; + +// Equivocation implements the Evidence interface and defines evidence of double +// signing misbehavior. +message Equivocation { + option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.equal) = false; + + int64 height = 1; + google.protobuf.Timestamp time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + int64 power = 3; + string consensus_address = 4 [(gogoproto.moretags) = "yaml:\"consensus_address\""]; +} \ No newline at end of file diff --git a/proto/cosmos/evidence/v1beta1/genesis.proto b/proto/cosmos/evidence/v1beta1/genesis.proto new file mode 100644 index 0000000..199f446 --- /dev/null +++ b/proto/cosmos/evidence/v1beta1/genesis.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package cosmos.evidence.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; + +import "google/protobuf/any.proto"; + +// GenesisState defines the evidence module's genesis state. +message GenesisState { + // evidence defines all the evidence at genesis. + repeated google.protobuf.Any evidence = 1; +} diff --git a/proto/cosmos/evidence/v1beta1/query.proto b/proto/cosmos/evidence/v1beta1/query.proto new file mode 100644 index 0000000..eda0054 --- /dev/null +++ b/proto/cosmos/evidence/v1beta1/query.proto @@ -0,0 +1,51 @@ +syntax = "proto3"; +package cosmos.evidence.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; + +// Query defines the gRPC querier service. +service Query { + // Evidence queries evidence based on evidence hash. + rpc Evidence(QueryEvidenceRequest) returns (QueryEvidenceResponse) { + option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence/{evidence_hash}"; + } + + // AllEvidence queries all evidence. + rpc AllEvidence(QueryAllEvidenceRequest) returns (QueryAllEvidenceResponse) { + option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence"; + } +} + +// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. +message QueryEvidenceRequest { + // evidence_hash defines the hash of the requested evidence. + bytes evidence_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; +} + +// QueryEvidenceResponse is the response type for the Query/Evidence RPC method. +message QueryEvidenceResponse { + // evidence returns the requested evidence. + google.protobuf.Any evidence = 1; +} + +// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC +// method. +message QueryAllEvidenceRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC +// method. +message QueryAllEvidenceResponse { + // evidence returns all evidences. + repeated google.protobuf.Any evidence = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/cosmos/evidence/v1beta1/tx.proto b/proto/cosmos/evidence/v1beta1/tx.proto new file mode 100644 index 0000000..38795f2 --- /dev/null +++ b/proto/cosmos/evidence/v1beta1/tx.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; +package cosmos.evidence.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; + +// Msg defines the evidence Msg service. +service Msg { + // SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or + // counterfactual signing. + rpc SubmitEvidence(MsgSubmitEvidence) returns (MsgSubmitEvidenceResponse); +} + +// MsgSubmitEvidence represents a message that supports submitting arbitrary +// Evidence of misbehavior such as equivocation or counterfactual signing. +message MsgSubmitEvidence { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string submitter = 1; + google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"]; +} + +// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. +message MsgSubmitEvidenceResponse { + // hash defines the hash of the evidence. + bytes hash = 4; +} diff --git a/proto/cosmos/feegrant/v1beta1/feegrant.proto b/proto/cosmos/feegrant/v1beta1/feegrant.proto new file mode 100644 index 0000000..a86691f --- /dev/null +++ b/proto/cosmos/feegrant/v1beta1/feegrant.proto @@ -0,0 +1,78 @@ +// Since: cosmos-sdk 0.43 +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; + +// BasicAllowance implements Allowance with a one-time grant of tokens +// that optionally expires. The grantee can use up to SpendLimit to cover fees. +message BasicAllowance { + option (cosmos_proto.implements_interface) = "FeeAllowanceI"; + + // spend_limit specifies the maximum amount of tokens that can be spent + // by this allowance and will be updated as tokens are spent. If it is + // empty, there is no spend limit and any amount of coins can be spent. + repeated cosmos.base.v1beta1.Coin spend_limit = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // expiration specifies an optional time when this allowance expires + google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true]; +} + +// PeriodicAllowance extends Allowance to allow for both a maximum cap, +// as well as a limit per time period. +message PeriodicAllowance { + option (cosmos_proto.implements_interface) = "FeeAllowanceI"; + + // basic specifies a struct of `BasicAllowance` + BasicAllowance basic = 1 [(gogoproto.nullable) = false]; + + // period specifies the time duration in which period_spend_limit coins can + // be spent before that allowance is reset + google.protobuf.Duration period = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + // period_spend_limit specifies the maximum number of coins that can be spent + // in the period + repeated cosmos.base.v1beta1.Coin period_spend_limit = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // period_can_spend is the number of coins left to be spent before the period_reset time + repeated cosmos.base.v1beta1.Coin period_can_spend = 4 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // period_reset is the time at which this period resets and a new one begins, + // it is calculated from the start time of the first transaction after the + // last period ended + google.protobuf.Timestamp period_reset = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; +} + +// AllowedMsgAllowance creates allowance only for specified message types. +message AllowedMsgAllowance { + option (gogoproto.goproto_getters) = false; + option (cosmos_proto.implements_interface) = "FeeAllowanceI"; + + // allowance can be any of basic and filtered fee allowance. + google.protobuf.Any allowance = 1 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; + + // allowed_messages are the messages for which the grantee has the access. + repeated string allowed_messages = 2; +} + +// Grant is stored in the KVStore to record a grant with full context +message Grant { + // granter is the address of the user granting an allowance of their funds. + string granter = 1; + + // grantee is the address of the user being granted an allowance of another user's funds. + string grantee = 2; + + // allowance can be any of basic and filtered fee allowance. + google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; +} diff --git a/proto/cosmos/feegrant/v1beta1/genesis.proto b/proto/cosmos/feegrant/v1beta1/genesis.proto new file mode 100644 index 0000000..5b1ac4c --- /dev/null +++ b/proto/cosmos/feegrant/v1beta1/genesis.proto @@ -0,0 +1,13 @@ +// Since: cosmos-sdk 0.43 +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/feegrant/v1beta1/feegrant.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; + +// GenesisState contains a set of fee allowances, persisted from the store +message GenesisState { + repeated Grant allowances = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/feegrant/v1beta1/query.proto b/proto/cosmos/feegrant/v1beta1/query.proto new file mode 100644 index 0000000..9cf2a49 --- /dev/null +++ b/proto/cosmos/feegrant/v1beta1/query.proto @@ -0,0 +1,55 @@ +// Since: cosmos-sdk 0.43 +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "cosmos/feegrant/v1beta1/feegrant.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; + +// Query defines the gRPC querier service. +service Query { + + // Allowance returns fee granted to the grantee by the granter. + rpc Allowance(QueryAllowanceRequest) returns (QueryAllowanceResponse) { + option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}"; + } + + // Allowances returns all the grants for address. + rpc Allowances(QueryAllowancesRequest) returns (QueryAllowancesResponse) { + option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowances/{grantee}"; + } +} + +// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. +message QueryAllowanceRequest { + // granter is the address of the user granting an allowance of their funds. + string granter = 1; + + // grantee is the address of the user being granted an allowance of another user's funds. + string grantee = 2; +} + +// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. +message QueryAllowanceResponse { + // allowance is a allowance granted for grantee by granter. + cosmos.feegrant.v1beta1.Grant allowance = 1; +} + +// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. +message QueryAllowancesRequest { + string grantee = 1; + + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. +message QueryAllowancesResponse { + // allowances are allowance's granted for grantee by granter. + repeated cosmos.feegrant.v1beta1.Grant allowances = 1; + + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/cosmos/feegrant/v1beta1/tx.proto b/proto/cosmos/feegrant/v1beta1/tx.proto new file mode 100644 index 0000000..2d875e9 --- /dev/null +++ b/proto/cosmos/feegrant/v1beta1/tx.proto @@ -0,0 +1,49 @@ +// Since: cosmos-sdk 0.43 +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; + +// Msg defines the feegrant msg service. +service Msg { + + // GrantAllowance grants fee allowance to the grantee on the granter's + // account with the provided expiration time. + rpc GrantAllowance(MsgGrantAllowance) returns (MsgGrantAllowanceResponse); + + // RevokeAllowance revokes any fee allowance of granter's account that + // has been granted to the grantee. + rpc RevokeAllowance(MsgRevokeAllowance) returns (MsgRevokeAllowanceResponse); +} + +// MsgGrantAllowance adds permission for Grantee to spend up to Allowance +// of fees from the account of Granter. +message MsgGrantAllowance { + // granter is the address of the user granting an allowance of their funds. + string granter = 1; + + // grantee is the address of the user being granted an allowance of another user's funds. + string grantee = 2; + + // allowance can be any of basic and filtered fee allowance. + google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; +} + +// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. +message MsgGrantAllowanceResponse {} + +// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. +message MsgRevokeAllowance { + // granter is the address of the user granting an allowance of their funds. + string granter = 1; + + // grantee is the address of the user being granted an allowance of another user's funds. + string grantee = 2; +} + +// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. +message MsgRevokeAllowanceResponse {} diff --git a/proto/cosmos/genutil/v1beta1/genesis.proto b/proto/cosmos/genutil/v1beta1/genesis.proto new file mode 100644 index 0000000..a020779 --- /dev/null +++ b/proto/cosmos/genutil/v1beta1/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package cosmos.genutil.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/genutil/types"; + +// GenesisState defines the raw genesis transaction in JSON. +message GenesisState { + // gen_txs defines the genesis transactions. + repeated bytes gen_txs = 1 [ + (gogoproto.casttype) = "encoding/json.RawMessage", + (gogoproto.jsontag) = "gentxs", + (gogoproto.moretags) = "yaml:\"gentxs\"" + ]; +} diff --git a/proto/cosmos/gov/v1beta1/genesis.proto b/proto/cosmos/gov/v1beta1/genesis.proto new file mode 100644 index 0000000..a999500 --- /dev/null +++ b/proto/cosmos/gov/v1beta1/genesis.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package cosmos.gov.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/gov/v1beta1/gov.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; + +// GenesisState defines the gov module's genesis state. +message GenesisState { + // starting_proposal_id is the ID of the starting proposal. + uint64 starting_proposal_id = 1 [(gogoproto.moretags) = "yaml:\"starting_proposal_id\""]; + // deposits defines all the deposits present at genesis. + repeated Deposit deposits = 2 [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false]; + // votes defines all the votes present at genesis. + repeated Vote votes = 3 [(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false]; + // proposals defines all the proposals present at genesis. + repeated Proposal proposals = 4 [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false]; + // params defines all the paramaters of related to deposit. + DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_params\""]; + // params defines all the paramaters of related to voting. + VotingParams voting_params = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_params\""]; + // params defines all the paramaters of related to tally. + TallyParams tally_params = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"tally_params\""]; +} diff --git a/proto/cosmos/gov/v1beta1/gov.proto b/proto/cosmos/gov/v1beta1/gov.proto new file mode 100644 index 0000000..01aebf9 --- /dev/null +++ b/proto/cosmos/gov/v1beta1/gov.proto @@ -0,0 +1,200 @@ +syntax = "proto3"; +package cosmos.gov.v1beta1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = false; +option (gogoproto.goproto_getters_all) = false; + +// VoteOption enumerates the valid vote options for a given governance proposal. +enum VoteOption { + option (gogoproto.goproto_enum_prefix) = false; + + // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + VOTE_OPTION_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "OptionEmpty"]; + // VOTE_OPTION_YES defines a yes vote option. + VOTE_OPTION_YES = 1 [(gogoproto.enumvalue_customname) = "OptionYes"]; + // VOTE_OPTION_ABSTAIN defines an abstain vote option. + VOTE_OPTION_ABSTAIN = 2 [(gogoproto.enumvalue_customname) = "OptionAbstain"]; + // VOTE_OPTION_NO defines a no vote option. + VOTE_OPTION_NO = 3 [(gogoproto.enumvalue_customname) = "OptionNo"]; + // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + VOTE_OPTION_NO_WITH_VETO = 4 [(gogoproto.enumvalue_customname) = "OptionNoWithVeto"]; +} + +// WeightedVoteOption defines a unit of vote for vote split. +// +// Since: cosmos-sdk 0.43 +message WeightedVoteOption { + VoteOption option = 1; + string weight = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"weight\"" + ]; +} + +// TextProposal defines a standard text proposal whose changes need to be +// manually updated in case of approval. +message TextProposal { + option (cosmos_proto.implements_interface) = "Content"; + + option (gogoproto.equal) = true; + + string title = 1; + string description = 2; +} + +// Deposit defines an amount deposited by an account address to an active +// proposal. +message Deposit { + option (gogoproto.goproto_getters) = false; + option (gogoproto.equal) = false; + + uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; + string depositor = 2; + repeated cosmos.base.v1beta1.Coin amount = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// Proposal defines the core field members of a governance proposal. +message Proposal { + option (gogoproto.equal) = true; + + uint64 proposal_id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "yaml:\"id\""]; + google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"]; + ProposalStatus status = 3 [(gogoproto.moretags) = "yaml:\"proposal_status\""]; + TallyResult final_tally_result = 4 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"final_tally_result\""]; + google.protobuf.Timestamp submit_time = 5 + [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"submit_time\""]; + google.protobuf.Timestamp deposit_end_time = 6 + [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_end_time\""]; + repeated cosmos.base.v1beta1.Coin total_deposit = 7 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"total_deposit\"" + ]; + google.protobuf.Timestamp voting_start_time = 8 + [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_start_time\""]; + google.protobuf.Timestamp voting_end_time = 9 + [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_end_time\""]; +} + +// ProposalStatus enumerates the valid statuses of a proposal. +enum ProposalStatus { + option (gogoproto.goproto_enum_prefix) = false; + + // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + PROPOSAL_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusNil"]; + // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + // period. + PROPOSAL_STATUS_DEPOSIT_PERIOD = 1 [(gogoproto.enumvalue_customname) = "StatusDepositPeriod"]; + // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + // period. + PROPOSAL_STATUS_VOTING_PERIOD = 2 [(gogoproto.enumvalue_customname) = "StatusVotingPeriod"]; + // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + // passed. + PROPOSAL_STATUS_PASSED = 3 [(gogoproto.enumvalue_customname) = "StatusPassed"]; + // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + // been rejected. + PROPOSAL_STATUS_REJECTED = 4 [(gogoproto.enumvalue_customname) = "StatusRejected"]; + // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + // failed. + PROPOSAL_STATUS_FAILED = 5 [(gogoproto.enumvalue_customname) = "StatusFailed"]; +} + +// TallyResult defines a standard tally for a governance proposal. +message TallyResult { + option (gogoproto.equal) = true; + + string yes = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string abstain = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string no = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string no_with_veto = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"no_with_veto\"" + ]; +} + +// Vote defines a vote on a governance proposal. +// A Vote consists of a proposal ID, the voter, and the vote option. +message Vote { + option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = false; + + uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; + string voter = 2; + // Deprecated: Prefer to use `options` instead. This field is set in queries + // if and only if `len(options) == 1` and that option has weight 1. In all + // other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + VoteOption option = 3 [deprecated = true]; + // Since: cosmos-sdk 0.43 + repeated WeightedVoteOption options = 4 [(gogoproto.nullable) = false]; +} + +// DepositParams defines the params for deposits on governance proposals. +message DepositParams { + // Minimum deposit for a proposal to enter voting period. + repeated cosmos.base.v1beta1.Coin min_deposit = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"min_deposit\"", + (gogoproto.jsontag) = "min_deposit,omitempty" + ]; + + // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + // months. + google.protobuf.Duration max_deposit_period = 2 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true, + (gogoproto.jsontag) = "max_deposit_period,omitempty", + (gogoproto.moretags) = "yaml:\"max_deposit_period\"" + ]; +} + +// VotingParams defines the params for voting on governance proposals. +message VotingParams { + // Length of the voting period. + google.protobuf.Duration voting_period = 1 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true, + (gogoproto.jsontag) = "voting_period,omitempty", + (gogoproto.moretags) = "yaml:\"voting_period\"" + ]; +} + +// TallyParams defines the params for tallying votes on governance proposals. +message TallyParams { + // Minimum percentage of total stake needed to vote for a result to be + // considered valid. + bytes quorum = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "quorum,omitempty" + ]; + + // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. + bytes threshold = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "threshold,omitempty" + ]; + + // Minimum value of Veto votes to Total votes ratio for proposal to be + // vetoed. Default value: 1/3. + bytes veto_threshold = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "veto_threshold,omitempty", + (gogoproto.moretags) = "yaml:\"veto_threshold\"" + ]; +} diff --git a/proto/cosmos/gov/v1beta1/query.proto b/proto/cosmos/gov/v1beta1/query.proto new file mode 100644 index 0000000..da62bdb --- /dev/null +++ b/proto/cosmos/gov/v1beta1/query.proto @@ -0,0 +1,190 @@ +syntax = "proto3"; +package cosmos.gov.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/gov/v1beta1/gov.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; + +// Query defines the gRPC querier service for gov module +service Query { + // Proposal queries proposal details based on ProposalID. + rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}"; + } + + // Proposals queries all proposals based on given status. + rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/proposals"; + } + + // Vote queries voted information based on proposalID, voterAddr. + rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}"; + } + + // Votes queries votes of a given proposal. + rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes"; + } + + // Params queries all parameters of the gov module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/params/{params_type}"; + } + + // Deposit queries single deposit information based proposalID, depositAddr. + rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}"; + } + + // Deposits queries all deposits of a single proposal. + rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits"; + } + + // TallyResult queries the tally of a proposal vote. + rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/tally"; + } +} + +// QueryProposalRequest is the request type for the Query/Proposal RPC method. +message QueryProposalRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; +} + +// QueryProposalResponse is the response type for the Query/Proposal RPC method. +message QueryProposalResponse { + Proposal proposal = 1 [(gogoproto.nullable) = false]; +} + +// QueryProposalsRequest is the request type for the Query/Proposals RPC method. +message QueryProposalsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // proposal_status defines the status of the proposals. + ProposalStatus proposal_status = 1; + + // voter defines the voter address for the proposals. + string voter = 2; + + // depositor defines the deposit addresses from the proposals. + string depositor = 3; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 4; +} + +// QueryProposalsResponse is the response type for the Query/Proposals RPC +// method. +message QueryProposalsResponse { + repeated Proposal proposals = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryVoteRequest is the request type for the Query/Vote RPC method. +message QueryVoteRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; + + // voter defines the oter address for the proposals. + string voter = 2; +} + +// QueryVoteResponse is the response type for the Query/Vote RPC method. +message QueryVoteResponse { + // vote defined the queried vote. + Vote vote = 1 [(gogoproto.nullable) = false]; +} + +// QueryVotesRequest is the request type for the Query/Votes RPC method. +message QueryVotesRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryVotesResponse is the response type for the Query/Votes RPC method. +message QueryVotesResponse { + // votes defined the queried votes. + repeated Vote votes = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest { + // params_type defines which parameters to query for, can be one of "voting", + // "tallying" or "deposit". + string params_type = 1; +} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // voting_params defines the parameters related to voting. + VotingParams voting_params = 1 [(gogoproto.nullable) = false]; + // deposit_params defines the parameters related to deposit. + DepositParams deposit_params = 2 [(gogoproto.nullable) = false]; + // tally_params defines the parameters related to tally. + TallyParams tally_params = 3 [(gogoproto.nullable) = false]; +} + +// QueryDepositRequest is the request type for the Query/Deposit RPC method. +message QueryDepositRequest { + option (gogoproto.goproto_getters) = false; + option (gogoproto.equal) = false; + + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; + + // depositor defines the deposit addresses from the proposals. + string depositor = 2; +} + +// QueryDepositResponse is the response type for the Query/Deposit RPC method. +message QueryDepositResponse { + // deposit defines the requested deposit. + Deposit deposit = 1 [(gogoproto.nullable) = false]; +} + +// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +message QueryDepositsRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +message QueryDepositsResponse { + repeated Deposit deposits = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryTallyResultRequest is the request type for the Query/Tally RPC method. +message QueryTallyResultRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; +} + +// QueryTallyResultResponse is the response type for the Query/Tally RPC method. +message QueryTallyResultResponse { + // tally defines the requested tally. + TallyResult tally = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/gov/v1beta1/tx.proto b/proto/cosmos/gov/v1beta1/tx.proto new file mode 100644 index 0000000..36c0a95 --- /dev/null +++ b/proto/cosmos/gov/v1beta1/tx.proto @@ -0,0 +1,99 @@ +syntax = "proto3"; +package cosmos.gov.v1beta1; + +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/gov/v1beta1/gov.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; + +// Msg defines the bank Msg service. +service Msg { + // SubmitProposal defines a method to create new proposal given a content. + rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse); + + // Vote defines a method to add a vote on a specific proposal. + rpc Vote(MsgVote) returns (MsgVoteResponse); + + // VoteWeighted defines a method to add a weighted vote on a specific proposal. + // + // Since: cosmos-sdk 0.43 + rpc VoteWeighted(MsgVoteWeighted) returns (MsgVoteWeightedResponse); + + // Deposit defines a method to add deposit on a specific proposal. + rpc Deposit(MsgDeposit) returns (MsgDepositResponse); +} + +// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary +// proposal Content. +message MsgSubmitProposal { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.stringer) = false; + option (gogoproto.goproto_getters) = false; + + google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "Content"]; + repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"initial_deposit\"" + ]; + string proposer = 3; +} + +// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. +message MsgSubmitProposalResponse { + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; +} + +// MsgVote defines a message to cast a vote. +message MsgVote { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.stringer) = false; + option (gogoproto.goproto_getters) = false; + + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; + string voter = 2; + VoteOption option = 3; +} + +// MsgVoteResponse defines the Msg/Vote response type. +message MsgVoteResponse {} + +// MsgVoteWeighted defines a message to cast a vote. +// +// Since: cosmos-sdk 0.43 +message MsgVoteWeighted { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.stringer) = false; + option (gogoproto.goproto_getters) = false; + + uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; + string voter = 2; + repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false]; +} + +// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. +// +// Since: cosmos-sdk 0.43 +message MsgVoteWeightedResponse {} + +// MsgDeposit defines a message to submit a deposit to an existing proposal. +message MsgDeposit { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.stringer) = false; + option (gogoproto.goproto_getters) = false; + + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; + string depositor = 2; + repeated cosmos.base.v1beta1.Coin amount = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// MsgDepositResponse defines the Msg/Deposit response type. +message MsgDepositResponse {} diff --git a/proto/cosmos/mint/v1beta1/genesis.proto b/proto/cosmos/mint/v1beta1/genesis.proto new file mode 100644 index 0000000..4e783fb --- /dev/null +++ b/proto/cosmos/mint/v1beta1/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package cosmos.mint.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/mint/v1beta1/mint.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; + +// GenesisState defines the mint module's genesis state. +message GenesisState { + // minter is a space for holding current inflation information. + Minter minter = 1 [(gogoproto.nullable) = false]; + + // params defines all the paramaters of the module. + Params params = 2 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/mint/v1beta1/mint.proto b/proto/cosmos/mint/v1beta1/mint.proto new file mode 100644 index 0000000..f94d4ae --- /dev/null +++ b/proto/cosmos/mint/v1beta1/mint.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; +package cosmos.mint.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; + +import "gogoproto/gogo.proto"; + +// Minter represents the minting state. +message Minter { + // current annual inflation rate + string inflation = 1 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + // current annual expected provisions + string annual_provisions = 2 [ + (gogoproto.moretags) = "yaml:\"annual_provisions\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + +// Params holds parameters for the mint module. +message Params { + option (gogoproto.goproto_stringer) = false; + + // type of coin to mint + string mint_denom = 1; + // maximum annual change in inflation rate + string inflation_rate_change = 2 [ + (gogoproto.moretags) = "yaml:\"inflation_rate_change\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // maximum inflation rate + string inflation_max = 3 [ + (gogoproto.moretags) = "yaml:\"inflation_max\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // minimum inflation rate + string inflation_min = 4 [ + (gogoproto.moretags) = "yaml:\"inflation_min\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // goal of percent bonded atoms + string goal_bonded = 5 [ + (gogoproto.moretags) = "yaml:\"goal_bonded\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // expected blocks per year + uint64 blocks_per_year = 6 [(gogoproto.moretags) = "yaml:\"blocks_per_year\""]; +} diff --git a/proto/cosmos/mint/v1beta1/query.proto b/proto/cosmos/mint/v1beta1/query.proto new file mode 100644 index 0000000..acd341d --- /dev/null +++ b/proto/cosmos/mint/v1beta1/query.proto @@ -0,0 +1,57 @@ +syntax = "proto3"; +package cosmos.mint.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/mint/v1beta1/mint.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; + +// Query provides defines the gRPC querier service. +service Query { + // Params returns the total set of minting parameters. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/mint/v1beta1/params"; + } + + // Inflation returns the current minting inflation value. + rpc Inflation(QueryInflationRequest) returns (QueryInflationResponse) { + option (google.api.http).get = "/cosmos/mint/v1beta1/inflation"; + } + + // AnnualProvisions current minting annual provisions value. + rpc AnnualProvisions(QueryAnnualProvisionsRequest) returns (QueryAnnualProvisionsResponse) { + option (google.api.http).get = "/cosmos/mint/v1beta1/annual_provisions"; + } +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +// QueryInflationRequest is the request type for the Query/Inflation RPC method. +message QueryInflationRequest {} + +// QueryInflationResponse is the response type for the Query/Inflation RPC +// method. +message QueryInflationResponse { + // inflation is the current minting inflation value. + bytes inflation = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// QueryAnnualProvisionsRequest is the request type for the +// Query/AnnualProvisions RPC method. +message QueryAnnualProvisionsRequest {} + +// QueryAnnualProvisionsResponse is the response type for the +// Query/AnnualProvisions RPC method. +message QueryAnnualProvisionsResponse { + // annual_provisions is the current minting annual provisions value. + bytes annual_provisions = 1 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/params/v1beta1/params.proto b/proto/cosmos/params/v1beta1/params.proto new file mode 100644 index 0000000..5382fd7 --- /dev/null +++ b/proto/cosmos/params/v1beta1/params.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; +package cosmos.params.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; + +// ParameterChangeProposal defines a proposal to change one or more parameters. +message ParameterChangeProposal { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string title = 1; + string description = 2; + repeated ParamChange changes = 3 [(gogoproto.nullable) = false]; +} + +// ParamChange defines an individual parameter change, for use in +// ParameterChangeProposal. +message ParamChange { + option (gogoproto.goproto_stringer) = false; + + string subspace = 1; + string key = 2; + string value = 3; +} diff --git a/proto/cosmos/params/v1beta1/query.proto b/proto/cosmos/params/v1beta1/query.proto new file mode 100644 index 0000000..1078e02 --- /dev/null +++ b/proto/cosmos/params/v1beta1/query.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; +package cosmos.params.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/params/v1beta1/params.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; + +// Query defines the gRPC querier service. +service Query { + // Params queries a specific parameter of a module, given its subspace and + // key. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/params/v1beta1/params"; + } +} + +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest { + // subspace defines the module to query the parameter for. + string subspace = 1; + + // key defines the key of the parameter in the subspace. + string key = 2; +} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // param defines the queried parameter. + ParamChange param = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/slashing/v1beta1/genesis.proto b/proto/cosmos/slashing/v1beta1/genesis.proto new file mode 100644 index 0000000..a7aebcf --- /dev/null +++ b/proto/cosmos/slashing/v1beta1/genesis.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; +package cosmos.slashing.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; + +import "gogoproto/gogo.proto"; +import "cosmos/slashing/v1beta1/slashing.proto"; + +// GenesisState defines the slashing module's genesis state. +message GenesisState { + // params defines all the paramaters of related to deposit. + Params params = 1 [(gogoproto.nullable) = false]; + + // signing_infos represents a map between validator addresses and their + // signing infos. + repeated SigningInfo signing_infos = 2 + [(gogoproto.moretags) = "yaml:\"signing_infos\"", (gogoproto.nullable) = false]; + + // missed_blocks represents a map between validator addresses and their + // missed blocks. + repeated ValidatorMissedBlocks missed_blocks = 3 + [(gogoproto.moretags) = "yaml:\"missed_blocks\"", (gogoproto.nullable) = false]; +} + +// SigningInfo stores validator signing info of corresponding address. +message SigningInfo { + // address is the validator address. + string address = 1; + // validator_signing_info represents the signing info of this validator. + ValidatorSigningInfo validator_signing_info = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_signing_info\""]; +} + +// ValidatorMissedBlocks contains array of missed blocks of corresponding +// address. +message ValidatorMissedBlocks { + // address is the validator address. + string address = 1; + // missed_blocks is an array of missed blocks by the validator. + repeated MissedBlock missed_blocks = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"missed_blocks\""]; +} + +// MissedBlock contains height and missed status as boolean. +message MissedBlock { + // index is the height at which the block was missed. + int64 index = 1; + // missed is the missed status. + bool missed = 2; +} diff --git a/proto/cosmos/slashing/v1beta1/query.proto b/proto/cosmos/slashing/v1beta1/query.proto new file mode 100644 index 0000000..869049a --- /dev/null +++ b/proto/cosmos/slashing/v1beta1/query.proto @@ -0,0 +1,63 @@ +syntax = "proto3"; +package cosmos.slashing.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/slashing/v1beta1/slashing.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; + +// Query provides defines the gRPC querier service +service Query { + // Params queries the parameters of slashing module + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/slashing/v1beta1/params"; + } + + // SigningInfo queries the signing info of given cons address + rpc SigningInfo(QuerySigningInfoRequest) returns (QuerySigningInfoResponse) { + option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos/{cons_address}"; + } + + // SigningInfos queries signing info of all validators + rpc SigningInfos(QuerySigningInfosRequest) returns (QuerySigningInfosResponse) { + option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos"; + } +} + +// QueryParamsRequest is the request type for the Query/Params RPC method +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method +message QueryParamsResponse { + Params params = 1 [(gogoproto.nullable) = false]; +} + +// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC +// method +message QuerySigningInfoRequest { + // cons_address is the address to query signing info of + string cons_address = 1; +} + +// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC +// method +message QuerySigningInfoResponse { + // val_signing_info is the signing info of requested val cons address + ValidatorSigningInfo val_signing_info = 1 [(gogoproto.nullable) = false]; +} + +// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC +// method +message QuerySigningInfosRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC +// method +message QuerySigningInfosResponse { + // info is the signing info of all validators + repeated cosmos.slashing.v1beta1.ValidatorSigningInfo info = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/cosmos/slashing/v1beta1/slashing.proto b/proto/cosmos/slashing/v1beta1/slashing.proto new file mode 100644 index 0000000..882a0fb --- /dev/null +++ b/proto/cosmos/slashing/v1beta1/slashing.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; +package cosmos.slashing.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +// ValidatorSigningInfo defines a validator's signing info for monitoring their +// liveness activity. +message ValidatorSigningInfo { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string address = 1; + // Height at which validator was first a candidate OR was unjailed + int64 start_height = 2 [(gogoproto.moretags) = "yaml:\"start_height\""]; + // Index which is incremented each time the validator was a bonded + // in a block and may have signed a precommit or not. This in conjunction with the + // `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`. + int64 index_offset = 3 [(gogoproto.moretags) = "yaml:\"index_offset\""]; + // Timestamp until which the validator is jailed due to liveness downtime. + google.protobuf.Timestamp jailed_until = 4 + [(gogoproto.moretags) = "yaml:\"jailed_until\"", (gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + // Whether or not a validator has been tombstoned (killed out of validator set). It is set + // once the validator commits an equivocation or for any other configured misbehiavor. + bool tombstoned = 5; + // A counter kept to avoid unnecessary array reads. + // Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. + int64 missed_blocks_counter = 6 [(gogoproto.moretags) = "yaml:\"missed_blocks_counter\""]; +} + +// Params represents the parameters used for by the slashing module. +message Params { + int64 signed_blocks_window = 1 [(gogoproto.moretags) = "yaml:\"signed_blocks_window\""]; + bytes min_signed_per_window = 2 [ + (gogoproto.moretags) = "yaml:\"min_signed_per_window\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + google.protobuf.Duration downtime_jail_duration = 3 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true, + (gogoproto.moretags) = "yaml:\"downtime_jail_duration\"" + ]; + bytes slash_fraction_double_sign = 4 [ + (gogoproto.moretags) = "yaml:\"slash_fraction_double_sign\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + bytes slash_fraction_downtime = 5 [ + (gogoproto.moretags) = "yaml:\"slash_fraction_downtime\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/cosmos/slashing/v1beta1/tx.proto b/proto/cosmos/slashing/v1beta1/tx.proto new file mode 100644 index 0000000..4d63370 --- /dev/null +++ b/proto/cosmos/slashing/v1beta1/tx.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package cosmos.slashing.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; + +// Msg defines the slashing Msg service. +service Msg { + // Unjail defines a method for unjailing a jailed validator, thus returning + // them into the bonded validator set, so they can begin receiving provisions + // and rewards again. + rpc Unjail(MsgUnjail) returns (MsgUnjailResponse); +} + +// MsgUnjail defines the Msg/Unjail request type +message MsgUnjail { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + + string validator_addr = 1 [(gogoproto.moretags) = "yaml:\"address\"", (gogoproto.jsontag) = "address"]; +} + +// MsgUnjailResponse defines the Msg/Unjail response type +message MsgUnjailResponse {} \ No newline at end of file diff --git a/proto/cosmos/staking/v1beta1/authz.proto b/proto/cosmos/staking/v1beta1/authz.proto new file mode 100644 index 0000000..d50c329 --- /dev/null +++ b/proto/cosmos/staking/v1beta1/authz.proto @@ -0,0 +1,47 @@ +syntax = "proto3"; +package cosmos.staking.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; + +// StakeAuthorization defines authorization for delegate/undelegate/redelegate. +// +// Since: cosmos-sdk 0.43 +message StakeAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + // max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is + // empty, there is no spend limit and any amount of coins can be delegated. + cosmos.base.v1beta1.Coin max_tokens = 1 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; + // validators is the oneof that represents either allow_list or deny_list + oneof validators { + // allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's + // account. + Validators allow_list = 2; + // deny_list specifies list of validator addresses to whom grantee can not delegate tokens. + Validators deny_list = 3; + } + // Validators defines list of validator addresses. + message Validators { + repeated string address = 1; + } + // authorization_type defines one of AuthorizationType. + AuthorizationType authorization_type = 4; +} + +// AuthorizationType defines the type of staking module authorization type +// +// Since: cosmos-sdk 0.43 +enum AuthorizationType { + // AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type + AUTHORIZATION_TYPE_UNSPECIFIED = 0; + // AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate + AUTHORIZATION_TYPE_DELEGATE = 1; + // AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate + AUTHORIZATION_TYPE_UNDELEGATE = 2; + // AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate + AUTHORIZATION_TYPE_REDELEGATE = 3; +} diff --git a/proto/cosmos/staking/v1beta1/genesis.proto b/proto/cosmos/staking/v1beta1/genesis.proto new file mode 100644 index 0000000..d1563db --- /dev/null +++ b/proto/cosmos/staking/v1beta1/genesis.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; +package cosmos.staking.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; + +import "gogoproto/gogo.proto"; +import "cosmos/staking/v1beta1/staking.proto"; + +// GenesisState defines the staking module's genesis state. +message GenesisState { + // params defines all the paramaters of related to deposit. + Params params = 1 [(gogoproto.nullable) = false]; + + // last_total_power tracks the total amounts of bonded tokens recorded during + // the previous end block. + bytes last_total_power = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"last_total_power\"", + (gogoproto.nullable) = false + ]; + + // last_validator_powers is a special index that provides a historical list + // of the last-block's bonded validators. + repeated LastValidatorPower last_validator_powers = 3 + [(gogoproto.moretags) = "yaml:\"last_validator_powers\"", (gogoproto.nullable) = false]; + + // delegations defines the validator set at genesis. + repeated Validator validators = 4 [(gogoproto.nullable) = false]; + + // delegations defines the delegations active at genesis. + repeated Delegation delegations = 5 [(gogoproto.nullable) = false]; + + // unbonding_delegations defines the unbonding delegations active at genesis. + repeated UnbondingDelegation unbonding_delegations = 6 + [(gogoproto.moretags) = "yaml:\"unbonding_delegations\"", (gogoproto.nullable) = false]; + + // redelegations defines the redelegations active at genesis. + repeated Redelegation redelegations = 7 [(gogoproto.nullable) = false]; + + bool exported = 8; +} + +// LastValidatorPower required for validator set update logic. +message LastValidatorPower { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address is the address of the validator. + string address = 1; + + // power defines the power of the validator. + int64 power = 2; +} diff --git a/proto/cosmos/staking/v1beta1/query.proto b/proto/cosmos/staking/v1beta1/query.proto new file mode 100644 index 0000000..4852c53 --- /dev/null +++ b/proto/cosmos/staking/v1beta1/query.proto @@ -0,0 +1,348 @@ +syntax = "proto3"; +package cosmos.staking.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/staking/v1beta1/staking.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; + +// Query defines the gRPC querier service. +service Query { + // Validators queries all validators that match the given status. + rpc Validators(QueryValidatorsRequest) returns (QueryValidatorsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators"; + } + + // Validator queries validator info for given validator address. + rpc Validator(QueryValidatorRequest) returns (QueryValidatorResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}"; + } + + // ValidatorDelegations queries delegate info for given validator. + rpc ValidatorDelegations(QueryValidatorDelegationsRequest) returns (QueryValidatorDelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations"; + } + + // ValidatorUnbondingDelegations queries unbonding delegations of a validator. + rpc ValidatorUnbondingDelegations(QueryValidatorUnbondingDelegationsRequest) + returns (QueryValidatorUnbondingDelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/" + "{validator_addr}/unbonding_delegations"; + } + + // Delegation queries delegate info for given validator delegator pair. + rpc Delegation(QueryDelegationRequest) returns (QueryDelegationResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/" + "{delegator_addr}"; + } + + // UnbondingDelegation queries unbonding info for given validator delegator + // pair. + rpc UnbondingDelegation(QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/" + "{delegator_addr}/unbonding_delegation"; + } + + // DelegatorDelegations queries all delegations of a given delegator address. + rpc DelegatorDelegations(QueryDelegatorDelegationsRequest) returns (QueryDelegatorDelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegations/{delegator_addr}"; + } + + // DelegatorUnbondingDelegations queries all unbonding delegations of a given + // delegator address. + rpc DelegatorUnbondingDelegations(QueryDelegatorUnbondingDelegationsRequest) + returns (QueryDelegatorUnbondingDelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/" + "{delegator_addr}/unbonding_delegations"; + } + + // Redelegations queries redelegations of given address. + rpc Redelegations(QueryRedelegationsRequest) returns (QueryRedelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations"; + } + + // DelegatorValidators queries all validators info for given delegator + // address. + rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators"; + } + + // DelegatorValidator queries validator info for given delegator validator + // pair. + rpc DelegatorValidator(QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/" + "{validator_addr}"; + } + + // HistoricalInfo queries the historical info for given height. + rpc HistoricalInfo(QueryHistoricalInfoRequest) returns (QueryHistoricalInfoResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/historical_info/{height}"; + } + + // Pool queries the pool info. + rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/pool"; + } + + // Parameters queries the staking parameters. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/params"; + } +} + +// QueryValidatorsRequest is request type for Query/Validators RPC method. +message QueryValidatorsRequest { + // status enables to query for validators matching a given status. + string status = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryValidatorsResponse is response type for the Query/Validators RPC method +message QueryValidatorsResponse { + // validators contains all the queried validators. + repeated Validator validators = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryValidatorRequest is response type for the Query/Validator RPC method +message QueryValidatorRequest { + // validator_addr defines the validator address to query for. + string validator_addr = 1; +} + +// QueryValidatorResponse is response type for the Query/Validator RPC method +message QueryValidatorResponse { + // validator defines the the validator info. + Validator validator = 1 [(gogoproto.nullable) = false]; +} + +// QueryValidatorDelegationsRequest is request type for the +// Query/ValidatorDelegations RPC method +message QueryValidatorDelegationsRequest { + // validator_addr defines the validator address to query for. + string validator_addr = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryValidatorDelegationsResponse is response type for the +// Query/ValidatorDelegations RPC method +message QueryValidatorDelegationsResponse { + repeated DelegationResponse delegation_responses = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DelegationResponses"]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryValidatorUnbondingDelegationsRequest is required type for the +// Query/ValidatorUnbondingDelegations RPC method +message QueryValidatorUnbondingDelegationsRequest { + // validator_addr defines the validator address to query for. + string validator_addr = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryValidatorUnbondingDelegationsResponse is response type for the +// Query/ValidatorUnbondingDelegations RPC method. +message QueryValidatorUnbondingDelegationsResponse { + repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegationRequest is request type for the Query/Delegation RPC method. +message QueryDelegationRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_addr defines the delegator address to query for. + string delegator_addr = 1; + + // validator_addr defines the validator address to query for. + string validator_addr = 2; +} + +// QueryDelegationResponse is response type for the Query/Delegation RPC method. +message QueryDelegationResponse { + // delegation_responses defines the delegation info of a delegation. + DelegationResponse delegation_response = 1; +} + +// QueryUnbondingDelegationRequest is request type for the +// Query/UnbondingDelegation RPC method. +message QueryUnbondingDelegationRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_addr defines the delegator address to query for. + string delegator_addr = 1; + + // validator_addr defines the validator address to query for. + string validator_addr = 2; +} + +// QueryDelegationResponse is response type for the Query/UnbondingDelegation +// RPC method. +message QueryUnbondingDelegationResponse { + // unbond defines the unbonding information of a delegation. + UnbondingDelegation unbond = 1 [(gogoproto.nullable) = false]; +} + +// QueryDelegatorDelegationsRequest is request type for the +// Query/DelegatorDelegations RPC method. +message QueryDelegatorDelegationsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_addr defines the delegator address to query for. + string delegator_addr = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryDelegatorDelegationsResponse is response type for the +// Query/DelegatorDelegations RPC method. +message QueryDelegatorDelegationsResponse { + // delegation_responses defines all the delegations' info of a delegator. + repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegatorUnbondingDelegationsRequest is request type for the +// Query/DelegatorUnbondingDelegations RPC method. +message QueryDelegatorUnbondingDelegationsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_addr defines the delegator address to query for. + string delegator_addr = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryUnbondingDelegatorDelegationsResponse is response type for the +// Query/UnbondingDelegatorDelegations RPC method. +message QueryDelegatorUnbondingDelegationsResponse { + repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryRedelegationsRequest is request type for the Query/Redelegations RPC +// method. +message QueryRedelegationsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_addr defines the delegator address to query for. + string delegator_addr = 1; + + // src_validator_addr defines the validator address to redelegate from. + string src_validator_addr = 2; + + // dst_validator_addr defines the validator address to redelegate to. + string dst_validator_addr = 3; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 4; +} + +// QueryRedelegationsResponse is response type for the Query/Redelegations RPC +// method. +message QueryRedelegationsResponse { + repeated RedelegationResponse redelegation_responses = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegatorValidatorsRequest is request type for the +// Query/DelegatorValidators RPC method. +message QueryDelegatorValidatorsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_addr defines the delegator address to query for. + string delegator_addr = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryDelegatorValidatorsResponse is response type for the +// Query/DelegatorValidators RPC method. +message QueryDelegatorValidatorsResponse { + // validators defines the the validators' info of a delegator. + repeated Validator validators = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegatorValidatorRequest is request type for the +// Query/DelegatorValidator RPC method. +message QueryDelegatorValidatorRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_addr defines the delegator address to query for. + string delegator_addr = 1; + + // validator_addr defines the validator address to query for. + string validator_addr = 2; +} + +// QueryDelegatorValidatorResponse response type for the +// Query/DelegatorValidator RPC method. +message QueryDelegatorValidatorResponse { + // validator defines the the validator info. + Validator validator = 1 [(gogoproto.nullable) = false]; +} + +// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC +// method. +message QueryHistoricalInfoRequest { + // height defines at which height to query the historical info. + int64 height = 1; +} + +// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC +// method. +message QueryHistoricalInfoResponse { + // hist defines the historical info at the given height. + HistoricalInfo hist = 1; +} + +// QueryPoolRequest is request type for the Query/Pool RPC method. +message QueryPoolRequest {} + +// QueryPoolResponse is response type for the Query/Pool RPC method. +message QueryPoolResponse { + // pool defines the pool info. + Pool pool = 1 [(gogoproto.nullable) = false]; +} + +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // params holds all the parameters of this module. + Params params = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/staking/v1beta1/staking.proto b/proto/cosmos/staking/v1beta1/staking.proto new file mode 100644 index 0000000..76e9599 --- /dev/null +++ b/proto/cosmos/staking/v1beta1/staking.proto @@ -0,0 +1,334 @@ +syntax = "proto3"; +package cosmos.staking.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "tendermint/types/types.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; + +// HistoricalInfo contains header and validator information for a given block. +// It is stored as part of staking module's state, which persists the `n` most +// recent HistoricalInfo +// (`n` is set by the staking module's `historical_entries` parameter). +message HistoricalInfo { + tendermint.types.Header header = 1 [(gogoproto.nullable) = false]; + repeated Validator valset = 2 [(gogoproto.nullable) = false]; +} + +// CommissionRates defines the initial commission rates to be used for creating +// a validator. +message CommissionRates { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // rate is the commission rate charged to delegators, as a fraction. + string rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + // max_rate defines the maximum commission rate which validator can ever charge, as a fraction. + string max_rate = 2 [ + (gogoproto.moretags) = "yaml:\"max_rate\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // max_change_rate defines the maximum daily increase of the validator commission, as a fraction. + string max_change_rate = 3 [ + (gogoproto.moretags) = "yaml:\"max_change_rate\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + +// Commission defines commission parameters for a given validator. +message Commission { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // commission_rates defines the initial commission rates to be used for creating a validator. + CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + // update_time is the last time the commission rate was changed. + google.protobuf.Timestamp update_time = 2 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"update_time\""]; +} + +// Description defines a validator description. +message Description { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // moniker defines a human-readable name for the validator. + string moniker = 1; + // identity defines an optional identity signature (ex. UPort or Keybase). + string identity = 2; + // website defines an optional website link. + string website = 3; + // security_contact defines an optional email for security contact. + string security_contact = 4 [(gogoproto.moretags) = "yaml:\"security_contact\""]; + // details define other optional details. + string details = 5; +} + +// Validator defines a validator, together with the total amount of the +// Validator's bond shares and their exchange rate to coins. Slashing results in +// a decrease in the exchange rate, allowing correct calculation of future +// undelegations without iterating over delegators. When coins are delegated to +// this validator, the validator is credited with a delegation whose number of +// bond shares is based on the amount of coins delegated divided by the current +// exchange rate. Voting power can be calculated as total bonded shares +// multiplied by exchange rate. +message Validator { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_getters) = false; + + // operator_address defines the address of the validator's operator; bech encoded in JSON. + string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""]; + // consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + google.protobuf.Any consensus_pubkey = 2 + [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.moretags) = "yaml:\"consensus_pubkey\""]; + // jailed defined whether the validator has been jailed from bonded status or not. + bool jailed = 3; + // status is the validator status (bonded/unbonding/unbonded). + BondStatus status = 4; + // tokens define the delegated tokens (incl. self-delegation). + string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + // delegator_shares defines total shares issued to a validator's delegators. + string delegator_shares = 6 [ + (gogoproto.moretags) = "yaml:\"delegator_shares\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // description defines the description terms for the validator. + Description description = 7 [(gogoproto.nullable) = false]; + // unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. + int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""]; + // unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. + google.protobuf.Timestamp unbonding_time = 9 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; + // commission defines the commission parameters. + Commission commission = 10 [(gogoproto.nullable) = false]; + // min_self_delegation is the validator's self declared minimum self delegation. + string min_self_delegation = 11 [ + (gogoproto.moretags) = "yaml:\"min_self_delegation\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} + +// BondStatus is the status of a validator. +enum BondStatus { + option (gogoproto.goproto_enum_prefix) = false; + + // UNSPECIFIED defines an invalid validator status. + BOND_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "Unspecified"]; + // UNBONDED defines a validator that is not bonded. + BOND_STATUS_UNBONDED = 1 [(gogoproto.enumvalue_customname) = "Unbonded"]; + // UNBONDING defines a validator that is unbonding. + BOND_STATUS_UNBONDING = 2 [(gogoproto.enumvalue_customname) = "Unbonding"]; + // BONDED defines a validator that is bonded. + BOND_STATUS_BONDED = 3 [(gogoproto.enumvalue_customname) = "Bonded"]; +} + +// ValAddresses defines a repeated set of validator addresses. +message ValAddresses { + option (gogoproto.goproto_stringer) = false; + option (gogoproto.stringer) = true; + + repeated string addresses = 1; +} + +// DVPair is struct that just has a delegator-validator pair with no other data. +// It is intended to be used as a marshalable pointer. For example, a DVPair can +// be used to construct the key to getting an UnbondingDelegation from state. +message DVPair { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; +} + +// DVPairs defines an array of DVPair objects. +message DVPairs { + repeated DVPair pairs = 1 [(gogoproto.nullable) = false]; +} + +// DVVTriplet is struct that just has a delegator-validator-validator triplet +// with no other data. It is intended to be used as a marshalable pointer. For +// example, a DVVTriplet can be used to construct the key to getting a +// Redelegation from state. +message DVVTriplet { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; + string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; +} + +// DVVTriplets defines an array of DVVTriplet objects. +message DVVTriplets { + repeated DVVTriplet triplets = 1 [(gogoproto.nullable) = false]; +} + +// Delegation represents the bond with tokens held by an account. It is +// owned by one delegator, and is associated with the voting power of one +// validator. +message Delegation { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + // delegator_address is the bech32-encoded address of the delegator. + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + // validator_address is the bech32-encoded address of the validator. + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + // shares define the delegation shares received. + string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// UnbondingDelegation stores all of a single delegator's unbonding bonds +// for a single validator in an time-ordered list. +message UnbondingDelegation { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + // delegator_address is the bech32-encoded address of the delegator. + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + // validator_address is the bech32-encoded address of the validator. + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + // entries are the unbonding delegation entries. + repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries +} + +// UnbondingDelegationEntry defines an unbonding object with relevant metadata. +message UnbondingDelegationEntry { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // creation_height is the height which the unbonding took place. + int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; + // completion_time is the unix time for unbonding completion. + google.protobuf.Timestamp completion_time = 2 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; + // initial_balance defines the tokens initially scheduled to receive at completion. + string initial_balance = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"initial_balance\"" + ]; + // balance defines the tokens to receive at completion. + string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; +} + +// RedelegationEntry defines a redelegation object with relevant metadata. +message RedelegationEntry { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // creation_height defines the height which the redelegation took place. + int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; + // completion_time defines the unix time for redelegation completion. + google.protobuf.Timestamp completion_time = 2 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; + // initial_balance defines the initial balance when redelegation started. + string initial_balance = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"initial_balance\"" + ]; + // shares_dst is the amount of destination-validator shares created by redelegation. + string shares_dst = 4 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// Redelegation contains the list of a particular delegator's redelegating bonds +// from a particular source validator to a particular destination validator. +message Redelegation { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + // delegator_address is the bech32-encoded address of the delegator. + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + // validator_src_address is the validator redelegation source operator address. + string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; + // validator_dst_address is the validator redelegation destination operator address. + string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; + // entries are the redelegation entries. + repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries +} + +// Params defines the parameters for the staking module. +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // unbonding_time is the time duration of unbonding. + google.protobuf.Duration unbonding_time = 1 + [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; + // max_validators is the maximum number of validators. + uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""]; + // max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). + uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""]; + // historical_entries is the number of historical entries to persist. + uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""]; + // bond_denom defines the bondable coin denomination. + string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""]; +} + +// DelegationResponse is equivalent to Delegation except that it contains a +// balance in addition to shares which is more suitable for client responses. +message DelegationResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + Delegation delegation = 1 [(gogoproto.nullable) = false]; + + cosmos.base.v1beta1.Coin balance = 2 [(gogoproto.nullable) = false]; +} + +// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it +// contains a balance in addition to shares which is more suitable for client +// responses. +message RedelegationEntryResponse { + option (gogoproto.equal) = true; + + RedelegationEntry redelegation_entry = 1 [(gogoproto.nullable) = false]; + string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; +} + +// RedelegationResponse is equivalent to a Redelegation except that its entries +// contain a balance in addition to shares which is more suitable for client +// responses. +message RedelegationResponse { + option (gogoproto.equal) = false; + + Redelegation redelegation = 1 [(gogoproto.nullable) = false]; + repeated RedelegationEntryResponse entries = 2 [(gogoproto.nullable) = false]; +} + +// Pool is used for tracking bonded and not-bonded token supply of the bond +// denomination. +message Pool { + option (gogoproto.description) = true; + option (gogoproto.equal) = true; + string not_bonded_tokens = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.jsontag) = "not_bonded_tokens", + (gogoproto.nullable) = false + ]; + string bonded_tokens = 2 [ + (gogoproto.jsontag) = "bonded_tokens", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"bonded_tokens\"" + ]; +} diff --git a/proto/cosmos/staking/v1beta1/tx.proto b/proto/cosmos/staking/v1beta1/tx.proto new file mode 100644 index 0000000..1ae182b --- /dev/null +++ b/proto/cosmos/staking/v1beta1/tx.proto @@ -0,0 +1,121 @@ +syntax = "proto3"; +package cosmos.staking.v1beta1; + +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; +import "gogoproto/gogo.proto"; + +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/staking/v1beta1/staking.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; + +// Msg defines the staking Msg service. +service Msg { + // CreateValidator defines a method for creating a new validator. + rpc CreateValidator(MsgCreateValidator) returns (MsgCreateValidatorResponse); + + // EditValidator defines a method for editing an existing validator. + rpc EditValidator(MsgEditValidator) returns (MsgEditValidatorResponse); + + // Delegate defines a method for performing a delegation of coins + // from a delegator to a validator. + rpc Delegate(MsgDelegate) returns (MsgDelegateResponse); + + // BeginRedelegate defines a method for performing a redelegation + // of coins from a delegator and source validator to a destination validator. + rpc BeginRedelegate(MsgBeginRedelegate) returns (MsgBeginRedelegateResponse); + + // Undelegate defines a method for performing an undelegation from a + // delegate and a validator. + rpc Undelegate(MsgUndelegate) returns (MsgUndelegateResponse); +} + +// MsgCreateValidator defines a SDK message for creating a new validator. +message MsgCreateValidator { + option (gogoproto.equal) = false; + + Description description = 1 [(gogoproto.nullable) = false]; + CommissionRates commission = 2 [(gogoproto.nullable) = false]; + string min_self_delegation = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"min_self_delegation\"", + (gogoproto.nullable) = false + ]; + string delegator_address = 4 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 5 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + google.protobuf.Any pubkey = 6 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; + cosmos.base.v1beta1.Coin value = 7 [(gogoproto.nullable) = false]; +} + +// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. +message MsgCreateValidatorResponse {} + +// MsgEditValidator defines a SDK message for editing an existing validator. +message MsgEditValidator { + option (gogoproto.equal) = false; + + Description description = 1 [(gogoproto.nullable) = false]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"address\""]; + + // We pass a reference to the new commission rate and min self delegation as + // it's not mandatory to update. If not updated, the deserialized rate will be + // zero with no way to distinguish if an update was intended. + // REF: #2373 + string commission_rate = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.moretags) = "yaml:\"commission_rate\"" + ]; + string min_self_delegation = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"min_self_delegation\"" + ]; +} + +// MsgEditValidatorResponse defines the Msg/EditValidator response type. +message MsgEditValidatorResponse {} + +// MsgDelegate defines a SDK message for performing a delegation of coins +// from a delegator to a validator. +message MsgDelegate { + option (gogoproto.equal) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; +} + +// MsgDelegateResponse defines the Msg/Delegate response type. +message MsgDelegateResponse {} + +// MsgBeginRedelegate defines a SDK message for performing a redelegation +// of coins from a delegator and source validator to a destination validator. +message MsgBeginRedelegate { + option (gogoproto.equal) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; + string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; + cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false]; +} + +// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. +message MsgBeginRedelegateResponse { + google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +// MsgUndelegate defines a SDK message for performing an undelegation from a +// delegate and a validator. +message MsgUndelegate { + option (gogoproto.equal) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; +} + +// MsgUndelegateResponse defines the Msg/Undelegate response type. +message MsgUndelegateResponse { + google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} diff --git a/proto/cosmos/tx/signing/v1beta1/signing.proto b/proto/cosmos/tx/signing/v1beta1/signing.proto new file mode 100644 index 0000000..4c1be40 --- /dev/null +++ b/proto/cosmos/tx/signing/v1beta1/signing.proto @@ -0,0 +1,79 @@ +syntax = "proto3"; +package cosmos.tx.signing.v1beta1; + +import "cosmos/crypto/multisig/v1beta1/multisig.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types/tx/signing"; + +// SignMode represents a signing mode with its own security guarantees. +enum SignMode { + // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + // rejected + SIGN_MODE_UNSPECIFIED = 0; + + // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + // verified with raw bytes from Tx + SIGN_MODE_DIRECT = 1; + + // SIGN_MODE_TEXTUAL is a future signing mode that will verify some + // human-readable textual representation on top of the binary representation + // from SIGN_MODE_DIRECT + SIGN_MODE_TEXTUAL = 2; + + // SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + // Amino JSON and will be removed in the future + SIGN_MODE_LEGACY_AMINO_JSON = 127; +} + +// SignatureDescriptors wraps multiple SignatureDescriptor's. +message SignatureDescriptors { + // signatures are the signature descriptors + repeated SignatureDescriptor signatures = 1; +} + +// SignatureDescriptor is a convenience type which represents the full data for +// a signature including the public key of the signer, signing modes and the +// signature itself. It is primarily used for coordinating signatures between +// clients. +message SignatureDescriptor { + // public_key is the public key of the signer + google.protobuf.Any public_key = 1; + + Data data = 2; + + // sequence is the sequence of the account, which describes the + // number of committed transactions signed by a given address. It is used to prevent + // replay attacks. + uint64 sequence = 3; + + // Data represents signature data + message Data { + // sum is the oneof that specifies whether this represents single or multi-signature data + oneof sum { + // single represents a single signer + Single single = 1; + + // multi represents a multisig signer + Multi multi = 2; + } + + // Single is the signature data for a single signer + message Single { + // mode is the signing mode of the single signer + SignMode mode = 1; + + // signature is the raw signature bytes + bytes signature = 2; + } + + // Multi is the signature data for a multisig public key + message Multi { + // bitarray specifies which keys within the multisig are signing + cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; + + // signatures is the signatures of the multi-signature + repeated Data signatures = 2; + } + } +} diff --git a/proto/cosmos/tx/v1beta1/service.proto b/proto/cosmos/tx/v1beta1/service.proto new file mode 100644 index 0000000..acfbf15 --- /dev/null +++ b/proto/cosmos/tx/v1beta1/service.proto @@ -0,0 +1,134 @@ +syntax = "proto3"; +package cosmos.tx.v1beta1; + +import "google/api/annotations.proto"; +import "cosmos/base/abci/v1beta1/abci.proto"; +import "cosmos/tx/v1beta1/tx.proto"; +import "gogoproto/gogo.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; + +option (gogoproto.goproto_registration) = true; +option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; + +// Service defines a gRPC service for interacting with transactions. +service Service { + // Simulate simulates executing a transaction for estimating gas usage. + rpc Simulate(SimulateRequest) returns (SimulateResponse) { + option (google.api.http) = { + post: "/cosmos/tx/v1beta1/simulate" + body: "*" + }; + } + // GetTx fetches a tx by hash. + rpc GetTx(GetTxRequest) returns (GetTxResponse) { + option (google.api.http).get = "/cosmos/tx/v1beta1/txs/{hash}"; + } + // BroadcastTx broadcast transaction. + rpc BroadcastTx(BroadcastTxRequest) returns (BroadcastTxResponse) { + option (google.api.http) = { + post: "/cosmos/tx/v1beta1/txs" + body: "*" + }; + } + // GetTxsEvent fetches txs by event. + rpc GetTxsEvent(GetTxsEventRequest) returns (GetTxsEventResponse) { + option (google.api.http).get = "/cosmos/tx/v1beta1/txs"; + } +} + +// GetTxsEventRequest is the request type for the Service.TxsByEvents +// RPC method. +message GetTxsEventRequest { + // events is the list of transaction event type. + repeated string events = 1; + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; + OrderBy order_by = 3; +} + +// OrderBy defines the sorting order +enum OrderBy { + // ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. + ORDER_BY_UNSPECIFIED = 0; + // ORDER_BY_ASC defines ascending order + ORDER_BY_ASC = 1; + // ORDER_BY_DESC defines descending order + ORDER_BY_DESC = 2; +} + +// GetTxsEventResponse is the response type for the Service.TxsByEvents +// RPC method. +message GetTxsEventResponse { + // txs is the list of queried transactions. + repeated cosmos.tx.v1beta1.Tx txs = 1; + // tx_responses is the list of queried TxResponses. + repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2; + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 3; +} + +// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest +// RPC method. +message BroadcastTxRequest { + // tx_bytes is the raw transaction. + bytes tx_bytes = 1; + BroadcastMode mode = 2; +} + +// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. +enum BroadcastMode { + // zero-value for mode ordering + BROADCAST_MODE_UNSPECIFIED = 0; + // BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for + // the tx to be committed in a block. + BROADCAST_MODE_BLOCK = 1; + // BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + // a CheckTx execution response only. + BROADCAST_MODE_SYNC = 2; + // BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + // immediately. + BROADCAST_MODE_ASYNC = 3; +} + +// BroadcastTxResponse is the response type for the +// Service.BroadcastTx method. +message BroadcastTxResponse { + // tx_response is the queried TxResponses. + cosmos.base.abci.v1beta1.TxResponse tx_response = 1; +} + +// SimulateRequest is the request type for the Service.Simulate +// RPC method. +message SimulateRequest { + // tx is the transaction to simulate. + // Deprecated. Send raw tx bytes instead. + cosmos.tx.v1beta1.Tx tx = 1 [deprecated = true]; + // tx_bytes is the raw transaction. + // + // Since: cosmos-sdk 0.43 + bytes tx_bytes = 2; +} + +// SimulateResponse is the response type for the +// Service.SimulateRPC method. +message SimulateResponse { + // gas_info is the information about gas used in the simulation. + cosmos.base.abci.v1beta1.GasInfo gas_info = 1; + // result is the result of the simulation. + cosmos.base.abci.v1beta1.Result result = 2; +} + +// GetTxRequest is the request type for the Service.GetTx +// RPC method. +message GetTxRequest { + // hash is the tx hash to query, encoded as a hex string. + string hash = 1; +} + +// GetTxResponse is the response type for the Service.GetTx method. +message GetTxResponse { + // tx is the queried transaction. + cosmos.tx.v1beta1.Tx tx = 1; + // tx_response is the queried TxResponses. + cosmos.base.abci.v1beta1.TxResponse tx_response = 2; +} \ No newline at end of file diff --git a/proto/cosmos/tx/v1beta1/tx.proto b/proto/cosmos/tx/v1beta1/tx.proto new file mode 100644 index 0000000..6d5caf1 --- /dev/null +++ b/proto/cosmos/tx/v1beta1/tx.proto @@ -0,0 +1,183 @@ +syntax = "proto3"; +package cosmos.tx.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/crypto/multisig/v1beta1/multisig.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/tx/signing/v1beta1/signing.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; + +// Tx is the standard type used for broadcasting transactions. +message Tx { + // body is the processable content of the transaction + TxBody body = 1; + + // auth_info is the authorization related content of the transaction, + // specifically signers, signer modes and fee + AuthInfo auth_info = 2; + + // signatures is a list of signatures that matches the length and order of + // AuthInfo's signer_infos to allow connecting signature meta information like + // public key and signing mode by position. + repeated bytes signatures = 3; +} + +// TxRaw is a variant of Tx that pins the signer's exact binary representation +// of body and auth_info. This is used for signing, broadcasting and +// verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and +// the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used +// as the transaction ID. +message TxRaw { + // body_bytes is a protobuf serialization of a TxBody that matches the + // representation in SignDoc. + bytes body_bytes = 1; + + // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + // representation in SignDoc. + bytes auth_info_bytes = 2; + + // signatures is a list of signatures that matches the length and order of + // AuthInfo's signer_infos to allow connecting signature meta information like + // public key and signing mode by position. + repeated bytes signatures = 3; +} + +// SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. +message SignDoc { + // body_bytes is protobuf serialization of a TxBody that matches the + // representation in TxRaw. + bytes body_bytes = 1; + + // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + // representation in TxRaw. + bytes auth_info_bytes = 2; + + // chain_id is the unique identifier of the chain this transaction targets. + // It prevents signed transactions from being used on another chain by an + // attacker + string chain_id = 3; + + // account_number is the account number of the account in state + uint64 account_number = 4; +} + +// TxBody is the body of a transaction that all signers sign over. +message TxBody { + // messages is a list of messages to be executed. The required signers of + // those messages define the number and order of elements in AuthInfo's + // signer_infos and Tx's signatures. Each required signer address is added to + // the list only the first time it occurs. + // By convention, the first required signer (usually from the first message) + // is referred to as the primary signer and pays the fee for the whole + // transaction. + repeated google.protobuf.Any messages = 1; + + // memo is any arbitrary note/comment to be added to the transaction. + // WARNING: in clients, any publicly exposed text should not be called memo, + // but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). + string memo = 2; + + // timeout is the block height after which this transaction will not + // be processed by the chain + uint64 timeout_height = 3; + + // extension_options are arbitrary options that can be added by chains + // when the default options are not sufficient. If any of these are present + // and can't be handled, the transaction will be rejected + repeated google.protobuf.Any extension_options = 1023; + + // extension_options are arbitrary options that can be added by chains + // when the default options are not sufficient. If any of these are present + // and can't be handled, they will be ignored + repeated google.protobuf.Any non_critical_extension_options = 2047; +} + +// AuthInfo describes the fee and signer modes that are used to sign a +// transaction. +message AuthInfo { + // signer_infos defines the signing modes for the required signers. The number + // and order of elements must match the required signers from TxBody's + // messages. The first element is the primary signer and the one which pays + // the fee. + repeated SignerInfo signer_infos = 1; + + // Fee is the fee and gas limit for the transaction. The first signer is the + // primary signer and the one which pays the fee. The fee can be calculated + // based on the cost of evaluating the body and doing signature verification + // of the signers. This can be estimated via simulation. + Fee fee = 2; +} + +// SignerInfo describes the public key and signing mode of a single top-level +// signer. +message SignerInfo { + // public_key is the public key of the signer. It is optional for accounts + // that already exist in state. If unset, the verifier can use the required \ + // signer address for this position and lookup the public key. + google.protobuf.Any public_key = 1; + + // mode_info describes the signing mode of the signer and is a nested + // structure to support nested multisig pubkey's + ModeInfo mode_info = 2; + + // sequence is the sequence of the account, which describes the + // number of committed transactions signed by a given address. It is used to + // prevent replay attacks. + uint64 sequence = 3; +} + +// ModeInfo describes the signing mode of a single or nested multisig signer. +message ModeInfo { + // sum is the oneof that specifies whether this represents a single or nested + // multisig signer + oneof sum { + // single represents a single signer + Single single = 1; + + // multi represents a nested multisig signer + Multi multi = 2; + } + + // Single is the mode info for a single signer. It is structured as a message + // to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the + // future + message Single { + // mode is the signing mode of the single signer + cosmos.tx.signing.v1beta1.SignMode mode = 1; + } + + // Multi is the mode info for a multisig public key + message Multi { + // bitarray specifies which keys within the multisig are signing + cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; + + // mode_infos is the corresponding modes of the signers of the multisig + // which could include nested multisig public keys + repeated ModeInfo mode_infos = 2; + } +} + +// Fee includes the amount of coins paid in fees and the maximum +// gas to be used by the transaction. The ratio yields an effective "gasprice", +// which must be above some miminum to be accepted into the mempool. +message Fee { + // amount is the amount of coins to be paid as a fee + repeated cosmos.base.v1beta1.Coin amount = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // gas_limit is the maximum gas that can be used in transaction processing + // before an out of gas error occurs + uint64 gas_limit = 2; + + // if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. + // the payer must be a tx signer (and thus have signed this field in AuthInfo). + // setting this field does *not* change the ordering of required signers for the transaction. + string payer = 3; + + // if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used + // to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does + // not support fee grants, this will fail + string granter = 4; +} diff --git a/proto/cosmos/upgrade/v1beta1/query.proto b/proto/cosmos/upgrade/v1beta1/query.proto new file mode 100644 index 0000000..dd14ba6 --- /dev/null +++ b/proto/cosmos/upgrade/v1beta1/query.proto @@ -0,0 +1,104 @@ +syntax = "proto3"; +package cosmos.upgrade.v1beta1; + +import "google/protobuf/any.proto"; +import "google/api/annotations.proto"; +import "cosmos/upgrade/v1beta1/upgrade.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; + +// Query defines the gRPC upgrade querier service. +service Query { + // CurrentPlan queries the current upgrade plan. + rpc CurrentPlan(QueryCurrentPlanRequest) returns (QueryCurrentPlanResponse) { + option (google.api.http).get = "/cosmos/upgrade/v1beta1/current_plan"; + } + + // AppliedPlan queries a previously applied upgrade plan by its name. + rpc AppliedPlan(QueryAppliedPlanRequest) returns (QueryAppliedPlanResponse) { + option (google.api.http).get = "/cosmos/upgrade/v1beta1/applied_plan/{name}"; + } + + // UpgradedConsensusState queries the consensus state that will serve + // as a trusted kernel for the next version of this chain. It will only be + // stored at the last height of this chain. + // UpgradedConsensusState RPC not supported with legacy querier + // This rpc is deprecated now that IBC has its own replacement + // (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) + rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { + option deprecated = true; + option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}"; + } + + // ModuleVersions queries the list of module versions from state. + // + // Since: cosmos-sdk 0.43 + rpc ModuleVersions(QueryModuleVersionsRequest) returns (QueryModuleVersionsResponse) { + option (google.api.http).get = "/cosmos/upgrade/v1beta1/module_versions"; + } +} + +// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC +// method. +message QueryCurrentPlanRequest {} + +// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC +// method. +message QueryCurrentPlanResponse { + // plan is the current upgrade plan. + Plan plan = 1; +} + +// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC +// method. +message QueryAppliedPlanRequest { + // name is the name of the applied plan to query for. + string name = 1; +} + +// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC +// method. +message QueryAppliedPlanResponse { + // height is the block height at which the plan was applied. + int64 height = 1; +} + +// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState +// RPC method. +message QueryUpgradedConsensusStateRequest { + option deprecated = true; + + // last height of the current chain must be sent in request + // as this is the height under which next consensus state is stored + int64 last_height = 1; +} + +// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState +// RPC method. +message QueryUpgradedConsensusStateResponse { + option deprecated = true; + reserved 1; + + // Since: cosmos-sdk 0.43 + bytes upgraded_consensus_state = 2; +} + +// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions +// RPC method. +// +// Since: cosmos-sdk 0.43 +message QueryModuleVersionsRequest { + // module_name is a field to query a specific module + // consensus version from state. Leaving this empty will + // fetch the full list of module versions from state + string module_name = 1; +} + +// QueryModuleVersionsResponse is the response type for the Query/ModuleVersions +// RPC method. +// +// Since: cosmos-sdk 0.43 +message QueryModuleVersionsResponse { + // module_versions is a list of module names with their consensus versions. + repeated ModuleVersion module_versions = 1; +} diff --git a/proto/cosmos/upgrade/v1beta1/upgrade.proto b/proto/cosmos/upgrade/v1beta1/upgrade.proto new file mode 100644 index 0000000..e888b39 --- /dev/null +++ b/proto/cosmos/upgrade/v1beta1/upgrade.proto @@ -0,0 +1,78 @@ +syntax = "proto3"; +package cosmos.upgrade.v1beta1; + +import "google/protobuf/any.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; +option (gogoproto.goproto_getters_all) = false; + +// Plan specifies information about a planned upgrade and when it should occur. +message Plan { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // Sets the name for the upgrade. This name will be used by the upgraded + // version of the software to apply any special "on-upgrade" commands during + // the first BeginBlock method after the upgrade is applied. It is also used + // to detect whether a software version can handle a given upgrade. If no + // upgrade handler with this name has been set in the software, it will be + // assumed that the software is out-of-date when the upgrade Time or Height is + // reached and the software will exit. + string name = 1; + + // Deprecated: Time based upgrades have been deprecated. Time based upgrade logic + // has been removed from the SDK. + // If this field is not empty, an error will be thrown. + google.protobuf.Timestamp time = 2 [deprecated = true, (gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + // The height at which the upgrade must be performed. + // Only used if Time is not set. + int64 height = 3; + + // Any application specific upgrade info to be included on-chain + // such as a git commit that validators could automatically upgrade to + string info = 4; + + // Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been + // moved to the IBC module in the sub module 02-client. + // If this field is not empty, an error will be thrown. + google.protobuf.Any upgraded_client_state = 5 + [deprecated = true, (gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; +} + +// SoftwareUpgradeProposal is a gov Content type for initiating a software +// upgrade. +message SoftwareUpgradeProposal { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string title = 1; + string description = 2; + Plan plan = 3 [(gogoproto.nullable) = false]; +} + +// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software +// upgrade. +message CancelSoftwareUpgradeProposal { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string title = 1; + string description = 2; +} + +// ModuleVersion specifies a module and its consensus version. +// +// Since: cosmos-sdk 0.43 +message ModuleVersion { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = true; + + // name of the app module + string name = 1; + + // consensus version of the app module + uint64 version = 2; +} diff --git a/proto/cosmos/vesting/v1beta1/tx.proto b/proto/cosmos/vesting/v1beta1/tx.proto new file mode 100644 index 0000000..c49be80 --- /dev/null +++ b/proto/cosmos/vesting/v1beta1/tx.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package cosmos.vesting.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; + +// Msg defines the bank Msg service. +service Msg { + // CreateVestingAccount defines a method that enables creating a vesting + // account. + rpc CreateVestingAccount(MsgCreateVestingAccount) returns (MsgCreateVestingAccountResponse); +} + +// MsgCreateVestingAccount defines a message that enables creating a vesting +// account. +message MsgCreateVestingAccount { + option (gogoproto.equal) = true; + + string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; + string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; + repeated cosmos.base.v1beta1.Coin amount = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + int64 end_time = 4 [(gogoproto.moretags) = "yaml:\"end_time\""]; + bool delayed = 5; +} + +// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. +message MsgCreateVestingAccountResponse {} \ No newline at end of file diff --git a/proto/cosmos/vesting/v1beta1/vesting.proto b/proto/cosmos/vesting/v1beta1/vesting.proto new file mode 100644 index 0000000..e9f661f --- /dev/null +++ b/proto/cosmos/vesting/v1beta1/vesting.proto @@ -0,0 +1,85 @@ +syntax = "proto3"; +package cosmos.vesting.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/auth/v1beta1/auth.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; + +// BaseVestingAccount implements the VestingAccount interface. It contains all +// the necessary fields needed for any vesting account implementation. +message BaseVestingAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + cosmos.auth.v1beta1.BaseAccount base_account = 1 [(gogoproto.embed) = true]; + repeated cosmos.base.v1beta1.Coin original_vesting = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"original_vesting\"" + ]; + repeated cosmos.base.v1beta1.Coin delegated_free = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"delegated_free\"" + ]; + repeated cosmos.base.v1beta1.Coin delegated_vesting = 4 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"delegated_vesting\"" + ]; + int64 end_time = 5 [(gogoproto.moretags) = "yaml:\"end_time\""]; +} + +// ContinuousVestingAccount implements the VestingAccount interface. It +// continuously vests by unlocking coins linearly with respect to time. +message ContinuousVestingAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; + int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""]; +} + +// DelayedVestingAccount implements the VestingAccount interface. It vests all +// coins after a specific time, but non prior. In other words, it keeps them +// locked until a specified time. +message DelayedVestingAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; +} + +// Period defines a length of time and amount of coins that will vest. +message Period { + option (gogoproto.goproto_stringer) = false; + + int64 length = 1; + repeated cosmos.base.v1beta1.Coin amount = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// PeriodicVestingAccount implements the VestingAccount interface. It +// periodically vests by unlocking coins during each specified period. +message PeriodicVestingAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; + int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""]; + repeated Period vesting_periods = 3 [(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false]; +} + +// PermanentLockedAccount implements the VestingAccount interface. It does +// not ever release coins, locking them indefinitely. Coins in this account can +// still be used for delegating and for governance votes even while locked. +// +// Since: cosmos-sdk 0.43 +message PermanentLockedAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; +} diff --git a/proto/cosmos_proto/cosmos.proto b/proto/cosmos_proto/cosmos.proto new file mode 100644 index 0000000..167b170 --- /dev/null +++ b/proto/cosmos_proto/cosmos.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package cosmos_proto; + +import "google/protobuf/descriptor.proto"; + +option go_package = "github.com/regen-network/cosmos-proto"; + +extend google.protobuf.MessageOptions { + string interface_type = 93001; + + string implements_interface = 93002; +} + +extend google.protobuf.FieldOptions { + string accepts_interface = 93001; +} diff --git a/proto/gogoproto/gogo.proto b/proto/gogoproto/gogo.proto new file mode 100644 index 0000000..49e78f9 --- /dev/null +++ b/proto/gogoproto/gogo.proto @@ -0,0 +1,145 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package gogoproto; + +import "google/protobuf/descriptor.proto"; + +option java_package = "com.google.protobuf"; +option java_outer_classname = "GoGoProtos"; +option go_package = "github.com/gogo/protobuf/gogoproto"; + +extend google.protobuf.EnumOptions { + optional bool goproto_enum_prefix = 62001; + optional bool goproto_enum_stringer = 62021; + optional bool enum_stringer = 62022; + optional string enum_customname = 62023; + optional bool enumdecl = 62024; +} + +extend google.protobuf.EnumValueOptions { + optional string enumvalue_customname = 66001; +} + +extend google.protobuf.FileOptions { + optional bool goproto_getters_all = 63001; + optional bool goproto_enum_prefix_all = 63002; + optional bool goproto_stringer_all = 63003; + optional bool verbose_equal_all = 63004; + optional bool face_all = 63005; + optional bool gostring_all = 63006; + optional bool populate_all = 63007; + optional bool stringer_all = 63008; + optional bool onlyone_all = 63009; + + optional bool equal_all = 63013; + optional bool description_all = 63014; + optional bool testgen_all = 63015; + optional bool benchgen_all = 63016; + optional bool marshaler_all = 63017; + optional bool unmarshaler_all = 63018; + optional bool stable_marshaler_all = 63019; + + optional bool sizer_all = 63020; + + optional bool goproto_enum_stringer_all = 63021; + optional bool enum_stringer_all = 63022; + + optional bool unsafe_marshaler_all = 63023; + optional bool unsafe_unmarshaler_all = 63024; + + optional bool goproto_extensions_map_all = 63025; + optional bool goproto_unrecognized_all = 63026; + optional bool gogoproto_import = 63027; + optional bool protosizer_all = 63028; + optional bool compare_all = 63029; + optional bool typedecl_all = 63030; + optional bool enumdecl_all = 63031; + + optional bool goproto_registration = 63032; + optional bool messagename_all = 63033; + + optional bool goproto_sizecache_all = 63034; + optional bool goproto_unkeyed_all = 63035; +} + +extend google.protobuf.MessageOptions { + optional bool goproto_getters = 64001; + optional bool goproto_stringer = 64003; + optional bool verbose_equal = 64004; + optional bool face = 64005; + optional bool gostring = 64006; + optional bool populate = 64007; + optional bool stringer = 67008; + optional bool onlyone = 64009; + + optional bool equal = 64013; + optional bool description = 64014; + optional bool testgen = 64015; + optional bool benchgen = 64016; + optional bool marshaler = 64017; + optional bool unmarshaler = 64018; + optional bool stable_marshaler = 64019; + + optional bool sizer = 64020; + + optional bool unsafe_marshaler = 64023; + optional bool unsafe_unmarshaler = 64024; + + optional bool goproto_extensions_map = 64025; + optional bool goproto_unrecognized = 64026; + + optional bool protosizer = 64028; + optional bool compare = 64029; + + optional bool typedecl = 64030; + + optional bool messagename = 64033; + + optional bool goproto_sizecache = 64034; + optional bool goproto_unkeyed = 64035; +} + +extend google.protobuf.FieldOptions { + optional bool nullable = 65001; + optional bool embed = 65002; + optional string customtype = 65003; + optional string customname = 65004; + optional string jsontag = 65005; + optional string moretags = 65006; + optional string casttype = 65007; + optional string castkey = 65008; + optional string castvalue = 65009; + + optional bool stdtime = 65010; + optional bool stdduration = 65011; + optional bool wktpointer = 65012; + + optional string castrepeated = 65013; +} diff --git a/proto/google/api/annotations.proto b/proto/google/api/annotations.proto new file mode 100644 index 0000000..85c361b --- /dev/null +++ b/proto/google/api/annotations.proto @@ -0,0 +1,31 @@ +// Copyright (c) 2015, Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +import "google/api/http.proto"; +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationsProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // See `HttpRule`. + HttpRule http = 72295728; +} diff --git a/proto/google/api/http.proto b/proto/google/api/http.proto new file mode 100644 index 0000000..2bd3a19 --- /dev/null +++ b/proto/google/api/http.proto @@ -0,0 +1,318 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "HttpProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + + +// 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. +message Http { + // A list of HTTP configuration rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated HttpRule rules = 1; + + // 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. + bool fully_decode_reserved_expansion = 2; +} + +// `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. +message HttpRule { + // Selects methods to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + string selector = 1; + + // Determines the URL pattern is matched by this rules. This pattern can be + // used with any of the {get|put|post|delete|patch} methods. A custom method + // can be defined using the 'custom' field. + oneof pattern { + // Used for listing and getting information about resources. + string get = 2; + + // Used for updating a resource. + string put = 3; + + // Used for creating a resource. + string post = 4; + + // Used for deleting a resource. + string delete = 5; + + // Used for updating a resource. + string patch = 6; + + // 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. + CustomHttpPattern custom = 8; + } + + // 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. + string body = 7; + + // 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. + string response_body = 12; + + // 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). + repeated HttpRule additional_bindings = 11; +} + +// A custom pattern is used for defining custom HTTP verb. +message CustomHttpPattern { + // The name of this custom HTTP verb. + string kind = 1; + + // The path matched by this custom verb. + string path = 2; +} diff --git a/proto/google/api/httpbody.proto b/proto/google/api/httpbody.proto new file mode 100644 index 0000000..4428515 --- /dev/null +++ b/proto/google/api/httpbody.proto @@ -0,0 +1,78 @@ +// Copyright 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.api; + +import "google/protobuf/any.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody"; +option java_multiple_files = true; +option java_outer_classname = "HttpBodyProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Message that represents an arbitrary HTTP body. It should only be used for +// payload formats that can't be represented as JSON, such as raw binary or +// an HTML page. +// +// +// This message can be used both in streaming and non-streaming API methods in +// the request as well as the response. +// +// It can be used as a top-level request field, which is convenient if one +// wants to extract parameters from either the URL or HTTP template into the +// request fields and also want access to the raw HTTP body. +// +// Example: +// +// message GetResourceRequest { +// // A unique request id. +// string request_id = 1; +// +// // The raw HTTP body is bound to this field. +// google.api.HttpBody http_body = 2; +// } +// +// service ResourceService { +// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); +// rpc UpdateResource(google.api.HttpBody) returns +// (google.protobuf.Empty); +// } +// +// Example with streaming methods: +// +// service CaldavService { +// rpc GetCalendar(stream google.api.HttpBody) +// returns (stream google.api.HttpBody); +// rpc UpdateCalendar(stream google.api.HttpBody) +// returns (stream google.api.HttpBody); +// } +// +// Use of this type only changes how the request and response bodies are +// handled, all other features will continue to work unchanged. +message HttpBody { + // The HTTP Content-Type header value specifying the content type of the body. + string content_type = 1; + + // The HTTP request/response body as raw binary. + bytes data = 2; + + // Application specific response metadata. Must be set in the first response + // for streaming APIs. + repeated google.protobuf.Any extensions = 3; +} \ No newline at end of file diff --git a/proto/google/protobuf/any.proto b/proto/google/protobuf/any.proto new file mode 100644 index 0000000..58b5115 --- /dev/null +++ b/proto/google/protobuf/any.proto @@ -0,0 +1,164 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +import "gogoproto/gogo.proto"; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "AnyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// `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 := ptypes.MarshalAny(foo) +// ... +// foo := &pb.Foo{} +// if err := ptypes.UnmarshalAny(any, 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" +// } +// +message Any { + // 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. + // + string type_url = 1; + + // Must be a valid serialized protocol buffer of the above specified type. + bytes value = 2; + + option (gogoproto.typedecl) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.gostring) = false; + option (gogoproto.stringer) = false; +} + +option (gogoproto.goproto_registration) = false; diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto new file mode 100644 index 0000000..2cbcabb --- /dev/null +++ b/proto/tendermint/abci/types.proto @@ -0,0 +1,407 @@ +syntax = "proto3"; +package tendermint.abci; + +option go_package = "github.com/tendermint/tendermint/abci/types"; + +// For more information on gogo.proto, see: +// https://github.com/gogo/protobuf/blob/master/extensions.md +import "tendermint/crypto/proof.proto"; +import "tendermint/types/types.proto"; +import "tendermint/crypto/keys.proto"; +import "tendermint/types/params.proto"; +import "google/protobuf/timestamp.proto"; +import "gogoproto/gogo.proto"; + +// This file is copied from http://github.com/tendermint/abci +// NOTE: When using custom types, mind the warnings. +// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues + +//---------------------------------------- +// Request types + +message Request { + oneof value { + RequestEcho echo = 1; + RequestFlush flush = 2; + RequestInfo info = 3; + RequestSetOption set_option = 4; + RequestInitChain init_chain = 5; + RequestQuery query = 6; + RequestBeginBlock begin_block = 7; + RequestCheckTx check_tx = 8; + RequestDeliverTx deliver_tx = 9; + RequestEndBlock end_block = 10; + RequestCommit commit = 11; + RequestListSnapshots list_snapshots = 12; + RequestOfferSnapshot offer_snapshot = 13; + RequestLoadSnapshotChunk load_snapshot_chunk = 14; + RequestApplySnapshotChunk apply_snapshot_chunk = 15; + } +} + +message RequestEcho { + string message = 1; +} + +message RequestFlush {} + +message RequestInfo { + string version = 1; + uint64 block_version = 2; + uint64 p2p_version = 3; +} + +// nondeterministic +message RequestSetOption { + string key = 1; + string value = 2; +} + +message RequestInitChain { + google.protobuf.Timestamp time = 1 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + string chain_id = 2; + ConsensusParams consensus_params = 3; + repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; + bytes app_state_bytes = 5; + int64 initial_height = 6; +} + +message RequestQuery { + bytes data = 1; + string path = 2; + int64 height = 3; + bool prove = 4; +} + +message RequestBeginBlock { + bytes hash = 1; + tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; + LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; + repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; +} + +enum CheckTxType { + NEW = 0 [(gogoproto.enumvalue_customname) = "New"]; + RECHECK = 1 [(gogoproto.enumvalue_customname) = "Recheck"]; +} + +message RequestCheckTx { + bytes tx = 1; + CheckTxType type = 2; +} + +message RequestDeliverTx { + bytes tx = 1; +} + +message RequestEndBlock { + int64 height = 1; +} + +message RequestCommit {} + +// lists available snapshots +message RequestListSnapshots { +} + +// offers a snapshot to the application +message RequestOfferSnapshot { + Snapshot snapshot = 1; // snapshot offered by peers + bytes app_hash = 2; // light client-verified app hash for snapshot height +} + +// loads a snapshot chunk +message RequestLoadSnapshotChunk { + uint64 height = 1; + uint32 format = 2; + uint32 chunk = 3; +} + +// Applies a snapshot chunk +message RequestApplySnapshotChunk { + uint32 index = 1; + bytes chunk = 2; + string sender = 3; +} + +//---------------------------------------- +// Response types + +message Response { + oneof value { + ResponseException exception = 1; + ResponseEcho echo = 2; + ResponseFlush flush = 3; + ResponseInfo info = 4; + ResponseSetOption set_option = 5; + ResponseInitChain init_chain = 6; + ResponseQuery query = 7; + ResponseBeginBlock begin_block = 8; + ResponseCheckTx check_tx = 9; + ResponseDeliverTx deliver_tx = 10; + ResponseEndBlock end_block = 11; + ResponseCommit commit = 12; + ResponseListSnapshots list_snapshots = 13; + ResponseOfferSnapshot offer_snapshot = 14; + ResponseLoadSnapshotChunk load_snapshot_chunk = 15; + ResponseApplySnapshotChunk apply_snapshot_chunk = 16; + } +} + +// nondeterministic +message ResponseException { + string error = 1; +} + +message ResponseEcho { + string message = 1; +} + +message ResponseFlush {} + +message ResponseInfo { + string data = 1; + + string version = 2; + uint64 app_version = 3; + + int64 last_block_height = 4; + bytes last_block_app_hash = 5; +} + +// nondeterministic +message ResponseSetOption { + uint32 code = 1; + // bytes data = 2; + string log = 3; + string info = 4; +} + +message ResponseInitChain { + ConsensusParams consensus_params = 1; + repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; + bytes app_hash = 3; +} + +message ResponseQuery { + uint32 code = 1; + // bytes data = 2; // use "value" instead. + string log = 3; // nondeterministic + string info = 4; // nondeterministic + int64 index = 5; + bytes key = 6; + bytes value = 7; + tendermint.crypto.ProofOps proof_ops = 8; + int64 height = 9; + string codespace = 10; +} + +message ResponseBeginBlock { + repeated Event events = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; +} + +message ResponseCheckTx { + uint32 code = 1; + bytes data = 2; + string log = 3; // nondeterministic + string info = 4; // nondeterministic + int64 gas_wanted = 5 [json_name = "gas_wanted"]; + int64 gas_used = 6 [json_name = "gas_used"]; + repeated Event events = 7 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + string codespace = 8; +} + +message ResponseDeliverTx { + uint32 code = 1; + bytes data = 2; + string log = 3; // nondeterministic + string info = 4; // nondeterministic + int64 gas_wanted = 5 [json_name = "gas_wanted"]; + int64 gas_used = 6 [json_name = "gas_used"]; + repeated Event events = 7 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + string codespace = 8; +} + +message ResponseEndBlock { + repeated ValidatorUpdate validator_updates = 1 + [(gogoproto.nullable) = false]; + ConsensusParams consensus_param_updates = 2; + repeated Event events = 3 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; +} + +message ResponseCommit { + // reserve 1 + bytes data = 2; + int64 retain_height = 3; +} + +message ResponseListSnapshots { + repeated Snapshot snapshots = 1; +} + +message ResponseOfferSnapshot { + Result result = 1; + + enum Result { + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Snapshot accepted, apply chunks + ABORT = 2; // Abort all snapshot restoration + REJECT = 3; // Reject this specific snapshot, try others + REJECT_FORMAT = 4; // Reject all snapshots of this format, try others + REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others + } +} + +message ResponseLoadSnapshotChunk { + bytes chunk = 1; +} + +message ResponseApplySnapshotChunk { + Result result = 1; + repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply + repeated string reject_senders = 3; // Chunk senders to reject and ban + + enum Result { + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Chunk successfully accepted + ABORT = 2; // Abort all snapshot restoration + RETRY = 3; // Retry chunk (combine with refetch and reject) + RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) + REJECT_SNAPSHOT = 5; // Reject this snapshot, try others + } +} + +//---------------------------------------- +// Misc. + +// ConsensusParams contains all consensus-relevant parameters +// that can be adjusted by the abci app +message ConsensusParams { + BlockParams block = 1; + tendermint.types.EvidenceParams evidence = 2; + tendermint.types.ValidatorParams validator = 3; + tendermint.types.VersionParams version = 4; +} + +// BlockParams contains limits on the block size. +message BlockParams { + // Note: must be greater than 0 + int64 max_bytes = 1; + // Note: must be greater or equal to -1 + int64 max_gas = 2; +} + +message LastCommitInfo { + int32 round = 1; + repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; +} + +// Event allows application developers to attach additional information to +// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. +// Later, transactions may be queried using these events. +message Event { + string type = 1; + repeated EventAttribute attributes = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes,omitempty" + ]; +} + +// EventAttribute is a single key-value pair, associated with an event. +message EventAttribute { + bytes key = 1; + bytes value = 2; + bool index = 3; // nondeterministic +} + +// TxResult contains results of executing the transaction. +// +// One usage is indexing transaction results. +message TxResult { + int64 height = 1; + uint32 index = 2; + bytes tx = 3; + ResponseDeliverTx result = 4 [(gogoproto.nullable) = false]; +} + +//---------------------------------------- +// Blockchain Types + +// Validator +message Validator { + bytes address = 1; // The first 20 bytes of SHA256(public key) + // PubKey pub_key = 2 [(gogoproto.nullable)=false]; + int64 power = 3; // The voting power +} + +// ValidatorUpdate +message ValidatorUpdate { + tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; + int64 power = 2; +} + +// VoteInfo +message VoteInfo { + Validator validator = 1 [(gogoproto.nullable) = false]; + bool signed_last_block = 2; +} + +enum EvidenceType { + UNKNOWN = 0; + DUPLICATE_VOTE = 1; + LIGHT_CLIENT_ATTACK = 2; +} + +message Evidence { + EvidenceType type = 1; + // The offending validator + Validator validator = 2 [(gogoproto.nullable) = false]; + // The height when the offense occurred + int64 height = 3; + // The corresponding time where the offense occurred + google.protobuf.Timestamp time = 4 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + // Total voting power of the validator set in case the ABCI application does + // not store historical validators. + // https://github.com/tendermint/tendermint/issues/4581 + int64 total_voting_power = 5; +} + +//---------------------------------------- +// State Sync Types + +message Snapshot { + uint64 height = 1; // The height at which the snapshot was taken + uint32 format = 2; // The application-specific snapshot format + uint32 chunks = 3; // Number of chunks in the snapshot + bytes hash = 4; // Arbitrary snapshot hash, equal only if identical + bytes metadata = 5; // Arbitrary application metadata +} + +//---------------------------------------- +// Service Definition + +service ABCIApplication { + rpc Echo(RequestEcho) returns (ResponseEcho); + rpc Flush(RequestFlush) returns (ResponseFlush); + rpc Info(RequestInfo) returns (ResponseInfo); + rpc SetOption(RequestSetOption) returns (ResponseSetOption); + rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); + rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); + rpc Query(RequestQuery) returns (ResponseQuery); + rpc Commit(RequestCommit) returns (ResponseCommit); + rpc InitChain(RequestInitChain) returns (ResponseInitChain); + rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock); + rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock); + rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots); + rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot); + rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk); + rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk); +} diff --git a/proto/tendermint/crypto/keys.proto b/proto/tendermint/crypto/keys.proto new file mode 100644 index 0000000..16fd7ad --- /dev/null +++ b/proto/tendermint/crypto/keys.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package tendermint.crypto; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; + +import "gogoproto/gogo.proto"; + +// PublicKey defines the keys available for use with Tendermint Validators +message PublicKey { + option (gogoproto.compare) = true; + option (gogoproto.equal) = true; + + oneof sum { + bytes ed25519 = 1; + bytes secp256k1 = 2; + } +} diff --git a/proto/tendermint/crypto/proof.proto b/proto/tendermint/crypto/proof.proto new file mode 100644 index 0000000..975df76 --- /dev/null +++ b/proto/tendermint/crypto/proof.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; +package tendermint.crypto; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; + +import "gogoproto/gogo.proto"; + +message Proof { + int64 total = 1; + int64 index = 2; + bytes leaf_hash = 3; + repeated bytes aunts = 4; +} + +message ValueOp { + // Encoded in ProofOp.Key. + bytes key = 1; + + // To encode in ProofOp.Data + Proof proof = 2; +} + +message DominoOp { + string key = 1; + string input = 2; + string output = 3; +} + +// ProofOp defines an operation used for calculating Merkle root +// The data could be arbitrary format, providing nessecary data +// for example neighbouring node hash +message ProofOp { + string type = 1; + bytes key = 2; + bytes data = 3; +} + +// ProofOps is Merkle proof defined by the list of ProofOps +message ProofOps { + repeated ProofOp ops = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/tendermint/libs/bits/types.proto b/proto/tendermint/libs/bits/types.proto new file mode 100644 index 0000000..3111d11 --- /dev/null +++ b/proto/tendermint/libs/bits/types.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +package tendermint.libs.bits; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/libs/bits"; + +message BitArray { + int64 bits = 1; + repeated uint64 elems = 2; +} diff --git a/proto/tendermint/p2p/types.proto b/proto/tendermint/p2p/types.proto new file mode 100644 index 0000000..0d42ea4 --- /dev/null +++ b/proto/tendermint/p2p/types.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; +package tendermint.p2p; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; + +import "gogoproto/gogo.proto"; + +message NetAddress { + string id = 1 [(gogoproto.customname) = "ID"]; + string ip = 2 [(gogoproto.customname) = "IP"]; + uint32 port = 3; +} + +message ProtocolVersion { + uint64 p2p = 1 [(gogoproto.customname) = "P2P"]; + uint64 block = 2; + uint64 app = 3; +} + +message DefaultNodeInfo { + ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false]; + string default_node_id = 2 [(gogoproto.customname) = "DefaultNodeID"]; + string listen_addr = 3; + string network = 4; + string version = 5; + bytes channels = 6; + string moniker = 7; + DefaultNodeInfoOther other = 8 [(gogoproto.nullable) = false]; +} + +message DefaultNodeInfoOther { + string tx_index = 1; + string rpc_address = 2 [(gogoproto.customname) = "RPCAddress"]; +} diff --git a/proto/tendermint/types/block.proto b/proto/tendermint/types/block.proto new file mode 100644 index 0000000..84e9bb1 --- /dev/null +++ b/proto/tendermint/types/block.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package tendermint.types; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; + +import "gogoproto/gogo.proto"; +import "tendermint/types/types.proto"; +import "tendermint/types/evidence.proto"; + +message Block { + Header header = 1 [(gogoproto.nullable) = false]; + Data data = 2 [(gogoproto.nullable) = false]; + tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; + Commit last_commit = 4; +} diff --git a/proto/tendermint/types/evidence.proto b/proto/tendermint/types/evidence.proto new file mode 100644 index 0000000..3b23457 --- /dev/null +++ b/proto/tendermint/types/evidence.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; +package tendermint.types; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "tendermint/types/types.proto"; +import "tendermint/types/validator.proto"; + +message Evidence { + oneof sum { + DuplicateVoteEvidence duplicate_vote_evidence = 1; + LightClientAttackEvidence light_client_attack_evidence = 2; + } +} + +// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. +message DuplicateVoteEvidence { + tendermint.types.Vote vote_a = 1; + tendermint.types.Vote vote_b = 2; + int64 total_voting_power = 3; + int64 validator_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. +message LightClientAttackEvidence { + tendermint.types.LightBlock conflicting_block = 1; + int64 common_height = 2; + repeated tendermint.types.Validator byzantine_validators = 3; + int64 total_voting_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +message EvidenceList { + repeated Evidence evidence = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/tendermint/types/params.proto b/proto/tendermint/types/params.proto new file mode 100644 index 0000000..0de7d84 --- /dev/null +++ b/proto/tendermint/types/params.proto @@ -0,0 +1,80 @@ +syntax = "proto3"; +package tendermint.types; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; + +option (gogoproto.equal_all) = true; + +// ConsensusParams contains consensus critical parameters that determine the +// validity of blocks. +message ConsensusParams { + BlockParams block = 1 [(gogoproto.nullable) = false]; + EvidenceParams evidence = 2 [(gogoproto.nullable) = false]; + ValidatorParams validator = 3 [(gogoproto.nullable) = false]; + VersionParams version = 4 [(gogoproto.nullable) = false]; +} + +// BlockParams contains limits on the block size. +message BlockParams { + // Max block size, in bytes. + // Note: must be greater than 0 + int64 max_bytes = 1; + // Max gas per block. + // Note: must be greater or equal to -1 + int64 max_gas = 2; + // Minimum time increment between consecutive blocks (in milliseconds) If the + // block header timestamp is ahead of the system clock, decrease this value. + // + // Not exposed to the application. + int64 time_iota_ms = 3; +} + +// EvidenceParams determine how we handle evidence of malfeasance. +message EvidenceParams { + // Max age of evidence, in blocks. + // + // The basic formula for calculating this is: MaxAgeDuration / {average block + // time}. + int64 max_age_num_blocks = 1; + + // Max age of evidence, in time. + // + // It should correspond with an app's "unbonding period" or other similar + // mechanism for handling [Nothing-At-Stake + // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + google.protobuf.Duration max_age_duration = 2 + [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; + + // This sets the maximum size of total evidence in bytes that can be committed in a single block. + // and should fall comfortably under the max block bytes. + // Default is 1048576 or 1MB + int64 max_bytes = 3; +} + +// ValidatorParams restrict the public key types validators can use. +// NOTE: uses ABCI pubkey naming, not Amino names. +message ValidatorParams { + option (gogoproto.populate) = true; + option (gogoproto.equal) = true; + + repeated string pub_key_types = 1; +} + +// VersionParams contains the ABCI application version. +message VersionParams { + option (gogoproto.populate) = true; + option (gogoproto.equal) = true; + + uint64 app_version = 1; +} + +// HashedParams is a subset of ConsensusParams. +// +// It is hashed into the Header.ConsensusHash. +message HashedParams { + int64 block_max_bytes = 1; + int64 block_max_gas = 2; +} diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto new file mode 100644 index 0000000..7f7ea74 --- /dev/null +++ b/proto/tendermint/types/types.proto @@ -0,0 +1,157 @@ +syntax = "proto3"; +package tendermint.types; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "tendermint/crypto/proof.proto"; +import "tendermint/version/types.proto"; +import "tendermint/types/validator.proto"; + +// BlockIdFlag indicates which BlcokID the signature is for +enum BlockIDFlag { + option (gogoproto.goproto_enum_stringer) = true; + option (gogoproto.goproto_enum_prefix) = false; + + BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; + BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; + BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; + BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; +} + +// SignedMsgType is a type of signed message in the consensus. +enum SignedMsgType { + option (gogoproto.goproto_enum_stringer) = true; + option (gogoproto.goproto_enum_prefix) = false; + + SIGNED_MSG_TYPE_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "UnknownType"]; + // Votes + SIGNED_MSG_TYPE_PREVOTE = 1 [(gogoproto.enumvalue_customname) = "PrevoteType"]; + SIGNED_MSG_TYPE_PRECOMMIT = 2 [(gogoproto.enumvalue_customname) = "PrecommitType"]; + + // Proposals + SIGNED_MSG_TYPE_PROPOSAL = 32 [(gogoproto.enumvalue_customname) = "ProposalType"]; +} + +// PartsetHeader +message PartSetHeader { + uint32 total = 1; + bytes hash = 2; +} + +message Part { + uint32 index = 1; + bytes bytes = 2; + tendermint.crypto.Proof proof = 3 [(gogoproto.nullable) = false]; +} + +// BlockID +message BlockID { + bytes hash = 1; + PartSetHeader part_set_header = 2 [(gogoproto.nullable) = false]; +} + +// -------------------------------- + +// Header defines the structure of a Tendermint block header. +message Header { + // basic block info + tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; + string chain_id = 2 [(gogoproto.customname) = "ChainID"]; + int64 height = 3; + google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + + // prev block info + BlockID last_block_id = 5 [(gogoproto.nullable) = false]; + + // hashes of block data + bytes last_commit_hash = 6; // commit from validators from the last block + bytes data_hash = 7; // transactions + + // hashes from the app output from the prev block + bytes validators_hash = 8; // validators for the current block + bytes next_validators_hash = 9; // validators for the next block + bytes consensus_hash = 10; // consensus params for current block + bytes app_hash = 11; // state after txs from the previous block + bytes last_results_hash = 12; // root hash of all results from the txs from the previous block + + // consensus info + bytes evidence_hash = 13; // evidence included in the block + bytes proposer_address = 14; // original proposer of the block +} + +// Data contains the set of transactions included in the block +message Data { + // Txs that will be applied by state @ block.Height+1. + // NOTE: not all txs here are valid. We're just agreeing on the order first. + // This means that block.AppHash does not include these txs. + repeated bytes txs = 1; +} + +// Vote represents a prevote, precommit, or commit vote from validators for +// consensus. +message Vote { + SignedMsgType type = 1; + int64 height = 2; + int32 round = 3; + BlockID block_id = 4 + [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. + google.protobuf.Timestamp timestamp = 5 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes validator_address = 6; + int32 validator_index = 7; + bytes signature = 8; +} + +// Commit contains the evidence that a block was committed by a set of validators. +message Commit { + int64 height = 1; + int32 round = 2; + BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; + repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; +} + +// CommitSig is a part of the Vote included in a Commit. +message CommitSig { + BlockIDFlag block_id_flag = 1; + bytes validator_address = 2; + google.protobuf.Timestamp timestamp = 3 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 4; +} + +message Proposal { + SignedMsgType type = 1; + int64 height = 2; + int32 round = 3; + int32 pol_round = 4; + BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; + google.protobuf.Timestamp timestamp = 6 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 7; +} + +message SignedHeader { + Header header = 1; + Commit commit = 2; +} + +message LightBlock { + SignedHeader signed_header = 1; + tendermint.types.ValidatorSet validator_set = 2; +} + +message BlockMeta { + BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; + int64 block_size = 2; + Header header = 3 [(gogoproto.nullable) = false]; + int64 num_txs = 4; +} + +// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. +message TxProof { + bytes root_hash = 1; + bytes data = 2; + tendermint.crypto.Proof proof = 3; +} diff --git a/proto/tendermint/types/validator.proto b/proto/tendermint/types/validator.proto new file mode 100644 index 0000000..49860b9 --- /dev/null +++ b/proto/tendermint/types/validator.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package tendermint.types; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; + +import "gogoproto/gogo.proto"; +import "tendermint/crypto/keys.proto"; + +message ValidatorSet { + repeated Validator validators = 1; + Validator proposer = 2; + int64 total_voting_power = 3; +} + +message Validator { + bytes address = 1; + tendermint.crypto.PublicKey pub_key = 2 [(gogoproto.nullable) = false]; + int64 voting_power = 3; + int64 proposer_priority = 4; +} + +message SimpleValidator { + tendermint.crypto.PublicKey pub_key = 1; + int64 voting_power = 2; +} diff --git a/proto/tendermint/version/types.proto b/proto/tendermint/version/types.proto new file mode 100644 index 0000000..6061868 --- /dev/null +++ b/proto/tendermint/version/types.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package tendermint.version; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/version"; + +import "gogoproto/gogo.proto"; + +// App includes the protocol and software version for the application. +// This information is included in ResponseInfo. The App.Protocol can be +// updated in ResponseEndBlock. +message App { + uint64 protocol = 1; + string software = 2; +} + +// Consensus captures the consensus rules for processing a block in the blockchain, +// including all blockchain data structures and the rules of the application's +// state transition machine. +message Consensus { + option (gogoproto.equal) = true; + + uint64 block = 1; + uint64 app = 2; +} diff --git a/proto/terra/market/v1beta1/genesis.proto b/proto/terra/market/v1beta1/genesis.proto new file mode 100644 index 0000000..0631302 --- /dev/null +++ b/proto/terra/market/v1beta1/genesis.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package terra.market.v1beta1; + +import "gogoproto/gogo.proto"; +import "terra/market/v1beta1/market.proto"; + +option go_package = "github.com/classic-terra/core/x/market/types"; + +// GenesisState defines the market module's genesis state. +message GenesisState { + // params defines all the paramaters of the module. + Params params = 1 [(gogoproto.nullable) = false]; + + // the gap between the TerraPool and the BasePool + bytes terra_pool_delta = 2 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} diff --git a/proto/terra/market/v1beta1/market.proto b/proto/terra/market/v1beta1/market.proto new file mode 100644 index 0000000..cbd5fea --- /dev/null +++ b/proto/terra/market/v1beta1/market.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package terra.market.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/classic-terra/core/x/market/types"; + +// Params defines the parameters for the market module. +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + bytes base_pool = 1 [ + (gogoproto.moretags) = "yaml:\"base_pool\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + uint64 pool_recovery_period = 2 [(gogoproto.moretags) = "yaml:\"pool_recovery_period\""]; + bytes min_stability_spread = 3 [ + (gogoproto.moretags) = "yaml:\"min_stability_spread\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/terra/market/v1beta1/query.proto b/proto/terra/market/v1beta1/query.proto new file mode 100644 index 0000000..1ef0303 --- /dev/null +++ b/proto/terra/market/v1beta1/query.proto @@ -0,0 +1,63 @@ +syntax = "proto3"; +package terra.market.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "terra/market/v1beta1/market.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/classic-terra/core/x/market/types"; + +// Query defines the gRPC querier service. +service Query { + // Swap returns simulated swap amount. + rpc Swap(QuerySwapRequest) returns (QuerySwapResponse) { + option (google.api.http).get = "/terra/market/v1beta1/swap"; + } + + // TerraPoolDelta returns terra_pool_delta amount. + rpc TerraPoolDelta(QueryTerraPoolDeltaRequest) returns (QueryTerraPoolDeltaResponse) { + option (google.api.http).get = "/terra/market/v1beta1/terra_pool_delta"; + } + + // Params queries all parameters. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/terra/market/v1beta1/params"; + } +} + +// QuerySwapRequest is the request type for the Query/Swap RPC method. +message QuerySwapRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // offer_coin defines the coin being offered (i.e. 1000000uluna) + string offer_coin = 1; + // ask_denom defines the denom of the coin to swap to + string ask_denom = 2; +} + +// QuerySwapResponse is the response type for the Query/Swap RPC method. +message QuerySwapResponse { + // return_coin defines the coin returned as a result of the swap simulation. + cosmos.base.v1beta1.Coin return_coin = 1 [(gogoproto.nullable) = false]; +} + +// QueryTerraPoolDeltaRequest is the request type for the Query/TerraPoolDelta RPC method. +message QueryTerraPoolDeltaRequest {} + +// QueryTerraPoolDeltaResponse is the response type for the Query/TerraPoolDelta RPC method. +message QueryTerraPoolDeltaResponse { + // terra_pool_delta defines the gap between the TerraPool and the TerraBasePool + bytes terra_pool_delta = 1 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/terra/market/v1beta1/tx.proto b/proto/terra/market/v1beta1/tx.proto new file mode 100644 index 0000000..bed653c --- /dev/null +++ b/proto/terra/market/v1beta1/tx.proto @@ -0,0 +1,51 @@ +syntax = "proto3"; +package terra.market.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/classic-terra/core/x/market/types"; + +// Msg defines the market Msg service. +service Msg { + // Swap defines a method for swapping coin from one denom to another + // denom. + rpc Swap(MsgSwap) returns (MsgSwapResponse); + + // SwapSend defines a method for swapping and sending coin from a account to other + // account. + rpc SwapSend(MsgSwapSend) returns (MsgSwapSendResponse); +} + +// MsgSwap represents a message to swap coin to another denom. +message MsgSwap { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string trader = 1 [(gogoproto.moretags) = "yaml:\"trader\""]; + cosmos.base.v1beta1.Coin offer_coin = 2 [(gogoproto.moretags) = "yaml:\"offer_coin\"", (gogoproto.nullable) = false]; + string ask_denom = 3 [(gogoproto.moretags) = "yaml:\"ask_denom\""]; +} + +// MsgSwapResponse defines the Msg/Swap response type. +message MsgSwapResponse { + cosmos.base.v1beta1.Coin swap_coin = 1 [(gogoproto.moretags) = "yaml:\"swap_coin\"", (gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin swap_fee = 2 [(gogoproto.moretags) = "yaml:\"swap_fee\"", (gogoproto.nullable) = false]; +} + +// MsgSwapSend represents a message to swap coin and send all result coin to recipient +message MsgSwapSend { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; + string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; + cosmos.base.v1beta1.Coin offer_coin = 3 [(gogoproto.moretags) = "yaml:\"offer_coin\"", (gogoproto.nullable) = false]; + string ask_denom = 4 [(gogoproto.moretags) = "yaml:\"ask_denom\""]; +} + +// MsgSwapSendResponse defines the Msg/SwapSend response type. +message MsgSwapSendResponse { + cosmos.base.v1beta1.Coin swap_coin = 1 [(gogoproto.moretags) = "yaml:\"swap_coin\"", (gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin swap_fee = 2 [(gogoproto.moretags) = "yaml:\"swap_fee\"", (gogoproto.nullable) = false]; +} diff --git a/proto/terra/oracle/v1beta1/genesis.proto b/proto/terra/oracle/v1beta1/genesis.proto new file mode 100644 index 0000000..5abc154 --- /dev/null +++ b/proto/terra/oracle/v1beta1/genesis.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; +package terra.oracle.v1beta1; + +import "gogoproto/gogo.proto"; +import "terra/oracle/v1beta1/oracle.proto"; + +option go_package = "github.com/classic-terra/core/x/oracle/types"; + +// GenesisState defines the oracle module's genesis state. +message GenesisState { + Params params = 1 [(gogoproto.nullable) = false]; + repeated FeederDelegation feeder_delegations = 2 [(gogoproto.nullable) = false]; + repeated ExchangeRateTuple exchange_rates = 3 + [(gogoproto.castrepeated) = "ExchangeRateTuples", (gogoproto.nullable) = false]; + repeated MissCounter miss_counters = 4 [(gogoproto.nullable) = false]; + repeated AggregateExchangeRatePrevote aggregate_exchange_rate_prevotes = 5 [(gogoproto.nullable) = false]; + repeated AggregateExchangeRateVote aggregate_exchange_rate_votes = 6 [(gogoproto.nullable) = false]; + repeated TobinTax tobin_taxes = 7 [(gogoproto.nullable) = false]; +} + +// FeederDelegation is the address for where oracle feeder authority are +// delegated to. By default this struct is only used at genesis to feed in +// default feeder addresses. +message FeederDelegation { + string feeder_address = 1; + string validator_address = 2; +} + +// MissCounter defines an miss counter and validator address pair used in +// oracle module's genesis state +message MissCounter { + string validator_address = 1; + uint64 miss_counter = 2; +} + +// TobinTax defines an denom and tobin_tax pair used in +// oracle module's genesis state +message TobinTax { + string denom = 1; + string tobin_tax = 2 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/proto/terra/oracle/v1beta1/oracle.proto b/proto/terra/oracle/v1beta1/oracle.proto new file mode 100644 index 0000000..dab71a2 --- /dev/null +++ b/proto/terra/oracle/v1beta1/oracle.proto @@ -0,0 +1,98 @@ +syntax = "proto3"; +package terra.oracle.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/classic-terra/core/x/oracle/types"; + +// Params defines the parameters for the oracle module. +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + uint64 vote_period = 1 [(gogoproto.moretags) = "yaml:\"vote_period\""]; + string vote_threshold = 2 [ + (gogoproto.moretags) = "yaml:\"vote_threshold\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + string reward_band = 3 [ + (gogoproto.moretags) = "yaml:\"reward_band\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + uint64 reward_distribution_window = 4 [(gogoproto.moretags) = "yaml:\"reward_distribution_window\""]; + repeated Denom whitelist = 5 [ + (gogoproto.moretags) = "yaml:\"whitelist\"", + (gogoproto.castrepeated) = "DenomList", + (gogoproto.nullable) = false + ]; + string slash_fraction = 6 [ + (gogoproto.moretags) = "yaml:\"slash_fraction\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + uint64 slash_window = 7 [(gogoproto.moretags) = "yaml:\"slash_window\""]; + string min_valid_per_window = 8 [ + (gogoproto.moretags) = "yaml:\"min_valid_per_window\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + +// Denom - the object to hold configurations of each denom +message Denom { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string name = 1 [(gogoproto.moretags) = "yaml:\"name\""]; + string tobin_tax = 2 [ + (gogoproto.moretags) = "yaml:\"tobin_tax\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + +// struct for aggregate prevoting on the ExchangeRateVote. +// The purpose of aggregate prevote is to hide vote exchange rates with hash +// which is formatted as hex string in SHA256("{salt}:{exchange rate}{denom},...,{exchange rate}{denom}:{voter}") +message AggregateExchangeRatePrevote { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string hash = 1 [(gogoproto.moretags) = "yaml:\"hash\""]; + string voter = 2 [(gogoproto.moretags) = "yaml:\"voter\""]; + uint64 submit_block = 3 [(gogoproto.moretags) = "yaml:\"submit_block\""]; +} + +// MsgAggregateExchangeRateVote - struct for voting on +// the exchange rates of Luna denominated in various Terra assets. +message AggregateExchangeRateVote { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + repeated ExchangeRateTuple exchange_rate_tuples = 1 [ + (gogoproto.moretags) = "yaml:\"exchange_rate_tuples\"", + (gogoproto.castrepeated) = "ExchangeRateTuples", + (gogoproto.nullable) = false + ]; + + string voter = 2 [(gogoproto.moretags) = "yaml:\"voter\""]; +} + +// ExchangeRateTuple - struct to store interpreted exchange rates data to store +message ExchangeRateTuple { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string denom = 1 [(gogoproto.moretags) = "yaml:\"denom\""]; + string exchange_rate = 2 [ + (gogoproto.moretags) = "yaml:\"exchange_rate\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/terra/oracle/v1beta1/query.proto b/proto/terra/oracle/v1beta1/query.proto new file mode 100644 index 0000000..72473b8 --- /dev/null +++ b/proto/terra/oracle/v1beta1/query.proto @@ -0,0 +1,251 @@ +syntax = "proto3"; +package terra.oracle.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "terra/oracle/v1beta1/oracle.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/classic-terra/core/x/oracle/types"; + +// Query defines the gRPC querier service. +service Query { + // ExchangeRate returns exchange rate of a denom + rpc ExchangeRate(QueryExchangeRateRequest) returns (QueryExchangeRateResponse) { + option (google.api.http).get = "/terra/oracle/v1beta1/denoms/{denom}/exchange_rate"; + } + + // ExchangeRates returns exchange rates of all denoms + rpc ExchangeRates(QueryExchangeRatesRequest) returns (QueryExchangeRatesResponse) { + option (google.api.http).get = "/terra/oracle/v1beta1/denoms/exchange_rates"; + } + + // TobinTax returns tobin tax of a denom + rpc TobinTax(QueryTobinTaxRequest) returns (QueryTobinTaxResponse) { + option (google.api.http).get = "/terra/oracle/v1beta1/denoms/{denom}/tobin_tax"; + } + + // TobinTaxes returns tobin taxes of all denoms + rpc TobinTaxes(QueryTobinTaxesRequest) returns (QueryTobinTaxesResponse) { + option (google.api.http).get = "/terra/oracle/v1beta1/denoms/tobin_taxes"; + } + + // Actives returns all active denoms + rpc Actives(QueryActivesRequest) returns (QueryActivesResponse) { + option (google.api.http).get = "/terra/oracle/v1beta1/denoms/actives"; + } + + // VoteTargets returns all vote target denoms + rpc VoteTargets(QueryVoteTargetsRequest) returns (QueryVoteTargetsResponse) { + option (google.api.http).get = "/terra/oracle/v1beta1/denoms/vote_targets"; + } + + // FeederDelegation returns feeder delegation of a validator + rpc FeederDelegation(QueryFeederDelegationRequest) returns (QueryFeederDelegationResponse) { + option (google.api.http).get = "/terra/oracle/v1beta1/validators/{validator_addr}/feeder"; + } + + // MissCounter returns oracle miss counter of a validator + rpc MissCounter(QueryMissCounterRequest) returns (QueryMissCounterResponse) { + option (google.api.http).get = "/terra/oracle/v1beta1/validators/{validator_addr}/miss"; + } + + // AggregatePrevote returns an aggregate prevote of a validator + rpc AggregatePrevote(QueryAggregatePrevoteRequest) returns (QueryAggregatePrevoteResponse) { + option (google.api.http).get = "/terra/oracle/v1beta1/validators/{validator_addr}/aggregate_prevote"; + } + + // AggregatePrevotes returns aggregate prevotes of all validators + rpc AggregatePrevotes(QueryAggregatePrevotesRequest) returns (QueryAggregatePrevotesResponse) { + option (google.api.http).get = "/terra/oracle/v1beta1/validators/aggregate_prevotes"; + } + + // AggregateVote returns an aggregate vote of a validator + rpc AggregateVote(QueryAggregateVoteRequest) returns (QueryAggregateVoteResponse) { + option (google.api.http).get = "/terra/oracle/v1beta1/valdiators/{validator_addr}/aggregate_vote"; + } + + // AggregateVotes returns aggregate votes of all validators + rpc AggregateVotes(QueryAggregateVotesRequest) returns (QueryAggregateVotesResponse) { + option (google.api.http).get = "/terra/oracle/v1beta1/validators/aggregate_votes"; + } + + // Params queries all parameters. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/terra/oracle/v1beta1/params"; + } +} + +// QueryExchangeRateRequest is the request type for the Query/ExchangeRate RPC method. +message QueryExchangeRateRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // denom defines the denomination to query for. + string denom = 1; +} + +// QueryExchangeRateResponse is response type for the +// Query/ExchangeRate RPC method. +message QueryExchangeRateResponse { + // exchange_rate defines the exchange rate of Luna denominated in various Terra + string exchange_rate = 1 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// QueryExchangeRatesRequest is the request type for the Query/ExchangeRates RPC method. +message QueryExchangeRatesRequest {} + +// QueryExchangeRatesResponse is response type for the +// Query/ExchangeRates RPC method. +message QueryExchangeRatesResponse { + // exchange_rates defines a list of the exchange rate for all whitelisted denoms. + repeated cosmos.base.v1beta1.DecCoin exchange_rates = 1 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; +} + +// QueryTobinTaxRequest is the request type for the Query/TobinTax RPC method. +message QueryTobinTaxRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // denom defines the denomination to query for. + string denom = 1; +} + +// QueryTobinTaxResponse is response type for the +// Query/TobinTax RPC method. +message QueryTobinTaxResponse { + // tobin_taxe defines the tobin tax of a denom + string tobin_tax = 1 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// QueryTobinTaxesRequest is the request type for the Query/TobinTaxes RPC method. +message QueryTobinTaxesRequest {} + +// QueryTobinTaxesResponse is response type for the +// Query/TobinTaxes RPC method. +message QueryTobinTaxesResponse { + // tobin_taxes defines a list of the tobin tax of all whitelisted denoms + repeated Denom tobin_taxes = 1 [ + (gogoproto.moretags) = "yaml:\"tobin_taxes\"", + (gogoproto.castrepeated) = "DenomList", + (gogoproto.nullable) = false + ]; +} + +// QueryActivesRequest is the request type for the Query/Actives RPC method. +message QueryActivesRequest {} + +// QueryActivesResponse is response type for the +// Query/Actives RPC method. +message QueryActivesResponse { + // actives defines a list of the denomination which oracle prices aggreed upon. + repeated string actives = 1; +} + +// QueryVoteTargetsRequest is the request type for the Query/VoteTargets RPC method. +message QueryVoteTargetsRequest {} + +// QueryVoteTargetsResponse is response type for the +// Query/VoteTargets RPC method. +message QueryVoteTargetsResponse { + // vote_targets defines a list of the denomination in which everyone + // should vote in the current vote period. + repeated string vote_targets = 1; +} + +// QueryFeederDelegationRequest is the request type for the Query/FeederDelegation RPC method. +message QueryFeederDelegationRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator defines the validator address to query for. + string validator_addr = 1; +} + +// QueryFeederDelegationResponse is response type for the +// Query/FeederDelegation RPC method. +message QueryFeederDelegationResponse { + // feeder_addr defines the feeder delegation of a validator + string feeder_addr = 1; +} + +// QueryMissCounterRequest is the request type for the Query/MissCounter RPC method. +message QueryMissCounterRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator defines the validator address to query for. + string validator_addr = 1; +} + +// QueryMissCounterResponse is response type for the +// Query/MissCounter RPC method. +message QueryMissCounterResponse { + // miss_counter defines the oracle miss counter of a validator + uint64 miss_counter = 1; +} + +// QueryAggregatePrevoteRequest is the request type for the Query/AggregatePrevote RPC method. +message QueryAggregatePrevoteRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator defines the validator address to query for. + string validator_addr = 1; +} + +// QueryAggregatePrevoteResponse is response type for the +// Query/AggregatePrevote RPC method. +message QueryAggregatePrevoteResponse { + // aggregate_prevote defines oracle aggregate prevote submitted by a validator in the current vote period + AggregateExchangeRatePrevote aggregate_prevote = 1 [(gogoproto.nullable) = false]; + ; +} + +// QueryAggregatePrevotesRequest is the request type for the Query/AggregatePrevotes RPC method. +message QueryAggregatePrevotesRequest {} + +// QueryAggregatePrevotesResponse is response type for the +// Query/AggregatePrevotes RPC method. +message QueryAggregatePrevotesResponse { + // aggregate_prevotes defines all oracle aggregate prevotes submitted in the current vote period + repeated AggregateExchangeRatePrevote aggregate_prevotes = 1 [(gogoproto.nullable) = false]; +} + +// QueryAggregateVoteRequest is the request type for the Query/AggregateVote RPC method. +message QueryAggregateVoteRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator defines the validator address to query for. + string validator_addr = 1; +} + +// QueryAggregateVoteResponse is response type for the +// Query/AggregateVote RPC method. +message QueryAggregateVoteResponse { + // aggregate_vote defines oracle aggregate vote submitted by a validator in the current vote period + AggregateExchangeRateVote aggregate_vote = 1 [(gogoproto.nullable) = false]; +} + +// QueryAggregateVotesRequest is the request type for the Query/AggregateVotes RPC method. +message QueryAggregateVotesRequest {} + +// QueryAggregateVotesResponse is response type for the +// Query/AggregateVotes RPC method. +message QueryAggregateVotesResponse { + // aggregate_votes defines all oracle aggregate votes submitted in the current vote period + repeated AggregateExchangeRateVote aggregate_votes = 1 [(gogoproto.nullable) = false]; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/proto/terra/oracle/v1beta1/tx.proto b/proto/terra/oracle/v1beta1/tx.proto new file mode 100644 index 0000000..e9c0d4e --- /dev/null +++ b/proto/terra/oracle/v1beta1/tx.proto @@ -0,0 +1,62 @@ +syntax = "proto3"; +package terra.oracle.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/classic-terra/core/x/oracle/types"; + +// Msg defines the oracle Msg service. +service Msg { + // AggregateExchangeRatePrevote defines a method for submitting + // aggregate exchange rate prevote + rpc AggregateExchangeRatePrevote(MsgAggregateExchangeRatePrevote) returns (MsgAggregateExchangeRatePrevoteResponse); + + // AggregateExchangeRateVote defines a method for submitting + // aggregate exchange rate vote + rpc AggregateExchangeRateVote(MsgAggregateExchangeRateVote) returns (MsgAggregateExchangeRateVoteResponse); + + // DelegateFeedConsent defines a method for setting the feeder delegation + rpc DelegateFeedConsent(MsgDelegateFeedConsent) returns (MsgDelegateFeedConsentResponse); +} + +// MsgAggregateExchangeRatePrevote represents a message to submit +// aggregate exchange rate prevote. +message MsgAggregateExchangeRatePrevote { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string hash = 1 [(gogoproto.moretags) = "yaml:\"hash\""]; + string feeder = 2 [(gogoproto.moretags) = "yaml:\"feeder\""]; + string validator = 3 [(gogoproto.moretags) = "yaml:\"validator\""]; +} + +// MsgAggregateExchangeRatePrevoteResponse defines the Msg/AggregateExchangeRatePrevote response type. +message MsgAggregateExchangeRatePrevoteResponse {} + +// MsgAggregateExchangeRateVote represents a message to submit +// aggregate exchange rate vote. +message MsgAggregateExchangeRateVote { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string salt = 1 [(gogoproto.moretags) = "yaml:\"salt\""]; + string exchange_rates = 2 [(gogoproto.moretags) = "yaml:\"exchange_rates\""]; + string feeder = 3 [(gogoproto.moretags) = "yaml:\"feeder\""]; + string validator = 4 [(gogoproto.moretags) = "yaml:\"validator\""]; +} + +// MsgAggregateExchangeRateVoteResponse defines the Msg/AggregateExchangeRateVote response type. +message MsgAggregateExchangeRateVoteResponse {} + +// MsgDelegateFeedConsent represents a message to +// delegate oracle voting rights to another address. +message MsgDelegateFeedConsent { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string operator = 1 [(gogoproto.moretags) = "yaml:\"operator\""]; + string delegate = 2 [(gogoproto.moretags) = "yaml:\"delegate\""]; +} + +// MsgDelegateFeedConsentResponse defines the Msg/DelegateFeedConsent response type. +message MsgDelegateFeedConsentResponse {} \ No newline at end of file diff --git a/proto/terra/treasury/v1beta1/genesis.proto b/proto/terra/treasury/v1beta1/genesis.proto new file mode 100644 index 0000000..b0848ee --- /dev/null +++ b/proto/terra/treasury/v1beta1/genesis.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; +package terra.treasury.v1beta1; + +import "gogoproto/gogo.proto"; +import "terra/treasury/v1beta1/treasury.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/classic-terra/core/x/treasury/types"; + +// GenesisState defines the oracle module's genesis state. +message GenesisState { + Params params = 1 [(gogoproto.nullable) = false]; + string tax_rate = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string reward_weight = 3 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + repeated TaxCap tax_caps = 4 [(gogoproto.nullable) = false]; + repeated cosmos.base.v1beta1.Coin tax_proceeds = 5 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + repeated cosmos.base.v1beta1.Coin epoch_initial_issuance = 6 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + repeated EpochState epoch_states = 7 [(gogoproto.nullable) = false]; +} + +// TaxCap is the max tax amount can be charged for the given denom +message TaxCap { + string denom = 1; + string tax_cap = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; +} + +// EpochState is the record for each epoch state +message EpochState { + uint64 epoch = 1; + string tax_reward = 2 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string seigniorage_reward = 3 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string total_staked_luna = 4 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/proto/terra/treasury/v1beta1/gov.proto b/proto/terra/treasury/v1beta1/gov.proto new file mode 100644 index 0000000..ee2bbd8 --- /dev/null +++ b/proto/terra/treasury/v1beta1/gov.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; +package terra.treasury.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/classic-terra/core/x/treasury/types"; + +// proposal request structure for adding burn tax exemption address(es) +message AddBurnTaxExemptionAddressProposal { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string title = 1; + string description = 2; + repeated string addresses = 3 [(gogoproto.moretags) = "yaml:\"addresses\""]; +} + +// proposal request structure for removing burn tax exemption address(es) +message RemoveBurnTaxExemptionAddressProposal { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string title = 1; + string description = 2; + repeated string addresses = 3 [(gogoproto.moretags) = "yaml:\"addresses\""]; +} \ No newline at end of file diff --git a/proto/terra/treasury/v1beta1/query.proto b/proto/terra/treasury/v1beta1/query.proto new file mode 100644 index 0000000..88a0abf --- /dev/null +++ b/proto/terra/treasury/v1beta1/query.proto @@ -0,0 +1,170 @@ +syntax = "proto3"; +package terra.treasury.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "terra/treasury/v1beta1/treasury.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/classic-terra/core/x/treasury/types"; + +// Query defines the gRPC querier service. +service Query { + // TaxRate return the current tax rate + rpc TaxRate(QueryTaxRateRequest) returns (QueryTaxRateResponse) { + option (google.api.http).get = "/terra/treasury/v1beta1/tax_rate"; + } + + // TaxCap returns the tax cap of a denom + rpc TaxCap(QueryTaxCapRequest) returns (QueryTaxCapResponse) { + option (google.api.http).get = "/terra/treasury/v1beta1/tax_caps/{denom}"; + } + + // TaxCaps returns the all tax caps + rpc TaxCaps(QueryTaxCapsRequest) returns (QueryTaxCapsResponse) { + option (google.api.http).get = "/terra/treasury/v1beta1/tax_caps"; + } + + // RewardWeight return the current reward weight + rpc RewardWeight(QueryRewardWeightRequest) returns (QueryRewardWeightResponse) { + option (google.api.http).get = "/terra/treasury/v1beta1/reward_weight"; + } + + // SeigniorageProceeds return the current seigniorage proceeds + rpc SeigniorageProceeds(QuerySeigniorageProceedsRequest) returns (QuerySeigniorageProceedsResponse) { + option (google.api.http).get = "/terra/treasury/v1beta1/seigniorage_proceeds"; + } + + // TaxProceeds return the current tax proceeds + rpc TaxProceeds(QueryTaxProceedsRequest) returns (QueryTaxProceedsResponse) { + option (google.api.http).get = "/terra/treasury/v1beta1/tax_proceeds"; + } + + // Indicators return the current trl informations + rpc Indicators(QueryIndicatorsRequest) returns (QueryIndicatorsResponse) { + option (google.api.http).get = "/terra/treasury/v1beta1/indicators"; + } + + // BurnTaxExemptionList returns all registered burn tax exemption addresses + rpc BurnTaxExemptionList(QueryBurnTaxExemptionListRequest) returns (QueryBurnTaxExemptionListResponse) { + option (google.api.http).get = "/terra/treasury/v1beta1/burn_tax_exemption_list"; + } + + // Params queries all parameters. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/terra/treasury/v1beta1/params"; + } +} + +// QueryTaxRateRequest is the request type for the Query/TaxRate RPC method. +message QueryTaxRateRequest {} + +// QueryTaxRateResponse is response type for the +// Query/TaxRate RPC method. +message QueryTaxRateResponse { + string tax_rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// QueryTaxCapRequest is the request type for the Query/TaxCap RPC method. +message QueryTaxCapRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // denom defines the denomination to query for. + string denom = 1; +} + +// QueryTaxCapResponse is response type for the +// Query/TaxCap RPC method. +message QueryTaxCapResponse { + string tax_cap = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; +} + +// QueryTaxCapsRequest is the request type for the Query/TaxCaps RPC method. +message QueryTaxCapsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; +} + +// QueryTaxCapsResponseItem is response item type for the +// Query/TaxCaps RPC method. +message QueryTaxCapsResponseItem { + string denom = 1; + string tax_cap = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; +} + +// QueryTaxCapsResponse is response type for the +// Query/TaxCaps RPC method. +message QueryTaxCapsResponse { + repeated QueryTaxCapsResponseItem tax_caps = 1 [(gogoproto.nullable) = false]; +} + +// QueryRewardWeightRequest is the request type for the Query/RewardWeight RPC method. +message QueryRewardWeightRequest {} + +// QueryRewardWeightResponse is response type for the +// Query/RewardWeight RPC method. +message QueryRewardWeightResponse { + string reward_weight = 1 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// QueryTaxProceedsRequest is the request type for the Query/TaxProceeds RPC method. +message QueryTaxProceedsRequest {} + +// QueryTaxProceedsResponse is response type for the +// Query/TaxProceeds RPC method. +message QueryTaxProceedsResponse { + repeated cosmos.base.v1beta1.Coin tax_proceeds = 1 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; +} + +// QuerySeigniorageProceedsRequest is the request type for the Query/SeigniorageProceeds RPC method. +message QuerySeigniorageProceedsRequest {} + +// QuerySeigniorageProceedsResponse is response type for the +// Query/SeigniorageProceeds RPC method. +message QuerySeigniorageProceedsResponse { + string seigniorage_proceeds = 1 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; +} + +// QueryIndicatorsRequest is the request type for the Query/Indicators RPC method. +message QueryIndicatorsRequest {} + +// QueryIndicatorsResponse is response type for the +// Query/Indicators RPC method. +message QueryIndicatorsResponse { + string trl_year = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.customname) = "TRLYear" + ]; + string trl_month = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.customname) = "TRLMonth" + ]; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +// QueryBurnTaxExemptionListRequest is the request type for the Query/BurnTaxExemptionList RPC method. +message QueryBurnTaxExemptionListRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryBurnTaxExemptionListResponse is response type for the Query/BurnTaxExemptionList RPC method. +message QueryBurnTaxExemptionListResponse { + repeated string addresses = 1; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} \ No newline at end of file diff --git a/proto/terra/treasury/v1beta1/treasury.proto b/proto/terra/treasury/v1beta1/treasury.proto new file mode 100644 index 0000000..7fd0d65 --- /dev/null +++ b/proto/terra/treasury/v1beta1/treasury.proto @@ -0,0 +1,77 @@ +syntax = "proto3"; +package terra.treasury.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/classic-terra/core/x/treasury/types"; + +// Params defines the parameters for the oracle module. +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + PolicyConstraints tax_policy = 1 [(gogoproto.moretags) = "yaml:\"tax_policy\"", (gogoproto.nullable) = false]; + PolicyConstraints reward_policy = 2 [(gogoproto.moretags) = "yaml:\"reward_policy\"", (gogoproto.nullable) = false]; + string seigniorage_burden_target = 3 [ + (gogoproto.moretags) = "yaml:\"seigniorage_burden_target\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + string mining_increment = 4 [ + (gogoproto.moretags) = "yaml:\"mining_increment\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + uint64 window_short = 5 [(gogoproto.moretags) = "yaml:\"window_short\""]; + uint64 window_long = 6 [(gogoproto.moretags) = "yaml:\"window_long\""]; + uint64 window_probation = 7 [(gogoproto.moretags) = "yaml:\"window_probation\""]; + string burn_tax_split = 8 [ + (gogoproto.moretags) = "yaml:\"burn_tax_split\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + +// PolicyConstraints - defines policy constraints can be applied in tax & reward policies +message PolicyConstraints { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string rate_min = 1 [ + (gogoproto.moretags) = "yaml:\"rate_min\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + string rate_max = 2 [ + (gogoproto.moretags) = "yaml:\"rate_max\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + cosmos.base.v1beta1.Coin cap = 3 [(gogoproto.moretags) = "yaml:\"cap\"", (gogoproto.nullable) = false]; + string change_rate_max = 4 [ + (gogoproto.moretags) = "yaml:\"change_rate_max\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + +// EpochTaxProceeds represents the tax amount +// collected at the current epoch +message EpochTaxProceeds { + repeated cosmos.base.v1beta1.Coin tax_proceeds = 1 [ + (gogoproto.moretags) = "yaml:\"tax_proceeds\"", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; +} + +// EpochInitialIssuance represents initial issuance +// of the currrent epoch +message EpochInitialIssuance { + repeated cosmos.base.v1beta1.Coin issuance = 1 [ + (gogoproto.moretags) = "yaml:\"issuance\"", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/terra/tx/v1beta1/service.proto b/proto/terra/tx/v1beta1/service.proto new file mode 100644 index 0000000..f40b04d --- /dev/null +++ b/proto/terra/tx/v1beta1/service.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; +package terra.tx.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/tx/v1beta1/tx.proto"; + +option (gogoproto.goproto_registration) = true; +option go_package = "github.com/classic-terra/core/custom/auth/tx"; + +// Service defines a gRPC service for interacting with transactions. +service Service { + // EstimateFee simulates executing a transaction for estimating gas usage. + rpc ComputeTax(ComputeTaxRequest) returns (ComputeTaxResponse) { + option (google.api.http) = { + post: "/terra/tx/v1beta1/compute_tax" + body: "*" + }; + } +} + +// ComputeTaxRequest is the request type for the Service.ComputeTax +// RPC method. +message ComputeTaxRequest { + // tx is the transaction to simulate. + // Deprecated. Send raw tx bytes instead. + cosmos.tx.v1beta1.Tx tx = 1 [deprecated = true]; + // tx_bytes is the raw transaction. + bytes tx_bytes = 2; +} + +// ComputeTaxResponse is the response type for the Service.ComputeTax +// RPC method. +message ComputeTaxResponse { + // amount is the amount of coins to be paid as a fee + repeated cosmos.base.v1beta1.Coin tax_amount = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} diff --git a/proto/terra/vesting/v1beta1/vesting.proto b/proto/terra/vesting/v1beta1/vesting.proto new file mode 100644 index 0000000..8624761 --- /dev/null +++ b/proto/terra/vesting/v1beta1/vesting.proto @@ -0,0 +1,46 @@ +syntax = "proto3"; +package terra.vesting.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/vesting/v1beta1/vesting.proto"; + +option go_package = "github.com/classic-terra/core/x/vesting/types"; + +// LazyGradedVestingAccount implements the LazyGradedVestingAccount interface. It vests all +// coins according to a predefined schedule. +message LazyGradedVestingAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + cosmos.vesting.v1beta1.BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; + repeated VestingSchedule vesting_schedules = 2 [ + (gogoproto.moretags) = "yaml:\"vesting_schedules\"", + (gogoproto.castrepeated) = "VestingSchedules", + (gogoproto.nullable) = false + ]; +} + +// Schedule - represent single schedule data for a vesting schedule +message Schedule { + option (gogoproto.goproto_getters) = false; + + int64 start_time = 1 [(gogoproto.moretags) = "yaml:\"start_time\""]; + int64 end_time = 2 [(gogoproto.moretags) = "yaml:\"end_time\""]; + string ratio = 3 [ + (gogoproto.moretags) = "yaml:\"ratio\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + +// VestingSchedule defines vesting schedule for a denom +message VestingSchedule { + option (gogoproto.goproto_getters) = false; + + string denom = 1 [(gogoproto.moretags) = "yaml:\"start_time\""]; + repeated Schedule schedules = 2 [ + (gogoproto.moretags) = "yaml:\"schedules\"", + (gogoproto.castrepeated) = "Schedules", + (gogoproto.nullable) = false + ]; +} \ No newline at end of file diff --git a/proto/terra/wasm/v1beta1/genesis.proto b/proto/terra/wasm/v1beta1/genesis.proto new file mode 100644 index 0000000..30979a7 --- /dev/null +++ b/proto/terra/wasm/v1beta1/genesis.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; +package terra.wasm.v1beta1; + +import "gogoproto/gogo.proto"; +import "terra/wasm/v1beta1/wasm.proto"; + +option go_package = "github.com/classic-terra/core/x/wasm/types"; + +// GenesisState defines the oracle module's genesis state. +message GenesisState { + Params params = 1 [(gogoproto.nullable) = false]; + uint64 last_code_id = 2 [(gogoproto.customname) = "LastCodeID"]; + uint64 last_instance_id = 3 [(gogoproto.customname) = "LastInstanceID"]; + repeated Code codes = 4 [(gogoproto.nullable) = false]; + repeated Contract contracts = 5 [(gogoproto.nullable) = false]; +} + +// Model is a struct that holds a KV pair +message Model { + bytes key = 1; + bytes value = 2; +} + +// Code struct encompasses CodeInfo and CodeBytes +message Code { + CodeInfo code_info = 1 [(gogoproto.nullable) = false]; + bytes code_bytes = 2; +} + +// Contract struct encompasses ContractAddress, ContractInfo, and ContractState +message Contract { + ContractInfo contract_info = 1 [(gogoproto.nullable) = false]; + repeated Model contract_store = 2 [(gogoproto.nullable) = false]; +} diff --git a/proto/terra/wasm/v1beta1/query.proto b/proto/terra/wasm/v1beta1/query.proto new file mode 100644 index 0000000..65bd189 --- /dev/null +++ b/proto/terra/wasm/v1beta1/query.proto @@ -0,0 +1,124 @@ +syntax = "proto3"; +package terra.wasm.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "terra/wasm/v1beta1/wasm.proto"; + +option go_package = "github.com/classic-terra/core/x/wasm/types"; + +// Query defines the gRPC querier service. +service Query { + // CodeInfo returns the stored code info + rpc CodeInfo(QueryCodeInfoRequest) returns (QueryCodeInfoResponse) { + option (google.api.http).get = "/terra/wasm/v1beta1/codes/{code_id}"; + } + + // ByteCode returns the stored byte code + rpc ByteCode(QueryByteCodeRequest) returns (QueryByteCodeResponse) { + option (google.api.http).get = "/terra/wasm/v1beta1/codes/{code_id}/byte_code"; + } + + // ContractInfo returns the stored contract info + rpc ContractInfo(QueryContractInfoRequest) returns (QueryContractInfoResponse) { + option (google.api.http).get = "/terra/wasm/v1beta1/contracts/{contract_address}"; + } + + // ContractStore return smart query result from the contract + rpc ContractStore(QueryContractStoreRequest) returns (QueryContractStoreResponse) { + option (google.api.http).get = "/terra/wasm/v1beta1/contracts/{contract_address}/store"; + } + + // RawStore return single key from the raw store data of a contract + rpc RawStore(QueryRawStoreRequest) returns (QueryRawStoreResponse) { + option (google.api.http).get = "/terra/wasm/v1beta1/contracts/{contract_address}/store/raw"; + } + + // Params queries all parameters. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/terra/wasm/v1beta1/params"; + } +} + +// QueryCodeInfoRequest is the request type for the QueryyCodeInfo RPC method. +message QueryCodeInfoRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // grpc-gateway_out does not support Go style CodID + uint64 code_id = 1; +} + +// QueryCodeInfoResponse is response type for the +// QueryyCodeInfo RPC method. +message QueryCodeInfoResponse { + CodeInfo code_info = 1 [(gogoproto.nullable) = false]; +} + +// QueryByteCodeRequest is the request type for the QueryyByteCode RPC method. +message QueryByteCodeRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // grpc-gateway_out does not support Go style CodID + uint64 code_id = 1; +} + +// QueryByteCodeResponse is response type for the +// QueryyByteCode RPC method. +message QueryByteCodeResponse { + bytes byte_code = 1; +} + +// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC method. +message QueryContractInfoRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string contract_address = 1; +} + +// QueryContractInfoResponse is response type for the +// Query/ContractInfo RPC method. +message QueryContractInfoResponse { + ContractInfo contract_info = 1 [(gogoproto.nullable) = false]; +} + +// QueryContractStoreRequest is the request type for the Query/ContractStore RPC method. +message QueryContractStoreRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string contract_address = 1; + bytes query_msg = 2 [(gogoproto.casttype) = "encoding/json.RawMessage"]; +} + +// QueryContractStoreResponse is response type for the +// Query/ContractStore RPC method. +message QueryContractStoreResponse { + bytes query_result = 1 [(gogoproto.casttype) = "encoding/json.RawMessage"]; +} + +// QueryRawStoreRequest is the request type for the Query/RawStore RPC method. +message QueryRawStoreRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string contract_address = 1; + bytes key = 2; +} + +// QueryRawStoreResponse is response type for the +// Query/RawStore RPC method. +message QueryRawStoreResponse { + // Data contains the raw store data + bytes data = 1; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/terra/wasm/v1beta1/tx.proto b/proto/terra/wasm/v1beta1/tx.proto new file mode 100644 index 0000000..6e8309b --- /dev/null +++ b/proto/terra/wasm/v1beta1/tx.proto @@ -0,0 +1,173 @@ +syntax = "proto3"; +package terra.wasm.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/classic-terra/core/x/wasm/types"; + +// Msg defines the oracle Msg service. +service Msg { + // StoreCode to submit Wasm code to the system + rpc StoreCode(MsgStoreCode) returns (MsgStoreCodeResponse); + // MigrateCode to submit new version Wasm code to the system + rpc MigrateCode(MsgMigrateCode) returns (MsgMigrateCodeResponse); + // Instantiate creates a new smart contract instance for the given code id. + rpc InstantiateContract(MsgInstantiateContract) returns (MsgInstantiateContractResponse); + // Execute submits the given message data to a smart contract + rpc ExecuteContract(MsgExecuteContract) returns (MsgExecuteContractResponse); + // Migrate runs a code upgrade/ downgrade for a smart contract + rpc MigrateContract(MsgMigrateContract) returns (MsgMigrateContractResponse); + // UpdateContractAdmin sets a new admin for a smart contract + rpc UpdateContractAdmin(MsgUpdateContractAdmin) returns (MsgUpdateContractAdminResponse); + // ClearContractAdmin remove admin flag from a smart contract + rpc ClearContractAdmin(MsgClearContractAdmin) returns (MsgClearContractAdminResponse); +} + +// MsgStoreCode represents a message to submit +// Wasm code to the system +message MsgStoreCode { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // Sender is the that actor that signed the messages + string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""]; + // WASMByteCode can be raw or gzip compressed + bytes wasm_byte_code = 2 [(gogoproto.moretags) = "yaml:\"wasm_byte_code\"", (gogoproto.customname) = "WASMByteCode"]; +} + +// MsgStoreCodeResponse defines the Msg/StoreCode response type. +message MsgStoreCodeResponse { + // CodeID is the reference to the stored WASM code + uint64 code_id = 1 [(gogoproto.moretags) = "yaml:\"code_id\"", (gogoproto.customname) = "CodeID"]; +} + +// MsgMigrateCode represents a message to submit +// Wasm code to the system +message MsgMigrateCode { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // CodeID is the migration target code id + uint64 code_id = 1 [(gogoproto.moretags) = "yaml:\"code_id\"", (gogoproto.customname) = "CodeID"]; + // Sender is the that actor that signed the messages + string sender = 2 [(gogoproto.moretags) = "yaml:\"sender\""]; + // WASMByteCode can be raw or gzip compressed + bytes wasm_byte_code = 3 [(gogoproto.moretags) = "yaml:\"wasm_byte_code\"", (gogoproto.customname) = "WASMByteCode"]; +} + +// MsgMigrateCodeResponse defines the Msg/MigrateCode response type. +message MsgMigrateCodeResponse {} + +// MsgInstantiateContract represents a message to create +// a new smart contract instance for the given +// code id. +message MsgInstantiateContract { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // Sender is an sender address + string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""]; + // Admin is an optional admin address who can migrate the contract + string admin = 2 [(gogoproto.moretags) = "yaml:\"admin\""]; + // CodeID is the reference to the stored WASM code + uint64 code_id = 3 [(gogoproto.moretags) = "yaml:\"code_id\"", (gogoproto.customname) = "CodeID"]; + // InitMsg json encoded message to be passed to the contract on instantiation + bytes init_msg = 4 [(gogoproto.moretags) = "yaml:\"init_msg\"", (gogoproto.casttype) = "encoding/json.RawMessage"]; + // InitCoins that are transferred to the contract on execution + repeated cosmos.base.v1beta1.Coin init_coins = 5 [ + (gogoproto.moretags) = "yaml:\"init_coins\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// MsgInstantiateContractResponse defines the Msg/InstantiateContract response type. +message MsgInstantiateContractResponse { + // ContractAddress is the bech32 address of the new contract instance. + string contract_address = 1 [(gogoproto.moretags) = "yaml:\"contract_address\""]; + // Data contains base64-encoded bytes to returned from the contract + bytes data = 2 [(gogoproto.moretags) = "yaml:\"data\""]; +} + +// MsgExecuteContract represents a message to +// submits the given message data to a smart contract. +message MsgExecuteContract { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // Sender is the that actor that signed the messages + string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""]; + // Contract is the address of the smart contract + string contract = 2 [(gogoproto.moretags) = "yaml:\"contract\""]; + // ExecuteMsg json encoded message to be passed to the contract + bytes execute_msg = 3 + [(gogoproto.moretags) = "yaml:\"execute_msg\"", (gogoproto.casttype) = "encoding/json.RawMessage"]; + // Coins that are transferred to the contract on execution + repeated cosmos.base.v1beta1.Coin coins = 5 [ + (gogoproto.moretags) = "yaml:\"coins\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// MsgExecuteContractResponse defines the Msg/ExecuteContract response type. +message MsgExecuteContractResponse { + // Data contains base64-encoded bytes to returned from the contract + bytes data = 1 [(gogoproto.moretags) = "yaml:\"data\""]; +} + +// MsgMigrateContract represents a message to +// runs a code upgrade/ downgrade for a smart contract +message MsgMigrateContract { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // Admin is the current contract admin + string admin = 1 [(gogoproto.moretags) = "yaml:\"admin\""]; + // Contract is the address of the smart contract + string contract = 2 [(gogoproto.moretags) = "yaml:\"contract\""]; + // NewCodeID references the new WASM code + uint64 new_code_id = 3 [(gogoproto.moretags) = "yaml:\"new_code_id\"", (gogoproto.customname) = "NewCodeID"]; + // MigrateMsg is json encoded message to be passed to the contract on migration + bytes migrate_msg = 4 + [(gogoproto.moretags) = "yaml:\"migrate_msg\"", (gogoproto.casttype) = "encoding/json.RawMessage"]; +} + +// MsgMigrateContractResponse defines the Msg/MigrateContract response type. +message MsgMigrateContractResponse { + // Data contains base64-encoded bytes to returned from the contract + bytes data = 1 [(gogoproto.moretags) = "yaml:\"data\""]; +} + +// MsgUpdateContractAdmin represents a message to +// sets a new admin for a smart contract +message MsgUpdateContractAdmin { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // Admin is the current contract admin + string admin = 1 [(gogoproto.moretags) = "yaml:\"admin\""]; + // NewAdmin is the new contract admin + string new_admin = 2 [(gogoproto.moretags) = "yaml:\"new_admin\""]; + // Contract is the address of the smart contract + string contract = 3 [(gogoproto.moretags) = "yaml:\"contract\""]; +} + +// MsgUpdateContractAdminResponse defines the Msg/UpdateContractAdmin response type. +message MsgUpdateContractAdminResponse {} + +// MsgClearContractAdmin represents a message to +// clear admin address from a smart contract +message MsgClearContractAdmin { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // Admin is the current contract admin + string admin = 1 [(gogoproto.moretags) = "yaml:\"admin\""]; + // Contract is the address of the smart contract + string contract = 2 [(gogoproto.moretags) = "yaml:\"contract\""]; +} + +// MsgClearContractAdminResponse defines the Msg/ClearContractAdmin response type. +message MsgClearContractAdminResponse {} diff --git a/proto/terra/wasm/v1beta1/wasm.proto b/proto/terra/wasm/v1beta1/wasm.proto new file mode 100644 index 0000000..ee79a09 --- /dev/null +++ b/proto/terra/wasm/v1beta1/wasm.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; +package terra.wasm.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/classic-terra/core/x/wasm/types"; + +// Params defines the parameters for the wasm module. +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + uint64 max_contract_size = 1 [(gogoproto.moretags) = "yaml:\"max_contract_size\""]; + uint64 max_contract_gas = 2 [(gogoproto.moretags) = "yaml:\"max_contract_gas\""]; + uint64 max_contract_msg_size = 3 [(gogoproto.moretags) = "yaml:\"max_contract_msg_size\""]; +} + +// CodeInfo is data for the uploaded contract WASM code +message CodeInfo { + // CodeID is the sequentially increasing unique identifier + uint64 code_id = 1 [(gogoproto.moretags) = "yaml:\"code_id\"", (gogoproto.customname) = "CodeID"]; + // CodeHash is the unique identifier created by wasmvm + bytes code_hash = 2 [(gogoproto.moretags) = "yaml:\"code_hash\""]; + // Creator address who initially stored the code + string creator = 3 [(gogoproto.moretags) = "yaml:\"creator\""]; +} + +// ContractInfo stores a WASM contract instance +message ContractInfo { + option (gogoproto.equal) = true; + + // Address is the address of the contract + string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + // Creator is the contract creator address + string creator = 2 [(gogoproto.moretags) = "yaml:\"creator\""]; + // Admin is who can execute the contract migration + string admin = 3 [(gogoproto.moretags) = "yaml:\"admin\""]; + // CodeID is the reference to the stored Wasm code + uint64 code_id = 4 [(gogoproto.moretags) = "yaml:\"code_id\"", (gogoproto.customname) = "CodeID"]; + // InitMsg is the raw message used when instantiating a contract + bytes init_msg = 5 [(gogoproto.moretags) = "yaml:\"init_msg\"", (gogoproto.casttype) = "encoding/json.RawMessage"]; +} diff --git a/python/.gitignore b/python/.gitignore new file mode 100644 index 0000000..849ddff --- /dev/null +++ b/python/.gitignore @@ -0,0 +1 @@ +dist/ diff --git a/python/Makefile b/python/Makefile index 7989332..e46ce2d 100644 --- a/python/Makefile +++ b/python/Makefile @@ -1,16 +1,4 @@ -all: init proto-gen build - -init: - @echo "Pull External Protofiles" - git submodule init - git submodule update --remote - -#@echo "Install dependencies" -#npm i - -# do not format. we uses just auto-generated ones. -#format: -# npm run format +all: proto-gen build proto-gen: @echo "Generating Protobuf files" @@ -22,4 +10,4 @@ build: publish: poetry publish -.PHONY: all proto-gen format init build publish +.PHONY: all proto-gen format build publish diff --git a/python/dist/terra-proto-2.1.0.tar.gz b/python/dist/terra-proto-2.1.0.tar.gz deleted file mode 100644 index e66b346..0000000 Binary files a/python/dist/terra-proto-2.1.0.tar.gz and /dev/null differ diff --git a/python/dist/terra_proto-2.1.0-py3-none-any.whl b/python/dist/terra_proto-2.1.0-py3-none-any.whl deleted file mode 100644 index 80c0094..0000000 Binary files a/python/dist/terra_proto-2.1.0-py3-none-any.whl and /dev/null differ diff --git a/python/poetry.lock b/python/poetry.lock index cba6c88..f0de180 100644 --- a/python/poetry.lock +++ b/python/poetry.lock @@ -38,11 +38,11 @@ tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (> [[package]] name = "babel" -version = "2.10.2" +version = "2.9.1" description = "Internationalization utilities" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] pytz = ">=2015.7" @@ -86,11 +86,11 @@ d = ["aiohttp (>=3.3.2)", "aiohttp-cors"] [[package]] name = "certifi" -version = "2022.6.15" +version = "2021.10.8" description = "Python package for providing Mozilla's CA Bundle." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = "*" [[package]] name = "charset-normalizer" @@ -105,11 +105,11 @@ unicode_backport = ["unicodedata2"] [[package]] name = "click" -version = "8.1.3" +version = "8.0.3" description = "Composable command line interface toolkit" category = "dev" optional = false -python-versions = ">=3.7" +python-versions = ">=3.6" [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} @@ -214,7 +214,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "importlib-metadata" -version = "4.11.4" +version = "4.11.0" description = "Read metadata from Python packages" category = "dev" optional = false @@ -225,9 +225,9 @@ typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] perf = ["ipython"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] [[package]] name = "iniconfig" @@ -253,17 +253,17 @@ plugins = ["setuptools"] [[package]] name = "jinja2" -version = "3.1.2" +version = "2.11.3" description = "A very fast and expressive template engine." category = "dev" optional = false -python-versions = ">=3.7" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -MarkupSafe = ">=2.0" +MarkupSafe = ">=0.23" [package.extras] -i18n = ["Babel (>=2.7)"] +i18n = ["Babel (>=0.8)"] [[package]] name = "livereload" @@ -281,7 +281,7 @@ tornado = {version = "*", markers = "python_version > \"2.7\""} name = "markupsafe" version = "2.0.1" description = "Safely add untrusted strings to HTML/XML markup." -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -385,22 +385,22 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pygments" -version = "2.12.0" +version = "2.11.2" description = "Pygments is a syntax highlighting package written in Python." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.5" [[package]] name = "pyparsing" -version = "3.0.9" -description = "pyparsing module - Classes and methods to define and execute parsing grammars" +version = "3.0.7" +description = "Python parsing module" category = "dev" optional = false -python-versions = ">=3.6.8" +python-versions = ">=3.6" [package.extras] -diagrams = ["railroad-diagrams", "jinja2"] +diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pytest" @@ -456,7 +456,7 @@ dev = ["pre-commit", "tox", "pytest-asyncio"] [[package]] name = "pytest-runner" -version = "5.3.2" +version = "5.3.1" description = "Invoke py.test as distutils command with dependency resolution" category = "dev" optional = false @@ -492,7 +492,7 @@ six = ">=1.5" [[package]] name = "pytz" -version = "2022.1" +version = "2021.3" description = "World timezone definitions, modern and historical" category = "dev" optional = false @@ -500,28 +500,28 @@ python-versions = "*" [[package]] name = "regex" -version = "2022.6.2" +version = "2022.1.18" description = "Alternative regular expression module, to replace re." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = "*" [[package]] name = "requests" -version = "2.28.0" +version = "2.27.1" description = "Python HTTP for Humans." category = "dev" optional = false -python-versions = ">=3.7, <4" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [package.dependencies] certifi = ">=2017.4.17" -charset-normalizer = ">=2.0.0,<2.1.0" -idna = ">=2.5,<4" +charset-normalizer = {version = ">=2.0.0,<2.1.0", markers = "python_version >= \"3\""} +idna = {version = ">=2.5,<4", markers = "python_version >= \"3\""} urllib3 = ">=1.21.1,<1.27" [package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] +socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"] [[package]] @@ -721,22 +721,22 @@ python-versions = "*" [[package]] name = "typing-extensions" -version = "4.2.0" -description = "Backported and Experimental Type Hints for Python 3.7+" +version = "4.1.1" +description = "Backported and Experimental Type Hints for Python 3.6+" category = "dev" optional = false -python-versions = ">=3.7" +python-versions = ">=3.6" [[package]] name = "urllib3" -version = "1.26.9" +version = "1.26.8" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" [package.extras] -brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] +brotli = ["brotlipy (>=0.6.0)"] secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] @@ -761,20 +761,20 @@ watchmedo = ["PyYAML (>=3.10)", "argh (>=0.24.1)"] [[package]] name = "zipp" -version = "3.8.0" +version = "3.7.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "dev" optional = false python-versions = ">=3.7" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "31e987f6eba9b30285a74a0728e7b4a21e2374bfcc51896a3d72ca8f6f790c3c" +content-hash = "0d4ff15940a5467ddb73dcfe8fe283abafc2fde19663261ae9efc6e153679e07" [metadata.files] alabaster = [ @@ -794,8 +794,8 @@ attrs = [ {file = "attrs-20.3.0.tar.gz", hash = "sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700"}, ] babel = [ - {file = "Babel-2.10.2-py3-none-any.whl", hash = "sha256:81a3beca4d0cd40a9cfb9e2adb2cf39261c2f959b92e7a74750befe5d79afd7b"}, - {file = "Babel-2.10.2.tar.gz", hash = "sha256:7aed055f0c04c9e7f51a2f75261e41e1c804efa724cb65b60a970dd4448d469d"}, + {file = "Babel-2.9.1-py2.py3-none-any.whl", hash = "sha256:ab49e12b91d937cd11f0b67cb259a57ab4ad2b59ac7a3b41d6c06c0ac5b0def9"}, + {file = "Babel-2.9.1.tar.gz", hash = "sha256:bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0"}, ] betterproto = [ {file = "betterproto-2.0.0b4-py3-none-any.whl", hash = "sha256:6b807038df17a7896cc1f98b42f64eed24c2f350b6d10b2854501f8b9b7d3d1e"}, @@ -805,16 +805,16 @@ black = [ {file = "black-20.8b1.tar.gz", hash = "sha256:1c02557aa099101b9d21496f8a914e9ed2222ef70336404eeeac8edba836fbea"}, ] certifi = [ - {file = "certifi-2022.6.15-py3-none-any.whl", hash = "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"}, - {file = "certifi-2022.6.15.tar.gz", hash = "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"}, + {file = "certifi-2021.10.8-py2.py3-none-any.whl", hash = "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569"}, + {file = "certifi-2021.10.8.tar.gz", hash = "sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872"}, ] charset-normalizer = [ {file = "charset-normalizer-2.0.12.tar.gz", hash = "sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597"}, {file = "charset_normalizer-2.0.12-py3-none-any.whl", hash = "sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df"}, ] click = [ - {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, - {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, + {file = "click-8.0.3-py3-none-any.whl", hash = "sha256:353f466495adaeb40b6b5f592f9f91cb22372351c84caeb068132442a4518ef3"}, + {file = "click-8.0.3.tar.gz", hash = "sha256:410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b"}, ] colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, @@ -906,8 +906,8 @@ imagesize = [ {file = "imagesize-1.3.0.tar.gz", hash = "sha256:cd1750d452385ca327479d45b64d9c7729ecf0b3969a58148298c77092261f9d"}, ] importlib-metadata = [ - {file = "importlib_metadata-4.11.4-py3-none-any.whl", hash = "sha256:c58c8eb8a762858f49e18436ff552e83914778e50e9d2f1660535ffb364552ec"}, - {file = "importlib_metadata-4.11.4.tar.gz", hash = "sha256:5d26852efe48c0a32b0509ffbc583fda1a2266545a78d104a6f4aff3db17d700"}, + {file = "importlib_metadata-4.11.0-py3-none-any.whl", hash = "sha256:6affcdb3aec542dd98df8211e730bba6c5f2bec8288d47bacacde898f548c9ad"}, + {file = "importlib_metadata-4.11.0.tar.gz", hash = "sha256:9e5e553bbba1843cb4a00823014b907616be46ee503d2b9ba001d214a8da218f"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, @@ -918,8 +918,8 @@ isort = [ {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, ] jinja2 = [ - {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, - {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, + {file = "Jinja2-2.11.3-py2.py3-none-any.whl", hash = "sha256:03e47ad063331dd6a3f04a43eddca8a966a26ba0c5b7207a9a9e4e08f1b29419"}, + {file = "Jinja2-2.11.3.tar.gz", hash = "sha256:a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6"}, ] livereload = [ {file = "livereload-2.6.3.tar.gz", hash = "sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869"}, @@ -1113,12 +1113,12 @@ pyflakes = [ {file = "pyflakes-2.3.1.tar.gz", hash = "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db"}, ] pygments = [ - {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, - {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, + {file = "Pygments-2.11.2-py3-none-any.whl", hash = "sha256:44238f1b60a76d78fc8ca0528ee429702aae011c265fe6a8dd8b63049ae41c65"}, + {file = "Pygments-2.11.2.tar.gz", hash = "sha256:4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a"}, ] pyparsing = [ - {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, - {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, + {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, + {file = "pyparsing-3.0.7.tar.gz", hash = "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"}, ] pytest = [ {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, @@ -1133,8 +1133,8 @@ pytest-mock = [ {file = "pytest_mock-3.7.0-py3-none-any.whl", hash = "sha256:6cff27cec936bf81dc5ee87f07132b807bcda51106b5ec4b90a04331cba76231"}, ] pytest-runner = [ - {file = "pytest-runner-5.3.2.tar.gz", hash = "sha256:48934ec94301f6727d30615af1960539ff62063f6c9b71b7227174e51ba5fb34"}, - {file = "pytest_runner-5.3.2-py3-none-any.whl", hash = "sha256:c7d785ea6c612396c11ddbaf467764d2cc746ef96a713fbe1a296c221503b7c3"}, + {file = "pytest-runner-5.3.1.tar.gz", hash = "sha256:0fce5b8dc68760f353979d99fdd6b3ad46330b6b1837e2077a89ebcf204aac91"}, + {file = "pytest_runner-5.3.1-py3-none-any.whl", hash = "sha256:85f93af814438ee322b4ea08fe3f5c2ad53b253577f3bd84b2ad451fee450ac5"}, ] pytest-sugar = [ {file = "pytest-sugar-0.9.4.tar.gz", hash = "sha256:b1b2186b0a72aada6859bea2a5764145e3aaa2c1cfbb23c3a19b5f7b697563d3"}, @@ -1144,88 +1144,88 @@ python-dateutil = [ {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, ] pytz = [ - {file = "pytz-2022.1-py2.py3-none-any.whl", hash = "sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c"}, - {file = "pytz-2022.1.tar.gz", hash = "sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7"}, + {file = "pytz-2021.3-py2.py3-none-any.whl", hash = "sha256:3672058bc3453457b622aab7a1c3bfd5ab0bdae451512f6cf25f64ed37f5b87c"}, + {file = "pytz-2021.3.tar.gz", hash = "sha256:acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326"}, ] regex = [ - {file = "regex-2022.6.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:042d122f9fee3ceb6d7e3067d56557df697d1aad4ff5f64ecce4dc13a90a7c01"}, - {file = "regex-2022.6.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ffef4b30785dc2d1604dfb7cf9fca5dc27cd86d65f7c2a9ec34d6d3ae4565ec2"}, - {file = "regex-2022.6.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0afa6a601acf3c0dc6de4e8d7d8bbce4e82f8542df746226cd35d4a6c15e9456"}, - {file = "regex-2022.6.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4a11cbe8eb5fb332ae474895b5ead99392a4ea568bd2a258ab8df883e9c2bf92"}, - {file = "regex-2022.6.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c1f62ee2ba880e221bc950651a1a4b0176083d70a066c83a50ef0cb9b178e12"}, - {file = "regex-2022.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5aba3d13c77173e9bfed2c2cea7fc319f11c89a36fcec08755e8fb169cf3b0df"}, - {file = "regex-2022.6.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:249437f7f5b233792234aeeecb14b0aab1566280de42dfc97c26e6f718297d68"}, - {file = "regex-2022.6.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:179410c79fa86ef318d58ace233f95b87b05a1db6dc493fa29404a43f4b215e2"}, - {file = "regex-2022.6.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:5e201b1232d81ca1a7a22ab2f08e1eccad4e111579fd7f3bbf60b21ef4a16cea"}, - {file = "regex-2022.6.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fdecb225d0f1d50d4b26ac423e0032e76d46a788b83b4e299a520717a47d968c"}, - {file = "regex-2022.6.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:be57f9c7b0b423c66c266a26ad143b2c5514997c05dd32ce7ca95c8b209c2288"}, - {file = "regex-2022.6.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ed657a07d8a47ef447224ea00478f1c7095065dfe70a89e7280e5f50a5725131"}, - {file = "regex-2022.6.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:24908aefed23dd065b4a668c0b4ca04d56b7f09d8c8e89636cf6c24e64e67a1e"}, - {file = "regex-2022.6.2-cp310-cp310-win32.whl", hash = "sha256:775694cd0bb2c4accf2f1cdd007381b33ec8b59842736fe61bdbad45f2ac7427"}, - {file = "regex-2022.6.2-cp310-cp310-win_amd64.whl", hash = "sha256:809bbbbbcf8258049b031d80932ba71627d2274029386f0452e9950bcfa2c6e8"}, - {file = "regex-2022.6.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:ecd2b5d983eb0adf2049d41f95205bdc3de4e6cc2350e9c80d4409d3a75229de"}, - {file = "regex-2022.6.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f4c101746a8dac0401abefa716b357c546e61ea2e3d4a564a9db9eac57ccbce"}, - {file = "regex-2022.6.2-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:166ae7674d0a0e0f8044e7335ba86d0716c9d49465cff1b153f908e0470b8300"}, - {file = "regex-2022.6.2-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c5eac5d8a8ac9ccf00805d02a968a36f5c967db6c7d2b747ab9ed782b3b3a28b"}, - {file = "regex-2022.6.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f57823f35b18d82b201c1b27ce4e55f88e79e81d9ca07b50ce625d33823e1439"}, - {file = "regex-2022.6.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4d42e3b7b23473729adbf76103e7df75f9167a5a80b1257ca30688352b4bb2dc"}, - {file = "regex-2022.6.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:b2932e728bee0a634fe55ee54d598054a5a9ffe4cd2be21ba2b4b8e5f8064c2c"}, - {file = "regex-2022.6.2-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:17764683ea01c2b8f103d99ae9de2473a74340df13ce306c49a721f0b1f0eb9e"}, - {file = "regex-2022.6.2-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:2ac29b834100d2c171085ceba0d4a1e7046c434ddffc1434dbc7f9d59af1e945"}, - {file = "regex-2022.6.2-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:f43522fb5d676c99282ca4e2d41e8e2388427c0cf703db6b4a66e49b10b699a8"}, - {file = "regex-2022.6.2-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:9faa01818dad9111dbf2af26c6e3c45140ccbd1192c3a0981f196255bf7ec5e6"}, - {file = "regex-2022.6.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:17443f99b8f255273731f915fdbfea4d78d809bb9c3aaf67b889039825d06515"}, - {file = "regex-2022.6.2-cp36-cp36m-win32.whl", hash = "sha256:4a5449adef907919d4ce7a1eab2e27d0211d1b255bf0b8f5dd330ad8707e0fc3"}, - {file = "regex-2022.6.2-cp36-cp36m-win_amd64.whl", hash = "sha256:4d206703a96a39763b5b45cf42645776f5553768ea7f3c2c1a39a4f59cafd4ba"}, - {file = "regex-2022.6.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:fcd7c432202bcb8b642c3f43d5bcafc5930d82fe5b2bf2c008162df258445c1d"}, - {file = "regex-2022.6.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:186c5a4a4c40621f64d771038ede20fca6c61a9faa8178f9e305aaa0c2442a97"}, - {file = "regex-2022.6.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:047b2d1323a51190c01b6604f49fe09682a5c85d3c1b2c8b67c1cd68419ce3c4"}, - {file = "regex-2022.6.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:30637e7fa4acfed444525b1ab9683f714be617862820578c9fd4e944d4d9ad1f"}, - {file = "regex-2022.6.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3adafe6f2c6d86dbf3313866b61180530ca4dcd0c264932dc8fa1ffb10871d58"}, - {file = "regex-2022.6.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:67ae3601edf86e15ebe40885e5bfdd6002d34879070be15cf18fc0d80ea24fed"}, - {file = "regex-2022.6.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:48dddddce0ea7e7c3e92c1e0c5a28c13ca4dc9cf7e996c706d00479652bff76c"}, - {file = "regex-2022.6.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:68e5c641645351eb9eb12c465876e76b53717f99e9b92aea7a2dd645a87aa7aa"}, - {file = "regex-2022.6.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:8fd5f8ae42f789538bb634bdfd69b9aa357e76fdfd7ad720f32f8994c0d84f1e"}, - {file = "regex-2022.6.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:71988a76fcb68cc091e901fddbcac0f9ad9a475da222c47d3cf8db0876cb5344"}, - {file = "regex-2022.6.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:4b8838f70be3ce9e706df9d72f88a0aa7d4c1fea61488e06fdf292ccb70ad2be"}, - {file = "regex-2022.6.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:663dca677bd3d2e2b5b7d0329e9f24247e6f38f3b740dd9a778a8ef41a76af41"}, - {file = "regex-2022.6.2-cp37-cp37m-win32.whl", hash = "sha256:24963f0b13cc63db336d8da2a533986419890d128c551baacd934c249d51a779"}, - {file = "regex-2022.6.2-cp37-cp37m-win_amd64.whl", hash = "sha256:ceff75127f828dfe7ceb17b94113ec2df4df274c4cd5533bb299cb099a18a8ca"}, - {file = "regex-2022.6.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1a6f2698cfa8340dfe4c0597782776b393ba2274fe4c079900c7c74f68752705"}, - {file = "regex-2022.6.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a8a08ace913c4101f0dc0be605c108a3761842efd5f41a3005565ee5d169fb2b"}, - {file = "regex-2022.6.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26dbe90b724efef7820c3cf4a0e5be7f130149f3d2762782e4e8ac2aea284a0b"}, - {file = "regex-2022.6.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b5f759a1726b995dc896e86f17f9c0582b54eb4ead00ed5ef0b5b22260eaf2d0"}, - {file = "regex-2022.6.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1fc26bb3415e7aa7495c000a2c13bf08ce037775db98c1a3fac9ff04478b6930"}, - {file = "regex-2022.6.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:52684da32d9003367dc1a1c07e059b9bbaf135ad0764cd47d8ac3dba2df109bc"}, - {file = "regex-2022.6.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c1264eb40a71cf2bff43d6694ab7254438ca19ef330175060262b3c8dd3931a"}, - {file = "regex-2022.6.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:bc635ab319c9b515236bdf327530acda99be995f9d3b9f148ab1f60b2431e970"}, - {file = "regex-2022.6.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:27624b490b5d8880f25dac67e1e2ea93dfef5300b98c6755f585799230d6c746"}, - {file = "regex-2022.6.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:555f7596fd1f123f8c3a67974c01d6ef80b9769e04d660d6c1a7cc3e6cff7069"}, - {file = "regex-2022.6.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:933e72fbe1829cbd59da2bc51ccd73d73162f087f88521a87a8ec9cb0cf10fa8"}, - {file = "regex-2022.6.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:cff5c87e941292c97d11dc81bd20679f56a2830f0f0e32f75b8ed6e0eb40f704"}, - {file = "regex-2022.6.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c757f3a27b6345de13ef3ca956aa805d7734ce68023e84d0fc74e1f09ce66f7a"}, - {file = "regex-2022.6.2-cp38-cp38-win32.whl", hash = "sha256:a58d21dd1a2d6b50ed091554ff85e448fce3fe33a4db8b55d0eba2ca957ed626"}, - {file = "regex-2022.6.2-cp38-cp38-win_amd64.whl", hash = "sha256:495a4165172848503303ed05c9d0409428f789acc27050fe2cf0a4549188a7d5"}, - {file = "regex-2022.6.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1ab5cf7d09515548044e69d3a0ec77c63d7b9dfff4afc19653f638b992573126"}, - {file = "regex-2022.6.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c1ea28f0ee6cbe4c0367c939b015d915aa9875f6e061ba1cf0796ca9a3010570"}, - {file = "regex-2022.6.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3de1ecf26ce85521bf73897828b6d0687cc6cf271fb6ff32ac63d26b21f5e764"}, - {file = "regex-2022.6.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fa7c7044aabdad2329974be2246babcc21d3ede852b3971a90fd8c2056c20360"}, - {file = "regex-2022.6.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:53d69d77e9cfe468b000314dd656be85bb9e96de088a64f75fe128dfe1bf30dd"}, - {file = "regex-2022.6.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c8d61883a38b1289fba9944a19a361875b5c0170b83cdcc95ea180247c1b7d3"}, - {file = "regex-2022.6.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c5429202bef174a3760690d912e3a80060b323199a61cef6c6c29b30ce09fd17"}, - {file = "regex-2022.6.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e85b10280cf1e334a7c95629f6cbbfe30b815a4ea5f1e28d31f79eb92c2c3d93"}, - {file = "regex-2022.6.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c400dfed4137f32127ea4063447006d7153c974c680bf0fb1b724cce9f8567fc"}, - {file = "regex-2022.6.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7f648037c503985aed39f85088acab6f1eb6a0482d7c6c665a5712c9ad9eaefc"}, - {file = "regex-2022.6.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:e7b2ff451f6c305b516281ec45425dd423223c8063218c5310d6f72a0a7a517c"}, - {file = "regex-2022.6.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:be456b4313a86be41706319c397c09d9fdd2e5cdfde208292a277b867e99e3d1"}, - {file = "regex-2022.6.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c3db393b21b53d7e1d3f881b64c29d886cbfdd3df007e31de68b329edbab7d02"}, - {file = "regex-2022.6.2-cp39-cp39-win32.whl", hash = "sha256:d70596f20a03cb5f935d6e4aad9170a490d88fc4633679bf00c652e9def4619e"}, - {file = "regex-2022.6.2-cp39-cp39-win_amd64.whl", hash = "sha256:3b9b6289e03dbe6a6096880d8ac166cb23c38b4896ad235edee789d4e8697152"}, - {file = "regex-2022.6.2.tar.gz", hash = "sha256:f7b43acb2c46fb2cd506965b2d9cf4c5e64c9c612bac26c1187933c7296bf08c"}, + {file = "regex-2022.1.18-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:34316bf693b1d2d29c087ee7e4bb10cdfa39da5f9c50fa15b07489b4ab93a1b5"}, + {file = "regex-2022.1.18-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7a0b9f6a1a15d494b35f25ed07abda03209fa76c33564c09c9e81d34f4b919d7"}, + {file = "regex-2022.1.18-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f99112aed4fb7cee00c7f77e8b964a9b10f69488cdff626ffd797d02e2e4484f"}, + {file = "regex-2022.1.18-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a2bf98ac92f58777c0fafc772bf0493e67fcf677302e0c0a630ee517a43b949"}, + {file = "regex-2022.1.18-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8618d9213a863c468a865e9d2ec50221015f7abf52221bc927152ef26c484b4c"}, + {file = "regex-2022.1.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b52cc45e71657bc4743a5606d9023459de929b2a198d545868e11898ba1c3f59"}, + {file = "regex-2022.1.18-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e12949e5071c20ec49ef00c75121ed2b076972132fc1913ddf5f76cae8d10b4"}, + {file = "regex-2022.1.18-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:b02e3e72665cd02afafb933453b0c9f6c59ff6e3708bd28d0d8580450e7e88af"}, + {file = "regex-2022.1.18-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:abfcb0ef78df0ee9df4ea81f03beea41849340ce33a4c4bd4dbb99e23ec781b6"}, + {file = "regex-2022.1.18-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6213713ac743b190ecbf3f316d6e41d099e774812d470422b3a0f137ea635832"}, + {file = "regex-2022.1.18-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:61ebbcd208d78658b09e19c78920f1ad38936a0aa0f9c459c46c197d11c580a0"}, + {file = "regex-2022.1.18-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:b013f759cd69cb0a62de954d6d2096d648bc210034b79b1881406b07ed0a83f9"}, + {file = "regex-2022.1.18-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:9187500d83fd0cef4669385cbb0961e227a41c0c9bc39219044e35810793edf7"}, + {file = "regex-2022.1.18-cp310-cp310-win32.whl", hash = "sha256:94c623c331a48a5ccc7d25271399aff29729fa202c737ae3b4b28b89d2b0976d"}, + {file = "regex-2022.1.18-cp310-cp310-win_amd64.whl", hash = "sha256:1a171eaac36a08964d023eeff740b18a415f79aeb212169080c170ec42dd5184"}, + {file = "regex-2022.1.18-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:49810f907dfe6de8da5da7d2b238d343e6add62f01a15d03e2195afc180059ed"}, + {file = "regex-2022.1.18-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d2f5c3f7057530afd7b739ed42eb04f1011203bc5e4663e1e1d01bb50f813e3"}, + {file = "regex-2022.1.18-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:85ffd6b1cb0dfb037ede50ff3bef80d9bf7fa60515d192403af6745524524f3b"}, + {file = "regex-2022.1.18-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ba37f11e1d020969e8a779c06b4af866ffb6b854d7229db63c5fdddfceaa917f"}, + {file = "regex-2022.1.18-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:637e27ea1ebe4a561db75a880ac659ff439dec7f55588212e71700bb1ddd5af9"}, + {file = "regex-2022.1.18-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:37978254d9d00cda01acc1997513f786b6b971e57b778fbe7c20e30ae81a97f3"}, + {file = "regex-2022.1.18-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e54a1eb9fd38f2779e973d2f8958fd575b532fe26013405d1afb9ee2374e7ab8"}, + {file = "regex-2022.1.18-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:768632fd8172ae03852e3245f11c8a425d95f65ff444ce46b3e673ae5b057b74"}, + {file = "regex-2022.1.18-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:de2923886b5d3214be951bc2ce3f6b8ac0d6dfd4a0d0e2a4d2e5523d8046fdfb"}, + {file = "regex-2022.1.18-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:1333b3ce73269f986b1fa4d5d395643810074dc2de5b9d262eb258daf37dc98f"}, + {file = "regex-2022.1.18-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:d19a34f8a3429bd536996ad53597b805c10352a8561d8382e05830df389d2b43"}, + {file = "regex-2022.1.18-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:8d2f355a951f60f0843f2368b39970e4667517e54e86b1508e76f92b44811a8a"}, + {file = "regex-2022.1.18-cp36-cp36m-win32.whl", hash = "sha256:2245441445099411b528379dee83e56eadf449db924648e5feb9b747473f42e3"}, + {file = "regex-2022.1.18-cp36-cp36m-win_amd64.whl", hash = "sha256:25716aa70a0d153cd844fe861d4f3315a6ccafce22b39d8aadbf7fcadff2b633"}, + {file = "regex-2022.1.18-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7e070d3aef50ac3856f2ef5ec7214798453da878bb5e5a16c16a61edf1817cc3"}, + {file = "regex-2022.1.18-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22709d701e7037e64dae2a04855021b62efd64a66c3ceed99dfd684bfef09e38"}, + {file = "regex-2022.1.18-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c9099bf89078675c372339011ccfc9ec310310bf6c292b413c013eb90ffdcafc"}, + {file = "regex-2022.1.18-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:04611cc0f627fc4a50bc4a9a2e6178a974c6a6a4aa9c1cca921635d2c47b9c87"}, + {file = "regex-2022.1.18-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:552a39987ac6655dad4bf6f17dd2b55c7b0c6e949d933b8846d2e312ee80005a"}, + {file = "regex-2022.1.18-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e031899cb2bc92c0cf4d45389eff5b078d1936860a1be3aa8c94fa25fb46ed8"}, + {file = "regex-2022.1.18-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2dacb3dae6b8cc579637a7b72f008bff50a94cde5e36e432352f4ca57b9e54c4"}, + {file = "regex-2022.1.18-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:e5c31d70a478b0ca22a9d2d76d520ae996214019d39ed7dd93af872c7f301e52"}, + {file = "regex-2022.1.18-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bb804c7d0bfbd7e3f33924ff49757de9106c44e27979e2492819c16972ec0da2"}, + {file = "regex-2022.1.18-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:36b2d700a27e168fa96272b42d28c7ac3ff72030c67b32f37c05616ebd22a202"}, + {file = "regex-2022.1.18-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:16f81025bb3556eccb0681d7946e2b35ff254f9f888cff7d2120e8826330315c"}, + {file = "regex-2022.1.18-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:da80047524eac2acf7c04c18ac7a7da05a9136241f642dd2ed94269ef0d0a45a"}, + {file = "regex-2022.1.18-cp37-cp37m-win32.whl", hash = "sha256:6ca45359d7a21644793de0e29de497ef7f1ae7268e346c4faf87b421fea364e6"}, + {file = "regex-2022.1.18-cp37-cp37m-win_amd64.whl", hash = "sha256:38289f1690a7e27aacd049e420769b996826f3728756859420eeee21cc857118"}, + {file = "regex-2022.1.18-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6014038f52b4b2ac1fa41a58d439a8a00f015b5c0735a0cd4b09afe344c94899"}, + {file = "regex-2022.1.18-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0b5d6f9aed3153487252d00a18e53f19b7f52a1651bc1d0c4b5844bc286dfa52"}, + {file = "regex-2022.1.18-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a9d24b03daf7415f78abc2d25a208f234e2c585e5e6f92f0204d2ab7b9ab48e3"}, + {file = "regex-2022.1.18-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bf594cc7cc9d528338d66674c10a5b25e3cde7dd75c3e96784df8f371d77a298"}, + {file = "regex-2022.1.18-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fd914db437ec25bfa410f8aa0aa2f3ba87cdfc04d9919d608d02330947afaeab"}, + {file = "regex-2022.1.18-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90b6840b6448203228a9d8464a7a0d99aa8fa9f027ef95fe230579abaf8a6ee1"}, + {file = "regex-2022.1.18-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:11772be1eb1748e0e197a40ffb82fb8fd0d6914cd147d841d9703e2bef24d288"}, + {file = "regex-2022.1.18-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a602bdc8607c99eb5b391592d58c92618dcd1537fdd87df1813f03fed49957a6"}, + {file = "regex-2022.1.18-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:7e26eac9e52e8ce86f915fd33380f1b6896a2b51994e40bb094841e5003429b4"}, + {file = "regex-2022.1.18-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:519c0b3a6fbb68afaa0febf0d28f6c4b0a1074aefc484802ecb9709faf181607"}, + {file = "regex-2022.1.18-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:3c7ea86b9ca83e30fa4d4cd0eaf01db3ebcc7b2726a25990966627e39577d729"}, + {file = "regex-2022.1.18-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:51f02ca184518702975b56affde6c573ebad4e411599005ce4468b1014b4786c"}, + {file = "regex-2022.1.18-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:385ccf6d011b97768a640e9d4de25412204fbe8d6b9ae39ff115d4ff03f6fe5d"}, + {file = "regex-2022.1.18-cp38-cp38-win32.whl", hash = "sha256:1f8c0ae0a0de4e19fddaaff036f508db175f6f03db318c80bbc239a1def62d02"}, + {file = "regex-2022.1.18-cp38-cp38-win_amd64.whl", hash = "sha256:760c54ad1b8a9b81951030a7e8e7c3ec0964c1cb9fee585a03ff53d9e531bb8e"}, + {file = "regex-2022.1.18-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:93c20777a72cae8620203ac11c4010365706062aa13aaedd1a21bb07adbb9d5d"}, + {file = "regex-2022.1.18-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6aa427c55a0abec450bca10b64446331b5ca8f79b648531138f357569705bc4a"}, + {file = "regex-2022.1.18-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c38baee6bdb7fe1b110b6b3aaa555e6e872d322206b7245aa39572d3fc991ee4"}, + {file = "regex-2022.1.18-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:752e7ddfb743344d447367baa85bccd3629c2c3940f70506eb5f01abce98ee68"}, + {file = "regex-2022.1.18-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8acef4d8a4353f6678fd1035422a937c2170de58a2b29f7da045d5249e934101"}, + {file = "regex-2022.1.18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c73d2166e4b210b73d1429c4f1ca97cea9cc090e5302df2a7a0a96ce55373f1c"}, + {file = "regex-2022.1.18-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:24c89346734a4e4d60ecf9b27cac4c1fee3431a413f7aa00be7c4d7bbacc2c4d"}, + {file = "regex-2022.1.18-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:596f5ae2eeddb79b595583c2e0285312b2783b0ec759930c272dbf02f851ff75"}, + {file = "regex-2022.1.18-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ecfe51abf7f045e0b9cdde71ca9e153d11238679ef7b5da6c82093874adf3338"}, + {file = "regex-2022.1.18-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1d6301f5288e9bdca65fab3de6b7de17362c5016d6bf8ee4ba4cbe833b2eda0f"}, + {file = "regex-2022.1.18-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:93cce7d422a0093cfb3606beae38a8e47a25232eea0f292c878af580a9dc7605"}, + {file = "regex-2022.1.18-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:cf0db26a1f76aa6b3aa314a74b8facd586b7a5457d05b64f8082a62c9c49582a"}, + {file = "regex-2022.1.18-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:defa0652696ff0ba48c8aff5a1fac1eef1ca6ac9c660b047fc8e7623c4eb5093"}, + {file = "regex-2022.1.18-cp39-cp39-win32.whl", hash = "sha256:6db1b52c6f2c04fafc8da17ea506608e6be7086715dab498570c3e55e4f8fbd1"}, + {file = "regex-2022.1.18-cp39-cp39-win_amd64.whl", hash = "sha256:ebaeb93f90c0903233b11ce913a7cb8f6ee069158406e056f884854c737d2442"}, + {file = "regex-2022.1.18.tar.gz", hash = "sha256:97f32dc03a8054a4c4a5ab5d761ed4861e828b2c200febd4e46857069a483916"}, ] requests = [ - {file = "requests-2.28.0-py3-none-any.whl", hash = "sha256:bc7861137fbce630f17b03d3ad02ad0bf978c844f3536d0edda6499dafce2b6f"}, - {file = "requests-2.28.0.tar.gz", hash = "sha256:d568723a7ebd25875d8d1eaf5dfa068cd2fc8194b2e483d7b1f7c81918dbec6b"}, + {file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"}, + {file = "requests-2.27.1.tar.gz", hash = "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61"}, ] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, @@ -1358,12 +1358,12 @@ typed-ast = [ {file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"}, ] typing-extensions = [ - {file = "typing_extensions-4.2.0-py3-none-any.whl", hash = "sha256:6657594ee297170d19f67d55c05852a874e7eb634f4f753dbd667855e07c1708"}, - {file = "typing_extensions-4.2.0.tar.gz", hash = "sha256:f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376"}, + {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, + {file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"}, ] urllib3 = [ - {file = "urllib3-1.26.9-py2.py3-none-any.whl", hash = "sha256:44ece4d53fb1706f667c9bd1c648f5469a2ec925fcf3a776667042d645472c14"}, - {file = "urllib3-1.26.9.tar.gz", hash = "sha256:aabaf16477806a5e1dd19aa41f8c2b7950dd3c746362d7e3223dbe6de6ac448e"}, + {file = "urllib3-1.26.8-py2.py3-none-any.whl", hash = "sha256:000ca7f471a233c2251c6c7023ee85305721bfdf18621ebff4fd17a8653427ed"}, + {file = "urllib3-1.26.8.tar.gz", hash = "sha256:0e7c33d9a63e7ddfcb86780aac87befc2fbddf46c58dbb487e0855f7ceec283c"}, ] uvloop = [ {file = "uvloop-0.14.0-cp35-cp35m-macosx_10_11_x86_64.whl", hash = "sha256:08b109f0213af392150e2fe6f81d33261bb5ce968a288eb698aad4f46eb711bd"}, @@ -1396,6 +1396,6 @@ watchdog = [ {file = "watchdog-1.0.2.tar.gz", hash = "sha256:376cbc2a35c0392b0fe7ff16fbc1b303fd99d4dd9911ab5581ee9d69adc88982"}, ] zipp = [ - {file = "zipp-3.8.0-py3-none-any.whl", hash = "sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099"}, - {file = "zipp-3.8.0.tar.gz", hash = "sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad"}, + {file = "zipp-3.7.0-py3-none-any.whl", hash = "sha256:b47250dd24f92b7dd6a0a8fc5244da14608f3ca90a5efcd37a3b1642fac9a375"}, + {file = "zipp-3.7.0.tar.gz", hash = "sha256:9f50f446828eb9d45b267433fd3e9da8d801f614129124863f9c51ebceafb87d"}, ] diff --git a/python/pyproject.toml b/python/pyproject.toml index c56570b..0091528 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -9,21 +9,19 @@ classifiers = [ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", ] description = "The Python Protobuf implementation for Terra" -homepage = "https://github.com/classic-terra/terra.proto" -keywords = ["jigu", "blockchain", "terra", "defi", "crypto"] +homepage = "https://github.com/terra-money/terra.proto" +keywords = ["blockchain", "terra", "defi", "crypto"] license = "MIT" packages = [{ include = "terra_proto" }] readme = "README.md" -repository = "https://github.com/classic-terra/terra.proto" -version = "2.1.0" +repository = "https://github.com/terra-money/terra.proto" +version = "1.1.0" [tool.poetry.dependencies] python = "^3.7" betterproto = "2.0.0b4" -MarkupSafe = "2.0.1" [tool.poetry.dev-dependencies] black = "^20.8b1" diff --git a/python/scripts/prepare.sh b/python/scripts/prepare.sh index a32308b..d7b4f9c 100755 --- a/python/scripts/prepare.sh +++ b/python/scripts/prepare.sh @@ -2,7 +2,7 @@ set -o errexit -o nounset -o pipefail command -v shellcheck >/dev/null && shellcheck "$0" -DIRS="confio cosmos cosmos_proto cosmwasm gogoproto google ibc tendermint" +DIRS="confio cosmos cosmos_proto gogoproto google ibc tendermint terra" for dir in $DIRS; do rm -rf "$dir" diff --git a/python/scripts/proto-gen.sh b/python/scripts/proto-gen.sh index 6cdcd20..e800d41 100755 --- a/python/scripts/proto-gen.sh +++ b/python/scripts/proto-gen.sh @@ -4,22 +4,17 @@ command -v shellcheck >/dev/null && shellcheck "$0" echo "install betterproto... pre-release for now. stable one has some issues" #pip install --upgrade "avast.betterproto[compiler]" -pip install --upgrade "betterproto[compiler]" --pre -echo "install MarkupSafe==2.0.1 due to dependency" -pip install MarkupSafe==2.0.1 +pip3 install --upgrade "betterproto[compiler]" --pre OUT_DIR="./terra_proto" mkdir -p "$OUT_DIR" -echo "Processing terrad proto files ..." - -TERRAD_DIR="../terrad/proto" -TERRAD_THIRD_PARTY_DIR="../terrad/third_party/proto" +echo "Processing proto files ..." +PROTO_DIR="../proto" protoc \ - --proto_path=${TERRAD_DIR} \ - --proto_path=${TERRAD_THIRD_PARTY_DIR} \ + --proto_path=${PROTO_DIR} \ --python_betterproto_out="${OUT_DIR}" \ - $(find ${TERRAD_DIR} ${TERRAD_THIRD_PARTY_DIR} -path -prune -o -name '*.proto' -print0 | xargs -0) + $(find ${PROTO_DIR} -path -prune -o -name '*.proto' -print0 | xargs -0) diff --git a/python/terra_proto/cosmos/auth/v1beta1/__init__.py b/python/terra_proto/cosmos/auth/v1beta1/__init__.py index 76d706b..840fe43 100644 --- a/python/terra_proto/cosmos/auth/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/auth/v1beta1/__init__.py @@ -2,11 +2,25 @@ # sources: cosmos/auth/v1beta1/auth.proto, cosmos/auth/v1beta1/genesis.proto, cosmos/auth/v1beta1/query.proto # plugin: python-betterproto from dataclasses import dataclass -from typing import Dict, List +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase +import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ...base.query import v1beta1 as __base_query_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) @@ -52,8 +66,8 @@ class QueryAccountsRequest(betterproto.Message): Since: cosmos-sdk 0.43 """ - # pagination defines an optional pagination for the request. pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(1) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -63,10 +77,11 @@ class QueryAccountsResponse(betterproto.Message): method. Since: cosmos-sdk 0.43 """ - # accounts are the existing accounts accounts: List["betterproto_lib_google_protobuf.Any"] = betterproto.message_field(1) - # pagination defines the pagination in the response. + """accounts are the existing accounts""" + pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) @@ -75,8 +90,8 @@ class QueryAccountRequest(betterproto.Message): QueryAccountRequest is the request type for the Query/Account RPC method. """ - # address defines the address to query for. address: str = betterproto.string_field(1) + """address defines the address to query for.""" @dataclass(eq=False, repr=False) @@ -85,8 +100,8 @@ class QueryAccountResponse(betterproto.Message): QueryAccountResponse is the response type for the Query/Account RPC method. """ - # account defines the account of the corresponding address. account: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(1) + """account defines the account of the corresponding address.""" @dataclass(eq=False, repr=False) @@ -104,89 +119,110 @@ class QueryParamsResponse(betterproto.Message): QueryParamsResponse is the response type for the Query/Params RPC method. """ - # params defines the parameters of the module. params: "Params" = betterproto.message_field(1) + """params defines the parameters of the module.""" @dataclass(eq=False, repr=False) class GenesisState(betterproto.Message): """GenesisState defines the auth module's genesis state.""" - # params defines all the paramaters of the module. params: "Params" = betterproto.message_field(1) - # accounts are the accounts present at genesis. + """params defines all the paramaters of the module.""" + accounts: List["betterproto_lib_google_protobuf.Any"] = betterproto.message_field(2) + """accounts are the accounts present at genesis.""" class QueryStub(betterproto.ServiceStub): async def accounts( - self, *, pagination: "__base_query_v1_beta1__.PageRequest" = None + self, + query_accounts_request: "QueryAccountsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryAccountsResponse": - - request = QueryAccountsRequest() - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( - "/cosmos.auth.v1beta1.Query/Accounts", request, QueryAccountsResponse + "/cosmos.auth.v1beta1.Query/Accounts", + query_accounts_request, + QueryAccountsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def account(self, *, address: str = "") -> "QueryAccountResponse": - - request = QueryAccountRequest() - request.address = address - + async def account( + self, + query_account_request: "QueryAccountRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryAccountResponse": return await self._unary_unary( - "/cosmos.auth.v1beta1.Query/Account", request, QueryAccountResponse + "/cosmos.auth.v1beta1.Query/Account", + query_account_request, + QueryAccountResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def params(self) -> "QueryParamsResponse": - - request = QueryParamsRequest() - + async def params( + self, + query_params_request: "QueryParamsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryParamsResponse": return await self._unary_unary( - "/cosmos.auth.v1beta1.Query/Params", request, QueryParamsResponse + "/cosmos.auth.v1beta1.Query/Params", + query_params_request, + QueryParamsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class QueryBase(ServiceBase): async def accounts( - self, pagination: "__base_query_v1_beta1__.PageRequest" + self, query_accounts_request: "QueryAccountsRequest" ) -> "QueryAccountsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def account(self, address: str) -> "QueryAccountResponse": + async def account( + self, query_account_request: "QueryAccountRequest" + ) -> "QueryAccountResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def params(self) -> "QueryParamsResponse": + async def params( + self, query_params_request: "QueryParamsRequest" + ) -> "QueryParamsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_accounts(self, stream: grpclib.server.Stream) -> None: + async def __rpc_accounts( + self, + stream: "grpclib.server.Stream[QueryAccountsRequest, QueryAccountsResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "pagination": request.pagination, - } - - response = await self.accounts(**request_kwargs) + response = await self.accounts(request) await stream.send_message(response) - async def __rpc_account(self, stream: grpclib.server.Stream) -> None: + async def __rpc_account( + self, stream: "grpclib.server.Stream[QueryAccountRequest, QueryAccountResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "address": request.address, - } - - response = await self.account(**request_kwargs) + response = await self.account(request) await stream.send_message(response) - async def __rpc_params(self, stream: grpclib.server.Stream) -> None: + async def __rpc_params( + self, stream: "grpclib.server.Stream[QueryParamsRequest, QueryParamsResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.params(**request_kwargs) + response = await self.params(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -210,7 +246,3 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: QueryParamsResponse, ), } - - -from ...base.query import v1beta1 as __base_query_v1_beta1__ -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf diff --git a/python/terra_proto/cosmos/authz/v1beta1/__init__.py b/python/terra_proto/cosmos/authz/v1beta1/__init__.py index e2ec172..4bd4ec3 100644 --- a/python/terra_proto/cosmos/authz/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/authz/v1beta1/__init__.py @@ -3,11 +3,25 @@ # plugin: python-betterproto from dataclasses import dataclass from datetime import datetime -from typing import Dict, List, Optional +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase +import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ...base.query import v1beta1 as __base_query_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) @@ -17,9 +31,11 @@ class GenericAuthorization(betterproto.Message): the provided method on behalf of the granter's account. """ - # Msg, identified by it's type URL, to grant unrestricted permissions to - # execute msg: str = betterproto.string_field(1) + """ + Msg, identified by it's type URL, to grant unrestricted permissions to + execute + """ @dataclass(eq=False, repr=False) @@ -32,20 +48,6 @@ class Grant(betterproto.Message): expiration: datetime = betterproto.message_field(2) -@dataclass(eq=False, repr=False) -class GrantAuthorization(betterproto.Message): - """ - GrantAuthorization extends a grant with both the addresses of the grantee - and granter. It is used in genesis.proto and query.proto Since: cosmos-sdk - 0.45.2 - """ - - granter: str = betterproto.string_field(1) - grantee: str = betterproto.string_field(2) - authorization: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(3) - expiration: datetime = betterproto.message_field(4) - - @dataclass(eq=False, repr=False) class MsgGrant(betterproto.Message): """ @@ -74,10 +76,12 @@ class MsgExec(betterproto.Message): """ grantee: str = betterproto.string_field(1) - # Authorization Msg requests to execute. Each msg must implement - # Authorization interface The x/authz will try to find a grant matching - # (msg.signers[0], grantee, MsgTypeURL(msg)) triple and validate it. msgs: List["betterproto_lib_google_protobuf.Any"] = betterproto.message_field(2) + """ + Authorization Msg requests to execute. Each msg must implement + Authorization interface The x/authz will try to find a grant matching + (msg.signers[0], grantee, MsgTypeURL(msg)) triple and validate it. + """ @dataclass(eq=False, repr=False) @@ -114,11 +118,14 @@ class QueryGrantsRequest(betterproto.Message): granter: str = betterproto.string_field(1) grantee: str = betterproto.string_field(2) - # Optional, msg_type_url, when set, will query only grants matching given msg - # type. msg_type_url: str = betterproto.string_field(3) - # pagination defines an pagination for the request. + """ + Optional, msg_type_url, when set, will query only grants matching given msg + type. + """ + pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(4) + """pagination defines an pagination for the request.""" @dataclass(eq=False, repr=False) @@ -128,84 +135,39 @@ class QueryGrantsResponse(betterproto.Message): method. """ - # authorizations is a list of grants granted for grantee by granter. grants: List["Grant"] = betterproto.message_field(1) - # pagination defines an pagination for the response. - pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) - - -@dataclass(eq=False, repr=False) -class QueryGranterGrantsRequest(betterproto.Message): - """ - QueryGranterGrantsRequest is the request type for the Query/GranterGrants - RPC method. - """ - - granter: str = betterproto.string_field(1) - # pagination defines an pagination for the request. - pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) - + """authorizations is a list of grants granted for grantee by granter.""" -@dataclass(eq=False, repr=False) -class QueryGranterGrantsResponse(betterproto.Message): - """ - QueryGranterGrantsResponse is the response type for the Query/GranterGrants - RPC method. - """ - - # grants is a list of grants granted by the granter. - grants: List["GrantAuthorization"] = betterproto.message_field(1) - # pagination defines an pagination for the response. - pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) - - -@dataclass(eq=False, repr=False) -class QueryGranteeGrantsRequest(betterproto.Message): - """ - QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants - RPC method. - """ - - grantee: str = betterproto.string_field(1) - # pagination defines an pagination for the request. - pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) - - -@dataclass(eq=False, repr=False) -class QueryGranteeGrantsResponse(betterproto.Message): - """ - QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants - RPC method. - """ - - # grants is a list of grants granted to the grantee. - grants: List["GrantAuthorization"] = betterproto.message_field(1) - # pagination defines an pagination for the response. pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines an pagination for the response.""" @dataclass(eq=False, repr=False) class EventGrant(betterproto.Message): """EventGrant is emitted on Msg/Grant""" - # Msg type URL for which an autorization is granted msg_type_url: str = betterproto.string_field(2) - # Granter account address + """Msg type URL for which an autorization is granted""" + granter: str = betterproto.string_field(3) - # Grantee account address + """Granter account address""" + grantee: str = betterproto.string_field(4) + """Grantee account address""" @dataclass(eq=False, repr=False) class EventRevoke(betterproto.Message): """EventRevoke is emitted on Msg/Revoke""" - # Msg type URL for which an autorization is revoked msg_type_url: str = betterproto.string_field(2) - # Granter account address + """Msg type URL for which an autorization is revoked""" + granter: str = betterproto.string_field(3) - # Grantee account address + """Granter account address""" + grantee: str = betterproto.string_field(4) + """Grantee account address""" @dataclass(eq=False, repr=False) @@ -215,159 +177,117 @@ class GenesisState(betterproto.Message): authorization: List["GrantAuthorization"] = betterproto.message_field(1) +@dataclass(eq=False, repr=False) +class GrantAuthorization(betterproto.Message): + """GrantAuthorization defines the GenesisState/GrantAuthorization type.""" + + granter: str = betterproto.string_field(1) + grantee: str = betterproto.string_field(2) + authorization: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(3) + expiration: datetime = betterproto.message_field(4) + + class MsgStub(betterproto.ServiceStub): async def grant( - self, *, granter: str = "", grantee: str = "", grant: "Grant" = None + self, + msg_grant: "MsgGrant", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgGrantResponse": - - request = MsgGrant() - request.granter = granter - request.grantee = grantee - if grant is not None: - request.grant = grant - return await self._unary_unary( - "/cosmos.authz.v1beta1.Msg/Grant", request, MsgGrantResponse + "/cosmos.authz.v1beta1.Msg/Grant", + msg_grant, + MsgGrantResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def exec( self, + msg_exec: "MsgExec", *, - grantee: str = "", - msgs: Optional[List["betterproto_lib_google_protobuf.Any"]] = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgExecResponse": - msgs = msgs or [] - - request = MsgExec() - request.grantee = grantee - if msgs is not None: - request.msgs = msgs - return await self._unary_unary( - "/cosmos.authz.v1beta1.Msg/Exec", request, MsgExecResponse + "/cosmos.authz.v1beta1.Msg/Exec", + msg_exec, + MsgExecResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def revoke( - self, *, granter: str = "", grantee: str = "", msg_type_url: str = "" + self, + msg_revoke: "MsgRevoke", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgRevokeResponse": - - request = MsgRevoke() - request.granter = granter - request.grantee = grantee - request.msg_type_url = msg_type_url - return await self._unary_unary( - "/cosmos.authz.v1beta1.Msg/Revoke", request, MsgRevokeResponse + "/cosmos.authz.v1beta1.Msg/Revoke", + msg_revoke, + MsgRevokeResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class QueryStub(betterproto.ServiceStub): async def grants( self, + query_grants_request: "QueryGrantsRequest", *, - granter: str = "", - grantee: str = "", - msg_type_url: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryGrantsResponse": - - request = QueryGrantsRequest() - request.granter = granter - request.grantee = grantee - request.msg_type_url = msg_type_url - if pagination is not None: - request.pagination = pagination - - return await self._unary_unary( - "/cosmos.authz.v1beta1.Query/Grants", request, QueryGrantsResponse - ) - - async def granter_grants( - self, - *, - granter: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None - ) -> "QueryGranterGrantsResponse": - - request = QueryGranterGrantsRequest() - request.granter = granter - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( - "/cosmos.authz.v1beta1.Query/GranterGrants", - request, - QueryGranterGrantsResponse, - ) - - async def grantee_grants( - self, - *, - grantee: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None - ) -> "QueryGranteeGrantsResponse": - - request = QueryGranteeGrantsRequest() - request.grantee = grantee - if pagination is not None: - request.pagination = pagination - - return await self._unary_unary( - "/cosmos.authz.v1beta1.Query/GranteeGrants", - request, - QueryGranteeGrantsResponse, + "/cosmos.authz.v1beta1.Query/Grants", + query_grants_request, + QueryGrantsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class MsgBase(ServiceBase): - async def grant( - self, granter: str, grantee: str, grant: "Grant" - ) -> "MsgGrantResponse": + async def grant(self, msg_grant: "MsgGrant") -> "MsgGrantResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def exec( - self, grantee: str, msgs: Optional[List["betterproto_lib_google_protobuf.Any"]] - ) -> "MsgExecResponse": + async def exec(self, msg_exec: "MsgExec") -> "MsgExecResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def revoke( - self, granter: str, grantee: str, msg_type_url: str - ) -> "MsgRevokeResponse": + async def revoke(self, msg_revoke: "MsgRevoke") -> "MsgRevokeResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_grant(self, stream: grpclib.server.Stream) -> None: + async def __rpc_grant( + self, stream: "grpclib.server.Stream[MsgGrant, MsgGrantResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "granter": request.granter, - "grantee": request.grantee, - "grant": request.grant, - } - - response = await self.grant(**request_kwargs) + response = await self.grant(request) await stream.send_message(response) - async def __rpc_exec(self, stream: grpclib.server.Stream) -> None: + async def __rpc_exec( + self, stream: "grpclib.server.Stream[MsgExec, MsgExecResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "grantee": request.grantee, - "msgs": request.msgs, - } - - response = await self.exec(**request_kwargs) + response = await self.exec(request) await stream.send_message(response) - async def __rpc_revoke(self, stream: grpclib.server.Stream) -> None: + async def __rpc_revoke( + self, stream: "grpclib.server.Stream[MsgRevoke, MsgRevokeResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "granter": request.granter, - "grantee": request.grantee, - "msg_type_url": request.msg_type_url, - } - - response = await self.revoke(**request_kwargs) + response = await self.revoke(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -395,57 +315,15 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: class QueryBase(ServiceBase): async def grants( - self, - granter: str, - grantee: str, - msg_type_url: str, - pagination: "__base_query_v1_beta1__.PageRequest", + self, query_grants_request: "QueryGrantsRequest" ) -> "QueryGrantsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def granter_grants( - self, granter: str, pagination: "__base_query_v1_beta1__.PageRequest" - ) -> "QueryGranterGrantsResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def grantee_grants( - self, grantee: str, pagination: "__base_query_v1_beta1__.PageRequest" - ) -> "QueryGranteeGrantsResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def __rpc_grants(self, stream: grpclib.server.Stream) -> None: + async def __rpc_grants( + self, stream: "grpclib.server.Stream[QueryGrantsRequest, QueryGrantsResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "granter": request.granter, - "grantee": request.grantee, - "msg_type_url": request.msg_type_url, - "pagination": request.pagination, - } - - response = await self.grants(**request_kwargs) - await stream.send_message(response) - - async def __rpc_granter_grants(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "granter": request.granter, - "pagination": request.pagination, - } - - response = await self.granter_grants(**request_kwargs) - await stream.send_message(response) - - async def __rpc_grantee_grants(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "grantee": request.grantee, - "pagination": request.pagination, - } - - response = await self.grantee_grants(**request_kwargs) + response = await self.grants(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -456,20 +334,4 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: QueryGrantsRequest, QueryGrantsResponse, ), - "/cosmos.authz.v1beta1.Query/GranterGrants": grpclib.const.Handler( - self.__rpc_granter_grants, - grpclib.const.Cardinality.UNARY_UNARY, - QueryGranterGrantsRequest, - QueryGranterGrantsResponse, - ), - "/cosmos.authz.v1beta1.Query/GranteeGrants": grpclib.const.Handler( - self.__rpc_grantee_grants, - grpclib.const.Cardinality.UNARY_UNARY, - QueryGranteeGrantsRequest, - QueryGranteeGrantsResponse, - ), } - - -from ...base.query import v1beta1 as __base_query_v1_beta1__ -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf diff --git a/python/terra_proto/cosmos/bank/v1beta1/__init__.py b/python/terra_proto/cosmos/bank/v1beta1/__init__.py index 5aef6a4..b835f17 100644 --- a/python/terra_proto/cosmos/bank/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/bank/v1beta1/__init__.py @@ -2,11 +2,25 @@ # sources: cosmos/bank/v1beta1/authz.proto, cosmos/bank/v1beta1/bank.proto, cosmos/bank/v1beta1/genesis.proto, cosmos/bank/v1beta1/query.proto, cosmos/bank/v1beta1/tx.proto # plugin: python-betterproto from dataclasses import dataclass -from typing import Dict, List, Optional +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ...base import v1beta1 as __base_v1_beta1__ +from ...base.query import v1beta1 as __base_query_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) @@ -66,15 +80,21 @@ class DenomUnit(betterproto.Message): the basic token. """ - # denom represents the string name of the given denom unit (e.g uatom). denom: str = betterproto.string_field(1) - # exponent represents power of 10 exponent that one must raise the base_denom - # to in order to equal the given DenomUnit's denom 1 denom = 1^exponent - # base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of - # 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom). + """ + denom represents the string name of the given denom unit (e.g uatom). + """ + exponent: int = betterproto.uint32_field(2) - # aliases is a list of string aliases for the given denom + """ + exponent represents power of 10 exponent that one must raise the base_denom + to in order to equal the given DenomUnit's denom 1 denom = 1^exponent + base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of + 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom). + """ + aliases: List[str] = betterproto.string_field(3) + """aliases is a list of string aliases for the given denom""" @dataclass(eq=False, repr=False) @@ -82,17 +102,29 @@ class Metadata(betterproto.Message): """Metadata represents a struct that describes a basic token.""" description: str = betterproto.string_field(1) - # denom_units represents the list of DenomUnit's for a given coin denom_units: List["DenomUnit"] = betterproto.message_field(2) - # base represents the base denom (should be the DenomUnit with exponent = 0). + """denom_units represents the list of DenomUnit's for a given coin""" + base: str = betterproto.string_field(3) - # display indicates the suggested denom that should be displayed in clients. + """ + base represents the base denom (should be the DenomUnit with exponent = 0). + """ + display: str = betterproto.string_field(4) - # name defines the name of the token (eg: Cosmos Atom) Since: cosmos-sdk 0.43 + """ + display indicates the suggested denom that should be displayed in clients. + """ + name: str = betterproto.string_field(5) - # symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - # be the same as the display. Since: cosmos-sdk 0.43 + """ + name defines the name of the token (eg: Cosmos Atom) Since: cosmos-sdk 0.43 + """ + symbol: str = betterproto.string_field(6) + """ + symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + be the same as the display. Since: cosmos-sdk 0.43 + """ @dataclass(eq=False, repr=False) @@ -136,10 +168,11 @@ class QueryBalanceRequest(betterproto.Message): QueryBalanceRequest is the request type for the Query/Balance RPC method. """ - # address is the address to query balances for. address: str = betterproto.string_field(1) - # denom is the coin denom to query balances for. + """address is the address to query balances for.""" + denom: str = betterproto.string_field(2) + """denom is the coin denom to query balances for.""" @dataclass(eq=False, repr=False) @@ -148,8 +181,8 @@ class QueryBalanceResponse(betterproto.Message): QueryBalanceResponse is the response type for the Query/Balance RPC method. """ - # balance is the balance of the coin. balance: "__base_v1_beta1__.Coin" = betterproto.message_field(1) + """balance is the balance of the coin.""" @dataclass(eq=False, repr=False) @@ -159,10 +192,11 @@ class QueryAllBalancesRequest(betterproto.Message): method. """ - # address is the address to query balances for. address: str = betterproto.string_field(1) - # pagination defines an optional pagination for the request. + """address is the address to query balances for.""" + pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -172,36 +206,11 @@ class QueryAllBalancesResponse(betterproto.Message): method. """ - # balances is the balances of all the coins. balances: List["__base_v1_beta1__.Coin"] = betterproto.message_field(1) - # pagination defines the pagination in the response. - pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) - - -@dataclass(eq=False, repr=False) -class QuerySpendableBalancesRequest(betterproto.Message): - """ - QuerySpendableBalancesRequest defines the gRPC request structure for - querying an account's spendable balances. - """ - - # address is the address to query spendable balances for. - address: str = betterproto.string_field(1) - # pagination defines an optional pagination for the request. - pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) + """balances is the balances of all the coins.""" - -@dataclass(eq=False, repr=False) -class QuerySpendableBalancesResponse(betterproto.Message): - """ - QuerySpendableBalancesResponse defines the gRPC response structure for - querying an account's spendable balances. - """ - - # balances is the spendable balances of all the coins. - balances: List["__base_v1_beta1__.Coin"] = betterproto.message_field(1) - # pagination defines the pagination in the response. pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) @@ -211,9 +220,11 @@ class QueryTotalSupplyRequest(betterproto.Message): method. """ - # pagination defines an optional pagination for the request. Since: cosmos- - # sdk 0.43 pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(1) + """ + pagination defines an optional pagination for the request. Since: cosmos- + sdk 0.43 + """ @dataclass(eq=False, repr=False) @@ -223,10 +234,13 @@ class QueryTotalSupplyResponse(betterproto.Message): method """ - # supply is the supply of the coins supply: List["__base_v1_beta1__.Coin"] = betterproto.message_field(1) - # pagination defines the pagination in the response. Since: cosmos-sdk 0.43 + """supply is the supply of the coins""" + pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """ + pagination defines the pagination in the response. Since: cosmos-sdk 0.43 + """ @dataclass(eq=False, repr=False) @@ -235,8 +249,8 @@ class QuerySupplyOfRequest(betterproto.Message): QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. """ - # denom is the coin denom to query balances for. denom: str = betterproto.string_field(1) + """denom is the coin denom to query balances for.""" @dataclass(eq=False, repr=False) @@ -246,8 +260,8 @@ class QuerySupplyOfResponse(betterproto.Message): method. """ - # amount is the supply of the coin. amount: "__base_v1_beta1__.Coin" = betterproto.message_field(1) + """amount is the supply of the coin.""" @dataclass(eq=False, repr=False) @@ -276,8 +290,8 @@ class QueryDenomsMetadataRequest(betterproto.Message): RPC method. """ - # pagination defines an optional pagination for the request. pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(1) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -287,10 +301,13 @@ class QueryDenomsMetadataResponse(betterproto.Message): Query/DenomsMetadata RPC method. """ - # metadata provides the client information for all the registered tokens. metadatas: List["Metadata"] = betterproto.message_field(1) - # pagination defines the pagination in the response. + """ + metadata provides the client information for all the registered tokens. + """ + pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) @@ -300,8 +317,8 @@ class QueryDenomMetadataRequest(betterproto.Message): RPC method. """ - # denom is the coin denom to query the metadata for. denom: str = betterproto.string_field(1) + """denom is the coin denom to query the metadata for.""" @dataclass(eq=False, repr=False) @@ -311,9 +328,11 @@ class QueryDenomMetadataResponse(betterproto.Message): RPC method. """ - # metadata describes and provides all the client information for the - # requested token. metadata: "Metadata" = betterproto.message_field(1) + """ + metadata describes and provides all the client information for the + requested token. + """ @dataclass(eq=False, repr=False) @@ -330,16 +349,21 @@ class SendAuthorization(betterproto.Message): class GenesisState(betterproto.Message): """GenesisState defines the bank module's genesis state.""" - # params defines all the paramaters of the module. params: "Params" = betterproto.message_field(1) - # balances is an array containing the balances of all the accounts. + """params defines all the paramaters of the module.""" + balances: List["Balance"] = betterproto.message_field(2) - # supply represents the total supply. If it is left empty, then supply will - # be calculated based on the provided balances. Otherwise, it will be used to - # validate that the sum of the balances equals this amount. + """balances is an array containing the balances of all the accounts.""" + supply: List["__base_v1_beta1__.Coin"] = betterproto.message_field(3) - # denom_metadata defines the metadata of the differents coins. + """ + supply represents the total supply. If it is left empty, then supply will + be calculated based on the provided balances. Otherwise, it will be used to + validate that the sum of the balances equals this amount. + """ + denom_metadata: List["Metadata"] = betterproto.message_field(4) + """denom_metadata defines the metadata of the differents coins.""" @dataclass(eq=False, repr=False) @@ -349,189 +373,191 @@ class Balance(betterproto.Message): module's genesis state. """ - # address is the address of the balance holder. address: str = betterproto.string_field(1) - # coins defines the different coins this balance holds. + """address is the address of the balance holder.""" + coins: List["__base_v1_beta1__.Coin"] = betterproto.message_field(2) + """coins defines the different coins this balance holds.""" class MsgStub(betterproto.ServiceStub): async def send( self, + msg_send: "MsgSend", *, - from_address: str = "", - to_address: str = "", - amount: Optional[List["__base_v1_beta1__.Coin"]] = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgSendResponse": - amount = amount or [] - - request = MsgSend() - request.from_address = from_address - request.to_address = to_address - if amount is not None: - request.amount = amount - return await self._unary_unary( - "/cosmos.bank.v1beta1.Msg/Send", request, MsgSendResponse + "/cosmos.bank.v1beta1.Msg/Send", + msg_send, + MsgSendResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def multi_send( self, + msg_multi_send: "MsgMultiSend", *, - inputs: Optional[List["Input"]] = None, - outputs: Optional[List["Output"]] = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgMultiSendResponse": - inputs = inputs or [] - outputs = outputs or [] - - request = MsgMultiSend() - if inputs is not None: - request.inputs = inputs - if outputs is not None: - request.outputs = outputs - return await self._unary_unary( - "/cosmos.bank.v1beta1.Msg/MultiSend", request, MsgMultiSendResponse + "/cosmos.bank.v1beta1.Msg/MultiSend", + msg_multi_send, + MsgMultiSendResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class QueryStub(betterproto.ServiceStub): async def balance( - self, *, address: str = "", denom: str = "" + self, + query_balance_request: "QueryBalanceRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryBalanceResponse": - - request = QueryBalanceRequest() - request.address = address - request.denom = denom - return await self._unary_unary( - "/cosmos.bank.v1beta1.Query/Balance", request, QueryBalanceResponse + "/cosmos.bank.v1beta1.Query/Balance", + query_balance_request, + QueryBalanceResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def all_balances( self, + query_all_balances_request: "QueryAllBalancesRequest", *, - address: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryAllBalancesResponse": - - request = QueryAllBalancesRequest() - request.address = address - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( - "/cosmos.bank.v1beta1.Query/AllBalances", request, QueryAllBalancesResponse + "/cosmos.bank.v1beta1.Query/AllBalances", + query_all_balances_request, + QueryAllBalancesResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def spendable_balances( + async def total_supply( self, + query_total_supply_request: "QueryTotalSupplyRequest", *, - address: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None - ) -> "QuerySpendableBalancesResponse": - - request = QuerySpendableBalancesRequest() - request.address = address - if pagination is not None: - request.pagination = pagination - - return await self._unary_unary( - "/cosmos.bank.v1beta1.Query/SpendableBalances", - request, - QuerySpendableBalancesResponse, - ) - - async def total_supply( - self, *, pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryTotalSupplyResponse": - - request = QueryTotalSupplyRequest() - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( - "/cosmos.bank.v1beta1.Query/TotalSupply", request, QueryTotalSupplyResponse + "/cosmos.bank.v1beta1.Query/TotalSupply", + query_total_supply_request, + QueryTotalSupplyResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def supply_of(self, *, denom: str = "") -> "QuerySupplyOfResponse": - - request = QuerySupplyOfRequest() - request.denom = denom - + async def supply_of( + self, + query_supply_of_request: "QuerySupplyOfRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QuerySupplyOfResponse": return await self._unary_unary( - "/cosmos.bank.v1beta1.Query/SupplyOf", request, QuerySupplyOfResponse + "/cosmos.bank.v1beta1.Query/SupplyOf", + query_supply_of_request, + QuerySupplyOfResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def params(self) -> "QueryParamsResponse": - - request = QueryParamsRequest() - + async def params( + self, + query_params_request: "QueryParamsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryParamsResponse": return await self._unary_unary( - "/cosmos.bank.v1beta1.Query/Params", request, QueryParamsResponse + "/cosmos.bank.v1beta1.Query/Params", + query_params_request, + QueryParamsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def denom_metadata(self, *, denom: str = "") -> "QueryDenomMetadataResponse": - - request = QueryDenomMetadataRequest() - request.denom = denom - + async def denom_metadata( + self, + query_denom_metadata_request: "QueryDenomMetadataRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryDenomMetadataResponse": return await self._unary_unary( "/cosmos.bank.v1beta1.Query/DenomMetadata", - request, + query_denom_metadata_request, QueryDenomMetadataResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def denoms_metadata( - self, *, pagination: "__base_query_v1_beta1__.PageRequest" = None + self, + query_denoms_metadata_request: "QueryDenomsMetadataRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryDenomsMetadataResponse": - - request = QueryDenomsMetadataRequest() - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( "/cosmos.bank.v1beta1.Query/DenomsMetadata", - request, + query_denoms_metadata_request, QueryDenomsMetadataResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class MsgBase(ServiceBase): - async def send( - self, - from_address: str, - to_address: str, - amount: Optional[List["__base_v1_beta1__.Coin"]], - ) -> "MsgSendResponse": + async def send(self, msg_send: "MsgSend") -> "MsgSendResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def multi_send( - self, inputs: Optional[List["Input"]], outputs: Optional[List["Output"]] + self, msg_multi_send: "MsgMultiSend" ) -> "MsgMultiSendResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_send(self, stream: grpclib.server.Stream) -> None: + async def __rpc_send( + self, stream: "grpclib.server.Stream[MsgSend, MsgSendResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "from_address": request.from_address, - "to_address": request.to_address, - "amount": request.amount, - } - - response = await self.send(**request_kwargs) + response = await self.send(request) await stream.send_message(response) - async def __rpc_multi_send(self, stream: grpclib.server.Stream) -> None: + async def __rpc_multi_send( + self, stream: "grpclib.server.Stream[MsgMultiSend, MsgMultiSendResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "inputs": request.inputs, - "outputs": request.outputs, - } - - response = await self.multi_send(**request_kwargs) + response = await self.multi_send(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -552,117 +578,93 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: class QueryBase(ServiceBase): - async def balance(self, address: str, denom: str) -> "QueryBalanceResponse": + async def balance( + self, query_balance_request: "QueryBalanceRequest" + ) -> "QueryBalanceResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def all_balances( - self, address: str, pagination: "__base_query_v1_beta1__.PageRequest" + self, query_all_balances_request: "QueryAllBalancesRequest" ) -> "QueryAllBalancesResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def spendable_balances( - self, address: str, pagination: "__base_query_v1_beta1__.PageRequest" - ) -> "QuerySpendableBalancesResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def total_supply( - self, pagination: "__base_query_v1_beta1__.PageRequest" + self, query_total_supply_request: "QueryTotalSupplyRequest" ) -> "QueryTotalSupplyResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def supply_of(self, denom: str) -> "QuerySupplyOfResponse": + async def supply_of( + self, query_supply_of_request: "QuerySupplyOfRequest" + ) -> "QuerySupplyOfResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def params(self) -> "QueryParamsResponse": + async def params( + self, query_params_request: "QueryParamsRequest" + ) -> "QueryParamsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def denom_metadata(self, denom: str) -> "QueryDenomMetadataResponse": + async def denom_metadata( + self, query_denom_metadata_request: "QueryDenomMetadataRequest" + ) -> "QueryDenomMetadataResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def denoms_metadata( - self, pagination: "__base_query_v1_beta1__.PageRequest" + self, query_denoms_metadata_request: "QueryDenomsMetadataRequest" ) -> "QueryDenomsMetadataResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_balance(self, stream: grpclib.server.Stream) -> None: + async def __rpc_balance( + self, stream: "grpclib.server.Stream[QueryBalanceRequest, QueryBalanceResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "address": request.address, - "denom": request.denom, - } - - response = await self.balance(**request_kwargs) + response = await self.balance(request) await stream.send_message(response) - async def __rpc_all_balances(self, stream: grpclib.server.Stream) -> None: + async def __rpc_all_balances( + self, + stream: "grpclib.server.Stream[QueryAllBalancesRequest, QueryAllBalancesResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "address": request.address, - "pagination": request.pagination, - } - - response = await self.all_balances(**request_kwargs) + response = await self.all_balances(request) await stream.send_message(response) - async def __rpc_spendable_balances(self, stream: grpclib.server.Stream) -> None: + async def __rpc_total_supply( + self, + stream: "grpclib.server.Stream[QueryTotalSupplyRequest, QueryTotalSupplyResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "address": request.address, - "pagination": request.pagination, - } - - response = await self.spendable_balances(**request_kwargs) + response = await self.total_supply(request) await stream.send_message(response) - async def __rpc_total_supply(self, stream: grpclib.server.Stream) -> None: + async def __rpc_supply_of( + self, + stream: "grpclib.server.Stream[QuerySupplyOfRequest, QuerySupplyOfResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "pagination": request.pagination, - } - - response = await self.total_supply(**request_kwargs) + response = await self.supply_of(request) await stream.send_message(response) - async def __rpc_supply_of(self, stream: grpclib.server.Stream) -> None: + async def __rpc_params( + self, stream: "grpclib.server.Stream[QueryParamsRequest, QueryParamsResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "denom": request.denom, - } - - response = await self.supply_of(**request_kwargs) + response = await self.params(request) await stream.send_message(response) - async def __rpc_params(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = {} - - response = await self.params(**request_kwargs) - await stream.send_message(response) - - async def __rpc_denom_metadata(self, stream: grpclib.server.Stream) -> None: + async def __rpc_denom_metadata( + self, + stream: "grpclib.server.Stream[QueryDenomMetadataRequest, QueryDenomMetadataResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "denom": request.denom, - } - - response = await self.denom_metadata(**request_kwargs) + response = await self.denom_metadata(request) await stream.send_message(response) - async def __rpc_denoms_metadata(self, stream: grpclib.server.Stream) -> None: + async def __rpc_denoms_metadata( + self, + stream: "grpclib.server.Stream[QueryDenomsMetadataRequest, QueryDenomsMetadataResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "pagination": request.pagination, - } - - response = await self.denoms_metadata(**request_kwargs) + response = await self.denoms_metadata(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -679,12 +681,6 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: QueryAllBalancesRequest, QueryAllBalancesResponse, ), - "/cosmos.bank.v1beta1.Query/SpendableBalances": grpclib.const.Handler( - self.__rpc_spendable_balances, - grpclib.const.Cardinality.UNARY_UNARY, - QuerySpendableBalancesRequest, - QuerySpendableBalancesResponse, - ), "/cosmos.bank.v1beta1.Query/TotalSupply": grpclib.const.Handler( self.__rpc_total_supply, grpclib.const.Cardinality.UNARY_UNARY, @@ -716,7 +712,3 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: QueryDenomsMetadataResponse, ), } - - -from ...base import v1beta1 as __base_v1_beta1__ -from ...base.query import v1beta1 as __base_query_v1_beta1__ diff --git a/python/terra_proto/cosmos/base/abci/v1beta1/__init__.py b/python/terra_proto/cosmos/base/abci/v1beta1/__init__.py index 1b8514d..075f6d4 100644 --- a/python/terra_proto/cosmos/base/abci/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/base/abci/v1beta1/__init__.py @@ -5,7 +5,9 @@ from typing import List import betterproto -from betterproto.grpc.grpclib_server import ServiceBase +import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf + +from .....tendermint import abci as ____tendermint_abci__ @dataclass(eq=False, repr=False) @@ -15,39 +17,59 @@ class TxResponse(betterproto.Message): The tags are stringified and the log is JSON decoded. """ - # The block height height: int = betterproto.int64_field(1) - # The transaction hash. + """The block height""" + txhash: str = betterproto.string_field(2) - # Namespace for the Code + """The transaction hash.""" + codespace: str = betterproto.string_field(3) - # Response code. + """Namespace for the Code""" + code: int = betterproto.uint32_field(4) - # Result bytes, if any. + """Response code.""" + data: str = betterproto.string_field(5) - # The output of the application's logger (raw string). May be non- - # deterministic. + """Result bytes, if any.""" + raw_log: str = betterproto.string_field(6) - # The output of the application's logger (typed). May be non-deterministic. + """ + The output of the application's logger (raw string). May be non- + deterministic. + """ + logs: List["AbciMessageLog"] = betterproto.message_field(7) - # Additional information. May be non-deterministic. + """ + The output of the application's logger (typed). May be non-deterministic. + """ + info: str = betterproto.string_field(8) - # Amount of gas requested for transaction. + """Additional information. May be non-deterministic.""" + gas_wanted: int = betterproto.int64_field(9) - # Amount of gas consumed by transaction. + """Amount of gas requested for transaction.""" + gas_used: int = betterproto.int64_field(10) - # The request transaction bytes. + """Amount of gas consumed by transaction.""" + tx: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(11) - # Time of the previous block. For heights > 1, it's the weighted median of - # the timestamps of the valid votes in the block.LastCommit. For height == 1, - # it's genesis time. + """The request transaction bytes.""" + timestamp: str = betterproto.string_field(12) - # Events defines all the events emitted by processing a transaction. Note, - # these events include those emitted by processing all the messages and those - # emitted from the ante handler. Whereas Logs contains the events, with - # additional metadata, emitted only by processing the messages. Since: - # cosmos-sdk 0.42.11, 0.44.5, 0.45 + """ + Time of the previous block. For heights > 1, it's the weighted median of + the timestamps of the valid votes in the block.LastCommit. For height == 1, + it's genesis time. + """ + events: List["____tendermint_abci__.Event"] = betterproto.message_field(13) + """ + Events defines all the events emitted by processing a transaction. Note, + these events include those emitted by processing all the messages and those + emitted from the ante handler. Whereas Logs contains the events, with + additional metadata, emitted only by processing the messages. Since: + cosmos-sdk 0.42.11, 0.44.5, 0.45 + """ @dataclass(eq=False, repr=False) @@ -59,9 +81,11 @@ class AbciMessageLog(betterproto.Message): msg_index: int = betterproto.uint32_field(1) log: str = betterproto.string_field(2) - # Events contains a slice of Event objects that were emitted during some - # execution. events: List["StringEvent"] = betterproto.message_field(3) + """ + Events contains a slice of Event objects that were emitted during some + execution. + """ @dataclass(eq=False, repr=False) @@ -90,24 +114,31 @@ class Attribute(betterproto.Message): class GasInfo(betterproto.Message): """GasInfo defines tx execution gas context.""" - # GasWanted is the maximum units of work we allow this tx to perform. gas_wanted: int = betterproto.uint64_field(1) - # GasUsed is the amount of gas actually consumed. + """GasWanted is the maximum units of work we allow this tx to perform.""" + gas_used: int = betterproto.uint64_field(2) + """GasUsed is the amount of gas actually consumed.""" @dataclass(eq=False, repr=False) class Result(betterproto.Message): """Result is the union of ResponseFormat and ResponseCheckTx.""" - # Data is any data returned from message or handler execution. It MUST be - # length prefixed in order to separate data from multiple message executions. data: bytes = betterproto.bytes_field(1) - # Log contains the log information from message or handler execution. + """ + Data is any data returned from message or handler execution. It MUST be + length prefixed in order to separate data from multiple message executions. + """ + log: str = betterproto.string_field(2) - # Events contains a slice of Event objects that were emitted during message - # or handler execution. + """Log contains the log information from message or handler execution.""" + events: List["____tendermint_abci__.Event"] = betterproto.message_field(3) + """ + Events contains a slice of Event objects that were emitted during message + or handler execution. + """ @dataclass(eq=False, repr=False) @@ -146,19 +177,20 @@ class TxMsgData(betterproto.Message): class SearchTxsResult(betterproto.Message): """SearchTxsResult defines a structure for querying txs pageable""" - # Count of all txs total_count: int = betterproto.uint64_field(1) - # Count of txs in current page + """Count of all txs""" + count: int = betterproto.uint64_field(2) - # Index of current page, start from 1 + """Count of txs in current page""" + page_number: int = betterproto.uint64_field(3) - # Count of total pages + """Index of current page, start from 1""" + page_total: int = betterproto.uint64_field(4) - # Max count txs per page - limit: int = betterproto.uint64_field(5) - # List of txs in current page - txs: List["TxResponse"] = betterproto.message_field(6) + """Count of total pages""" + limit: int = betterproto.uint64_field(5) + """Max count txs per page""" -from .....tendermint import abci as ____tendermint_abci__ -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf + txs: List["TxResponse"] = betterproto.message_field(6) + """List of txs in current page""" diff --git a/python/terra_proto/cosmos/base/kv/v1beta1/__init__.py b/python/terra_proto/cosmos/base/kv/v1beta1/__init__.py index 278d74c..d5fbeeb 100644 --- a/python/terra_proto/cosmos/base/kv/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/base/kv/v1beta1/__init__.py @@ -5,7 +5,6 @@ from typing import List import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) diff --git a/python/terra_proto/cosmos/base/query/v1beta1/__init__.py b/python/terra_proto/cosmos/base/query/v1beta1/__init__.py index 1b16433..a0e406d 100644 --- a/python/terra_proto/cosmos/base/query/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/base/query/v1beta1/__init__.py @@ -4,7 +4,6 @@ from dataclasses import dataclass import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) @@ -15,23 +14,37 @@ class PageRequest(betterproto.Message): PageRequest pagination = 2; } """ - # 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: bytes = betterproto.bytes_field(1) - # 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. + """ + 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. + """ + offset: int = betterproto.uint64_field(2) - # 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. + """ + 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. + """ + limit: int = betterproto.uint64_field(3) - # 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. + """ + 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. + """ + count_total: bool = betterproto.bool_field(4) - # reverse is set to true if results are to be returned in the descending - # order. Since: cosmos-sdk 0.43 + """ + 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. + """ + reverse: bool = betterproto.bool_field(5) + """ + reverse is set to true if results are to be returned in the descending + order. Since: cosmos-sdk 0.43 + """ @dataclass(eq=False, repr=False) @@ -42,9 +55,14 @@ class PageResponse(betterproto.Message): repeated Bar results = 1; PageResponse page = 2; } """ - # next_key is the key to be passed to PageRequest.key to query the next page - # most efficiently next_key: bytes = betterproto.bytes_field(1) - # total is total number of results available if PageRequest.count_total was - # set, its value is undefined otherwise + """ + next_key is the key to be passed to PageRequest.key to query the next page + most efficiently + """ + total: int = betterproto.uint64_field(2) + """ + total is total number of results available if PageRequest.count_total was + set, its value is undefined otherwise + """ diff --git a/python/terra_proto/cosmos/base/reflection/v1beta1/__init__.py b/python/terra_proto/cosmos/base/reflection/v1beta1/__init__.py index 3743553..a038e99 100644 --- a/python/terra_proto/cosmos/base/reflection/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/base/reflection/v1beta1/__init__.py @@ -2,11 +2,22 @@ # sources: cosmos/base/reflection/v1beta1/reflection.proto # plugin: python-betterproto from dataclasses import dataclass -from typing import Dict, List +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) @@ -25,8 +36,8 @@ class ListAllInterfacesResponse(betterproto.Message): RPC. """ - # interface_names is an array of all the registered interfaces. interface_names: List[str] = betterproto.string_field(1) + """interface_names is an array of all the registered interfaces.""" @dataclass(eq=False, repr=False) @@ -36,8 +47,10 @@ class ListImplementationsRequest(betterproto.Message): RPC. """ - # interface_name defines the interface to query the implementations for. interface_name: str = betterproto.string_field(1) + """ + interface_name defines the interface to query the implementations for. + """ @dataclass(eq=False, repr=False) @@ -51,55 +64,66 @@ class ListImplementationsResponse(betterproto.Message): class ReflectionServiceStub(betterproto.ServiceStub): - async def list_all_interfaces(self) -> "ListAllInterfacesResponse": - - request = ListAllInterfacesRequest() - + async def list_all_interfaces( + self, + list_all_interfaces_request: "ListAllInterfacesRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "ListAllInterfacesResponse": return await self._unary_unary( "/cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces", - request, + list_all_interfaces_request, ListAllInterfacesResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def list_implementations( - self, *, interface_name: str = "" + self, + list_implementations_request: "ListImplementationsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "ListImplementationsResponse": - - request = ListImplementationsRequest() - request.interface_name = interface_name - return await self._unary_unary( "/cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations", - request, + list_implementations_request, ListImplementationsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class ReflectionServiceBase(ServiceBase): - async def list_all_interfaces(self) -> "ListAllInterfacesResponse": + async def list_all_interfaces( + self, list_all_interfaces_request: "ListAllInterfacesRequest" + ) -> "ListAllInterfacesResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def list_implementations( - self, interface_name: str + self, list_implementations_request: "ListImplementationsRequest" ) -> "ListImplementationsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_list_all_interfaces(self, stream: grpclib.server.Stream) -> None: + async def __rpc_list_all_interfaces( + self, + stream: "grpclib.server.Stream[ListAllInterfacesRequest, ListAllInterfacesResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.list_all_interfaces(**request_kwargs) + response = await self.list_all_interfaces(request) await stream.send_message(response) - async def __rpc_list_implementations(self, stream: grpclib.server.Stream) -> None: + async def __rpc_list_implementations( + self, + stream: "grpclib.server.Stream[ListImplementationsRequest, ListImplementationsResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "interface_name": request.interface_name, - } - - response = await self.list_implementations(**request_kwargs) + response = await self.list_implementations(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: diff --git a/python/terra_proto/cosmos/base/reflection/v2alpha1/__init__.py b/python/terra_proto/cosmos/base/reflection/v2alpha1/__init__.py index 09f56d9..5bd369c 100644 --- a/python/terra_proto/cosmos/base/reflection/v2alpha1/__init__.py +++ b/python/terra_proto/cosmos/base/reflection/v2alpha1/__init__.py @@ -2,46 +2,73 @@ # sources: cosmos/base/reflection/v2alpha1/reflection.proto # plugin: python-betterproto from dataclasses import dataclass -from typing import Dict, List +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) class AppDescriptor(betterproto.Message): """AppDescriptor describes a cosmos-sdk based application""" - # AuthnDescriptor provides information on how to authenticate transactions on - # the application NOTE: experimental and subject to change in future - # releases. authn: "AuthnDescriptor" = betterproto.message_field(1) - # chain provides the chain descriptor + """ + AuthnDescriptor provides information on how to authenticate transactions on + the application NOTE: experimental and subject to change in future + releases. + """ + chain: "ChainDescriptor" = betterproto.message_field(2) - # codec provides metadata information regarding codec related types + """chain provides the chain descriptor""" + codec: "CodecDescriptor" = betterproto.message_field(3) - # configuration provides metadata information regarding the sdk.Config type + """codec provides metadata information regarding codec related types""" + configuration: "ConfigurationDescriptor" = betterproto.message_field(4) - # query_services provides metadata information regarding the available - # queriable endpoints + """ + configuration provides metadata information regarding the sdk.Config type + """ + query_services: "QueryServicesDescriptor" = betterproto.message_field(5) - # tx provides metadata information regarding how to send transactions to the - # given application + """ + query_services provides metadata information regarding the available + queriable endpoints + """ + tx: "TxDescriptor" = betterproto.message_field(6) + """ + tx provides metadata information regarding how to send transactions to the + given application + """ @dataclass(eq=False, repr=False) class TxDescriptor(betterproto.Message): """TxDescriptor describes the accepted transaction type""" - # fullname is the protobuf fullname of the raw transaction type (for instance - # the tx.Tx type) it is not meant to support polymorphism of transaction - # types, it is supposed to be used by reflection clients to understand if - # they can handle a specific transaction type in an application. fullname: str = betterproto.string_field(1) - # msgs lists the accepted application messages (sdk.Msg) + """ + fullname is the protobuf fullname of the raw transaction type (for instance + the tx.Tx type) it is not meant to support polymorphism of transaction + types, it is supposed to be used by reflection clients to understand if + they can handle a specific transaction type in an application. + """ + msgs: List["MsgDescriptor"] = betterproto.message_field(2) + """msgs lists the accepted application messages (sdk.Msg)""" @dataclass(eq=False, repr=False) @@ -51,8 +78,8 @@ class AuthnDescriptor(betterproto.Message): relying on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures """ - # sign_modes defines the supported signature algorithm sign_modes: List["SigningModeDescriptor"] = betterproto.message_field(1) + """sign_modes defines the supported signature algorithm""" @dataclass(eq=False, repr=False) @@ -64,22 +91,26 @@ class SigningModeDescriptor(betterproto.Message): better to think about this another time """ - # name defines the unique name of the signing mode name: str = betterproto.string_field(1) - # number is the unique int32 identifier for the sign_mode enum + """name defines the unique name of the signing mode""" + number: int = betterproto.int32_field(2) - # authn_info_provider_method_fullname defines the fullname of the method to - # call to get the metadata required to authenticate using the provided - # sign_modes + """number is the unique int32 identifier for the sign_mode enum""" + authn_info_provider_method_fullname: str = betterproto.string_field(3) + """ + authn_info_provider_method_fullname defines the fullname of the method to + call to get the metadata required to authenticate using the provided + sign_modes + """ @dataclass(eq=False, repr=False) class ChainDescriptor(betterproto.Message): """ChainDescriptor describes chain information of the application""" - # id is the chain id id: str = betterproto.string_field(1) + """id is the chain id""" @dataclass(eq=False, repr=False) @@ -89,39 +120,48 @@ class CodecDescriptor(betterproto.Message): information on the types """ - # interfaces is a list of the registerted interfaces descriptors interfaces: List["InterfaceDescriptor"] = betterproto.message_field(1) + """interfaces is a list of the registerted interfaces descriptors""" @dataclass(eq=False, repr=False) class InterfaceDescriptor(betterproto.Message): """InterfaceDescriptor describes the implementation of an interface""" - # fullname is the name of the interface fullname: str = betterproto.string_field(1) - # interface_accepting_messages contains information regarding the proto - # messages which contain the interface as google.protobuf.Any field + """fullname is the name of the interface""" + interface_accepting_messages: List[ "InterfaceAcceptingMessageDescriptor" ] = betterproto.message_field(2) - # interface_implementers is a list of the descriptors of the interface - # implementers + """ + interface_accepting_messages contains information regarding the proto + messages which contain the interface as google.protobuf.Any field + """ + interface_implementers: List[ "InterfaceImplementerDescriptor" ] = betterproto.message_field(3) + """ + interface_implementers is a list of the descriptors of the interface + implementers + """ @dataclass(eq=False, repr=False) class InterfaceImplementerDescriptor(betterproto.Message): """InterfaceImplementerDescriptor describes an interface implementer""" - # fullname is the protobuf queryable name of the interface implementer fullname: str = betterproto.string_field(1) - # type_url defines the type URL used when marshalling the type as any this is - # required so we can provide type safe google.protobuf.Any marshalling and - # unmarshalling, making sure that we don't accept just 'any' type in our - # interface fields + """fullname is the protobuf queryable name of the interface implementer""" + type_url: str = betterproto.string_field(2) + """ + type_url defines the type URL used when marshalling the type as any this is + required so we can provide type safe google.protobuf.Any marshalling and + unmarshalling, making sure that we don't accept just 'any' type in our + interface fields + """ @dataclass(eq=False, repr=False) @@ -131,12 +171,17 @@ class InterfaceAcceptingMessageDescriptor(betterproto.Message): contains an interface represented as a google.protobuf.Any """ - # fullname is the protobuf fullname of the type containing the interface fullname: str = betterproto.string_field(1) - # field_descriptor_names is a list of the protobuf name (not fullname) of the - # field which contains the interface as google.protobuf.Any (the interface is - # the same, but it can be in multiple fields of the same proto message) + """ + fullname is the protobuf fullname of the type containing the interface + """ + field_descriptor_names: List[str] = betterproto.string_field(2) + """ + field_descriptor_names is a list of the protobuf name (not fullname) of the + field which contains the interface as google.protobuf.Any (the interface is + the same, but it can be in multiple fields of the same proto message) + """ @dataclass(eq=False, repr=False) @@ -145,8 +190,8 @@ class ConfigurationDescriptor(betterproto.Message): ConfigurationDescriptor contains metadata information on the sdk.Config """ - # bech32_account_address_prefix is the account address prefix bech32_account_address_prefix: str = betterproto.string_field(1) + """bech32_account_address_prefix is the account address prefix""" @dataclass(eq=False, repr=False) @@ -156,8 +201,8 @@ class MsgDescriptor(betterproto.Message): transaction """ - # msg_type_url contains the TypeURL of a sdk.Msg. msg_type_url: str = betterproto.string_field(1) + """msg_type_url contains the TypeURL of a sdk.Msg.""" @dataclass(eq=False, repr=False) @@ -177,9 +222,11 @@ class GetAuthnDescriptorResponse(betterproto.Message): GetAuthnDescriptor RPC """ - # authn describes how to authenticate to the application when sending - # transactions authn: "AuthnDescriptor" = betterproto.message_field(1) + """ + authn describes how to authenticate to the application when sending + transactions + """ @dataclass(eq=False, repr=False) @@ -199,8 +246,8 @@ class GetChainDescriptorResponse(betterproto.Message): GetChainDescriptor RPC """ - # chain describes application chain information chain: "ChainDescriptor" = betterproto.message_field(1) + """chain describes application chain information""" @dataclass(eq=False, repr=False) @@ -220,9 +267,11 @@ class GetCodecDescriptorResponse(betterproto.Message): GetCodecDescriptor RPC """ - # codec describes the application codec such as registered interfaces and - # implementations codec: "CodecDescriptor" = betterproto.message_field(1) + """ + codec describes the application codec such as registered interfaces and + implementations + """ @dataclass(eq=False, repr=False) @@ -242,8 +291,8 @@ class GetConfigurationDescriptorResponse(betterproto.Message): GetConfigurationDescriptor RPC """ - # config describes the application's sdk.Config config: "ConfigurationDescriptor" = betterproto.message_field(1) + """config describes the application's sdk.Config""" @dataclass(eq=False, repr=False) @@ -263,8 +312,8 @@ class GetQueryServicesDescriptorResponse(betterproto.Message): GetQueryServicesDescriptor RPC """ - # queries provides information on the available queryable services queries: "QueryServicesDescriptor" = betterproto.message_field(1) + """queries provides information on the available queryable services""" @dataclass(eq=False, repr=False) @@ -282,9 +331,11 @@ class GetTxDescriptorResponse(betterproto.Message): GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC """ - # tx provides information on msgs that can be forwarded to the application - # alongside the accepted transaction protobuf type tx: "TxDescriptor" = betterproto.message_field(1) + """ + tx provides information on msgs that can be forwarded to the application + alongside the accepted transaction protobuf type + """ @dataclass(eq=False, repr=False) @@ -293,21 +344,25 @@ class QueryServicesDescriptor(betterproto.Message): QueryServicesDescriptor contains the list of cosmos-sdk queriable services """ - # query_services is a list of cosmos-sdk QueryServiceDescriptor query_services: List["QueryServiceDescriptor"] = betterproto.message_field(1) + """query_services is a list of cosmos-sdk QueryServiceDescriptor""" @dataclass(eq=False, repr=False) class QueryServiceDescriptor(betterproto.Message): """QueryServiceDescriptor describes a cosmos-sdk queryable service""" - # fullname is the protobuf fullname of the service descriptor fullname: str = betterproto.string_field(1) - # is_module describes if this service is actually exposed by an application's - # module + """fullname is the protobuf fullname of the service descriptor""" + is_module: bool = betterproto.bool_field(2) - # methods provides a list of query service methods + """ + is_module describes if this service is actually exposed by an application's + module + """ + methods: List["QueryMethodDescriptor"] = betterproto.message_field(3) + """methods provides a list of query service methods""" @dataclass(eq=False, repr=False) @@ -318,152 +373,197 @@ class QueryMethodDescriptor(betterproto.Message): because it would be redundant with the grpc reflection service """ - # name is the protobuf name (not fullname) of the method name: str = betterproto.string_field(1) - # full_query_path is the path that can be used to query this method via - # tendermint abci.Query + """name is the protobuf name (not fullname) of the method""" + full_query_path: str = betterproto.string_field(2) + """ + full_query_path is the path that can be used to query this method via + tendermint abci.Query + """ class ReflectionServiceStub(betterproto.ServiceStub): - async def get_authn_descriptor(self) -> "GetAuthnDescriptorResponse": - - request = GetAuthnDescriptorRequest() - + async def get_authn_descriptor( + self, + get_authn_descriptor_request: "GetAuthnDescriptorRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "GetAuthnDescriptorResponse": return await self._unary_unary( "/cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor", - request, + get_authn_descriptor_request, GetAuthnDescriptorResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def get_chain_descriptor(self) -> "GetChainDescriptorResponse": - - request = GetChainDescriptorRequest() - + async def get_chain_descriptor( + self, + get_chain_descriptor_request: "GetChainDescriptorRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "GetChainDescriptorResponse": return await self._unary_unary( "/cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor", - request, + get_chain_descriptor_request, GetChainDescriptorResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def get_codec_descriptor(self) -> "GetCodecDescriptorResponse": - - request = GetCodecDescriptorRequest() - + async def get_codec_descriptor( + self, + get_codec_descriptor_request: "GetCodecDescriptorRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "GetCodecDescriptorResponse": return await self._unary_unary( "/cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor", - request, + get_codec_descriptor_request, GetCodecDescriptorResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def get_configuration_descriptor( self, + get_configuration_descriptor_request: "GetConfigurationDescriptorRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "GetConfigurationDescriptorResponse": - - request = GetConfigurationDescriptorRequest() - return await self._unary_unary( "/cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor", - request, + get_configuration_descriptor_request, GetConfigurationDescriptorResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def get_query_services_descriptor( self, + get_query_services_descriptor_request: "GetQueryServicesDescriptorRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "GetQueryServicesDescriptorResponse": - - request = GetQueryServicesDescriptorRequest() - return await self._unary_unary( "/cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor", - request, + get_query_services_descriptor_request, GetQueryServicesDescriptorResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def get_tx_descriptor(self) -> "GetTxDescriptorResponse": - - request = GetTxDescriptorRequest() - + async def get_tx_descriptor( + self, + get_tx_descriptor_request: "GetTxDescriptorRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "GetTxDescriptorResponse": return await self._unary_unary( "/cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor", - request, + get_tx_descriptor_request, GetTxDescriptorResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class ReflectionServiceBase(ServiceBase): - async def get_authn_descriptor(self) -> "GetAuthnDescriptorResponse": + async def get_authn_descriptor( + self, get_authn_descriptor_request: "GetAuthnDescriptorRequest" + ) -> "GetAuthnDescriptorResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def get_chain_descriptor(self) -> "GetChainDescriptorResponse": + async def get_chain_descriptor( + self, get_chain_descriptor_request: "GetChainDescriptorRequest" + ) -> "GetChainDescriptorResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def get_codec_descriptor(self) -> "GetCodecDescriptorResponse": + async def get_codec_descriptor( + self, get_codec_descriptor_request: "GetCodecDescriptorRequest" + ) -> "GetCodecDescriptorResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def get_configuration_descriptor( - self, + self, get_configuration_descriptor_request: "GetConfigurationDescriptorRequest" ) -> "GetConfigurationDescriptorResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def get_query_services_descriptor( - self, + self, get_query_services_descriptor_request: "GetQueryServicesDescriptorRequest" ) -> "GetQueryServicesDescriptorResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def get_tx_descriptor(self) -> "GetTxDescriptorResponse": + async def get_tx_descriptor( + self, get_tx_descriptor_request: "GetTxDescriptorRequest" + ) -> "GetTxDescriptorResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_get_authn_descriptor(self, stream: grpclib.server.Stream) -> None: + async def __rpc_get_authn_descriptor( + self, + stream: "grpclib.server.Stream[GetAuthnDescriptorRequest, GetAuthnDescriptorResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.get_authn_descriptor(**request_kwargs) + response = await self.get_authn_descriptor(request) await stream.send_message(response) - async def __rpc_get_chain_descriptor(self, stream: grpclib.server.Stream) -> None: + async def __rpc_get_chain_descriptor( + self, + stream: "grpclib.server.Stream[GetChainDescriptorRequest, GetChainDescriptorResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.get_chain_descriptor(**request_kwargs) + response = await self.get_chain_descriptor(request) await stream.send_message(response) - async def __rpc_get_codec_descriptor(self, stream: grpclib.server.Stream) -> None: + async def __rpc_get_codec_descriptor( + self, + stream: "grpclib.server.Stream[GetCodecDescriptorRequest, GetCodecDescriptorResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.get_codec_descriptor(**request_kwargs) + response = await self.get_codec_descriptor(request) await stream.send_message(response) async def __rpc_get_configuration_descriptor( - self, stream: grpclib.server.Stream + self, + stream: "grpclib.server.Stream[GetConfigurationDescriptorRequest, GetConfigurationDescriptorResponse]", ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.get_configuration_descriptor(**request_kwargs) + response = await self.get_configuration_descriptor(request) await stream.send_message(response) async def __rpc_get_query_services_descriptor( - self, stream: grpclib.server.Stream + self, + stream: "grpclib.server.Stream[GetQueryServicesDescriptorRequest, GetQueryServicesDescriptorResponse]", ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.get_query_services_descriptor(**request_kwargs) + response = await self.get_query_services_descriptor(request) await stream.send_message(response) - async def __rpc_get_tx_descriptor(self, stream: grpclib.server.Stream) -> None: + async def __rpc_get_tx_descriptor( + self, + stream: "grpclib.server.Stream[GetTxDescriptorRequest, GetTxDescriptorResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.get_tx_descriptor(**request_kwargs) + response = await self.get_tx_descriptor(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: diff --git a/python/terra_proto/cosmos/base/snapshots/v1beta1/__init__.py b/python/terra_proto/cosmos/base/snapshots/v1beta1/__init__.py index 67f1e96..9933c20 100644 --- a/python/terra_proto/cosmos/base/snapshots/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/base/snapshots/v1beta1/__init__.py @@ -5,7 +5,6 @@ from typing import List import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) @@ -24,53 +23,3 @@ class Metadata(betterproto.Message): """Metadata contains SDK-specific snapshot metadata.""" chunk_hashes: List[bytes] = betterproto.bytes_field(1) - - -@dataclass(eq=False, repr=False) -class SnapshotItem(betterproto.Message): - """SnapshotItem is an item contained in a rootmulti.Store snapshot.""" - - store: "SnapshotStoreItem" = betterproto.message_field(1, group="item") - iavl: "SnapshotIavlItem" = betterproto.message_field(2, group="item") - extension: "SnapshotExtensionMeta" = betterproto.message_field(3, group="item") - extension_payload: "SnapshotExtensionPayload" = betterproto.message_field( - 4, group="item" - ) - - -@dataclass(eq=False, repr=False) -class SnapshotStoreItem(betterproto.Message): - """SnapshotStoreItem contains metadata about a snapshotted store.""" - - name: str = betterproto.string_field(1) - - -@dataclass(eq=False, repr=False) -class SnapshotIavlItem(betterproto.Message): - """SnapshotIAVLItem is an exported IAVL node.""" - - key: bytes = betterproto.bytes_field(1) - value: bytes = betterproto.bytes_field(2) - # version is block height - version: int = betterproto.int64_field(3) - # height is depth of the tree. - height: int = betterproto.int32_field(4) - - -@dataclass(eq=False, repr=False) -class SnapshotExtensionMeta(betterproto.Message): - """ - SnapshotExtensionMeta contains metadata about an external snapshotter. - """ - - name: str = betterproto.string_field(1) - format: int = betterproto.uint32_field(2) - - -@dataclass(eq=False, repr=False) -class SnapshotExtensionPayload(betterproto.Message): - """ - SnapshotExtensionPayload contains payloads of an external snapshotter. - """ - - payload: bytes = betterproto.bytes_field(1) diff --git a/python/terra_proto/cosmos/base/store/v1beta1/__init__.py b/python/terra_proto/cosmos/base/store/v1beta1/__init__.py index cb01c08..06942a4 100644 --- a/python/terra_proto/cosmos/base/store/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/base/store/v1beta1/__init__.py @@ -1,11 +1,10 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# sources: cosmos/base/store/v1beta1/commit_info.proto, cosmos/base/store/v1beta1/listening.proto +# sources: cosmos/base/store/v1beta1/commit_info.proto, cosmos/base/store/v1beta1/listening.proto, cosmos/base/store/v1beta1/snapshot.proto # plugin: python-betterproto from dataclasses import dataclass from typing import List import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) @@ -41,6 +40,31 @@ class CommitId(betterproto.Message): hash: bytes = betterproto.bytes_field(2) +@dataclass(eq=False, repr=False) +class SnapshotItem(betterproto.Message): + """SnapshotItem is an item contained in a rootmulti.Store snapshot.""" + + store: "SnapshotStoreItem" = betterproto.message_field(1, group="item") + iavl: "SnapshotIavlItem" = betterproto.message_field(2, group="item") + + +@dataclass(eq=False, repr=False) +class SnapshotStoreItem(betterproto.Message): + """SnapshotStoreItem contains metadata about a snapshotted store.""" + + name: str = betterproto.string_field(1) + + +@dataclass(eq=False, repr=False) +class SnapshotIavlItem(betterproto.Message): + """SnapshotIAVLItem is an exported IAVL node.""" + + key: bytes = betterproto.bytes_field(1) + value: bytes = betterproto.bytes_field(2) + version: int = betterproto.int64_field(3) + height: int = betterproto.int32_field(4) + + @dataclass(eq=False, repr=False) class StoreKvPair(betterproto.Message): """ diff --git a/python/terra_proto/cosmos/base/tendermint/v1beta1/__init__.py b/python/terra_proto/cosmos/base/tendermint/v1beta1/__init__.py index 255a470..9b48ebd 100644 --- a/python/terra_proto/cosmos/base/tendermint/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/base/tendermint/v1beta1/__init__.py @@ -2,11 +2,29 @@ # sources: cosmos/base/tendermint/v1beta1/query.proto # plugin: python-betterproto from dataclasses import dataclass -from typing import Dict, List +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase +import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from .....tendermint import ( + p2p as ____tendermint_p2_p__, + types as ____tendermint_types__, +) +from ...query import v1beta1 as __query_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) @@ -17,8 +35,8 @@ class GetValidatorSetByHeightRequest(betterproto.Message): """ height: int = betterproto.int64_field(1) - # pagination defines an pagination for the request. pagination: "__query_v1_beta1__.PageRequest" = betterproto.message_field(2) + """pagination defines an pagination for the request.""" @dataclass(eq=False, repr=False) @@ -30,8 +48,8 @@ class GetValidatorSetByHeightResponse(betterproto.Message): block_height: int = betterproto.int64_field(1) validators: List["Validator"] = betterproto.message_field(2) - # pagination defines an pagination for the response. pagination: "__query_v1_beta1__.PageResponse" = betterproto.message_field(3) + """pagination defines an pagination for the response.""" @dataclass(eq=False, repr=False) @@ -41,8 +59,8 @@ class GetLatestValidatorSetRequest(betterproto.Message): Query/GetValidatorSetByHeight RPC method. """ - # pagination defines an pagination for the request. pagination: "__query_v1_beta1__.PageRequest" = betterproto.message_field(1) + """pagination defines an pagination for the request.""" @dataclass(eq=False, repr=False) @@ -54,8 +72,8 @@ class GetLatestValidatorSetResponse(betterproto.Message): block_height: int = betterproto.int64_field(1) validators: List["Validator"] = betterproto.message_field(2) - # pagination defines an pagination for the response. pagination: "__query_v1_beta1__.PageResponse" = betterproto.message_field(3) + """pagination defines an pagination for the response.""" @dataclass(eq=False, repr=False) @@ -163,176 +181,203 @@ class VersionInfo(betterproto.Message): build_tags: str = betterproto.string_field(5) go_version: str = betterproto.string_field(6) build_deps: List["Module"] = betterproto.message_field(7) - # Since: cosmos-sdk 0.43 cosmos_sdk_version: str = betterproto.string_field(8) + """Since: cosmos-sdk 0.43""" @dataclass(eq=False, repr=False) class Module(betterproto.Message): """Module is the type for VersionInfo""" - # module path path: str = betterproto.string_field(1) - # module version + """module path""" + version: str = betterproto.string_field(2) - # checksum + """module version""" + sum: str = betterproto.string_field(3) + """checksum""" class ServiceStub(betterproto.ServiceStub): - async def get_node_info(self) -> "GetNodeInfoResponse": - - request = GetNodeInfoRequest() - + async def get_node_info( + self, + get_node_info_request: "GetNodeInfoRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "GetNodeInfoResponse": return await self._unary_unary( "/cosmos.base.tendermint.v1beta1.Service/GetNodeInfo", - request, + get_node_info_request, GetNodeInfoResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def get_syncing(self) -> "GetSyncingResponse": - - request = GetSyncingRequest() - + async def get_syncing( + self, + get_syncing_request: "GetSyncingRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "GetSyncingResponse": return await self._unary_unary( "/cosmos.base.tendermint.v1beta1.Service/GetSyncing", - request, + get_syncing_request, GetSyncingResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def get_latest_block(self) -> "GetLatestBlockResponse": - - request = GetLatestBlockRequest() - + async def get_latest_block( + self, + get_latest_block_request: "GetLatestBlockRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "GetLatestBlockResponse": return await self._unary_unary( "/cosmos.base.tendermint.v1beta1.Service/GetLatestBlock", - request, + get_latest_block_request, GetLatestBlockResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def get_block_by_height( - self, *, height: int = 0 + self, + get_block_by_height_request: "GetBlockByHeightRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "GetBlockByHeightResponse": - - request = GetBlockByHeightRequest() - request.height = height - return await self._unary_unary( "/cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight", - request, + get_block_by_height_request, GetBlockByHeightResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def get_latest_validator_set( - self, *, pagination: "__query_v1_beta1__.PageRequest" = None + self, + get_latest_validator_set_request: "GetLatestValidatorSetRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "GetLatestValidatorSetResponse": - - request = GetLatestValidatorSetRequest() - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( "/cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet", - request, + get_latest_validator_set_request, GetLatestValidatorSetResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def get_validator_set_by_height( - self, *, height: int = 0, pagination: "__query_v1_beta1__.PageRequest" = None + self, + get_validator_set_by_height_request: "GetValidatorSetByHeightRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "GetValidatorSetByHeightResponse": - - request = GetValidatorSetByHeightRequest() - request.height = height - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( "/cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight", - request, + get_validator_set_by_height_request, GetValidatorSetByHeightResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class ServiceBase(ServiceBase): - async def get_node_info(self) -> "GetNodeInfoResponse": + async def get_node_info( + self, get_node_info_request: "GetNodeInfoRequest" + ) -> "GetNodeInfoResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def get_syncing(self) -> "GetSyncingResponse": + async def get_syncing( + self, get_syncing_request: "GetSyncingRequest" + ) -> "GetSyncingResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def get_latest_block(self) -> "GetLatestBlockResponse": + async def get_latest_block( + self, get_latest_block_request: "GetLatestBlockRequest" + ) -> "GetLatestBlockResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def get_block_by_height(self, height: int) -> "GetBlockByHeightResponse": + async def get_block_by_height( + self, get_block_by_height_request: "GetBlockByHeightRequest" + ) -> "GetBlockByHeightResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def get_latest_validator_set( - self, pagination: "__query_v1_beta1__.PageRequest" + self, get_latest_validator_set_request: "GetLatestValidatorSetRequest" ) -> "GetLatestValidatorSetResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def get_validator_set_by_height( - self, height: int, pagination: "__query_v1_beta1__.PageRequest" + self, get_validator_set_by_height_request: "GetValidatorSetByHeightRequest" ) -> "GetValidatorSetByHeightResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_get_node_info(self, stream: grpclib.server.Stream) -> None: + async def __rpc_get_node_info( + self, stream: "grpclib.server.Stream[GetNodeInfoRequest, GetNodeInfoResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.get_node_info(**request_kwargs) + response = await self.get_node_info(request) await stream.send_message(response) - async def __rpc_get_syncing(self, stream: grpclib.server.Stream) -> None: + async def __rpc_get_syncing( + self, stream: "grpclib.server.Stream[GetSyncingRequest, GetSyncingResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.get_syncing(**request_kwargs) + response = await self.get_syncing(request) await stream.send_message(response) - async def __rpc_get_latest_block(self, stream: grpclib.server.Stream) -> None: + async def __rpc_get_latest_block( + self, + stream: "grpclib.server.Stream[GetLatestBlockRequest, GetLatestBlockResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.get_latest_block(**request_kwargs) + response = await self.get_latest_block(request) await stream.send_message(response) - async def __rpc_get_block_by_height(self, stream: grpclib.server.Stream) -> None: + async def __rpc_get_block_by_height( + self, + stream: "grpclib.server.Stream[GetBlockByHeightRequest, GetBlockByHeightResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "height": request.height, - } - - response = await self.get_block_by_height(**request_kwargs) + response = await self.get_block_by_height(request) await stream.send_message(response) async def __rpc_get_latest_validator_set( - self, stream: grpclib.server.Stream + self, + stream: "grpclib.server.Stream[GetLatestValidatorSetRequest, GetLatestValidatorSetResponse]", ) -> None: request = await stream.recv_message() - - request_kwargs = { - "pagination": request.pagination, - } - - response = await self.get_latest_validator_set(**request_kwargs) + response = await self.get_latest_validator_set(request) await stream.send_message(response) async def __rpc_get_validator_set_by_height( - self, stream: grpclib.server.Stream + self, + stream: "grpclib.server.Stream[GetValidatorSetByHeightRequest, GetValidatorSetByHeightResponse]", ) -> None: request = await stream.recv_message() - - request_kwargs = { - "height": request.height, - "pagination": request.pagination, - } - - response = await self.get_validator_set_by_height(**request_kwargs) + response = await self.get_validator_set_by_height(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -374,9 +419,3 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: GetValidatorSetByHeightResponse, ), } - - -from .....tendermint import p2p as ____tendermint_p2_p__ -from .....tendermint import types as ____tendermint_types__ -from ...query import v1beta1 as __query_v1_beta1__ -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf diff --git a/python/terra_proto/cosmos/base/v1beta1/__init__.py b/python/terra_proto/cosmos/base/v1beta1/__init__.py index 0e27fe3..a5bceee 100644 --- a/python/terra_proto/cosmos/base/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/base/v1beta1/__init__.py @@ -4,7 +4,6 @@ from dataclasses import dataclass import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) diff --git a/python/terra_proto/cosmos/capability/v1beta1/__init__.py b/python/terra_proto/cosmos/capability/v1beta1/__init__.py index 0980067..0068981 100644 --- a/python/terra_proto/cosmos/capability/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/capability/v1beta1/__init__.py @@ -5,7 +5,6 @@ from typing import List import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) @@ -45,18 +44,22 @@ class GenesisOwners(betterproto.Message): GenesisOwners defines the capability owners with their corresponding index. """ - # index is the index of the capability owner. index: int = betterproto.uint64_field(1) - # index_owners are the owners at the given index. + """index is the index of the capability owner.""" + index_owners: "CapabilityOwners" = betterproto.message_field(2) + """index_owners are the owners at the given index.""" @dataclass(eq=False, repr=False) class GenesisState(betterproto.Message): """GenesisState defines the capability module's genesis state.""" - # index is the capability global index. index: int = betterproto.uint64_field(1) - # owners represents a map from index to owners of the capability index index - # key is string to allow amino marshalling. + """index is the capability global index.""" + owners: List["GenesisOwners"] = betterproto.message_field(2) + """ + owners represents a map from index to owners of the capability index index + key is string to allow amino marshalling. + """ diff --git a/python/terra_proto/cosmos/crisis/v1beta1/__init__.py b/python/terra_proto/cosmos/crisis/v1beta1/__init__.py index d96b7c7..2596612 100644 --- a/python/terra_proto/cosmos/crisis/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/crisis/v1beta1/__init__.py @@ -2,11 +2,23 @@ # sources: cosmos/crisis/v1beta1/genesis.proto, cosmos/crisis/v1beta1/tx.proto # plugin: python-betterproto from dataclasses import dataclass -from typing import Dict +from typing import ( + TYPE_CHECKING, + Dict, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ...base import v1beta1 as __base_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) @@ -33,47 +45,43 @@ class MsgVerifyInvariantResponse(betterproto.Message): class GenesisState(betterproto.Message): """GenesisState defines the crisis module's genesis state.""" - # constant_fee is the fee used to verify the invariant in the crisis module. constant_fee: "__base_v1_beta1__.Coin" = betterproto.message_field(3) + """ + constant_fee is the fee used to verify the invariant in the crisis module. + """ class MsgStub(betterproto.ServiceStub): async def verify_invariant( self, + msg_verify_invariant: "MsgVerifyInvariant", *, - sender: str = "", - invariant_module_name: str = "", - invariant_route: str = "" + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgVerifyInvariantResponse": - - request = MsgVerifyInvariant() - request.sender = sender - request.invariant_module_name = invariant_module_name - request.invariant_route = invariant_route - return await self._unary_unary( "/cosmos.crisis.v1beta1.Msg/VerifyInvariant", - request, + msg_verify_invariant, MsgVerifyInvariantResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class MsgBase(ServiceBase): async def verify_invariant( - self, sender: str, invariant_module_name: str, invariant_route: str + self, msg_verify_invariant: "MsgVerifyInvariant" ) -> "MsgVerifyInvariantResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_verify_invariant(self, stream: grpclib.server.Stream) -> None: + async def __rpc_verify_invariant( + self, + stream: "grpclib.server.Stream[MsgVerifyInvariant, MsgVerifyInvariantResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "sender": request.sender, - "invariant_module_name": request.invariant_module_name, - "invariant_route": request.invariant_route, - } - - response = await self.verify_invariant(**request_kwargs) + response = await self.verify_invariant(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -85,6 +93,3 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: MsgVerifyInvariantResponse, ), } - - -from ...base import v1beta1 as __base_v1_beta1__ diff --git a/python/terra_proto/cosmos/crypto/ed25519/__init__.py b/python/terra_proto/cosmos/crypto/ed25519/__init__.py index db74774..5f00099 100644 --- a/python/terra_proto/cosmos/crypto/ed25519/__init__.py +++ b/python/terra_proto/cosmos/crypto/ed25519/__init__.py @@ -4,7 +4,6 @@ from dataclasses import dataclass import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) diff --git a/python/terra_proto/cosmos/crypto/multisig/__init__.py b/python/terra_proto/cosmos/crypto/multisig/__init__.py index 567f00a..0019eae 100644 --- a/python/terra_proto/cosmos/crypto/multisig/__init__.py +++ b/python/terra_proto/cosmos/crypto/multisig/__init__.py @@ -5,7 +5,7 @@ from typing import List import betterproto -from betterproto.grpc.grpclib_server import ServiceBase +import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf @dataclass(eq=False, repr=False) @@ -19,6 +19,3 @@ class LegacyAminoPubKey(betterproto.Message): public_keys: List[ "betterproto_lib_google_protobuf.Any" ] = betterproto.message_field(2) - - -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf diff --git a/python/terra_proto/cosmos/crypto/multisig/v1beta1/__init__.py b/python/terra_proto/cosmos/crypto/multisig/v1beta1/__init__.py index a2d1b6d..c6bea82 100644 --- a/python/terra_proto/cosmos/crypto/multisig/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/crypto/multisig/v1beta1/__init__.py @@ -5,7 +5,6 @@ from typing import List import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) diff --git a/python/terra_proto/cosmos/crypto/secp256k1/__init__.py b/python/terra_proto/cosmos/crypto/secp256k1/__init__.py index 6a2a44a..050d59e 100644 --- a/python/terra_proto/cosmos/crypto/secp256k1/__init__.py +++ b/python/terra_proto/cosmos/crypto/secp256k1/__init__.py @@ -4,7 +4,6 @@ from dataclasses import dataclass import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) diff --git a/python/terra_proto/cosmos/crypto/secp256r1/__init__.py b/python/terra_proto/cosmos/crypto/secp256r1/__init__.py index a63ec2e..54b9718 100644 --- a/python/terra_proto/cosmos/crypto/secp256r1/__init__.py +++ b/python/terra_proto/cosmos/crypto/secp256r1/__init__.py @@ -4,22 +4,23 @@ from dataclasses import dataclass import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) class PubKey(betterproto.Message): """PubKey defines a secp256r1 ECDSA public key.""" - # Point on secp256r1 curve in a compressed representation as specified in - # section 4.3.6 of ANSI X9.62: - # https://webstore.ansi.org/standards/ascx9/ansix9621998 key: bytes = betterproto.bytes_field(1) + """ + Point on secp256r1 curve in a compressed representation as specified in + section 4.3.6 of ANSI X9.62: + https://webstore.ansi.org/standards/ascx9/ansix9621998 + """ @dataclass(eq=False, repr=False) class PrivKey(betterproto.Message): """PrivKey defines a secp256r1 ECDSA private key.""" - # secret number serialized using big-endian encoding secret: bytes = betterproto.bytes_field(1) + """secret number serialized using big-endian encoding""" diff --git a/python/terra_proto/cosmos/distribution/v1beta1/__init__.py b/python/terra_proto/cosmos/distribution/v1beta1/__init__.py index e78a6f4..947415c 100644 --- a/python/terra_proto/cosmos/distribution/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/distribution/v1beta1/__init__.py @@ -2,11 +2,25 @@ # sources: cosmos/distribution/v1beta1/distribution.proto, cosmos/distribution/v1beta1/genesis.proto, cosmos/distribution/v1beta1/query.proto, cosmos/distribution/v1beta1/tx.proto # plugin: python-betterproto from dataclasses import dataclass -from typing import Dict, List, Optional +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ...base import v1beta1 as __base_v1_beta1__ +from ...base.query import v1beta1 as __base_query_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) @@ -252,8 +266,8 @@ class QueryParamsResponse(betterproto.Message): QueryParamsResponse is the response type for the Query/Params RPC method. """ - # params defines the parameters of the module. params: "Params" = betterproto.message_field(1) + """params defines the parameters of the module.""" @dataclass(eq=False, repr=False) @@ -263,8 +277,8 @@ class QueryValidatorOutstandingRewardsRequest(betterproto.Message): Query/ValidatorOutstandingRewards RPC method. """ - # validator_address defines the validator address to query for. validator_address: str = betterproto.string_field(1) + """validator_address defines the validator address to query for.""" @dataclass(eq=False, repr=False) @@ -284,8 +298,8 @@ class QueryValidatorCommissionRequest(betterproto.Message): Query/ValidatorCommission RPC method """ - # validator_address defines the validator address to query for. validator_address: str = betterproto.string_field(1) + """validator_address defines the validator address to query for.""" @dataclass(eq=False, repr=False) @@ -295,8 +309,8 @@ class QueryValidatorCommissionResponse(betterproto.Message): Query/ValidatorCommission RPC method """ - # commission defines the commision the validator received. commission: "ValidatorAccumulatedCommission" = betterproto.message_field(1) + """commission defines the commision the validator received.""" @dataclass(eq=False, repr=False) @@ -306,14 +320,21 @@ class QueryValidatorSlashesRequest(betterproto.Message): Query/ValidatorSlashes RPC method """ - # validator_address defines the validator address to query for. validator_address: str = betterproto.string_field(1) - # starting_height defines the optional starting height to query the slashes. + """validator_address defines the validator address to query for.""" + starting_height: int = betterproto.uint64_field(2) - # starting_height defines the optional ending height to query the slashes. + """ + starting_height defines the optional starting height to query the slashes. + """ + ending_height: int = betterproto.uint64_field(3) - # pagination defines an optional pagination for the request. + """ + starting_height defines the optional ending height to query the slashes. + """ + pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(4) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -323,10 +344,11 @@ class QueryValidatorSlashesResponse(betterproto.Message): Query/ValidatorSlashes RPC method. """ - # slashes defines the slashes the validator received. slashes: List["ValidatorSlashEvent"] = betterproto.message_field(1) - # pagination defines the pagination in the response. + """slashes defines the slashes the validator received.""" + pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) @@ -336,10 +358,11 @@ class QueryDelegationRewardsRequest(betterproto.Message): Query/DelegationRewards RPC method. """ - # delegator_address defines the delegator address to query for. delegator_address: str = betterproto.string_field(1) - # validator_address defines the validator address to query for. + """delegator_address defines the delegator address to query for.""" + validator_address: str = betterproto.string_field(2) + """validator_address defines the validator address to query for.""" @dataclass(eq=False, repr=False) @@ -349,8 +372,8 @@ class QueryDelegationRewardsResponse(betterproto.Message): Query/DelegationRewards RPC method. """ - # rewards defines the rewards accrued by a delegation. rewards: List["__base_v1_beta1__.DecCoin"] = betterproto.message_field(1) + """rewards defines the rewards accrued by a delegation.""" @dataclass(eq=False, repr=False) @@ -360,8 +383,8 @@ class QueryDelegationTotalRewardsRequest(betterproto.Message): Query/DelegationTotalRewards RPC method. """ - # delegator_address defines the delegator address to query for. delegator_address: str = betterproto.string_field(1) + """delegator_address defines the delegator address to query for.""" @dataclass(eq=False, repr=False) @@ -371,10 +394,11 @@ class QueryDelegationTotalRewardsResponse(betterproto.Message): Query/DelegationTotalRewards RPC method. """ - # rewards defines all the rewards accrued by a delegator. rewards: List["DelegationDelegatorReward"] = betterproto.message_field(1) - # total defines the sum of all the rewards. + """rewards defines all the rewards accrued by a delegator.""" + total: List["__base_v1_beta1__.DecCoin"] = betterproto.message_field(2) + """total defines the sum of all the rewards.""" @dataclass(eq=False, repr=False) @@ -384,8 +408,8 @@ class QueryDelegatorValidatorsRequest(betterproto.Message): Query/DelegatorValidators RPC method. """ - # delegator_address defines the delegator address to query for. delegator_address: str = betterproto.string_field(1) + """delegator_address defines the delegator address to query for.""" @dataclass(eq=False, repr=False) @@ -395,8 +419,8 @@ class QueryDelegatorValidatorsResponse(betterproto.Message): Query/DelegatorValidators RPC method. """ - # validators defines the validators a delegator is delegating for. validators: List[str] = betterproto.string_field(1) + """validators defines the validators a delegator is delegating for.""" @dataclass(eq=False, repr=False) @@ -406,8 +430,8 @@ class QueryDelegatorWithdrawAddressRequest(betterproto.Message): Query/DelegatorWithdrawAddress RPC method. """ - # delegator_address defines the delegator address to query for. delegator_address: str = betterproto.string_field(1) + """delegator_address defines the delegator address to query for.""" @dataclass(eq=False, repr=False) @@ -417,8 +441,8 @@ class QueryDelegatorWithdrawAddressResponse(betterproto.Message): Query/DelegatorWithdrawAddress RPC method. """ - # withdraw_address defines the delegator address to query for. withdraw_address: str = betterproto.string_field(1) + """withdraw_address defines the delegator address to query for.""" @dataclass(eq=False, repr=False) @@ -438,8 +462,8 @@ class QueryCommunityPoolResponse(betterproto.Message): RPC method. """ - # pool defines community pool's coins. pool: List["__base_v1_beta1__.DecCoin"] = betterproto.message_field(1) + """pool defines community pool's coins.""" @dataclass(eq=False, repr=False) @@ -450,10 +474,13 @@ class DelegatorWithdrawInfo(betterproto.Message): default withdraw addresses. """ - # delegator_address is the address of the delegator. delegator_address: str = betterproto.string_field(1) - # withdraw_address is the address to withdraw the delegation rewards to. + """delegator_address is the address of the delegator.""" + withdraw_address: str = betterproto.string_field(2) + """ + withdraw_address is the address to withdraw the delegation rewards to. + """ @dataclass(eq=False, repr=False) @@ -463,12 +490,15 @@ class ValidatorOutstandingRewardsRecord(betterproto.Message): json. """ - # validator_address is the address of the validator. validator_address: str = betterproto.string_field(1) - # outstanding_rewards represents the oustanding rewards of a validator. + """validator_address is the address of the validator.""" + outstanding_rewards: List["__base_v1_beta1__.DecCoin"] = betterproto.message_field( 2 ) + """ + outstanding_rewards represents the oustanding rewards of a validator. + """ @dataclass(eq=False, repr=False) @@ -478,10 +508,11 @@ class ValidatorAccumulatedCommissionRecord(betterproto.Message): genesis json. """ - # validator_address is the address of the validator. validator_address: str = betterproto.string_field(1) - # accumulated is the accumulated commission of a validator. + """validator_address is the address of the validator.""" + accumulated: "ValidatorAccumulatedCommission" = betterproto.message_field(2) + """accumulated is the accumulated commission of a validator.""" @dataclass(eq=False, repr=False) @@ -491,12 +522,14 @@ class ValidatorHistoricalRewardsRecord(betterproto.Message): json. """ - # validator_address is the address of the validator. validator_address: str = betterproto.string_field(1) - # period defines the period the historical rewards apply to. + """validator_address is the address of the validator.""" + period: int = betterproto.uint64_field(2) - # rewards defines the historical rewards of a validator. + """period defines the period the historical rewards apply to.""" + rewards: "ValidatorHistoricalRewards" = betterproto.message_field(3) + """rewards defines the historical rewards of a validator.""" @dataclass(eq=False, repr=False) @@ -505,10 +538,11 @@ class ValidatorCurrentRewardsRecord(betterproto.Message): ValidatorCurrentRewardsRecord is used for import / export via genesis json. """ - # validator_address is the address of the validator. validator_address: str = betterproto.string_field(1) - # rewards defines the current rewards of a validator. + """validator_address is the address of the validator.""" + rewards: "ValidatorCurrentRewards" = betterproto.message_field(2) + """rewards defines the current rewards of a validator.""" @dataclass(eq=False, repr=False) @@ -517,12 +551,14 @@ class DelegatorStartingInfoRecord(betterproto.Message): DelegatorStartingInfoRecord used for import / export via genesis json. """ - # delegator_address is the address of the delegator. delegator_address: str = betterproto.string_field(1) - # validator_address is the address of the validator. + """delegator_address is the address of the delegator.""" + validator_address: str = betterproto.string_field(2) - # starting_info defines the starting info of a delegator. + """validator_address is the address of the validator.""" + starting_info: "DelegatorStartingInfo" = betterproto.message_field(3) + """starting_info defines the starting info of a delegator.""" @dataclass(eq=False, repr=False) @@ -531,305 +567,350 @@ class ValidatorSlashEventRecord(betterproto.Message): ValidatorSlashEventRecord is used for import / export via genesis json. """ - # validator_address is the address of the validator. validator_address: str = betterproto.string_field(1) - # height defines the block height at which the slash event occured. + """validator_address is the address of the validator.""" + height: int = betterproto.uint64_field(2) - # period is the period of the slash event. + """height defines the block height at which the slash event occured.""" + period: int = betterproto.uint64_field(3) - # validator_slash_event describes the slash event. + """period is the period of the slash event.""" + validator_slash_event: "ValidatorSlashEvent" = betterproto.message_field(4) + """validator_slash_event describes the slash event.""" @dataclass(eq=False, repr=False) class GenesisState(betterproto.Message): """GenesisState defines the distribution module's genesis state.""" - # params defines all the paramaters of the module. params: "Params" = betterproto.message_field(1) - # fee_pool defines the fee pool at genesis. + """params defines all the paramaters of the module.""" + fee_pool: "FeePool" = betterproto.message_field(2) - # fee_pool defines the delegator withdraw infos at genesis. + """fee_pool defines the fee pool at genesis.""" + delegator_withdraw_infos: List["DelegatorWithdrawInfo"] = betterproto.message_field( 3 ) - # fee_pool defines the previous proposer at genesis. + """fee_pool defines the delegator withdraw infos at genesis.""" + previous_proposer: str = betterproto.string_field(4) - # fee_pool defines the outstanding rewards of all validators at genesis. + """fee_pool defines the previous proposer at genesis.""" + outstanding_rewards: List[ "ValidatorOutstandingRewardsRecord" ] = betterproto.message_field(5) - # fee_pool defines the accumulated commisions of all validators at genesis. + """ + fee_pool defines the outstanding rewards of all validators at genesis. + """ + validator_accumulated_commissions: List[ "ValidatorAccumulatedCommissionRecord" ] = betterproto.message_field(6) - # fee_pool defines the historical rewards of all validators at genesis. + """ + fee_pool defines the accumulated commisions of all validators at genesis. + """ + validator_historical_rewards: List[ "ValidatorHistoricalRewardsRecord" ] = betterproto.message_field(7) - # fee_pool defines the current rewards of all validators at genesis. + """ + fee_pool defines the historical rewards of all validators at genesis. + """ + validator_current_rewards: List[ "ValidatorCurrentRewardsRecord" ] = betterproto.message_field(8) - # fee_pool defines the delegator starting infos at genesis. + """fee_pool defines the current rewards of all validators at genesis.""" + delegator_starting_infos: List[ "DelegatorStartingInfoRecord" ] = betterproto.message_field(9) - # fee_pool defines the validator slash events at genesis. + """fee_pool defines the delegator starting infos at genesis.""" + validator_slash_events: List[ "ValidatorSlashEventRecord" ] = betterproto.message_field(10) + """fee_pool defines the validator slash events at genesis.""" class MsgStub(betterproto.ServiceStub): async def set_withdraw_address( - self, *, delegator_address: str = "", withdraw_address: str = "" + self, + msg_set_withdraw_address: "MsgSetWithdrawAddress", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgSetWithdrawAddressResponse": - - request = MsgSetWithdrawAddress() - request.delegator_address = delegator_address - request.withdraw_address = withdraw_address - return await self._unary_unary( "/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress", - request, + msg_set_withdraw_address, MsgSetWithdrawAddressResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def withdraw_delegator_reward( - self, *, delegator_address: str = "", validator_address: str = "" + self, + msg_withdraw_delegator_reward: "MsgWithdrawDelegatorReward", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgWithdrawDelegatorRewardResponse": - - request = MsgWithdrawDelegatorReward() - request.delegator_address = delegator_address - request.validator_address = validator_address - return await self._unary_unary( "/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward", - request, + msg_withdraw_delegator_reward, MsgWithdrawDelegatorRewardResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def withdraw_validator_commission( - self, *, validator_address: str = "" + self, + msg_withdraw_validator_commission: "MsgWithdrawValidatorCommission", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgWithdrawValidatorCommissionResponse": - - request = MsgWithdrawValidatorCommission() - request.validator_address = validator_address - return await self._unary_unary( "/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission", - request, + msg_withdraw_validator_commission, MsgWithdrawValidatorCommissionResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def fund_community_pool( self, + msg_fund_community_pool: "MsgFundCommunityPool", *, - amount: Optional[List["__base_v1_beta1__.Coin"]] = None, - depositor: str = "" + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgFundCommunityPoolResponse": - amount = amount or [] - - request = MsgFundCommunityPool() - if amount is not None: - request.amount = amount - request.depositor = depositor - return await self._unary_unary( "/cosmos.distribution.v1beta1.Msg/FundCommunityPool", - request, + msg_fund_community_pool, MsgFundCommunityPoolResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class QueryStub(betterproto.ServiceStub): - async def params(self) -> "QueryParamsResponse": - - request = QueryParamsRequest() - + async def params( + self, + query_params_request: "QueryParamsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryParamsResponse": return await self._unary_unary( - "/cosmos.distribution.v1beta1.Query/Params", request, QueryParamsResponse + "/cosmos.distribution.v1beta1.Query/Params", + query_params_request, + QueryParamsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def validator_outstanding_rewards( - self, *, validator_address: str = "" + self, + query_validator_outstanding_rewards_request: "QueryValidatorOutstandingRewardsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryValidatorOutstandingRewardsResponse": - - request = QueryValidatorOutstandingRewardsRequest() - request.validator_address = validator_address - return await self._unary_unary( "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", - request, + query_validator_outstanding_rewards_request, QueryValidatorOutstandingRewardsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def validator_commission( - self, *, validator_address: str = "" + self, + query_validator_commission_request: "QueryValidatorCommissionRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryValidatorCommissionResponse": - - request = QueryValidatorCommissionRequest() - request.validator_address = validator_address - return await self._unary_unary( "/cosmos.distribution.v1beta1.Query/ValidatorCommission", - request, + query_validator_commission_request, QueryValidatorCommissionResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def validator_slashes( self, + query_validator_slashes_request: "QueryValidatorSlashesRequest", *, - validator_address: str = "", - starting_height: int = 0, - ending_height: int = 0, - pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryValidatorSlashesResponse": - - request = QueryValidatorSlashesRequest() - request.validator_address = validator_address - request.starting_height = starting_height - request.ending_height = ending_height - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( "/cosmos.distribution.v1beta1.Query/ValidatorSlashes", - request, + query_validator_slashes_request, QueryValidatorSlashesResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def delegation_rewards( - self, *, delegator_address: str = "", validator_address: str = "" + self, + query_delegation_rewards_request: "QueryDelegationRewardsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryDelegationRewardsResponse": - - request = QueryDelegationRewardsRequest() - request.delegator_address = delegator_address - request.validator_address = validator_address - return await self._unary_unary( "/cosmos.distribution.v1beta1.Query/DelegationRewards", - request, + query_delegation_rewards_request, QueryDelegationRewardsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def delegation_total_rewards( - self, *, delegator_address: str = "" + self, + query_delegation_total_rewards_request: "QueryDelegationTotalRewardsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryDelegationTotalRewardsResponse": - - request = QueryDelegationTotalRewardsRequest() - request.delegator_address = delegator_address - return await self._unary_unary( "/cosmos.distribution.v1beta1.Query/DelegationTotalRewards", - request, + query_delegation_total_rewards_request, QueryDelegationTotalRewardsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def delegator_validators( - self, *, delegator_address: str = "" + self, + query_delegator_validators_request: "QueryDelegatorValidatorsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryDelegatorValidatorsResponse": - - request = QueryDelegatorValidatorsRequest() - request.delegator_address = delegator_address - return await self._unary_unary( "/cosmos.distribution.v1beta1.Query/DelegatorValidators", - request, + query_delegator_validators_request, QueryDelegatorValidatorsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def delegator_withdraw_address( - self, *, delegator_address: str = "" + self, + query_delegator_withdraw_address_request: "QueryDelegatorWithdrawAddressRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryDelegatorWithdrawAddressResponse": - - request = QueryDelegatorWithdrawAddressRequest() - request.delegator_address = delegator_address - return await self._unary_unary( "/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", - request, + query_delegator_withdraw_address_request, QueryDelegatorWithdrawAddressResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def community_pool(self) -> "QueryCommunityPoolResponse": - - request = QueryCommunityPoolRequest() - + async def community_pool( + self, + query_community_pool_request: "QueryCommunityPoolRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryCommunityPoolResponse": return await self._unary_unary( "/cosmos.distribution.v1beta1.Query/CommunityPool", - request, + query_community_pool_request, QueryCommunityPoolResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class MsgBase(ServiceBase): async def set_withdraw_address( - self, delegator_address: str, withdraw_address: str + self, msg_set_withdraw_address: "MsgSetWithdrawAddress" ) -> "MsgSetWithdrawAddressResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def withdraw_delegator_reward( - self, delegator_address: str, validator_address: str + self, msg_withdraw_delegator_reward: "MsgWithdrawDelegatorReward" ) -> "MsgWithdrawDelegatorRewardResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def withdraw_validator_commission( - self, validator_address: str + self, msg_withdraw_validator_commission: "MsgWithdrawValidatorCommission" ) -> "MsgWithdrawValidatorCommissionResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def fund_community_pool( - self, amount: Optional[List["__base_v1_beta1__.Coin"]], depositor: str + self, msg_fund_community_pool: "MsgFundCommunityPool" ) -> "MsgFundCommunityPoolResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_set_withdraw_address(self, stream: grpclib.server.Stream) -> None: + async def __rpc_set_withdraw_address( + self, + stream: "grpclib.server.Stream[MsgSetWithdrawAddress, MsgSetWithdrawAddressResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_address": request.delegator_address, - "withdraw_address": request.withdraw_address, - } - - response = await self.set_withdraw_address(**request_kwargs) + response = await self.set_withdraw_address(request) await stream.send_message(response) async def __rpc_withdraw_delegator_reward( - self, stream: grpclib.server.Stream + self, + stream: "grpclib.server.Stream[MsgWithdrawDelegatorReward, MsgWithdrawDelegatorRewardResponse]", ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_address": request.delegator_address, - "validator_address": request.validator_address, - } - - response = await self.withdraw_delegator_reward(**request_kwargs) + response = await self.withdraw_delegator_reward(request) await stream.send_message(response) async def __rpc_withdraw_validator_commission( - self, stream: grpclib.server.Stream + self, + stream: "grpclib.server.Stream[MsgWithdrawValidatorCommission, MsgWithdrawValidatorCommissionResponse]", ) -> None: request = await stream.recv_message() - - request_kwargs = { - "validator_address": request.validator_address, - } - - response = await self.withdraw_validator_commission(**request_kwargs) + response = await self.withdraw_validator_commission(request) await stream.send_message(response) - async def __rpc_fund_community_pool(self, stream: grpclib.server.Stream) -> None: + async def __rpc_fund_community_pool( + self, + stream: "grpclib.server.Stream[MsgFundCommunityPool, MsgFundCommunityPoolResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "amount": request.amount, - "depositor": request.depositor, - } - - response = await self.fund_community_pool(**request_kwargs) + response = await self.fund_community_pool(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -862,145 +943,123 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: class QueryBase(ServiceBase): - async def params(self) -> "QueryParamsResponse": + async def params( + self, query_params_request: "QueryParamsRequest" + ) -> "QueryParamsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def validator_outstanding_rewards( - self, validator_address: str + self, + query_validator_outstanding_rewards_request: "QueryValidatorOutstandingRewardsRequest", ) -> "QueryValidatorOutstandingRewardsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def validator_commission( - self, validator_address: str + self, query_validator_commission_request: "QueryValidatorCommissionRequest" ) -> "QueryValidatorCommissionResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def validator_slashes( - self, - validator_address: str, - starting_height: int, - ending_height: int, - pagination: "__base_query_v1_beta1__.PageRequest", + self, query_validator_slashes_request: "QueryValidatorSlashesRequest" ) -> "QueryValidatorSlashesResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def delegation_rewards( - self, delegator_address: str, validator_address: str + self, query_delegation_rewards_request: "QueryDelegationRewardsRequest" ) -> "QueryDelegationRewardsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def delegation_total_rewards( - self, delegator_address: str + self, + query_delegation_total_rewards_request: "QueryDelegationTotalRewardsRequest", ) -> "QueryDelegationTotalRewardsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def delegator_validators( - self, delegator_address: str + self, query_delegator_validators_request: "QueryDelegatorValidatorsRequest" ) -> "QueryDelegatorValidatorsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def delegator_withdraw_address( - self, delegator_address: str + self, + query_delegator_withdraw_address_request: "QueryDelegatorWithdrawAddressRequest", ) -> "QueryDelegatorWithdrawAddressResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def community_pool(self) -> "QueryCommunityPoolResponse": + async def community_pool( + self, query_community_pool_request: "QueryCommunityPoolRequest" + ) -> "QueryCommunityPoolResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_params(self, stream: grpclib.server.Stream) -> None: + async def __rpc_params( + self, stream: "grpclib.server.Stream[QueryParamsRequest, QueryParamsResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.params(**request_kwargs) + response = await self.params(request) await stream.send_message(response) async def __rpc_validator_outstanding_rewards( - self, stream: grpclib.server.Stream + self, + stream: "grpclib.server.Stream[QueryValidatorOutstandingRewardsRequest, QueryValidatorOutstandingRewardsResponse]", ) -> None: request = await stream.recv_message() - - request_kwargs = { - "validator_address": request.validator_address, - } - - response = await self.validator_outstanding_rewards(**request_kwargs) + response = await self.validator_outstanding_rewards(request) await stream.send_message(response) - async def __rpc_validator_commission(self, stream: grpclib.server.Stream) -> None: + async def __rpc_validator_commission( + self, + stream: "grpclib.server.Stream[QueryValidatorCommissionRequest, QueryValidatorCommissionResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "validator_address": request.validator_address, - } - - response = await self.validator_commission(**request_kwargs) + response = await self.validator_commission(request) await stream.send_message(response) - async def __rpc_validator_slashes(self, stream: grpclib.server.Stream) -> None: + async def __rpc_validator_slashes( + self, + stream: "grpclib.server.Stream[QueryValidatorSlashesRequest, QueryValidatorSlashesResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "validator_address": request.validator_address, - "starting_height": request.starting_height, - "ending_height": request.ending_height, - "pagination": request.pagination, - } - - response = await self.validator_slashes(**request_kwargs) + response = await self.validator_slashes(request) await stream.send_message(response) - async def __rpc_delegation_rewards(self, stream: grpclib.server.Stream) -> None: + async def __rpc_delegation_rewards( + self, + stream: "grpclib.server.Stream[QueryDelegationRewardsRequest, QueryDelegationRewardsResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_address": request.delegator_address, - "validator_address": request.validator_address, - } - - response = await self.delegation_rewards(**request_kwargs) + response = await self.delegation_rewards(request) await stream.send_message(response) async def __rpc_delegation_total_rewards( - self, stream: grpclib.server.Stream + self, + stream: "grpclib.server.Stream[QueryDelegationTotalRewardsRequest, QueryDelegationTotalRewardsResponse]", ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_address": request.delegator_address, - } - - response = await self.delegation_total_rewards(**request_kwargs) + response = await self.delegation_total_rewards(request) await stream.send_message(response) - async def __rpc_delegator_validators(self, stream: grpclib.server.Stream) -> None: + async def __rpc_delegator_validators( + self, + stream: "grpclib.server.Stream[QueryDelegatorValidatorsRequest, QueryDelegatorValidatorsResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_address": request.delegator_address, - } - - response = await self.delegator_validators(**request_kwargs) + response = await self.delegator_validators(request) await stream.send_message(response) async def __rpc_delegator_withdraw_address( - self, stream: grpclib.server.Stream + self, + stream: "grpclib.server.Stream[QueryDelegatorWithdrawAddressRequest, QueryDelegatorWithdrawAddressResponse]", ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_address": request.delegator_address, - } - - response = await self.delegator_withdraw_address(**request_kwargs) + response = await self.delegator_withdraw_address(request) await stream.send_message(response) - async def __rpc_community_pool(self, stream: grpclib.server.Stream) -> None: + async def __rpc_community_pool( + self, + stream: "grpclib.server.Stream[QueryCommunityPoolRequest, QueryCommunityPoolResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.community_pool(**request_kwargs) + response = await self.community_pool(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -1060,7 +1119,3 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: QueryCommunityPoolResponse, ), } - - -from ...base import v1beta1 as __base_v1_beta1__ -from ...base.query import v1beta1 as __base_query_v1_beta1__ diff --git a/python/terra_proto/cosmos/evidence/v1beta1/__init__.py b/python/terra_proto/cosmos/evidence/v1beta1/__init__.py index 5ee9f17..57fd211 100644 --- a/python/terra_proto/cosmos/evidence/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/evidence/v1beta1/__init__.py @@ -3,11 +3,25 @@ # plugin: python-betterproto from dataclasses import dataclass from datetime import datetime -from typing import Dict, List +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase +import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ...base.query import v1beta1 as __base_query_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) @@ -27,8 +41,8 @@ class MsgSubmitEvidenceResponse(betterproto.Message): MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. """ - # hash defines the hash of the evidence. hash: bytes = betterproto.bytes_field(4) + """hash defines the hash of the evidence.""" @dataclass(eq=False, repr=False) @@ -50,8 +64,8 @@ class QueryEvidenceRequest(betterproto.Message): QueryEvidenceRequest is the request type for the Query/Evidence RPC method. """ - # evidence_hash defines the hash of the requested evidence. evidence_hash: bytes = betterproto.bytes_field(1) + """evidence_hash defines the hash of the requested evidence.""" @dataclass(eq=False, repr=False) @@ -61,8 +75,8 @@ class QueryEvidenceResponse(betterproto.Message): method. """ - # evidence returns the requested evidence. evidence: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(1) + """evidence returns the requested evidence.""" @dataclass(eq=False, repr=False) @@ -72,8 +86,8 @@ class QueryAllEvidenceRequest(betterproto.Message): method. """ - # pagination defines an optional pagination for the request. pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(1) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -83,80 +97,88 @@ class QueryAllEvidenceResponse(betterproto.Message): method. """ - # evidence returns all evidences. evidence: List["betterproto_lib_google_protobuf.Any"] = betterproto.message_field(1) - # pagination defines the pagination in the response. + """evidence returns all evidences.""" + pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) class GenesisState(betterproto.Message): """GenesisState defines the evidence module's genesis state.""" - # evidence defines all the evidence at genesis. evidence: List["betterproto_lib_google_protobuf.Any"] = betterproto.message_field(1) + """evidence defines all the evidence at genesis.""" class MsgStub(betterproto.ServiceStub): async def submit_evidence( self, + msg_submit_evidence: "MsgSubmitEvidence", *, - submitter: str = "", - evidence: "betterproto_lib_google_protobuf.Any" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgSubmitEvidenceResponse": - - request = MsgSubmitEvidence() - request.submitter = submitter - if evidence is not None: - request.evidence = evidence - return await self._unary_unary( "/cosmos.evidence.v1beta1.Msg/SubmitEvidence", - request, + msg_submit_evidence, MsgSubmitEvidenceResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class QueryStub(betterproto.ServiceStub): - async def evidence(self, *, evidence_hash: bytes = b"") -> "QueryEvidenceResponse": - - request = QueryEvidenceRequest() - request.evidence_hash = evidence_hash - + async def evidence( + self, + query_evidence_request: "QueryEvidenceRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryEvidenceResponse": return await self._unary_unary( - "/cosmos.evidence.v1beta1.Query/Evidence", request, QueryEvidenceResponse + "/cosmos.evidence.v1beta1.Query/Evidence", + query_evidence_request, + QueryEvidenceResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def all_evidence( - self, *, pagination: "__base_query_v1_beta1__.PageRequest" = None + self, + query_all_evidence_request: "QueryAllEvidenceRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryAllEvidenceResponse": - - request = QueryAllEvidenceRequest() - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( "/cosmos.evidence.v1beta1.Query/AllEvidence", - request, + query_all_evidence_request, QueryAllEvidenceResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class MsgBase(ServiceBase): async def submit_evidence( - self, submitter: str, evidence: "betterproto_lib_google_protobuf.Any" + self, msg_submit_evidence: "MsgSubmitEvidence" ) -> "MsgSubmitEvidenceResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_submit_evidence(self, stream: grpclib.server.Stream) -> None: + async def __rpc_submit_evidence( + self, + stream: "grpclib.server.Stream[MsgSubmitEvidence, MsgSubmitEvidenceResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "submitter": request.submitter, - "evidence": request.evidence, - } - - response = await self.submit_evidence(**request_kwargs) + response = await self.submit_evidence(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -171,32 +193,30 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: class QueryBase(ServiceBase): - async def evidence(self, evidence_hash: bytes) -> "QueryEvidenceResponse": + async def evidence( + self, query_evidence_request: "QueryEvidenceRequest" + ) -> "QueryEvidenceResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def all_evidence( - self, pagination: "__base_query_v1_beta1__.PageRequest" + self, query_all_evidence_request: "QueryAllEvidenceRequest" ) -> "QueryAllEvidenceResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_evidence(self, stream: grpclib.server.Stream) -> None: + async def __rpc_evidence( + self, + stream: "grpclib.server.Stream[QueryEvidenceRequest, QueryEvidenceResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "evidence_hash": request.evidence_hash, - } - - response = await self.evidence(**request_kwargs) + response = await self.evidence(request) await stream.send_message(response) - async def __rpc_all_evidence(self, stream: grpclib.server.Stream) -> None: + async def __rpc_all_evidence( + self, + stream: "grpclib.server.Stream[QueryAllEvidenceRequest, QueryAllEvidenceResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "pagination": request.pagination, - } - - response = await self.all_evidence(**request_kwargs) + response = await self.all_evidence(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -214,7 +234,3 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: QueryAllEvidenceResponse, ), } - - -from ...base.query import v1beta1 as __base_query_v1_beta1__ -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf diff --git a/python/terra_proto/cosmos/feegrant/v1beta1/__init__.py b/python/terra_proto/cosmos/feegrant/v1beta1/__init__.py index ce4f821..116402b 100644 --- a/python/terra_proto/cosmos/feegrant/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/feegrant/v1beta1/__init__.py @@ -2,12 +2,30 @@ # sources: cosmos/feegrant/v1beta1/feegrant.proto, cosmos/feegrant/v1beta1/genesis.proto, cosmos/feegrant/v1beta1/query.proto, cosmos/feegrant/v1beta1/tx.proto # plugin: python-betterproto from dataclasses import dataclass -from datetime import datetime, timedelta -from typing import Dict, List +from datetime import ( + datetime, + timedelta, +) +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase +import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ...base import v1beta1 as __base_v1_beta1__ +from ...base.query import v1beta1 as __base_query_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) @@ -17,13 +35,19 @@ class MsgGrantAllowance(betterproto.Message): fees from the account of Granter. """ - # granter is the address of the user granting an allowance of their funds. granter: str = betterproto.string_field(1) - # grantee is the address of the user being granted an allowance of another - # user's funds. + """ + granter is the address of the user granting an allowance of their funds. + """ + grantee: str = betterproto.string_field(2) - # allowance can be any of basic and filtered fee allowance. + """ + grantee is the address of the user being granted an allowance of another + user's funds. + """ + allowance: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(3) + """allowance can be any of basic and filtered fee allowance.""" @dataclass(eq=False, repr=False) @@ -42,11 +66,16 @@ class MsgRevokeAllowance(betterproto.Message): MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. """ - # granter is the address of the user granting an allowance of their funds. granter: str = betterproto.string_field(1) - # grantee is the address of the user being granted an allowance of another - # user's funds. + """ + granter is the address of the user granting an allowance of their funds. + """ + grantee: str = betterproto.string_field(2) + """ + grantee is the address of the user being granted an allowance of another + user's funds. + """ @dataclass(eq=False, repr=False) @@ -66,12 +95,15 @@ class BasicAllowance(betterproto.Message): optionally expires. The grantee can use up to SpendLimit to cover fees. """ - # spend_limit specifies the maximum amount of tokens that can be spent by - # this allowance and will be updated as tokens are spent. If it is empty, - # there is no spend limit and any amount of coins can be spent. spend_limit: List["__base_v1_beta1__.Coin"] = betterproto.message_field(1) - # expiration specifies an optional time when this allowance expires + """ + spend_limit specifies the maximum amount of tokens that can be spent by + this allowance and will be updated as tokens are spent. If it is empty, + there is no spend limit and any amount of coins can be spent. + """ + expiration: datetime = betterproto.message_field(2) + """expiration specifies an optional time when this allowance expires""" @dataclass(eq=False, repr=False) @@ -81,21 +113,33 @@ class PeriodicAllowance(betterproto.Message): well as a limit per time period. """ - # basic specifies a struct of `BasicAllowance` basic: "BasicAllowance" = betterproto.message_field(1) - # period specifies the time duration in which period_spend_limit coins can be - # spent before that allowance is reset + """basic specifies a struct of `BasicAllowance`""" + period: timedelta = betterproto.message_field(2) - # period_spend_limit specifies the maximum number of coins that can be spent - # in the period + """ + period specifies the time duration in which period_spend_limit coins can be + spent before that allowance is reset + """ + period_spend_limit: List["__base_v1_beta1__.Coin"] = betterproto.message_field(3) - # period_can_spend is the number of coins left to be spent before the - # period_reset time + """ + period_spend_limit specifies the maximum number of coins that can be spent + in the period + """ + period_can_spend: List["__base_v1_beta1__.Coin"] = betterproto.message_field(4) - # period_reset is the time at which this period resets and a new one begins, - # it is calculated from the start time of the first transaction after the - # last period ended + """ + period_can_spend is the number of coins left to be spent before the + period_reset time + """ + period_reset: datetime = betterproto.message_field(5) + """ + period_reset is the time at which this period resets and a new one begins, + it is calculated from the start time of the first transaction after the + last period ended + """ @dataclass(eq=False, repr=False) @@ -104,23 +148,32 @@ class AllowedMsgAllowance(betterproto.Message): AllowedMsgAllowance creates allowance only for specified message types. """ - # allowance can be any of basic and filtered fee allowance. allowance: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(1) - # allowed_messages are the messages for which the grantee has the access. + """allowance can be any of basic and filtered fee allowance.""" + allowed_messages: List[str] = betterproto.string_field(2) + """ + allowed_messages are the messages for which the grantee has the access. + """ @dataclass(eq=False, repr=False) class Grant(betterproto.Message): """Grant is stored in the KVStore to record a grant with full context""" - # granter is the address of the user granting an allowance of their funds. granter: str = betterproto.string_field(1) - # grantee is the address of the user being granted an allowance of another - # user's funds. + """ + granter is the address of the user granting an allowance of their funds. + """ + grantee: str = betterproto.string_field(2) - # allowance can be any of basic and filtered fee allowance. + """ + grantee is the address of the user being granted an allowance of another + user's funds. + """ + allowance: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(3) + """allowance can be any of basic and filtered fee allowance.""" @dataclass(eq=False, repr=False) @@ -130,11 +183,16 @@ class QueryAllowanceRequest(betterproto.Message): method. """ - # granter is the address of the user granting an allowance of their funds. granter: str = betterproto.string_field(1) - # grantee is the address of the user being granted an allowance of another - # user's funds. + """ + granter is the address of the user granting an allowance of their funds. + """ + grantee: str = betterproto.string_field(2) + """ + grantee is the address of the user being granted an allowance of another + user's funds. + """ @dataclass(eq=False, repr=False) @@ -144,8 +202,8 @@ class QueryAllowanceResponse(betterproto.Message): method. """ - # allowance is a allowance granted for grantee by granter. allowance: "Grant" = betterproto.message_field(1) + """allowance is a allowance granted for grantee by granter.""" @dataclass(eq=False, repr=False) @@ -156,8 +214,8 @@ class QueryAllowancesRequest(betterproto.Message): """ grantee: str = betterproto.string_field(1) - # pagination defines an pagination for the request. pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) + """pagination defines an pagination for the request.""" @dataclass(eq=False, repr=False) @@ -167,35 +225,11 @@ class QueryAllowancesResponse(betterproto.Message): method. """ - # allowances are allowance's granted for grantee by granter. allowances: List["Grant"] = betterproto.message_field(1) - # pagination defines an pagination for the response. - pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) - - -@dataclass(eq=False, repr=False) -class QueryAllowancesByGranterRequest(betterproto.Message): - """ - QueryAllowancesByGranterRequest is the request type for the - Query/AllowancesByGranter RPC method. - """ - - granter: str = betterproto.string_field(1) - # pagination defines an pagination for the request. - pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) - + """allowances are allowance's granted for grantee by granter.""" -@dataclass(eq=False, repr=False) -class QueryAllowancesByGranterResponse(betterproto.Message): - """ - QueryAllowancesByGranterResponse is the response type for the - Query/AllowancesByGranter RPC method. - """ - - # allowances that have been issued by the granter. - allowances: List["Grant"] = betterproto.message_field(1) - # pagination defines an pagination for the response. pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines an pagination for the response.""" @dataclass(eq=False, repr=False) @@ -210,124 +244,100 @@ class GenesisState(betterproto.Message): class MsgStub(betterproto.ServiceStub): async def grant_allowance( self, + msg_grant_allowance: "MsgGrantAllowance", *, - granter: str = "", - grantee: str = "", - allowance: "betterproto_lib_google_protobuf.Any" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgGrantAllowanceResponse": - - request = MsgGrantAllowance() - request.granter = granter - request.grantee = grantee - if allowance is not None: - request.allowance = allowance - return await self._unary_unary( "/cosmos.feegrant.v1beta1.Msg/GrantAllowance", - request, + msg_grant_allowance, MsgGrantAllowanceResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def revoke_allowance( - self, *, granter: str = "", grantee: str = "" + self, + msg_revoke_allowance: "MsgRevokeAllowance", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgRevokeAllowanceResponse": - - request = MsgRevokeAllowance() - request.granter = granter - request.grantee = grantee - return await self._unary_unary( "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance", - request, + msg_revoke_allowance, MsgRevokeAllowanceResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class QueryStub(betterproto.ServiceStub): async def allowance( - self, *, granter: str = "", grantee: str = "" + self, + query_allowance_request: "QueryAllowanceRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryAllowanceResponse": - - request = QueryAllowanceRequest() - request.granter = granter - request.grantee = grantee - return await self._unary_unary( - "/cosmos.feegrant.v1beta1.Query/Allowance", request, QueryAllowanceResponse + "/cosmos.feegrant.v1beta1.Query/Allowance", + query_allowance_request, + QueryAllowanceResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def allowances( self, + query_allowances_request: "QueryAllowancesRequest", *, - grantee: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryAllowancesResponse": - - request = QueryAllowancesRequest() - request.grantee = grantee - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( "/cosmos.feegrant.v1beta1.Query/Allowances", - request, + query_allowances_request, QueryAllowancesResponse, - ) - - async def allowances_by_granter( - self, - *, - granter: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None - ) -> "QueryAllowancesByGranterResponse": - - request = QueryAllowancesByGranterRequest() - request.granter = granter - if pagination is not None: - request.pagination = pagination - - return await self._unary_unary( - "/cosmos.feegrant.v1beta1.Query/AllowancesByGranter", - request, - QueryAllowancesByGranterResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class MsgBase(ServiceBase): async def grant_allowance( - self, - granter: str, - grantee: str, - allowance: "betterproto_lib_google_protobuf.Any", + self, msg_grant_allowance: "MsgGrantAllowance" ) -> "MsgGrantAllowanceResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def revoke_allowance( - self, granter: str, grantee: str + self, msg_revoke_allowance: "MsgRevokeAllowance" ) -> "MsgRevokeAllowanceResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_grant_allowance(self, stream: grpclib.server.Stream) -> None: + async def __rpc_grant_allowance( + self, + stream: "grpclib.server.Stream[MsgGrantAllowance, MsgGrantAllowanceResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "granter": request.granter, - "grantee": request.grantee, - "allowance": request.allowance, - } - - response = await self.grant_allowance(**request_kwargs) + response = await self.grant_allowance(request) await stream.send_message(response) - async def __rpc_revoke_allowance(self, stream: grpclib.server.Stream) -> None: + async def __rpc_revoke_allowance( + self, + stream: "grpclib.server.Stream[MsgRevokeAllowance, MsgRevokeAllowanceResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "granter": request.granter, - "grantee": request.grantee, - } - - response = await self.revoke_allowance(**request_kwargs) + response = await self.revoke_allowance(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -348,50 +358,30 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: class QueryBase(ServiceBase): - async def allowance(self, granter: str, grantee: str) -> "QueryAllowanceResponse": + async def allowance( + self, query_allowance_request: "QueryAllowanceRequest" + ) -> "QueryAllowanceResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def allowances( - self, grantee: str, pagination: "__base_query_v1_beta1__.PageRequest" + self, query_allowances_request: "QueryAllowancesRequest" ) -> "QueryAllowancesResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def allowances_by_granter( - self, granter: str, pagination: "__base_query_v1_beta1__.PageRequest" - ) -> "QueryAllowancesByGranterResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def __rpc_allowance(self, stream: grpclib.server.Stream) -> None: + async def __rpc_allowance( + self, + stream: "grpclib.server.Stream[QueryAllowanceRequest, QueryAllowanceResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "granter": request.granter, - "grantee": request.grantee, - } - - response = await self.allowance(**request_kwargs) + response = await self.allowance(request) await stream.send_message(response) - async def __rpc_allowances(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "grantee": request.grantee, - "pagination": request.pagination, - } - - response = await self.allowances(**request_kwargs) - await stream.send_message(response) - - async def __rpc_allowances_by_granter(self, stream: grpclib.server.Stream) -> None: + async def __rpc_allowances( + self, + stream: "grpclib.server.Stream[QueryAllowancesRequest, QueryAllowancesResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "granter": request.granter, - "pagination": request.pagination, - } - - response = await self.allowances_by_granter(**request_kwargs) + response = await self.allowances(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -408,15 +398,4 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: QueryAllowancesRequest, QueryAllowancesResponse, ), - "/cosmos.feegrant.v1beta1.Query/AllowancesByGranter": grpclib.const.Handler( - self.__rpc_allowances_by_granter, - grpclib.const.Cardinality.UNARY_UNARY, - QueryAllowancesByGranterRequest, - QueryAllowancesByGranterResponse, - ), } - - -from ...base import v1beta1 as __base_v1_beta1__ -from ...base.query import v1beta1 as __base_query_v1_beta1__ -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf diff --git a/python/terra_proto/cosmos/genutil/v1beta1/__init__.py b/python/terra_proto/cosmos/genutil/v1beta1/__init__.py index d5eefbd..133c5ae 100644 --- a/python/terra_proto/cosmos/genutil/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/genutil/v1beta1/__init__.py @@ -5,12 +5,11 @@ from typing import List import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) class GenesisState(betterproto.Message): """GenesisState defines the raw genesis transaction in JSON.""" - # gen_txs defines the genesis transactions. gen_txs: List[bytes] = betterproto.bytes_field(1) + """gen_txs defines the genesis transactions.""" diff --git a/python/terra_proto/cosmos/gov/v1beta1/__init__.py b/python/terra_proto/cosmos/gov/v1beta1/__init__.py index d80967b..f4b6acc 100644 --- a/python/terra_proto/cosmos/gov/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/gov/v1beta1/__init__.py @@ -3,12 +3,30 @@ # plugin: python-betterproto import warnings from dataclasses import dataclass -from datetime import datetime, timedelta -from typing import Dict, List, Optional +from datetime import ( + datetime, + timedelta, +) +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase +import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ...base import v1beta1 as __base_v1_beta1__ +from ...base.query import v1beta1 as __base_query_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline class VoteOption(betterproto.Enum): @@ -17,38 +35,57 @@ class VoteOption(betterproto.Enum): proposal. """ - # VOTE_OPTION_UNSPECIFIED defines a no-op vote option. VOTE_OPTION_UNSPECIFIED = 0 - # VOTE_OPTION_YES defines a yes vote option. + """VOTE_OPTION_UNSPECIFIED defines a no-op vote option.""" + VOTE_OPTION_YES = 1 - # VOTE_OPTION_ABSTAIN defines an abstain vote option. + """VOTE_OPTION_YES defines a yes vote option.""" + VOTE_OPTION_ABSTAIN = 2 - # VOTE_OPTION_NO defines a no vote option. + """VOTE_OPTION_ABSTAIN defines an abstain vote option.""" + VOTE_OPTION_NO = 3 - # VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + """VOTE_OPTION_NO defines a no vote option.""" + VOTE_OPTION_NO_WITH_VETO = 4 + """VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.""" class ProposalStatus(betterproto.Enum): """ProposalStatus enumerates the valid statuses of a proposal.""" - # PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. PROPOSAL_STATUS_UNSPECIFIED = 0 - # PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - # period. + """PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status.""" + PROPOSAL_STATUS_DEPOSIT_PERIOD = 1 - # PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - # period. + """ + PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + """ + PROPOSAL_STATUS_VOTING_PERIOD = 2 - # PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - # passed. + """ + PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + """ + PROPOSAL_STATUS_PASSED = 3 - # PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - # been rejected. + """ + PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + """ + PROPOSAL_STATUS_REJECTED = 4 - # PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - # failed. + """ + PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + """ + PROPOSAL_STATUS_FAILED = 5 + """ + PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + """ @dataclass(eq=False, repr=False) @@ -119,16 +156,19 @@ class Vote(betterproto.Message): proposal_id: int = betterproto.uint64_field(1) voter: str = betterproto.string_field(2) - # Deprecated: Prefer to use `options` instead. This field is set in queries - # if and only if `len(options) == 1` and that option has weight 1. In all - # other cases, this field will default to VOTE_OPTION_UNSPECIFIED. option: "VoteOption" = betterproto.enum_field(3) - # Since: cosmos-sdk 0.43 + """ + Deprecated: Prefer to use `options` instead. This field is set in queries + if and only if `len(options) == 1` and that option has weight 1. In all + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + """ + options: List["WeightedVoteOption"] = betterproto.message_field(4) + """Since: cosmos-sdk 0.43""" def __post_init__(self) -> None: super().__post_init__() - if self.option: + if self.is_set("option"): warnings.warn("Vote.option is deprecated", DeprecationWarning) @@ -138,19 +178,22 @@ class DepositParams(betterproto.Message): DepositParams defines the params for deposits on governance proposals. """ - # Minimum deposit for a proposal to enter voting period. min_deposit: List["__base_v1_beta1__.Coin"] = betterproto.message_field(1) - # Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - # months. + """Minimum deposit for a proposal to enter voting period.""" + max_deposit_period: timedelta = betterproto.message_field(2) + """ + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + """ @dataclass(eq=False, repr=False) class VotingParams(betterproto.Message): """VotingParams defines the params for voting on governance proposals.""" - # Length of the voting period. voting_period: timedelta = betterproto.message_field(1) + """Length of the voting period.""" @dataclass(eq=False, repr=False) @@ -159,14 +202,22 @@ class TallyParams(betterproto.Message): TallyParams defines the params for tallying votes on governance proposals. """ - # Minimum percentage of total stake needed to vote for a result to be - # considered valid. quorum: bytes = betterproto.bytes_field(1) - # Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. + """ + Minimum percentage of total stake needed to vote for a result to be + considered valid. + """ + threshold: bytes = betterproto.bytes_field(2) - # Minimum value of Veto votes to Total votes ratio for proposal to be - # vetoed. Default value: 1/3. + """ + Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. + """ + veto_threshold: bytes = betterproto.bytes_field(3) + """ + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + """ @dataclass(eq=False, repr=False) @@ -251,8 +302,8 @@ class QueryProposalRequest(betterproto.Message): QueryProposalRequest is the request type for the Query/Proposal RPC method. """ - # proposal_id defines the unique id of the proposal. proposal_id: int = betterproto.uint64_field(1) + """proposal_id defines the unique id of the proposal.""" @dataclass(eq=False, repr=False) @@ -272,14 +323,17 @@ class QueryProposalsRequest(betterproto.Message): method. """ - # proposal_status defines the status of the proposals. proposal_status: "ProposalStatus" = betterproto.enum_field(1) - # voter defines the voter address for the proposals. + """proposal_status defines the status of the proposals.""" + voter: str = betterproto.string_field(2) - # depositor defines the deposit addresses from the proposals. + """voter defines the voter address for the proposals.""" + depositor: str = betterproto.string_field(3) - # pagination defines an optional pagination for the request. + """depositor defines the deposit addresses from the proposals.""" + pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(4) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -290,18 +344,19 @@ class QueryProposalsResponse(betterproto.Message): """ proposals: List["Proposal"] = betterproto.message_field(1) - # pagination defines the pagination in the response. pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) class QueryVoteRequest(betterproto.Message): """QueryVoteRequest is the request type for the Query/Vote RPC method.""" - # proposal_id defines the unique id of the proposal. proposal_id: int = betterproto.uint64_field(1) - # voter defines the oter address for the proposals. + """proposal_id defines the unique id of the proposal.""" + voter: str = betterproto.string_field(2) + """voter defines the oter address for the proposals.""" @dataclass(eq=False, repr=False) @@ -310,8 +365,8 @@ class QueryVoteResponse(betterproto.Message): QueryVoteResponse is the response type for the Query/Vote RPC method. """ - # vote defined the queried vote. vote: "Vote" = betterproto.message_field(1) + """vote defined the queried vote.""" @dataclass(eq=False, repr=False) @@ -320,10 +375,11 @@ class QueryVotesRequest(betterproto.Message): QueryVotesRequest is the request type for the Query/Votes RPC method. """ - # proposal_id defines the unique id of the proposal. proposal_id: int = betterproto.uint64_field(1) - # pagination defines an optional pagination for the request. + """proposal_id defines the unique id of the proposal.""" + pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -332,10 +388,11 @@ class QueryVotesResponse(betterproto.Message): QueryVotesResponse is the response type for the Query/Votes RPC method. """ - # votes defined the queried votes. votes: List["Vote"] = betterproto.message_field(1) - # pagination defines the pagination in the response. + """votes defined the queried votes.""" + pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) @@ -344,9 +401,11 @@ class QueryParamsRequest(betterproto.Message): QueryParamsRequest is the request type for the Query/Params RPC method. """ - # params_type defines which parameters to query for, can be one of "voting", - # "tallying" or "deposit". params_type: str = betterproto.string_field(1) + """ + params_type defines which parameters to query for, can be one of "voting", + "tallying" or "deposit". + """ @dataclass(eq=False, repr=False) @@ -355,12 +414,14 @@ class QueryParamsResponse(betterproto.Message): QueryParamsResponse is the response type for the Query/Params RPC method. """ - # voting_params defines the parameters related to voting. voting_params: "VotingParams" = betterproto.message_field(1) - # deposit_params defines the parameters related to deposit. + """voting_params defines the parameters related to voting.""" + deposit_params: "DepositParams" = betterproto.message_field(2) - # tally_params defines the parameters related to tally. + """deposit_params defines the parameters related to deposit.""" + tally_params: "TallyParams" = betterproto.message_field(3) + """tally_params defines the parameters related to tally.""" @dataclass(eq=False, repr=False) @@ -369,10 +430,11 @@ class QueryDepositRequest(betterproto.Message): QueryDepositRequest is the request type for the Query/Deposit RPC method. """ - # proposal_id defines the unique id of the proposal. proposal_id: int = betterproto.uint64_field(1) - # depositor defines the deposit addresses from the proposals. + """proposal_id defines the unique id of the proposal.""" + depositor: str = betterproto.string_field(2) + """depositor defines the deposit addresses from the proposals.""" @dataclass(eq=False, repr=False) @@ -381,8 +443,8 @@ class QueryDepositResponse(betterproto.Message): QueryDepositResponse is the response type for the Query/Deposit RPC method. """ - # deposit defines the requested deposit. deposit: "Deposit" = betterproto.message_field(1) + """deposit defines the requested deposit.""" @dataclass(eq=False, repr=False) @@ -391,10 +453,11 @@ class QueryDepositsRequest(betterproto.Message): QueryDepositsRequest is the request type for the Query/Deposits RPC method. """ - # proposal_id defines the unique id of the proposal. proposal_id: int = betterproto.uint64_field(1) - # pagination defines an optional pagination for the request. + """proposal_id defines the unique id of the proposal.""" + pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -405,8 +468,8 @@ class QueryDepositsResponse(betterproto.Message): """ deposits: List["Deposit"] = betterproto.message_field(1) - # pagination defines the pagination in the response. pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) @@ -415,8 +478,8 @@ class QueryTallyResultRequest(betterproto.Message): QueryTallyResultRequest is the request type for the Query/Tally RPC method. """ - # proposal_id defines the unique id of the proposal. proposal_id: int = betterproto.uint64_field(1) + """proposal_id defines the unique id of the proposal.""" @dataclass(eq=False, repr=False) @@ -426,284 +489,288 @@ class QueryTallyResultResponse(betterproto.Message): method. """ - # tally defines the requested tally. tally: "TallyResult" = betterproto.message_field(1) + """tally defines the requested tally.""" @dataclass(eq=False, repr=False) class GenesisState(betterproto.Message): """GenesisState defines the gov module's genesis state.""" - # starting_proposal_id is the ID of the starting proposal. starting_proposal_id: int = betterproto.uint64_field(1) - # deposits defines all the deposits present at genesis. + """starting_proposal_id is the ID of the starting proposal.""" + deposits: List["Deposit"] = betterproto.message_field(2) - # votes defines all the votes present at genesis. + """deposits defines all the deposits present at genesis.""" + votes: List["Vote"] = betterproto.message_field(3) - # proposals defines all the proposals present at genesis. + """votes defines all the votes present at genesis.""" + proposals: List["Proposal"] = betterproto.message_field(4) - # params defines all the paramaters of related to deposit. + """proposals defines all the proposals present at genesis.""" + deposit_params: "DepositParams" = betterproto.message_field(5) - # params defines all the paramaters of related to voting. + """params defines all the paramaters of related to deposit.""" + voting_params: "VotingParams" = betterproto.message_field(6) - # params defines all the paramaters of related to tally. + """params defines all the paramaters of related to voting.""" + tally_params: "TallyParams" = betterproto.message_field(7) + """params defines all the paramaters of related to tally.""" class MsgStub(betterproto.ServiceStub): async def submit_proposal( self, + msg_submit_proposal: "MsgSubmitProposal", *, - content: "betterproto_lib_google_protobuf.Any" = None, - initial_deposit: Optional[List["__base_v1_beta1__.Coin"]] = None, - proposer: str = "" + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgSubmitProposalResponse": - initial_deposit = initial_deposit or [] - - request = MsgSubmitProposal() - if content is not None: - request.content = content - if initial_deposit is not None: - request.initial_deposit = initial_deposit - request.proposer = proposer - return await self._unary_unary( - "/cosmos.gov.v1beta1.Msg/SubmitProposal", request, MsgSubmitProposalResponse + "/cosmos.gov.v1beta1.Msg/SubmitProposal", + msg_submit_proposal, + MsgSubmitProposalResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def vote( - self, *, proposal_id: int = 0, voter: str = "", option: "VoteOption" = 0 + self, + msg_vote: "MsgVote", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgVoteResponse": - - request = MsgVote() - request.proposal_id = proposal_id - request.voter = voter - request.option = option - return await self._unary_unary( - "/cosmos.gov.v1beta1.Msg/Vote", request, MsgVoteResponse + "/cosmos.gov.v1beta1.Msg/Vote", + msg_vote, + MsgVoteResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def vote_weighted( self, + msg_vote_weighted: "MsgVoteWeighted", *, - proposal_id: int = 0, - voter: str = "", - options: Optional[List["WeightedVoteOption"]] = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgVoteWeightedResponse": - options = options or [] - - request = MsgVoteWeighted() - request.proposal_id = proposal_id - request.voter = voter - if options is not None: - request.options = options - return await self._unary_unary( - "/cosmos.gov.v1beta1.Msg/VoteWeighted", request, MsgVoteWeightedResponse + "/cosmos.gov.v1beta1.Msg/VoteWeighted", + msg_vote_weighted, + MsgVoteWeightedResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def deposit( self, + msg_deposit: "MsgDeposit", *, - proposal_id: int = 0, - depositor: str = "", - amount: Optional[List["__base_v1_beta1__.Coin"]] = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgDepositResponse": - amount = amount or [] - - request = MsgDeposit() - request.proposal_id = proposal_id - request.depositor = depositor - if amount is not None: - request.amount = amount - return await self._unary_unary( - "/cosmos.gov.v1beta1.Msg/Deposit", request, MsgDepositResponse + "/cosmos.gov.v1beta1.Msg/Deposit", + msg_deposit, + MsgDepositResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class QueryStub(betterproto.ServiceStub): - async def proposal(self, *, proposal_id: int = 0) -> "QueryProposalResponse": - - request = QueryProposalRequest() - request.proposal_id = proposal_id - + async def proposal( + self, + query_proposal_request: "QueryProposalRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryProposalResponse": return await self._unary_unary( - "/cosmos.gov.v1beta1.Query/Proposal", request, QueryProposalResponse + "/cosmos.gov.v1beta1.Query/Proposal", + query_proposal_request, + QueryProposalResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def proposals( self, + query_proposals_request: "QueryProposalsRequest", *, - proposal_status: "ProposalStatus" = 0, - voter: str = "", - depositor: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryProposalsResponse": - - request = QueryProposalsRequest() - request.proposal_status = proposal_status - request.voter = voter - request.depositor = depositor - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( - "/cosmos.gov.v1beta1.Query/Proposals", request, QueryProposalsResponse + "/cosmos.gov.v1beta1.Query/Proposals", + query_proposals_request, + QueryProposalsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def vote( - self, *, proposal_id: int = 0, voter: str = "" + self, + query_vote_request: "QueryVoteRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryVoteResponse": - - request = QueryVoteRequest() - request.proposal_id = proposal_id - request.voter = voter - return await self._unary_unary( - "/cosmos.gov.v1beta1.Query/Vote", request, QueryVoteResponse + "/cosmos.gov.v1beta1.Query/Vote", + query_vote_request, + QueryVoteResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def votes( self, + query_votes_request: "QueryVotesRequest", *, - proposal_id: int = 0, - pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryVotesResponse": - - request = QueryVotesRequest() - request.proposal_id = proposal_id - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( - "/cosmos.gov.v1beta1.Query/Votes", request, QueryVotesResponse + "/cosmos.gov.v1beta1.Query/Votes", + query_votes_request, + QueryVotesResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def params(self, *, params_type: str = "") -> "QueryParamsResponse": - - request = QueryParamsRequest() - request.params_type = params_type - + async def params( + self, + query_params_request: "QueryParamsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryParamsResponse": return await self._unary_unary( - "/cosmos.gov.v1beta1.Query/Params", request, QueryParamsResponse + "/cosmos.gov.v1beta1.Query/Params", + query_params_request, + QueryParamsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def deposit( - self, *, proposal_id: int = 0, depositor: str = "" + self, + query_deposit_request: "QueryDepositRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryDepositResponse": - - request = QueryDepositRequest() - request.proposal_id = proposal_id - request.depositor = depositor - return await self._unary_unary( - "/cosmos.gov.v1beta1.Query/Deposit", request, QueryDepositResponse + "/cosmos.gov.v1beta1.Query/Deposit", + query_deposit_request, + QueryDepositResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def deposits( self, + query_deposits_request: "QueryDepositsRequest", *, - proposal_id: int = 0, - pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryDepositsResponse": - - request = QueryDepositsRequest() - request.proposal_id = proposal_id - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( - "/cosmos.gov.v1beta1.Query/Deposits", request, QueryDepositsResponse + "/cosmos.gov.v1beta1.Query/Deposits", + query_deposits_request, + QueryDepositsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def tally_result(self, *, proposal_id: int = 0) -> "QueryTallyResultResponse": - - request = QueryTallyResultRequest() - request.proposal_id = proposal_id - + async def tally_result( + self, + query_tally_result_request: "QueryTallyResultRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryTallyResultResponse": return await self._unary_unary( - "/cosmos.gov.v1beta1.Query/TallyResult", request, QueryTallyResultResponse + "/cosmos.gov.v1beta1.Query/TallyResult", + query_tally_result_request, + QueryTallyResultResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class MsgBase(ServiceBase): async def submit_proposal( - self, - content: "betterproto_lib_google_protobuf.Any", - initial_deposit: Optional[List["__base_v1_beta1__.Coin"]], - proposer: str, + self, msg_submit_proposal: "MsgSubmitProposal" ) -> "MsgSubmitProposalResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def vote( - self, proposal_id: int, voter: str, option: "VoteOption" - ) -> "MsgVoteResponse": + async def vote(self, msg_vote: "MsgVote") -> "MsgVoteResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def vote_weighted( - self, - proposal_id: int, - voter: str, - options: Optional[List["WeightedVoteOption"]], + self, msg_vote_weighted: "MsgVoteWeighted" ) -> "MsgVoteWeightedResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def deposit( - self, - proposal_id: int, - depositor: str, - amount: Optional[List["__base_v1_beta1__.Coin"]], - ) -> "MsgDepositResponse": + async def deposit(self, msg_deposit: "MsgDeposit") -> "MsgDepositResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_submit_proposal(self, stream: grpclib.server.Stream) -> None: + async def __rpc_submit_proposal( + self, + stream: "grpclib.server.Stream[MsgSubmitProposal, MsgSubmitProposalResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "content": request.content, - "initial_deposit": request.initial_deposit, - "proposer": request.proposer, - } - - response = await self.submit_proposal(**request_kwargs) + response = await self.submit_proposal(request) await stream.send_message(response) - async def __rpc_vote(self, stream: grpclib.server.Stream) -> None: + async def __rpc_vote( + self, stream: "grpclib.server.Stream[MsgVote, MsgVoteResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "proposal_id": request.proposal_id, - "voter": request.voter, - "option": request.option, - } - - response = await self.vote(**request_kwargs) + response = await self.vote(request) await stream.send_message(response) - async def __rpc_vote_weighted(self, stream: grpclib.server.Stream) -> None: + async def __rpc_vote_weighted( + self, stream: "grpclib.server.Stream[MsgVoteWeighted, MsgVoteWeightedResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "proposal_id": request.proposal_id, - "voter": request.voter, - "options": request.options, - } - - response = await self.vote_weighted(**request_kwargs) + response = await self.vote_weighted(request) await stream.send_message(response) - async def __rpc_deposit(self, stream: grpclib.server.Stream) -> None: + async def __rpc_deposit( + self, stream: "grpclib.server.Stream[MsgDeposit, MsgDepositResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "proposal_id": request.proposal_id, - "depositor": request.depositor, - "amount": request.amount, - } - - response = await self.deposit(**request_kwargs) + response = await self.deposit(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -736,125 +803,102 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: class QueryBase(ServiceBase): - async def proposal(self, proposal_id: int) -> "QueryProposalResponse": + async def proposal( + self, query_proposal_request: "QueryProposalRequest" + ) -> "QueryProposalResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def proposals( - self, - proposal_status: "ProposalStatus", - voter: str, - depositor: str, - pagination: "__base_query_v1_beta1__.PageRequest", + self, query_proposals_request: "QueryProposalsRequest" ) -> "QueryProposalsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def vote(self, proposal_id: int, voter: str) -> "QueryVoteResponse": + async def vote(self, query_vote_request: "QueryVoteRequest") -> "QueryVoteResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def votes( - self, proposal_id: int, pagination: "__base_query_v1_beta1__.PageRequest" + self, query_votes_request: "QueryVotesRequest" ) -> "QueryVotesResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def params(self, params_type: str) -> "QueryParamsResponse": + async def params( + self, query_params_request: "QueryParamsRequest" + ) -> "QueryParamsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def deposit(self, proposal_id: int, depositor: str) -> "QueryDepositResponse": + async def deposit( + self, query_deposit_request: "QueryDepositRequest" + ) -> "QueryDepositResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def deposits( - self, proposal_id: int, pagination: "__base_query_v1_beta1__.PageRequest" + self, query_deposits_request: "QueryDepositsRequest" ) -> "QueryDepositsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def tally_result(self, proposal_id: int) -> "QueryTallyResultResponse": + async def tally_result( + self, query_tally_result_request: "QueryTallyResultRequest" + ) -> "QueryTallyResultResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_proposal(self, stream: grpclib.server.Stream) -> None: + async def __rpc_proposal( + self, + stream: "grpclib.server.Stream[QueryProposalRequest, QueryProposalResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "proposal_id": request.proposal_id, - } - - response = await self.proposal(**request_kwargs) + response = await self.proposal(request) await stream.send_message(response) - async def __rpc_proposals(self, stream: grpclib.server.Stream) -> None: + async def __rpc_proposals( + self, + stream: "grpclib.server.Stream[QueryProposalsRequest, QueryProposalsResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "proposal_status": request.proposal_status, - "voter": request.voter, - "depositor": request.depositor, - "pagination": request.pagination, - } - - response = await self.proposals(**request_kwargs) + response = await self.proposals(request) await stream.send_message(response) - async def __rpc_vote(self, stream: grpclib.server.Stream) -> None: + async def __rpc_vote( + self, stream: "grpclib.server.Stream[QueryVoteRequest, QueryVoteResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "proposal_id": request.proposal_id, - "voter": request.voter, - } - - response = await self.vote(**request_kwargs) + response = await self.vote(request) await stream.send_message(response) - async def __rpc_votes(self, stream: grpclib.server.Stream) -> None: + async def __rpc_votes( + self, stream: "grpclib.server.Stream[QueryVotesRequest, QueryVotesResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "proposal_id": request.proposal_id, - "pagination": request.pagination, - } - - response = await self.votes(**request_kwargs) + response = await self.votes(request) await stream.send_message(response) - async def __rpc_params(self, stream: grpclib.server.Stream) -> None: + async def __rpc_params( + self, stream: "grpclib.server.Stream[QueryParamsRequest, QueryParamsResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "params_type": request.params_type, - } - - response = await self.params(**request_kwargs) + response = await self.params(request) await stream.send_message(response) - async def __rpc_deposit(self, stream: grpclib.server.Stream) -> None: + async def __rpc_deposit( + self, stream: "grpclib.server.Stream[QueryDepositRequest, QueryDepositResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "proposal_id": request.proposal_id, - "depositor": request.depositor, - } - - response = await self.deposit(**request_kwargs) + response = await self.deposit(request) await stream.send_message(response) - async def __rpc_deposits(self, stream: grpclib.server.Stream) -> None: + async def __rpc_deposits( + self, + stream: "grpclib.server.Stream[QueryDepositsRequest, QueryDepositsResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "proposal_id": request.proposal_id, - "pagination": request.pagination, - } - - response = await self.deposits(**request_kwargs) + response = await self.deposits(request) await stream.send_message(response) - async def __rpc_tally_result(self, stream: grpclib.server.Stream) -> None: + async def __rpc_tally_result( + self, + stream: "grpclib.server.Stream[QueryTallyResultRequest, QueryTallyResultResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "proposal_id": request.proposal_id, - } - - response = await self.tally_result(**request_kwargs) + response = await self.tally_result(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -908,8 +952,3 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: QueryTallyResultResponse, ), } - - -from ...base import v1beta1 as __base_v1_beta1__ -from ...base.query import v1beta1 as __base_query_v1_beta1__ -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf diff --git a/python/terra_proto/cosmos/mint/v1beta1/__init__.py b/python/terra_proto/cosmos/mint/v1beta1/__init__.py index c146c51..ab060ed 100644 --- a/python/terra_proto/cosmos/mint/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/mint/v1beta1/__init__.py @@ -2,39 +2,55 @@ # sources: cosmos/mint/v1beta1/genesis.proto, cosmos/mint/v1beta1/mint.proto, cosmos/mint/v1beta1/query.proto # plugin: python-betterproto from dataclasses import dataclass -from typing import Dict +from typing import ( + TYPE_CHECKING, + Dict, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) class Minter(betterproto.Message): """Minter represents the minting state.""" - # current annual inflation rate inflation: str = betterproto.string_field(1) - # current annual expected provisions + """current annual inflation rate""" + annual_provisions: str = betterproto.string_field(2) + """current annual expected provisions""" @dataclass(eq=False, repr=False) class Params(betterproto.Message): """Params holds parameters for the mint module.""" - # type of coin to mint mint_denom: str = betterproto.string_field(1) - # maximum annual change in inflation rate + """type of coin to mint""" + inflation_rate_change: str = betterproto.string_field(2) - # maximum inflation rate + """maximum annual change in inflation rate""" + inflation_max: str = betterproto.string_field(3) - # minimum inflation rate + """maximum inflation rate""" + inflation_min: str = betterproto.string_field(4) - # goal of percent bonded atoms + """minimum inflation rate""" + goal_bonded: str = betterproto.string_field(5) - # expected blocks per year + """goal of percent bonded atoms""" + blocks_per_year: int = betterproto.uint64_field(6) + """expected blocks per year""" @dataclass(eq=False, repr=False) @@ -52,8 +68,8 @@ class QueryParamsResponse(betterproto.Message): QueryParamsResponse is the response type for the Query/Params RPC method. """ - # params defines the parameters of the module. params: "Params" = betterproto.message_field(1) + """params defines the parameters of the module.""" @dataclass(eq=False, repr=False) @@ -73,8 +89,8 @@ class QueryInflationResponse(betterproto.Message): method. """ - # inflation is the current minting inflation value. inflation: bytes = betterproto.bytes_field(1) + """inflation is the current minting inflation value.""" @dataclass(eq=False, repr=False) @@ -94,80 +110,111 @@ class QueryAnnualProvisionsResponse(betterproto.Message): Query/AnnualProvisions RPC method. """ - # annual_provisions is the current minting annual provisions value. annual_provisions: bytes = betterproto.bytes_field(1) + """annual_provisions is the current minting annual provisions value.""" @dataclass(eq=False, repr=False) class GenesisState(betterproto.Message): """GenesisState defines the mint module's genesis state.""" - # minter is a space for holding current inflation information. minter: "Minter" = betterproto.message_field(1) - # params defines all the paramaters of the module. + """minter is a space for holding current inflation information.""" + params: "Params" = betterproto.message_field(2) + """params defines all the paramaters of the module.""" class QueryStub(betterproto.ServiceStub): - async def params(self) -> "QueryParamsResponse": - - request = QueryParamsRequest() - + async def params( + self, + query_params_request: "QueryParamsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryParamsResponse": return await self._unary_unary( - "/cosmos.mint.v1beta1.Query/Params", request, QueryParamsResponse + "/cosmos.mint.v1beta1.Query/Params", + query_params_request, + QueryParamsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def inflation(self) -> "QueryInflationResponse": - - request = QueryInflationRequest() - + async def inflation( + self, + query_inflation_request: "QueryInflationRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryInflationResponse": return await self._unary_unary( - "/cosmos.mint.v1beta1.Query/Inflation", request, QueryInflationResponse + "/cosmos.mint.v1beta1.Query/Inflation", + query_inflation_request, + QueryInflationResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def annual_provisions(self) -> "QueryAnnualProvisionsResponse": - - request = QueryAnnualProvisionsRequest() - + async def annual_provisions( + self, + query_annual_provisions_request: "QueryAnnualProvisionsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryAnnualProvisionsResponse": return await self._unary_unary( "/cosmos.mint.v1beta1.Query/AnnualProvisions", - request, + query_annual_provisions_request, QueryAnnualProvisionsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class QueryBase(ServiceBase): - async def params(self) -> "QueryParamsResponse": + async def params( + self, query_params_request: "QueryParamsRequest" + ) -> "QueryParamsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def inflation(self) -> "QueryInflationResponse": + async def inflation( + self, query_inflation_request: "QueryInflationRequest" + ) -> "QueryInflationResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def annual_provisions(self) -> "QueryAnnualProvisionsResponse": + async def annual_provisions( + self, query_annual_provisions_request: "QueryAnnualProvisionsRequest" + ) -> "QueryAnnualProvisionsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_params(self, stream: grpclib.server.Stream) -> None: + async def __rpc_params( + self, stream: "grpclib.server.Stream[QueryParamsRequest, QueryParamsResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.params(**request_kwargs) + response = await self.params(request) await stream.send_message(response) - async def __rpc_inflation(self, stream: grpclib.server.Stream) -> None: + async def __rpc_inflation( + self, + stream: "grpclib.server.Stream[QueryInflationRequest, QueryInflationResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.inflation(**request_kwargs) + response = await self.inflation(request) await stream.send_message(response) - async def __rpc_annual_provisions(self, stream: grpclib.server.Stream) -> None: + async def __rpc_annual_provisions( + self, + stream: "grpclib.server.Stream[QueryAnnualProvisionsRequest, QueryAnnualProvisionsResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.annual_provisions(**request_kwargs) + response = await self.annual_provisions(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: diff --git a/python/terra_proto/cosmos/params/v1beta1/__init__.py b/python/terra_proto/cosmos/params/v1beta1/__init__.py index 8fc4132..be11080 100644 --- a/python/terra_proto/cosmos/params/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/params/v1beta1/__init__.py @@ -2,11 +2,22 @@ # sources: cosmos/params/v1beta1/params.proto, cosmos/params/v1beta1/query.proto # plugin: python-betterproto from dataclasses import dataclass -from typing import Dict, List +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) @@ -37,10 +48,11 @@ class ParamChange(betterproto.Message): class QueryParamsRequest(betterproto.Message): """QueryParamsRequest is request type for the Query/Params RPC method.""" - # subspace defines the module to query the parameter for. subspace: str = betterproto.string_field(1) - # key defines the key of the parameter in the subspace. + """subspace defines the module to query the parameter for.""" + key: str = betterproto.string_field(2) + """key defines the key of the parameter in the subspace.""" @dataclass(eq=False, repr=False) @@ -49,37 +61,40 @@ class QueryParamsResponse(betterproto.Message): QueryParamsResponse is response type for the Query/Params RPC method. """ - # param defines the queried parameter. param: "ParamChange" = betterproto.message_field(1) + """param defines the queried parameter.""" class QueryStub(betterproto.ServiceStub): async def params( - self, *, subspace: str = "", key: str = "" + self, + query_params_request: "QueryParamsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryParamsResponse": - - request = QueryParamsRequest() - request.subspace = subspace - request.key = key - return await self._unary_unary( - "/cosmos.params.v1beta1.Query/Params", request, QueryParamsResponse + "/cosmos.params.v1beta1.Query/Params", + query_params_request, + QueryParamsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class QueryBase(ServiceBase): - async def params(self, subspace: str, key: str) -> "QueryParamsResponse": + async def params( + self, query_params_request: "QueryParamsRequest" + ) -> "QueryParamsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_params(self, stream: grpclib.server.Stream) -> None: + async def __rpc_params( + self, stream: "grpclib.server.Stream[QueryParamsRequest, QueryParamsResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "subspace": request.subspace, - "key": request.key, - } - - response = await self.params(**request_kwargs) + response = await self.params(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: diff --git a/python/terra_proto/cosmos/slashing/v1beta1/__init__.py b/python/terra_proto/cosmos/slashing/v1beta1/__init__.py index e479139..d3e1f99 100644 --- a/python/terra_proto/cosmos/slashing/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/slashing/v1beta1/__init__.py @@ -2,12 +2,28 @@ # sources: cosmos/slashing/v1beta1/genesis.proto, cosmos/slashing/v1beta1/query.proto, cosmos/slashing/v1beta1/slashing.proto, cosmos/slashing/v1beta1/tx.proto # plugin: python-betterproto from dataclasses import dataclass -from datetime import datetime, timedelta -from typing import Dict, List +from datetime import ( + datetime, + timedelta, +) +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ...base.query import v1beta1 as __base_query_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) @@ -32,22 +48,34 @@ class ValidatorSigningInfo(betterproto.Message): """ address: str = betterproto.string_field(1) - # Height at which validator was first a candidate OR was unjailed start_height: int = betterproto.int64_field(2) - # Index which is incremented each time the validator was a bonded in a block - # and may have signed a precommit or not. This in conjunction with the - # `SignedBlocksWindow` param determines the index in the - # `MissedBlocksBitArray`. + """Height at which validator was first a candidate OR was unjailed""" + index_offset: int = betterproto.int64_field(3) - # Timestamp until which the validator is jailed due to liveness downtime. + """ + Index which is incremented each time the validator was a bonded in a block + and may have signed a precommit or not. This in conjunction with the + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + """ + jailed_until: datetime = betterproto.message_field(4) - # Whether or not a validator has been tombstoned (killed out of validator - # set). It is set once the validator commits an equivocation or for any other - # configured misbehiavor. + """ + Timestamp until which the validator is jailed due to liveness downtime. + """ + tombstoned: bool = betterproto.bool_field(5) - # A counter kept to avoid unnecessary array reads. Note that - # `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. + """ + Whether or not a validator has been tombstoned (killed out of validator + set). It is set once the validator commits an equivocation or for any other + configured misbehiavor. + """ + missed_blocks_counter: int = betterproto.int64_field(6) + """ + A counter kept to avoid unnecessary array reads. Note that + `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. + """ @dataclass(eq=False, repr=False) @@ -86,8 +114,8 @@ class QuerySigningInfoRequest(betterproto.Message): method """ - # cons_address is the address to query signing info of cons_address: str = betterproto.string_field(1) + """cons_address is the address to query signing info of""" @dataclass(eq=False, repr=False) @@ -97,8 +125,8 @@ class QuerySigningInfoResponse(betterproto.Message): method """ - # val_signing_info is the signing info of requested val cons address val_signing_info: "ValidatorSigningInfo" = betterproto.message_field(1) + """val_signing_info is the signing info of requested val cons address""" @dataclass(eq=False, repr=False) @@ -118,8 +146,9 @@ class QuerySigningInfosResponse(betterproto.Message): RPC method """ - # info is the signing info of all validators info: List["ValidatorSigningInfo"] = betterproto.message_field(1) + """info is the signing info of all validators""" + pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) @@ -127,24 +156,33 @@ class QuerySigningInfosResponse(betterproto.Message): class GenesisState(betterproto.Message): """GenesisState defines the slashing module's genesis state.""" - # params defines all the paramaters of related to deposit. params: "Params" = betterproto.message_field(1) - # signing_infos represents a map between validator addresses and their - # signing infos. + """params defines all the paramaters of related to deposit.""" + signing_infos: List["SigningInfo"] = betterproto.message_field(2) - # missed_blocks represents a map between validator addresses and their missed - # blocks. + """ + signing_infos represents a map between validator addresses and their + signing infos. + """ + missed_blocks: List["ValidatorMissedBlocks"] = betterproto.message_field(3) + """ + missed_blocks represents a map between validator addresses and their missed + blocks. + """ @dataclass(eq=False, repr=False) class SigningInfo(betterproto.Message): """SigningInfo stores validator signing info of corresponding address.""" - # address is the validator address. address: str = betterproto.string_field(1) - # validator_signing_info represents the signing info of this validator. + """address is the validator address.""" + validator_signing_info: "ValidatorSigningInfo" = betterproto.message_field(2) + """ + validator_signing_info represents the signing info of this validator. + """ @dataclass(eq=False, repr=False) @@ -154,82 +192,105 @@ class ValidatorMissedBlocks(betterproto.Message): address. """ - # address is the validator address. address: str = betterproto.string_field(1) - # missed_blocks is an array of missed blocks by the validator. + """address is the validator address.""" + missed_blocks: List["MissedBlock"] = betterproto.message_field(2) + """missed_blocks is an array of missed blocks by the validator.""" @dataclass(eq=False, repr=False) class MissedBlock(betterproto.Message): """MissedBlock contains height and missed status as boolean.""" - # index is the height at which the block was missed. index: int = betterproto.int64_field(1) - # missed is the missed status. + """index is the height at which the block was missed.""" + missed: bool = betterproto.bool_field(2) + """missed is the missed status.""" class MsgStub(betterproto.ServiceStub): - async def unjail(self, *, validator_addr: str = "") -> "MsgUnjailResponse": - - request = MsgUnjail() - request.validator_addr = validator_addr - + async def unjail( + self, + msg_unjail: "MsgUnjail", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "MsgUnjailResponse": return await self._unary_unary( - "/cosmos.slashing.v1beta1.Msg/Unjail", request, MsgUnjailResponse + "/cosmos.slashing.v1beta1.Msg/Unjail", + msg_unjail, + MsgUnjailResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class QueryStub(betterproto.ServiceStub): - async def params(self) -> "QueryParamsResponse": - - request = QueryParamsRequest() - + async def params( + self, + query_params_request: "QueryParamsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryParamsResponse": return await self._unary_unary( - "/cosmos.slashing.v1beta1.Query/Params", request, QueryParamsResponse + "/cosmos.slashing.v1beta1.Query/Params", + query_params_request, + QueryParamsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def signing_info( - self, *, cons_address: str = "" + self, + query_signing_info_request: "QuerySigningInfoRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QuerySigningInfoResponse": - - request = QuerySigningInfoRequest() - request.cons_address = cons_address - return await self._unary_unary( "/cosmos.slashing.v1beta1.Query/SigningInfo", - request, + query_signing_info_request, QuerySigningInfoResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def signing_infos( - self, *, pagination: "__base_query_v1_beta1__.PageRequest" = None + self, + query_signing_infos_request: "QuerySigningInfosRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QuerySigningInfosResponse": - - request = QuerySigningInfosRequest() - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( "/cosmos.slashing.v1beta1.Query/SigningInfos", - request, + query_signing_infos_request, QuerySigningInfosResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class MsgBase(ServiceBase): - async def unjail(self, validator_addr: str) -> "MsgUnjailResponse": + async def unjail(self, msg_unjail: "MsgUnjail") -> "MsgUnjailResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_unjail(self, stream: grpclib.server.Stream) -> None: + async def __rpc_unjail( + self, stream: "grpclib.server.Stream[MsgUnjail, MsgUnjailResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "validator_addr": request.validator_addr, - } - - response = await self.unjail(**request_kwargs) + response = await self.unjail(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -244,43 +305,42 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: class QueryBase(ServiceBase): - async def params(self) -> "QueryParamsResponse": + async def params( + self, query_params_request: "QueryParamsRequest" + ) -> "QueryParamsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def signing_info(self, cons_address: str) -> "QuerySigningInfoResponse": + async def signing_info( + self, query_signing_info_request: "QuerySigningInfoRequest" + ) -> "QuerySigningInfoResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def signing_infos( - self, pagination: "__base_query_v1_beta1__.PageRequest" + self, query_signing_infos_request: "QuerySigningInfosRequest" ) -> "QuerySigningInfosResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_params(self, stream: grpclib.server.Stream) -> None: + async def __rpc_params( + self, stream: "grpclib.server.Stream[QueryParamsRequest, QueryParamsResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.params(**request_kwargs) + response = await self.params(request) await stream.send_message(response) - async def __rpc_signing_info(self, stream: grpclib.server.Stream) -> None: + async def __rpc_signing_info( + self, + stream: "grpclib.server.Stream[QuerySigningInfoRequest, QuerySigningInfoResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "cons_address": request.cons_address, - } - - response = await self.signing_info(**request_kwargs) + response = await self.signing_info(request) await stream.send_message(response) - async def __rpc_signing_infos(self, stream: grpclib.server.Stream) -> None: + async def __rpc_signing_infos( + self, + stream: "grpclib.server.Stream[QuerySigningInfosRequest, QuerySigningInfosResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "pagination": request.pagination, - } - - response = await self.signing_infos(**request_kwargs) + response = await self.signing_infos(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -304,6 +364,3 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: QuerySigningInfosResponse, ), } - - -from ...base.query import v1beta1 as __base_query_v1_beta1__ diff --git a/python/terra_proto/cosmos/staking/v1beta1/__init__.py b/python/terra_proto/cosmos/staking/v1beta1/__init__.py index ed335e1..c1b16f7 100644 --- a/python/terra_proto/cosmos/staking/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/staking/v1beta1/__init__.py @@ -2,25 +2,47 @@ # sources: cosmos/staking/v1beta1/authz.proto, cosmos/staking/v1beta1/genesis.proto, cosmos/staking/v1beta1/query.proto, cosmos/staking/v1beta1/staking.proto, cosmos/staking/v1beta1/tx.proto # plugin: python-betterproto from dataclasses import dataclass -from datetime import datetime, timedelta -from typing import Dict, List +from datetime import ( + datetime, + timedelta, +) +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase +import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ....tendermint import types as ___tendermint_types__ +from ...base import v1beta1 as __base_v1_beta1__ +from ...base.query import v1beta1 as __base_query_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline class BondStatus(betterproto.Enum): """BondStatus is the status of a validator.""" - # UNSPECIFIED defines an invalid validator status. BOND_STATUS_UNSPECIFIED = 0 - # UNBONDED defines a validator that is not bonded. + """UNSPECIFIED defines an invalid validator status.""" + BOND_STATUS_UNBONDED = 1 - # UNBONDING defines a validator that is unbonding. + """UNBONDED defines a validator that is not bonded.""" + BOND_STATUS_UNBONDING = 2 - # BONDED defines a validator that is bonded. + """UNBONDING defines a validator that is unbonding.""" + BOND_STATUS_BONDED = 3 + """BONDED defines a validator that is bonded.""" class AuthorizationType(betterproto.Enum): @@ -29,16 +51,27 @@ class AuthorizationType(betterproto.Enum): Since: cosmos-sdk 0.43 """ - # AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type AUTHORIZATION_TYPE_UNSPECIFIED = 0 - # AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate + """ + AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type + """ + AUTHORIZATION_TYPE_DELEGATE = 1 - # AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for - # Msg/Undelegate + """ + AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate + """ + AUTHORIZATION_TYPE_UNDELEGATE = 2 - # AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for - # Msg/BeginRedelegate + """ + AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for + Msg/Undelegate + """ + AUTHORIZATION_TYPE_REDELEGATE = 3 + """ + AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for + Msg/BeginRedelegate + """ @dataclass(eq=False, repr=False) @@ -61,41 +94,56 @@ class CommissionRates(betterproto.Message): creating a validator. """ - # rate is the commission rate charged to delegators, as a fraction. rate: str = betterproto.string_field(1) - # max_rate defines the maximum commission rate which validator can ever - # charge, as a fraction. + """rate is the commission rate charged to delegators, as a fraction.""" + max_rate: str = betterproto.string_field(2) - # max_change_rate defines the maximum daily increase of the validator - # commission, as a fraction. + """ + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + """ + max_change_rate: str = betterproto.string_field(3) + """ + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + """ @dataclass(eq=False, repr=False) class Commission(betterproto.Message): """Commission defines commission parameters for a given validator.""" - # commission_rates defines the initial commission rates to be used for - # creating a validator. commission_rates: "CommissionRates" = betterproto.message_field(1) - # update_time is the last time the commission rate was changed. + """ + commission_rates defines the initial commission rates to be used for + creating a validator. + """ + update_time: datetime = betterproto.message_field(2) + """update_time is the last time the commission rate was changed.""" @dataclass(eq=False, repr=False) class Description(betterproto.Message): """Description defines a validator description.""" - # moniker defines a human-readable name for the validator. moniker: str = betterproto.string_field(1) - # identity defines an optional identity signature (ex. UPort or Keybase). + """moniker defines a human-readable name for the validator.""" + identity: str = betterproto.string_field(2) - # website defines an optional website link. + """ + identity defines an optional identity signature (ex. UPort or Keybase). + """ + website: str = betterproto.string_field(3) - # security_contact defines an optional email for security contact. + """website defines an optional website link.""" + security_contact: str = betterproto.string_field(4) - # details define other optional details. + """security_contact defines an optional email for security contact.""" + details: str = betterproto.string_field(5) + """details define other optional details.""" @dataclass(eq=False, repr=False) @@ -111,36 +159,60 @@ class Validator(betterproto.Message): shares multiplied by exchange rate. """ - # operator_address defines the address of the validator's operator; bech - # encoded in JSON. operator_address: str = betterproto.string_field(1) - # consensus_pubkey is the consensus public key of the validator, as a - # Protobuf Any. + """ + operator_address defines the address of the validator's operator; bech + encoded in JSON. + """ + consensus_pubkey: "betterproto_lib_google_protobuf.Any" = betterproto.message_field( 2 ) - # jailed defined whether the validator has been jailed from bonded status or - # not. + """ + consensus_pubkey is the consensus public key of the validator, as a + Protobuf Any. + """ + jailed: bool = betterproto.bool_field(3) - # status is the validator status (bonded/unbonding/unbonded). + """ + jailed defined whether the validator has been jailed from bonded status or + not. + """ + status: "BondStatus" = betterproto.enum_field(4) - # tokens define the delegated tokens (incl. self-delegation). + """status is the validator status (bonded/unbonding/unbonded).""" + tokens: str = betterproto.string_field(5) - # delegator_shares defines total shares issued to a validator's delegators. + """tokens define the delegated tokens (incl. self-delegation).""" + delegator_shares: str = betterproto.string_field(6) - # description defines the description terms for the validator. + """ + delegator_shares defines total shares issued to a validator's delegators. + """ + description: "Description" = betterproto.message_field(7) - # unbonding_height defines, if unbonding, the height at which this validator - # has begun unbonding. + """description defines the description terms for the validator.""" + unbonding_height: int = betterproto.int64_field(8) - # unbonding_time defines, if unbonding, the min time for the validator to - # complete unbonding. + """ + unbonding_height defines, if unbonding, the height at which this validator + has begun unbonding. + """ + unbonding_time: datetime = betterproto.message_field(9) - # commission defines the commission parameters. + """ + unbonding_time defines, if unbonding, the min time for the validator to + complete unbonding. + """ + commission: "Commission" = betterproto.message_field(10) - # min_self_delegation is the validator's self declared minimum self - # delegation. + """commission defines the commission parameters.""" + min_self_delegation: str = betterproto.string_field(11) + """ + min_self_delegation is the validator's self declared minimum self + delegation. + """ @dataclass(eq=False, repr=False) @@ -198,12 +270,14 @@ class Delegation(betterproto.Message): by one delegator, and is associated with the voting power of one validator. """ - # delegator_address is the bech32-encoded address of the delegator. delegator_address: str = betterproto.string_field(1) - # validator_address is the bech32-encoded address of the validator. + """delegator_address is the bech32-encoded address of the delegator.""" + validator_address: str = betterproto.string_field(2) - # shares define the delegation shares received. + """validator_address is the bech32-encoded address of the validator.""" + shares: str = betterproto.string_field(3) + """shares define the delegation shares received.""" @dataclass(eq=False, repr=False) @@ -213,12 +287,14 @@ class UnbondingDelegation(betterproto.Message): a single validator in an time-ordered list. """ - # delegator_address is the bech32-encoded address of the delegator. delegator_address: str = betterproto.string_field(1) - # validator_address is the bech32-encoded address of the validator. + """delegator_address is the bech32-encoded address of the delegator.""" + validator_address: str = betterproto.string_field(2) - # entries are the unbonding delegation entries. + """validator_address is the bech32-encoded address of the validator.""" + entries: List["UnbondingDelegationEntry"] = betterproto.message_field(3) + """entries are the unbonding delegation entries.""" @dataclass(eq=False, repr=False) @@ -228,15 +304,20 @@ class UnbondingDelegationEntry(betterproto.Message): metadata. """ - # creation_height is the height which the unbonding took place. creation_height: int = betterproto.int64_field(1) - # completion_time is the unix time for unbonding completion. + """creation_height is the height which the unbonding took place.""" + completion_time: datetime = betterproto.message_field(2) - # initial_balance defines the tokens initially scheduled to receive at - # completion. + """completion_time is the unix time for unbonding completion.""" + initial_balance: str = betterproto.string_field(3) - # balance defines the tokens to receive at completion. + """ + initial_balance defines the tokens initially scheduled to receive at + completion. + """ + balance: str = betterproto.string_field(4) + """balance defines the tokens to receive at completion.""" @dataclass(eq=False, repr=False) @@ -245,15 +326,24 @@ class RedelegationEntry(betterproto.Message): RedelegationEntry defines a redelegation object with relevant metadata. """ - # creation_height defines the height which the redelegation took place. creation_height: int = betterproto.int64_field(1) - # completion_time defines the unix time for redelegation completion. + """ + creation_height defines the height which the redelegation took place. + """ + completion_time: datetime = betterproto.message_field(2) - # initial_balance defines the initial balance when redelegation started. + """completion_time defines the unix time for redelegation completion.""" + initial_balance: str = betterproto.string_field(3) - # shares_dst is the amount of destination-validator shares created by - # redelegation. + """ + initial_balance defines the initial balance when redelegation started. + """ + shares_dst: str = betterproto.string_field(4) + """ + shares_dst is the amount of destination-validator shares created by + redelegation. + """ @dataclass(eq=False, repr=False) @@ -264,33 +354,46 @@ class Redelegation(betterproto.Message): validator. """ - # delegator_address is the bech32-encoded address of the delegator. delegator_address: str = betterproto.string_field(1) - # validator_src_address is the validator redelegation source operator - # address. + """delegator_address is the bech32-encoded address of the delegator.""" + validator_src_address: str = betterproto.string_field(2) - # validator_dst_address is the validator redelegation destination operator - # address. + """ + validator_src_address is the validator redelegation source operator + address. + """ + validator_dst_address: str = betterproto.string_field(3) - # entries are the redelegation entries. + """ + validator_dst_address is the validator redelegation destination operator + address. + """ + entries: List["RedelegationEntry"] = betterproto.message_field(4) + """entries are the redelegation entries.""" @dataclass(eq=False, repr=False) class Params(betterproto.Message): """Params defines the parameters for the staking module.""" - # unbonding_time is the time duration of unbonding. unbonding_time: timedelta = betterproto.message_field(1) - # max_validators is the maximum number of validators. + """unbonding_time is the time duration of unbonding.""" + max_validators: int = betterproto.uint32_field(2) - # max_entries is the max entries for either unbonding delegation or - # redelegation (per pair/trio). + """max_validators is the maximum number of validators.""" + max_entries: int = betterproto.uint32_field(3) - # historical_entries is the number of historical entries to persist. + """ + max_entries is the max entries for either unbonding delegation or + redelegation (per pair/trio). + """ + historical_entries: int = betterproto.uint32_field(4) - # bond_denom defines the bondable coin denomination. + """historical_entries is the number of historical entries to persist.""" + bond_denom: str = betterproto.string_field(5) + """bond_denom defines the bondable coin denomination.""" @dataclass(eq=False, repr=False) @@ -371,10 +474,13 @@ class MsgEditValidator(betterproto.Message): description: "Description" = betterproto.message_field(1) validator_address: str = betterproto.string_field(2) - # We pass a reference to the new commission rate and min self delegation as - # it's not mandatory to update. If not updated, the deserialized rate will be - # zero with no way to distinguish if an update was intended. REF: #2373 commission_rate: str = betterproto.string_field(3) + """ + We pass a reference to the new commission rate and min self delegation as + it's not mandatory to update. If not updated, the deserialized rate will be + zero with no way to distinguish if an update was intended. REF: #2373 + """ + min_self_delegation: str = betterproto.string_field(4) @@ -453,10 +559,11 @@ class QueryValidatorsRequest(betterproto.Message): QueryValidatorsRequest is request type for Query/Validators RPC method. """ - # status enables to query for validators matching a given status. status: str = betterproto.string_field(1) - # pagination defines an optional pagination for the request. + """status enables to query for validators matching a given status.""" + pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -466,10 +573,11 @@ class QueryValidatorsResponse(betterproto.Message): method """ - # validators contains all the queried validators. validators: List["Validator"] = betterproto.message_field(1) - # pagination defines the pagination in the response. + """validators contains all the queried validators.""" + pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) @@ -478,8 +586,8 @@ class QueryValidatorRequest(betterproto.Message): QueryValidatorRequest is response type for the Query/Validator RPC method """ - # validator_addr defines the validator address to query for. validator_addr: str = betterproto.string_field(1) + """validator_addr defines the validator address to query for.""" @dataclass(eq=False, repr=False) @@ -488,8 +596,8 @@ class QueryValidatorResponse(betterproto.Message): QueryValidatorResponse is response type for the Query/Validator RPC method """ - # validator defines the the validator info. validator: "Validator" = betterproto.message_field(1) + """validator defines the the validator info.""" @dataclass(eq=False, repr=False) @@ -499,10 +607,11 @@ class QueryValidatorDelegationsRequest(betterproto.Message): Query/ValidatorDelegations RPC method """ - # validator_addr defines the validator address to query for. validator_addr: str = betterproto.string_field(1) - # pagination defines an optional pagination for the request. + """validator_addr defines the validator address to query for.""" + pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -513,8 +622,8 @@ class QueryValidatorDelegationsResponse(betterproto.Message): """ delegation_responses: List["DelegationResponse"] = betterproto.message_field(1) - # pagination defines the pagination in the response. pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) @@ -524,10 +633,11 @@ class QueryValidatorUnbondingDelegationsRequest(betterproto.Message): Query/ValidatorUnbondingDelegations RPC method """ - # validator_addr defines the validator address to query for. validator_addr: str = betterproto.string_field(1) - # pagination defines an optional pagination for the request. + """validator_addr defines the validator address to query for.""" + pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -538,8 +648,8 @@ class QueryValidatorUnbondingDelegationsResponse(betterproto.Message): """ unbonding_responses: List["UnbondingDelegation"] = betterproto.message_field(1) - # pagination defines the pagination in the response. pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) @@ -548,10 +658,11 @@ class QueryDelegationRequest(betterproto.Message): QueryDelegationRequest is request type for the Query/Delegation RPC method. """ - # delegator_addr defines the delegator address to query for. delegator_addr: str = betterproto.string_field(1) - # validator_addr defines the validator address to query for. + """delegator_addr defines the delegator address to query for.""" + validator_addr: str = betterproto.string_field(2) + """validator_addr defines the validator address to query for.""" @dataclass(eq=False, repr=False) @@ -561,8 +672,8 @@ class QueryDelegationResponse(betterproto.Message): method. """ - # delegation_responses defines the delegation info of a delegation. delegation_response: "DelegationResponse" = betterproto.message_field(1) + """delegation_responses defines the delegation info of a delegation.""" @dataclass(eq=False, repr=False) @@ -572,10 +683,11 @@ class QueryUnbondingDelegationRequest(betterproto.Message): Query/UnbondingDelegation RPC method. """ - # delegator_addr defines the delegator address to query for. delegator_addr: str = betterproto.string_field(1) - # validator_addr defines the validator address to query for. + """delegator_addr defines the delegator address to query for.""" + validator_addr: str = betterproto.string_field(2) + """validator_addr defines the validator address to query for.""" @dataclass(eq=False, repr=False) @@ -585,8 +697,8 @@ class QueryUnbondingDelegationResponse(betterproto.Message): RPC method. """ - # unbond defines the unbonding information of a delegation. unbond: "UnbondingDelegation" = betterproto.message_field(1) + """unbond defines the unbonding information of a delegation.""" @dataclass(eq=False, repr=False) @@ -596,10 +708,11 @@ class QueryDelegatorDelegationsRequest(betterproto.Message): Query/DelegatorDelegations RPC method. """ - # delegator_addr defines the delegator address to query for. delegator_addr: str = betterproto.string_field(1) - # pagination defines an optional pagination for the request. + """delegator_addr defines the delegator address to query for.""" + pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -609,10 +722,13 @@ class QueryDelegatorDelegationsResponse(betterproto.Message): Query/DelegatorDelegations RPC method. """ - # delegation_responses defines all the delegations' info of a delegator. delegation_responses: List["DelegationResponse"] = betterproto.message_field(1) - # pagination defines the pagination in the response. + """ + delegation_responses defines all the delegations' info of a delegator. + """ + pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) @@ -622,10 +738,11 @@ class QueryDelegatorUnbondingDelegationsRequest(betterproto.Message): Query/DelegatorUnbondingDelegations RPC method. """ - # delegator_addr defines the delegator address to query for. delegator_addr: str = betterproto.string_field(1) - # pagination defines an optional pagination for the request. + """delegator_addr defines the delegator address to query for.""" + pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -636,8 +753,8 @@ class QueryDelegatorUnbondingDelegationsResponse(betterproto.Message): """ unbonding_responses: List["UnbondingDelegation"] = betterproto.message_field(1) - # pagination defines the pagination in the response. pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) @@ -647,14 +764,17 @@ class QueryRedelegationsRequest(betterproto.Message): method. """ - # delegator_addr defines the delegator address to query for. delegator_addr: str = betterproto.string_field(1) - # src_validator_addr defines the validator address to redelegate from. + """delegator_addr defines the delegator address to query for.""" + src_validator_addr: str = betterproto.string_field(2) - # dst_validator_addr defines the validator address to redelegate to. + """src_validator_addr defines the validator address to redelegate from.""" + dst_validator_addr: str = betterproto.string_field(3) - # pagination defines an optional pagination for the request. + """dst_validator_addr defines the validator address to redelegate to.""" + pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(4) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -665,8 +785,8 @@ class QueryRedelegationsResponse(betterproto.Message): """ redelegation_responses: List["RedelegationResponse"] = betterproto.message_field(1) - # pagination defines the pagination in the response. pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) @@ -676,10 +796,11 @@ class QueryDelegatorValidatorsRequest(betterproto.Message): Query/DelegatorValidators RPC method. """ - # delegator_addr defines the delegator address to query for. delegator_addr: str = betterproto.string_field(1) - # pagination defines an optional pagination for the request. + """delegator_addr defines the delegator address to query for.""" + pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) + """pagination defines an optional pagination for the request.""" @dataclass(eq=False, repr=False) @@ -689,10 +810,11 @@ class QueryDelegatorValidatorsResponse(betterproto.Message): Query/DelegatorValidators RPC method. """ - # validators defines the the validators' info of a delegator. validators: List["Validator"] = betterproto.message_field(1) - # pagination defines the pagination in the response. + """validators defines the the validators' info of a delegator.""" + pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(2) + """pagination defines the pagination in the response.""" @dataclass(eq=False, repr=False) @@ -702,10 +824,11 @@ class QueryDelegatorValidatorRequest(betterproto.Message): Query/DelegatorValidator RPC method. """ - # delegator_addr defines the delegator address to query for. delegator_addr: str = betterproto.string_field(1) - # validator_addr defines the validator address to query for. + """delegator_addr defines the delegator address to query for.""" + validator_addr: str = betterproto.string_field(2) + """validator_addr defines the validator address to query for.""" @dataclass(eq=False, repr=False) @@ -715,8 +838,8 @@ class QueryDelegatorValidatorResponse(betterproto.Message): Query/DelegatorValidator RPC method. """ - # validator defines the the validator info. validator: "Validator" = betterproto.message_field(1) + """validator defines the the validator info.""" @dataclass(eq=False, repr=False) @@ -726,8 +849,8 @@ class QueryHistoricalInfoRequest(betterproto.Message): method. """ - # height defines at which height to query the historical info. height: int = betterproto.int64_field(1) + """height defines at which height to query the historical info.""" @dataclass(eq=False, repr=False) @@ -737,8 +860,8 @@ class QueryHistoricalInfoResponse(betterproto.Message): RPC method. """ - # hist defines the historical info at the given height. hist: "HistoricalInfo" = betterproto.message_field(1) + """hist defines the historical info at the given height.""" @dataclass(eq=False, repr=False) @@ -752,8 +875,8 @@ class QueryPoolRequest(betterproto.Message): class QueryPoolResponse(betterproto.Message): """QueryPoolResponse is response type for the Query/Pool RPC method.""" - # pool defines the pool info. pool: "Pool" = betterproto.message_field(1) + """pool defines the pool info.""" @dataclass(eq=False, repr=False) @@ -769,8 +892,8 @@ class QueryParamsResponse(betterproto.Message): QueryParamsResponse is response type for the Query/Params RPC method. """ - # params holds all the parameters of this module. params: "Params" = betterproto.message_field(1) + """params holds all the parameters of this module.""" @dataclass(eq=False, repr=False) @@ -780,22 +903,31 @@ class StakeAuthorization(betterproto.Message): delegate/undelegate/redelegate. Since: cosmos-sdk 0.43 """ - # max_tokens specifies the maximum amount of tokens can be delegate to a - # validator. If it is empty, there is no spend limit and any amount of coins - # can be delegated. max_tokens: "__base_v1_beta1__.Coin" = betterproto.message_field(1) - # allow_list specifies list of validator addresses to whom grantee can - # delegate tokens on behalf of granter's account. + """ + max_tokens specifies the maximum amount of tokens can be delegate to a + validator. If it is empty, there is no spend limit and any amount of coins + can be delegated. + """ + allow_list: "StakeAuthorizationValidators" = betterproto.message_field( 2, group="validators" ) - # deny_list specifies list of validator addresses to whom grantee can not - # delegate tokens. + """ + allow_list specifies list of validator addresses to whom grantee can + delegate tokens on behalf of granter's account. + """ + deny_list: "StakeAuthorizationValidators" = betterproto.message_field( 3, group="validators" ) - # authorization_type defines one of AuthorizationType. + """ + deny_list specifies list of validator addresses to whom grantee can not + delegate tokens. + """ + authorization_type: "AuthorizationType" = betterproto.enum_field(4) + """authorization_type defines one of AuthorizationType.""" @dataclass(eq=False, repr=False) @@ -809,22 +941,35 @@ class StakeAuthorizationValidators(betterproto.Message): class GenesisState(betterproto.Message): """GenesisState defines the staking module's genesis state.""" - # params defines all the paramaters of related to deposit. params: "Params" = betterproto.message_field(1) - # last_total_power tracks the total amounts of bonded tokens recorded during - # the previous end block. + """params defines all the paramaters of related to deposit.""" + last_total_power: bytes = betterproto.bytes_field(2) - # last_validator_powers is a special index that provides a historical list of - # the last-block's bonded validators. + """ + last_total_power tracks the total amounts of bonded tokens recorded during + the previous end block. + """ + last_validator_powers: List["LastValidatorPower"] = betterproto.message_field(3) - # delegations defines the validator set at genesis. + """ + last_validator_powers is a special index that provides a historical list of + the last-block's bonded validators. + """ + validators: List["Validator"] = betterproto.message_field(4) - # delegations defines the delegations active at genesis. + """delegations defines the validator set at genesis.""" + delegations: List["Delegation"] = betterproto.message_field(5) - # unbonding_delegations defines the unbonding delegations active at genesis. + """delegations defines the delegations active at genesis.""" + unbonding_delegations: List["UnbondingDelegation"] = betterproto.message_field(6) - # redelegations defines the redelegations active at genesis. + """ + unbonding_delegations defines the unbonding delegations active at genesis. + """ + redelegations: List["Redelegation"] = betterproto.message_field(7) + """redelegations defines the redelegations active at genesis.""" + exported: bool = betterproto.bool_field(8) @@ -832,444 +977,400 @@ class GenesisState(betterproto.Message): class LastValidatorPower(betterproto.Message): """LastValidatorPower required for validator set update logic.""" - # address is the address of the validator. address: str = betterproto.string_field(1) - # power defines the power of the validator. + """address is the address of the validator.""" + power: int = betterproto.int64_field(2) + """power defines the power of the validator.""" class MsgStub(betterproto.ServiceStub): async def create_validator( self, + msg_create_validator: "MsgCreateValidator", *, - description: "Description" = None, - commission: "CommissionRates" = None, - min_self_delegation: str = "", - delegator_address: str = "", - validator_address: str = "", - pubkey: "betterproto_lib_google_protobuf.Any" = None, - value: "__base_v1_beta1__.Coin" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgCreateValidatorResponse": - - request = MsgCreateValidator() - if description is not None: - request.description = description - if commission is not None: - request.commission = commission - request.min_self_delegation = min_self_delegation - request.delegator_address = delegator_address - request.validator_address = validator_address - if pubkey is not None: - request.pubkey = pubkey - if value is not None: - request.value = value - return await self._unary_unary( "/cosmos.staking.v1beta1.Msg/CreateValidator", - request, + msg_create_validator, MsgCreateValidatorResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def edit_validator( self, + msg_edit_validator: "MsgEditValidator", *, - description: "Description" = None, - validator_address: str = "", - commission_rate: str = "", - min_self_delegation: str = "" + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgEditValidatorResponse": - - request = MsgEditValidator() - if description is not None: - request.description = description - request.validator_address = validator_address - request.commission_rate = commission_rate - request.min_self_delegation = min_self_delegation - return await self._unary_unary( "/cosmos.staking.v1beta1.Msg/EditValidator", - request, + msg_edit_validator, MsgEditValidatorResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def delegate( self, + msg_delegate: "MsgDelegate", *, - delegator_address: str = "", - validator_address: str = "", - amount: "__base_v1_beta1__.Coin" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgDelegateResponse": - - request = MsgDelegate() - request.delegator_address = delegator_address - request.validator_address = validator_address - if amount is not None: - request.amount = amount - return await self._unary_unary( - "/cosmos.staking.v1beta1.Msg/Delegate", request, MsgDelegateResponse + "/cosmos.staking.v1beta1.Msg/Delegate", + msg_delegate, + MsgDelegateResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def begin_redelegate( self, + msg_begin_redelegate: "MsgBeginRedelegate", *, - delegator_address: str = "", - validator_src_address: str = "", - validator_dst_address: str = "", - amount: "__base_v1_beta1__.Coin" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgBeginRedelegateResponse": - - request = MsgBeginRedelegate() - request.delegator_address = delegator_address - request.validator_src_address = validator_src_address - request.validator_dst_address = validator_dst_address - if amount is not None: - request.amount = amount - return await self._unary_unary( "/cosmos.staking.v1beta1.Msg/BeginRedelegate", - request, + msg_begin_redelegate, MsgBeginRedelegateResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def undelegate( self, + msg_undelegate: "MsgUndelegate", *, - delegator_address: str = "", - validator_address: str = "", - amount: "__base_v1_beta1__.Coin" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgUndelegateResponse": - - request = MsgUndelegate() - request.delegator_address = delegator_address - request.validator_address = validator_address - if amount is not None: - request.amount = amount - return await self._unary_unary( - "/cosmos.staking.v1beta1.Msg/Undelegate", request, MsgUndelegateResponse + "/cosmos.staking.v1beta1.Msg/Undelegate", + msg_undelegate, + MsgUndelegateResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class QueryStub(betterproto.ServiceStub): async def validators( self, + query_validators_request: "QueryValidatorsRequest", *, - status: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryValidatorsResponse": - - request = QueryValidatorsRequest() - request.status = status - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( - "/cosmos.staking.v1beta1.Query/Validators", request, QueryValidatorsResponse + "/cosmos.staking.v1beta1.Query/Validators", + query_validators_request, + QueryValidatorsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def validator(self, *, validator_addr: str = "") -> "QueryValidatorResponse": - - request = QueryValidatorRequest() - request.validator_addr = validator_addr - + async def validator( + self, + query_validator_request: "QueryValidatorRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryValidatorResponse": return await self._unary_unary( - "/cosmos.staking.v1beta1.Query/Validator", request, QueryValidatorResponse + "/cosmos.staking.v1beta1.Query/Validator", + query_validator_request, + QueryValidatorResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def validator_delegations( self, + query_validator_delegations_request: "QueryValidatorDelegationsRequest", *, - validator_addr: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryValidatorDelegationsResponse": - - request = QueryValidatorDelegationsRequest() - request.validator_addr = validator_addr - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( "/cosmos.staking.v1beta1.Query/ValidatorDelegations", - request, + query_validator_delegations_request, QueryValidatorDelegationsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def validator_unbonding_delegations( self, + query_validator_unbonding_delegations_request: "QueryValidatorUnbondingDelegationsRequest", *, - validator_addr: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryValidatorUnbondingDelegationsResponse": - - request = QueryValidatorUnbondingDelegationsRequest() - request.validator_addr = validator_addr - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", - request, + query_validator_unbonding_delegations_request, QueryValidatorUnbondingDelegationsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def delegation( - self, *, delegator_addr: str = "", validator_addr: str = "" + self, + query_delegation_request: "QueryDelegationRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryDelegationResponse": - - request = QueryDelegationRequest() - request.delegator_addr = delegator_addr - request.validator_addr = validator_addr - return await self._unary_unary( - "/cosmos.staking.v1beta1.Query/Delegation", request, QueryDelegationResponse + "/cosmos.staking.v1beta1.Query/Delegation", + query_delegation_request, + QueryDelegationResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def unbonding_delegation( - self, *, delegator_addr: str = "", validator_addr: str = "" + self, + query_unbonding_delegation_request: "QueryUnbondingDelegationRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryUnbondingDelegationResponse": - - request = QueryUnbondingDelegationRequest() - request.delegator_addr = delegator_addr - request.validator_addr = validator_addr - return await self._unary_unary( "/cosmos.staking.v1beta1.Query/UnbondingDelegation", - request, + query_unbonding_delegation_request, QueryUnbondingDelegationResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def delegator_delegations( self, + query_delegator_delegations_request: "QueryDelegatorDelegationsRequest", *, - delegator_addr: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryDelegatorDelegationsResponse": - - request = QueryDelegatorDelegationsRequest() - request.delegator_addr = delegator_addr - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( "/cosmos.staking.v1beta1.Query/DelegatorDelegations", - request, + query_delegator_delegations_request, QueryDelegatorDelegationsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def delegator_unbonding_delegations( self, + query_delegator_unbonding_delegations_request: "QueryDelegatorUnbondingDelegationsRequest", *, - delegator_addr: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryDelegatorUnbondingDelegationsResponse": - - request = QueryDelegatorUnbondingDelegationsRequest() - request.delegator_addr = delegator_addr - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", - request, + query_delegator_unbonding_delegations_request, QueryDelegatorUnbondingDelegationsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def redelegations( self, + query_redelegations_request: "QueryRedelegationsRequest", *, - delegator_addr: str = "", - src_validator_addr: str = "", - dst_validator_addr: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryRedelegationsResponse": - - request = QueryRedelegationsRequest() - request.delegator_addr = delegator_addr - request.src_validator_addr = src_validator_addr - request.dst_validator_addr = dst_validator_addr - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( "/cosmos.staking.v1beta1.Query/Redelegations", - request, + query_redelegations_request, QueryRedelegationsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def delegator_validators( self, + query_delegator_validators_request: "QueryDelegatorValidatorsRequest", *, - delegator_addr: str = "", - pagination: "__base_query_v1_beta1__.PageRequest" = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryDelegatorValidatorsResponse": - - request = QueryDelegatorValidatorsRequest() - request.delegator_addr = delegator_addr - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( "/cosmos.staking.v1beta1.Query/DelegatorValidators", - request, + query_delegator_validators_request, QueryDelegatorValidatorsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def delegator_validator( - self, *, delegator_addr: str = "", validator_addr: str = "" + self, + query_delegator_validator_request: "QueryDelegatorValidatorRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryDelegatorValidatorResponse": - - request = QueryDelegatorValidatorRequest() - request.delegator_addr = delegator_addr - request.validator_addr = validator_addr - return await self._unary_unary( "/cosmos.staking.v1beta1.Query/DelegatorValidator", - request, + query_delegator_validator_request, QueryDelegatorValidatorResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def historical_info( - self, *, height: int = 0 + self, + query_historical_info_request: "QueryHistoricalInfoRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryHistoricalInfoResponse": - - request = QueryHistoricalInfoRequest() - request.height = height - return await self._unary_unary( "/cosmos.staking.v1beta1.Query/HistoricalInfo", - request, + query_historical_info_request, QueryHistoricalInfoResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def pool(self) -> "QueryPoolResponse": - - request = QueryPoolRequest() - + async def pool( + self, + query_pool_request: "QueryPoolRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryPoolResponse": return await self._unary_unary( - "/cosmos.staking.v1beta1.Query/Pool", request, QueryPoolResponse + "/cosmos.staking.v1beta1.Query/Pool", + query_pool_request, + QueryPoolResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def params(self) -> "QueryParamsResponse": - - request = QueryParamsRequest() - + async def params( + self, + query_params_request: "QueryParamsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryParamsResponse": return await self._unary_unary( - "/cosmos.staking.v1beta1.Query/Params", request, QueryParamsResponse + "/cosmos.staking.v1beta1.Query/Params", + query_params_request, + QueryParamsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class MsgBase(ServiceBase): async def create_validator( - self, - description: "Description", - commission: "CommissionRates", - min_self_delegation: str, - delegator_address: str, - validator_address: str, - pubkey: "betterproto_lib_google_protobuf.Any", - value: "__base_v1_beta1__.Coin", + self, msg_create_validator: "MsgCreateValidator" ) -> "MsgCreateValidatorResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def edit_validator( - self, - description: "Description", - validator_address: str, - commission_rate: str, - min_self_delegation: str, + self, msg_edit_validator: "MsgEditValidator" ) -> "MsgEditValidatorResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def delegate( - self, - delegator_address: str, - validator_address: str, - amount: "__base_v1_beta1__.Coin", - ) -> "MsgDelegateResponse": + async def delegate(self, msg_delegate: "MsgDelegate") -> "MsgDelegateResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def begin_redelegate( - self, - delegator_address: str, - validator_src_address: str, - validator_dst_address: str, - amount: "__base_v1_beta1__.Coin", + self, msg_begin_redelegate: "MsgBeginRedelegate" ) -> "MsgBeginRedelegateResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def undelegate( - self, - delegator_address: str, - validator_address: str, - amount: "__base_v1_beta1__.Coin", + self, msg_undelegate: "MsgUndelegate" ) -> "MsgUndelegateResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_create_validator(self, stream: grpclib.server.Stream) -> None: + async def __rpc_create_validator( + self, + stream: "grpclib.server.Stream[MsgCreateValidator, MsgCreateValidatorResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "description": request.description, - "commission": request.commission, - "min_self_delegation": request.min_self_delegation, - "delegator_address": request.delegator_address, - "validator_address": request.validator_address, - "pubkey": request.pubkey, - "value": request.value, - } - - response = await self.create_validator(**request_kwargs) + response = await self.create_validator(request) await stream.send_message(response) - async def __rpc_edit_validator(self, stream: grpclib.server.Stream) -> None: + async def __rpc_edit_validator( + self, + stream: "grpclib.server.Stream[MsgEditValidator, MsgEditValidatorResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "description": request.description, - "validator_address": request.validator_address, - "commission_rate": request.commission_rate, - "min_self_delegation": request.min_self_delegation, - } - - response = await self.edit_validator(**request_kwargs) + response = await self.edit_validator(request) await stream.send_message(response) - async def __rpc_delegate(self, stream: grpclib.server.Stream) -> None: + async def __rpc_delegate( + self, stream: "grpclib.server.Stream[MsgDelegate, MsgDelegateResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_address": request.delegator_address, - "validator_address": request.validator_address, - "amount": request.amount, - } - - response = await self.delegate(**request_kwargs) + response = await self.delegate(request) await stream.send_message(response) - async def __rpc_begin_redelegate(self, stream: grpclib.server.Stream) -> None: + async def __rpc_begin_redelegate( + self, + stream: "grpclib.server.Stream[MsgBeginRedelegate, MsgBeginRedelegateResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_address": request.delegator_address, - "validator_src_address": request.validator_src_address, - "validator_dst_address": request.validator_dst_address, - "amount": request.amount, - } - - response = await self.begin_redelegate(**request_kwargs) + response = await self.begin_redelegate(request) await stream.send_message(response) - async def __rpc_undelegate(self, stream: grpclib.server.Stream) -> None: + async def __rpc_undelegate( + self, stream: "grpclib.server.Stream[MsgUndelegate, MsgUndelegateResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_address": request.delegator_address, - "validator_address": request.validator_address, - "amount": request.amount, - } - - response = await self.undelegate(**request_kwargs) + response = await self.undelegate(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -1309,221 +1410,183 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: class QueryBase(ServiceBase): async def validators( - self, status: str, pagination: "__base_query_v1_beta1__.PageRequest" + self, query_validators_request: "QueryValidatorsRequest" ) -> "QueryValidatorsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def validator(self, validator_addr: str) -> "QueryValidatorResponse": + async def validator( + self, query_validator_request: "QueryValidatorRequest" + ) -> "QueryValidatorResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def validator_delegations( - self, validator_addr: str, pagination: "__base_query_v1_beta1__.PageRequest" + self, query_validator_delegations_request: "QueryValidatorDelegationsRequest" ) -> "QueryValidatorDelegationsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def validator_unbonding_delegations( - self, validator_addr: str, pagination: "__base_query_v1_beta1__.PageRequest" + self, + query_validator_unbonding_delegations_request: "QueryValidatorUnbondingDelegationsRequest", ) -> "QueryValidatorUnbondingDelegationsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def delegation( - self, delegator_addr: str, validator_addr: str + self, query_delegation_request: "QueryDelegationRequest" ) -> "QueryDelegationResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def unbonding_delegation( - self, delegator_addr: str, validator_addr: str + self, query_unbonding_delegation_request: "QueryUnbondingDelegationRequest" ) -> "QueryUnbondingDelegationResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def delegator_delegations( - self, delegator_addr: str, pagination: "__base_query_v1_beta1__.PageRequest" + self, query_delegator_delegations_request: "QueryDelegatorDelegationsRequest" ) -> "QueryDelegatorDelegationsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def delegator_unbonding_delegations( - self, delegator_addr: str, pagination: "__base_query_v1_beta1__.PageRequest" + self, + query_delegator_unbonding_delegations_request: "QueryDelegatorUnbondingDelegationsRequest", ) -> "QueryDelegatorUnbondingDelegationsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def redelegations( - self, - delegator_addr: str, - src_validator_addr: str, - dst_validator_addr: str, - pagination: "__base_query_v1_beta1__.PageRequest", + self, query_redelegations_request: "QueryRedelegationsRequest" ) -> "QueryRedelegationsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def delegator_validators( - self, delegator_addr: str, pagination: "__base_query_v1_beta1__.PageRequest" + self, query_delegator_validators_request: "QueryDelegatorValidatorsRequest" ) -> "QueryDelegatorValidatorsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def delegator_validator( - self, delegator_addr: str, validator_addr: str + self, query_delegator_validator_request: "QueryDelegatorValidatorRequest" ) -> "QueryDelegatorValidatorResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def historical_info(self, height: int) -> "QueryHistoricalInfoResponse": + async def historical_info( + self, query_historical_info_request: "QueryHistoricalInfoRequest" + ) -> "QueryHistoricalInfoResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def pool(self) -> "QueryPoolResponse": + async def pool(self, query_pool_request: "QueryPoolRequest") -> "QueryPoolResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def params(self) -> "QueryParamsResponse": + async def params( + self, query_params_request: "QueryParamsRequest" + ) -> "QueryParamsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_validators(self, stream: grpclib.server.Stream) -> None: + async def __rpc_validators( + self, + stream: "grpclib.server.Stream[QueryValidatorsRequest, QueryValidatorsResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "status": request.status, - "pagination": request.pagination, - } - - response = await self.validators(**request_kwargs) + response = await self.validators(request) await stream.send_message(response) - async def __rpc_validator(self, stream: grpclib.server.Stream) -> None: + async def __rpc_validator( + self, + stream: "grpclib.server.Stream[QueryValidatorRequest, QueryValidatorResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "validator_addr": request.validator_addr, - } - - response = await self.validator(**request_kwargs) + response = await self.validator(request) await stream.send_message(response) - async def __rpc_validator_delegations(self, stream: grpclib.server.Stream) -> None: + async def __rpc_validator_delegations( + self, + stream: "grpclib.server.Stream[QueryValidatorDelegationsRequest, QueryValidatorDelegationsResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "validator_addr": request.validator_addr, - "pagination": request.pagination, - } - - response = await self.validator_delegations(**request_kwargs) + response = await self.validator_delegations(request) await stream.send_message(response) async def __rpc_validator_unbonding_delegations( - self, stream: grpclib.server.Stream + self, + stream: "grpclib.server.Stream[QueryValidatorUnbondingDelegationsRequest, QueryValidatorUnbondingDelegationsResponse]", ) -> None: request = await stream.recv_message() - - request_kwargs = { - "validator_addr": request.validator_addr, - "pagination": request.pagination, - } - - response = await self.validator_unbonding_delegations(**request_kwargs) + response = await self.validator_unbonding_delegations(request) await stream.send_message(response) - async def __rpc_delegation(self, stream: grpclib.server.Stream) -> None: + async def __rpc_delegation( + self, + stream: "grpclib.server.Stream[QueryDelegationRequest, QueryDelegationResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_addr": request.delegator_addr, - "validator_addr": request.validator_addr, - } - - response = await self.delegation(**request_kwargs) + response = await self.delegation(request) await stream.send_message(response) - async def __rpc_unbonding_delegation(self, stream: grpclib.server.Stream) -> None: + async def __rpc_unbonding_delegation( + self, + stream: "grpclib.server.Stream[QueryUnbondingDelegationRequest, QueryUnbondingDelegationResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_addr": request.delegator_addr, - "validator_addr": request.validator_addr, - } - - response = await self.unbonding_delegation(**request_kwargs) + response = await self.unbonding_delegation(request) await stream.send_message(response) - async def __rpc_delegator_delegations(self, stream: grpclib.server.Stream) -> None: + async def __rpc_delegator_delegations( + self, + stream: "grpclib.server.Stream[QueryDelegatorDelegationsRequest, QueryDelegatorDelegationsResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_addr": request.delegator_addr, - "pagination": request.pagination, - } - - response = await self.delegator_delegations(**request_kwargs) + response = await self.delegator_delegations(request) await stream.send_message(response) async def __rpc_delegator_unbonding_delegations( - self, stream: grpclib.server.Stream + self, + stream: "grpclib.server.Stream[QueryDelegatorUnbondingDelegationsRequest, QueryDelegatorUnbondingDelegationsResponse]", ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_addr": request.delegator_addr, - "pagination": request.pagination, - } - - response = await self.delegator_unbonding_delegations(**request_kwargs) + response = await self.delegator_unbonding_delegations(request) await stream.send_message(response) - async def __rpc_redelegations(self, stream: grpclib.server.Stream) -> None: + async def __rpc_redelegations( + self, + stream: "grpclib.server.Stream[QueryRedelegationsRequest, QueryRedelegationsResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_addr": request.delegator_addr, - "src_validator_addr": request.src_validator_addr, - "dst_validator_addr": request.dst_validator_addr, - "pagination": request.pagination, - } - - response = await self.redelegations(**request_kwargs) + response = await self.redelegations(request) await stream.send_message(response) - async def __rpc_delegator_validators(self, stream: grpclib.server.Stream) -> None: + async def __rpc_delegator_validators( + self, + stream: "grpclib.server.Stream[QueryDelegatorValidatorsRequest, QueryDelegatorValidatorsResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_addr": request.delegator_addr, - "pagination": request.pagination, - } - - response = await self.delegator_validators(**request_kwargs) + response = await self.delegator_validators(request) await stream.send_message(response) - async def __rpc_delegator_validator(self, stream: grpclib.server.Stream) -> None: + async def __rpc_delegator_validator( + self, + stream: "grpclib.server.Stream[QueryDelegatorValidatorRequest, QueryDelegatorValidatorResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "delegator_addr": request.delegator_addr, - "validator_addr": request.validator_addr, - } - - response = await self.delegator_validator(**request_kwargs) + response = await self.delegator_validator(request) await stream.send_message(response) - async def __rpc_historical_info(self, stream: grpclib.server.Stream) -> None: + async def __rpc_historical_info( + self, + stream: "grpclib.server.Stream[QueryHistoricalInfoRequest, QueryHistoricalInfoResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "height": request.height, - } - - response = await self.historical_info(**request_kwargs) + response = await self.historical_info(request) await stream.send_message(response) - async def __rpc_pool(self, stream: grpclib.server.Stream) -> None: + async def __rpc_pool( + self, stream: "grpclib.server.Stream[QueryPoolRequest, QueryPoolResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.pool(**request_kwargs) + response = await self.pool(request) await stream.send_message(response) - async def __rpc_params(self, stream: grpclib.server.Stream) -> None: + async def __rpc_params( + self, stream: "grpclib.server.Stream[QueryParamsRequest, QueryParamsResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.params(**request_kwargs) + response = await self.params(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -1613,9 +1676,3 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: QueryParamsResponse, ), } - - -from ....tendermint import types as ___tendermint_types__ -from ...base import v1beta1 as __base_v1_beta1__ -from ...base.query import v1beta1 as __base_query_v1_beta1__ -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf diff --git a/python/terra_proto/cosmos/tx/signing/v1beta1/__init__.py b/python/terra_proto/cosmos/tx/signing/v1beta1/__init__.py index 5eb2123..6ba079b 100644 --- a/python/terra_proto/cosmos/tx/signing/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/tx/signing/v1beta1/__init__.py @@ -5,41 +5,46 @@ from typing import List import betterproto -from betterproto.grpc.grpclib_server import ServiceBase +import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf + +from ....crypto.multisig import v1beta1 as ___crypto_multisig_v1_beta1__ class SignMode(betterproto.Enum): """SignMode represents a signing mode with its own security guarantees.""" - # SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - # rejected SIGN_MODE_UNSPECIFIED = 0 - # SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - # verified with raw bytes from Tx + """ + SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected + """ + SIGN_MODE_DIRECT = 1 - # SIGN_MODE_TEXTUAL is a future signing mode that will verify some human- - # readable textual representation on top of the binary representation from - # SIGN_MODE_DIRECT + """ + SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx + """ + SIGN_MODE_TEXTUAL = 2 - # SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - # Amino JSON and will be removed in the future + """ + SIGN_MODE_TEXTUAL is a future signing mode that will verify some human- + readable textual representation on top of the binary representation from + SIGN_MODE_DIRECT + """ + SIGN_MODE_LEGACY_AMINO_JSON = 127 - # SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos - # SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 Currently, - # SIGN_MODE_EIP_191 is registered as a SignMode enum variant, but is not - # implemented on the SDK by default. To enable EIP-191, you need to pass a - # custom `TxConfig` that has an implementation of `SignModeHandler` for - # EIP-191. The SDK may decide to fully support EIP-191 in the future. Since: - # cosmos-sdk 0.45.2 - SIGN_MODE_EIP_191 = 191 + """ + SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future + """ @dataclass(eq=False, repr=False) class SignatureDescriptors(betterproto.Message): """SignatureDescriptors wraps multiple SignatureDescriptor's.""" - # signatures are the signature descriptors signatures: List["SignatureDescriptor"] = betterproto.message_field(1) + """signatures are the signature descriptors""" @dataclass(eq=False, repr=False) @@ -51,46 +56,48 @@ class SignatureDescriptor(betterproto.Message): between clients. """ - # public_key is the public key of the signer public_key: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(1) + """public_key is the public key of the signer""" + data: "SignatureDescriptorData" = betterproto.message_field(2) - # sequence is the sequence of the account, which describes the number of - # committed transactions signed by a given address. It is used to prevent - # replay attacks. sequence: int = betterproto.uint64_field(3) + """ + sequence is the sequence of the account, which describes the number of + committed transactions signed by a given address. It is used to prevent + replay attacks. + """ @dataclass(eq=False, repr=False) class SignatureDescriptorData(betterproto.Message): """Data represents signature data""" - # single represents a single signer single: "SignatureDescriptorDataSingle" = betterproto.message_field(1, group="sum") - # multi represents a multisig signer + """single represents a single signer""" + multi: "SignatureDescriptorDataMulti" = betterproto.message_field(2, group="sum") + """multi represents a multisig signer""" @dataclass(eq=False, repr=False) class SignatureDescriptorDataSingle(betterproto.Message): """Single is the signature data for a single signer""" - # mode is the signing mode of the single signer mode: "SignMode" = betterproto.enum_field(1) - # signature is the raw signature bytes + """mode is the signing mode of the single signer""" + signature: bytes = betterproto.bytes_field(2) + """signature is the raw signature bytes""" @dataclass(eq=False, repr=False) class SignatureDescriptorDataMulti(betterproto.Message): """Multi is the signature data for a multisig public key""" - # bitarray specifies which keys within the multisig are signing bitarray: "___crypto_multisig_v1_beta1__.CompactBitArray" = ( betterproto.message_field(1) ) - # signatures is the signatures of the multi-signature - signatures: List["SignatureDescriptorData"] = betterproto.message_field(2) - + """bitarray specifies which keys within the multisig are signing""" -from ....crypto.multisig import v1beta1 as ___crypto_multisig_v1_beta1__ -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf + signatures: List["SignatureDescriptorData"] = betterproto.message_field(2) + """signatures is the signatures of the multi-signature""" diff --git a/python/terra_proto/cosmos/tx/v1beta1/__init__.py b/python/terra_proto/cosmos/tx/v1beta1/__init__.py index 74c15ee..72023f8 100644 --- a/python/terra_proto/cosmos/tx/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/tx/v1beta1/__init__.py @@ -3,23 +3,45 @@ # plugin: python-betterproto import warnings from dataclasses import dataclass -from typing import Dict, List, Optional +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase +import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ...base import v1beta1 as __base_v1_beta1__ +from ...base.abci import v1beta1 as __base_abci_v1_beta1__ +from ...base.query import v1beta1 as __base_query_v1_beta1__ +from ...crypto.multisig import v1beta1 as __crypto_multisig_v1_beta1__ +from ..signing import v1beta1 as _signing_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline class OrderBy(betterproto.Enum): """OrderBy defines the sorting order""" - # ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults - # to ASC in this case. ORDER_BY_UNSPECIFIED = 0 - # ORDER_BY_ASC defines ascending order + """ + ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults + to ASC in this case. + """ + ORDER_BY_ASC = 1 - # ORDER_BY_DESC defines descending order + """ORDER_BY_ASC defines ascending order""" + ORDER_BY_DESC = 2 + """ORDER_BY_DESC defines descending order""" class BroadcastMode(betterproto.Enum): @@ -28,32 +50,47 @@ class BroadcastMode(betterproto.Enum): method. """ - # zero-value for mode ordering BROADCAST_MODE_UNSPECIFIED = 0 - # BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits - # for the tx to be committed in a block. + """zero-value for mode ordering""" + BROADCAST_MODE_BLOCK = 1 - # BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits - # for a CheckTx execution response only. + """ + BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits + for the tx to be committed in a block. + """ + BROADCAST_MODE_SYNC = 2 - # BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client - # returns immediately. + """ + BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits + for a CheckTx execution response only. + """ + BROADCAST_MODE_ASYNC = 3 + """ + BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client + returns immediately. + """ @dataclass(eq=False, repr=False) class Tx(betterproto.Message): """Tx is the standard type used for broadcasting transactions.""" - # body is the processable content of the transaction body: "TxBody" = betterproto.message_field(1) - # auth_info is the authorization related content of the transaction, - # specifically signers, signer modes and fee + """body is the processable content of the transaction""" + auth_info: "AuthInfo" = betterproto.message_field(2) - # signatures is a list of signatures that matches the length and order of - # AuthInfo's signer_infos to allow connecting signature meta information like - # public key and signing mode by position. + """ + auth_info is the authorization related content of the transaction, + specifically signers, signer modes and fee + """ + signatures: List[bytes] = betterproto.bytes_field(3) + """ + signatures is a list of signatures that matches the length and order of + AuthInfo's signer_infos to allow connecting signature meta information like + public key and signing mode by position. + """ @dataclass(eq=False, repr=False) @@ -66,16 +103,24 @@ class TxRaw(betterproto.Message): as the transaction ID. """ - # body_bytes is a protobuf serialization of a TxBody that matches the - # representation in SignDoc. body_bytes: bytes = betterproto.bytes_field(1) - # auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - # representation in SignDoc. + """ + body_bytes is a protobuf serialization of a TxBody that matches the + representation in SignDoc. + """ + auth_info_bytes: bytes = betterproto.bytes_field(2) - # signatures is a list of signatures that matches the length and order of - # AuthInfo's signer_infos to allow connecting signature meta information like - # public key and signing mode by position. + """ + auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + representation in SignDoc. + """ + signatures: List[bytes] = betterproto.bytes_field(3) + """ + signatures is a list of signatures that matches the length and order of + AuthInfo's signer_infos to allow connecting signature meta information like + public key and signing mode by position. + """ @dataclass(eq=False, repr=False) @@ -84,51 +129,74 @@ class SignDoc(betterproto.Message): SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. """ - # body_bytes is protobuf serialization of a TxBody that matches the - # representation in TxRaw. body_bytes: bytes = betterproto.bytes_field(1) - # auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - # representation in TxRaw. + """ + body_bytes is protobuf serialization of a TxBody that matches the + representation in TxRaw. + """ + auth_info_bytes: bytes = betterproto.bytes_field(2) - # chain_id is the unique identifier of the chain this transaction targets. It - # prevents signed transactions from being used on another chain by an - # attacker + """ + auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + representation in TxRaw. + """ + chain_id: str = betterproto.string_field(3) - # account_number is the account number of the account in state + """ + chain_id is the unique identifier of the chain this transaction targets. It + prevents signed transactions from being used on another chain by an + attacker + """ + account_number: int = betterproto.uint64_field(4) + """account_number is the account number of the account in state""" @dataclass(eq=False, repr=False) class TxBody(betterproto.Message): """TxBody is the body of a transaction that all signers sign over.""" - # messages is a list of messages to be executed. The required signers of - # those messages define the number and order of elements in AuthInfo's - # signer_infos and Tx's signatures. Each required signer address is added to - # the list only the first time it occurs. By convention, the first required - # signer (usually from the first message) is referred to as the primary - # signer and pays the fee for the whole transaction. messages: List["betterproto_lib_google_protobuf.Any"] = betterproto.message_field(1) - # memo is any arbitrary note/comment to be added to the transaction. WARNING: - # in clients, any publicly exposed text should not be called memo, but should - # be called `note` instead (see https://github.com/cosmos/cosmos- - # sdk/issues/9122). + """ + messages is a list of messages to be executed. The required signers of + those messages define the number and order of elements in AuthInfo's + signer_infos and Tx's signatures. Each required signer address is added to + the list only the first time it occurs. By convention, the first required + signer (usually from the first message) is referred to as the primary + signer and pays the fee for the whole transaction. + """ + memo: str = betterproto.string_field(2) - # timeout is the block height after which this transaction will not be - # processed by the chain + """ + memo is any arbitrary note/comment to be added to the transaction. WARNING: + in clients, any publicly exposed text should not be called memo, but should + be called `note` instead (see https://github.com/cosmos/cosmos- + sdk/issues/9122). + """ + timeout_height: int = betterproto.uint64_field(3) - # extension_options are arbitrary options that can be added by chains when - # the default options are not sufficient. If any of these are present and - # can't be handled, the transaction will be rejected + """ + timeout is the block height after which this transaction will not be + processed by the chain + """ + extension_options: List[ "betterproto_lib_google_protobuf.Any" ] = betterproto.message_field(1023) - # extension_options are arbitrary options that can be added by chains when - # the default options are not sufficient. If any of these are present and - # can't be handled, they will be ignored + """ + extension_options are arbitrary options that can be added by chains when + the default options are not sufficient. If any of these are present and + can't be handled, the transaction will be rejected + """ + non_critical_extension_options: List[ "betterproto_lib_google_protobuf.Any" ] = betterproto.message_field(2047) + """ + extension_options are arbitrary options that can be added by chains when + the default options are not sufficient. If any of these are present and + can't be handled, they will be ignored + """ @dataclass(eq=False, repr=False) @@ -138,16 +206,21 @@ class AuthInfo(betterproto.Message): transaction. """ - # signer_infos defines the signing modes for the required signers. The number - # and order of elements must match the required signers from TxBody's - # messages. The first element is the primary signer and the one which pays - # the fee. signer_infos: List["SignerInfo"] = betterproto.message_field(1) - # Fee is the fee and gas limit for the transaction. The first signer is the - # primary signer and the one which pays the fee. The fee can be calculated - # based on the cost of evaluating the body and doing signature verification - # of the signers. This can be estimated via simulation. + """ + signer_infos defines the signing modes for the required signers. The number + and order of elements must match the required signers from TxBody's + messages. The first element is the primary signer and the one which pays + the fee. + """ + fee: "Fee" = betterproto.message_field(2) + """ + Fee is the fee and gas limit for the transaction. The first signer is the + primary signer and the one which pays the fee. The fee can be calculated + based on the cost of evaluating the body and doing signature verification + of the signers. This can be estimated via simulation. + """ @dataclass(eq=False, repr=False) @@ -157,17 +230,25 @@ class SignerInfo(betterproto.Message): signer. """ - # public_key is the public key of the signer. It is optional for accounts - # that already exist in state. If unset, the verifier can use the required \ - # signer address for this position and lookup the public key. public_key: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(1) - # mode_info describes the signing mode of the signer and is a nested - # structure to support nested multisig pubkey's + """ + public_key is the public key of the signer. It is optional for accounts + that already exist in state. If unset, the verifier can use the required \ + signer address for this position and lookup the public key. + """ + mode_info: "ModeInfo" = betterproto.message_field(2) - # sequence is the sequence of the account, which describes the number of - # committed transactions signed by a given address. It is used to prevent - # replay attacks. + """ + mode_info describes the signing mode of the signer and is a nested + structure to support nested multisig pubkey's + """ + sequence: int = betterproto.uint64_field(3) + """ + sequence is the sequence of the account, which describes the number of + committed transactions signed by a given address. It is used to prevent + replay attacks. + """ @dataclass(eq=False, repr=False) @@ -176,10 +257,11 @@ class ModeInfo(betterproto.Message): ModeInfo describes the signing mode of a single or nested multisig signer. """ - # single represents a single signer single: "ModeInfoSingle" = betterproto.message_field(1, group="sum") - # multi represents a nested multisig signer + """single represents a single signer""" + multi: "ModeInfoMulti" = betterproto.message_field(2, group="sum") + """multi represents a nested multisig signer""" @dataclass(eq=False, repr=False) @@ -190,21 +272,24 @@ class ModeInfoSingle(betterproto.Message): future """ - # mode is the signing mode of the single signer mode: "_signing_v1_beta1__.SignMode" = betterproto.enum_field(1) + """mode is the signing mode of the single signer""" @dataclass(eq=False, repr=False) class ModeInfoMulti(betterproto.Message): """Multi is the mode info for a multisig public key""" - # bitarray specifies which keys within the multisig are signing bitarray: "__crypto_multisig_v1_beta1__.CompactBitArray" = ( betterproto.message_field(1) ) - # mode_infos is the corresponding modes of the signers of the multisig which - # could include nested multisig public keys + """bitarray specifies which keys within the multisig are signing""" + mode_infos: List["ModeInfo"] = betterproto.message_field(2) + """ + mode_infos is the corresponding modes of the signers of the multisig which + could include nested multisig public keys + """ @dataclass(eq=False, repr=False) @@ -215,21 +300,30 @@ class Fee(betterproto.Message): must be above some miminum to be accepted into the mempool. """ - # amount is the amount of coins to be paid as a fee amount: List["__base_v1_beta1__.Coin"] = betterproto.message_field(1) - # gas_limit is the maximum gas that can be used in transaction processing - # before an out of gas error occurs + """amount is the amount of coins to be paid as a fee""" + gas_limit: int = betterproto.uint64_field(2) - # if unset, the first signer is responsible for paying the fees. If set, the - # specified account must pay the fees. the payer must be a tx signer (and - # thus have signed this field in AuthInfo). setting this field does *not* - # change the ordering of required signers for the transaction. + """ + gas_limit is the maximum gas that can be used in transaction processing + before an out of gas error occurs + """ + payer: str = betterproto.string_field(3) - # if set, the fee payer (either the first signer or the value of the payer - # field) requests that a fee grant be used to pay fees instead of the fee - # payer's own balance. If an appropriate fee grant does not exist or the - # chain does not support fee grants, this will fail + """ + if unset, the first signer is responsible for paying the fees. If set, the + specified account must pay the fees. the payer must be a tx signer (and + thus have signed this field in AuthInfo). setting this field does *not* + change the ordering of required signers for the transaction. + """ + granter: str = betterproto.string_field(4) + """ + if set, the fee payer (either the first signer or the value of the payer + field) requests that a fee grant be used to pay fees instead of the fee + payer's own balance. If an appropriate fee grant does not exist or the + chain does not support fee grants, this will fail + """ @dataclass(eq=False, repr=False) @@ -239,10 +333,12 @@ class GetTxsEventRequest(betterproto.Message): method. """ - # events is the list of transaction event type. events: List[str] = betterproto.string_field(1) - # pagination defines a pagination for the request. + """events is the list of transaction event type.""" + pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) + """pagination defines an pagination for the request.""" + order_by: "OrderBy" = betterproto.enum_field(3) @@ -253,14 +349,16 @@ class GetTxsEventResponse(betterproto.Message): method. """ - # txs is the list of queried transactions. txs: List["Tx"] = betterproto.message_field(1) - # tx_responses is the list of queried TxResponses. + """txs is the list of queried transactions.""" + tx_responses: List["__base_abci_v1_beta1__.TxResponse"] = betterproto.message_field( 2 ) - # pagination defines a pagination for the response. + """tx_responses is the list of queried TxResponses.""" + pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(3) + """pagination defines an pagination for the response.""" @dataclass(eq=False, repr=False) @@ -270,8 +368,9 @@ class BroadcastTxRequest(betterproto.Message): RPC method. """ - # tx_bytes is the raw transaction. tx_bytes: bytes = betterproto.bytes_field(1) + """tx_bytes is the raw transaction.""" + mode: "BroadcastMode" = betterproto.enum_field(2) @@ -282,8 +381,8 @@ class BroadcastTxResponse(betterproto.Message): method. """ - # tx_response is the queried TxResponses. tx_response: "__base_abci_v1_beta1__.TxResponse" = betterproto.message_field(1) + """tx_response is the queried TxResponses.""" @dataclass(eq=False, repr=False) @@ -292,14 +391,17 @@ class SimulateRequest(betterproto.Message): SimulateRequest is the request type for the Service.Simulate RPC method. """ - # tx is the transaction to simulate. Deprecated. Send raw tx bytes instead. tx: "Tx" = betterproto.message_field(1) - # tx_bytes is the raw transaction. Since: cosmos-sdk 0.43 + """ + tx is the transaction to simulate. Deprecated. Send raw tx bytes instead. + """ + tx_bytes: bytes = betterproto.bytes_field(2) + """tx_bytes is the raw transaction. Since: cosmos-sdk 0.43""" def __post_init__(self) -> None: super().__post_init__() - if self.tx: + if self.is_set("tx"): warnings.warn("SimulateRequest.tx is deprecated", DeprecationWarning) @@ -309,209 +411,145 @@ class SimulateResponse(betterproto.Message): SimulateResponse is the response type for the Service.SimulateRPC method. """ - # gas_info is the information about gas used in the simulation. gas_info: "__base_abci_v1_beta1__.GasInfo" = betterproto.message_field(1) - # result is the result of the simulation. + """gas_info is the information about gas used in the simulation.""" + result: "__base_abci_v1_beta1__.Result" = betterproto.message_field(2) + """result is the result of the simulation.""" @dataclass(eq=False, repr=False) class GetTxRequest(betterproto.Message): """GetTxRequest is the request type for the Service.GetTx RPC method.""" - # hash is the tx hash to query, encoded as a hex string. hash: str = betterproto.string_field(1) + """hash is the tx hash to query, encoded as a hex string.""" @dataclass(eq=False, repr=False) class GetTxResponse(betterproto.Message): """GetTxResponse is the response type for the Service.GetTx method.""" - # tx is the queried transaction. tx: "Tx" = betterproto.message_field(1) - # tx_response is the queried TxResponses. - tx_response: "__base_abci_v1_beta1__.TxResponse" = betterproto.message_field(2) - + """tx is the queried transaction.""" -@dataclass(eq=False, repr=False) -class GetBlockWithTxsRequest(betterproto.Message): - """ - GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs - RPC method. Since: cosmos-sdk 0.45.2 - """ - - # height is the height of the block to query. - height: int = betterproto.int64_field(1) - # pagination defines a pagination for the request. - pagination: "__base_query_v1_beta1__.PageRequest" = betterproto.message_field(2) - - -@dataclass(eq=False, repr=False) -class GetBlockWithTxsResponse(betterproto.Message): - """ - GetBlockWithTxsResponse is the response type for the - Service.GetBlockWithTxs method. Since: cosmos-sdk 0.45.2 - """ - - # txs are the transactions in the block. - txs: List["Tx"] = betterproto.message_field(1) - block_id: "___tendermint_types__.BlockId" = betterproto.message_field(2) - block: "___tendermint_types__.Block" = betterproto.message_field(3) - # pagination defines a pagination for the response. - pagination: "__base_query_v1_beta1__.PageResponse" = betterproto.message_field(4) + tx_response: "__base_abci_v1_beta1__.TxResponse" = betterproto.message_field(2) + """tx_response is the queried TxResponses.""" class ServiceStub(betterproto.ServiceStub): async def simulate( - self, *, tx: "Tx" = None, tx_bytes: bytes = b"" + self, + simulate_request: "SimulateRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "SimulateResponse": - - request = SimulateRequest() - if tx is not None: - request.tx = tx - request.tx_bytes = tx_bytes - return await self._unary_unary( - "/cosmos.tx.v1beta1.Service/Simulate", request, SimulateResponse + "/cosmos.tx.v1beta1.Service/Simulate", + simulate_request, + SimulateResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def get_tx(self, *, hash: str = "") -> "GetTxResponse": - - request = GetTxRequest() - request.hash = hash - + async def get_tx( + self, + get_tx_request: "GetTxRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "GetTxResponse": return await self._unary_unary( - "/cosmos.tx.v1beta1.Service/GetTx", request, GetTxResponse + "/cosmos.tx.v1beta1.Service/GetTx", + get_tx_request, + GetTxResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def broadcast_tx( - self, *, tx_bytes: bytes = b"", mode: "BroadcastMode" = 0 + self, + broadcast_tx_request: "BroadcastTxRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "BroadcastTxResponse": - - request = BroadcastTxRequest() - request.tx_bytes = tx_bytes - request.mode = mode - return await self._unary_unary( - "/cosmos.tx.v1beta1.Service/BroadcastTx", request, BroadcastTxResponse + "/cosmos.tx.v1beta1.Service/BroadcastTx", + broadcast_tx_request, + BroadcastTxResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def get_txs_event( self, + get_txs_event_request: "GetTxsEventRequest", *, - events: Optional[List[str]] = None, - pagination: "__base_query_v1_beta1__.PageRequest" = None, - order_by: "OrderBy" = 0 + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "GetTxsEventResponse": - events = events or [] - - request = GetTxsEventRequest() - request.events = events - if pagination is not None: - request.pagination = pagination - request.order_by = order_by - - return await self._unary_unary( - "/cosmos.tx.v1beta1.Service/GetTxsEvent", request, GetTxsEventResponse - ) - - async def get_block_with_txs( - self, - *, - height: int = 0, - pagination: "__base_query_v1_beta1__.PageRequest" = None - ) -> "GetBlockWithTxsResponse": - - request = GetBlockWithTxsRequest() - request.height = height - if pagination is not None: - request.pagination = pagination - return await self._unary_unary( - "/cosmos.tx.v1beta1.Service/GetBlockWithTxs", - request, - GetBlockWithTxsResponse, + "/cosmos.tx.v1beta1.Service/GetTxsEvent", + get_txs_event_request, + GetTxsEventResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class ServiceBase(ServiceBase): - async def simulate(self, tx: "Tx", tx_bytes: bytes) -> "SimulateResponse": + async def simulate(self, simulate_request: "SimulateRequest") -> "SimulateResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def get_tx(self, hash: str) -> "GetTxResponse": + async def get_tx(self, get_tx_request: "GetTxRequest") -> "GetTxResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def broadcast_tx( - self, tx_bytes: bytes, mode: "BroadcastMode" + self, broadcast_tx_request: "BroadcastTxRequest" ) -> "BroadcastTxResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def get_txs_event( - self, - events: Optional[List[str]], - pagination: "__base_query_v1_beta1__.PageRequest", - order_by: "OrderBy", + self, get_txs_event_request: "GetTxsEventRequest" ) -> "GetTxsEventResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def get_block_with_txs( - self, height: int, pagination: "__base_query_v1_beta1__.PageRequest" - ) -> "GetBlockWithTxsResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def __rpc_simulate(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "tx": request.tx, - "tx_bytes": request.tx_bytes, - } - - response = await self.simulate(**request_kwargs) - await stream.send_message(response) - - async def __rpc_get_tx(self, stream: grpclib.server.Stream) -> None: + async def __rpc_simulate( + self, stream: "grpclib.server.Stream[SimulateRequest, SimulateResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "hash": request.hash, - } - - response = await self.get_tx(**request_kwargs) + response = await self.simulate(request) await stream.send_message(response) - async def __rpc_broadcast_tx(self, stream: grpclib.server.Stream) -> None: + async def __rpc_get_tx( + self, stream: "grpclib.server.Stream[GetTxRequest, GetTxResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "tx_bytes": request.tx_bytes, - "mode": request.mode, - } - - response = await self.broadcast_tx(**request_kwargs) + response = await self.get_tx(request) await stream.send_message(response) - async def __rpc_get_txs_event(self, stream: grpclib.server.Stream) -> None: + async def __rpc_broadcast_tx( + self, stream: "grpclib.server.Stream[BroadcastTxRequest, BroadcastTxResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "events": request.events, - "pagination": request.pagination, - "order_by": request.order_by, - } - - response = await self.get_txs_event(**request_kwargs) + response = await self.broadcast_tx(request) await stream.send_message(response) - async def __rpc_get_block_with_txs(self, stream: grpclib.server.Stream) -> None: + async def __rpc_get_txs_event( + self, stream: "grpclib.server.Stream[GetTxsEventRequest, GetTxsEventResponse]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "height": request.height, - "pagination": request.pagination, - } - - response = await self.get_block_with_txs(**request_kwargs) + response = await self.get_txs_event(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -540,19 +578,4 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: GetTxsEventRequest, GetTxsEventResponse, ), - "/cosmos.tx.v1beta1.Service/GetBlockWithTxs": grpclib.const.Handler( - self.__rpc_get_block_with_txs, - grpclib.const.Cardinality.UNARY_UNARY, - GetBlockWithTxsRequest, - GetBlockWithTxsResponse, - ), } - - -from ....tendermint import types as ___tendermint_types__ -from ...base import v1beta1 as __base_v1_beta1__ -from ...base.abci import v1beta1 as __base_abci_v1_beta1__ -from ...base.query import v1beta1 as __base_query_v1_beta1__ -from ...crypto.multisig import v1beta1 as __crypto_multisig_v1_beta1__ -from ..signing import v1beta1 as _signing_v1_beta1__ -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf diff --git a/python/terra_proto/cosmos/upgrade/v1beta1/__init__.py b/python/terra_proto/cosmos/upgrade/v1beta1/__init__.py index 4f1d867..b2eef62 100644 --- a/python/terra_proto/cosmos/upgrade/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/upgrade/v1beta1/__init__.py @@ -4,11 +4,23 @@ import warnings from dataclasses import dataclass from datetime import datetime -from typing import Dict, List +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase +import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) @@ -18,36 +30,50 @@ class Plan(betterproto.Message): occur. """ - # Sets the name for the upgrade. This name will be used by the upgraded - # version of the software to apply any special "on-upgrade" commands during - # the first BeginBlock method after the upgrade is applied. It is also used - # to detect whether a software version can handle a given upgrade. If no - # upgrade handler with this name has been set in the software, it will be - # assumed that the software is out-of-date when the upgrade Time or Height is - # reached and the software will exit. name: str = betterproto.string_field(1) - # Deprecated: Time based upgrades have been deprecated. Time based upgrade - # logic has been removed from the SDK. If this field is not empty, an error - # will be thrown. + """ + Sets the name for the upgrade. This name will be used by the upgraded + version of the software to apply any special "on-upgrade" commands during + the first BeginBlock method after the upgrade is applied. It is also used + to detect whether a software version can handle a given upgrade. If no + upgrade handler with this name has been set in the software, it will be + assumed that the software is out-of-date when the upgrade Time or Height is + reached and the software will exit. + """ + time: datetime = betterproto.message_field(2) - # The height at which the upgrade must be performed. Only used if Time is not - # set. + """ + Deprecated: Time based upgrades have been deprecated. Time based upgrade + logic has been removed from the SDK. If this field is not empty, an error + will be thrown. + """ + height: int = betterproto.int64_field(3) - # Any application specific upgrade info to be included on-chain such as a git - # commit that validators could automatically upgrade to + """ + The height at which the upgrade must be performed. Only used if Time is not + set. + """ + info: str = betterproto.string_field(4) - # Deprecated: UpgradedClientState field has been deprecated. IBC upgrade - # logic has been moved to the IBC module in the sub module 02-client. If this - # field is not empty, an error will be thrown. + """ + Any application specific upgrade info to be included on-chain such as a git + commit that validators could automatically upgrade to + """ + upgraded_client_state: "betterproto_lib_google_protobuf.Any" = ( betterproto.message_field(5) ) + """ + Deprecated: UpgradedClientState field has been deprecated. IBC upgrade + logic has been moved to the IBC module in the sub module 02-client. If this + field is not empty, an error will be thrown. + """ def __post_init__(self) -> None: super().__post_init__() - if self.time: + if self.is_set("time"): warnings.warn("Plan.time is deprecated", DeprecationWarning) - if self.upgraded_client_state: + if self.is_set("upgraded_client_state"): warnings.warn( "Plan.upgraded_client_state is deprecated", DeprecationWarning ) @@ -83,10 +109,11 @@ class ModuleVersion(betterproto.Message): sdk 0.43 """ - # name of the app module name: str = betterproto.string_field(1) - # consensus version of the app module + """name of the app module""" + version: int = betterproto.uint64_field(2) + """consensus version of the app module""" @dataclass(eq=False, repr=False) @@ -106,8 +133,8 @@ class QueryCurrentPlanResponse(betterproto.Message): method. """ - # plan is the current upgrade plan. plan: "Plan" = betterproto.message_field(1) + """plan is the current upgrade plan.""" @dataclass(eq=False, repr=False) @@ -117,8 +144,8 @@ class QueryAppliedPlanRequest(betterproto.Message): method. """ - # name is the name of the applied plan to query for. name: str = betterproto.string_field(1) + """name is the name of the applied plan to query for.""" @dataclass(eq=False, repr=False) @@ -128,8 +155,8 @@ class QueryAppliedPlanResponse(betterproto.Message): method. """ - # height is the block height at which the plan was applied. height: int = betterproto.int64_field(1) + """height is the block height at which the plan was applied.""" @dataclass(eq=False, repr=False) @@ -139,9 +166,11 @@ class QueryUpgradedConsensusStateRequest(betterproto.Message): Query/UpgradedConsensusState RPC method. """ - # last height of the current chain must be sent in request as this is the - # height under which next consensus state is stored last_height: int = betterproto.int64_field(1) + """ + last height of the current chain must be sent in request as this is the + height under which next consensus state is stored + """ def __post_init__(self) -> None: warnings.warn( @@ -157,8 +186,8 @@ class QueryUpgradedConsensusStateResponse(betterproto.Message): Query/UpgradedConsensusState RPC method. """ - # Since: cosmos-sdk 0.43 upgraded_consensus_state: bytes = betterproto.bytes_field(2) + """Since: cosmos-sdk 0.43""" def __post_init__(self) -> None: warnings.warn( @@ -174,10 +203,12 @@ class QueryModuleVersionsRequest(betterproto.Message): RPC method. Since: cosmos-sdk 0.43 """ - # module_name is a field to query a specific module consensus version from - # state. Leaving this empty will fetch the full list of module versions from - # state module_name: str = betterproto.string_field(1) + """ + module_name is a field to query a specific module consensus version from + state. Leaving this empty will fetch the full list of module versions from + state + """ @dataclass(eq=False, repr=False) @@ -187,112 +218,134 @@ class QueryModuleVersionsResponse(betterproto.Message): Query/ModuleVersions RPC method. Since: cosmos-sdk 0.43 """ - # module_versions is a list of module names with their consensus versions. module_versions: List["ModuleVersion"] = betterproto.message_field(1) + """ + module_versions is a list of module names with their consensus versions. + """ class QueryStub(betterproto.ServiceStub): - async def current_plan(self) -> "QueryCurrentPlanResponse": - - request = QueryCurrentPlanRequest() - + async def current_plan( + self, + query_current_plan_request: "QueryCurrentPlanRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryCurrentPlanResponse": return await self._unary_unary( "/cosmos.upgrade.v1beta1.Query/CurrentPlan", - request, + query_current_plan_request, QueryCurrentPlanResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def applied_plan(self, *, name: str = "") -> "QueryAppliedPlanResponse": - - request = QueryAppliedPlanRequest() - request.name = name - + async def applied_plan( + self, + query_applied_plan_request: "QueryAppliedPlanRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryAppliedPlanResponse": return await self._unary_unary( "/cosmos.upgrade.v1beta1.Query/AppliedPlan", - request, + query_applied_plan_request, QueryAppliedPlanResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def upgraded_consensus_state( - self, *, last_height: int = 0 + self, + query_upgraded_consensus_state_request: "QueryUpgradedConsensusStateRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryUpgradedConsensusStateResponse": - - request = QueryUpgradedConsensusStateRequest() - request.last_height = last_height - return await self._unary_unary( "/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState", - request, + query_upgraded_consensus_state_request, QueryUpgradedConsensusStateResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def module_versions( - self, *, module_name: str = "" + self, + query_module_versions_request: "QueryModuleVersionsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "QueryModuleVersionsResponse": - - request = QueryModuleVersionsRequest() - request.module_name = module_name - return await self._unary_unary( "/cosmos.upgrade.v1beta1.Query/ModuleVersions", - request, + query_module_versions_request, QueryModuleVersionsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class QueryBase(ServiceBase): - async def current_plan(self) -> "QueryCurrentPlanResponse": + async def current_plan( + self, query_current_plan_request: "QueryCurrentPlanRequest" + ) -> "QueryCurrentPlanResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def applied_plan(self, name: str) -> "QueryAppliedPlanResponse": + async def applied_plan( + self, query_applied_plan_request: "QueryAppliedPlanRequest" + ) -> "QueryAppliedPlanResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def upgraded_consensus_state( - self, last_height: int + self, + query_upgraded_consensus_state_request: "QueryUpgradedConsensusStateRequest", ) -> "QueryUpgradedConsensusStateResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def module_versions(self, module_name: str) -> "QueryModuleVersionsResponse": + async def module_versions( + self, query_module_versions_request: "QueryModuleVersionsRequest" + ) -> "QueryModuleVersionsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_current_plan(self, stream: grpclib.server.Stream) -> None: + async def __rpc_current_plan( + self, + stream: "grpclib.server.Stream[QueryCurrentPlanRequest, QueryCurrentPlanResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.current_plan(**request_kwargs) + response = await self.current_plan(request) await stream.send_message(response) - async def __rpc_applied_plan(self, stream: grpclib.server.Stream) -> None: + async def __rpc_applied_plan( + self, + stream: "grpclib.server.Stream[QueryAppliedPlanRequest, QueryAppliedPlanResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "name": request.name, - } - - response = await self.applied_plan(**request_kwargs) + response = await self.applied_plan(request) await stream.send_message(response) async def __rpc_upgraded_consensus_state( - self, stream: grpclib.server.Stream + self, + stream: "grpclib.server.Stream[QueryUpgradedConsensusStateRequest, QueryUpgradedConsensusStateResponse]", ) -> None: request = await stream.recv_message() - - request_kwargs = { - "last_height": request.last_height, - } - - response = await self.upgraded_consensus_state(**request_kwargs) + response = await self.upgraded_consensus_state(request) await stream.send_message(response) - async def __rpc_module_versions(self, stream: grpclib.server.Stream) -> None: + async def __rpc_module_versions( + self, + stream: "grpclib.server.Stream[QueryModuleVersionsRequest, QueryModuleVersionsResponse]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "module_name": request.module_name, - } - - response = await self.module_versions(**request_kwargs) + response = await self.module_versions(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -322,6 +375,3 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: QueryModuleVersionsResponse, ), } - - -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf diff --git a/python/terra_proto/cosmos/vesting/v1beta1/__init__.py b/python/terra_proto/cosmos/vesting/v1beta1/__init__.py index a972bbb..837a4fa 100644 --- a/python/terra_proto/cosmos/vesting/v1beta1/__init__.py +++ b/python/terra_proto/cosmos/vesting/v1beta1/__init__.py @@ -2,11 +2,25 @@ # sources: cosmos/vesting/v1beta1/tx.proto, cosmos/vesting/v1beta1/vesting.proto # plugin: python-betterproto from dataclasses import dataclass -from typing import Dict, List, Optional +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ...auth import v1beta1 as __auth_v1_beta1__ +from ...base import v1beta1 as __base_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline @dataclass(eq=False, repr=False) @@ -101,176 +115,37 @@ class MsgCreateVestingAccountResponse(betterproto.Message): pass -@dataclass(eq=False, repr=False) -class MsgCreatePeriodicVestingAccount(betterproto.Message): - """ - MsgCreatePeriodicVestingAccount defines a message that enables creating a - vesting account. - """ - - from_address: str = betterproto.string_field(1) - to_address: str = betterproto.string_field(2) - start_time: int = betterproto.int64_field(3) - vesting_periods: List["Period"] = betterproto.message_field(4) - - -@dataclass(eq=False, repr=False) -class MsgCreatePeriodicVestingAccountResponse(betterproto.Message): - """ - MsgCreatePeriodicVestingAccountResponse defines the - Msg/CreatePeriodicVestingAccount response type. - """ - - pass - - -@dataclass(eq=False, repr=False) -class MsgDonateAllVestingTokens(betterproto.Message): - """ - MsgDonateAllVestingTokens defines a message that enables donating all - vesting token to community pool. - """ - - from_address: str = betterproto.string_field(1) - - -@dataclass(eq=False, repr=False) -class MsgDonateAllVestingTokensResponse(betterproto.Message): - """ - MsgDonateAllVestingTokensResponse defines the Msg/MsgDonateAllVestingTokens - response type. - """ - - pass - - class MsgStub(betterproto.ServiceStub): async def create_vesting_account( self, + msg_create_vesting_account: "MsgCreateVestingAccount", *, - from_address: str = "", - to_address: str = "", - amount: Optional[List["__base_v1_beta1__.Coin"]] = None, - end_time: int = 0, - delayed: bool = False + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "MsgCreateVestingAccountResponse": - amount = amount or [] - - request = MsgCreateVestingAccount() - request.from_address = from_address - request.to_address = to_address - if amount is not None: - request.amount = amount - request.end_time = end_time - request.delayed = delayed - return await self._unary_unary( "/cosmos.vesting.v1beta1.Msg/CreateVestingAccount", - request, + msg_create_vesting_account, MsgCreateVestingAccountResponse, - ) - - async def create_periodic_vesting_account( - self, - *, - from_address: str = "", - to_address: str = "", - start_time: int = 0, - vesting_periods: Optional[List["Period"]] = None - ) -> "MsgCreatePeriodicVestingAccountResponse": - vesting_periods = vesting_periods or [] - - request = MsgCreatePeriodicVestingAccount() - request.from_address = from_address - request.to_address = to_address - request.start_time = start_time - if vesting_periods is not None: - request.vesting_periods = vesting_periods - - return await self._unary_unary( - "/cosmos.vesting.v1beta1.Msg/CreatePeriodicVestingAccount", - request, - MsgCreatePeriodicVestingAccountResponse, - ) - - async def donate_all_vesting_tokens( - self, *, from_address: str = "" - ) -> "MsgDonateAllVestingTokensResponse": - - request = MsgDonateAllVestingTokens() - request.from_address = from_address - - return await self._unary_unary( - "/cosmos.vesting.v1beta1.Msg/DonateAllVestingTokens", - request, - MsgDonateAllVestingTokensResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class MsgBase(ServiceBase): async def create_vesting_account( - self, - from_address: str, - to_address: str, - amount: Optional[List["__base_v1_beta1__.Coin"]], - end_time: int, - delayed: bool, + self, msg_create_vesting_account: "MsgCreateVestingAccount" ) -> "MsgCreateVestingAccountResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def create_periodic_vesting_account( + async def __rpc_create_vesting_account( self, - from_address: str, - to_address: str, - start_time: int, - vesting_periods: Optional[List["Period"]], - ) -> "MsgCreatePeriodicVestingAccountResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def donate_all_vesting_tokens( - self, from_address: str - ) -> "MsgDonateAllVestingTokensResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def __rpc_create_vesting_account(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "from_address": request.from_address, - "to_address": request.to_address, - "amount": request.amount, - "end_time": request.end_time, - "delayed": request.delayed, - } - - response = await self.create_vesting_account(**request_kwargs) - await stream.send_message(response) - - async def __rpc_create_periodic_vesting_account( - self, stream: grpclib.server.Stream + stream: "grpclib.server.Stream[MsgCreateVestingAccount, MsgCreateVestingAccountResponse]", ) -> None: request = await stream.recv_message() - - request_kwargs = { - "from_address": request.from_address, - "to_address": request.to_address, - "start_time": request.start_time, - "vesting_periods": request.vesting_periods, - } - - response = await self.create_periodic_vesting_account(**request_kwargs) - await stream.send_message(response) - - async def __rpc_donate_all_vesting_tokens( - self, stream: grpclib.server.Stream - ) -> None: - request = await stream.recv_message() - - request_kwargs = { - "from_address": request.from_address, - } - - response = await self.donate_all_vesting_tokens(**request_kwargs) + response = await self.create_vesting_account(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -281,20 +156,4 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: MsgCreateVestingAccount, MsgCreateVestingAccountResponse, ), - "/cosmos.vesting.v1beta1.Msg/CreatePeriodicVestingAccount": grpclib.const.Handler( - self.__rpc_create_periodic_vesting_account, - grpclib.const.Cardinality.UNARY_UNARY, - MsgCreatePeriodicVestingAccount, - MsgCreatePeriodicVestingAccountResponse, - ), - "/cosmos.vesting.v1beta1.Msg/DonateAllVestingTokens": grpclib.const.Handler( - self.__rpc_donate_all_vesting_tokens, - grpclib.const.Cardinality.UNARY_UNARY, - MsgDonateAllVestingTokens, - MsgDonateAllVestingTokensResponse, - ), } - - -from ...auth import v1beta1 as __auth_v1_beta1__ -from ...base import v1beta1 as __base_v1_beta1__ diff --git a/python/terra_proto/cosmos_proto/__init__.py b/python/terra_proto/cosmos_proto/__init__.py index 6a6d513..bc87e08 100644 --- a/python/terra_proto/cosmos_proto/__init__.py +++ b/python/terra_proto/cosmos_proto/__init__.py @@ -4,4 +4,3 @@ from dataclasses import dataclass import betterproto -from betterproto.grpc.grpclib_server import ServiceBase diff --git a/python/terra_proto/cosmwasm/wasm/v1/__init__.py b/python/terra_proto/cosmwasm/wasm/v1/__init__.py deleted file mode 100644 index c6c9459..0000000 --- a/python/terra_proto/cosmwasm/wasm/v1/__init__.py +++ /dev/null @@ -1,1361 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# sources: cosmwasm/wasm/v1/genesis.proto, cosmwasm/wasm/v1/ibc.proto, cosmwasm/wasm/v1/proposal.proto, cosmwasm/wasm/v1/query.proto, cosmwasm/wasm/v1/tx.proto, cosmwasm/wasm/v1/types.proto -# plugin: python-betterproto -from dataclasses import dataclass -from typing import Dict, List, Optional - -import betterproto -from betterproto.grpc.grpclib_server import ServiceBase -import grpclib - - -class AccessType(betterproto.Enum): - """AccessType permission types""" - - # AccessTypeUnspecified placeholder for empty value - ACCESS_TYPE_UNSPECIFIED = 0 - # AccessTypeNobody forbidden - ACCESS_TYPE_NOBODY = 1 - # AccessTypeOnlyAddress restricted to an address - ACCESS_TYPE_ONLY_ADDRESS = 2 - # AccessTypeEverybody unrestricted - ACCESS_TYPE_EVERYBODY = 3 - - -class ContractCodeHistoryOperationType(betterproto.Enum): - """ContractCodeHistoryOperationType actions that caused a code change""" - - # ContractCodeHistoryOperationTypeUnspecified placeholder for empty value - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED = 0 - # ContractCodeHistoryOperationTypeInit on chain contract instantiation - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT = 1 - # ContractCodeHistoryOperationTypeMigrate code migration - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE = 2 - # ContractCodeHistoryOperationTypeGenesis based on genesis data - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS = 3 - - -@dataclass(eq=False, repr=False) -class AccessTypeParam(betterproto.Message): - """AccessTypeParam""" - - value: "AccessType" = betterproto.enum_field(1) - - -@dataclass(eq=False, repr=False) -class AccessConfig(betterproto.Message): - """AccessConfig access control type.""" - - permission: "AccessType" = betterproto.enum_field(1) - address: str = betterproto.string_field(2) - - -@dataclass(eq=False, repr=False) -class Params(betterproto.Message): - """Params defines the set of wasm parameters.""" - - code_upload_access: "AccessConfig" = betterproto.message_field(1) - instantiate_default_permission: "AccessType" = betterproto.enum_field(2) - - -@dataclass(eq=False, repr=False) -class CodeInfo(betterproto.Message): - """CodeInfo is data for the uploaded contract WASM code""" - - # CodeHash is the unique identifier created by wasmvm - code_hash: bytes = betterproto.bytes_field(1) - # Creator address who initially stored the code - creator: str = betterproto.string_field(2) - # InstantiateConfig access control to apply on contract creation, optional - instantiate_config: "AccessConfig" = betterproto.message_field(5) - - -@dataclass(eq=False, repr=False) -class ContractInfo(betterproto.Message): - """ContractInfo stores a WASM contract instance""" - - # CodeID is the reference to the stored Wasm code - code_id: int = betterproto.uint64_field(1) - # Creator address who initially instantiated the contract - creator: str = betterproto.string_field(2) - # Admin is an optional address that can execute migrations - admin: str = betterproto.string_field(3) - # Label is optional metadata to be stored with a contract instance. - label: str = betterproto.string_field(4) - # Created Tx position when the contract was instantiated. This data should - # kept internal and not be exposed via query results. Just use for sorting - created: "AbsoluteTxPosition" = betterproto.message_field(5) - ibc_port_id: str = betterproto.string_field(6) - # Extension is an extension point to store custom metadata within the - # persistence model. - extension: "betterproto_lib_google_protobuf.Any" = betterproto.message_field(7) - - -@dataclass(eq=False, repr=False) -class ContractCodeHistoryEntry(betterproto.Message): - """ContractCodeHistoryEntry metadata to a contract.""" - - operation: "ContractCodeHistoryOperationType" = betterproto.enum_field(1) - # CodeID is the reference to the stored WASM code - code_id: int = betterproto.uint64_field(2) - # Updated Tx position when the operation was executed. - updated: "AbsoluteTxPosition" = betterproto.message_field(3) - msg: bytes = betterproto.bytes_field(4) - - -@dataclass(eq=False, repr=False) -class AbsoluteTxPosition(betterproto.Message): - """ - AbsoluteTxPosition is a unique transaction position that allows for global - ordering of transactions. - """ - - # BlockHeight is the block the contract was created at - block_height: int = betterproto.uint64_field(1) - # TxIndex is a monotonic counter within the block (actual transaction index, - # or gas consumed) - tx_index: int = betterproto.uint64_field(2) - - -@dataclass(eq=False, repr=False) -class Model(betterproto.Message): - """Model is a struct that holds a KV pair""" - - # hex-encode key to read it better (this is often ascii) - key: bytes = betterproto.bytes_field(1) - # base64-encode raw value - value: bytes = betterproto.bytes_field(2) - - -@dataclass(eq=False, repr=False) -class MsgStoreCode(betterproto.Message): - """MsgStoreCode submit Wasm code to the system""" - - # Sender is the that actor that signed the messages - sender: str = betterproto.string_field(1) - # WASMByteCode can be raw or gzip compressed - wasm_byte_code: bytes = betterproto.bytes_field(2) - # InstantiatePermission access control to apply on contract creation, - # optional - instantiate_permission: "AccessConfig" = betterproto.message_field(5) - - -@dataclass(eq=False, repr=False) -class MsgStoreCodeResponse(betterproto.Message): - """MsgStoreCodeResponse returns store result data.""" - - # CodeID is the reference to the stored WASM code - code_id: int = betterproto.uint64_field(1) - - -@dataclass(eq=False, repr=False) -class MsgInstantiateContract(betterproto.Message): - """ - MsgInstantiateContract create a new smart contract instance for the given - code id. - """ - - # Sender is the that actor that signed the messages - sender: str = betterproto.string_field(1) - # Admin is an optional address that can execute migrations - admin: str = betterproto.string_field(2) - # CodeID is the reference to the stored WASM code - code_id: int = betterproto.uint64_field(3) - # Label is optional metadata to be stored with a contract instance. - label: str = betterproto.string_field(4) - # Msg json encoded message to be passed to the contract on instantiation - msg: bytes = betterproto.bytes_field(5) - # Funds coins that are transferred to the contract on instantiation - funds: List["___cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(6) - - -@dataclass(eq=False, repr=False) -class MsgInstantiateContractResponse(betterproto.Message): - """MsgInstantiateContractResponse return instantiation result data""" - - # Address is the bech32 address of the new contract instance. - address: str = betterproto.string_field(1) - # Data contains base64-encoded bytes to returned from the contract - data: bytes = betterproto.bytes_field(2) - - -@dataclass(eq=False, repr=False) -class MsgExecuteContract(betterproto.Message): - """ - MsgExecuteContract submits the given message data to a smart contract - """ - - # Sender is the that actor that signed the messages - sender: str = betterproto.string_field(1) - # Contract is the address of the smart contract - contract: str = betterproto.string_field(2) - # Msg json encoded message to be passed to the contract - msg: bytes = betterproto.bytes_field(3) - # Funds coins that are transferred to the contract on execution - funds: List["___cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(5) - - -@dataclass(eq=False, repr=False) -class MsgExecuteContractResponse(betterproto.Message): - """MsgExecuteContractResponse returns execution result data.""" - - # Data contains base64-encoded bytes to returned from the contract - data: bytes = betterproto.bytes_field(1) - - -@dataclass(eq=False, repr=False) -class MsgMigrateContract(betterproto.Message): - """ - MsgMigrateContract runs a code upgrade/ downgrade for a smart contract - """ - - # Sender is the that actor that signed the messages - sender: str = betterproto.string_field(1) - # Contract is the address of the smart contract - contract: str = betterproto.string_field(2) - # CodeID references the new WASM code - code_id: int = betterproto.uint64_field(3) - # Msg json encoded message to be passed to the contract on migration - msg: bytes = betterproto.bytes_field(4) - - -@dataclass(eq=False, repr=False) -class MsgMigrateContractResponse(betterproto.Message): - """MsgMigrateContractResponse returns contract migration result data.""" - - # Data contains same raw bytes returned as data from the wasm contract. (May - # be empty) - data: bytes = betterproto.bytes_field(1) - - -@dataclass(eq=False, repr=False) -class MsgUpdateAdmin(betterproto.Message): - """MsgUpdateAdmin sets a new admin for a smart contract""" - - # Sender is the that actor that signed the messages - sender: str = betterproto.string_field(1) - # NewAdmin address to be set - new_admin: str = betterproto.string_field(2) - # Contract is the address of the smart contract - contract: str = betterproto.string_field(3) - - -@dataclass(eq=False, repr=False) -class MsgUpdateAdminResponse(betterproto.Message): - """MsgUpdateAdminResponse returns empty data""" - - pass - - -@dataclass(eq=False, repr=False) -class MsgClearAdmin(betterproto.Message): - """MsgClearAdmin removes any admin stored for a smart contract""" - - # Sender is the that actor that signed the messages - sender: str = betterproto.string_field(1) - # Contract is the address of the smart contract - contract: str = betterproto.string_field(3) - - -@dataclass(eq=False, repr=False) -class MsgClearAdminResponse(betterproto.Message): - """MsgClearAdminResponse returns empty data""" - - pass - - -@dataclass(eq=False, repr=False) -class QueryContractInfoRequest(betterproto.Message): - """ - QueryContractInfoRequest is the request type for the Query/ContractInfo RPC - method - """ - - # address is the address of the contract to query - address: str = betterproto.string_field(1) - - -@dataclass(eq=False, repr=False) -class QueryContractInfoResponse(betterproto.Message): - """ - QueryContractInfoResponse is the response type for the Query/ContractInfo - RPC method - """ - - # address is the address of the contract - address: str = betterproto.string_field(1) - contract_info: "ContractInfo" = betterproto.message_field(2) - - -@dataclass(eq=False, repr=False) -class QueryContractHistoryRequest(betterproto.Message): - """ - QueryContractHistoryRequest is the request type for the - Query/ContractHistory RPC method - """ - - # address is the address of the contract to query - address: str = betterproto.string_field(1) - # pagination defines an optional pagination for the request. - pagination: "___cosmos_base_query_v1_beta1__.PageRequest" = ( - betterproto.message_field(2) - ) - - -@dataclass(eq=False, repr=False) -class QueryContractHistoryResponse(betterproto.Message): - """ - QueryContractHistoryResponse is the response type for the - Query/ContractHistory RPC method - """ - - entries: List["ContractCodeHistoryEntry"] = betterproto.message_field(1) - # pagination defines the pagination in the response. - pagination: "___cosmos_base_query_v1_beta1__.PageResponse" = ( - betterproto.message_field(2) - ) - - -@dataclass(eq=False, repr=False) -class QueryContractsByCodeRequest(betterproto.Message): - """ - QueryContractsByCodeRequest is the request type for the - Query/ContractsByCode RPC method - """ - - code_id: int = betterproto.uint64_field(1) - # pagination defines an optional pagination for the request. - pagination: "___cosmos_base_query_v1_beta1__.PageRequest" = ( - betterproto.message_field(2) - ) - - -@dataclass(eq=False, repr=False) -class QueryContractsByCodeResponse(betterproto.Message): - """ - QueryContractsByCodeResponse is the response type for the - Query/ContractsByCode RPC method - """ - - # contracts are a set of contract addresses - contracts: List[str] = betterproto.string_field(1) - # pagination defines the pagination in the response. - pagination: "___cosmos_base_query_v1_beta1__.PageResponse" = ( - betterproto.message_field(2) - ) - - -@dataclass(eq=False, repr=False) -class QueryAllContractStateRequest(betterproto.Message): - """ - QueryAllContractStateRequest is the request type for the - Query/AllContractState RPC method - """ - - # address is the address of the contract - address: str = betterproto.string_field(1) - # pagination defines an optional pagination for the request. - pagination: "___cosmos_base_query_v1_beta1__.PageRequest" = ( - betterproto.message_field(2) - ) - - -@dataclass(eq=False, repr=False) -class QueryAllContractStateResponse(betterproto.Message): - """ - QueryAllContractStateResponse is the response type for the - Query/AllContractState RPC method - """ - - models: List["Model"] = betterproto.message_field(1) - # pagination defines the pagination in the response. - pagination: "___cosmos_base_query_v1_beta1__.PageResponse" = ( - betterproto.message_field(2) - ) - - -@dataclass(eq=False, repr=False) -class QueryRawContractStateRequest(betterproto.Message): - """ - QueryRawContractStateRequest is the request type for the - Query/RawContractState RPC method - """ - - # address is the address of the contract - address: str = betterproto.string_field(1) - query_data: bytes = betterproto.bytes_field(2) - - -@dataclass(eq=False, repr=False) -class QueryRawContractStateResponse(betterproto.Message): - """ - QueryRawContractStateResponse is the response type for the - Query/RawContractState RPC method - """ - - # Data contains the raw store data - data: bytes = betterproto.bytes_field(1) - - -@dataclass(eq=False, repr=False) -class QuerySmartContractStateRequest(betterproto.Message): - """ - QuerySmartContractStateRequest is the request type for the - Query/SmartContractState RPC method - """ - - # address is the address of the contract - address: str = betterproto.string_field(1) - # QueryData contains the query data passed to the contract - query_data: bytes = betterproto.bytes_field(2) - - -@dataclass(eq=False, repr=False) -class QuerySmartContractStateResponse(betterproto.Message): - """ - QuerySmartContractStateResponse is the response type for the - Query/SmartContractState RPC method - """ - - # Data contains the json data returned from the smart contract - data: bytes = betterproto.bytes_field(1) - - -@dataclass(eq=False, repr=False) -class QueryCodeRequest(betterproto.Message): - """QueryCodeRequest is the request type for the Query/Code RPC method""" - - code_id: int = betterproto.uint64_field(1) - - -@dataclass(eq=False, repr=False) -class CodeInfoResponse(betterproto.Message): - """CodeInfoResponse contains code meta data from CodeInfo""" - - code_id: int = betterproto.uint64_field(1) - creator: str = betterproto.string_field(2) - data_hash: bytes = betterproto.bytes_field(3) - instantiate_permission: "AccessConfig" = betterproto.message_field(6) - - -@dataclass(eq=False, repr=False) -class QueryCodeResponse(betterproto.Message): - """QueryCodeResponse is the response type for the Query/Code RPC method""" - - code_info: "CodeInfoResponse" = betterproto.message_field(1) - data: bytes = betterproto.bytes_field(2) - - -@dataclass(eq=False, repr=False) -class QueryCodesRequest(betterproto.Message): - """QueryCodesRequest is the request type for the Query/Codes RPC method""" - - # pagination defines an optional pagination for the request. - pagination: "___cosmos_base_query_v1_beta1__.PageRequest" = ( - betterproto.message_field(1) - ) - - -@dataclass(eq=False, repr=False) -class QueryCodesResponse(betterproto.Message): - """ - QueryCodesResponse is the response type for the Query/Codes RPC method - """ - - code_infos: List["CodeInfoResponse"] = betterproto.message_field(1) - # pagination defines the pagination in the response. - pagination: "___cosmos_base_query_v1_beta1__.PageResponse" = ( - betterproto.message_field(2) - ) - - -@dataclass(eq=False, repr=False) -class QueryPinnedCodesRequest(betterproto.Message): - """ - QueryPinnedCodesRequest is the request type for the Query/PinnedCodes RPC - method - """ - - # pagination defines an optional pagination for the request. - pagination: "___cosmos_base_query_v1_beta1__.PageRequest" = ( - betterproto.message_field(2) - ) - - -@dataclass(eq=False, repr=False) -class QueryPinnedCodesResponse(betterproto.Message): - """ - QueryPinnedCodesResponse is the response type for the Query/PinnedCodes RPC - method - """ - - code_ids: List[int] = betterproto.uint64_field(1) - # pagination defines the pagination in the response. - pagination: "___cosmos_base_query_v1_beta1__.PageResponse" = ( - betterproto.message_field(2) - ) - - -@dataclass(eq=False, repr=False) -class GenesisState(betterproto.Message): - """GenesisState - genesis state of x/wasm""" - - params: "Params" = betterproto.message_field(1) - codes: List["Code"] = betterproto.message_field(2) - contracts: List["Contract"] = betterproto.message_field(3) - sequences: List["Sequence"] = betterproto.message_field(4) - gen_msgs: List["GenesisStateGenMsgs"] = betterproto.message_field(5) - - -@dataclass(eq=False, repr=False) -class GenesisStateGenMsgs(betterproto.Message): - """ - GenMsgs define the messages that can be executed during genesis phase in - order. The intention is to have more human readable data that is auditable. - """ - - store_code: "MsgStoreCode" = betterproto.message_field(1, group="sum") - instantiate_contract: "MsgInstantiateContract" = betterproto.message_field( - 2, group="sum" - ) - execute_contract: "MsgExecuteContract" = betterproto.message_field(3, group="sum") - - -@dataclass(eq=False, repr=False) -class Code(betterproto.Message): - """Code struct encompasses CodeInfo and CodeBytes""" - - code_id: int = betterproto.uint64_field(1) - code_info: "CodeInfo" = betterproto.message_field(2) - code_bytes: bytes = betterproto.bytes_field(3) - # Pinned to wasmvm cache - pinned: bool = betterproto.bool_field(4) - - -@dataclass(eq=False, repr=False) -class Contract(betterproto.Message): - """ - Contract struct encompasses ContractAddress, ContractInfo, and - ContractState - """ - - contract_address: str = betterproto.string_field(1) - contract_info: "ContractInfo" = betterproto.message_field(2) - contract_state: List["Model"] = betterproto.message_field(3) - - -@dataclass(eq=False, repr=False) -class Sequence(betterproto.Message): - """Sequence key and value of an id generation counter""" - - id_key: bytes = betterproto.bytes_field(1) - value: int = betterproto.uint64_field(2) - - -@dataclass(eq=False, repr=False) -class StoreCodeProposal(betterproto.Message): - """ - StoreCodeProposal gov proposal content type to submit WASM code to the - system - """ - - # Title is a short summary - title: str = betterproto.string_field(1) - # Description is a human readable text - description: str = betterproto.string_field(2) - # RunAs is the address that is passed to the contract's environment as sender - run_as: str = betterproto.string_field(3) - # WASMByteCode can be raw or gzip compressed - wasm_byte_code: bytes = betterproto.bytes_field(4) - # InstantiatePermission to apply on contract creation, optional - instantiate_permission: "AccessConfig" = betterproto.message_field(7) - - -@dataclass(eq=False, repr=False) -class InstantiateContractProposal(betterproto.Message): - """ - InstantiateContractProposal gov proposal content type to instantiate a - contract. - """ - - # Title is a short summary - title: str = betterproto.string_field(1) - # Description is a human readable text - description: str = betterproto.string_field(2) - # RunAs is the address that is passed to the contract's environment as sender - run_as: str = betterproto.string_field(3) - # Admin is an optional address that can execute migrations - admin: str = betterproto.string_field(4) - # CodeID is the reference to the stored WASM code - code_id: int = betterproto.uint64_field(5) - # Label is optional metadata to be stored with a constract instance. - label: str = betterproto.string_field(6) - # Msg json encoded message to be passed to the contract on instantiation - msg: bytes = betterproto.bytes_field(7) - # Funds coins that are transferred to the contract on instantiation - funds: List["___cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(8) - - -@dataclass(eq=False, repr=False) -class MigrateContractProposal(betterproto.Message): - """ - MigrateContractProposal gov proposal content type to migrate a contract. - """ - - # Title is a short summary - title: str = betterproto.string_field(1) - # Description is a human readable text - description: str = betterproto.string_field(2) - # Contract is the address of the smart contract - contract: str = betterproto.string_field(4) - # CodeID references the new WASM code - code_id: int = betterproto.uint64_field(5) - # Msg json encoded message to be passed to the contract on migration - msg: bytes = betterproto.bytes_field(6) - - -@dataclass(eq=False, repr=False) -class SudoContractProposal(betterproto.Message): - """ - SudoContractProposal gov proposal content type to call sudo on a contract. - """ - - # Title is a short summary - title: str = betterproto.string_field(1) - # Description is a human readable text - description: str = betterproto.string_field(2) - # Contract is the address of the smart contract - contract: str = betterproto.string_field(3) - # Msg json encoded message to be passed to the contract as sudo - msg: bytes = betterproto.bytes_field(4) - - -@dataclass(eq=False, repr=False) -class ExecuteContractProposal(betterproto.Message): - """ - ExecuteContractProposal gov proposal content type to call execute on a - contract. - """ - - # Title is a short summary - title: str = betterproto.string_field(1) - # Description is a human readable text - description: str = betterproto.string_field(2) - # RunAs is the address that is passed to the contract's environment as sender - run_as: str = betterproto.string_field(3) - # Contract is the address of the smart contract - contract: str = betterproto.string_field(4) - # Msg json encoded message to be passed to the contract as execute - msg: bytes = betterproto.bytes_field(5) - # Funds coins that are transferred to the contract on instantiation - funds: List["___cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(6) - - -@dataclass(eq=False, repr=False) -class UpdateAdminProposal(betterproto.Message): - """ - UpdateAdminProposal gov proposal content type to set an admin for a - contract. - """ - - # Title is a short summary - title: str = betterproto.string_field(1) - # Description is a human readable text - description: str = betterproto.string_field(2) - # NewAdmin address to be set - new_admin: str = betterproto.string_field(3) - # Contract is the address of the smart contract - contract: str = betterproto.string_field(4) - - -@dataclass(eq=False, repr=False) -class ClearAdminProposal(betterproto.Message): - """ - ClearAdminProposal gov proposal content type to clear the admin of a - contract. - """ - - # Title is a short summary - title: str = betterproto.string_field(1) - # Description is a human readable text - description: str = betterproto.string_field(2) - # Contract is the address of the smart contract - contract: str = betterproto.string_field(3) - - -@dataclass(eq=False, repr=False) -class PinCodesProposal(betterproto.Message): - """ - PinCodesProposal gov proposal content type to pin a set of code ids in the - wasmvm cache. - """ - - # Title is a short summary - title: str = betterproto.string_field(1) - # Description is a human readable text - description: str = betterproto.string_field(2) - # CodeIDs references the new WASM codes - code_ids: List[int] = betterproto.uint64_field(3) - - -@dataclass(eq=False, repr=False) -class UnpinCodesProposal(betterproto.Message): - """ - UnpinCodesProposal gov proposal content type to unpin a set of code ids in - the wasmvm cache. - """ - - # Title is a short summary - title: str = betterproto.string_field(1) - # Description is a human readable text - description: str = betterproto.string_field(2) - # CodeIDs references the WASM codes - code_ids: List[int] = betterproto.uint64_field(3) - - -@dataclass(eq=False, repr=False) -class AccessConfigUpdate(betterproto.Message): - """ - AccessConfigUpdate contains the code id and the access config to be - applied. - """ - - # CodeID is the reference to the stored WASM code to be updated - code_id: int = betterproto.uint64_field(1) - # InstantiatePermission to apply to the set of code ids - instantiate_permission: "AccessConfig" = betterproto.message_field(2) - - -@dataclass(eq=False, repr=False) -class UpdateInstantiateConfigProposal(betterproto.Message): - """ - UpdateInstantiateConfigProposal gov proposal content type to update - instantiate config to a set of code ids. - """ - - # Title is a short summary - title: str = betterproto.string_field(1) - # Description is a human readable text - description: str = betterproto.string_field(2) - # AccessConfigUpdate contains the list of code ids and the access config to - # be applied. - access_config_updates: List["AccessConfigUpdate"] = betterproto.message_field(3) - - -@dataclass(eq=False, repr=False) -class MsgIbcSend(betterproto.Message): - """MsgIBCSend""" - - # the channel by which the packet will be sent - channel: str = betterproto.string_field(2) - # Timeout height relative to the current block height. The timeout is - # disabled when set to 0. - timeout_height: int = betterproto.uint64_field(4) - # Timeout timestamp (in nanoseconds) relative to the current block timestamp. - # The timeout is disabled when set to 0. - timeout_timestamp: int = betterproto.uint64_field(5) - # Data is the payload to transfer. We must not make assumption what format or - # content is in here. - data: bytes = betterproto.bytes_field(6) - - -@dataclass(eq=False, repr=False) -class MsgIbcCloseChannel(betterproto.Message): - """MsgIBCCloseChannel port and channel need to be owned by the contract""" - - channel: str = betterproto.string_field(2) - - -class MsgStub(betterproto.ServiceStub): - async def store_code( - self, - *, - sender: str = "", - wasm_byte_code: bytes = b"", - instantiate_permission: "AccessConfig" = None - ) -> "MsgStoreCodeResponse": - - request = MsgStoreCode() - request.sender = sender - request.wasm_byte_code = wasm_byte_code - if instantiate_permission is not None: - request.instantiate_permission = instantiate_permission - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Msg/StoreCode", request, MsgStoreCodeResponse - ) - - async def instantiate_contract( - self, - *, - sender: str = "", - admin: str = "", - code_id: int = 0, - label: str = "", - msg: bytes = b"", - funds: Optional[List["___cosmos_base_v1_beta1__.Coin"]] = None - ) -> "MsgInstantiateContractResponse": - funds = funds or [] - - request = MsgInstantiateContract() - request.sender = sender - request.admin = admin - request.code_id = code_id - request.label = label - request.msg = msg - if funds is not None: - request.funds = funds - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Msg/InstantiateContract", - request, - MsgInstantiateContractResponse, - ) - - async def execute_contract( - self, - *, - sender: str = "", - contract: str = "", - msg: bytes = b"", - funds: Optional[List["___cosmos_base_v1_beta1__.Coin"]] = None - ) -> "MsgExecuteContractResponse": - funds = funds or [] - - request = MsgExecuteContract() - request.sender = sender - request.contract = contract - request.msg = msg - if funds is not None: - request.funds = funds - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Msg/ExecuteContract", request, MsgExecuteContractResponse - ) - - async def migrate_contract( - self, - *, - sender: str = "", - contract: str = "", - code_id: int = 0, - msg: bytes = b"" - ) -> "MsgMigrateContractResponse": - - request = MsgMigrateContract() - request.sender = sender - request.contract = contract - request.code_id = code_id - request.msg = msg - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Msg/MigrateContract", request, MsgMigrateContractResponse - ) - - async def update_admin( - self, *, sender: str = "", new_admin: str = "", contract: str = "" - ) -> "MsgUpdateAdminResponse": - - request = MsgUpdateAdmin() - request.sender = sender - request.new_admin = new_admin - request.contract = contract - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Msg/UpdateAdmin", request, MsgUpdateAdminResponse - ) - - async def clear_admin( - self, *, sender: str = "", contract: str = "" - ) -> "MsgClearAdminResponse": - - request = MsgClearAdmin() - request.sender = sender - request.contract = contract - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Msg/ClearAdmin", request, MsgClearAdminResponse - ) - - -class QueryStub(betterproto.ServiceStub): - async def contract_info(self, *, address: str = "") -> "QueryContractInfoResponse": - - request = QueryContractInfoRequest() - request.address = address - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Query/ContractInfo", request, QueryContractInfoResponse - ) - - async def contract_history( - self, - *, - address: str = "", - pagination: "___cosmos_base_query_v1_beta1__.PageRequest" = None - ) -> "QueryContractHistoryResponse": - - request = QueryContractHistoryRequest() - request.address = address - if pagination is not None: - request.pagination = pagination - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Query/ContractHistory", - request, - QueryContractHistoryResponse, - ) - - async def contracts_by_code( - self, - *, - code_id: int = 0, - pagination: "___cosmos_base_query_v1_beta1__.PageRequest" = None - ) -> "QueryContractsByCodeResponse": - - request = QueryContractsByCodeRequest() - request.code_id = code_id - if pagination is not None: - request.pagination = pagination - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Query/ContractsByCode", - request, - QueryContractsByCodeResponse, - ) - - async def all_contract_state( - self, - *, - address: str = "", - pagination: "___cosmos_base_query_v1_beta1__.PageRequest" = None - ) -> "QueryAllContractStateResponse": - - request = QueryAllContractStateRequest() - request.address = address - if pagination is not None: - request.pagination = pagination - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Query/AllContractState", - request, - QueryAllContractStateResponse, - ) - - async def raw_contract_state( - self, *, address: str = "", query_data: bytes = b"" - ) -> "QueryRawContractStateResponse": - - request = QueryRawContractStateRequest() - request.address = address - request.query_data = query_data - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Query/RawContractState", - request, - QueryRawContractStateResponse, - ) - - async def smart_contract_state( - self, *, address: str = "", query_data: bytes = b"" - ) -> "QuerySmartContractStateResponse": - - request = QuerySmartContractStateRequest() - request.address = address - request.query_data = query_data - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Query/SmartContractState", - request, - QuerySmartContractStateResponse, - ) - - async def code(self, *, code_id: int = 0) -> "QueryCodeResponse": - - request = QueryCodeRequest() - request.code_id = code_id - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Query/Code", request, QueryCodeResponse - ) - - async def codes( - self, *, pagination: "___cosmos_base_query_v1_beta1__.PageRequest" = None - ) -> "QueryCodesResponse": - - request = QueryCodesRequest() - if pagination is not None: - request.pagination = pagination - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Query/Codes", request, QueryCodesResponse - ) - - async def pinned_codes( - self, *, pagination: "___cosmos_base_query_v1_beta1__.PageRequest" = None - ) -> "QueryPinnedCodesResponse": - - request = QueryPinnedCodesRequest() - if pagination is not None: - request.pagination = pagination - - return await self._unary_unary( - "/cosmwasm.wasm.v1.Query/PinnedCodes", request, QueryPinnedCodesResponse - ) - - -class MsgBase(ServiceBase): - async def store_code( - self, sender: str, wasm_byte_code: bytes, instantiate_permission: "AccessConfig" - ) -> "MsgStoreCodeResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def instantiate_contract( - self, - sender: str, - admin: str, - code_id: int, - label: str, - msg: bytes, - funds: Optional[List["___cosmos_base_v1_beta1__.Coin"]], - ) -> "MsgInstantiateContractResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def execute_contract( - self, - sender: str, - contract: str, - msg: bytes, - funds: Optional[List["___cosmos_base_v1_beta1__.Coin"]], - ) -> "MsgExecuteContractResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def migrate_contract( - self, sender: str, contract: str, code_id: int, msg: bytes - ) -> "MsgMigrateContractResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def update_admin( - self, sender: str, new_admin: str, contract: str - ) -> "MsgUpdateAdminResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def clear_admin(self, sender: str, contract: str) -> "MsgClearAdminResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def __rpc_store_code(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "sender": request.sender, - "wasm_byte_code": request.wasm_byte_code, - "instantiate_permission": request.instantiate_permission, - } - - response = await self.store_code(**request_kwargs) - await stream.send_message(response) - - async def __rpc_instantiate_contract(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "sender": request.sender, - "admin": request.admin, - "code_id": request.code_id, - "label": request.label, - "msg": request.msg, - "funds": request.funds, - } - - response = await self.instantiate_contract(**request_kwargs) - await stream.send_message(response) - - async def __rpc_execute_contract(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "sender": request.sender, - "contract": request.contract, - "msg": request.msg, - "funds": request.funds, - } - - response = await self.execute_contract(**request_kwargs) - await stream.send_message(response) - - async def __rpc_migrate_contract(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "sender": request.sender, - "contract": request.contract, - "code_id": request.code_id, - "msg": request.msg, - } - - response = await self.migrate_contract(**request_kwargs) - await stream.send_message(response) - - async def __rpc_update_admin(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "sender": request.sender, - "new_admin": request.new_admin, - "contract": request.contract, - } - - response = await self.update_admin(**request_kwargs) - await stream.send_message(response) - - async def __rpc_clear_admin(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "sender": request.sender, - "contract": request.contract, - } - - response = await self.clear_admin(**request_kwargs) - await stream.send_message(response) - - def __mapping__(self) -> Dict[str, grpclib.const.Handler]: - return { - "/cosmwasm.wasm.v1.Msg/StoreCode": grpclib.const.Handler( - self.__rpc_store_code, - grpclib.const.Cardinality.UNARY_UNARY, - MsgStoreCode, - MsgStoreCodeResponse, - ), - "/cosmwasm.wasm.v1.Msg/InstantiateContract": grpclib.const.Handler( - self.__rpc_instantiate_contract, - grpclib.const.Cardinality.UNARY_UNARY, - MsgInstantiateContract, - MsgInstantiateContractResponse, - ), - "/cosmwasm.wasm.v1.Msg/ExecuteContract": grpclib.const.Handler( - self.__rpc_execute_contract, - grpclib.const.Cardinality.UNARY_UNARY, - MsgExecuteContract, - MsgExecuteContractResponse, - ), - "/cosmwasm.wasm.v1.Msg/MigrateContract": grpclib.const.Handler( - self.__rpc_migrate_contract, - grpclib.const.Cardinality.UNARY_UNARY, - MsgMigrateContract, - MsgMigrateContractResponse, - ), - "/cosmwasm.wasm.v1.Msg/UpdateAdmin": grpclib.const.Handler( - self.__rpc_update_admin, - grpclib.const.Cardinality.UNARY_UNARY, - MsgUpdateAdmin, - MsgUpdateAdminResponse, - ), - "/cosmwasm.wasm.v1.Msg/ClearAdmin": grpclib.const.Handler( - self.__rpc_clear_admin, - grpclib.const.Cardinality.UNARY_UNARY, - MsgClearAdmin, - MsgClearAdminResponse, - ), - } - - -class QueryBase(ServiceBase): - async def contract_info(self, address: str) -> "QueryContractInfoResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def contract_history( - self, address: str, pagination: "___cosmos_base_query_v1_beta1__.PageRequest" - ) -> "QueryContractHistoryResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def contracts_by_code( - self, code_id: int, pagination: "___cosmos_base_query_v1_beta1__.PageRequest" - ) -> "QueryContractsByCodeResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def all_contract_state( - self, address: str, pagination: "___cosmos_base_query_v1_beta1__.PageRequest" - ) -> "QueryAllContractStateResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def raw_contract_state( - self, address: str, query_data: bytes - ) -> "QueryRawContractStateResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def smart_contract_state( - self, address: str, query_data: bytes - ) -> "QuerySmartContractStateResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def code(self, code_id: int) -> "QueryCodeResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def codes( - self, pagination: "___cosmos_base_query_v1_beta1__.PageRequest" - ) -> "QueryCodesResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def pinned_codes( - self, pagination: "___cosmos_base_query_v1_beta1__.PageRequest" - ) -> "QueryPinnedCodesResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def __rpc_contract_info(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "address": request.address, - } - - response = await self.contract_info(**request_kwargs) - await stream.send_message(response) - - async def __rpc_contract_history(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "address": request.address, - "pagination": request.pagination, - } - - response = await self.contract_history(**request_kwargs) - await stream.send_message(response) - - async def __rpc_contracts_by_code(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "code_id": request.code_id, - "pagination": request.pagination, - } - - response = await self.contracts_by_code(**request_kwargs) - await stream.send_message(response) - - async def __rpc_all_contract_state(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "address": request.address, - "pagination": request.pagination, - } - - response = await self.all_contract_state(**request_kwargs) - await stream.send_message(response) - - async def __rpc_raw_contract_state(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "address": request.address, - "query_data": request.query_data, - } - - response = await self.raw_contract_state(**request_kwargs) - await stream.send_message(response) - - async def __rpc_smart_contract_state(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "address": request.address, - "query_data": request.query_data, - } - - response = await self.smart_contract_state(**request_kwargs) - await stream.send_message(response) - - async def __rpc_code(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "code_id": request.code_id, - } - - response = await self.code(**request_kwargs) - await stream.send_message(response) - - async def __rpc_codes(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "pagination": request.pagination, - } - - response = await self.codes(**request_kwargs) - await stream.send_message(response) - - async def __rpc_pinned_codes(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "pagination": request.pagination, - } - - response = await self.pinned_codes(**request_kwargs) - await stream.send_message(response) - - def __mapping__(self) -> Dict[str, grpclib.const.Handler]: - return { - "/cosmwasm.wasm.v1.Query/ContractInfo": grpclib.const.Handler( - self.__rpc_contract_info, - grpclib.const.Cardinality.UNARY_UNARY, - QueryContractInfoRequest, - QueryContractInfoResponse, - ), - "/cosmwasm.wasm.v1.Query/ContractHistory": grpclib.const.Handler( - self.__rpc_contract_history, - grpclib.const.Cardinality.UNARY_UNARY, - QueryContractHistoryRequest, - QueryContractHistoryResponse, - ), - "/cosmwasm.wasm.v1.Query/ContractsByCode": grpclib.const.Handler( - self.__rpc_contracts_by_code, - grpclib.const.Cardinality.UNARY_UNARY, - QueryContractsByCodeRequest, - QueryContractsByCodeResponse, - ), - "/cosmwasm.wasm.v1.Query/AllContractState": grpclib.const.Handler( - self.__rpc_all_contract_state, - grpclib.const.Cardinality.UNARY_UNARY, - QueryAllContractStateRequest, - QueryAllContractStateResponse, - ), - "/cosmwasm.wasm.v1.Query/RawContractState": grpclib.const.Handler( - self.__rpc_raw_contract_state, - grpclib.const.Cardinality.UNARY_UNARY, - QueryRawContractStateRequest, - QueryRawContractStateResponse, - ), - "/cosmwasm.wasm.v1.Query/SmartContractState": grpclib.const.Handler( - self.__rpc_smart_contract_state, - grpclib.const.Cardinality.UNARY_UNARY, - QuerySmartContractStateRequest, - QuerySmartContractStateResponse, - ), - "/cosmwasm.wasm.v1.Query/Code": grpclib.const.Handler( - self.__rpc_code, - grpclib.const.Cardinality.UNARY_UNARY, - QueryCodeRequest, - QueryCodeResponse, - ), - "/cosmwasm.wasm.v1.Query/Codes": grpclib.const.Handler( - self.__rpc_codes, - grpclib.const.Cardinality.UNARY_UNARY, - QueryCodesRequest, - QueryCodesResponse, - ), - "/cosmwasm.wasm.v1.Query/PinnedCodes": grpclib.const.Handler( - self.__rpc_pinned_codes, - grpclib.const.Cardinality.UNARY_UNARY, - QueryPinnedCodesRequest, - QueryPinnedCodesResponse, - ), - } - - -from ....cosmos.base import v1beta1 as ___cosmos_base_v1_beta1__ -from ....cosmos.base.query import v1beta1 as ___cosmos_base_query_v1_beta1__ -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf diff --git a/python/terra_proto/gogoproto/__init__.py b/python/terra_proto/gogoproto/__init__.py index 70f8e2a..1d57db1 100644 --- a/python/terra_proto/gogoproto/__init__.py +++ b/python/terra_proto/gogoproto/__init__.py @@ -4,4 +4,3 @@ from dataclasses import dataclass import betterproto -from betterproto.grpc.grpclib_server import ServiceBase diff --git a/python/terra_proto/google/api/__init__.py b/python/terra_proto/google/api/__init__.py index 0b8fa71..5cd5640 100644 --- a/python/terra_proto/google/api/__init__.py +++ b/python/terra_proto/google/api/__init__.py @@ -5,7 +5,7 @@ from typing import List import betterproto -from betterproto.grpc.grpclib_server import ServiceBase +import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf @dataclass(eq=False, repr=False) @@ -16,14 +16,19 @@ class Http(betterproto.Message): method to one or more HTTP REST API methods. """ - # A list of HTTP configuration rules that apply to individual API methods. - # **NOTE:** All service configuration rules follow "last one wins" order. rules: List["HttpRule"] = betterproto.message_field(1) - # 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. + """ + A list of HTTP configuration rules that apply to individual API methods. + **NOTE:** All service configuration rules follow "last one wins" order. + """ + fully_decode_reserved_expansion: bool = betterproto.bool_field(2) + """ + 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. + """ @dataclass(eq=False, repr=False) @@ -140,47 +145,67 @@ class HttpRule(betterproto.Message): repeated fields or map fields. """ - # Selects methods to which this rule applies. Refer to - # [selector][google.api.DocumentationRule.selector] for syntax details. selector: str = betterproto.string_field(1) - # Used for listing and getting information about resources. + """ + Selects methods to which this rule applies. Refer to + [selector][google.api.DocumentationRule.selector] for syntax details. + """ + get: str = betterproto.string_field(2, group="pattern") - # Used for updating a resource. + """Used for listing and getting information about resources.""" + put: str = betterproto.string_field(3, group="pattern") - # Used for creating a resource. + """Used for updating a resource.""" + post: str = betterproto.string_field(4, group="pattern") - # Used for deleting a resource. + """Used for creating a resource.""" + delete: str = betterproto.string_field(5, group="pattern") - # Used for updating a resource. + """Used for deleting a resource.""" + patch: str = betterproto.string_field(6, group="pattern") - # 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. + """Used for updating a resource.""" + custom: "CustomHttpPattern" = betterproto.message_field(8, group="pattern") - # 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. + """ + 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. + """ + body: str = betterproto.string_field(7) - # 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. + """ + 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. + """ + response_body: str = betterproto.string_field(12) - # 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). + """ + 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. + """ + additional_bindings: List["HttpRule"] = betterproto.message_field(11) + """ + 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). + """ @dataclass(eq=False, repr=False) class CustomHttpPattern(betterproto.Message): """A custom pattern is used for defining custom HTTP verb.""" - # The name of this custom HTTP verb. kind: str = betterproto.string_field(1) - # The path matched by this custom verb. + """The name of this custom HTTP verb.""" + path: str = betterproto.string_field(2) + """The path matched by this custom verb.""" @dataclass(eq=False, repr=False) @@ -206,15 +231,18 @@ class HttpBody(betterproto.Message): unchanged. """ - # The HTTP Content-Type header value specifying the content type of the body. content_type: str = betterproto.string_field(1) - # The HTTP request/response body as raw binary. + """ + The HTTP Content-Type header value specifying the content type of the body. + """ + data: bytes = betterproto.bytes_field(2) - # Application specific response metadata. Must be set in the first response - # for streaming APIs. + """The HTTP request/response body as raw binary.""" + extensions: List["betterproto_lib_google_protobuf.Any"] = betterproto.message_field( 3 ) - - -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf + """ + Application specific response metadata. Must be set in the first response + for streaming APIs. + """ diff --git a/python/terra_proto/ibc/applications/fee/v1/__init__.py b/python/terra_proto/ibc/applications/fee/v1/__init__.py deleted file mode 100644 index d5314ba..0000000 --- a/python/terra_proto/ibc/applications/fee/v1/__init__.py +++ /dev/null @@ -1,949 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# sources: ibc/applications/fee/v1/ack.proto, ibc/applications/fee/v1/fee.proto, ibc/applications/fee/v1/genesis.proto, ibc/applications/fee/v1/metadata.proto, ibc/applications/fee/v1/query.proto, ibc/applications/fee/v1/tx.proto -# plugin: python-betterproto -from dataclasses import dataclass -from typing import Dict, List, Optional - -import betterproto -from betterproto.grpc.grpclib_server import ServiceBase -import grpclib - - -@dataclass(eq=False, repr=False) -class Fee(betterproto.Message): - """Fee defines the ICS29 receive, acknowledgement and timeout fees""" - - # the packet receive fee - recv_fee: List["____cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(1) - # the packet acknowledgement fee - ack_fee: List["____cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(2) - # the packet timeout fee - timeout_fee: List["____cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(3) - - -@dataclass(eq=False, repr=False) -class PacketFee(betterproto.Message): - """ - PacketFee contains ICS29 relayer fees, refund address and optional list of - permitted relayers - """ - - # fee encapsulates the recv, ack and timeout fees associated with an IBC - # packet - fee: "Fee" = betterproto.message_field(1) - # the refund address for unspent fees - refund_address: str = betterproto.string_field(2) - # optional list of relayers permitted to receive fees - relayers: List[str] = betterproto.string_field(3) - - -@dataclass(eq=False, repr=False) -class PacketFees(betterproto.Message): - """PacketFees contains a list of type PacketFee""" - - # list of packet fees - packet_fees: List["PacketFee"] = betterproto.message_field(1) - - -@dataclass(eq=False, repr=False) -class IdentifiedPacketFees(betterproto.Message): - """ - IdentifiedPacketFees contains a list of type PacketFee and associated - PacketId - """ - - # unique packet identifier comprised of the channel ID, port ID and sequence - packet_id: "___core_channel_v1__.PacketId" = betterproto.message_field(1) - # list of packet fees - packet_fees: List["PacketFee"] = betterproto.message_field(2) - - -@dataclass(eq=False, repr=False) -class MsgRegisterCounterpartyAddress(betterproto.Message): - """ - MsgRegisterCounterpartyAddress defines the request type for the - RegisterCounterpartyAddress rpc - """ - - # the relayer address - address: str = betterproto.string_field(1) - # the counterparty relayer address - counterparty_address: str = betterproto.string_field(2) - # unique channel identifier - channel_id: str = betterproto.string_field(3) - - -@dataclass(eq=False, repr=False) -class MsgRegisterCounterpartyAddressResponse(betterproto.Message): - """ - MsgRegisterCounterpartyAddressResponse defines the response type for the - RegisterCounterpartyAddress rpc - """ - - pass - - -@dataclass(eq=False, repr=False) -class MsgPayPacketFee(betterproto.Message): - """ - MsgPayPacketFee defines the request type for the PayPacketFee rpc This Msg - can be used to pay for a packet at the next sequence send & should be - combined with the Msg that will be paid for - """ - - # fee encapsulates the recv, ack and timeout fees associated with an IBC - # packet - fee: "Fee" = betterproto.message_field(1) - # the source port unique identifier - source_port_id: str = betterproto.string_field(2) - # the source channel unique identifer - source_channel_id: str = betterproto.string_field(3) - # account address to refund fee if necessary - signer: str = betterproto.string_field(4) - # optional list of relayers permitted to the receive packet fees - relayers: List[str] = betterproto.string_field(5) - - -@dataclass(eq=False, repr=False) -class MsgPayPacketFeeResponse(betterproto.Message): - """ - MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc - """ - - pass - - -@dataclass(eq=False, repr=False) -class MsgPayPacketFeeAsync(betterproto.Message): - """ - MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc - This Msg can be used to pay for a packet at a specified sequence (instead - of the next sequence send) - """ - - # unique packet identifier comprised of the channel ID, port ID and sequence - packet_id: "___core_channel_v1__.PacketId" = betterproto.message_field(1) - # the packet fee associated with a particular IBC packet - packet_fee: "PacketFee" = betterproto.message_field(2) - - -@dataclass(eq=False, repr=False) -class MsgPayPacketFeeAsyncResponse(betterproto.Message): - """ - MsgPayPacketFeeAsyncResponse defines the response type for the - PayPacketFeeAsync rpc - """ - - pass - - -@dataclass(eq=False, repr=False) -class IncentivizedAcknowledgement(betterproto.Message): - """ - IncentivizedAcknowledgement is the acknowledgement format to be used by - applications wrapped in the fee middleware - """ - - # the underlying app acknowledgement result bytes - result: bytes = betterproto.bytes_field(1) - # the relayer address which submits the recv packet message - forward_relayer_address: str = betterproto.string_field(2) - # success flag of the base application callback - underlying_app_success: bool = betterproto.bool_field(3) - - -@dataclass(eq=False, repr=False) -class GenesisState(betterproto.Message): - """GenesisState defines the ICS29 fee middleware genesis state""" - - # list of identified packet fees - identified_fees: List["IdentifiedPacketFees"] = betterproto.message_field(1) - # list of fee enabled channels - fee_enabled_channels: List["FeeEnabledChannel"] = betterproto.message_field(2) - # list of registered relayer addresses - registered_relayers: List["RegisteredRelayerAddress"] = betterproto.message_field(3) - # list of forward relayer addresses - forward_relayers: List["ForwardRelayerAddress"] = betterproto.message_field(4) - - -@dataclass(eq=False, repr=False) -class FeeEnabledChannel(betterproto.Message): - """ - FeeEnabledChannel contains the PortID & ChannelID for a fee enabled channel - """ - - # unique port identifier - port_id: str = betterproto.string_field(1) - # unique channel identifier - channel_id: str = betterproto.string_field(2) - - -@dataclass(eq=False, repr=False) -class RegisteredRelayerAddress(betterproto.Message): - """ - RegisteredRelayerAddress contains the address and counterparty address for - a specific relayer (for distributing fees) - """ - - # the relayer address - address: str = betterproto.string_field(1) - # the counterparty relayer address - counterparty_address: str = betterproto.string_field(2) - # unique channel identifier - channel_id: str = betterproto.string_field(3) - - -@dataclass(eq=False, repr=False) -class ForwardRelayerAddress(betterproto.Message): - """ - ForwardRelayerAddress contains the forward relayer address and PacketId - used for async acknowledgements - """ - - # the forward relayer address - address: str = betterproto.string_field(1) - # unique packet identifer comprised of the channel ID, port ID and sequence - packet_id: "___core_channel_v1__.PacketId" = betterproto.message_field(2) - - -@dataclass(eq=False, repr=False) -class QueryIncentivizedPacketsRequest(betterproto.Message): - """ - QueryIncentivizedPacketsRequest defines the request type for the - IncentivizedPackets rpc - """ - - # pagination defines an optional pagination for the request. - pagination: "____cosmos_base_query_v1_beta1__.PageRequest" = ( - betterproto.message_field(1) - ) - # block height at which to query - query_height: int = betterproto.uint64_field(2) - - -@dataclass(eq=False, repr=False) -class QueryIncentivizedPacketsResponse(betterproto.Message): - """ - QueryIncentivizedPacketsResponse defines the response type for the - IncentivizedPackets rpc - """ - - # list of identified fees for incentivized packets - incentivized_packets: List["IdentifiedPacketFees"] = betterproto.message_field(1) - - -@dataclass(eq=False, repr=False) -class QueryIncentivizedPacketRequest(betterproto.Message): - """ - QueryIncentivizedPacketRequest defines the request type for the - IncentivizedPacket rpc - """ - - # unique packet identifier comprised of channel ID, port ID and sequence - packet_id: "___core_channel_v1__.PacketId" = betterproto.message_field(1) - # block height at which to query - query_height: int = betterproto.uint64_field(2) - - -@dataclass(eq=False, repr=False) -class QueryIncentivizedPacketResponse(betterproto.Message): - """ - QueryIncentivizedPacketsResponse defines the response type for the - IncentivizedPacket rpc - """ - - # the identified fees for the incentivized packet - incentivized_packet: "IdentifiedPacketFees" = betterproto.message_field(1) - - -@dataclass(eq=False, repr=False) -class QueryIncentivizedPacketsForChannelRequest(betterproto.Message): - """ - QueryIncentivizedPacketsForChannelRequest defines the request type for - querying for all incentivized packets for a specific channel - """ - - # pagination defines an optional pagination for the request. - pagination: "____cosmos_base_query_v1_beta1__.PageRequest" = ( - betterproto.message_field(1) - ) - port_id: str = betterproto.string_field(2) - channel_id: str = betterproto.string_field(3) - # Height to query at - query_height: int = betterproto.uint64_field(4) - - -@dataclass(eq=False, repr=False) -class QueryIncentivizedPacketsForChannelResponse(betterproto.Message): - """ - QueryIncentivizedPacketsResponse defines the response type for the - incentivized packets RPC - """ - - # Map of all incentivized_packets - incentivized_packets: List["IdentifiedPacketFees"] = betterproto.message_field(1) - - -@dataclass(eq=False, repr=False) -class QueryTotalRecvFeesRequest(betterproto.Message): - """ - QueryTotalRecvFeesRequest defines the request type for the TotalRecvFees - rpc - """ - - # the packet identifier for the associated fees - packet_id: "___core_channel_v1__.PacketId" = betterproto.message_field(1) - - -@dataclass(eq=False, repr=False) -class QueryTotalRecvFeesResponse(betterproto.Message): - """ - QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees - rpc - """ - - # the total packet receive fees - recv_fees: List["____cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(1) - - -@dataclass(eq=False, repr=False) -class QueryTotalAckFeesRequest(betterproto.Message): - """ - QueryTotalAckFeesRequest defines the request type for the TotalAckFees rpc - """ - - # the packet identifier for the associated fees - packet_id: "___core_channel_v1__.PacketId" = betterproto.message_field(1) - - -@dataclass(eq=False, repr=False) -class QueryTotalAckFeesResponse(betterproto.Message): - """ - QueryTotalAckFeesResponse defines the response type for the TotalAckFees - rpc - """ - - # the total packet acknowledgement fees - ack_fees: List["____cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(1) - - -@dataclass(eq=False, repr=False) -class QueryTotalTimeoutFeesRequest(betterproto.Message): - """ - QueryTotalTimeoutFeesRequest defines the request type for the - TotalTimeoutFees rpc - """ - - # the packet identifier for the associated fees - packet_id: "___core_channel_v1__.PacketId" = betterproto.message_field(1) - - -@dataclass(eq=False, repr=False) -class QueryTotalTimeoutFeesResponse(betterproto.Message): - """ - QueryTotalTimeoutFeesResponse defines the response type for the - TotalTimeoutFees rpc - """ - - # the total packet timeout fees - timeout_fees: List["____cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(1) - - -@dataclass(eq=False, repr=False) -class QueryCounterpartyAddressRequest(betterproto.Message): - """ - QueryCounterpartyAddressRequest defines the request type for the - CounterpartyAddress rpc - """ - - # unique channel identifier - channel_id: str = betterproto.string_field(1) - # the relayer address to which the counterparty is registered - relayer_address: str = betterproto.string_field(2) - - -@dataclass(eq=False, repr=False) -class QueryCounterpartyAddressResponse(betterproto.Message): - """ - QueryCounterpartyAddressResponse defines the response type for the - CounterpartyAddress rpc - """ - - # the counterparty address used to compensate forward relaying - counterparty_address: str = betterproto.string_field(1) - - -@dataclass(eq=False, repr=False) -class QueryFeeEnabledChannelsRequest(betterproto.Message): - """ - QueryFeeEnabledChannelsRequest defines the request type for the - FeeEnabledChannels rpc - """ - - # pagination defines an optional pagination for the request. - pagination: "____cosmos_base_query_v1_beta1__.PageRequest" = ( - betterproto.message_field(1) - ) - # block height at which to query - query_height: int = betterproto.uint64_field(2) - - -@dataclass(eq=False, repr=False) -class QueryFeeEnabledChannelsResponse(betterproto.Message): - """ - QueryFeeEnabledChannelsResponse defines the response type for the - FeeEnabledChannels rpc - """ - - # list of fee enabled channels - fee_enabled_channels: List["FeeEnabledChannel"] = betterproto.message_field(1) - - -@dataclass(eq=False, repr=False) -class QueryFeeEnabledChannelRequest(betterproto.Message): - """ - QueryFeeEnabledChannelRequest defines the request type for the - FeeEnabledChannel rpc - """ - - # unique port identifier - port_id: str = betterproto.string_field(1) - # unique channel identifier - channel_id: str = betterproto.string_field(2) - - -@dataclass(eq=False, repr=False) -class QueryFeeEnabledChannelResponse(betterproto.Message): - """ - QueryFeeEnabledChannelResponse defines the response type for the - FeeEnabledChannel rpc - """ - - # boolean flag representing the fee enabled channel status - fee_enabled: bool = betterproto.bool_field(1) - - -@dataclass(eq=False, repr=False) -class Metadata(betterproto.Message): - """ - Metadata defines the ICS29 channel specific metadata encoded into the - channel version bytestring See ICS004: - https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and- - packet-semantics#Versioning - """ - - # fee_version defines the ICS29 fee version - fee_version: str = betterproto.string_field(1) - # app_version defines the underlying application version, which may or may - # not be a JSON encoded bytestring - app_version: str = betterproto.string_field(2) - - -class MsgStub(betterproto.ServiceStub): - async def register_counterparty_address( - self, *, address: str = "", counterparty_address: str = "", channel_id: str = "" - ) -> "MsgRegisterCounterpartyAddressResponse": - - request = MsgRegisterCounterpartyAddress() - request.address = address - request.counterparty_address = counterparty_address - request.channel_id = channel_id - - return await self._unary_unary( - "/ibc.applications.fee.v1.Msg/RegisterCounterpartyAddress", - request, - MsgRegisterCounterpartyAddressResponse, - ) - - async def pay_packet_fee( - self, - *, - fee: "Fee" = None, - source_port_id: str = "", - source_channel_id: str = "", - signer: str = "", - relayers: Optional[List[str]] = None - ) -> "MsgPayPacketFeeResponse": - relayers = relayers or [] - - request = MsgPayPacketFee() - if fee is not None: - request.fee = fee - request.source_port_id = source_port_id - request.source_channel_id = source_channel_id - request.signer = signer - request.relayers = relayers - - return await self._unary_unary( - "/ibc.applications.fee.v1.Msg/PayPacketFee", - request, - MsgPayPacketFeeResponse, - ) - - async def pay_packet_fee_async( - self, - *, - packet_id: "___core_channel_v1__.PacketId" = None, - packet_fee: "PacketFee" = None - ) -> "MsgPayPacketFeeAsyncResponse": - - request = MsgPayPacketFeeAsync() - if packet_id is not None: - request.packet_id = packet_id - if packet_fee is not None: - request.packet_fee = packet_fee - - return await self._unary_unary( - "/ibc.applications.fee.v1.Msg/PayPacketFeeAsync", - request, - MsgPayPacketFeeAsyncResponse, - ) - - -class QueryStub(betterproto.ServiceStub): - async def incentivized_packets( - self, - *, - pagination: "____cosmos_base_query_v1_beta1__.PageRequest" = None, - query_height: int = 0 - ) -> "QueryIncentivizedPacketsResponse": - - request = QueryIncentivizedPacketsRequest() - if pagination is not None: - request.pagination = pagination - request.query_height = query_height - - return await self._unary_unary( - "/ibc.applications.fee.v1.Query/IncentivizedPackets", - request, - QueryIncentivizedPacketsResponse, - ) - - async def incentivized_packet( - self, - *, - packet_id: "___core_channel_v1__.PacketId" = None, - query_height: int = 0 - ) -> "QueryIncentivizedPacketResponse": - - request = QueryIncentivizedPacketRequest() - if packet_id is not None: - request.packet_id = packet_id - request.query_height = query_height - - return await self._unary_unary( - "/ibc.applications.fee.v1.Query/IncentivizedPacket", - request, - QueryIncentivizedPacketResponse, - ) - - async def incentivized_packets_for_channel( - self, - *, - pagination: "____cosmos_base_query_v1_beta1__.PageRequest" = None, - port_id: str = "", - channel_id: str = "", - query_height: int = 0 - ) -> "QueryIncentivizedPacketsForChannelResponse": - - request = QueryIncentivizedPacketsForChannelRequest() - if pagination is not None: - request.pagination = pagination - request.port_id = port_id - request.channel_id = channel_id - request.query_height = query_height - - return await self._unary_unary( - "/ibc.applications.fee.v1.Query/IncentivizedPacketsForChannel", - request, - QueryIncentivizedPacketsForChannelResponse, - ) - - async def total_recv_fees( - self, *, packet_id: "___core_channel_v1__.PacketId" = None - ) -> "QueryTotalRecvFeesResponse": - - request = QueryTotalRecvFeesRequest() - if packet_id is not None: - request.packet_id = packet_id - - return await self._unary_unary( - "/ibc.applications.fee.v1.Query/TotalRecvFees", - request, - QueryTotalRecvFeesResponse, - ) - - async def total_ack_fees( - self, *, packet_id: "___core_channel_v1__.PacketId" = None - ) -> "QueryTotalAckFeesResponse": - - request = QueryTotalAckFeesRequest() - if packet_id is not None: - request.packet_id = packet_id - - return await self._unary_unary( - "/ibc.applications.fee.v1.Query/TotalAckFees", - request, - QueryTotalAckFeesResponse, - ) - - async def total_timeout_fees( - self, *, packet_id: "___core_channel_v1__.PacketId" = None - ) -> "QueryTotalTimeoutFeesResponse": - - request = QueryTotalTimeoutFeesRequest() - if packet_id is not None: - request.packet_id = packet_id - - return await self._unary_unary( - "/ibc.applications.fee.v1.Query/TotalTimeoutFees", - request, - QueryTotalTimeoutFeesResponse, - ) - - async def counterparty_address( - self, *, channel_id: str = "", relayer_address: str = "" - ) -> "QueryCounterpartyAddressResponse": - - request = QueryCounterpartyAddressRequest() - request.channel_id = channel_id - request.relayer_address = relayer_address - - return await self._unary_unary( - "/ibc.applications.fee.v1.Query/CounterpartyAddress", - request, - QueryCounterpartyAddressResponse, - ) - - async def fee_enabled_channels( - self, - *, - pagination: "____cosmos_base_query_v1_beta1__.PageRequest" = None, - query_height: int = 0 - ) -> "QueryFeeEnabledChannelsResponse": - - request = QueryFeeEnabledChannelsRequest() - if pagination is not None: - request.pagination = pagination - request.query_height = query_height - - return await self._unary_unary( - "/ibc.applications.fee.v1.Query/FeeEnabledChannels", - request, - QueryFeeEnabledChannelsResponse, - ) - - async def fee_enabled_channel( - self, *, port_id: str = "", channel_id: str = "" - ) -> "QueryFeeEnabledChannelResponse": - - request = QueryFeeEnabledChannelRequest() - request.port_id = port_id - request.channel_id = channel_id - - return await self._unary_unary( - "/ibc.applications.fee.v1.Query/FeeEnabledChannel", - request, - QueryFeeEnabledChannelResponse, - ) - - -class MsgBase(ServiceBase): - async def register_counterparty_address( - self, address: str, counterparty_address: str, channel_id: str - ) -> "MsgRegisterCounterpartyAddressResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def pay_packet_fee( - self, - fee: "Fee", - source_port_id: str, - source_channel_id: str, - signer: str, - relayers: Optional[List[str]], - ) -> "MsgPayPacketFeeResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def pay_packet_fee_async( - self, packet_id: "___core_channel_v1__.PacketId", packet_fee: "PacketFee" - ) -> "MsgPayPacketFeeAsyncResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def __rpc_register_counterparty_address( - self, stream: grpclib.server.Stream - ) -> None: - request = await stream.recv_message() - - request_kwargs = { - "address": request.address, - "counterparty_address": request.counterparty_address, - "channel_id": request.channel_id, - } - - response = await self.register_counterparty_address(**request_kwargs) - await stream.send_message(response) - - async def __rpc_pay_packet_fee(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "fee": request.fee, - "source_port_id": request.source_port_id, - "source_channel_id": request.source_channel_id, - "signer": request.signer, - "relayers": request.relayers, - } - - response = await self.pay_packet_fee(**request_kwargs) - await stream.send_message(response) - - async def __rpc_pay_packet_fee_async(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "packet_id": request.packet_id, - "packet_fee": request.packet_fee, - } - - response = await self.pay_packet_fee_async(**request_kwargs) - await stream.send_message(response) - - def __mapping__(self) -> Dict[str, grpclib.const.Handler]: - return { - "/ibc.applications.fee.v1.Msg/RegisterCounterpartyAddress": grpclib.const.Handler( - self.__rpc_register_counterparty_address, - grpclib.const.Cardinality.UNARY_UNARY, - MsgRegisterCounterpartyAddress, - MsgRegisterCounterpartyAddressResponse, - ), - "/ibc.applications.fee.v1.Msg/PayPacketFee": grpclib.const.Handler( - self.__rpc_pay_packet_fee, - grpclib.const.Cardinality.UNARY_UNARY, - MsgPayPacketFee, - MsgPayPacketFeeResponse, - ), - "/ibc.applications.fee.v1.Msg/PayPacketFeeAsync": grpclib.const.Handler( - self.__rpc_pay_packet_fee_async, - grpclib.const.Cardinality.UNARY_UNARY, - MsgPayPacketFeeAsync, - MsgPayPacketFeeAsyncResponse, - ), - } - - -class QueryBase(ServiceBase): - async def incentivized_packets( - self, - pagination: "____cosmos_base_query_v1_beta1__.PageRequest", - query_height: int, - ) -> "QueryIncentivizedPacketsResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def incentivized_packet( - self, packet_id: "___core_channel_v1__.PacketId", query_height: int - ) -> "QueryIncentivizedPacketResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def incentivized_packets_for_channel( - self, - pagination: "____cosmos_base_query_v1_beta1__.PageRequest", - port_id: str, - channel_id: str, - query_height: int, - ) -> "QueryIncentivizedPacketsForChannelResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def total_recv_fees( - self, packet_id: "___core_channel_v1__.PacketId" - ) -> "QueryTotalRecvFeesResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def total_ack_fees( - self, packet_id: "___core_channel_v1__.PacketId" - ) -> "QueryTotalAckFeesResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def total_timeout_fees( - self, packet_id: "___core_channel_v1__.PacketId" - ) -> "QueryTotalTimeoutFeesResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def counterparty_address( - self, channel_id: str, relayer_address: str - ) -> "QueryCounterpartyAddressResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def fee_enabled_channels( - self, - pagination: "____cosmos_base_query_v1_beta1__.PageRequest", - query_height: int, - ) -> "QueryFeeEnabledChannelsResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def fee_enabled_channel( - self, port_id: str, channel_id: str - ) -> "QueryFeeEnabledChannelResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def __rpc_incentivized_packets(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "pagination": request.pagination, - "query_height": request.query_height, - } - - response = await self.incentivized_packets(**request_kwargs) - await stream.send_message(response) - - async def __rpc_incentivized_packet(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "packet_id": request.packet_id, - "query_height": request.query_height, - } - - response = await self.incentivized_packet(**request_kwargs) - await stream.send_message(response) - - async def __rpc_incentivized_packets_for_channel( - self, stream: grpclib.server.Stream - ) -> None: - request = await stream.recv_message() - - request_kwargs = { - "pagination": request.pagination, - "port_id": request.port_id, - "channel_id": request.channel_id, - "query_height": request.query_height, - } - - response = await self.incentivized_packets_for_channel(**request_kwargs) - await stream.send_message(response) - - async def __rpc_total_recv_fees(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "packet_id": request.packet_id, - } - - response = await self.total_recv_fees(**request_kwargs) - await stream.send_message(response) - - async def __rpc_total_ack_fees(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "packet_id": request.packet_id, - } - - response = await self.total_ack_fees(**request_kwargs) - await stream.send_message(response) - - async def __rpc_total_timeout_fees(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "packet_id": request.packet_id, - } - - response = await self.total_timeout_fees(**request_kwargs) - await stream.send_message(response) - - async def __rpc_counterparty_address(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "channel_id": request.channel_id, - "relayer_address": request.relayer_address, - } - - response = await self.counterparty_address(**request_kwargs) - await stream.send_message(response) - - async def __rpc_fee_enabled_channels(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "pagination": request.pagination, - "query_height": request.query_height, - } - - response = await self.fee_enabled_channels(**request_kwargs) - await stream.send_message(response) - - async def __rpc_fee_enabled_channel(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "port_id": request.port_id, - "channel_id": request.channel_id, - } - - response = await self.fee_enabled_channel(**request_kwargs) - await stream.send_message(response) - - def __mapping__(self) -> Dict[str, grpclib.const.Handler]: - return { - "/ibc.applications.fee.v1.Query/IncentivizedPackets": grpclib.const.Handler( - self.__rpc_incentivized_packets, - grpclib.const.Cardinality.UNARY_UNARY, - QueryIncentivizedPacketsRequest, - QueryIncentivizedPacketsResponse, - ), - "/ibc.applications.fee.v1.Query/IncentivizedPacket": grpclib.const.Handler( - self.__rpc_incentivized_packet, - grpclib.const.Cardinality.UNARY_UNARY, - QueryIncentivizedPacketRequest, - QueryIncentivizedPacketResponse, - ), - "/ibc.applications.fee.v1.Query/IncentivizedPacketsForChannel": grpclib.const.Handler( - self.__rpc_incentivized_packets_for_channel, - grpclib.const.Cardinality.UNARY_UNARY, - QueryIncentivizedPacketsForChannelRequest, - QueryIncentivizedPacketsForChannelResponse, - ), - "/ibc.applications.fee.v1.Query/TotalRecvFees": grpclib.const.Handler( - self.__rpc_total_recv_fees, - grpclib.const.Cardinality.UNARY_UNARY, - QueryTotalRecvFeesRequest, - QueryTotalRecvFeesResponse, - ), - "/ibc.applications.fee.v1.Query/TotalAckFees": grpclib.const.Handler( - self.__rpc_total_ack_fees, - grpclib.const.Cardinality.UNARY_UNARY, - QueryTotalAckFeesRequest, - QueryTotalAckFeesResponse, - ), - "/ibc.applications.fee.v1.Query/TotalTimeoutFees": grpclib.const.Handler( - self.__rpc_total_timeout_fees, - grpclib.const.Cardinality.UNARY_UNARY, - QueryTotalTimeoutFeesRequest, - QueryTotalTimeoutFeesResponse, - ), - "/ibc.applications.fee.v1.Query/CounterpartyAddress": grpclib.const.Handler( - self.__rpc_counterparty_address, - grpclib.const.Cardinality.UNARY_UNARY, - QueryCounterpartyAddressRequest, - QueryCounterpartyAddressResponse, - ), - "/ibc.applications.fee.v1.Query/FeeEnabledChannels": grpclib.const.Handler( - self.__rpc_fee_enabled_channels, - grpclib.const.Cardinality.UNARY_UNARY, - QueryFeeEnabledChannelsRequest, - QueryFeeEnabledChannelsResponse, - ), - "/ibc.applications.fee.v1.Query/FeeEnabledChannel": grpclib.const.Handler( - self.__rpc_fee_enabled_channel, - grpclib.const.Cardinality.UNARY_UNARY, - QueryFeeEnabledChannelRequest, - QueryFeeEnabledChannelResponse, - ), - } - - -from .....cosmos.base import v1beta1 as ____cosmos_base_v1_beta1__ -from .....cosmos.base.query import v1beta1 as ____cosmos_base_query_v1_beta1__ -from ....core.channel import v1 as ___core_channel_v1__ diff --git a/python/terra_proto/ibc/applications/interchain_accounts/controller/v1/__init__.py b/python/terra_proto/ibc/applications/interchain_accounts/controller/v1/__init__.py deleted file mode 100644 index 1d100e1..0000000 --- a/python/terra_proto/ibc/applications/interchain_accounts/controller/v1/__init__.py +++ /dev/null @@ -1,74 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# sources: ibc/applications/interchain_accounts/controller/v1/controller.proto, ibc/applications/interchain_accounts/controller/v1/query.proto -# plugin: python-betterproto -from dataclasses import dataclass -from typing import Dict - -import betterproto -from betterproto.grpc.grpclib_server import ServiceBase -import grpclib - - -@dataclass(eq=False, repr=False) -class Params(betterproto.Message): - """ - Params defines the set of on-chain interchain accounts parameters. The - following parameters may be used to disable the controller submodule. - """ - - # controller_enabled enables or disables the controller submodule. - controller_enabled: bool = betterproto.bool_field(1) - - -@dataclass(eq=False, repr=False) -class QueryParamsRequest(betterproto.Message): - """ - QueryParamsRequest is the request type for the Query/Params RPC method. - """ - - pass - - -@dataclass(eq=False, repr=False) -class QueryParamsResponse(betterproto.Message): - """ - QueryParamsResponse is the response type for the Query/Params RPC method. - """ - - # params defines the parameters of the module. - params: "Params" = betterproto.message_field(1) - - -class QueryStub(betterproto.ServiceStub): - async def params(self) -> "QueryParamsResponse": - - request = QueryParamsRequest() - - return await self._unary_unary( - "/ibc.applications.interchain_accounts.controller.v1.Query/Params", - request, - QueryParamsResponse, - ) - - -class QueryBase(ServiceBase): - async def params(self) -> "QueryParamsResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def __rpc_params(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = {} - - response = await self.params(**request_kwargs) - await stream.send_message(response) - - def __mapping__(self) -> Dict[str, grpclib.const.Handler]: - return { - "/ibc.applications.interchain_accounts.controller.v1.Query/Params": grpclib.const.Handler( - self.__rpc_params, - grpclib.const.Cardinality.UNARY_UNARY, - QueryParamsRequest, - QueryParamsResponse, - ), - } diff --git a/python/terra_proto/ibc/applications/interchain_accounts/host/v1/__init__.py b/python/terra_proto/ibc/applications/interchain_accounts/host/v1/__init__.py deleted file mode 100644 index ef5145d..0000000 --- a/python/terra_proto/ibc/applications/interchain_accounts/host/v1/__init__.py +++ /dev/null @@ -1,77 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# sources: ibc/applications/interchain_accounts/host/v1/host.proto, ibc/applications/interchain_accounts/host/v1/query.proto -# plugin: python-betterproto -from dataclasses import dataclass -from typing import Dict, List - -import betterproto -from betterproto.grpc.grpclib_server import ServiceBase -import grpclib - - -@dataclass(eq=False, repr=False) -class Params(betterproto.Message): - """ - Params defines the set of on-chain interchain accounts parameters. The - following parameters may be used to disable the host submodule. - """ - - # host_enabled enables or disables the host submodule. - host_enabled: bool = betterproto.bool_field(1) - # allow_messages defines a list of sdk message typeURLs allowed to be - # executed on a host chain. - allow_messages: List[str] = betterproto.string_field(2) - - -@dataclass(eq=False, repr=False) -class QueryParamsRequest(betterproto.Message): - """ - QueryParamsRequest is the request type for the Query/Params RPC method. - """ - - pass - - -@dataclass(eq=False, repr=False) -class QueryParamsResponse(betterproto.Message): - """ - QueryParamsResponse is the response type for the Query/Params RPC method. - """ - - # params defines the parameters of the module. - params: "Params" = betterproto.message_field(1) - - -class QueryStub(betterproto.ServiceStub): - async def params(self) -> "QueryParamsResponse": - - request = QueryParamsRequest() - - return await self._unary_unary( - "/ibc.applications.interchain_accounts.host.v1.Query/Params", - request, - QueryParamsResponse, - ) - - -class QueryBase(ServiceBase): - async def params(self) -> "QueryParamsResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - - async def __rpc_params(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = {} - - response = await self.params(**request_kwargs) - await stream.send_message(response) - - def __mapping__(self) -> Dict[str, grpclib.const.Handler]: - return { - "/ibc.applications.interchain_accounts.host.v1.Query/Params": grpclib.const.Handler( - self.__rpc_params, - grpclib.const.Cardinality.UNARY_UNARY, - QueryParamsRequest, - QueryParamsResponse, - ), - } diff --git a/python/terra_proto/ibc/applications/interchain_accounts/v1/__init__.py b/python/terra_proto/ibc/applications/interchain_accounts/v1/__init__.py deleted file mode 100644 index d3a8bc3..0000000 --- a/python/terra_proto/ibc/applications/interchain_accounts/v1/__init__.py +++ /dev/null @@ -1,147 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# sources: ibc/applications/interchain_accounts/v1/account.proto, ibc/applications/interchain_accounts/v1/genesis.proto, ibc/applications/interchain_accounts/v1/metadata.proto, ibc/applications/interchain_accounts/v1/packet.proto -# plugin: python-betterproto -from dataclasses import dataclass -from typing import List - -import betterproto -from betterproto.grpc.grpclib_server import ServiceBase - - -class Type(betterproto.Enum): - """ - Type defines a classification of message issued from a controller chain to - its associated interchain accounts host - """ - - # Default zero value enumeration - TYPE_UNSPECIFIED = 0 - # Execute a transaction on an interchain accounts host chain - TYPE_EXECUTE_TX = 1 - - -@dataclass(eq=False, repr=False) -class InterchainAccount(betterproto.Message): - """ - An InterchainAccount is defined as a BaseAccount & the address of the - account owner on the controller chain - """ - - base_account: "____cosmos_auth_v1_beta1__.BaseAccount" = betterproto.message_field( - 1 - ) - account_owner: str = betterproto.string_field(2) - - -@dataclass(eq=False, repr=False) -class InterchainAccountPacketData(betterproto.Message): - """ - InterchainAccountPacketData is comprised of a raw transaction, type of - transaction and optional memo field. - """ - - type: "Type" = betterproto.enum_field(1) - data: bytes = betterproto.bytes_field(2) - memo: str = betterproto.string_field(3) - - -@dataclass(eq=False, repr=False) -class CosmosTx(betterproto.Message): - """ - CosmosTx contains a list of sdk.Msg's. It should be used when sending - transactions to an SDK host chain. - """ - - messages: List["betterproto_lib_google_protobuf.Any"] = betterproto.message_field(1) - - -@dataclass(eq=False, repr=False) -class Metadata(betterproto.Message): - """ - Metadata defines a set of protocol specific data encoded into the ICS27 - channel version bytestring See ICS004: - https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and- - packet-semantics#Versioning - """ - - # version defines the ICS27 protocol version - version: str = betterproto.string_field(1) - # controller_connection_id is the connection identifier associated with the - # controller chain - controller_connection_id: str = betterproto.string_field(2) - # host_connection_id is the connection identifier associated with the host - # chain - host_connection_id: str = betterproto.string_field(3) - # address defines the interchain account address to be fulfilled upon the - # OnChanOpenTry handshake step NOTE: the address field is empty on the - # OnChanOpenInit handshake step - address: str = betterproto.string_field(4) - # encoding defines the supported codec format - encoding: str = betterproto.string_field(5) - # tx_type defines the type of transactions the interchain account can execute - tx_type: str = betterproto.string_field(6) - - -@dataclass(eq=False, repr=False) -class GenesisState(betterproto.Message): - """GenesisState defines the interchain accounts genesis state""" - - controller_genesis_state: "ControllerGenesisState" = betterproto.message_field(1) - host_genesis_state: "HostGenesisState" = betterproto.message_field(2) - - -@dataclass(eq=False, repr=False) -class ControllerGenesisState(betterproto.Message): - """ - ControllerGenesisState defines the interchain accounts controller genesis - state - """ - - active_channels: List["ActiveChannel"] = betterproto.message_field(1) - interchain_accounts: List[ - "RegisteredInterchainAccount" - ] = betterproto.message_field(2) - ports: List[str] = betterproto.string_field(3) - params: "_controller_v1__.Params" = betterproto.message_field(4) - - -@dataclass(eq=False, repr=False) -class HostGenesisState(betterproto.Message): - """HostGenesisState defines the interchain accounts host genesis state""" - - active_channels: List["ActiveChannel"] = betterproto.message_field(1) - interchain_accounts: List[ - "RegisteredInterchainAccount" - ] = betterproto.message_field(2) - port: str = betterproto.string_field(3) - params: "_host_v1__.Params" = betterproto.message_field(4) - - -@dataclass(eq=False, repr=False) -class ActiveChannel(betterproto.Message): - """ - ActiveChannel contains a connection ID, port ID and associated active - channel ID - """ - - connection_id: str = betterproto.string_field(1) - port_id: str = betterproto.string_field(2) - channel_id: str = betterproto.string_field(3) - - -@dataclass(eq=False, repr=False) -class RegisteredInterchainAccount(betterproto.Message): - """ - RegisteredInterchainAccount contains a connection ID, port ID and - associated interchain account address - """ - - connection_id: str = betterproto.string_field(1) - port_id: str = betterproto.string_field(2) - account_address: str = betterproto.string_field(3) - - -from .....cosmos.auth import v1beta1 as ____cosmos_auth_v1_beta1__ -from ..controller import v1 as _controller_v1__ -from ..host import v1 as _host_v1__ -import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf diff --git a/python/terra_proto/ibc/applications/transfer/v1/__init__.py b/python/terra_proto/ibc/applications/transfer/v1/__init__.py index 40ddd43..ba8fb36 100644 --- a/python/terra_proto/ibc/applications/transfer/v1/__init__.py +++ b/python/terra_proto/ibc/applications/transfer/v1/__init__.py @@ -14,7 +14,7 @@ class MsgTransfer(betterproto.Message): """ MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between ICS20 enabled chains. See ICS Spec here: - https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token- + https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token- transfer#data-structures """ @@ -31,8 +31,8 @@ class MsgTransfer(betterproto.Message): # Timeout height relative to the current block height. The timeout is # disabled when set to 0. timeout_height: "___core_client_v1__.Height" = betterproto.message_field(6) - # Timeout timestamp in absolute nanoseconds since unix epoch. The timeout is - # disabled when set to 0. + # Timeout timestamp (in nanoseconds) relative to the current block timestamp. + # The timeout is disabled when set to 0. timeout_timestamp: int = betterproto.uint64_field(7) @@ -43,6 +43,25 @@ class MsgTransferResponse(betterproto.Message): pass +@dataclass(eq=False, repr=False) +class FungibleTokenPacketData(betterproto.Message): + """ + FungibleTokenPacketData defines a struct for the packet payload See + FungibleTokenPacketData spec: + https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token- + transfer#data-structures + """ + + # the token denomination to be transferred + denom: str = betterproto.string_field(1) + # the token amount to be transferred + amount: int = betterproto.uint64_field(2) + # the sender address + sender: str = betterproto.string_field(3) + # the recipient address on the destination chain + receiver: str = betterproto.string_field(4) + + @dataclass(eq=False, repr=False) class DenomTrace(betterproto.Message): """ @@ -143,28 +162,6 @@ class QueryParamsResponse(betterproto.Message): params: "Params" = betterproto.message_field(1) -@dataclass(eq=False, repr=False) -class QueryDenomHashRequest(betterproto.Message): - """ - QueryDenomHashRequest is the request type for the Query/DenomHash RPC - method - """ - - # The denomination trace ([port_id]/[channel_id])+/[denom] - trace: str = betterproto.string_field(1) - - -@dataclass(eq=False, repr=False) -class QueryDenomHashResponse(betterproto.Message): - """ - QueryDenomHashResponse is the response type for the Query/DenomHash RPC - method. - """ - - # hash (in hex format) of the denomination trace information. - hash: str = betterproto.string_field(1) - - @dataclass(eq=False, repr=False) class GenesisState(betterproto.Message): """GenesisState defines the ibc-transfer genesis state""" @@ -237,17 +234,6 @@ async def params(self) -> "QueryParamsResponse": "/ibc.applications.transfer.v1.Query/Params", request, QueryParamsResponse ) - async def denom_hash(self, *, trace: str = "") -> "QueryDenomHashResponse": - - request = QueryDenomHashRequest() - request.trace = trace - - return await self._unary_unary( - "/ibc.applications.transfer.v1.Query/DenomHash", - request, - QueryDenomHashResponse, - ) - class MsgBase(ServiceBase): async def transfer( @@ -301,9 +287,6 @@ async def denom_traces( async def params(self) -> "QueryParamsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def denom_hash(self, trace: str) -> "QueryDenomHashResponse": - raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_denom_trace(self, stream: grpclib.server.Stream) -> None: request = await stream.recv_message() @@ -332,16 +315,6 @@ async def __rpc_params(self, stream: grpclib.server.Stream) -> None: response = await self.params(**request_kwargs) await stream.send_message(response) - async def __rpc_denom_hash(self, stream: grpclib.server.Stream) -> None: - request = await stream.recv_message() - - request_kwargs = { - "trace": request.trace, - } - - response = await self.denom_hash(**request_kwargs) - await stream.send_message(response) - def __mapping__(self) -> Dict[str, grpclib.const.Handler]: return { "/ibc.applications.transfer.v1.Query/DenomTrace": grpclib.const.Handler( @@ -362,12 +335,6 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: QueryParamsRequest, QueryParamsResponse, ), - "/ibc.applications.transfer.v1.Query/DenomHash": grpclib.const.Handler( - self.__rpc_denom_hash, - grpclib.const.Cardinality.UNARY_UNARY, - QueryDenomHashRequest, - QueryDenomHashResponse, - ), } diff --git a/python/terra_proto/ibc/applications/transfer/v2/__init__.py b/python/terra_proto/ibc/applications/transfer/v2/__init__.py deleted file mode 100644 index d96f8b3..0000000 --- a/python/terra_proto/ibc/applications/transfer/v2/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# sources: ibc/applications/transfer/v2/packet.proto -# plugin: python-betterproto -from dataclasses import dataclass - -import betterproto -from betterproto.grpc.grpclib_server import ServiceBase - - -@dataclass(eq=False, repr=False) -class FungibleTokenPacketData(betterproto.Message): - """ - FungibleTokenPacketData defines a struct for the packet payload See - FungibleTokenPacketData spec: - https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token- - transfer#data-structures - """ - - # the token denomination to be transferred - denom: str = betterproto.string_field(1) - # the token amount to be transferred - amount: str = betterproto.string_field(2) - # the sender address - sender: str = betterproto.string_field(3) - # the recipient address on the destination chain - receiver: str = betterproto.string_field(4) diff --git a/python/terra_proto/ibc/core/channel/v1/__init__.py b/python/terra_proto/ibc/core/channel/v1/__init__.py index 97c5c74..b2af17a 100644 --- a/python/terra_proto/ibc/core/channel/v1/__init__.py +++ b/python/terra_proto/ibc/core/channel/v1/__init__.py @@ -41,21 +41,6 @@ class Order(betterproto.Enum): ORDER_ORDERED = 2 -class ResponseResultType(betterproto.Enum): - """ - ResponseResultType defines the possible outcomes of the execution of a - message - """ - - # Default zero value enumeration - RESPONSE_RESULT_TYPE_UNSPECIFIED = 0 - # The message did not call the IBC application callbacks (because, for - # example, the packet had already been relayed) - RESPONSE_RESULT_TYPE_NOOP = 1 - # The message was executed successfully - RESPONSE_RESULT_TYPE_SUCCESS = 2 - - @dataclass(eq=False, repr=False) class Channel(betterproto.Message): """ @@ -156,22 +141,6 @@ class PacketState(betterproto.Message): data: bytes = betterproto.bytes_field(4) -@dataclass(eq=False, repr=False) -class PacketId(betterproto.Message): - """ - PacketId is an identifer for a unique Packet Source chains refer to packets - by source port/channel Destination chains refer to packets by destination - port/channel - """ - - # channel port identifier - port_id: str = betterproto.string_field(1) - # channel unique identifier - channel_id: str = betterproto.string_field(2) - # packet sequence - sequence: int = betterproto.uint64_field(3) - - @dataclass(eq=False, repr=False) class Acknowledgement(betterproto.Message): """ @@ -181,8 +150,8 @@ class Acknowledgement(betterproto.Message): used for acknowledgements. The first byte of any message with this format will be the non-ASCII values `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: - https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and- - packet-semantics#acknowledgement-envelope + https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet- + semantics#acknowledgement-envelope """ result: bytes = betterproto.bytes_field(21, group="response") @@ -234,23 +203,20 @@ class MsgChannelOpenInitResponse(betterproto.Message): MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. """ - channel_id: str = betterproto.string_field(1) + pass @dataclass(eq=False, repr=False) class MsgChannelOpenTry(betterproto.Message): """ MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel - on Chain B. The version field within the Channel field has been deprecated. - Its value will be ignored by core IBC. + on Chain B. """ port_id: str = betterproto.string_field(1) # in the case of crossing hello's, when both chains call OpenInit, we need # the channel identifier of the previous channel in state INIT previous_channel_id: str = betterproto.string_field(2) - # NOTE: the version field within the channel has been deprecated. Its value - # will be ignored by core IBC. channel: "Channel" = betterproto.message_field(3) counterparty_version: str = betterproto.string_field(4) proof_init: bytes = betterproto.bytes_field(5) @@ -375,7 +341,7 @@ class MsgRecvPacket(betterproto.Message): class MsgRecvPacketResponse(betterproto.Message): """MsgRecvPacketResponse defines the Msg/RecvPacket response type.""" - result: "ResponseResultType" = betterproto.enum_field(1) + pass @dataclass(eq=False, repr=False) @@ -393,7 +359,7 @@ class MsgTimeout(betterproto.Message): class MsgTimeoutResponse(betterproto.Message): """MsgTimeoutResponse defines the Msg/Timeout response type.""" - result: "ResponseResultType" = betterproto.enum_field(1) + pass @dataclass(eq=False, repr=False) @@ -416,7 +382,7 @@ class MsgTimeoutOnCloseResponse(betterproto.Message): MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. """ - result: "ResponseResultType" = betterproto.enum_field(1) + pass @dataclass(eq=False, repr=False) @@ -436,7 +402,7 @@ class MsgAcknowledgementResponse(betterproto.Message): MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. """ - result: "ResponseResultType" = betterproto.enum_field(1) + pass @dataclass(eq=False, repr=False) @@ -735,8 +701,6 @@ class QueryPacketAcknowledgementsRequest(betterproto.Message): pagination: "____cosmos_base_query_v1_beta1__.PageRequest" = ( betterproto.message_field(3) ) - # list of packet sequences - packet_commitment_sequences: List[int] = betterproto.uint64_field(4) @dataclass(eq=False, repr=False) @@ -1221,17 +1185,14 @@ async def packet_acknowledgements( *, port_id: str = "", channel_id: str = "", - pagination: "____cosmos_base_query_v1_beta1__.PageRequest" = None, - packet_commitment_sequences: Optional[List[int]] = None + pagination: "____cosmos_base_query_v1_beta1__.PageRequest" = None ) -> "QueryPacketAcknowledgementsResponse": - packet_commitment_sequences = packet_commitment_sequences or [] request = QueryPacketAcknowledgementsRequest() request.port_id = port_id request.channel_id = channel_id if pagination is not None: request.pagination = pagination - request.packet_commitment_sequences = packet_commitment_sequences return await self._unary_unary( "/ibc.core.channel.v1.Query/PacketAcknowledgements", @@ -1648,7 +1609,6 @@ async def packet_acknowledgements( port_id: str, channel_id: str, pagination: "____cosmos_base_query_v1_beta1__.PageRequest", - packet_commitment_sequences: Optional[List[int]], ) -> "QueryPacketAcknowledgementsResponse": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) @@ -1785,7 +1745,6 @@ async def __rpc_packet_acknowledgements( "port_id": request.port_id, "channel_id": request.channel_id, "pagination": request.pagination, - "packet_commitment_sequences": request.packet_commitment_sequences, } response = await self.packet_acknowledgements(**request_kwargs) diff --git a/python/terra_proto/ics23/__init__.py b/python/terra_proto/ics23/__init__.py index 9e16e1b..191a5a0 100644 --- a/python/terra_proto/ics23/__init__.py +++ b/python/terra_proto/ics23/__init__.py @@ -5,13 +5,15 @@ from typing import List import betterproto -from betterproto.grpc.grpclib_server import ServiceBase class HashOp(betterproto.Enum): - # NO_HASH is the default if no data passed. Note this is an illegal argument - # some places. NO_HASH = 0 + """ + NO_HASH is the default if no data passed. Note this is an illegal argument + some places. + """ + SHA256 = 1 SHA512 = 2 KECCAK = 3 @@ -27,28 +29,48 @@ class LengthOp(betterproto.Enum): encoded length) """ - # NO_PREFIX don't include any length info NO_PREFIX = 0 - # VAR_PROTO uses protobuf (and go-amino) varint encoding of the length + """NO_PREFIX don't include any length info""" + VAR_PROTO = 1 - # VAR_RLP uses rlp int encoding of the length + """VAR_PROTO uses protobuf (and go-amino) varint encoding of the length""" + VAR_RLP = 2 - # FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer + """VAR_RLP uses rlp int encoding of the length""" + FIXED32_BIG = 3 - # FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit - # integer + """ + FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer + """ + FIXED32_LITTLE = 4 - # FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer + """ + FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit + integer + """ + FIXED64_BIG = 5 - # FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit - # integer + """ + FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer + """ + FIXED64_LITTLE = 6 - # REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 - # bytes (sha256 output) + """ + FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit + integer + """ + REQUIRE_32_BYTES = 7 - # REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 - # bytes (sha512 output) + """ + REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 + bytes (sha256 output) + """ + REQUIRE_64_BYTES = 8 + """ + REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 + bytes (sha512 output) + """ @dataclass(eq=False, repr=False) @@ -119,9 +141,11 @@ class LeafOp(betterproto.Message): prehash_key: "HashOp" = betterproto.enum_field(2) prehash_value: "HashOp" = betterproto.enum_field(3) length: "LengthOp" = betterproto.enum_field(4) - # prefix is a fixed bytes that may optionally be included at the beginning to - # differentiate a leaf node from an inner node. prefix: bytes = betterproto.bytes_field(5) + """ + prefix is a fixed bytes that may optionally be included at the beginning to + differentiate a leaf node from an inner node. + """ @dataclass(eq=False, repr=False) @@ -157,16 +181,24 @@ class ProofSpec(betterproto.Message): not in code, rather a configuration object. """ - # any field in the ExistenceProof must be the same as in this spec. except - # Prefix, which is just the first bytes of prefix (spec can be longer) leaf_spec: "LeafOp" = betterproto.message_field(1) + """ + any field in the ExistenceProof must be the same as in this spec. except + Prefix, which is just the first bytes of prefix (spec can be longer) + """ + inner_spec: "InnerSpec" = betterproto.message_field(2) - # max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for - # fixed-depth tries) max_depth: int = betterproto.int32_field(3) - # min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for - # fixed-depth tries) + """ + max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for + fixed-depth tries) + """ + min_depth: int = betterproto.int32_field(4) + """ + min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for + fixed-depth tries) + """ @dataclass(eq=False, repr=False) @@ -178,17 +210,23 @@ class InnerSpec(betterproto.Message): InnerOp)isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) """ - # Child order is the ordering of the children node, must count from 0 iavl - # tree is [0, 1] (left then right) merk is [0, 2, 1] (left, right, here) child_order: List[int] = betterproto.int32_field(1) + """ + Child order is the ordering of the children node, must count from 0 iavl + tree is [0, 1] (left then right) merk is [0, 2, 1] (left, right, here) + """ + child_size: int = betterproto.int32_field(2) min_prefix_length: int = betterproto.int32_field(3) max_prefix_length: int = betterproto.int32_field(4) - # empty child is the prehash image that is used when one child is nil (eg. 20 - # bytes of 0) empty_child: bytes = betterproto.bytes_field(5) - # hash is the algorithm that must be used for each InnerOp + """ + empty child is the prehash image that is used when one child is nil (eg. 20 + bytes of 0) + """ + hash: "HashOp" = betterproto.enum_field(6) + """hash is the algorithm that must be used for each InnerOp""" @dataclass(eq=False, repr=False) @@ -227,8 +265,10 @@ class CompressedExistenceProof(betterproto.Message): key: bytes = betterproto.bytes_field(1) value: bytes = betterproto.bytes_field(2) leaf: "LeafOp" = betterproto.message_field(3) - # these are indexes into the lookup_inners table in CompressedBatchProof path: List[int] = betterproto.int32_field(4) + """ + these are indexes into the lookup_inners table in CompressedBatchProof + """ @dataclass(eq=False, repr=False) diff --git a/python/terra_proto/tendermint/abci/__init__.py b/python/terra_proto/tendermint/abci/__init__.py index a608dbe..a38cdbc 100644 --- a/python/terra_proto/tendermint/abci/__init__.py +++ b/python/terra_proto/tendermint/abci/__init__.py @@ -3,11 +3,27 @@ # plugin: python-betterproto from dataclasses import dataclass from datetime import datetime -from typing import Dict, List, Optional +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) import betterproto -from betterproto.grpc.grpclib_server import ServiceBase import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from .. import ( + crypto as _crypto__, + types as _types__, +) + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline class CheckTxType(betterproto.Enum): @@ -230,8 +246,9 @@ class ResponseSetOption(betterproto.Message): """nondeterministic""" code: int = betterproto.uint32_field(1) - # bytes data = 2; log: str = betterproto.string_field(3) + """bytes data = 2;""" + info: str = betterproto.string_field(4) @@ -245,8 +262,9 @@ class ResponseInitChain(betterproto.Message): @dataclass(eq=False, repr=False) class ResponseQuery(betterproto.Message): code: int = betterproto.uint32_field(1) - # bytes data = 2; // use "value" instead. log: str = betterproto.string_field(3) + """bytes data = 2; // use "value" instead.""" + info: str = betterproto.string_field(4) index: int = betterproto.int64_field(5) key: bytes = betterproto.bytes_field(6) @@ -294,8 +312,9 @@ class ResponseEndBlock(betterproto.Message): @dataclass(eq=False, repr=False) class ResponseCommit(betterproto.Message): - # reserve 1 data: bytes = betterproto.bytes_field(2) + """reserve 1""" + retain_height: int = betterproto.int64_field(3) @@ -338,10 +357,11 @@ class ConsensusParams(betterproto.Message): class BlockParams(betterproto.Message): """BlockParams contains limits on the block size.""" - # Note: must be greater than 0 max_bytes: int = betterproto.int64_field(1) - # Note: must be greater or equal to -1 + """Note: must be greater than 0""" + max_gas: int = betterproto.int64_field(2) + """Note: must be greater or equal to -1""" @dataclass(eq=False, repr=False) @@ -389,8 +409,8 @@ class Validator(betterproto.Message): """Validator""" address: bytes = betterproto.bytes_field(1) - # PubKey pub_key = 2 [(gogoproto.nullable)=false]; power: int = betterproto.int64_field(3) + """PubKey pub_key = 2 [(gogoproto.nullable)=false];""" @dataclass(eq=False, repr=False) @@ -412,16 +432,21 @@ class VoteInfo(betterproto.Message): @dataclass(eq=False, repr=False) class Evidence(betterproto.Message): type: "EvidenceType" = betterproto.enum_field(1) - # The offending validator validator: "Validator" = betterproto.message_field(2) - # The height when the offense occurred + """The offending validator""" + height: int = betterproto.int64_field(3) - # The corresponding time where the offense occurred + """The height when the offense occurred""" + time: datetime = betterproto.message_field(4) - # Total voting power of the validator set in case the ABCI application does - # not store historical validators. - # https://github.com/tendermint/tendermint/issues/4581 + """The corresponding time where the offense occurred""" + total_voting_power: int = betterproto.int64_field(5) + """ + Total voting power of the validator set in case the ABCI application does + not store historical validators. + https://github.com/tendermint/tendermint/issues/4581 + """ @dataclass(eq=False, repr=False) @@ -434,438 +459,433 @@ class Snapshot(betterproto.Message): class AbciApplicationStub(betterproto.ServiceStub): - async def echo(self, *, message: str = "") -> "ResponseEcho": - - request = RequestEcho() - request.message = message - + async def echo( + self, + request_echo: "RequestEcho", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "ResponseEcho": return await self._unary_unary( - "/tendermint.abci.ABCIApplication/Echo", request, ResponseEcho + "/tendermint.abci.ABCIApplication/Echo", + request_echo, + ResponseEcho, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def flush(self) -> "ResponseFlush": - - request = RequestFlush() - + async def flush( + self, + request_flush: "RequestFlush", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "ResponseFlush": return await self._unary_unary( - "/tendermint.abci.ABCIApplication/Flush", request, ResponseFlush + "/tendermint.abci.ABCIApplication/Flush", + request_flush, + ResponseFlush, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def info( - self, *, version: str = "", block_version: int = 0, p2_p_version: int = 0 + self, + request_info: "RequestInfo", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "ResponseInfo": - - request = RequestInfo() - request.version = version - request.block_version = block_version - request.p2_p_version = p2_p_version - return await self._unary_unary( - "/tendermint.abci.ABCIApplication/Info", request, ResponseInfo + "/tendermint.abci.ABCIApplication/Info", + request_info, + ResponseInfo, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def set_option( - self, *, key: str = "", value: str = "" + self, + request_set_option: "RequestSetOption", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "ResponseSetOption": - - request = RequestSetOption() - request.key = key - request.value = value - return await self._unary_unary( - "/tendermint.abci.ABCIApplication/SetOption", request, ResponseSetOption + "/tendermint.abci.ABCIApplication/SetOption", + request_set_option, + ResponseSetOption, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def deliver_tx(self, *, tx: bytes = b"") -> "ResponseDeliverTx": - - request = RequestDeliverTx() - request.tx = tx - + async def deliver_tx( + self, + request_deliver_tx: "RequestDeliverTx", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "ResponseDeliverTx": return await self._unary_unary( - "/tendermint.abci.ABCIApplication/DeliverTx", request, ResponseDeliverTx + "/tendermint.abci.ABCIApplication/DeliverTx", + request_deliver_tx, + ResponseDeliverTx, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def check_tx( - self, *, tx: bytes = b"", type: "CheckTxType" = 0 + self, + request_check_tx: "RequestCheckTx", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "ResponseCheckTx": - - request = RequestCheckTx() - request.tx = tx - request.type = type - return await self._unary_unary( - "/tendermint.abci.ABCIApplication/CheckTx", request, ResponseCheckTx + "/tendermint.abci.ABCIApplication/CheckTx", + request_check_tx, + ResponseCheckTx, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def query( - self, *, data: bytes = b"", path: str = "", height: int = 0, prove: bool = False + self, + request_query: "RequestQuery", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "ResponseQuery": - - request = RequestQuery() - request.data = data - request.path = path - request.height = height - request.prove = prove - return await self._unary_unary( - "/tendermint.abci.ABCIApplication/Query", request, ResponseQuery + "/tendermint.abci.ABCIApplication/Query", + request_query, + ResponseQuery, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def commit(self) -> "ResponseCommit": - - request = RequestCommit() - + async def commit( + self, + request_commit: "RequestCommit", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "ResponseCommit": return await self._unary_unary( - "/tendermint.abci.ABCIApplication/Commit", request, ResponseCommit + "/tendermint.abci.ABCIApplication/Commit", + request_commit, + ResponseCommit, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def init_chain( self, + request_init_chain: "RequestInitChain", *, - time: datetime = None, - chain_id: str = "", - consensus_params: "ConsensusParams" = None, - validators: Optional[List["ValidatorUpdate"]] = None, - app_state_bytes: bytes = b"", - initial_height: int = 0 + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "ResponseInitChain": - validators = validators or [] - - request = RequestInitChain() - if time is not None: - request.time = time - request.chain_id = chain_id - if consensus_params is not None: - request.consensus_params = consensus_params - if validators is not None: - request.validators = validators - request.app_state_bytes = app_state_bytes - request.initial_height = initial_height - return await self._unary_unary( - "/tendermint.abci.ABCIApplication/InitChain", request, ResponseInitChain + "/tendermint.abci.ABCIApplication/InitChain", + request_init_chain, + ResponseInitChain, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def begin_block( self, + request_begin_block: "RequestBeginBlock", *, - hash: bytes = b"", - header: "_types__.Header" = None, - last_commit_info: "LastCommitInfo" = None, - byzantine_validators: Optional[List["Evidence"]] = None + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "ResponseBeginBlock": - byzantine_validators = byzantine_validators or [] - - request = RequestBeginBlock() - request.hash = hash - if header is not None: - request.header = header - if last_commit_info is not None: - request.last_commit_info = last_commit_info - if byzantine_validators is not None: - request.byzantine_validators = byzantine_validators - return await self._unary_unary( - "/tendermint.abci.ABCIApplication/BeginBlock", request, ResponseBeginBlock + "/tendermint.abci.ABCIApplication/BeginBlock", + request_begin_block, + ResponseBeginBlock, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def end_block(self, *, height: int = 0) -> "ResponseEndBlock": - - request = RequestEndBlock() - request.height = height - + async def end_block( + self, + request_end_block: "RequestEndBlock", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "ResponseEndBlock": return await self._unary_unary( - "/tendermint.abci.ABCIApplication/EndBlock", request, ResponseEndBlock + "/tendermint.abci.ABCIApplication/EndBlock", + request_end_block, + ResponseEndBlock, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) - async def list_snapshots(self) -> "ResponseListSnapshots": - - request = RequestListSnapshots() - + async def list_snapshots( + self, + request_list_snapshots: "RequestListSnapshots", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "ResponseListSnapshots": return await self._unary_unary( "/tendermint.abci.ABCIApplication/ListSnapshots", - request, + request_list_snapshots, ResponseListSnapshots, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def offer_snapshot( - self, *, snapshot: "Snapshot" = None, app_hash: bytes = b"" + self, + request_offer_snapshot: "RequestOfferSnapshot", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "ResponseOfferSnapshot": - - request = RequestOfferSnapshot() - if snapshot is not None: - request.snapshot = snapshot - request.app_hash = app_hash - return await self._unary_unary( "/tendermint.abci.ABCIApplication/OfferSnapshot", - request, + request_offer_snapshot, ResponseOfferSnapshot, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def load_snapshot_chunk( - self, *, height: int = 0, format: int = 0, chunk: int = 0 + self, + request_load_snapshot_chunk: "RequestLoadSnapshotChunk", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "ResponseLoadSnapshotChunk": - - request = RequestLoadSnapshotChunk() - request.height = height - request.format = format - request.chunk = chunk - return await self._unary_unary( "/tendermint.abci.ABCIApplication/LoadSnapshotChunk", - request, + request_load_snapshot_chunk, ResponseLoadSnapshotChunk, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) async def apply_snapshot_chunk( - self, *, index: int = 0, chunk: bytes = b"", sender: str = "" + self, + request_apply_snapshot_chunk: "RequestApplySnapshotChunk", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None ) -> "ResponseApplySnapshotChunk": - - request = RequestApplySnapshotChunk() - request.index = index - request.chunk = chunk - request.sender = sender - return await self._unary_unary( "/tendermint.abci.ABCIApplication/ApplySnapshotChunk", - request, + request_apply_snapshot_chunk, ResponseApplySnapshotChunk, + timeout=timeout, + deadline=deadline, + metadata=metadata, ) class AbciApplicationBase(ServiceBase): - async def echo(self, message: str) -> "ResponseEcho": + async def echo(self, request_echo: "RequestEcho") -> "ResponseEcho": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def flush(self) -> "ResponseFlush": + async def flush(self, request_flush: "RequestFlush") -> "ResponseFlush": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def info( - self, version: str, block_version: int, p2_p_version: int - ) -> "ResponseInfo": + async def info(self, request_info: "RequestInfo") -> "ResponseInfo": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def set_option(self, key: str, value: str) -> "ResponseSetOption": + async def set_option( + self, request_set_option: "RequestSetOption" + ) -> "ResponseSetOption": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def deliver_tx(self, tx: bytes) -> "ResponseDeliverTx": + async def deliver_tx( + self, request_deliver_tx: "RequestDeliverTx" + ) -> "ResponseDeliverTx": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def check_tx(self, tx: bytes, type: "CheckTxType") -> "ResponseCheckTx": + async def check_tx(self, request_check_tx: "RequestCheckTx") -> "ResponseCheckTx": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def query( - self, data: bytes, path: str, height: int, prove: bool - ) -> "ResponseQuery": + async def query(self, request_query: "RequestQuery") -> "ResponseQuery": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def commit(self) -> "ResponseCommit": + async def commit(self, request_commit: "RequestCommit") -> "ResponseCommit": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def init_chain( - self, - time: datetime, - chain_id: str, - consensus_params: "ConsensusParams", - validators: Optional[List["ValidatorUpdate"]], - app_state_bytes: bytes, - initial_height: int, + self, request_init_chain: "RequestInitChain" ) -> "ResponseInitChain": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def begin_block( - self, - hash: bytes, - header: "_types__.Header", - last_commit_info: "LastCommitInfo", - byzantine_validators: Optional[List["Evidence"]], + self, request_begin_block: "RequestBeginBlock" ) -> "ResponseBeginBlock": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def end_block(self, height: int) -> "ResponseEndBlock": + async def end_block( + self, request_end_block: "RequestEndBlock" + ) -> "ResponseEndBlock": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def list_snapshots(self) -> "ResponseListSnapshots": + async def list_snapshots( + self, request_list_snapshots: "RequestListSnapshots" + ) -> "ResponseListSnapshots": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def offer_snapshot( - self, snapshot: "Snapshot", app_hash: bytes + self, request_offer_snapshot: "RequestOfferSnapshot" ) -> "ResponseOfferSnapshot": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def load_snapshot_chunk( - self, height: int, format: int, chunk: int + self, request_load_snapshot_chunk: "RequestLoadSnapshotChunk" ) -> "ResponseLoadSnapshotChunk": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) async def apply_snapshot_chunk( - self, index: int, chunk: bytes, sender: str + self, request_apply_snapshot_chunk: "RequestApplySnapshotChunk" ) -> "ResponseApplySnapshotChunk": raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) - async def __rpc_echo(self, stream: grpclib.server.Stream) -> None: + async def __rpc_echo( + self, stream: "grpclib.server.Stream[RequestEcho, ResponseEcho]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "message": request.message, - } - - response = await self.echo(**request_kwargs) + response = await self.echo(request) await stream.send_message(response) - async def __rpc_flush(self, stream: grpclib.server.Stream) -> None: + async def __rpc_flush( + self, stream: "grpclib.server.Stream[RequestFlush, ResponseFlush]" + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.flush(**request_kwargs) + response = await self.flush(request) await stream.send_message(response) - async def __rpc_info(self, stream: grpclib.server.Stream) -> None: + async def __rpc_info( + self, stream: "grpclib.server.Stream[RequestInfo, ResponseInfo]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "version": request.version, - "block_version": request.block_version, - "p2_p_version": request.p2_p_version, - } - - response = await self.info(**request_kwargs) + response = await self.info(request) await stream.send_message(response) - async def __rpc_set_option(self, stream: grpclib.server.Stream) -> None: + async def __rpc_set_option( + self, stream: "grpclib.server.Stream[RequestSetOption, ResponseSetOption]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "key": request.key, - "value": request.value, - } - - response = await self.set_option(**request_kwargs) + response = await self.set_option(request) await stream.send_message(response) - async def __rpc_deliver_tx(self, stream: grpclib.server.Stream) -> None: + async def __rpc_deliver_tx( + self, stream: "grpclib.server.Stream[RequestDeliverTx, ResponseDeliverTx]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "tx": request.tx, - } - - response = await self.deliver_tx(**request_kwargs) + response = await self.deliver_tx(request) await stream.send_message(response) - async def __rpc_check_tx(self, stream: grpclib.server.Stream) -> None: + async def __rpc_check_tx( + self, stream: "grpclib.server.Stream[RequestCheckTx, ResponseCheckTx]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "tx": request.tx, - "type": request.type, - } - - response = await self.check_tx(**request_kwargs) + response = await self.check_tx(request) await stream.send_message(response) - async def __rpc_query(self, stream: grpclib.server.Stream) -> None: + async def __rpc_query( + self, stream: "grpclib.server.Stream[RequestQuery, ResponseQuery]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "data": request.data, - "path": request.path, - "height": request.height, - "prove": request.prove, - } - - response = await self.query(**request_kwargs) + response = await self.query(request) await stream.send_message(response) - async def __rpc_commit(self, stream: grpclib.server.Stream) -> None: + async def __rpc_commit( + self, stream: "grpclib.server.Stream[RequestCommit, ResponseCommit]" + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.commit(**request_kwargs) + response = await self.commit(request) await stream.send_message(response) - async def __rpc_init_chain(self, stream: grpclib.server.Stream) -> None: + async def __rpc_init_chain( + self, stream: "grpclib.server.Stream[RequestInitChain, ResponseInitChain]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "time": request.time, - "chain_id": request.chain_id, - "consensus_params": request.consensus_params, - "validators": request.validators, - "app_state_bytes": request.app_state_bytes, - "initial_height": request.initial_height, - } - - response = await self.init_chain(**request_kwargs) + response = await self.init_chain(request) await stream.send_message(response) - async def __rpc_begin_block(self, stream: grpclib.server.Stream) -> None: + async def __rpc_begin_block( + self, stream: "grpclib.server.Stream[RequestBeginBlock, ResponseBeginBlock]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "hash": request.hash, - "header": request.header, - "last_commit_info": request.last_commit_info, - "byzantine_validators": request.byzantine_validators, - } - - response = await self.begin_block(**request_kwargs) + response = await self.begin_block(request) await stream.send_message(response) - async def __rpc_end_block(self, stream: grpclib.server.Stream) -> None: + async def __rpc_end_block( + self, stream: "grpclib.server.Stream[RequestEndBlock, ResponseEndBlock]" + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "height": request.height, - } - - response = await self.end_block(**request_kwargs) + response = await self.end_block(request) await stream.send_message(response) - async def __rpc_list_snapshots(self, stream: grpclib.server.Stream) -> None: + async def __rpc_list_snapshots( + self, + stream: "grpclib.server.Stream[RequestListSnapshots, ResponseListSnapshots]", + ) -> None: request = await stream.recv_message() - - request_kwargs = {} - - response = await self.list_snapshots(**request_kwargs) + response = await self.list_snapshots(request) await stream.send_message(response) - async def __rpc_offer_snapshot(self, stream: grpclib.server.Stream) -> None: + async def __rpc_offer_snapshot( + self, + stream: "grpclib.server.Stream[RequestOfferSnapshot, ResponseOfferSnapshot]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "snapshot": request.snapshot, - "app_hash": request.app_hash, - } - - response = await self.offer_snapshot(**request_kwargs) + response = await self.offer_snapshot(request) await stream.send_message(response) - async def __rpc_load_snapshot_chunk(self, stream: grpclib.server.Stream) -> None: + async def __rpc_load_snapshot_chunk( + self, + stream: "grpclib.server.Stream[RequestLoadSnapshotChunk, ResponseLoadSnapshotChunk]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "height": request.height, - "format": request.format, - "chunk": request.chunk, - } - - response = await self.load_snapshot_chunk(**request_kwargs) + response = await self.load_snapshot_chunk(request) await stream.send_message(response) - async def __rpc_apply_snapshot_chunk(self, stream: grpclib.server.Stream) -> None: + async def __rpc_apply_snapshot_chunk( + self, + stream: "grpclib.server.Stream[RequestApplySnapshotChunk, ResponseApplySnapshotChunk]", + ) -> None: request = await stream.recv_message() - - request_kwargs = { - "index": request.index, - "chunk": request.chunk, - "sender": request.sender, - } - - response = await self.apply_snapshot_chunk(**request_kwargs) + response = await self.apply_snapshot_chunk(request) await stream.send_message(response) def __mapping__(self) -> Dict[str, grpclib.const.Handler]: @@ -961,7 +981,3 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: ResponseApplySnapshotChunk, ), } - - -from .. import crypto as _crypto__ -from .. import types as _types__ diff --git a/python/terra_proto/tendermint/crypto/__init__.py b/python/terra_proto/tendermint/crypto/__init__.py index 5ca5a04..8fe73bd 100644 --- a/python/terra_proto/tendermint/crypto/__init__.py +++ b/python/terra_proto/tendermint/crypto/__init__.py @@ -5,7 +5,6 @@ from typing import List import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) @@ -18,10 +17,11 @@ class Proof(betterproto.Message): @dataclass(eq=False, repr=False) class ValueOp(betterproto.Message): - # Encoded in ProofOp.Key. key: bytes = betterproto.bytes_field(1) - # To encode in ProofOp.Data + """Encoded in ProofOp.Key.""" + proof: "Proof" = betterproto.message_field(2) + """To encode in ProofOp.Data""" @dataclass(eq=False, repr=False) diff --git a/python/terra_proto/tendermint/libs/bits/__init__.py b/python/terra_proto/tendermint/libs/bits/__init__.py index 4c6d572..7de6e15 100644 --- a/python/terra_proto/tendermint/libs/bits/__init__.py +++ b/python/terra_proto/tendermint/libs/bits/__init__.py @@ -5,7 +5,6 @@ from typing import List import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) diff --git a/python/terra_proto/tendermint/p2p/__init__.py b/python/terra_proto/tendermint/p2p/__init__.py index c03878d..bea424e 100644 --- a/python/terra_proto/tendermint/p2p/__init__.py +++ b/python/terra_proto/tendermint/p2p/__init__.py @@ -4,7 +4,6 @@ from dataclasses import dataclass import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) diff --git a/python/terra_proto/tendermint/types/__init__.py b/python/terra_proto/tendermint/types/__init__.py index eb604ac..798b681 100644 --- a/python/terra_proto/tendermint/types/__init__.py +++ b/python/terra_proto/tendermint/types/__init__.py @@ -3,11 +3,18 @@ # plugin: python-betterproto import builtins from dataclasses import dataclass -from datetime import datetime, timedelta +from datetime import ( + datetime, + timedelta, +) from typing import List import betterproto -from betterproto.grpc.grpclib_server import ServiceBase + +from .. import ( + crypto as _crypto__, + version as _version__, +) class BlockIdFlag(betterproto.Enum): @@ -23,11 +30,12 @@ class SignedMsgType(betterproto.Enum): """SignedMsgType is a type of signed message in the consensus.""" SIGNED_MSG_TYPE_UNKNOWN = 0 - # Votes SIGNED_MSG_TYPE_PREVOTE = 1 + """Votes""" + SIGNED_MSG_TYPE_PRECOMMIT = 2 - # Proposals SIGNED_MSG_TYPE_PROPOSAL = 32 + """Proposals""" @dataclass(eq=False, repr=False) @@ -78,24 +86,29 @@ class BlockId(betterproto.Message): class Header(betterproto.Message): """Header defines the structure of a Tendermint block header.""" - # basic block info version: "_version__.Consensus" = betterproto.message_field(1) + """basic block info""" + chain_id: str = betterproto.string_field(2) height: int = betterproto.int64_field(3) time: datetime = betterproto.message_field(4) - # prev block info last_block_id: "BlockId" = betterproto.message_field(5) - # hashes of block data + """prev block info""" + last_commit_hash: bytes = betterproto.bytes_field(6) + """hashes of block data""" + data_hash: bytes = betterproto.bytes_field(7) - # hashes from the app output from the prev block validators_hash: bytes = betterproto.bytes_field(8) + """hashes from the app output from the prev block""" + next_validators_hash: bytes = betterproto.bytes_field(9) consensus_hash: bytes = betterproto.bytes_field(10) app_hash: bytes = betterproto.bytes_field(11) last_results_hash: bytes = betterproto.bytes_field(12) - # consensus info evidence_hash: bytes = betterproto.bytes_field(13) + """consensus info""" + proposer_address: bytes = betterproto.bytes_field(14) @@ -103,10 +116,12 @@ class Header(betterproto.Message): class Data(betterproto.Message): """Data contains the set of transactions included in the block""" - # Txs that will be applied by state @ block.Height+1. NOTE: not all txs here - # are valid. We're just agreeing on the order first. This means that - # block.AppHash does not include these txs. txs: List[bytes] = betterproto.bytes_field(1) + """ + Txs that will be applied by state @ block.Height+1. NOTE: not all txs here + are valid. We're just agreeing on the order first. This means that + block.AppHash does not include these txs. + """ @dataclass(eq=False, repr=False) @@ -209,32 +224,44 @@ class ConsensusParams(betterproto.Message): class BlockParams(betterproto.Message): """BlockParams contains limits on the block size.""" - # Max block size, in bytes. Note: must be greater than 0 max_bytes: int = betterproto.int64_field(1) - # Max gas per block. Note: must be greater or equal to -1 + """Max block size, in bytes. Note: must be greater than 0""" + max_gas: int = betterproto.int64_field(2) - # Minimum time increment between consecutive blocks (in milliseconds) If the - # block header timestamp is ahead of the system clock, decrease this value. - # Not exposed to the application. + """Max gas per block. Note: must be greater or equal to -1""" + time_iota_ms: int = betterproto.int64_field(3) + """ + Minimum time increment between consecutive blocks (in milliseconds) If the + block header timestamp is ahead of the system clock, decrease this value. + Not exposed to the application. + """ @dataclass(eq=False, repr=False) class EvidenceParams(betterproto.Message): """EvidenceParams determine how we handle evidence of malfeasance.""" - # Max age of evidence, in blocks. The basic formula for calculating this is: - # MaxAgeDuration / {average block time}. max_age_num_blocks: int = betterproto.int64_field(1) - # Max age of evidence, in time. It should correspond with an app's "unbonding - # period" or other similar mechanism for handling [Nothing-At-Stake - # attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is- - # the-nothing-at-stake-problem-and-how-can-it-be-fixed). + """ + Max age of evidence, in blocks. The basic formula for calculating this is: + MaxAgeDuration / {average block time}. + """ + max_age_duration: timedelta = betterproto.message_field(2) - # This sets the maximum size of total evidence in bytes that can be committed - # in a single block. and should fall comfortably under the max block bytes. - # Default is 1048576 or 1MB + """ + Max age of evidence, in time. It should correspond with an app's "unbonding + period" or other similar mechanism for handling [Nothing-At-Stake + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is- + the-nothing-at-stake-problem-and-how-can-it-be-fixed). + """ + max_bytes: int = betterproto.int64_field(3) + """ + This sets the maximum size of total evidence in bytes that can be committed + in a single block. and should fall comfortably under the max block bytes. + Default is 1048576 or 1MB + """ @dataclass(eq=False, repr=False) @@ -314,7 +341,3 @@ class Block(betterproto.Message): data: "Data" = betterproto.message_field(2) evidence: "EvidenceList" = betterproto.message_field(3) last_commit: "Commit" = betterproto.message_field(4) - - -from .. import crypto as _crypto__ -from .. import version as _version__ diff --git a/python/terra_proto/tendermint/version/__init__.py b/python/terra_proto/tendermint/version/__init__.py index 47bce3c..d79d35d 100644 --- a/python/terra_proto/tendermint/version/__init__.py +++ b/python/terra_proto/tendermint/version/__init__.py @@ -4,7 +4,6 @@ from dataclasses import dataclass import betterproto -from betterproto.grpc.grpclib_server import ServiceBase @dataclass(eq=False, repr=False) diff --git a/python/terra_proto/cosmwasm/__init__.py b/python/terra_proto/terra/__init__.py similarity index 100% rename from python/terra_proto/cosmwasm/__init__.py rename to python/terra_proto/terra/__init__.py diff --git a/python/terra_proto/cosmwasm/wasm/__init__.py b/python/terra_proto/terra/market/__init__.py similarity index 100% rename from python/terra_proto/cosmwasm/wasm/__init__.py rename to python/terra_proto/terra/market/__init__.py diff --git a/python/terra_proto/terra/market/v1beta1/__init__.py b/python/terra_proto/terra/market/v1beta1/__init__.py new file mode 100644 index 0000000..721ef88 --- /dev/null +++ b/python/terra_proto/terra/market/v1beta1/__init__.py @@ -0,0 +1,331 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# sources: terra/market/v1beta1/genesis.proto, terra/market/v1beta1/market.proto, terra/market/v1beta1/query.proto, terra/market/v1beta1/tx.proto +# plugin: python-betterproto +from dataclasses import dataclass +from typing import ( + TYPE_CHECKING, + Dict, + Optional, +) + +import betterproto +import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ....cosmos.base import v1beta1 as ___cosmos_base_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline + + +@dataclass(eq=False, repr=False) +class MsgSwap(betterproto.Message): + """MsgSwap represents a message to swap coin to another denom.""" + + trader: str = betterproto.string_field(1) + offer_coin: "___cosmos_base_v1_beta1__.Coin" = betterproto.message_field(2) + ask_denom: str = betterproto.string_field(3) + + +@dataclass(eq=False, repr=False) +class MsgSwapResponse(betterproto.Message): + """MsgSwapResponse defines the Msg/Swap response type.""" + + swap_coin: "___cosmos_base_v1_beta1__.Coin" = betterproto.message_field(1) + swap_fee: "___cosmos_base_v1_beta1__.Coin" = betterproto.message_field(2) + + +@dataclass(eq=False, repr=False) +class MsgSwapSend(betterproto.Message): + """ + MsgSwapSend represents a message to swap coin and send all result coin to + recipient + """ + + from_address: str = betterproto.string_field(1) + to_address: str = betterproto.string_field(2) + offer_coin: "___cosmos_base_v1_beta1__.Coin" = betterproto.message_field(3) + ask_denom: str = betterproto.string_field(4) + + +@dataclass(eq=False, repr=False) +class MsgSwapSendResponse(betterproto.Message): + """MsgSwapSendResponse defines the Msg/SwapSend response type.""" + + swap_coin: "___cosmos_base_v1_beta1__.Coin" = betterproto.message_field(1) + swap_fee: "___cosmos_base_v1_beta1__.Coin" = betterproto.message_field(2) + + +@dataclass(eq=False, repr=False) +class Params(betterproto.Message): + """Params defines the parameters for the market module.""" + + base_pool: bytes = betterproto.bytes_field(1) + pool_recovery_period: int = betterproto.uint64_field(2) + min_stability_spread: bytes = betterproto.bytes_field(3) + + +@dataclass(eq=False, repr=False) +class QuerySwapRequest(betterproto.Message): + """QuerySwapRequest is the request type for the Query/Swap RPC method.""" + + offer_coin: str = betterproto.string_field(1) + """offer_coin defines the coin being offered (i.e. 1000000uluna)""" + + ask_denom: str = betterproto.string_field(2) + """ask_denom defines the denom of the coin to swap to""" + + +@dataclass(eq=False, repr=False) +class QuerySwapResponse(betterproto.Message): + """ + QuerySwapResponse is the response type for the Query/Swap RPC method. + """ + + return_coin: "___cosmos_base_v1_beta1__.Coin" = betterproto.message_field(1) + """ + return_coin defines the coin returned as a result of the swap simulation. + """ + + +@dataclass(eq=False, repr=False) +class QueryTerraPoolDeltaRequest(betterproto.Message): + """ + QueryTerraPoolDeltaRequest is the request type for the Query/TerraPoolDelta + RPC method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryTerraPoolDeltaResponse(betterproto.Message): + """ + QueryTerraPoolDeltaResponse is the response type for the + Query/TerraPoolDelta RPC method. + """ + + terra_pool_delta: bytes = betterproto.bytes_field(1) + """ + terra_pool_delta defines the gap between the TerraPool and the + TerraBasePool + """ + + +@dataclass(eq=False, repr=False) +class QueryParamsRequest(betterproto.Message): + """ + QueryParamsRequest is the request type for the Query/Params RPC method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryParamsResponse(betterproto.Message): + """ + QueryParamsResponse is the response type for the Query/Params RPC method. + """ + + params: "Params" = betterproto.message_field(1) + """params defines the parameters of the module.""" + + +@dataclass(eq=False, repr=False) +class GenesisState(betterproto.Message): + """GenesisState defines the market module's genesis state.""" + + params: "Params" = betterproto.message_field(1) + """params defines all the paramaters of the module.""" + + terra_pool_delta: bytes = betterproto.bytes_field(2) + """the gap between the TerraPool and the BasePool""" + + +class MsgStub(betterproto.ServiceStub): + async def swap( + self, + msg_swap: "MsgSwap", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "MsgSwapResponse": + return await self._unary_unary( + "/terra.market.v1beta1.Msg/Swap", + msg_swap, + MsgSwapResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def swap_send( + self, + msg_swap_send: "MsgSwapSend", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "MsgSwapSendResponse": + return await self._unary_unary( + "/terra.market.v1beta1.Msg/SwapSend", + msg_swap_send, + MsgSwapSendResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + +class QueryStub(betterproto.ServiceStub): + async def swap( + self, + query_swap_request: "QuerySwapRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QuerySwapResponse": + return await self._unary_unary( + "/terra.market.v1beta1.Query/Swap", + query_swap_request, + QuerySwapResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def terra_pool_delta( + self, + query_terra_pool_delta_request: "QueryTerraPoolDeltaRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryTerraPoolDeltaResponse": + return await self._unary_unary( + "/terra.market.v1beta1.Query/TerraPoolDelta", + query_terra_pool_delta_request, + QueryTerraPoolDeltaResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def params( + self, + query_params_request: "QueryParamsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryParamsResponse": + return await self._unary_unary( + "/terra.market.v1beta1.Query/Params", + query_params_request, + QueryParamsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + +class MsgBase(ServiceBase): + async def swap(self, msg_swap: "MsgSwap") -> "MsgSwapResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def swap_send(self, msg_swap_send: "MsgSwapSend") -> "MsgSwapSendResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def __rpc_swap( + self, stream: "grpclib.server.Stream[MsgSwap, MsgSwapResponse]" + ) -> None: + request = await stream.recv_message() + response = await self.swap(request) + await stream.send_message(response) + + async def __rpc_swap_send( + self, stream: "grpclib.server.Stream[MsgSwapSend, MsgSwapSendResponse]" + ) -> None: + request = await stream.recv_message() + response = await self.swap_send(request) + await stream.send_message(response) + + def __mapping__(self) -> Dict[str, grpclib.const.Handler]: + return { + "/terra.market.v1beta1.Msg/Swap": grpclib.const.Handler( + self.__rpc_swap, + grpclib.const.Cardinality.UNARY_UNARY, + MsgSwap, + MsgSwapResponse, + ), + "/terra.market.v1beta1.Msg/SwapSend": grpclib.const.Handler( + self.__rpc_swap_send, + grpclib.const.Cardinality.UNARY_UNARY, + MsgSwapSend, + MsgSwapSendResponse, + ), + } + + +class QueryBase(ServiceBase): + async def swap(self, query_swap_request: "QuerySwapRequest") -> "QuerySwapResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def terra_pool_delta( + self, query_terra_pool_delta_request: "QueryTerraPoolDeltaRequest" + ) -> "QueryTerraPoolDeltaResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def params( + self, query_params_request: "QueryParamsRequest" + ) -> "QueryParamsResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def __rpc_swap( + self, stream: "grpclib.server.Stream[QuerySwapRequest, QuerySwapResponse]" + ) -> None: + request = await stream.recv_message() + response = await self.swap(request) + await stream.send_message(response) + + async def __rpc_terra_pool_delta( + self, + stream: "grpclib.server.Stream[QueryTerraPoolDeltaRequest, QueryTerraPoolDeltaResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.terra_pool_delta(request) + await stream.send_message(response) + + async def __rpc_params( + self, stream: "grpclib.server.Stream[QueryParamsRequest, QueryParamsResponse]" + ) -> None: + request = await stream.recv_message() + response = await self.params(request) + await stream.send_message(response) + + def __mapping__(self) -> Dict[str, grpclib.const.Handler]: + return { + "/terra.market.v1beta1.Query/Swap": grpclib.const.Handler( + self.__rpc_swap, + grpclib.const.Cardinality.UNARY_UNARY, + QuerySwapRequest, + QuerySwapResponse, + ), + "/terra.market.v1beta1.Query/TerraPoolDelta": grpclib.const.Handler( + self.__rpc_terra_pool_delta, + grpclib.const.Cardinality.UNARY_UNARY, + QueryTerraPoolDeltaRequest, + QueryTerraPoolDeltaResponse, + ), + "/terra.market.v1beta1.Query/Params": grpclib.const.Handler( + self.__rpc_params, + grpclib.const.Cardinality.UNARY_UNARY, + QueryParamsRequest, + QueryParamsResponse, + ), + } diff --git a/python/terra_proto/ibc/applications/fee/__init__.py b/python/terra_proto/terra/oracle/__init__.py similarity index 100% rename from python/terra_proto/ibc/applications/fee/__init__.py rename to python/terra_proto/terra/oracle/__init__.py diff --git a/python/terra_proto/terra/oracle/v1beta1/__init__.py b/python/terra_proto/terra/oracle/v1beta1/__init__.py new file mode 100644 index 0000000..4d4fada --- /dev/null +++ b/python/terra_proto/terra/oracle/v1beta1/__init__.py @@ -0,0 +1,1090 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# sources: terra/oracle/v1beta1/genesis.proto, terra/oracle/v1beta1/oracle.proto, terra/oracle/v1beta1/query.proto, terra/oracle/v1beta1/tx.proto +# plugin: python-betterproto +from dataclasses import dataclass +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) + +import betterproto +import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ....cosmos.base import v1beta1 as ___cosmos_base_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline + + +@dataclass(eq=False, repr=False) +class MsgAggregateExchangeRatePrevote(betterproto.Message): + """ + MsgAggregateExchangeRatePrevote represents a message to submit aggregate + exchange rate prevote. + """ + + hash: str = betterproto.string_field(1) + feeder: str = betterproto.string_field(2) + validator: str = betterproto.string_field(3) + + +@dataclass(eq=False, repr=False) +class MsgAggregateExchangeRatePrevoteResponse(betterproto.Message): + """ + MsgAggregateExchangeRatePrevoteResponse defines the + Msg/AggregateExchangeRatePrevote response type. + """ + + pass + + +@dataclass(eq=False, repr=False) +class MsgAggregateExchangeRateVote(betterproto.Message): + """ + MsgAggregateExchangeRateVote represents a message to submit aggregate + exchange rate vote. + """ + + salt: str = betterproto.string_field(1) + exchange_rates: str = betterproto.string_field(2) + feeder: str = betterproto.string_field(3) + validator: str = betterproto.string_field(4) + + +@dataclass(eq=False, repr=False) +class MsgAggregateExchangeRateVoteResponse(betterproto.Message): + """ + MsgAggregateExchangeRateVoteResponse defines the + Msg/AggregateExchangeRateVote response type. + """ + + pass + + +@dataclass(eq=False, repr=False) +class MsgDelegateFeedConsent(betterproto.Message): + """ + MsgDelegateFeedConsent represents a message to delegate oracle voting + rights to another address. + """ + + operator: str = betterproto.string_field(1) + delegate: str = betterproto.string_field(2) + + +@dataclass(eq=False, repr=False) +class MsgDelegateFeedConsentResponse(betterproto.Message): + """ + MsgDelegateFeedConsentResponse defines the Msg/DelegateFeedConsent response + type. + """ + + pass + + +@dataclass(eq=False, repr=False) +class Params(betterproto.Message): + """Params defines the parameters for the oracle module.""" + + vote_period: int = betterproto.uint64_field(1) + vote_threshold: str = betterproto.string_field(2) + reward_band: str = betterproto.string_field(3) + reward_distribution_window: int = betterproto.uint64_field(4) + whitelist: List["Denom"] = betterproto.message_field(5) + slash_fraction: str = betterproto.string_field(6) + slash_window: int = betterproto.uint64_field(7) + min_valid_per_window: str = betterproto.string_field(8) + + +@dataclass(eq=False, repr=False) +class Denom(betterproto.Message): + """Denom - the object to hold configurations of each denom""" + + name: str = betterproto.string_field(1) + tobin_tax: str = betterproto.string_field(2) + + +@dataclass(eq=False, repr=False) +class AggregateExchangeRatePrevote(betterproto.Message): + """ + struct for aggregate prevoting on the ExchangeRateVote. The purpose of + aggregate prevote is to hide vote exchange rates with hash which is + formatted as hex string in SHA256("{salt}:{exchange + rate}{denom},...,{exchange rate}{denom}:{voter}") + """ + + hash: str = betterproto.string_field(1) + voter: str = betterproto.string_field(2) + submit_block: int = betterproto.uint64_field(3) + + +@dataclass(eq=False, repr=False) +class AggregateExchangeRateVote(betterproto.Message): + """ + MsgAggregateExchangeRateVote - struct for voting on the exchange rates of + Luna denominated in various Terra assets. + """ + + exchange_rate_tuples: List["ExchangeRateTuple"] = betterproto.message_field(1) + voter: str = betterproto.string_field(2) + + +@dataclass(eq=False, repr=False) +class ExchangeRateTuple(betterproto.Message): + """ + ExchangeRateTuple - struct to store interpreted exchange rates data to + store + """ + + denom: str = betterproto.string_field(1) + exchange_rate: str = betterproto.string_field(2) + + +@dataclass(eq=False, repr=False) +class QueryExchangeRateRequest(betterproto.Message): + """ + QueryExchangeRateRequest is the request type for the Query/ExchangeRate RPC + method. + """ + + denom: str = betterproto.string_field(1) + """denom defines the denomination to query for.""" + + +@dataclass(eq=False, repr=False) +class QueryExchangeRateResponse(betterproto.Message): + """ + QueryExchangeRateResponse is response type for the Query/ExchangeRate RPC + method. + """ + + exchange_rate: str = betterproto.string_field(1) + """ + exchange_rate defines the exchange rate of Luna denominated in various + Terra + """ + + +@dataclass(eq=False, repr=False) +class QueryExchangeRatesRequest(betterproto.Message): + """ + QueryExchangeRatesRequest is the request type for the Query/ExchangeRates + RPC method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryExchangeRatesResponse(betterproto.Message): + """ + QueryExchangeRatesResponse is response type for the Query/ExchangeRates RPC + method. + """ + + exchange_rates: List[ + "___cosmos_base_v1_beta1__.DecCoin" + ] = betterproto.message_field(1) + """ + exchange_rates defines a list of the exchange rate for all whitelisted + denoms. + """ + + +@dataclass(eq=False, repr=False) +class QueryTobinTaxRequest(betterproto.Message): + """ + QueryTobinTaxRequest is the request type for the Query/TobinTax RPC method. + """ + + denom: str = betterproto.string_field(1) + """denom defines the denomination to query for.""" + + +@dataclass(eq=False, repr=False) +class QueryTobinTaxResponse(betterproto.Message): + """ + QueryTobinTaxResponse is response type for the Query/TobinTax RPC method. + """ + + tobin_tax: str = betterproto.string_field(1) + """tobin_taxe defines the tobin tax of a denom""" + + +@dataclass(eq=False, repr=False) +class QueryTobinTaxesRequest(betterproto.Message): + """ + QueryTobinTaxesRequest is the request type for the Query/TobinTaxes RPC + method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryTobinTaxesResponse(betterproto.Message): + """ + QueryTobinTaxesResponse is response type for the Query/TobinTaxes RPC + method. + """ + + tobin_taxes: List["Denom"] = betterproto.message_field(1) + """ + tobin_taxes defines a list of the tobin tax of all whitelisted denoms + """ + + +@dataclass(eq=False, repr=False) +class QueryActivesRequest(betterproto.Message): + """ + QueryActivesRequest is the request type for the Query/Actives RPC method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryActivesResponse(betterproto.Message): + """ + QueryActivesResponse is response type for the Query/Actives RPC method. + """ + + actives: List[str] = betterproto.string_field(1) + """ + actives defines a list of the denomination which oracle prices aggreed + upon. + """ + + +@dataclass(eq=False, repr=False) +class QueryVoteTargetsRequest(betterproto.Message): + """ + QueryVoteTargetsRequest is the request type for the Query/VoteTargets RPC + method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryVoteTargetsResponse(betterproto.Message): + """ + QueryVoteTargetsResponse is response type for the Query/VoteTargets RPC + method. + """ + + vote_targets: List[str] = betterproto.string_field(1) + """ + vote_targets defines a list of the denomination in which everyone should + vote in the current vote period. + """ + + +@dataclass(eq=False, repr=False) +class QueryFeederDelegationRequest(betterproto.Message): + """ + QueryFeederDelegationRequest is the request type for the + Query/FeederDelegation RPC method. + """ + + validator_addr: str = betterproto.string_field(1) + """validator defines the validator address to query for.""" + + +@dataclass(eq=False, repr=False) +class QueryFeederDelegationResponse(betterproto.Message): + """ + QueryFeederDelegationResponse is response type for the + Query/FeederDelegation RPC method. + """ + + feeder_addr: str = betterproto.string_field(1) + """feeder_addr defines the feeder delegation of a validator""" + + +@dataclass(eq=False, repr=False) +class QueryMissCounterRequest(betterproto.Message): + """ + QueryMissCounterRequest is the request type for the Query/MissCounter RPC + method. + """ + + validator_addr: str = betterproto.string_field(1) + """validator defines the validator address to query for.""" + + +@dataclass(eq=False, repr=False) +class QueryMissCounterResponse(betterproto.Message): + """ + QueryMissCounterResponse is response type for the Query/MissCounter RPC + method. + """ + + miss_counter: int = betterproto.uint64_field(1) + """miss_counter defines the oracle miss counter of a validator""" + + +@dataclass(eq=False, repr=False) +class QueryAggregatePrevoteRequest(betterproto.Message): + """ + QueryAggregatePrevoteRequest is the request type for the + Query/AggregatePrevote RPC method. + """ + + validator_addr: str = betterproto.string_field(1) + """validator defines the validator address to query for.""" + + +@dataclass(eq=False, repr=False) +class QueryAggregatePrevoteResponse(betterproto.Message): + """ + QueryAggregatePrevoteResponse is response type for the + Query/AggregatePrevote RPC method. + """ + + aggregate_prevote: "AggregateExchangeRatePrevote" = betterproto.message_field(1) + """ + aggregate_prevote defines oracle aggregate prevote submitted by a validator + in the current vote period + """ + + +@dataclass(eq=False, repr=False) +class QueryAggregatePrevotesRequest(betterproto.Message): + """ + QueryAggregatePrevotesRequest is the request type for the + Query/AggregatePrevotes RPC method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryAggregatePrevotesResponse(betterproto.Message): + """ + QueryAggregatePrevotesResponse is response type for the + Query/AggregatePrevotes RPC method. + """ + + aggregate_prevotes: List[ + "AggregateExchangeRatePrevote" + ] = betterproto.message_field(1) + """ + aggregate_prevotes defines all oracle aggregate prevotes submitted in the + current vote period + """ + + +@dataclass(eq=False, repr=False) +class QueryAggregateVoteRequest(betterproto.Message): + """ + QueryAggregateVoteRequest is the request type for the Query/AggregateVote + RPC method. + """ + + validator_addr: str = betterproto.string_field(1) + """validator defines the validator address to query for.""" + + +@dataclass(eq=False, repr=False) +class QueryAggregateVoteResponse(betterproto.Message): + """ + QueryAggregateVoteResponse is response type for the Query/AggregateVote RPC + method. + """ + + aggregate_vote: "AggregateExchangeRateVote" = betterproto.message_field(1) + """ + aggregate_vote defines oracle aggregate vote submitted by a validator in + the current vote period + """ + + +@dataclass(eq=False, repr=False) +class QueryAggregateVotesRequest(betterproto.Message): + """ + QueryAggregateVotesRequest is the request type for the Query/AggregateVotes + RPC method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryAggregateVotesResponse(betterproto.Message): + """ + QueryAggregateVotesResponse is response type for the Query/AggregateVotes + RPC method. + """ + + aggregate_votes: List["AggregateExchangeRateVote"] = betterproto.message_field(1) + """ + aggregate_votes defines all oracle aggregate votes submitted in the current + vote period + """ + + +@dataclass(eq=False, repr=False) +class QueryParamsRequest(betterproto.Message): + """ + QueryParamsRequest is the request type for the Query/Params RPC method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryParamsResponse(betterproto.Message): + """ + QueryParamsResponse is the response type for the Query/Params RPC method. + """ + + params: "Params" = betterproto.message_field(1) + """params defines the parameters of the module.""" + + +@dataclass(eq=False, repr=False) +class GenesisState(betterproto.Message): + """GenesisState defines the oracle module's genesis state.""" + + params: "Params" = betterproto.message_field(1) + feeder_delegations: List["FeederDelegation"] = betterproto.message_field(2) + exchange_rates: List["ExchangeRateTuple"] = betterproto.message_field(3) + miss_counters: List["MissCounter"] = betterproto.message_field(4) + aggregate_exchange_rate_prevotes: List[ + "AggregateExchangeRatePrevote" + ] = betterproto.message_field(5) + aggregate_exchange_rate_votes: List[ + "AggregateExchangeRateVote" + ] = betterproto.message_field(6) + tobin_taxes: List["TobinTax"] = betterproto.message_field(7) + + +@dataclass(eq=False, repr=False) +class FeederDelegation(betterproto.Message): + """ + FeederDelegation is the address for where oracle feeder authority are + delegated to. By default this struct is only used at genesis to feed in + default feeder addresses. + """ + + feeder_address: str = betterproto.string_field(1) + validator_address: str = betterproto.string_field(2) + + +@dataclass(eq=False, repr=False) +class MissCounter(betterproto.Message): + """ + MissCounter defines an miss counter and validator address pair used in + oracle module's genesis state + """ + + validator_address: str = betterproto.string_field(1) + miss_counter: int = betterproto.uint64_field(2) + + +@dataclass(eq=False, repr=False) +class TobinTax(betterproto.Message): + """ + TobinTax defines an denom and tobin_tax pair used in oracle module's + genesis state + """ + + denom: str = betterproto.string_field(1) + tobin_tax: str = betterproto.string_field(2) + + +class MsgStub(betterproto.ServiceStub): + async def aggregate_exchange_rate_prevote( + self, + msg_aggregate_exchange_rate_prevote: "MsgAggregateExchangeRatePrevote", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "MsgAggregateExchangeRatePrevoteResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Msg/AggregateExchangeRatePrevote", + msg_aggregate_exchange_rate_prevote, + MsgAggregateExchangeRatePrevoteResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def aggregate_exchange_rate_vote( + self, + msg_aggregate_exchange_rate_vote: "MsgAggregateExchangeRateVote", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "MsgAggregateExchangeRateVoteResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Msg/AggregateExchangeRateVote", + msg_aggregate_exchange_rate_vote, + MsgAggregateExchangeRateVoteResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def delegate_feed_consent( + self, + msg_delegate_feed_consent: "MsgDelegateFeedConsent", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "MsgDelegateFeedConsentResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Msg/DelegateFeedConsent", + msg_delegate_feed_consent, + MsgDelegateFeedConsentResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + +class QueryStub(betterproto.ServiceStub): + async def exchange_rate( + self, + query_exchange_rate_request: "QueryExchangeRateRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryExchangeRateResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Query/ExchangeRate", + query_exchange_rate_request, + QueryExchangeRateResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def exchange_rates( + self, + query_exchange_rates_request: "QueryExchangeRatesRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryExchangeRatesResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Query/ExchangeRates", + query_exchange_rates_request, + QueryExchangeRatesResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def tobin_tax( + self, + query_tobin_tax_request: "QueryTobinTaxRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryTobinTaxResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Query/TobinTax", + query_tobin_tax_request, + QueryTobinTaxResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def tobin_taxes( + self, + query_tobin_taxes_request: "QueryTobinTaxesRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryTobinTaxesResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Query/TobinTaxes", + query_tobin_taxes_request, + QueryTobinTaxesResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def actives( + self, + query_actives_request: "QueryActivesRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryActivesResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Query/Actives", + query_actives_request, + QueryActivesResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def vote_targets( + self, + query_vote_targets_request: "QueryVoteTargetsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryVoteTargetsResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Query/VoteTargets", + query_vote_targets_request, + QueryVoteTargetsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def feeder_delegation( + self, + query_feeder_delegation_request: "QueryFeederDelegationRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryFeederDelegationResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Query/FeederDelegation", + query_feeder_delegation_request, + QueryFeederDelegationResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def miss_counter( + self, + query_miss_counter_request: "QueryMissCounterRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryMissCounterResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Query/MissCounter", + query_miss_counter_request, + QueryMissCounterResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def aggregate_prevote( + self, + query_aggregate_prevote_request: "QueryAggregatePrevoteRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryAggregatePrevoteResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Query/AggregatePrevote", + query_aggregate_prevote_request, + QueryAggregatePrevoteResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def aggregate_prevotes( + self, + query_aggregate_prevotes_request: "QueryAggregatePrevotesRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryAggregatePrevotesResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Query/AggregatePrevotes", + query_aggregate_prevotes_request, + QueryAggregatePrevotesResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def aggregate_vote( + self, + query_aggregate_vote_request: "QueryAggregateVoteRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryAggregateVoteResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Query/AggregateVote", + query_aggregate_vote_request, + QueryAggregateVoteResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def aggregate_votes( + self, + query_aggregate_votes_request: "QueryAggregateVotesRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryAggregateVotesResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Query/AggregateVotes", + query_aggregate_votes_request, + QueryAggregateVotesResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def params( + self, + query_params_request: "QueryParamsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryParamsResponse": + return await self._unary_unary( + "/terra.oracle.v1beta1.Query/Params", + query_params_request, + QueryParamsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + +class MsgBase(ServiceBase): + async def aggregate_exchange_rate_prevote( + self, msg_aggregate_exchange_rate_prevote: "MsgAggregateExchangeRatePrevote" + ) -> "MsgAggregateExchangeRatePrevoteResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def aggregate_exchange_rate_vote( + self, msg_aggregate_exchange_rate_vote: "MsgAggregateExchangeRateVote" + ) -> "MsgAggregateExchangeRateVoteResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def delegate_feed_consent( + self, msg_delegate_feed_consent: "MsgDelegateFeedConsent" + ) -> "MsgDelegateFeedConsentResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def __rpc_aggregate_exchange_rate_prevote( + self, + stream: "grpclib.server.Stream[MsgAggregateExchangeRatePrevote, MsgAggregateExchangeRatePrevoteResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.aggregate_exchange_rate_prevote(request) + await stream.send_message(response) + + async def __rpc_aggregate_exchange_rate_vote( + self, + stream: "grpclib.server.Stream[MsgAggregateExchangeRateVote, MsgAggregateExchangeRateVoteResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.aggregate_exchange_rate_vote(request) + await stream.send_message(response) + + async def __rpc_delegate_feed_consent( + self, + stream: "grpclib.server.Stream[MsgDelegateFeedConsent, MsgDelegateFeedConsentResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.delegate_feed_consent(request) + await stream.send_message(response) + + def __mapping__(self) -> Dict[str, grpclib.const.Handler]: + return { + "/terra.oracle.v1beta1.Msg/AggregateExchangeRatePrevote": grpclib.const.Handler( + self.__rpc_aggregate_exchange_rate_prevote, + grpclib.const.Cardinality.UNARY_UNARY, + MsgAggregateExchangeRatePrevote, + MsgAggregateExchangeRatePrevoteResponse, + ), + "/terra.oracle.v1beta1.Msg/AggregateExchangeRateVote": grpclib.const.Handler( + self.__rpc_aggregate_exchange_rate_vote, + grpclib.const.Cardinality.UNARY_UNARY, + MsgAggregateExchangeRateVote, + MsgAggregateExchangeRateVoteResponse, + ), + "/terra.oracle.v1beta1.Msg/DelegateFeedConsent": grpclib.const.Handler( + self.__rpc_delegate_feed_consent, + grpclib.const.Cardinality.UNARY_UNARY, + MsgDelegateFeedConsent, + MsgDelegateFeedConsentResponse, + ), + } + + +class QueryBase(ServiceBase): + async def exchange_rate( + self, query_exchange_rate_request: "QueryExchangeRateRequest" + ) -> "QueryExchangeRateResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def exchange_rates( + self, query_exchange_rates_request: "QueryExchangeRatesRequest" + ) -> "QueryExchangeRatesResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def tobin_tax( + self, query_tobin_tax_request: "QueryTobinTaxRequest" + ) -> "QueryTobinTaxResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def tobin_taxes( + self, query_tobin_taxes_request: "QueryTobinTaxesRequest" + ) -> "QueryTobinTaxesResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def actives( + self, query_actives_request: "QueryActivesRequest" + ) -> "QueryActivesResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def vote_targets( + self, query_vote_targets_request: "QueryVoteTargetsRequest" + ) -> "QueryVoteTargetsResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def feeder_delegation( + self, query_feeder_delegation_request: "QueryFeederDelegationRequest" + ) -> "QueryFeederDelegationResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def miss_counter( + self, query_miss_counter_request: "QueryMissCounterRequest" + ) -> "QueryMissCounterResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def aggregate_prevote( + self, query_aggregate_prevote_request: "QueryAggregatePrevoteRequest" + ) -> "QueryAggregatePrevoteResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def aggregate_prevotes( + self, query_aggregate_prevotes_request: "QueryAggregatePrevotesRequest" + ) -> "QueryAggregatePrevotesResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def aggregate_vote( + self, query_aggregate_vote_request: "QueryAggregateVoteRequest" + ) -> "QueryAggregateVoteResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def aggregate_votes( + self, query_aggregate_votes_request: "QueryAggregateVotesRequest" + ) -> "QueryAggregateVotesResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def params( + self, query_params_request: "QueryParamsRequest" + ) -> "QueryParamsResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def __rpc_exchange_rate( + self, + stream: "grpclib.server.Stream[QueryExchangeRateRequest, QueryExchangeRateResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.exchange_rate(request) + await stream.send_message(response) + + async def __rpc_exchange_rates( + self, + stream: "grpclib.server.Stream[QueryExchangeRatesRequest, QueryExchangeRatesResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.exchange_rates(request) + await stream.send_message(response) + + async def __rpc_tobin_tax( + self, + stream: "grpclib.server.Stream[QueryTobinTaxRequest, QueryTobinTaxResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.tobin_tax(request) + await stream.send_message(response) + + async def __rpc_tobin_taxes( + self, + stream: "grpclib.server.Stream[QueryTobinTaxesRequest, QueryTobinTaxesResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.tobin_taxes(request) + await stream.send_message(response) + + async def __rpc_actives( + self, stream: "grpclib.server.Stream[QueryActivesRequest, QueryActivesResponse]" + ) -> None: + request = await stream.recv_message() + response = await self.actives(request) + await stream.send_message(response) + + async def __rpc_vote_targets( + self, + stream: "grpclib.server.Stream[QueryVoteTargetsRequest, QueryVoteTargetsResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.vote_targets(request) + await stream.send_message(response) + + async def __rpc_feeder_delegation( + self, + stream: "grpclib.server.Stream[QueryFeederDelegationRequest, QueryFeederDelegationResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.feeder_delegation(request) + await stream.send_message(response) + + async def __rpc_miss_counter( + self, + stream: "grpclib.server.Stream[QueryMissCounterRequest, QueryMissCounterResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.miss_counter(request) + await stream.send_message(response) + + async def __rpc_aggregate_prevote( + self, + stream: "grpclib.server.Stream[QueryAggregatePrevoteRequest, QueryAggregatePrevoteResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.aggregate_prevote(request) + await stream.send_message(response) + + async def __rpc_aggregate_prevotes( + self, + stream: "grpclib.server.Stream[QueryAggregatePrevotesRequest, QueryAggregatePrevotesResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.aggregate_prevotes(request) + await stream.send_message(response) + + async def __rpc_aggregate_vote( + self, + stream: "grpclib.server.Stream[QueryAggregateVoteRequest, QueryAggregateVoteResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.aggregate_vote(request) + await stream.send_message(response) + + async def __rpc_aggregate_votes( + self, + stream: "grpclib.server.Stream[QueryAggregateVotesRequest, QueryAggregateVotesResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.aggregate_votes(request) + await stream.send_message(response) + + async def __rpc_params( + self, stream: "grpclib.server.Stream[QueryParamsRequest, QueryParamsResponse]" + ) -> None: + request = await stream.recv_message() + response = await self.params(request) + await stream.send_message(response) + + def __mapping__(self) -> Dict[str, grpclib.const.Handler]: + return { + "/terra.oracle.v1beta1.Query/ExchangeRate": grpclib.const.Handler( + self.__rpc_exchange_rate, + grpclib.const.Cardinality.UNARY_UNARY, + QueryExchangeRateRequest, + QueryExchangeRateResponse, + ), + "/terra.oracle.v1beta1.Query/ExchangeRates": grpclib.const.Handler( + self.__rpc_exchange_rates, + grpclib.const.Cardinality.UNARY_UNARY, + QueryExchangeRatesRequest, + QueryExchangeRatesResponse, + ), + "/terra.oracle.v1beta1.Query/TobinTax": grpclib.const.Handler( + self.__rpc_tobin_tax, + grpclib.const.Cardinality.UNARY_UNARY, + QueryTobinTaxRequest, + QueryTobinTaxResponse, + ), + "/terra.oracle.v1beta1.Query/TobinTaxes": grpclib.const.Handler( + self.__rpc_tobin_taxes, + grpclib.const.Cardinality.UNARY_UNARY, + QueryTobinTaxesRequest, + QueryTobinTaxesResponse, + ), + "/terra.oracle.v1beta1.Query/Actives": grpclib.const.Handler( + self.__rpc_actives, + grpclib.const.Cardinality.UNARY_UNARY, + QueryActivesRequest, + QueryActivesResponse, + ), + "/terra.oracle.v1beta1.Query/VoteTargets": grpclib.const.Handler( + self.__rpc_vote_targets, + grpclib.const.Cardinality.UNARY_UNARY, + QueryVoteTargetsRequest, + QueryVoteTargetsResponse, + ), + "/terra.oracle.v1beta1.Query/FeederDelegation": grpclib.const.Handler( + self.__rpc_feeder_delegation, + grpclib.const.Cardinality.UNARY_UNARY, + QueryFeederDelegationRequest, + QueryFeederDelegationResponse, + ), + "/terra.oracle.v1beta1.Query/MissCounter": grpclib.const.Handler( + self.__rpc_miss_counter, + grpclib.const.Cardinality.UNARY_UNARY, + QueryMissCounterRequest, + QueryMissCounterResponse, + ), + "/terra.oracle.v1beta1.Query/AggregatePrevote": grpclib.const.Handler( + self.__rpc_aggregate_prevote, + grpclib.const.Cardinality.UNARY_UNARY, + QueryAggregatePrevoteRequest, + QueryAggregatePrevoteResponse, + ), + "/terra.oracle.v1beta1.Query/AggregatePrevotes": grpclib.const.Handler( + self.__rpc_aggregate_prevotes, + grpclib.const.Cardinality.UNARY_UNARY, + QueryAggregatePrevotesRequest, + QueryAggregatePrevotesResponse, + ), + "/terra.oracle.v1beta1.Query/AggregateVote": grpclib.const.Handler( + self.__rpc_aggregate_vote, + grpclib.const.Cardinality.UNARY_UNARY, + QueryAggregateVoteRequest, + QueryAggregateVoteResponse, + ), + "/terra.oracle.v1beta1.Query/AggregateVotes": grpclib.const.Handler( + self.__rpc_aggregate_votes, + grpclib.const.Cardinality.UNARY_UNARY, + QueryAggregateVotesRequest, + QueryAggregateVotesResponse, + ), + "/terra.oracle.v1beta1.Query/Params": grpclib.const.Handler( + self.__rpc_params, + grpclib.const.Cardinality.UNARY_UNARY, + QueryParamsRequest, + QueryParamsResponse, + ), + } diff --git a/python/terra_proto/ibc/applications/interchain_accounts/__init__.py b/python/terra_proto/terra/treasury/__init__.py similarity index 100% rename from python/terra_proto/ibc/applications/interchain_accounts/__init__.py rename to python/terra_proto/terra/treasury/__init__.py diff --git a/python/terra_proto/terra/treasury/v1beta1/__init__.py b/python/terra_proto/terra/treasury/v1beta1/__init__.py new file mode 100644 index 0000000..6b06a86 --- /dev/null +++ b/python/terra_proto/terra/treasury/v1beta1/__init__.py @@ -0,0 +1,640 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# sources: terra/treasury/v1beta1/genesis.proto, terra/treasury/v1beta1/gov.proto, terra/treasury/v1beta1/query.proto, terra/treasury/v1beta1/treasury.proto +# plugin: python-betterproto +from dataclasses import dataclass +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) + +import betterproto +import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ....cosmos.base import v1beta1 as ___cosmos_base_v1_beta1__ +from ....cosmos.base.query import v1beta1 as ___cosmos_base_query_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline + + +@dataclass(eq=False, repr=False) +class AddBurnTaxExemptionAddressProposal(betterproto.Message): + """proposal request structure for adding burn tax exemption address(es)""" + + title: str = betterproto.string_field(1) + description: str = betterproto.string_field(2) + addresses: List[str] = betterproto.string_field(3) + + +@dataclass(eq=False, repr=False) +class RemoveBurnTaxExemptionAddressProposal(betterproto.Message): + """ + proposal request structure for removing burn tax exemption address(es) + """ + + title: str = betterproto.string_field(1) + description: str = betterproto.string_field(2) + addresses: List[str] = betterproto.string_field(3) + + +@dataclass(eq=False, repr=False) +class Params(betterproto.Message): + """Params defines the parameters for the oracle module.""" + + tax_policy: "PolicyConstraints" = betterproto.message_field(1) + reward_policy: "PolicyConstraints" = betterproto.message_field(2) + seigniorage_burden_target: str = betterproto.string_field(3) + mining_increment: str = betterproto.string_field(4) + window_short: int = betterproto.uint64_field(5) + window_long: int = betterproto.uint64_field(6) + window_probation: int = betterproto.uint64_field(7) + burn_tax_split: str = betterproto.string_field(8) + + +@dataclass(eq=False, repr=False) +class PolicyConstraints(betterproto.Message): + """ + PolicyConstraints - defines policy constraints can be applied in tax & + reward policies + """ + + rate_min: str = betterproto.string_field(1) + rate_max: str = betterproto.string_field(2) + cap: "___cosmos_base_v1_beta1__.Coin" = betterproto.message_field(3) + change_rate_max: str = betterproto.string_field(4) + + +@dataclass(eq=False, repr=False) +class EpochTaxProceeds(betterproto.Message): + """ + EpochTaxProceeds represents the tax amount collected at the current epoch + """ + + tax_proceeds: List["___cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(1) + + +@dataclass(eq=False, repr=False) +class EpochInitialIssuance(betterproto.Message): + """ + EpochInitialIssuance represents initial issuance of the currrent epoch + """ + + issuance: List["___cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(1) + + +@dataclass(eq=False, repr=False) +class QueryTaxRateRequest(betterproto.Message): + """ + QueryTaxRateRequest is the request type for the Query/TaxRate RPC method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryTaxRateResponse(betterproto.Message): + """ + QueryTaxRateResponse is response type for the Query/TaxRate RPC method. + """ + + tax_rate: str = betterproto.string_field(1) + + +@dataclass(eq=False, repr=False) +class QueryTaxCapRequest(betterproto.Message): + """ + QueryTaxCapRequest is the request type for the Query/TaxCap RPC method. + """ + + denom: str = betterproto.string_field(1) + """denom defines the denomination to query for.""" + + +@dataclass(eq=False, repr=False) +class QueryTaxCapResponse(betterproto.Message): + """ + QueryTaxCapResponse is response type for the Query/TaxCap RPC method. + """ + + tax_cap: str = betterproto.string_field(1) + + +@dataclass(eq=False, repr=False) +class QueryTaxCapsRequest(betterproto.Message): + """ + QueryTaxCapsRequest is the request type for the Query/TaxCaps RPC method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryTaxCapsResponseItem(betterproto.Message): + """ + QueryTaxCapsResponseItem is response item type for the Query/TaxCaps RPC + method. + """ + + denom: str = betterproto.string_field(1) + tax_cap: str = betterproto.string_field(2) + + +@dataclass(eq=False, repr=False) +class QueryTaxCapsResponse(betterproto.Message): + """ + QueryTaxCapsResponse is response type for the Query/TaxCaps RPC method. + """ + + tax_caps: List["QueryTaxCapsResponseItem"] = betterproto.message_field(1) + + +@dataclass(eq=False, repr=False) +class QueryRewardWeightRequest(betterproto.Message): + """ + QueryRewardWeightRequest is the request type for the Query/RewardWeight RPC + method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryRewardWeightResponse(betterproto.Message): + """ + QueryRewardWeightResponse is response type for the Query/RewardWeight RPC + method. + """ + + reward_weight: str = betterproto.string_field(1) + + +@dataclass(eq=False, repr=False) +class QueryTaxProceedsRequest(betterproto.Message): + """ + QueryTaxProceedsRequest is the request type for the Query/TaxProceeds RPC + method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryTaxProceedsResponse(betterproto.Message): + """ + QueryTaxProceedsResponse is response type for the Query/TaxProceeds RPC + method. + """ + + tax_proceeds: List["___cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(1) + + +@dataclass(eq=False, repr=False) +class QuerySeigniorageProceedsRequest(betterproto.Message): + """ + QuerySeigniorageProceedsRequest is the request type for the + Query/SeigniorageProceeds RPC method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QuerySeigniorageProceedsResponse(betterproto.Message): + """ + QuerySeigniorageProceedsResponse is response type for the + Query/SeigniorageProceeds RPC method. + """ + + seigniorage_proceeds: str = betterproto.string_field(1) + + +@dataclass(eq=False, repr=False) +class QueryIndicatorsRequest(betterproto.Message): + """ + QueryIndicatorsRequest is the request type for the Query/Indicators RPC + method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryIndicatorsResponse(betterproto.Message): + """ + QueryIndicatorsResponse is response type for the Query/Indicators RPC + method. + """ + + trl_year: str = betterproto.string_field(1) + trl_month: str = betterproto.string_field(2) + + +@dataclass(eq=False, repr=False) +class QueryParamsRequest(betterproto.Message): + """ + QueryParamsRequest is the request type for the Query/Params RPC method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryParamsResponse(betterproto.Message): + """ + QueryParamsResponse is the response type for the Query/Params RPC method. + """ + + params: "Params" = betterproto.message_field(1) + """params defines the parameters of the module.""" + + +@dataclass(eq=False, repr=False) +class QueryBurnTaxExemptionListRequest(betterproto.Message): + """ + QueryBurnTaxExemptionListRequest is the request type for the + Query/BurnTaxExemptionList RPC method. + """ + + pagination: "___cosmos_base_query_v1_beta1__.PageRequest" = ( + betterproto.message_field(2) + ) + + +@dataclass(eq=False, repr=False) +class QueryBurnTaxExemptionListResponse(betterproto.Message): + """ + QueryBurnTaxExemptionListResponse is response type for the + Query/BurnTaxExemptionList RPC method. + """ + + addresses: List[str] = betterproto.string_field(1) + pagination: "___cosmos_base_query_v1_beta1__.PageResponse" = ( + betterproto.message_field(2) + ) + + +@dataclass(eq=False, repr=False) +class GenesisState(betterproto.Message): + """GenesisState defines the oracle module's genesis state.""" + + params: "Params" = betterproto.message_field(1) + tax_rate: str = betterproto.string_field(2) + reward_weight: str = betterproto.string_field(3) + tax_caps: List["TaxCap"] = betterproto.message_field(4) + tax_proceeds: List["___cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(5) + epoch_initial_issuance: List[ + "___cosmos_base_v1_beta1__.Coin" + ] = betterproto.message_field(6) + epoch_states: List["EpochState"] = betterproto.message_field(7) + + +@dataclass(eq=False, repr=False) +class TaxCap(betterproto.Message): + """TaxCap is the max tax amount can be charged for the given denom""" + + denom: str = betterproto.string_field(1) + tax_cap: str = betterproto.string_field(2) + + +@dataclass(eq=False, repr=False) +class EpochState(betterproto.Message): + """EpochState is the record for each epoch state""" + + epoch: int = betterproto.uint64_field(1) + tax_reward: str = betterproto.string_field(2) + seigniorage_reward: str = betterproto.string_field(3) + total_staked_luna: str = betterproto.string_field(4) + + +class QueryStub(betterproto.ServiceStub): + async def tax_rate( + self, + query_tax_rate_request: "QueryTaxRateRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryTaxRateResponse": + return await self._unary_unary( + "/terra.treasury.v1beta1.Query/TaxRate", + query_tax_rate_request, + QueryTaxRateResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def tax_cap( + self, + query_tax_cap_request: "QueryTaxCapRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryTaxCapResponse": + return await self._unary_unary( + "/terra.treasury.v1beta1.Query/TaxCap", + query_tax_cap_request, + QueryTaxCapResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def tax_caps( + self, + query_tax_caps_request: "QueryTaxCapsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryTaxCapsResponse": + return await self._unary_unary( + "/terra.treasury.v1beta1.Query/TaxCaps", + query_tax_caps_request, + QueryTaxCapsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def reward_weight( + self, + query_reward_weight_request: "QueryRewardWeightRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryRewardWeightResponse": + return await self._unary_unary( + "/terra.treasury.v1beta1.Query/RewardWeight", + query_reward_weight_request, + QueryRewardWeightResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def seigniorage_proceeds( + self, + query_seigniorage_proceeds_request: "QuerySeigniorageProceedsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QuerySeigniorageProceedsResponse": + return await self._unary_unary( + "/terra.treasury.v1beta1.Query/SeigniorageProceeds", + query_seigniorage_proceeds_request, + QuerySeigniorageProceedsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def tax_proceeds( + self, + query_tax_proceeds_request: "QueryTaxProceedsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryTaxProceedsResponse": + return await self._unary_unary( + "/terra.treasury.v1beta1.Query/TaxProceeds", + query_tax_proceeds_request, + QueryTaxProceedsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def indicators( + self, + query_indicators_request: "QueryIndicatorsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryIndicatorsResponse": + return await self._unary_unary( + "/terra.treasury.v1beta1.Query/Indicators", + query_indicators_request, + QueryIndicatorsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def burn_tax_exemption_list( + self, + query_burn_tax_exemption_list_request: "QueryBurnTaxExemptionListRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryBurnTaxExemptionListResponse": + return await self._unary_unary( + "/terra.treasury.v1beta1.Query/BurnTaxExemptionList", + query_burn_tax_exemption_list_request, + QueryBurnTaxExemptionListResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def params( + self, + query_params_request: "QueryParamsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryParamsResponse": + return await self._unary_unary( + "/terra.treasury.v1beta1.Query/Params", + query_params_request, + QueryParamsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + +class QueryBase(ServiceBase): + async def tax_rate( + self, query_tax_rate_request: "QueryTaxRateRequest" + ) -> "QueryTaxRateResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def tax_cap( + self, query_tax_cap_request: "QueryTaxCapRequest" + ) -> "QueryTaxCapResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def tax_caps( + self, query_tax_caps_request: "QueryTaxCapsRequest" + ) -> "QueryTaxCapsResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def reward_weight( + self, query_reward_weight_request: "QueryRewardWeightRequest" + ) -> "QueryRewardWeightResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def seigniorage_proceeds( + self, query_seigniorage_proceeds_request: "QuerySeigniorageProceedsRequest" + ) -> "QuerySeigniorageProceedsResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def tax_proceeds( + self, query_tax_proceeds_request: "QueryTaxProceedsRequest" + ) -> "QueryTaxProceedsResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def indicators( + self, query_indicators_request: "QueryIndicatorsRequest" + ) -> "QueryIndicatorsResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def burn_tax_exemption_list( + self, query_burn_tax_exemption_list_request: "QueryBurnTaxExemptionListRequest" + ) -> "QueryBurnTaxExemptionListResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def params( + self, query_params_request: "QueryParamsRequest" + ) -> "QueryParamsResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def __rpc_tax_rate( + self, stream: "grpclib.server.Stream[QueryTaxRateRequest, QueryTaxRateResponse]" + ) -> None: + request = await stream.recv_message() + response = await self.tax_rate(request) + await stream.send_message(response) + + async def __rpc_tax_cap( + self, stream: "grpclib.server.Stream[QueryTaxCapRequest, QueryTaxCapResponse]" + ) -> None: + request = await stream.recv_message() + response = await self.tax_cap(request) + await stream.send_message(response) + + async def __rpc_tax_caps( + self, stream: "grpclib.server.Stream[QueryTaxCapsRequest, QueryTaxCapsResponse]" + ) -> None: + request = await stream.recv_message() + response = await self.tax_caps(request) + await stream.send_message(response) + + async def __rpc_reward_weight( + self, + stream: "grpclib.server.Stream[QueryRewardWeightRequest, QueryRewardWeightResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.reward_weight(request) + await stream.send_message(response) + + async def __rpc_seigniorage_proceeds( + self, + stream: "grpclib.server.Stream[QuerySeigniorageProceedsRequest, QuerySeigniorageProceedsResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.seigniorage_proceeds(request) + await stream.send_message(response) + + async def __rpc_tax_proceeds( + self, + stream: "grpclib.server.Stream[QueryTaxProceedsRequest, QueryTaxProceedsResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.tax_proceeds(request) + await stream.send_message(response) + + async def __rpc_indicators( + self, + stream: "grpclib.server.Stream[QueryIndicatorsRequest, QueryIndicatorsResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.indicators(request) + await stream.send_message(response) + + async def __rpc_burn_tax_exemption_list( + self, + stream: "grpclib.server.Stream[QueryBurnTaxExemptionListRequest, QueryBurnTaxExemptionListResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.burn_tax_exemption_list(request) + await stream.send_message(response) + + async def __rpc_params( + self, stream: "grpclib.server.Stream[QueryParamsRequest, QueryParamsResponse]" + ) -> None: + request = await stream.recv_message() + response = await self.params(request) + await stream.send_message(response) + + def __mapping__(self) -> Dict[str, grpclib.const.Handler]: + return { + "/terra.treasury.v1beta1.Query/TaxRate": grpclib.const.Handler( + self.__rpc_tax_rate, + grpclib.const.Cardinality.UNARY_UNARY, + QueryTaxRateRequest, + QueryTaxRateResponse, + ), + "/terra.treasury.v1beta1.Query/TaxCap": grpclib.const.Handler( + self.__rpc_tax_cap, + grpclib.const.Cardinality.UNARY_UNARY, + QueryTaxCapRequest, + QueryTaxCapResponse, + ), + "/terra.treasury.v1beta1.Query/TaxCaps": grpclib.const.Handler( + self.__rpc_tax_caps, + grpclib.const.Cardinality.UNARY_UNARY, + QueryTaxCapsRequest, + QueryTaxCapsResponse, + ), + "/terra.treasury.v1beta1.Query/RewardWeight": grpclib.const.Handler( + self.__rpc_reward_weight, + grpclib.const.Cardinality.UNARY_UNARY, + QueryRewardWeightRequest, + QueryRewardWeightResponse, + ), + "/terra.treasury.v1beta1.Query/SeigniorageProceeds": grpclib.const.Handler( + self.__rpc_seigniorage_proceeds, + grpclib.const.Cardinality.UNARY_UNARY, + QuerySeigniorageProceedsRequest, + QuerySeigniorageProceedsResponse, + ), + "/terra.treasury.v1beta1.Query/TaxProceeds": grpclib.const.Handler( + self.__rpc_tax_proceeds, + grpclib.const.Cardinality.UNARY_UNARY, + QueryTaxProceedsRequest, + QueryTaxProceedsResponse, + ), + "/terra.treasury.v1beta1.Query/Indicators": grpclib.const.Handler( + self.__rpc_indicators, + grpclib.const.Cardinality.UNARY_UNARY, + QueryIndicatorsRequest, + QueryIndicatorsResponse, + ), + "/terra.treasury.v1beta1.Query/BurnTaxExemptionList": grpclib.const.Handler( + self.__rpc_burn_tax_exemption_list, + grpclib.const.Cardinality.UNARY_UNARY, + QueryBurnTaxExemptionListRequest, + QueryBurnTaxExemptionListResponse, + ), + "/terra.treasury.v1beta1.Query/Params": grpclib.const.Handler( + self.__rpc_params, + grpclib.const.Cardinality.UNARY_UNARY, + QueryParamsRequest, + QueryParamsResponse, + ), + } diff --git a/python/terra_proto/ibc/applications/interchain_accounts/controller/__init__.py b/python/terra_proto/terra/tx/__init__.py similarity index 100% rename from python/terra_proto/ibc/applications/interchain_accounts/controller/__init__.py rename to python/terra_proto/terra/tx/__init__.py diff --git a/python/terra_proto/terra/tx/v1beta1/__init__.py b/python/terra_proto/terra/tx/v1beta1/__init__.py new file mode 100644 index 0000000..90b09f0 --- /dev/null +++ b/python/terra_proto/terra/tx/v1beta1/__init__.py @@ -0,0 +1,99 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# sources: terra/tx/v1beta1/service.proto +# plugin: python-betterproto +import warnings +from dataclasses import dataclass +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) + +import betterproto +import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ....cosmos.base import v1beta1 as ___cosmos_base_v1_beta1__ +from ....cosmos.tx import v1beta1 as ___cosmos_tx_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline + + +@dataclass(eq=False, repr=False) +class ComputeTaxRequest(betterproto.Message): + """ + ComputeTaxRequest is the request type for the Service.ComputeTax RPC + method. + """ + + tx: "___cosmos_tx_v1_beta1__.Tx" = betterproto.message_field(1) + """ + tx is the transaction to simulate. Deprecated. Send raw tx bytes instead. + """ + + tx_bytes: bytes = betterproto.bytes_field(2) + """tx_bytes is the raw transaction.""" + + def __post_init__(self) -> None: + super().__post_init__() + if self.is_set("tx"): + warnings.warn("ComputeTaxRequest.tx is deprecated", DeprecationWarning) + + +@dataclass(eq=False, repr=False) +class ComputeTaxResponse(betterproto.Message): + """ + ComputeTaxResponse is the response type for the Service.ComputeTax RPC + method. + """ + + tax_amount: List["___cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(1) + """amount is the amount of coins to be paid as a fee""" + + +class ServiceStub(betterproto.ServiceStub): + async def compute_tax( + self, + compute_tax_request: "ComputeTaxRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "ComputeTaxResponse": + return await self._unary_unary( + "/terra.tx.v1beta1.Service/ComputeTax", + compute_tax_request, + ComputeTaxResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + +class ServiceBase(ServiceBase): + async def compute_tax( + self, compute_tax_request: "ComputeTaxRequest" + ) -> "ComputeTaxResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def __rpc_compute_tax( + self, stream: "grpclib.server.Stream[ComputeTaxRequest, ComputeTaxResponse]" + ) -> None: + request = await stream.recv_message() + response = await self.compute_tax(request) + await stream.send_message(response) + + def __mapping__(self) -> Dict[str, grpclib.const.Handler]: + return { + "/terra.tx.v1beta1.Service/ComputeTax": grpclib.const.Handler( + self.__rpc_compute_tax, + grpclib.const.Cardinality.UNARY_UNARY, + ComputeTaxRequest, + ComputeTaxResponse, + ), + } diff --git a/python/terra_proto/ibc/applications/interchain_accounts/host/__init__.py b/python/terra_proto/terra/vesting/__init__.py similarity index 100% rename from python/terra_proto/ibc/applications/interchain_accounts/host/__init__.py rename to python/terra_proto/terra/vesting/__init__.py diff --git a/python/terra_proto/terra/vesting/v1beta1/__init__.py b/python/terra_proto/terra/vesting/v1beta1/__init__.py new file mode 100644 index 0000000..08235ed --- /dev/null +++ b/python/terra_proto/terra/vesting/v1beta1/__init__.py @@ -0,0 +1,39 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# sources: terra/vesting/v1beta1/vesting.proto +# plugin: python-betterproto +from dataclasses import dataclass +from typing import List + +import betterproto + +from ....cosmos.vesting import v1beta1 as ___cosmos_vesting_v1_beta1__ + + +@dataclass(eq=False, repr=False) +class LazyGradedVestingAccount(betterproto.Message): + """ + LazyGradedVestingAccount implements the LazyGradedVestingAccount interface. + It vests all coins according to a predefined schedule. + """ + + base_vesting_account: "___cosmos_vesting_v1_beta1__.BaseVestingAccount" = ( + betterproto.message_field(1) + ) + vesting_schedules: List["VestingSchedule"] = betterproto.message_field(2) + + +@dataclass(eq=False, repr=False) +class Schedule(betterproto.Message): + """Schedule - represent single schedule data for a vesting schedule""" + + start_time: int = betterproto.int64_field(1) + end_time: int = betterproto.int64_field(2) + ratio: str = betterproto.string_field(3) + + +@dataclass(eq=False, repr=False) +class VestingSchedule(betterproto.Message): + """VestingSchedule defines vesting schedule for a denom""" + + denom: str = betterproto.string_field(1) + schedules: List["Schedule"] = betterproto.message_field(2) diff --git a/python/terra_proto/terra/wasm/__init__.py b/python/terra_proto/terra/wasm/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/python/terra_proto/terra/wasm/v1beta1/__init__.py b/python/terra_proto/terra/wasm/v1beta1/__init__.py new file mode 100644 index 0000000..f582e6c --- /dev/null +++ b/python/terra_proto/terra/wasm/v1beta1/__init__.py @@ -0,0 +1,897 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# sources: terra/wasm/v1beta1/genesis.proto, terra/wasm/v1beta1/query.proto, terra/wasm/v1beta1/tx.proto, terra/wasm/v1beta1/wasm.proto +# plugin: python-betterproto +from dataclasses import dataclass +from typing import ( + TYPE_CHECKING, + Dict, + List, + Optional, +) + +import betterproto +import grpclib +from betterproto.grpc.grpclib_server import ServiceBase + +from ....cosmos.base import v1beta1 as ___cosmos_base_v1_beta1__ + + +if TYPE_CHECKING: + import grpclib.server + from betterproto.grpc.grpclib_client import MetadataLike + from grpclib.metadata import Deadline + + +@dataclass(eq=False, repr=False) +class MsgStoreCode(betterproto.Message): + """MsgStoreCode represents a message to submit Wasm code to the system""" + + sender: str = betterproto.string_field(1) + """Sender is the that actor that signed the messages""" + + wasm_byte_code: bytes = betterproto.bytes_field(2) + """WASMByteCode can be raw or gzip compressed""" + + +@dataclass(eq=False, repr=False) +class MsgStoreCodeResponse(betterproto.Message): + """MsgStoreCodeResponse defines the Msg/StoreCode response type.""" + + code_id: int = betterproto.uint64_field(1) + """CodeID is the reference to the stored WASM code""" + + +@dataclass(eq=False, repr=False) +class MsgMigrateCode(betterproto.Message): + """ + MsgMigrateCode represents a message to submit Wasm code to the system + """ + + code_id: int = betterproto.uint64_field(1) + """CodeID is the migration target code id""" + + sender: str = betterproto.string_field(2) + """Sender is the that actor that signed the messages""" + + wasm_byte_code: bytes = betterproto.bytes_field(3) + """WASMByteCode can be raw or gzip compressed""" + + +@dataclass(eq=False, repr=False) +class MsgMigrateCodeResponse(betterproto.Message): + """MsgMigrateCodeResponse defines the Msg/MigrateCode response type.""" + + pass + + +@dataclass(eq=False, repr=False) +class MsgInstantiateContract(betterproto.Message): + """ + MsgInstantiateContract represents a message to create a new smart contract + instance for the given code id. + """ + + sender: str = betterproto.string_field(1) + """Sender is an sender address""" + + admin: str = betterproto.string_field(2) + """Admin is an optional admin address who can migrate the contract""" + + code_id: int = betterproto.uint64_field(3) + """CodeID is the reference to the stored WASM code""" + + init_msg: bytes = betterproto.bytes_field(4) + """ + InitMsg json encoded message to be passed to the contract on instantiation + """ + + init_coins: List["___cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(5) + """InitCoins that are transferred to the contract on execution""" + + +@dataclass(eq=False, repr=False) +class MsgInstantiateContractResponse(betterproto.Message): + """ + MsgInstantiateContractResponse defines the Msg/InstantiateContract response + type. + """ + + contract_address: str = betterproto.string_field(1) + """ContractAddress is the bech32 address of the new contract instance.""" + + data: bytes = betterproto.bytes_field(2) + """Data contains base64-encoded bytes to returned from the contract""" + + +@dataclass(eq=False, repr=False) +class MsgExecuteContract(betterproto.Message): + """ + MsgExecuteContract represents a message to submits the given message data + to a smart contract. + """ + + sender: str = betterproto.string_field(1) + """Sender is the that actor that signed the messages""" + + contract: str = betterproto.string_field(2) + """Contract is the address of the smart contract""" + + execute_msg: bytes = betterproto.bytes_field(3) + """ExecuteMsg json encoded message to be passed to the contract""" + + coins: List["___cosmos_base_v1_beta1__.Coin"] = betterproto.message_field(5) + """Coins that are transferred to the contract on execution""" + + +@dataclass(eq=False, repr=False) +class MsgExecuteContractResponse(betterproto.Message): + """ + MsgExecuteContractResponse defines the Msg/ExecuteContract response type. + """ + + data: bytes = betterproto.bytes_field(1) + """Data contains base64-encoded bytes to returned from the contract""" + + +@dataclass(eq=False, repr=False) +class MsgMigrateContract(betterproto.Message): + """ + MsgMigrateContract represents a message to runs a code upgrade/ downgrade + for a smart contract + """ + + admin: str = betterproto.string_field(1) + """Admin is the current contract admin""" + + contract: str = betterproto.string_field(2) + """Contract is the address of the smart contract""" + + new_code_id: int = betterproto.uint64_field(3) + """NewCodeID references the new WASM code""" + + migrate_msg: bytes = betterproto.bytes_field(4) + """ + MigrateMsg is json encoded message to be passed to the contract on + migration + """ + + +@dataclass(eq=False, repr=False) +class MsgMigrateContractResponse(betterproto.Message): + """ + MsgMigrateContractResponse defines the Msg/MigrateContract response type. + """ + + data: bytes = betterproto.bytes_field(1) + """Data contains base64-encoded bytes to returned from the contract""" + + +@dataclass(eq=False, repr=False) +class MsgUpdateContractAdmin(betterproto.Message): + """ + MsgUpdateContractAdmin represents a message to sets a new admin for a smart + contract + """ + + admin: str = betterproto.string_field(1) + """Admin is the current contract admin""" + + new_admin: str = betterproto.string_field(2) + """NewAdmin is the new contract admin""" + + contract: str = betterproto.string_field(3) + """Contract is the address of the smart contract""" + + +@dataclass(eq=False, repr=False) +class MsgUpdateContractAdminResponse(betterproto.Message): + """ + MsgUpdateContractAdminResponse defines the Msg/UpdateContractAdmin response + type. + """ + + pass + + +@dataclass(eq=False, repr=False) +class MsgClearContractAdmin(betterproto.Message): + """ + MsgClearContractAdmin represents a message to clear admin address from a + smart contract + """ + + admin: str = betterproto.string_field(1) + """Admin is the current contract admin""" + + contract: str = betterproto.string_field(2) + """Contract is the address of the smart contract""" + + +@dataclass(eq=False, repr=False) +class MsgClearContractAdminResponse(betterproto.Message): + """ + MsgClearContractAdminResponse defines the Msg/ClearContractAdmin response + type. + """ + + pass + + +@dataclass(eq=False, repr=False) +class Params(betterproto.Message): + """Params defines the parameters for the wasm module.""" + + max_contract_size: int = betterproto.uint64_field(1) + max_contract_gas: int = betterproto.uint64_field(2) + max_contract_msg_size: int = betterproto.uint64_field(3) + + +@dataclass(eq=False, repr=False) +class CodeInfo(betterproto.Message): + """CodeInfo is data for the uploaded contract WASM code""" + + code_id: int = betterproto.uint64_field(1) + """CodeID is the sequentially increasing unique identifier""" + + code_hash: bytes = betterproto.bytes_field(2) + """CodeHash is the unique identifier created by wasmvm""" + + creator: str = betterproto.string_field(3) + """Creator address who initially stored the code""" + + +@dataclass(eq=False, repr=False) +class ContractInfo(betterproto.Message): + """ContractInfo stores a WASM contract instance""" + + address: str = betterproto.string_field(1) + """Address is the address of the contract""" + + creator: str = betterproto.string_field(2) + """Creator is the contract creator address""" + + admin: str = betterproto.string_field(3) + """Admin is who can execute the contract migration""" + + code_id: int = betterproto.uint64_field(4) + """CodeID is the reference to the stored Wasm code""" + + init_msg: bytes = betterproto.bytes_field(5) + """InitMsg is the raw message used when instantiating a contract""" + + +@dataclass(eq=False, repr=False) +class QueryCodeInfoRequest(betterproto.Message): + """ + QueryCodeInfoRequest is the request type for the QueryyCodeInfo RPC method. + """ + + code_id: int = betterproto.uint64_field(1) + """grpc-gateway_out does not support Go style CodID""" + + +@dataclass(eq=False, repr=False) +class QueryCodeInfoResponse(betterproto.Message): + """ + QueryCodeInfoResponse is response type for the QueryyCodeInfo RPC method. + """ + + code_info: "CodeInfo" = betterproto.message_field(1) + + +@dataclass(eq=False, repr=False) +class QueryByteCodeRequest(betterproto.Message): + """ + QueryByteCodeRequest is the request type for the QueryyByteCode RPC method. + """ + + code_id: int = betterproto.uint64_field(1) + """grpc-gateway_out does not support Go style CodID""" + + +@dataclass(eq=False, repr=False) +class QueryByteCodeResponse(betterproto.Message): + """ + QueryByteCodeResponse is response type for the QueryyByteCode RPC method. + """ + + byte_code: bytes = betterproto.bytes_field(1) + + +@dataclass(eq=False, repr=False) +class QueryContractInfoRequest(betterproto.Message): + """ + QueryContractInfoRequest is the request type for the Query/ContractInfo RPC + method. + """ + + contract_address: str = betterproto.string_field(1) + + +@dataclass(eq=False, repr=False) +class QueryContractInfoResponse(betterproto.Message): + """ + QueryContractInfoResponse is response type for the Query/ContractInfo RPC + method. + """ + + contract_info: "ContractInfo" = betterproto.message_field(1) + + +@dataclass(eq=False, repr=False) +class QueryContractStoreRequest(betterproto.Message): + """ + QueryContractStoreRequest is the request type for the Query/ContractStore + RPC method. + """ + + contract_address: str = betterproto.string_field(1) + query_msg: bytes = betterproto.bytes_field(2) + + +@dataclass(eq=False, repr=False) +class QueryContractStoreResponse(betterproto.Message): + """ + QueryContractStoreResponse is response type for the Query/ContractStore RPC + method. + """ + + query_result: bytes = betterproto.bytes_field(1) + + +@dataclass(eq=False, repr=False) +class QueryRawStoreRequest(betterproto.Message): + """ + QueryRawStoreRequest is the request type for the Query/RawStore RPC method. + """ + + contract_address: str = betterproto.string_field(1) + key: bytes = betterproto.bytes_field(2) + + +@dataclass(eq=False, repr=False) +class QueryRawStoreResponse(betterproto.Message): + """ + QueryRawStoreResponse is response type for the Query/RawStore RPC method. + """ + + data: bytes = betterproto.bytes_field(1) + """Data contains the raw store data""" + + +@dataclass(eq=False, repr=False) +class QueryParamsRequest(betterproto.Message): + """ + QueryParamsRequest is the request type for the Query/Params RPC method. + """ + + pass + + +@dataclass(eq=False, repr=False) +class QueryParamsResponse(betterproto.Message): + """ + QueryParamsResponse is the response type for the Query/Params RPC method. + """ + + params: "Params" = betterproto.message_field(1) + """params defines the parameters of the module.""" + + +@dataclass(eq=False, repr=False) +class GenesisState(betterproto.Message): + """GenesisState defines the oracle module's genesis state.""" + + params: "Params" = betterproto.message_field(1) + last_code_id: int = betterproto.uint64_field(2) + last_instance_id: int = betterproto.uint64_field(3) + codes: List["Code"] = betterproto.message_field(4) + contracts: List["Contract"] = betterproto.message_field(5) + + +@dataclass(eq=False, repr=False) +class Model(betterproto.Message): + """Model is a struct that holds a KV pair""" + + key: bytes = betterproto.bytes_field(1) + value: bytes = betterproto.bytes_field(2) + + +@dataclass(eq=False, repr=False) +class Code(betterproto.Message): + """Code struct encompasses CodeInfo and CodeBytes""" + + code_info: "CodeInfo" = betterproto.message_field(1) + code_bytes: bytes = betterproto.bytes_field(2) + + +@dataclass(eq=False, repr=False) +class Contract(betterproto.Message): + """ + Contract struct encompasses ContractAddress, ContractInfo, and + ContractState + """ + + contract_info: "ContractInfo" = betterproto.message_field(1) + contract_store: List["Model"] = betterproto.message_field(2) + + +class MsgStub(betterproto.ServiceStub): + async def store_code( + self, + msg_store_code: "MsgStoreCode", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "MsgStoreCodeResponse": + return await self._unary_unary( + "/terra.wasm.v1beta1.Msg/StoreCode", + msg_store_code, + MsgStoreCodeResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def migrate_code( + self, + msg_migrate_code: "MsgMigrateCode", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "MsgMigrateCodeResponse": + return await self._unary_unary( + "/terra.wasm.v1beta1.Msg/MigrateCode", + msg_migrate_code, + MsgMigrateCodeResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def instantiate_contract( + self, + msg_instantiate_contract: "MsgInstantiateContract", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "MsgInstantiateContractResponse": + return await self._unary_unary( + "/terra.wasm.v1beta1.Msg/InstantiateContract", + msg_instantiate_contract, + MsgInstantiateContractResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def execute_contract( + self, + msg_execute_contract: "MsgExecuteContract", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "MsgExecuteContractResponse": + return await self._unary_unary( + "/terra.wasm.v1beta1.Msg/ExecuteContract", + msg_execute_contract, + MsgExecuteContractResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def migrate_contract( + self, + msg_migrate_contract: "MsgMigrateContract", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "MsgMigrateContractResponse": + return await self._unary_unary( + "/terra.wasm.v1beta1.Msg/MigrateContract", + msg_migrate_contract, + MsgMigrateContractResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def update_contract_admin( + self, + msg_update_contract_admin: "MsgUpdateContractAdmin", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "MsgUpdateContractAdminResponse": + return await self._unary_unary( + "/terra.wasm.v1beta1.Msg/UpdateContractAdmin", + msg_update_contract_admin, + MsgUpdateContractAdminResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def clear_contract_admin( + self, + msg_clear_contract_admin: "MsgClearContractAdmin", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "MsgClearContractAdminResponse": + return await self._unary_unary( + "/terra.wasm.v1beta1.Msg/ClearContractAdmin", + msg_clear_contract_admin, + MsgClearContractAdminResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + +class QueryStub(betterproto.ServiceStub): + async def code_info( + self, + query_code_info_request: "QueryCodeInfoRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryCodeInfoResponse": + return await self._unary_unary( + "/terra.wasm.v1beta1.Query/CodeInfo", + query_code_info_request, + QueryCodeInfoResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def byte_code( + self, + query_byte_code_request: "QueryByteCodeRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryByteCodeResponse": + return await self._unary_unary( + "/terra.wasm.v1beta1.Query/ByteCode", + query_byte_code_request, + QueryByteCodeResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def contract_info( + self, + query_contract_info_request: "QueryContractInfoRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryContractInfoResponse": + return await self._unary_unary( + "/terra.wasm.v1beta1.Query/ContractInfo", + query_contract_info_request, + QueryContractInfoResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def contract_store( + self, + query_contract_store_request: "QueryContractStoreRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryContractStoreResponse": + return await self._unary_unary( + "/terra.wasm.v1beta1.Query/ContractStore", + query_contract_store_request, + QueryContractStoreResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def raw_store( + self, + query_raw_store_request: "QueryRawStoreRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryRawStoreResponse": + return await self._unary_unary( + "/terra.wasm.v1beta1.Query/RawStore", + query_raw_store_request, + QueryRawStoreResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + async def params( + self, + query_params_request: "QueryParamsRequest", + *, + timeout: Optional[float] = None, + deadline: Optional["Deadline"] = None, + metadata: Optional["MetadataLike"] = None + ) -> "QueryParamsResponse": + return await self._unary_unary( + "/terra.wasm.v1beta1.Query/Params", + query_params_request, + QueryParamsResponse, + timeout=timeout, + deadline=deadline, + metadata=metadata, + ) + + +class MsgBase(ServiceBase): + async def store_code( + self, msg_store_code: "MsgStoreCode" + ) -> "MsgStoreCodeResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def migrate_code( + self, msg_migrate_code: "MsgMigrateCode" + ) -> "MsgMigrateCodeResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def instantiate_contract( + self, msg_instantiate_contract: "MsgInstantiateContract" + ) -> "MsgInstantiateContractResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def execute_contract( + self, msg_execute_contract: "MsgExecuteContract" + ) -> "MsgExecuteContractResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def migrate_contract( + self, msg_migrate_contract: "MsgMigrateContract" + ) -> "MsgMigrateContractResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def update_contract_admin( + self, msg_update_contract_admin: "MsgUpdateContractAdmin" + ) -> "MsgUpdateContractAdminResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def clear_contract_admin( + self, msg_clear_contract_admin: "MsgClearContractAdmin" + ) -> "MsgClearContractAdminResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def __rpc_store_code( + self, stream: "grpclib.server.Stream[MsgStoreCode, MsgStoreCodeResponse]" + ) -> None: + request = await stream.recv_message() + response = await self.store_code(request) + await stream.send_message(response) + + async def __rpc_migrate_code( + self, stream: "grpclib.server.Stream[MsgMigrateCode, MsgMigrateCodeResponse]" + ) -> None: + request = await stream.recv_message() + response = await self.migrate_code(request) + await stream.send_message(response) + + async def __rpc_instantiate_contract( + self, + stream: "grpclib.server.Stream[MsgInstantiateContract, MsgInstantiateContractResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.instantiate_contract(request) + await stream.send_message(response) + + async def __rpc_execute_contract( + self, + stream: "grpclib.server.Stream[MsgExecuteContract, MsgExecuteContractResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.execute_contract(request) + await stream.send_message(response) + + async def __rpc_migrate_contract( + self, + stream: "grpclib.server.Stream[MsgMigrateContract, MsgMigrateContractResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.migrate_contract(request) + await stream.send_message(response) + + async def __rpc_update_contract_admin( + self, + stream: "grpclib.server.Stream[MsgUpdateContractAdmin, MsgUpdateContractAdminResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.update_contract_admin(request) + await stream.send_message(response) + + async def __rpc_clear_contract_admin( + self, + stream: "grpclib.server.Stream[MsgClearContractAdmin, MsgClearContractAdminResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.clear_contract_admin(request) + await stream.send_message(response) + + def __mapping__(self) -> Dict[str, grpclib.const.Handler]: + return { + "/terra.wasm.v1beta1.Msg/StoreCode": grpclib.const.Handler( + self.__rpc_store_code, + grpclib.const.Cardinality.UNARY_UNARY, + MsgStoreCode, + MsgStoreCodeResponse, + ), + "/terra.wasm.v1beta1.Msg/MigrateCode": grpclib.const.Handler( + self.__rpc_migrate_code, + grpclib.const.Cardinality.UNARY_UNARY, + MsgMigrateCode, + MsgMigrateCodeResponse, + ), + "/terra.wasm.v1beta1.Msg/InstantiateContract": grpclib.const.Handler( + self.__rpc_instantiate_contract, + grpclib.const.Cardinality.UNARY_UNARY, + MsgInstantiateContract, + MsgInstantiateContractResponse, + ), + "/terra.wasm.v1beta1.Msg/ExecuteContract": grpclib.const.Handler( + self.__rpc_execute_contract, + grpclib.const.Cardinality.UNARY_UNARY, + MsgExecuteContract, + MsgExecuteContractResponse, + ), + "/terra.wasm.v1beta1.Msg/MigrateContract": grpclib.const.Handler( + self.__rpc_migrate_contract, + grpclib.const.Cardinality.UNARY_UNARY, + MsgMigrateContract, + MsgMigrateContractResponse, + ), + "/terra.wasm.v1beta1.Msg/UpdateContractAdmin": grpclib.const.Handler( + self.__rpc_update_contract_admin, + grpclib.const.Cardinality.UNARY_UNARY, + MsgUpdateContractAdmin, + MsgUpdateContractAdminResponse, + ), + "/terra.wasm.v1beta1.Msg/ClearContractAdmin": grpclib.const.Handler( + self.__rpc_clear_contract_admin, + grpclib.const.Cardinality.UNARY_UNARY, + MsgClearContractAdmin, + MsgClearContractAdminResponse, + ), + } + + +class QueryBase(ServiceBase): + async def code_info( + self, query_code_info_request: "QueryCodeInfoRequest" + ) -> "QueryCodeInfoResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def byte_code( + self, query_byte_code_request: "QueryByteCodeRequest" + ) -> "QueryByteCodeResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def contract_info( + self, query_contract_info_request: "QueryContractInfoRequest" + ) -> "QueryContractInfoResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def contract_store( + self, query_contract_store_request: "QueryContractStoreRequest" + ) -> "QueryContractStoreResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def raw_store( + self, query_raw_store_request: "QueryRawStoreRequest" + ) -> "QueryRawStoreResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def params( + self, query_params_request: "QueryParamsRequest" + ) -> "QueryParamsResponse": + raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + + async def __rpc_code_info( + self, + stream: "grpclib.server.Stream[QueryCodeInfoRequest, QueryCodeInfoResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.code_info(request) + await stream.send_message(response) + + async def __rpc_byte_code( + self, + stream: "grpclib.server.Stream[QueryByteCodeRequest, QueryByteCodeResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.byte_code(request) + await stream.send_message(response) + + async def __rpc_contract_info( + self, + stream: "grpclib.server.Stream[QueryContractInfoRequest, QueryContractInfoResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.contract_info(request) + await stream.send_message(response) + + async def __rpc_contract_store( + self, + stream: "grpclib.server.Stream[QueryContractStoreRequest, QueryContractStoreResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.contract_store(request) + await stream.send_message(response) + + async def __rpc_raw_store( + self, + stream: "grpclib.server.Stream[QueryRawStoreRequest, QueryRawStoreResponse]", + ) -> None: + request = await stream.recv_message() + response = await self.raw_store(request) + await stream.send_message(response) + + async def __rpc_params( + self, stream: "grpclib.server.Stream[QueryParamsRequest, QueryParamsResponse]" + ) -> None: + request = await stream.recv_message() + response = await self.params(request) + await stream.send_message(response) + + def __mapping__(self) -> Dict[str, grpclib.const.Handler]: + return { + "/terra.wasm.v1beta1.Query/CodeInfo": grpclib.const.Handler( + self.__rpc_code_info, + grpclib.const.Cardinality.UNARY_UNARY, + QueryCodeInfoRequest, + QueryCodeInfoResponse, + ), + "/terra.wasm.v1beta1.Query/ByteCode": grpclib.const.Handler( + self.__rpc_byte_code, + grpclib.const.Cardinality.UNARY_UNARY, + QueryByteCodeRequest, + QueryByteCodeResponse, + ), + "/terra.wasm.v1beta1.Query/ContractInfo": grpclib.const.Handler( + self.__rpc_contract_info, + grpclib.const.Cardinality.UNARY_UNARY, + QueryContractInfoRequest, + QueryContractInfoResponse, + ), + "/terra.wasm.v1beta1.Query/ContractStore": grpclib.const.Handler( + self.__rpc_contract_store, + grpclib.const.Cardinality.UNARY_UNARY, + QueryContractStoreRequest, + QueryContractStoreResponse, + ), + "/terra.wasm.v1beta1.Query/RawStore": grpclib.const.Handler( + self.__rpc_raw_store, + grpclib.const.Cardinality.UNARY_UNARY, + QueryRawStoreRequest, + QueryRawStoreResponse, + ), + "/terra.wasm.v1beta1.Query/Params": grpclib.const.Handler( + self.__rpc_params, + grpclib.const.Cardinality.UNARY_UNARY, + QueryParamsRequest, + QueryParamsResponse, + ), + }