@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,71 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import { BinaryReader, BinaryWriter } from "../../binary";
|
|
3
|
+
function createBaseDuration() {
|
|
4
|
+
return {
|
|
5
|
+
seconds: BigInt(0),
|
|
6
|
+
nanos: 0
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export const Duration = {
|
|
10
|
+
typeUrl: "/google.protobuf.Duration",
|
|
11
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
12
|
+
if (message.seconds !== BigInt(0)) {
|
|
13
|
+
writer.uint32(8).int64(message.seconds);
|
|
14
|
+
}
|
|
15
|
+
if (message.nanos !== 0) {
|
|
16
|
+
writer.uint32(16).int32(message.nanos);
|
|
17
|
+
}
|
|
18
|
+
return writer;
|
|
19
|
+
},
|
|
20
|
+
decode(input, length) {
|
|
21
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
22
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
23
|
+
const message = createBaseDuration();
|
|
24
|
+
while (reader.pos < end) {
|
|
25
|
+
const tag = reader.uint32();
|
|
26
|
+
switch (tag >>> 3) {
|
|
27
|
+
case 1:
|
|
28
|
+
message.seconds = reader.int64();
|
|
29
|
+
break;
|
|
30
|
+
case 2:
|
|
31
|
+
message.nanos = reader.int32();
|
|
32
|
+
break;
|
|
33
|
+
default:
|
|
34
|
+
reader.skipType(tag & 7);
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return message;
|
|
39
|
+
},
|
|
40
|
+
fromPartial(object) {
|
|
41
|
+
const message = createBaseDuration();
|
|
42
|
+
message.seconds = object.seconds !== undefined && object.seconds !== null ? BigInt(object.seconds.toString()) : BigInt(0);
|
|
43
|
+
message.nanos = object.nanos ?? 0;
|
|
44
|
+
return message;
|
|
45
|
+
},
|
|
46
|
+
fromAmino(object) {
|
|
47
|
+
const value = BigInt(object);
|
|
48
|
+
return {
|
|
49
|
+
seconds: value / BigInt("1000000000"),
|
|
50
|
+
nanos: Number(value % BigInt("1000000000"))
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
toAmino(message) {
|
|
54
|
+
return (message.seconds * BigInt("1000000000") + BigInt(message.nanos)).toString();
|
|
55
|
+
},
|
|
56
|
+
fromAminoMsg(object) {
|
|
57
|
+
return Duration.fromAmino(object.value);
|
|
58
|
+
},
|
|
59
|
+
fromProtoMsg(message) {
|
|
60
|
+
return Duration.decode(message.value);
|
|
61
|
+
},
|
|
62
|
+
toProto(message) {
|
|
63
|
+
return Duration.encode(message).finish();
|
|
64
|
+
},
|
|
65
|
+
toProtoMsg(message) {
|
|
66
|
+
return {
|
|
67
|
+
typeUrl: "/google.protobuf.Duration",
|
|
68
|
+
value: Duration.encode(message).finish()
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import { BinaryReader, BinaryWriter } from "../../binary";
|
|
3
|
+
import { fromJsonTimestamp, fromTimestamp } from "../../helpers";
|
|
4
|
+
function createBaseTimestamp() {
|
|
5
|
+
return {
|
|
6
|
+
seconds: BigInt(0),
|
|
7
|
+
nanos: 0
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export const Timestamp = {
|
|
11
|
+
typeUrl: "/google.protobuf.Timestamp",
|
|
12
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
13
|
+
if (message.seconds !== BigInt(0)) {
|
|
14
|
+
writer.uint32(8).int64(message.seconds);
|
|
15
|
+
}
|
|
16
|
+
if (message.nanos !== 0) {
|
|
17
|
+
writer.uint32(16).int32(message.nanos);
|
|
18
|
+
}
|
|
19
|
+
return writer;
|
|
20
|
+
},
|
|
21
|
+
decode(input, length) {
|
|
22
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
23
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
24
|
+
const message = createBaseTimestamp();
|
|
25
|
+
while (reader.pos < end) {
|
|
26
|
+
const tag = reader.uint32();
|
|
27
|
+
switch (tag >>> 3) {
|
|
28
|
+
case 1:
|
|
29
|
+
message.seconds = reader.int64();
|
|
30
|
+
break;
|
|
31
|
+
case 2:
|
|
32
|
+
message.nanos = reader.int32();
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
reader.skipType(tag & 7);
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return message;
|
|
40
|
+
},
|
|
41
|
+
fromPartial(object) {
|
|
42
|
+
const message = createBaseTimestamp();
|
|
43
|
+
message.seconds = object.seconds !== undefined && object.seconds !== null ? BigInt(object.seconds.toString()) : BigInt(0);
|
|
44
|
+
message.nanos = object.nanos ?? 0;
|
|
45
|
+
return message;
|
|
46
|
+
},
|
|
47
|
+
fromAmino(object) {
|
|
48
|
+
return fromJsonTimestamp(object);
|
|
49
|
+
},
|
|
50
|
+
toAmino(message) {
|
|
51
|
+
return fromTimestamp(message).toISOString().replace(/\.\d+Z$/, "Z");
|
|
52
|
+
},
|
|
53
|
+
fromAminoMsg(object) {
|
|
54
|
+
return Timestamp.fromAmino(object.value);
|
|
55
|
+
},
|
|
56
|
+
fromProtoMsg(message) {
|
|
57
|
+
return Timestamp.decode(message.value);
|
|
58
|
+
},
|
|
59
|
+
toProto(message) {
|
|
60
|
+
return Timestamp.encode(message).finish();
|
|
61
|
+
},
|
|
62
|
+
toProtoMsg(message) {
|
|
63
|
+
return {
|
|
64
|
+
typeUrl: "/google.protobuf.Timestamp",
|
|
65
|
+
value: Timestamp.encode(message).finish()
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.0
|
|
4
|
+
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
5
|
+
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
6
|
+
*/
|
|
7
|
+
// Buffer polyfill for browser compatibility
|
|
8
|
+
import { Buffer } from 'buffer';
|
|
9
|
+
var globalThis = (() => {
|
|
10
|
+
if (typeof globalThis !== 'undefined')
|
|
11
|
+
return globalThis;
|
|
12
|
+
if (typeof self !== 'undefined')
|
|
13
|
+
return self;
|
|
14
|
+
if (typeof window !== 'undefined')
|
|
15
|
+
return window;
|
|
16
|
+
if (typeof global !== 'undefined')
|
|
17
|
+
return global;
|
|
18
|
+
throw 'Unable to locate global object';
|
|
19
|
+
})();
|
|
20
|
+
const atob = globalThis.atob ||
|
|
21
|
+
((b64) => Buffer.from(b64, 'base64').toString('binary'));
|
|
22
|
+
export function bytesFromBase64(b64) {
|
|
23
|
+
const bin = atob(b64);
|
|
24
|
+
const arr = new Uint8Array(bin.length);
|
|
25
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
26
|
+
arr[i] = bin.charCodeAt(i);
|
|
27
|
+
}
|
|
28
|
+
return arr;
|
|
29
|
+
}
|
|
30
|
+
const btoa = globalThis.btoa ||
|
|
31
|
+
((bin) => Buffer.from(bin, 'binary').toString('base64'));
|
|
32
|
+
export function base64FromBytes(arr) {
|
|
33
|
+
const bin = [];
|
|
34
|
+
arr.forEach((byte) => {
|
|
35
|
+
bin.push(String.fromCharCode(byte));
|
|
36
|
+
});
|
|
37
|
+
return btoa(bin.join(''));
|
|
38
|
+
}
|
|
39
|
+
export function omitDefault(input) {
|
|
40
|
+
if (typeof input === 'string') {
|
|
41
|
+
return input === '' ? undefined : input;
|
|
42
|
+
}
|
|
43
|
+
if (typeof input === 'number') {
|
|
44
|
+
return input === 0 ? undefined : input;
|
|
45
|
+
}
|
|
46
|
+
if (typeof input === "boolean") {
|
|
47
|
+
return input === false ? undefined : input;
|
|
48
|
+
}
|
|
49
|
+
if (typeof input === 'bigint') {
|
|
50
|
+
return input === BigInt(0) ? undefined : input;
|
|
51
|
+
}
|
|
52
|
+
throw new Error(`Got unsupported type ${typeof input}`);
|
|
53
|
+
}
|
|
54
|
+
export function toDuration(duration) {
|
|
55
|
+
return {
|
|
56
|
+
seconds: BigInt(Math.floor(parseInt(duration) / 1000000000)),
|
|
57
|
+
nanos: parseInt(duration) % 1000000000
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export function fromDuration(duration) {
|
|
61
|
+
return (parseInt(duration.seconds.toString()) * 1000000000 +
|
|
62
|
+
duration.nanos).toString();
|
|
63
|
+
}
|
|
64
|
+
export function isSet(value) {
|
|
65
|
+
return value !== null && value !== undefined;
|
|
66
|
+
}
|
|
67
|
+
export function isObject(value) {
|
|
68
|
+
return typeof value === 'object' && value !== null;
|
|
69
|
+
}
|
|
70
|
+
export const setPaginationParams = (options, pagination) => {
|
|
71
|
+
if (!pagination) {
|
|
72
|
+
return options;
|
|
73
|
+
}
|
|
74
|
+
if (typeof pagination?.countTotal !== 'undefined') {
|
|
75
|
+
options.params['pagination.count_total'] = pagination.countTotal;
|
|
76
|
+
}
|
|
77
|
+
if (typeof pagination?.key !== 'undefined') {
|
|
78
|
+
// String to Uint8Array
|
|
79
|
+
// let uint8arr = new Uint8Array(Buffer.from(data,'base64'));
|
|
80
|
+
// Uint8Array to String
|
|
81
|
+
options.params['pagination.key'] = Buffer.from(pagination.key).toString('base64');
|
|
82
|
+
}
|
|
83
|
+
if (typeof pagination?.limit !== 'undefined') {
|
|
84
|
+
options.params['pagination.limit'] = pagination.limit.toString();
|
|
85
|
+
}
|
|
86
|
+
if (typeof pagination?.offset !== 'undefined') {
|
|
87
|
+
options.params['pagination.offset'] = pagination.offset.toString();
|
|
88
|
+
}
|
|
89
|
+
if (typeof pagination?.reverse !== 'undefined') {
|
|
90
|
+
options.params['pagination.reverse'] = pagination.reverse;
|
|
91
|
+
}
|
|
92
|
+
return options;
|
|
93
|
+
};
|
|
94
|
+
export function isRpc(rpc) {
|
|
95
|
+
return rpc !== null && rpc !== undefined && typeof rpc.request === 'function';
|
|
96
|
+
}
|
|
97
|
+
export function toTimestamp(date) {
|
|
98
|
+
const seconds = numberToLong(date.getTime() / 1_000);
|
|
99
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
100
|
+
return {
|
|
101
|
+
seconds,
|
|
102
|
+
nanos
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
export function fromTimestamp(t) {
|
|
106
|
+
let millis = Number(t.seconds) * 1000;
|
|
107
|
+
millis += t.nanos / 1000000;
|
|
108
|
+
return new Date(millis);
|
|
109
|
+
}
|
|
110
|
+
const timestampFromJSON = (object) => {
|
|
111
|
+
return {
|
|
112
|
+
seconds: isSet(object.seconds)
|
|
113
|
+
? BigInt(object.seconds.toString())
|
|
114
|
+
: BigInt(0),
|
|
115
|
+
nanos: isSet(object.nanos) ? Number(object.nanos) : 0
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
export function fromJsonTimestamp(o) {
|
|
119
|
+
if (o instanceof Date) {
|
|
120
|
+
return toTimestamp(o);
|
|
121
|
+
}
|
|
122
|
+
else if (typeof o === 'string') {
|
|
123
|
+
return toTimestamp(new Date(o));
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
return timestampFromJSON(o);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function numberToLong(number) {
|
|
130
|
+
return BigInt(Math.trunc(number));
|
|
131
|
+
}
|