@gitopia/gitopiajs 0.0.4 → 0.0.6
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/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 +131 -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 +146 -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 +49 -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 +11 -8
- package/CHANGELOG.md +0 -8
|
@@ -0,0 +1,44 @@
|
|
|
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.params = this.params.bind(this);
|
|
11
|
+
this.tasks = this.tasks.bind(this);
|
|
12
|
+
this.reward = this.reward.bind(this);
|
|
13
|
+
this.rewardsAll = this.rewardsAll.bind(this);
|
|
14
|
+
}
|
|
15
|
+
/* Params returns the total set of rewards parameters. */
|
|
16
|
+
async params(_params = {}) {
|
|
17
|
+
const endpoint = `gitopia/gitopia/rewards/params`;
|
|
18
|
+
return await this.req.get(endpoint);
|
|
19
|
+
}
|
|
20
|
+
/* Queries a list of tasks items. */
|
|
21
|
+
async tasks(params) {
|
|
22
|
+
const endpoint = `gitopia/gitopia/rewards/tasks/${params.address}`;
|
|
23
|
+
return await this.req.get(endpoint);
|
|
24
|
+
}
|
|
25
|
+
/* Queries a Rewards by index. */
|
|
26
|
+
async reward(params) {
|
|
27
|
+
const endpoint = `gitopia/gitopia/rewards/rewards/${params.recipient}`;
|
|
28
|
+
return await this.req.get(endpoint);
|
|
29
|
+
}
|
|
30
|
+
/* Queries a list of Rewards items. */
|
|
31
|
+
async rewardsAll(params = {
|
|
32
|
+
pagination: undefined
|
|
33
|
+
}) {
|
|
34
|
+
const options = {
|
|
35
|
+
params: {}
|
|
36
|
+
};
|
|
37
|
+
if (typeof params?.pagination !== "undefined") {
|
|
38
|
+
(0, helpers_1.setPaginationParams)(options, params.pagination);
|
|
39
|
+
}
|
|
40
|
+
const endpoint = `gitopia/gitopia/rewards/rewards`;
|
|
41
|
+
return await this.req.get(endpoint, options);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.LCDQueryClient = LCDQueryClient;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Rpc } from "../../../helpers";
|
|
2
|
+
import { QueryClient } from "@cosmjs/stargate";
|
|
3
|
+
import { QueryParamsRequest, QueryParamsResponse, QueryTasksRequest, QueryTasksResponse, QueryGetRewardRequest, QueryGetRewardResponse, QueryAllRewardsRequest, QueryAllRewardsResponse } from "./query";
|
|
4
|
+
/** Query defines the gRPC querier service. */
|
|
5
|
+
export interface Query {
|
|
6
|
+
/** Params returns the total set of rewards parameters. */
|
|
7
|
+
params(request?: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
8
|
+
/** Queries a list of tasks items. */
|
|
9
|
+
tasks(request: QueryTasksRequest): Promise<QueryTasksResponse>;
|
|
10
|
+
/** Queries a Rewards by index. */
|
|
11
|
+
reward(request: QueryGetRewardRequest): Promise<QueryGetRewardResponse>;
|
|
12
|
+
/** Queries a list of Rewards items. */
|
|
13
|
+
rewardsAll(request?: QueryAllRewardsRequest): Promise<QueryAllRewardsResponse>;
|
|
14
|
+
}
|
|
15
|
+
export declare class QueryClientImpl implements Query {
|
|
16
|
+
private readonly rpc;
|
|
17
|
+
constructor(rpc: Rpc);
|
|
18
|
+
params(request?: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
19
|
+
tasks(request: QueryTasksRequest): Promise<QueryTasksResponse>;
|
|
20
|
+
reward(request: QueryGetRewardRequest): Promise<QueryGetRewardResponse>;
|
|
21
|
+
rewardsAll(request?: QueryAllRewardsRequest): Promise<QueryAllRewardsResponse>;
|
|
22
|
+
}
|
|
23
|
+
export declare const createRpcQueryExtension: (base: QueryClient) => {
|
|
24
|
+
params(request?: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
25
|
+
tasks(request: QueryTasksRequest): Promise<QueryTasksResponse>;
|
|
26
|
+
reward(request: QueryGetRewardRequest): Promise<QueryGetRewardResponse>;
|
|
27
|
+
rewardsAll(request?: QueryAllRewardsRequest): Promise<QueryAllRewardsResponse>;
|
|
28
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
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.params = this.params.bind(this);
|
|
12
|
+
this.tasks = this.tasks.bind(this);
|
|
13
|
+
this.reward = this.reward.bind(this);
|
|
14
|
+
this.rewardsAll = this.rewardsAll.bind(this);
|
|
15
|
+
}
|
|
16
|
+
params(request = {}) {
|
|
17
|
+
const data = query_1.QueryParamsRequest.encode(request).finish();
|
|
18
|
+
const promise = this.rpc.request("gitopia.gitopia.rewards.Query", "Params", data);
|
|
19
|
+
return promise.then(data => query_1.QueryParamsResponse.decode(new binary_1.BinaryReader(data)));
|
|
20
|
+
}
|
|
21
|
+
tasks(request) {
|
|
22
|
+
const data = query_1.QueryTasksRequest.encode(request).finish();
|
|
23
|
+
const promise = this.rpc.request("gitopia.gitopia.rewards.Query", "Tasks", data);
|
|
24
|
+
return promise.then(data => query_1.QueryTasksResponse.decode(new binary_1.BinaryReader(data)));
|
|
25
|
+
}
|
|
26
|
+
reward(request) {
|
|
27
|
+
const data = query_1.QueryGetRewardRequest.encode(request).finish();
|
|
28
|
+
const promise = this.rpc.request("gitopia.gitopia.rewards.Query", "Reward", data);
|
|
29
|
+
return promise.then(data => query_1.QueryGetRewardResponse.decode(new binary_1.BinaryReader(data)));
|
|
30
|
+
}
|
|
31
|
+
rewardsAll(request = {
|
|
32
|
+
pagination: undefined
|
|
33
|
+
}) {
|
|
34
|
+
const data = query_1.QueryAllRewardsRequest.encode(request).finish();
|
|
35
|
+
const promise = this.rpc.request("gitopia.gitopia.rewards.Query", "RewardsAll", data);
|
|
36
|
+
return promise.then(data => query_1.QueryAllRewardsResponse.decode(new binary_1.BinaryReader(data)));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.QueryClientImpl = QueryClientImpl;
|
|
40
|
+
const createRpcQueryExtension = (base) => {
|
|
41
|
+
const rpc = (0, stargate_1.createProtobufRpcClient)(base);
|
|
42
|
+
const queryService = new QueryClientImpl(rpc);
|
|
43
|
+
return {
|
|
44
|
+
params(request) {
|
|
45
|
+
return queryService.params(request);
|
|
46
|
+
},
|
|
47
|
+
tasks(request) {
|
|
48
|
+
return queryService.tasks(request);
|
|
49
|
+
},
|
|
50
|
+
reward(request) {
|
|
51
|
+
return queryService.reward(request);
|
|
52
|
+
},
|
|
53
|
+
rewardsAll(request) {
|
|
54
|
+
return queryService.rewardsAll(request);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
exports.createRpcQueryExtension = createRpcQueryExtension;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Series } from "./pool";
|
|
2
|
+
import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin";
|
|
3
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
4
|
+
/** a map from recipient to all her rewards */
|
|
5
|
+
export interface Reward {
|
|
6
|
+
recipient: string;
|
|
7
|
+
rewards: RecipientReward[];
|
|
8
|
+
}
|
|
9
|
+
export interface RewardProtoMsg {
|
|
10
|
+
typeUrl: "/gitopia.gitopia.rewards.Reward";
|
|
11
|
+
value: Uint8Array;
|
|
12
|
+
}
|
|
13
|
+
/** a map from recipient to all her rewards */
|
|
14
|
+
export interface RewardAmino {
|
|
15
|
+
recipient?: string;
|
|
16
|
+
rewards?: RecipientRewardAmino[];
|
|
17
|
+
}
|
|
18
|
+
export interface RewardAminoMsg {
|
|
19
|
+
type: "/gitopia.gitopia.rewards.Reward";
|
|
20
|
+
value: RewardAmino;
|
|
21
|
+
}
|
|
22
|
+
/** a map from recipient to all her rewards */
|
|
23
|
+
export interface RewardSDKType {
|
|
24
|
+
recipient: string;
|
|
25
|
+
rewards: RecipientRewardSDKType[];
|
|
26
|
+
}
|
|
27
|
+
export interface RecipientReward {
|
|
28
|
+
series: Series;
|
|
29
|
+
amount: Coin;
|
|
30
|
+
creator: string;
|
|
31
|
+
claimedAmount: Coin;
|
|
32
|
+
claimedAmountWithDecay: Coin;
|
|
33
|
+
}
|
|
34
|
+
export interface RecipientRewardProtoMsg {
|
|
35
|
+
typeUrl: "/gitopia.gitopia.rewards.RecipientReward";
|
|
36
|
+
value: Uint8Array;
|
|
37
|
+
}
|
|
38
|
+
export interface RecipientRewardAmino {
|
|
39
|
+
series?: Series;
|
|
40
|
+
amount?: CoinAmino;
|
|
41
|
+
creator?: string;
|
|
42
|
+
claimed_amount?: CoinAmino;
|
|
43
|
+
claimed_amount_with_decay?: CoinAmino;
|
|
44
|
+
}
|
|
45
|
+
export interface RecipientRewardAminoMsg {
|
|
46
|
+
type: "/gitopia.gitopia.rewards.RecipientReward";
|
|
47
|
+
value: RecipientRewardAmino;
|
|
48
|
+
}
|
|
49
|
+
export interface RecipientRewardSDKType {
|
|
50
|
+
series: Series;
|
|
51
|
+
amount: CoinSDKType;
|
|
52
|
+
creator: string;
|
|
53
|
+
claimed_amount: CoinSDKType;
|
|
54
|
+
claimed_amount_with_decay: CoinSDKType;
|
|
55
|
+
}
|
|
56
|
+
export declare const Reward: {
|
|
57
|
+
typeUrl: string;
|
|
58
|
+
encode(message: Reward, writer?: BinaryWriter): BinaryWriter;
|
|
59
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Reward;
|
|
60
|
+
fromPartial(object: Partial<Reward>): Reward;
|
|
61
|
+
fromAmino(object: RewardAmino): Reward;
|
|
62
|
+
toAmino(message: Reward): RewardAmino;
|
|
63
|
+
fromAminoMsg(object: RewardAminoMsg): Reward;
|
|
64
|
+
fromProtoMsg(message: RewardProtoMsg): Reward;
|
|
65
|
+
toProto(message: Reward): Uint8Array;
|
|
66
|
+
toProtoMsg(message: Reward): RewardProtoMsg;
|
|
67
|
+
};
|
|
68
|
+
export declare const RecipientReward: {
|
|
69
|
+
typeUrl: string;
|
|
70
|
+
encode(message: RecipientReward, writer?: BinaryWriter): BinaryWriter;
|
|
71
|
+
decode(input: BinaryReader | Uint8Array, length?: number): RecipientReward;
|
|
72
|
+
fromPartial(object: Partial<RecipientReward>): RecipientReward;
|
|
73
|
+
fromAmino(object: RecipientRewardAmino): RecipientReward;
|
|
74
|
+
toAmino(message: RecipientReward): RecipientRewardAmino;
|
|
75
|
+
fromAminoMsg(object: RecipientRewardAminoMsg): RecipientReward;
|
|
76
|
+
fromProtoMsg(message: RecipientRewardProtoMsg): RecipientReward;
|
|
77
|
+
toProto(message: RecipientReward): Uint8Array;
|
|
78
|
+
toProtoMsg(message: RecipientReward): RecipientRewardProtoMsg;
|
|
79
|
+
};
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecipientReward = exports.Reward = void 0;
|
|
4
|
+
const coin_1 = require("../../../cosmos/base/v1beta1/coin");
|
|
5
|
+
const binary_1 = require("../../../binary");
|
|
6
|
+
function createBaseReward() {
|
|
7
|
+
return {
|
|
8
|
+
recipient: "",
|
|
9
|
+
rewards: []
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
exports.Reward = {
|
|
13
|
+
typeUrl: "/gitopia.gitopia.rewards.Reward",
|
|
14
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
15
|
+
if (message.recipient !== "") {
|
|
16
|
+
writer.uint32(10).string(message.recipient);
|
|
17
|
+
}
|
|
18
|
+
for (const v of message.rewards) {
|
|
19
|
+
exports.RecipientReward.encode(v, writer.uint32(18).fork()).ldelim();
|
|
20
|
+
}
|
|
21
|
+
return writer;
|
|
22
|
+
},
|
|
23
|
+
decode(input, length) {
|
|
24
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
25
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
26
|
+
const message = createBaseReward();
|
|
27
|
+
while (reader.pos < end) {
|
|
28
|
+
const tag = reader.uint32();
|
|
29
|
+
switch (tag >>> 3) {
|
|
30
|
+
case 1:
|
|
31
|
+
message.recipient = reader.string();
|
|
32
|
+
break;
|
|
33
|
+
case 2:
|
|
34
|
+
message.rewards.push(exports.RecipientReward.decode(reader, reader.uint32()));
|
|
35
|
+
break;
|
|
36
|
+
default:
|
|
37
|
+
reader.skipType(tag & 7);
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return message;
|
|
42
|
+
},
|
|
43
|
+
fromPartial(object) {
|
|
44
|
+
const message = createBaseReward();
|
|
45
|
+
message.recipient = object.recipient ?? "";
|
|
46
|
+
message.rewards = object.rewards?.map(e => exports.RecipientReward.fromPartial(e)) || [];
|
|
47
|
+
return message;
|
|
48
|
+
},
|
|
49
|
+
fromAmino(object) {
|
|
50
|
+
const message = createBaseReward();
|
|
51
|
+
if (object.recipient !== undefined && object.recipient !== null) {
|
|
52
|
+
message.recipient = object.recipient;
|
|
53
|
+
}
|
|
54
|
+
message.rewards = object.rewards?.map(e => exports.RecipientReward.fromAmino(e)) || [];
|
|
55
|
+
return message;
|
|
56
|
+
},
|
|
57
|
+
toAmino(message) {
|
|
58
|
+
const obj = {};
|
|
59
|
+
obj.recipient = message.recipient === "" ? undefined : message.recipient;
|
|
60
|
+
if (message.rewards) {
|
|
61
|
+
obj.rewards = message.rewards.map(e => e ? exports.RecipientReward.toAmino(e) : undefined);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
obj.rewards = message.rewards;
|
|
65
|
+
}
|
|
66
|
+
return obj;
|
|
67
|
+
},
|
|
68
|
+
fromAminoMsg(object) {
|
|
69
|
+
return exports.Reward.fromAmino(object.value);
|
|
70
|
+
},
|
|
71
|
+
fromProtoMsg(message) {
|
|
72
|
+
return exports.Reward.decode(message.value);
|
|
73
|
+
},
|
|
74
|
+
toProto(message) {
|
|
75
|
+
return exports.Reward.encode(message).finish();
|
|
76
|
+
},
|
|
77
|
+
toProtoMsg(message) {
|
|
78
|
+
return {
|
|
79
|
+
typeUrl: "/gitopia.gitopia.rewards.Reward",
|
|
80
|
+
value: exports.Reward.encode(message).finish()
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
function createBaseRecipientReward() {
|
|
85
|
+
return {
|
|
86
|
+
series: 0,
|
|
87
|
+
amount: coin_1.Coin.fromPartial({}),
|
|
88
|
+
creator: "",
|
|
89
|
+
claimedAmount: coin_1.Coin.fromPartial({}),
|
|
90
|
+
claimedAmountWithDecay: coin_1.Coin.fromPartial({})
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
exports.RecipientReward = {
|
|
94
|
+
typeUrl: "/gitopia.gitopia.rewards.RecipientReward",
|
|
95
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
96
|
+
if (message.series !== 0) {
|
|
97
|
+
writer.uint32(8).int32(message.series);
|
|
98
|
+
}
|
|
99
|
+
if (message.amount !== undefined) {
|
|
100
|
+
coin_1.Coin.encode(message.amount, writer.uint32(18).fork()).ldelim();
|
|
101
|
+
}
|
|
102
|
+
if (message.creator !== "") {
|
|
103
|
+
writer.uint32(26).string(message.creator);
|
|
104
|
+
}
|
|
105
|
+
if (message.claimedAmount !== undefined) {
|
|
106
|
+
coin_1.Coin.encode(message.claimedAmount, writer.uint32(34).fork()).ldelim();
|
|
107
|
+
}
|
|
108
|
+
if (message.claimedAmountWithDecay !== undefined) {
|
|
109
|
+
coin_1.Coin.encode(message.claimedAmountWithDecay, writer.uint32(42).fork()).ldelim();
|
|
110
|
+
}
|
|
111
|
+
return writer;
|
|
112
|
+
},
|
|
113
|
+
decode(input, length) {
|
|
114
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
115
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
116
|
+
const message = createBaseRecipientReward();
|
|
117
|
+
while (reader.pos < end) {
|
|
118
|
+
const tag = reader.uint32();
|
|
119
|
+
switch (tag >>> 3) {
|
|
120
|
+
case 1:
|
|
121
|
+
message.series = reader.int32();
|
|
122
|
+
break;
|
|
123
|
+
case 2:
|
|
124
|
+
message.amount = coin_1.Coin.decode(reader, reader.uint32());
|
|
125
|
+
break;
|
|
126
|
+
case 3:
|
|
127
|
+
message.creator = reader.string();
|
|
128
|
+
break;
|
|
129
|
+
case 4:
|
|
130
|
+
message.claimedAmount = coin_1.Coin.decode(reader, reader.uint32());
|
|
131
|
+
break;
|
|
132
|
+
case 5:
|
|
133
|
+
message.claimedAmountWithDecay = coin_1.Coin.decode(reader, reader.uint32());
|
|
134
|
+
break;
|
|
135
|
+
default:
|
|
136
|
+
reader.skipType(tag & 7);
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return message;
|
|
141
|
+
},
|
|
142
|
+
fromPartial(object) {
|
|
143
|
+
const message = createBaseRecipientReward();
|
|
144
|
+
message.series = object.series ?? 0;
|
|
145
|
+
message.amount = object.amount !== undefined && object.amount !== null ? coin_1.Coin.fromPartial(object.amount) : undefined;
|
|
146
|
+
message.creator = object.creator ?? "";
|
|
147
|
+
message.claimedAmount = object.claimedAmount !== undefined && object.claimedAmount !== null ? coin_1.Coin.fromPartial(object.claimedAmount) : undefined;
|
|
148
|
+
message.claimedAmountWithDecay = object.claimedAmountWithDecay !== undefined && object.claimedAmountWithDecay !== null ? coin_1.Coin.fromPartial(object.claimedAmountWithDecay) : undefined;
|
|
149
|
+
return message;
|
|
150
|
+
},
|
|
151
|
+
fromAmino(object) {
|
|
152
|
+
const message = createBaseRecipientReward();
|
|
153
|
+
if (object.series !== undefined && object.series !== null) {
|
|
154
|
+
message.series = object.series;
|
|
155
|
+
}
|
|
156
|
+
if (object.amount !== undefined && object.amount !== null) {
|
|
157
|
+
message.amount = coin_1.Coin.fromAmino(object.amount);
|
|
158
|
+
}
|
|
159
|
+
if (object.creator !== undefined && object.creator !== null) {
|
|
160
|
+
message.creator = object.creator;
|
|
161
|
+
}
|
|
162
|
+
if (object.claimed_amount !== undefined && object.claimed_amount !== null) {
|
|
163
|
+
message.claimedAmount = coin_1.Coin.fromAmino(object.claimed_amount);
|
|
164
|
+
}
|
|
165
|
+
if (object.claimed_amount_with_decay !== undefined && object.claimed_amount_with_decay !== null) {
|
|
166
|
+
message.claimedAmountWithDecay = coin_1.Coin.fromAmino(object.claimed_amount_with_decay);
|
|
167
|
+
}
|
|
168
|
+
return message;
|
|
169
|
+
},
|
|
170
|
+
toAmino(message) {
|
|
171
|
+
const obj = {};
|
|
172
|
+
obj.series = message.series === 0 ? undefined : message.series;
|
|
173
|
+
obj.amount = message.amount ? coin_1.Coin.toAmino(message.amount) : undefined;
|
|
174
|
+
obj.creator = message.creator === "" ? undefined : message.creator;
|
|
175
|
+
obj.claimed_amount = message.claimedAmount ? coin_1.Coin.toAmino(message.claimedAmount) : undefined;
|
|
176
|
+
obj.claimed_amount_with_decay = message.claimedAmountWithDecay ? coin_1.Coin.toAmino(message.claimedAmountWithDecay) : undefined;
|
|
177
|
+
return obj;
|
|
178
|
+
},
|
|
179
|
+
fromAminoMsg(object) {
|
|
180
|
+
return exports.RecipientReward.fromAmino(object.value);
|
|
181
|
+
},
|
|
182
|
+
fromProtoMsg(message) {
|
|
183
|
+
return exports.RecipientReward.decode(message.value);
|
|
184
|
+
},
|
|
185
|
+
toProto(message) {
|
|
186
|
+
return exports.RecipientReward.encode(message).finish();
|
|
187
|
+
},
|
|
188
|
+
toProtoMsg(message) {
|
|
189
|
+
return {
|
|
190
|
+
typeUrl: "/gitopia.gitopia.rewards.RecipientReward",
|
|
191
|
+
value: exports.RecipientReward.encode(message).finish()
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
2
|
+
export declare enum taskType {
|
|
3
|
+
UNKNOWN = 0,
|
|
4
|
+
CREATE_USER = 1,
|
|
5
|
+
CREATE_NON_EMPTY_REPO = 2,
|
|
6
|
+
CREATE_ISSUE = 3,
|
|
7
|
+
CREATE_ISSUE_WITH_BOUNTY = 4,
|
|
8
|
+
CREATE_ISSUE_WITH_BOUNTY_VERIFIED = 5,
|
|
9
|
+
PR_TO_REPO_MERGED = 6,
|
|
10
|
+
PR_TO_VERIFIED_REPO_MERGED = 7,
|
|
11
|
+
PR_TO_VERIFIED_REPO_MERGED_WITH_BOUNTY = 8,
|
|
12
|
+
LORE_STAKED = 9,
|
|
13
|
+
VOTE_PROPOSAL = 10,
|
|
14
|
+
UNRECOGNIZED = -1
|
|
15
|
+
}
|
|
16
|
+
export declare const taskTypeSDKType: typeof taskType;
|
|
17
|
+
export declare const taskTypeAmino: typeof taskType;
|
|
18
|
+
export declare function taskTypeFromJSON(object: any): taskType;
|
|
19
|
+
export declare function taskTypeToJSON(object: taskType): string;
|
|
20
|
+
export interface Task {
|
|
21
|
+
type: taskType;
|
|
22
|
+
isComplete: boolean;
|
|
23
|
+
weight: number;
|
|
24
|
+
}
|
|
25
|
+
export interface TaskProtoMsg {
|
|
26
|
+
typeUrl: "/gitopia.gitopia.rewards.Task";
|
|
27
|
+
value: Uint8Array;
|
|
28
|
+
}
|
|
29
|
+
export interface TaskAmino {
|
|
30
|
+
type?: taskType;
|
|
31
|
+
isComplete?: boolean;
|
|
32
|
+
weight?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface TaskAminoMsg {
|
|
35
|
+
type: "/gitopia.gitopia.rewards.Task";
|
|
36
|
+
value: TaskAmino;
|
|
37
|
+
}
|
|
38
|
+
export interface TaskSDKType {
|
|
39
|
+
type: taskType;
|
|
40
|
+
isComplete: boolean;
|
|
41
|
+
weight: number;
|
|
42
|
+
}
|
|
43
|
+
export declare const Task: {
|
|
44
|
+
typeUrl: string;
|
|
45
|
+
encode(message: Task, writer?: BinaryWriter): BinaryWriter;
|
|
46
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Task;
|
|
47
|
+
fromPartial(object: Partial<Task>): Task;
|
|
48
|
+
fromAmino(object: TaskAmino): Task;
|
|
49
|
+
toAmino(message: Task): TaskAmino;
|
|
50
|
+
fromAminoMsg(object: TaskAminoMsg): Task;
|
|
51
|
+
fromProtoMsg(message: TaskProtoMsg): Task;
|
|
52
|
+
toProto(message: Task): Uint8Array;
|
|
53
|
+
toProtoMsg(message: Task): TaskProtoMsg;
|
|
54
|
+
};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Task = exports.taskTypeAmino = exports.taskTypeSDKType = exports.taskType = void 0;
|
|
4
|
+
exports.taskTypeFromJSON = taskTypeFromJSON;
|
|
5
|
+
exports.taskTypeToJSON = taskTypeToJSON;
|
|
6
|
+
//@ts-nocheck
|
|
7
|
+
const binary_1 = require("../../../binary");
|
|
8
|
+
var taskType;
|
|
9
|
+
(function (taskType) {
|
|
10
|
+
taskType[taskType["UNKNOWN"] = 0] = "UNKNOWN";
|
|
11
|
+
taskType[taskType["CREATE_USER"] = 1] = "CREATE_USER";
|
|
12
|
+
taskType[taskType["CREATE_NON_EMPTY_REPO"] = 2] = "CREATE_NON_EMPTY_REPO";
|
|
13
|
+
taskType[taskType["CREATE_ISSUE"] = 3] = "CREATE_ISSUE";
|
|
14
|
+
taskType[taskType["CREATE_ISSUE_WITH_BOUNTY"] = 4] = "CREATE_ISSUE_WITH_BOUNTY";
|
|
15
|
+
taskType[taskType["CREATE_ISSUE_WITH_BOUNTY_VERIFIED"] = 5] = "CREATE_ISSUE_WITH_BOUNTY_VERIFIED";
|
|
16
|
+
taskType[taskType["PR_TO_REPO_MERGED"] = 6] = "PR_TO_REPO_MERGED";
|
|
17
|
+
taskType[taskType["PR_TO_VERIFIED_REPO_MERGED"] = 7] = "PR_TO_VERIFIED_REPO_MERGED";
|
|
18
|
+
taskType[taskType["PR_TO_VERIFIED_REPO_MERGED_WITH_BOUNTY"] = 8] = "PR_TO_VERIFIED_REPO_MERGED_WITH_BOUNTY";
|
|
19
|
+
taskType[taskType["LORE_STAKED"] = 9] = "LORE_STAKED";
|
|
20
|
+
taskType[taskType["VOTE_PROPOSAL"] = 10] = "VOTE_PROPOSAL";
|
|
21
|
+
taskType[taskType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
22
|
+
})(taskType || (exports.taskType = taskType = {}));
|
|
23
|
+
exports.taskTypeSDKType = taskType;
|
|
24
|
+
exports.taskTypeAmino = taskType;
|
|
25
|
+
function taskTypeFromJSON(object) {
|
|
26
|
+
switch (object) {
|
|
27
|
+
case 0:
|
|
28
|
+
case "UNKNOWN":
|
|
29
|
+
return taskType.UNKNOWN;
|
|
30
|
+
case 1:
|
|
31
|
+
case "CREATE_USER":
|
|
32
|
+
return taskType.CREATE_USER;
|
|
33
|
+
case 2:
|
|
34
|
+
case "CREATE_NON_EMPTY_REPO":
|
|
35
|
+
return taskType.CREATE_NON_EMPTY_REPO;
|
|
36
|
+
case 3:
|
|
37
|
+
case "CREATE_ISSUE":
|
|
38
|
+
return taskType.CREATE_ISSUE;
|
|
39
|
+
case 4:
|
|
40
|
+
case "CREATE_ISSUE_WITH_BOUNTY":
|
|
41
|
+
return taskType.CREATE_ISSUE_WITH_BOUNTY;
|
|
42
|
+
case 5:
|
|
43
|
+
case "CREATE_ISSUE_WITH_BOUNTY_VERIFIED":
|
|
44
|
+
return taskType.CREATE_ISSUE_WITH_BOUNTY_VERIFIED;
|
|
45
|
+
case 6:
|
|
46
|
+
case "PR_TO_REPO_MERGED":
|
|
47
|
+
return taskType.PR_TO_REPO_MERGED;
|
|
48
|
+
case 7:
|
|
49
|
+
case "PR_TO_VERIFIED_REPO_MERGED":
|
|
50
|
+
return taskType.PR_TO_VERIFIED_REPO_MERGED;
|
|
51
|
+
case 8:
|
|
52
|
+
case "PR_TO_VERIFIED_REPO_MERGED_WITH_BOUNTY":
|
|
53
|
+
return taskType.PR_TO_VERIFIED_REPO_MERGED_WITH_BOUNTY;
|
|
54
|
+
case 9:
|
|
55
|
+
case "LORE_STAKED":
|
|
56
|
+
return taskType.LORE_STAKED;
|
|
57
|
+
case 10:
|
|
58
|
+
case "VOTE_PROPOSAL":
|
|
59
|
+
return taskType.VOTE_PROPOSAL;
|
|
60
|
+
case -1:
|
|
61
|
+
case "UNRECOGNIZED":
|
|
62
|
+
default:
|
|
63
|
+
return taskType.UNRECOGNIZED;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function taskTypeToJSON(object) {
|
|
67
|
+
switch (object) {
|
|
68
|
+
case taskType.UNKNOWN:
|
|
69
|
+
return "UNKNOWN";
|
|
70
|
+
case taskType.CREATE_USER:
|
|
71
|
+
return "CREATE_USER";
|
|
72
|
+
case taskType.CREATE_NON_EMPTY_REPO:
|
|
73
|
+
return "CREATE_NON_EMPTY_REPO";
|
|
74
|
+
case taskType.CREATE_ISSUE:
|
|
75
|
+
return "CREATE_ISSUE";
|
|
76
|
+
case taskType.CREATE_ISSUE_WITH_BOUNTY:
|
|
77
|
+
return "CREATE_ISSUE_WITH_BOUNTY";
|
|
78
|
+
case taskType.CREATE_ISSUE_WITH_BOUNTY_VERIFIED:
|
|
79
|
+
return "CREATE_ISSUE_WITH_BOUNTY_VERIFIED";
|
|
80
|
+
case taskType.PR_TO_REPO_MERGED:
|
|
81
|
+
return "PR_TO_REPO_MERGED";
|
|
82
|
+
case taskType.PR_TO_VERIFIED_REPO_MERGED:
|
|
83
|
+
return "PR_TO_VERIFIED_REPO_MERGED";
|
|
84
|
+
case taskType.PR_TO_VERIFIED_REPO_MERGED_WITH_BOUNTY:
|
|
85
|
+
return "PR_TO_VERIFIED_REPO_MERGED_WITH_BOUNTY";
|
|
86
|
+
case taskType.LORE_STAKED:
|
|
87
|
+
return "LORE_STAKED";
|
|
88
|
+
case taskType.VOTE_PROPOSAL:
|
|
89
|
+
return "VOTE_PROPOSAL";
|
|
90
|
+
case taskType.UNRECOGNIZED:
|
|
91
|
+
default:
|
|
92
|
+
return "UNRECOGNIZED";
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function createBaseTask() {
|
|
96
|
+
return {
|
|
97
|
+
type: 0,
|
|
98
|
+
isComplete: false,
|
|
99
|
+
weight: 0
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
exports.Task = {
|
|
103
|
+
typeUrl: "/gitopia.gitopia.rewards.Task",
|
|
104
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
105
|
+
if (message.type !== 0) {
|
|
106
|
+
writer.uint32(8).int32(message.type);
|
|
107
|
+
}
|
|
108
|
+
if (message.isComplete === true) {
|
|
109
|
+
writer.uint32(16).bool(message.isComplete);
|
|
110
|
+
}
|
|
111
|
+
if (message.weight !== 0) {
|
|
112
|
+
writer.uint32(24).int32(message.weight);
|
|
113
|
+
}
|
|
114
|
+
return writer;
|
|
115
|
+
},
|
|
116
|
+
decode(input, length) {
|
|
117
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
118
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
119
|
+
const message = createBaseTask();
|
|
120
|
+
while (reader.pos < end) {
|
|
121
|
+
const tag = reader.uint32();
|
|
122
|
+
switch (tag >>> 3) {
|
|
123
|
+
case 1:
|
|
124
|
+
message.type = reader.int32();
|
|
125
|
+
break;
|
|
126
|
+
case 2:
|
|
127
|
+
message.isComplete = reader.bool();
|
|
128
|
+
break;
|
|
129
|
+
case 3:
|
|
130
|
+
message.weight = reader.int32();
|
|
131
|
+
break;
|
|
132
|
+
default:
|
|
133
|
+
reader.skipType(tag & 7);
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return message;
|
|
138
|
+
},
|
|
139
|
+
fromPartial(object) {
|
|
140
|
+
const message = createBaseTask();
|
|
141
|
+
message.type = object.type ?? 0;
|
|
142
|
+
message.isComplete = object.isComplete ?? false;
|
|
143
|
+
message.weight = object.weight ?? 0;
|
|
144
|
+
return message;
|
|
145
|
+
},
|
|
146
|
+
fromAmino(object) {
|
|
147
|
+
const message = createBaseTask();
|
|
148
|
+
if (object.type !== undefined && object.type !== null) {
|
|
149
|
+
message.type = object.type;
|
|
150
|
+
}
|
|
151
|
+
if (object.isComplete !== undefined && object.isComplete !== null) {
|
|
152
|
+
message.isComplete = object.isComplete;
|
|
153
|
+
}
|
|
154
|
+
if (object.weight !== undefined && object.weight !== null) {
|
|
155
|
+
message.weight = object.weight;
|
|
156
|
+
}
|
|
157
|
+
return message;
|
|
158
|
+
},
|
|
159
|
+
toAmino(message) {
|
|
160
|
+
const obj = {};
|
|
161
|
+
obj.type = message.type === 0 ? undefined : message.type;
|
|
162
|
+
obj.isComplete = message.isComplete === false ? undefined : message.isComplete;
|
|
163
|
+
obj.weight = message.weight === 0 ? undefined : message.weight;
|
|
164
|
+
return obj;
|
|
165
|
+
},
|
|
166
|
+
fromAminoMsg(object) {
|
|
167
|
+
return exports.Task.fromAmino(object.value);
|
|
168
|
+
},
|
|
169
|
+
fromProtoMsg(message) {
|
|
170
|
+
return exports.Task.decode(message.value);
|
|
171
|
+
},
|
|
172
|
+
toProto(message) {
|
|
173
|
+
return exports.Task.encode(message).finish();
|
|
174
|
+
},
|
|
175
|
+
toProtoMsg(message) {
|
|
176
|
+
return {
|
|
177
|
+
typeUrl: "/gitopia.gitopia.rewards.Task",
|
|
178
|
+
value: exports.Task.encode(message).finish()
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MsgClaim, MsgCreateReward, MsgUpdateParams } from "./tx";
|
|
2
|
+
export declare const AminoConverter: {
|
|
3
|
+
"/gitopia.gitopia.rewards.MsgClaim": {
|
|
4
|
+
aminoType: string;
|
|
5
|
+
toAmino: (message: MsgClaim) => import("./tx").MsgClaimAmino;
|
|
6
|
+
fromAmino: (object: import("./tx").MsgClaimAmino) => MsgClaim;
|
|
7
|
+
};
|
|
8
|
+
"/gitopia.gitopia.rewards.MsgCreateReward": {
|
|
9
|
+
aminoType: string;
|
|
10
|
+
toAmino: (message: MsgCreateReward) => import("./tx").MsgCreateRewardAmino;
|
|
11
|
+
fromAmino: (object: import("./tx").MsgCreateRewardAmino) => MsgCreateReward;
|
|
12
|
+
};
|
|
13
|
+
"/gitopia.gitopia.rewards.MsgUpdateParams": {
|
|
14
|
+
aminoType: string;
|
|
15
|
+
toAmino: (message: MsgUpdateParams) => import("./tx").MsgUpdateParamsAmino;
|
|
16
|
+
fromAmino: (object: import("./tx").MsgUpdateParamsAmino) => MsgUpdateParams;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AminoConverter = void 0;
|
|
4
|
+
//@ts-nocheck
|
|
5
|
+
const tx_1 = require("./tx");
|
|
6
|
+
exports.AminoConverter = {
|
|
7
|
+
"/gitopia.gitopia.rewards.MsgClaim": {
|
|
8
|
+
aminoType: "/gitopia.gitopia.rewards.MsgClaim",
|
|
9
|
+
toAmino: tx_1.MsgClaim.toAmino,
|
|
10
|
+
fromAmino: tx_1.MsgClaim.fromAmino
|
|
11
|
+
},
|
|
12
|
+
"/gitopia.gitopia.rewards.MsgCreateReward": {
|
|
13
|
+
aminoType: "/gitopia.gitopia.rewards.MsgCreateReward",
|
|
14
|
+
toAmino: tx_1.MsgCreateReward.toAmino,
|
|
15
|
+
fromAmino: tx_1.MsgCreateReward.fromAmino
|
|
16
|
+
},
|
|
17
|
+
"/gitopia.gitopia.rewards.MsgUpdateParams": {
|
|
18
|
+
aminoType: "/gitopia.gitopia.rewards.MsgUpdateParams",
|
|
19
|
+
toAmino: tx_1.MsgUpdateParams.toAmino,
|
|
20
|
+
fromAmino: tx_1.MsgUpdateParams.fromAmino
|
|
21
|
+
}
|
|
22
|
+
};
|