@gitopia/gitopiajs 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/LICENSE +21 -0
- package/dist/amino/amino.d.ts +1 -0
- package/dist/amino/amino.js +2 -0
- package/dist/amino/bundle.d.ts +1 -0
- package/dist/amino/bundle.js +41 -0
- package/dist/binary.d.ts +130 -0
- package/dist/binary.js +371 -0
- package/dist/cosmos/bank/v1beta1/bank.d.ts +407 -0
- package/dist/cosmos/bank/v1beta1/bank.js +664 -0
- package/dist/cosmos/bank/v1beta1/query.d.ts +1062 -0
- package/dist/cosmos/bank/v1beta1/query.js +1759 -0
- package/dist/cosmos/bank/v1beta1/query.lcd.d.ts +19 -0
- package/dist/cosmos/bank/v1beta1/query.lcd.js +173 -0
- package/dist/cosmos/bank/v1beta1/query.rpc.Query.d.ts +106 -0
- package/dist/cosmos/bank/v1beta1/query.rpc.Query.js +123 -0
- package/dist/cosmos/base/query/v1beta1/pagination.d.ts +190 -0
- package/dist/cosmos/base/query/v1beta1/pagination.js +204 -0
- package/dist/cosmos/base/v1beta1/coin.d.ts +193 -0
- package/dist/cosmos/base/v1beta1/coin.js +306 -0
- package/dist/cosmos/bundle.d.ts +2311 -0
- package/dist/cosmos/bundle.js +134 -0
- package/dist/cosmos/client.d.ts +84 -0
- package/dist/cosmos/client.js +65 -0
- package/dist/cosmos/feegrant/v1beta1/feegrant.d.ts +245 -0
- package/dist/cosmos/feegrant/v1beta1/feegrant.js +456 -0
- package/dist/cosmos/feegrant/v1beta1/query.d.ts +258 -0
- package/dist/cosmos/feegrant/v1beta1/query.js +487 -0
- package/dist/cosmos/feegrant/v1beta1/query.lcd.d.ts +11 -0
- package/dist/cosmos/feegrant/v1beta1/query.lcd.js +44 -0
- package/dist/cosmos/feegrant/v1beta1/query.rpc.Query.d.ts +28 -0
- package/dist/cosmos/feegrant/v1beta1/query.rpc.Query.js +47 -0
- package/dist/cosmos/gov/v1beta1/gov.d.ts +571 -0
- package/dist/cosmos/gov/v1beta1/gov.js +1122 -0
- package/dist/cosmos/gov/v1beta1/query.d.ts +636 -0
- package/dist/cosmos/gov/v1beta1/query.js +1264 -0
- package/dist/cosmos/gov/v1beta1/query.lcd.d.ts +16 -0
- package/dist/cosmos/gov/v1beta1/query.lcd.js +87 -0
- package/dist/cosmos/gov/v1beta1/query.rpc.Query.d.ts +44 -0
- package/dist/cosmos/gov/v1beta1/query.rpc.Query.js +92 -0
- package/dist/cosmos/group/v1/query.d.ts +1097 -0
- package/dist/cosmos/group/v1/query.js +2182 -0
- package/dist/cosmos/group/v1/query.lcd.d.ts +22 -0
- package/dist/cosmos/group/v1/query.lcd.js +158 -0
- package/dist/cosmos/group/v1/query.rpc.Query.d.ts +78 -0
- package/dist/cosmos/group/v1/query.rpc.Query.js +148 -0
- package/dist/cosmos/group/v1/tx.amino.d.ts +73 -0
- package/dist/cosmos/group/v1/tx.amino.js +77 -0
- package/dist/cosmos/group/v1/tx.d.ts +1198 -0
- package/dist/cosmos/group/v1/tx.js +2362 -0
- package/dist/cosmos/group/v1/tx.registry.d.ts +180 -0
- package/dist/cosmos/group/v1/tx.registry.js +271 -0
- package/dist/cosmos/group/v1/tx.rpc.msg.d.ts +51 -0
- package/dist/cosmos/group/v1/tx.rpc.msg.js +96 -0
- package/dist/cosmos/group/v1/types.d.ts +873 -0
- package/dist/cosmos/group/v1/types.js +1495 -0
- package/dist/cosmos/msg/v1/msg.d.ts +1 -0
- package/dist/cosmos/msg/v1/msg.js +2 -0
- package/dist/cosmos/query/v1/query.d.ts +1 -0
- package/dist/cosmos/query/v1/query.js +2 -0
- package/dist/cosmos/rpc.query.d.ts +59 -0
- package/dist/cosmos/rpc.query.js +60 -0
- package/dist/cosmos/rpc.tx.d.ts +10 -0
- package/dist/cosmos/rpc.tx.js +44 -0
- package/dist/cosmos/upgrade/v1beta1/upgrade.d.ts +278 -0
- package/dist/cosmos/upgrade/v1beta1/upgrade.js +382 -0
- package/dist/cosmos_proto/bundle.d.ts +32 -0
- package/dist/cosmos_proto/bundle.js +41 -0
- package/dist/cosmos_proto/cosmos.d.ts +171 -0
- package/dist/cosmos_proto/cosmos.js +221 -0
- package/dist/esm/amino/amino.js +1 -0
- package/dist/esm/amino/bundle.js +5 -0
- package/dist/esm/binary.js +366 -0
- package/dist/esm/cosmos/bank/v1beta1/bank.js +661 -0
- package/dist/esm/cosmos/bank/v1beta1/query.js +1756 -0
- package/dist/esm/cosmos/bank/v1beta1/query.lcd.js +169 -0
- package/dist/esm/cosmos/bank/v1beta1/query.rpc.Query.js +118 -0
- package/dist/esm/cosmos/base/query/v1beta1/pagination.js +201 -0
- package/dist/esm/cosmos/base/v1beta1/coin.js +303 -0
- package/dist/esm/cosmos/bundle.js +98 -0
- package/dist/esm/cosmos/client.js +27 -0
- package/dist/esm/cosmos/feegrant/v1beta1/feegrant.js +450 -0
- package/dist/esm/cosmos/feegrant/v1beta1/query.js +484 -0
- package/dist/esm/cosmos/feegrant/v1beta1/query.lcd.js +40 -0
- package/dist/esm/cosmos/feegrant/v1beta1/query.rpc.Query.js +42 -0
- package/dist/esm/cosmos/gov/v1beta1/gov.js +1112 -0
- package/dist/esm/cosmos/gov/v1beta1/query.js +1261 -0
- package/dist/esm/cosmos/gov/v1beta1/query.lcd.js +83 -0
- package/dist/esm/cosmos/gov/v1beta1/query.rpc.Query.js +87 -0
- package/dist/esm/cosmos/group/v1/query.js +2179 -0
- package/dist/esm/cosmos/group/v1/query.lcd.js +154 -0
- package/dist/esm/cosmos/group/v1/query.rpc.Query.js +143 -0
- package/dist/esm/cosmos/group/v1/tx.amino.js +74 -0
- package/dist/esm/cosmos/group/v1/tx.js +2354 -0
- package/dist/esm/cosmos/group/v1/tx.registry.js +267 -0
- package/dist/esm/cosmos/group/v1/tx.rpc.msg.js +92 -0
- package/dist/esm/cosmos/group/v1/types.js +1483 -0
- package/dist/esm/cosmos/msg/v1/msg.js +1 -0
- package/dist/esm/cosmos/query/v1/query.js +1 -0
- package/dist/esm/cosmos/rpc.query.js +23 -0
- package/dist/esm/cosmos/rpc.tx.js +7 -0
- package/dist/esm/cosmos/upgrade/v1beta1/upgrade.js +379 -0
- package/dist/esm/cosmos_proto/bundle.js +5 -0
- package/dist/esm/cosmos_proto/cosmos.js +216 -0
- package/dist/esm/gitopia/bundle.js +95 -0
- package/dist/esm/gitopia/client.js +32 -0
- package/dist/esm/gitopia/custom-lcd-client.js +50 -0
- package/dist/esm/gitopia/gitopia/gitopia/attachment.js +101 -0
- package/dist/esm/gitopia/gitopia/gitopia/bounty.js +255 -0
- package/dist/esm/gitopia/gitopia/gitopia/branch.js +137 -0
- package/dist/esm/gitopia/gitopia/gitopia/comment.js +488 -0
- package/dist/esm/gitopia/gitopia/gitopia/dao.js +451 -0
- package/dist/esm/gitopia/gitopia/gitopia/exercised_amount.js +78 -0
- package/dist/esm/gitopia/gitopia/gitopia/genesis.js +460 -0
- package/dist/esm/gitopia/gitopia/gitopia/issue.js +323 -0
- package/dist/esm/gitopia/gitopia/gitopia/params.js +293 -0
- package/dist/esm/gitopia/gitopia/gitopia/pullRequest.js +565 -0
- package/dist/esm/gitopia/gitopia/gitopia/query.js +7351 -0
- package/dist/esm/gitopia/gitopia/gitopia/query.lcd.js +452 -0
- package/dist/esm/gitopia/gitopia/gitopia/query.rpc.Query.js +453 -0
- package/dist/esm/gitopia/gitopia/gitopia/reaction.js +123 -0
- package/dist/esm/gitopia/gitopia/gitopia/release.js +225 -0
- package/dist/esm/gitopia/gitopia/gitopia/repository.js +1200 -0
- package/dist/esm/gitopia/gitopia/gitopia/tag.js +125 -0
- package/dist/esm/gitopia/gitopia/gitopia/task.js +197 -0
- package/dist/esm/gitopia/gitopia/gitopia/tx.amino.js +464 -0
- package/dist/esm/gitopia/gitopia/gitopia/tx.js +14679 -0
- package/dist/esm/gitopia/gitopia/gitopia/tx.registry.js +1671 -0
- package/dist/esm/gitopia/gitopia/gitopia/tx.rpc.msg.js +560 -0
- package/dist/esm/gitopia/gitopia/gitopia/user.js +340 -0
- package/dist/esm/gitopia/gitopia/gitopia/whois.js +146 -0
- package/dist/esm/gitopia/gitopia/offchain/offchain.js +144 -0
- package/dist/esm/gitopia/gitopia/rewards/genesis.js +82 -0
- package/dist/esm/gitopia/gitopia/rewards/params.js +81 -0
- package/dist/esm/gitopia/gitopia/rewards/pool.js +191 -0
- package/dist/esm/gitopia/gitopia/rewards/query.js +654 -0
- package/dist/esm/gitopia/gitopia/rewards/query.lcd.js +40 -0
- package/dist/esm/gitopia/gitopia/rewards/query.rpc.Query.js +53 -0
- package/dist/esm/gitopia/gitopia/rewards/rewards.js +191 -0
- package/dist/esm/gitopia/gitopia/rewards/task.js +176 -0
- package/dist/esm/gitopia/gitopia/rewards/tx.amino.js +19 -0
- package/dist/esm/gitopia/gitopia/rewards/tx.js +525 -0
- package/dist/esm/gitopia/gitopia/rewards/tx.registry.js +69 -0
- package/dist/esm/gitopia/gitopia/rewards/tx.rpc.msg.js +26 -0
- package/dist/esm/gitopia/rpc.query.js +29 -0
- package/dist/esm/gitopia/rpc.tx.js +13 -0
- package/dist/esm/gogoproto/bundle.js +5 -0
- package/dist/esm/gogoproto/gogo.js +1 -0
- package/dist/esm/google/api/annotations.js +1 -0
- package/dist/esm/google/api/http.js +329 -0
- package/dist/esm/google/bundle.js +14 -0
- package/dist/esm/google/protobuf/any.js +74 -0
- package/dist/esm/google/protobuf/descriptor.js +4848 -0
- package/dist/esm/google/protobuf/duration.js +71 -0
- package/dist/esm/google/protobuf/timestamp.js +68 -0
- package/dist/esm/helpers.js +129 -0
- package/dist/esm/ibc/applications/transfer/v1/query.js +847 -0
- package/dist/esm/ibc/applications/transfer/v1/query.lcd.js +70 -0
- package/dist/esm/ibc/applications/transfer/v1/query.rpc.Query.js +71 -0
- package/dist/esm/ibc/applications/transfer/v1/transfer.js +164 -0
- package/dist/esm/ibc/applications/transfer/v1/tx.amino.js +9 -0
- package/dist/esm/ibc/applications/transfer/v1/tx.js +226 -0
- package/dist/esm/ibc/applications/transfer/v1/tx.registry.js +33 -0
- package/dist/esm/ibc/applications/transfer/v1/tx.rpc.msg.js +14 -0
- package/dist/esm/ibc/bundle.js +44 -0
- package/dist/esm/ibc/client.js +29 -0
- package/dist/esm/ibc/core/client/v1/client.js +611 -0
- package/dist/esm/ibc/rpc.query.js +30 -0
- package/dist/esm/ibc/rpc.tx.js +14 -0
- package/dist/esm/index.js +19 -0
- package/dist/esm/utf8.js +137 -0
- package/dist/esm/varint.js +408 -0
- package/dist/gitopia/bundle.d.ts +6123 -0
- package/dist/gitopia/bundle.js +131 -0
- package/dist/gitopia/client.d.ts +492 -0
- package/dist/gitopia/client.js +70 -0
- package/dist/gitopia/custom-lcd-client.d.ts +31 -0
- package/dist/gitopia/custom-lcd-client.js +87 -0
- package/dist/gitopia/gitopia/gitopia/attachment.d.ts +39 -0
- package/dist/gitopia/gitopia/gitopia/attachment.js +104 -0
- package/dist/gitopia/gitopia/gitopia/bounty.d.ts +79 -0
- package/dist/gitopia/gitopia/gitopia/bounty.js +262 -0
- package/dist/gitopia/gitopia/gitopia/branch.d.ts +48 -0
- package/dist/gitopia/gitopia/gitopia/branch.js +140 -0
- package/dist/gitopia/gitopia/gitopia/comment.d.ts +125 -0
- package/dist/gitopia/gitopia/gitopia/comment.js +495 -0
- package/dist/gitopia/gitopia/gitopia/dao.d.ts +160 -0
- package/dist/gitopia/gitopia/gitopia/dao.js +454 -0
- package/dist/gitopia/gitopia/gitopia/exercised_amount.d.ts +34 -0
- package/dist/gitopia/gitopia/gitopia/exercised_amount.js +81 -0
- package/dist/gitopia/gitopia/gitopia/genesis.d.ts +143 -0
- package/dist/gitopia/gitopia/gitopia/genesis.js +463 -0
- package/dist/gitopia/gitopia/gitopia/issue.d.ts +88 -0
- package/dist/gitopia/gitopia/gitopia/issue.js +328 -0
- package/dist/gitopia/gitopia/gitopia/params.d.ts +115 -0
- package/dist/gitopia/gitopia/gitopia/params.js +296 -0
- package/dist/gitopia/gitopia/gitopia/pullRequest.d.ts +177 -0
- package/dist/gitopia/gitopia/gitopia/pullRequest.js +570 -0
- package/dist/gitopia/gitopia/gitopia/query.d.ts +3130 -0
- package/dist/gitopia/gitopia/gitopia/query.js +7355 -0
- package/dist/gitopia/gitopia/gitopia/query.lcd.d.ts +54 -0
- package/dist/gitopia/gitopia/gitopia/query.lcd.js +456 -0
- package/dist/gitopia/gitopia/gitopia/query.rpc.Query.d.ts +188 -0
- package/dist/gitopia/gitopia/gitopia/query.rpc.Query.js +458 -0
- package/dist/gitopia/gitopia/gitopia/reaction.d.ts +42 -0
- package/dist/gitopia/gitopia/gitopia/reaction.js +128 -0
- package/dist/gitopia/gitopia/gitopia/release.d.ts +70 -0
- package/dist/gitopia/gitopia/gitopia/release.js +228 -0
- package/dist/gitopia/gitopia/gitopia/repository.d.ts +424 -0
- package/dist/gitopia/gitopia/gitopia/repository.js +1207 -0
- package/dist/gitopia/gitopia/gitopia/tag.d.ts +45 -0
- package/dist/gitopia/gitopia/gitopia/tag.js +128 -0
- package/dist/gitopia/gitopia/gitopia/task.d.ts +64 -0
- package/dist/gitopia/gitopia/gitopia/task.js +204 -0
- package/dist/gitopia/gitopia/gitopia/tx.amino.d.ts +463 -0
- package/dist/gitopia/gitopia/gitopia/tx.amino.js +467 -0
- package/dist/gitopia/gitopia/gitopia/tx.d.ts +6246 -0
- package/dist/gitopia/gitopia/gitopia/tx.js +14687 -0
- package/dist/gitopia/gitopia/gitopia/tx.registry.d.ts +1116 -0
- package/dist/gitopia/gitopia/gitopia/tx.registry.js +1675 -0
- package/dist/gitopia/gitopia/gitopia/tx.rpc.msg.d.ts +200 -0
- package/dist/gitopia/gitopia/gitopia/tx.rpc.msg.js +564 -0
- package/dist/gitopia/gitopia/gitopia/user.d.ts +104 -0
- package/dist/gitopia/gitopia/gitopia/user.js +343 -0
- package/dist/gitopia/gitopia/gitopia/whois.d.ts +51 -0
- package/dist/gitopia/gitopia/gitopia/whois.js +151 -0
- package/dist/gitopia/gitopia/offchain/offchain.d.ts +74 -0
- package/dist/gitopia/gitopia/offchain/offchain.js +147 -0
- package/dist/gitopia/gitopia/rewards/genesis.d.ts +40 -0
- package/dist/gitopia/gitopia/rewards/genesis.js +85 -0
- package/dist/gitopia/gitopia/rewards/params.d.ts +37 -0
- package/dist/gitopia/gitopia/rewards/params.js +84 -0
- package/dist/gitopia/gitopia/rewards/pool.d.ts +59 -0
- package/dist/gitopia/gitopia/rewards/pool.js +196 -0
- package/dist/gitopia/gitopia/rewards/query.d.ts +294 -0
- package/dist/gitopia/gitopia/rewards/query.js +657 -0
- package/dist/gitopia/gitopia/rewards/query.lcd.d.ts +12 -0
- package/dist/gitopia/gitopia/rewards/query.lcd.js +44 -0
- package/dist/gitopia/gitopia/rewards/query.rpc.Query.d.ts +28 -0
- package/dist/gitopia/gitopia/rewards/query.rpc.Query.js +58 -0
- package/dist/gitopia/gitopia/rewards/rewards.d.ts +79 -0
- package/dist/gitopia/gitopia/rewards/rewards.js +194 -0
- package/dist/gitopia/gitopia/rewards/task.d.ts +54 -0
- package/dist/gitopia/gitopia/rewards/task.js +181 -0
- package/dist/gitopia/gitopia/rewards/tx.amino.d.ts +18 -0
- package/dist/gitopia/gitopia/rewards/tx.amino.js +22 -0
- package/dist/gitopia/gitopia/rewards/tx.d.ts +242 -0
- package/dist/gitopia/gitopia/rewards/tx.js +528 -0
- package/dist/gitopia/gitopia/rewards/tx.registry.d.ts +48 -0
- package/dist/gitopia/gitopia/rewards/tx.registry.js +73 -0
- package/dist/gitopia/gitopia/rewards/tx.rpc.msg.d.ts +19 -0
- package/dist/gitopia/gitopia/rewards/tx.rpc.msg.js +30 -0
- package/dist/gitopia/rpc.query.d.ts +117 -0
- package/dist/gitopia/rpc.query.js +66 -0
- package/dist/gitopia/rpc.tx.d.ts +16 -0
- package/dist/gitopia/rpc.tx.js +50 -0
- package/dist/gogoproto/bundle.d.ts +1 -0
- package/dist/gogoproto/bundle.js +41 -0
- package/dist/gogoproto/gogo.d.ts +1 -0
- package/dist/gogoproto/gogo.js +2 -0
- package/dist/google/api/annotations.d.ts +1 -0
- package/dist/google/api/annotations.js +2 -0
- package/dist/google/api/http.d.ts +1049 -0
- package/dist/google/api/http.js +332 -0
- package/dist/google/bundle.d.ts +525 -0
- package/dist/google/bundle.js +50 -0
- package/dist/google/protobuf/any.d.ts +358 -0
- package/dist/google/protobuf/any.js +77 -0
- package/dist/google/protobuf/descriptor.d.ts +3178 -0
- package/dist/google/protobuf/descriptor.js +4886 -0
- package/dist/google/protobuf/duration.d.ts +223 -0
- package/dist/google/protobuf/duration.js +74 -0
- package/dist/google/protobuf/timestamp.d.ts +314 -0
- package/dist/google/protobuf/timestamp.js +71 -0
- package/dist/helpers.d.ts +82 -0
- package/dist/helpers.js +144 -0
- package/dist/ibc/applications/transfer/v1/query.d.ts +479 -0
- package/dist/ibc/applications/transfer/v1/query.js +850 -0
- package/dist/ibc/applications/transfer/v1/query.lcd.d.ts +14 -0
- package/dist/ibc/applications/transfer/v1/query.lcd.js +74 -0
- package/dist/ibc/applications/transfer/v1/query.rpc.Query.d.ts +36 -0
- package/dist/ibc/applications/transfer/v1/query.rpc.Query.js +76 -0
- package/dist/ibc/applications/transfer/v1/transfer.d.ts +123 -0
- package/dist/ibc/applications/transfer/v1/transfer.js +167 -0
- package/dist/ibc/applications/transfer/v1/tx.amino.d.ts +8 -0
- package/dist/ibc/applications/transfer/v1/tx.amino.js +12 -0
- package/dist/ibc/applications/transfer/v1/tx.d.ts +132 -0
- package/dist/ibc/applications/transfer/v1/tx.js +229 -0
- package/dist/ibc/applications/transfer/v1/tx.registry.d.ts +24 -0
- package/dist/ibc/applications/transfer/v1/tx.registry.js +37 -0
- package/dist/ibc/applications/transfer/v1/tx.rpc.msg.d.ts +12 -0
- package/dist/ibc/applications/transfer/v1/tx.rpc.msg.js +18 -0
- package/dist/ibc/bundle.d.ts +450 -0
- package/dist/ibc/bundle.js +80 -0
- package/dist/ibc/client.d.ts +22 -0
- package/dist/ibc/client.js +67 -0
- package/dist/ibc/core/client/v1/client.d.ts +408 -0
- package/dist/ibc/core/client/v1/client.js +614 -0
- package/dist/ibc/rpc.query.d.ts +73 -0
- package/dist/ibc/rpc.query.js +67 -0
- package/dist/ibc/rpc.tx.d.ts +17 -0
- package/dist/ibc/rpc.tx.js +51 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +35 -0
- package/dist/package.json +46 -0
- package/dist/utf8.d.ts +27 -0
- package/dist/utf8.js +141 -0
- package/dist/varint.d.ts +105 -0
- package/dist/varint.js +426 -0
- package/package.json +46 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LCDClient } from "@cosmology/lcd";
|
|
2
|
+
import { QueryProposalRequest, QueryProposalResponseSDKType, QueryProposalsRequest, QueryProposalsResponseSDKType, QueryVoteRequest, QueryVoteResponseSDKType, QueryVotesRequest, QueryVotesResponseSDKType, QueryParamsRequest, QueryParamsResponseSDKType, QueryDepositRequest, QueryDepositResponseSDKType, QueryDepositsRequest, QueryDepositsResponseSDKType, QueryTallyResultRequest, QueryTallyResultResponseSDKType } from "./query";
|
|
3
|
+
export declare class LCDQueryClient {
|
|
4
|
+
req: LCDClient;
|
|
5
|
+
constructor({ requestClient }: {
|
|
6
|
+
requestClient: LCDClient;
|
|
7
|
+
});
|
|
8
|
+
proposal(params: QueryProposalRequest): Promise<QueryProposalResponseSDKType>;
|
|
9
|
+
proposals(params: QueryProposalsRequest): Promise<QueryProposalsResponseSDKType>;
|
|
10
|
+
vote(params: QueryVoteRequest): Promise<QueryVoteResponseSDKType>;
|
|
11
|
+
votes(params: QueryVotesRequest): Promise<QueryVotesResponseSDKType>;
|
|
12
|
+
params(params: QueryParamsRequest): Promise<QueryParamsResponseSDKType>;
|
|
13
|
+
deposit(params: QueryDepositRequest): Promise<QueryDepositResponseSDKType>;
|
|
14
|
+
deposits(params: QueryDepositsRequest): Promise<QueryDepositsResponseSDKType>;
|
|
15
|
+
tallyResult(params: QueryTallyResultRequest): Promise<QueryTallyResultResponseSDKType>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LCDQueryClient = void 0;
|
|
4
|
+
//@ts-nocheck
|
|
5
|
+
const helpers_1 = require("../../../helpers");
|
|
6
|
+
class LCDQueryClient {
|
|
7
|
+
req;
|
|
8
|
+
constructor({ requestClient }) {
|
|
9
|
+
this.req = requestClient;
|
|
10
|
+
this.proposal = this.proposal.bind(this);
|
|
11
|
+
this.proposals = this.proposals.bind(this);
|
|
12
|
+
this.vote = this.vote.bind(this);
|
|
13
|
+
this.votes = this.votes.bind(this);
|
|
14
|
+
this.params = this.params.bind(this);
|
|
15
|
+
this.deposit = this.deposit.bind(this);
|
|
16
|
+
this.deposits = this.deposits.bind(this);
|
|
17
|
+
this.tallyResult = this.tallyResult.bind(this);
|
|
18
|
+
}
|
|
19
|
+
/* Proposal queries proposal details based on ProposalID. */
|
|
20
|
+
async proposal(params) {
|
|
21
|
+
const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}`;
|
|
22
|
+
return await this.req.get(endpoint);
|
|
23
|
+
}
|
|
24
|
+
/* Proposals queries all proposals based on given status. */
|
|
25
|
+
async proposals(params) {
|
|
26
|
+
const options = {
|
|
27
|
+
params: {}
|
|
28
|
+
};
|
|
29
|
+
if (typeof params?.proposalStatus !== "undefined") {
|
|
30
|
+
options.params.proposal_status = params.proposalStatus;
|
|
31
|
+
}
|
|
32
|
+
if (typeof params?.voter !== "undefined") {
|
|
33
|
+
options.params.voter = params.voter;
|
|
34
|
+
}
|
|
35
|
+
if (typeof params?.depositor !== "undefined") {
|
|
36
|
+
options.params.depositor = params.depositor;
|
|
37
|
+
}
|
|
38
|
+
if (typeof params?.pagination !== "undefined") {
|
|
39
|
+
(0, helpers_1.setPaginationParams)(options, params.pagination);
|
|
40
|
+
}
|
|
41
|
+
const endpoint = `cosmos/gov/v1beta1/proposals`;
|
|
42
|
+
return await this.req.get(endpoint, options);
|
|
43
|
+
}
|
|
44
|
+
/* Vote queries voted information based on proposalID, voterAddr. */
|
|
45
|
+
async vote(params) {
|
|
46
|
+
const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}/votes/${params.voter}`;
|
|
47
|
+
return await this.req.get(endpoint);
|
|
48
|
+
}
|
|
49
|
+
/* Votes queries votes of a given proposal. */
|
|
50
|
+
async votes(params) {
|
|
51
|
+
const options = {
|
|
52
|
+
params: {}
|
|
53
|
+
};
|
|
54
|
+
if (typeof params?.pagination !== "undefined") {
|
|
55
|
+
(0, helpers_1.setPaginationParams)(options, params.pagination);
|
|
56
|
+
}
|
|
57
|
+
const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}/votes`;
|
|
58
|
+
return await this.req.get(endpoint, options);
|
|
59
|
+
}
|
|
60
|
+
/* Params queries all parameters of the gov module. */
|
|
61
|
+
async params(params) {
|
|
62
|
+
const endpoint = `cosmos/gov/v1beta1/params/${params.paramsType}`;
|
|
63
|
+
return await this.req.get(endpoint);
|
|
64
|
+
}
|
|
65
|
+
/* Deposit queries single deposit information based proposalID, depositAddr. */
|
|
66
|
+
async deposit(params) {
|
|
67
|
+
const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}/deposits/${params.depositor}`;
|
|
68
|
+
return await this.req.get(endpoint);
|
|
69
|
+
}
|
|
70
|
+
/* Deposits queries all deposits of a single proposal. */
|
|
71
|
+
async deposits(params) {
|
|
72
|
+
const options = {
|
|
73
|
+
params: {}
|
|
74
|
+
};
|
|
75
|
+
if (typeof params?.pagination !== "undefined") {
|
|
76
|
+
(0, helpers_1.setPaginationParams)(options, params.pagination);
|
|
77
|
+
}
|
|
78
|
+
const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}/deposits`;
|
|
79
|
+
return await this.req.get(endpoint, options);
|
|
80
|
+
}
|
|
81
|
+
/* TallyResult queries the tally of a proposal vote. */
|
|
82
|
+
async tallyResult(params) {
|
|
83
|
+
const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}/tally`;
|
|
84
|
+
return await this.req.get(endpoint);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.LCDQueryClient = LCDQueryClient;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Rpc } from "../../../helpers";
|
|
2
|
+
import { QueryClient } from "@cosmjs/stargate";
|
|
3
|
+
import { QueryProposalRequest, QueryProposalResponse, QueryProposalsRequest, QueryProposalsResponse, QueryVoteRequest, QueryVoteResponse, QueryVotesRequest, QueryVotesResponse, QueryParamsRequest, QueryParamsResponse, QueryDepositRequest, QueryDepositResponse, QueryDepositsRequest, QueryDepositsResponse, QueryTallyResultRequest, QueryTallyResultResponse } from "./query";
|
|
4
|
+
/** Query defines the gRPC querier service for gov module */
|
|
5
|
+
export interface Query {
|
|
6
|
+
/** Proposal queries proposal details based on ProposalID. */
|
|
7
|
+
proposal(request: QueryProposalRequest): Promise<QueryProposalResponse>;
|
|
8
|
+
/** Proposals queries all proposals based on given status. */
|
|
9
|
+
proposals(request: QueryProposalsRequest): Promise<QueryProposalsResponse>;
|
|
10
|
+
/** Vote queries voted information based on proposalID, voterAddr. */
|
|
11
|
+
vote(request: QueryVoteRequest): Promise<QueryVoteResponse>;
|
|
12
|
+
/** Votes queries votes of a given proposal. */
|
|
13
|
+
votes(request: QueryVotesRequest): Promise<QueryVotesResponse>;
|
|
14
|
+
/** Params queries all parameters of the gov module. */
|
|
15
|
+
params(request: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
16
|
+
/** Deposit queries single deposit information based proposalID, depositAddr. */
|
|
17
|
+
deposit(request: QueryDepositRequest): Promise<QueryDepositResponse>;
|
|
18
|
+
/** Deposits queries all deposits of a single proposal. */
|
|
19
|
+
deposits(request: QueryDepositsRequest): Promise<QueryDepositsResponse>;
|
|
20
|
+
/** TallyResult queries the tally of a proposal vote. */
|
|
21
|
+
tallyResult(request: QueryTallyResultRequest): Promise<QueryTallyResultResponse>;
|
|
22
|
+
}
|
|
23
|
+
export declare class QueryClientImpl implements Query {
|
|
24
|
+
private readonly rpc;
|
|
25
|
+
constructor(rpc: Rpc);
|
|
26
|
+
proposal(request: QueryProposalRequest): Promise<QueryProposalResponse>;
|
|
27
|
+
proposals(request: QueryProposalsRequest): Promise<QueryProposalsResponse>;
|
|
28
|
+
vote(request: QueryVoteRequest): Promise<QueryVoteResponse>;
|
|
29
|
+
votes(request: QueryVotesRequest): Promise<QueryVotesResponse>;
|
|
30
|
+
params(request: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
31
|
+
deposit(request: QueryDepositRequest): Promise<QueryDepositResponse>;
|
|
32
|
+
deposits(request: QueryDepositsRequest): Promise<QueryDepositsResponse>;
|
|
33
|
+
tallyResult(request: QueryTallyResultRequest): Promise<QueryTallyResultResponse>;
|
|
34
|
+
}
|
|
35
|
+
export declare const createRpcQueryExtension: (base: QueryClient) => {
|
|
36
|
+
proposal(request: QueryProposalRequest): Promise<QueryProposalResponse>;
|
|
37
|
+
proposals(request: QueryProposalsRequest): Promise<QueryProposalsResponse>;
|
|
38
|
+
vote(request: QueryVoteRequest): Promise<QueryVoteResponse>;
|
|
39
|
+
votes(request: QueryVotesRequest): Promise<QueryVotesResponse>;
|
|
40
|
+
params(request: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
41
|
+
deposit(request: QueryDepositRequest): Promise<QueryDepositResponse>;
|
|
42
|
+
deposits(request: QueryDepositsRequest): Promise<QueryDepositsResponse>;
|
|
43
|
+
tallyResult(request: QueryTallyResultRequest): Promise<QueryTallyResultResponse>;
|
|
44
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createRpcQueryExtension = exports.QueryClientImpl = void 0;
|
|
4
|
+
const binary_1 = require("../../../binary");
|
|
5
|
+
const stargate_1 = require("@cosmjs/stargate");
|
|
6
|
+
const query_1 = require("./query");
|
|
7
|
+
class QueryClientImpl {
|
|
8
|
+
rpc;
|
|
9
|
+
constructor(rpc) {
|
|
10
|
+
this.rpc = rpc;
|
|
11
|
+
this.proposal = this.proposal.bind(this);
|
|
12
|
+
this.proposals = this.proposals.bind(this);
|
|
13
|
+
this.vote = this.vote.bind(this);
|
|
14
|
+
this.votes = this.votes.bind(this);
|
|
15
|
+
this.params = this.params.bind(this);
|
|
16
|
+
this.deposit = this.deposit.bind(this);
|
|
17
|
+
this.deposits = this.deposits.bind(this);
|
|
18
|
+
this.tallyResult = this.tallyResult.bind(this);
|
|
19
|
+
}
|
|
20
|
+
proposal(request) {
|
|
21
|
+
const data = query_1.QueryProposalRequest.encode(request).finish();
|
|
22
|
+
const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Proposal", data);
|
|
23
|
+
return promise.then(data => query_1.QueryProposalResponse.decode(new binary_1.BinaryReader(data)));
|
|
24
|
+
}
|
|
25
|
+
proposals(request) {
|
|
26
|
+
const data = query_1.QueryProposalsRequest.encode(request).finish();
|
|
27
|
+
const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Proposals", data);
|
|
28
|
+
return promise.then(data => query_1.QueryProposalsResponse.decode(new binary_1.BinaryReader(data)));
|
|
29
|
+
}
|
|
30
|
+
vote(request) {
|
|
31
|
+
const data = query_1.QueryVoteRequest.encode(request).finish();
|
|
32
|
+
const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Vote", data);
|
|
33
|
+
return promise.then(data => query_1.QueryVoteResponse.decode(new binary_1.BinaryReader(data)));
|
|
34
|
+
}
|
|
35
|
+
votes(request) {
|
|
36
|
+
const data = query_1.QueryVotesRequest.encode(request).finish();
|
|
37
|
+
const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Votes", data);
|
|
38
|
+
return promise.then(data => query_1.QueryVotesResponse.decode(new binary_1.BinaryReader(data)));
|
|
39
|
+
}
|
|
40
|
+
params(request) {
|
|
41
|
+
const data = query_1.QueryParamsRequest.encode(request).finish();
|
|
42
|
+
const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Params", data);
|
|
43
|
+
return promise.then(data => query_1.QueryParamsResponse.decode(new binary_1.BinaryReader(data)));
|
|
44
|
+
}
|
|
45
|
+
deposit(request) {
|
|
46
|
+
const data = query_1.QueryDepositRequest.encode(request).finish();
|
|
47
|
+
const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Deposit", data);
|
|
48
|
+
return promise.then(data => query_1.QueryDepositResponse.decode(new binary_1.BinaryReader(data)));
|
|
49
|
+
}
|
|
50
|
+
deposits(request) {
|
|
51
|
+
const data = query_1.QueryDepositsRequest.encode(request).finish();
|
|
52
|
+
const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Deposits", data);
|
|
53
|
+
return promise.then(data => query_1.QueryDepositsResponse.decode(new binary_1.BinaryReader(data)));
|
|
54
|
+
}
|
|
55
|
+
tallyResult(request) {
|
|
56
|
+
const data = query_1.QueryTallyResultRequest.encode(request).finish();
|
|
57
|
+
const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "TallyResult", data);
|
|
58
|
+
return promise.then(data => query_1.QueryTallyResultResponse.decode(new binary_1.BinaryReader(data)));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.QueryClientImpl = QueryClientImpl;
|
|
62
|
+
const createRpcQueryExtension = (base) => {
|
|
63
|
+
const rpc = (0, stargate_1.createProtobufRpcClient)(base);
|
|
64
|
+
const queryService = new QueryClientImpl(rpc);
|
|
65
|
+
return {
|
|
66
|
+
proposal(request) {
|
|
67
|
+
return queryService.proposal(request);
|
|
68
|
+
},
|
|
69
|
+
proposals(request) {
|
|
70
|
+
return queryService.proposals(request);
|
|
71
|
+
},
|
|
72
|
+
vote(request) {
|
|
73
|
+
return queryService.vote(request);
|
|
74
|
+
},
|
|
75
|
+
votes(request) {
|
|
76
|
+
return queryService.votes(request);
|
|
77
|
+
},
|
|
78
|
+
params(request) {
|
|
79
|
+
return queryService.params(request);
|
|
80
|
+
},
|
|
81
|
+
deposit(request) {
|
|
82
|
+
return queryService.deposit(request);
|
|
83
|
+
},
|
|
84
|
+
deposits(request) {
|
|
85
|
+
return queryService.deposits(request);
|
|
86
|
+
},
|
|
87
|
+
tallyResult(request) {
|
|
88
|
+
return queryService.tallyResult(request);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
exports.createRpcQueryExtension = createRpcQueryExtension;
|