@sparkdreamnft/sparkdreamjs 0.0.17 → 0.0.19
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/cosmos/bundle.d.ts +160 -160
- package/cosmos/bundle.js +182 -182
- package/esm/cosmos/bundle.js +182 -182
- package/esm/ibc/bundle.js +106 -106
- package/esm/sparkdream/blog/v1/params.js +113 -52
- package/esm/sparkdream/blog/v1/tx.js +583 -2
- package/esm/sparkdream/blog/v1/tx.registry.js +74 -2
- package/esm/sparkdream/blog/v1/tx.rpc.msg.js +33 -3
- package/esm/sparkdream/bundle.js +448 -346
- package/esm/sparkdream/client.js +7 -1
- package/esm/sparkdream/collect/v1/params.js +121 -1
- package/esm/sparkdream/collect/v1/tx.js +293 -1
- package/esm/sparkdream/collect/v1/tx.registry.js +38 -2
- package/esm/sparkdream/collect/v1/tx.rpc.msg.js +17 -2
- package/esm/sparkdream/collect/v1/types.js +147 -3
- package/esm/sparkdream/commons/v1/genesis.js +29 -1
- package/esm/sparkdream/commons/v1/query.js +317 -0
- package/esm/sparkdream/commons/v1/query.lcd.js +23 -0
- package/esm/sparkdream/commons/v1/query.rpc.Query.js +20 -1
- package/esm/sparkdream/commons/v1/recurring_spend.js +296 -0
- package/esm/sparkdream/commons/v1/tx.js +693 -0
- package/esm/sparkdream/commons/v1/tx.registry.js +74 -2
- package/esm/sparkdream/commons/v1/tx.rpc.msg.js +33 -1
- package/esm/sparkdream/federation/v1/genesis.js +10 -10
- package/esm/sparkdream/federation/v1/params.js +29 -54
- package/esm/sparkdream/federation/v1/query.js +216 -71
- package/esm/sparkdream/federation/v1/query.lcd.js +11 -6
- package/esm/sparkdream/federation/v1/query.rpc.Query.js +24 -15
- package/esm/sparkdream/federation/v1/tx.amino.js +21 -21
- package/esm/sparkdream/federation/v1/tx.js +1146 -1105
- package/esm/sparkdream/federation/v1/tx.registry.js +74 -74
- package/esm/sparkdream/federation/v1/tx.rpc.msg.js +32 -26
- package/esm/sparkdream/federation/v1/types.js +355 -99
- package/esm/sparkdream/federation/v1/verifier_activity.js +13 -1
- package/esm/sparkdream/forum/v1/params.js +389 -148
- package/esm/sparkdream/forum/v1/post.js +25 -1
- package/esm/sparkdream/forum/v1/tx.js +460 -0
- package/esm/sparkdream/forum/v1/tx.registry.js +56 -2
- package/esm/sparkdream/forum/v1/tx.rpc.msg.js +30 -1
- package/esm/sparkdream/forum/v1/types.js +355 -0
- package/esm/sparkdream/forum/v1/user_rate_limit.js +41 -2
- package/esm/sparkdream/guardian/module/v1/module.js +68 -0
- package/esm/sparkdream/guardian/v1/query.js +128 -0
- package/esm/sparkdream/guardian/v1/query.lcd.js +13 -0
- package/esm/sparkdream/guardian/v1/query.rpc.Query.js +26 -0
- package/esm/sparkdream/guardian/v1/tx.amino.js +9 -0
- package/esm/sparkdream/guardian/v1/tx.js +175 -0
- package/esm/sparkdream/guardian/v1/tx.registry.js +33 -0
- package/esm/sparkdream/guardian/v1/tx.rpc.msg.js +24 -0
- package/esm/sparkdream/identity/module/v1/module.js +71 -0
- package/esm/sparkdream/identity/v1/chain_identity.js +199 -0
- package/esm/sparkdream/identity/v1/genesis.js +84 -0
- package/esm/sparkdream/identity/v1/query.js +372 -0
- package/esm/sparkdream/identity/v1/query.lcd.js +21 -0
- package/esm/sparkdream/identity/v1/query.rpc.Query.js +42 -0
- package/esm/sparkdream/lcd.js +15 -0
- package/esm/sparkdream/name/v1/params.js +19 -18
- package/esm/sparkdream/rep/v1/bonded_role.js +48 -2
- package/esm/sparkdream/rep/v1/member.js +209 -1
- package/esm/sparkdream/rep/v1/tag.js +6 -13
- package/esm/sparkdream/rpc.query.js +9 -0
- package/esm/sparkdream/rpc.tx.js +6 -0
- package/esm/sparkdream/service/module/v1/module.js +71 -0
- package/esm/sparkdream/service/v1/controller_transfer_case.js +155 -0
- package/esm/sparkdream/service/v1/genesis.js +240 -0
- package/esm/sparkdream/service/v1/operator.js +250 -0
- package/esm/sparkdream/service/v1/params.js +355 -0
- package/esm/sparkdream/service/v1/query.js +1582 -0
- package/esm/sparkdream/service/v1/query.lcd.js +107 -0
- package/esm/sparkdream/service/v1/query.rpc.Query.js +109 -0
- package/esm/sparkdream/service/v1/refile_cooldown.js +121 -0
- package/esm/sparkdream/service/v1/report.js +212 -0
- package/esm/sparkdream/service/v1/reporter_rate_limit.js +137 -0
- package/esm/sparkdream/service/v1/service_type_config.js +264 -0
- package/esm/sparkdream/service/v1/system_report_rate_limit.js +115 -0
- package/esm/sparkdream/service/v1/tier1_escrow_entry.js +145 -0
- package/esm/sparkdream/service/v1/tier1_last_slash.js +121 -0
- package/esm/sparkdream/service/v1/tx.amino.js +69 -0
- package/esm/sparkdream/service/v1/tx.js +2124 -0
- package/esm/sparkdream/service/v1/tx.registry.js +249 -0
- package/esm/sparkdream/service/v1/tx.rpc.msg.js +100 -0
- package/esm/sparkdream/service/v1/types.js +353 -0
- package/esm/sparkdream/session/v1/genesis.js +136 -10
- package/esm/sparkdream/session/v1/grant.js +1020 -0
- package/esm/sparkdream/session/v1/params.js +543 -19
- package/esm/sparkdream/session/v1/query.js +487 -0
- package/esm/sparkdream/session/v1/query.lcd.js +41 -3
- package/esm/sparkdream/session/v1/query.rpc.Query.js +36 -4
- package/esm/sparkdream/session/v1/session.js +6 -0
- package/esm/sparkdream/session/v1/tx.js +1066 -0
- package/esm/sparkdream/session/v1/tx.registry.js +110 -2
- package/esm/sparkdream/session/v1/tx.rpc.msg.js +65 -3
- package/esm/tendermint/bundle.js +20 -20
- package/ibc/bundle.d.ts +90 -90
- package/ibc/bundle.js +106 -106
- package/package.json +1 -1
- package/sparkdream/blog/v1/params.d.ts +89 -28
- package/sparkdream/blog/v1/params.js +113 -52
- package/sparkdream/blog/v1/post.d.ts +2 -2
- package/sparkdream/blog/v1/tx.d.ts +385 -10
- package/sparkdream/blog/v1/tx.js +584 -3
- package/sparkdream/blog/v1/tx.registry.d.ts +49 -1
- package/sparkdream/blog/v1/tx.registry.js +73 -1
- package/sparkdream/blog/v1/tx.rpc.msg.d.ts +27 -3
- package/sparkdream/blog/v1/tx.rpc.msg.js +32 -2
- package/sparkdream/bundle.d.ts +15308 -12896
- package/sparkdream/bundle.js +448 -346
- package/sparkdream/client.d.ts +90 -20
- package/sparkdream/client.js +7 -1
- package/sparkdream/collect/v1/params.d.ts +140 -0
- package/sparkdream/collect/v1/params.js +121 -1
- package/sparkdream/collect/v1/tx.d.ts +195 -3
- package/sparkdream/collect/v1/tx.js +294 -2
- package/sparkdream/collect/v1/tx.registry.d.ts +25 -1
- package/sparkdream/collect/v1/tx.registry.js +37 -1
- package/sparkdream/collect/v1/tx.rpc.msg.d.ts +15 -2
- package/sparkdream/collect/v1/tx.rpc.msg.js +16 -1
- package/sparkdream/collect/v1/types.d.ts +114 -0
- package/sparkdream/collect/v1/types.js +147 -3
- package/sparkdream/commons/v1/genesis.d.ts +17 -0
- package/sparkdream/commons/v1/genesis.js +29 -1
- package/sparkdream/commons/v1/query.d.ts +186 -0
- package/sparkdream/commons/v1/query.js +318 -1
- package/sparkdream/commons/v1/query.lcd.d.ts +3 -1
- package/sparkdream/commons/v1/query.lcd.js +23 -0
- package/sparkdream/commons/v1/query.rpc.Query.d.ts +12 -1
- package/sparkdream/commons/v1/query.rpc.Query.js +19 -0
- package/sparkdream/commons/v1/recurring_spend.d.ts +234 -0
- package/sparkdream/commons/v1/recurring_spend.js +301 -0
- package/sparkdream/commons/v1/tx.d.ts +472 -0
- package/sparkdream/commons/v1/tx.js +694 -1
- package/sparkdream/commons/v1/tx.registry.d.ts +49 -1
- package/sparkdream/commons/v1/tx.registry.js +73 -1
- package/sparkdream/commons/v1/tx.rpc.msg.d.ts +29 -1
- package/sparkdream/commons/v1/tx.rpc.msg.js +32 -0
- package/sparkdream/federation/v1/genesis.d.ts +3 -3
- package/sparkdream/federation/v1/genesis.js +9 -9
- package/sparkdream/federation/v1/params.d.ts +64 -13
- package/sparkdream/federation/v1/params.js +29 -54
- package/sparkdream/federation/v1/query.d.ts +209 -100
- package/sparkdream/federation/v1/query.js +216 -71
- package/sparkdream/federation/v1/query.lcd.d.ts +4 -3
- package/sparkdream/federation/v1/query.lcd.js +11 -6
- package/sparkdream/federation/v1/query.rpc.Query.d.ts +10 -7
- package/sparkdream/federation/v1/query.rpc.Query.js +24 -15
- package/sparkdream/federation/v1/tx.amino.d.ts +21 -21
- package/sparkdream/federation/v1/tx.amino.js +20 -20
- package/sparkdream/federation/v1/tx.d.ts +479 -352
- package/sparkdream/federation/v1/tx.js +1147 -1106
- package/sparkdream/federation/v1/tx.registry.d.ts +49 -49
- package/sparkdream/federation/v1/tx.registry.js +73 -73
- package/sparkdream/federation/v1/tx.rpc.msg.d.ts +18 -9
- package/sparkdream/federation/v1/tx.rpc.msg.js +31 -25
- package/sparkdream/federation/v1/types.d.ts +307 -41
- package/sparkdream/federation/v1/types.js +360 -100
- package/sparkdream/federation/v1/verifier_activity.d.ts +18 -0
- package/sparkdream/federation/v1/verifier_activity.js +13 -1
- package/sparkdream/forum/v1/params.d.ts +309 -62
- package/sparkdream/forum/v1/params.js +389 -148
- package/sparkdream/forum/v1/post.d.ts +28 -0
- package/sparkdream/forum/v1/post.js +25 -1
- package/sparkdream/forum/v1/tx.d.ts +291 -0
- package/sparkdream/forum/v1/tx.js +462 -2
- package/sparkdream/forum/v1/tx.registry.d.ts +37 -1
- package/sparkdream/forum/v1/tx.registry.js +55 -1
- package/sparkdream/forum/v1/tx.rpc.msg.d.ts +27 -1
- package/sparkdream/forum/v1/tx.rpc.msg.js +29 -0
- package/sparkdream/forum/v1/types.d.ts +247 -0
- package/sparkdream/forum/v1/types.js +356 -1
- package/sparkdream/forum/v1/user_rate_limit.d.ts +24 -3
- package/sparkdream/forum/v1/user_rate_limit.js +41 -2
- package/sparkdream/guardian/module/v1/module.d.ts +74 -0
- package/sparkdream/guardian/module/v1/module.js +71 -0
- package/sparkdream/guardian/v1/query.d.ts +88 -0
- package/sparkdream/guardian/v1/query.js +131 -0
- package/sparkdream/guardian/v1/query.lcd.d.ts +9 -0
- package/sparkdream/guardian/v1/query.lcd.js +17 -0
- package/sparkdream/guardian/v1/query.rpc.Query.d.ts +20 -0
- package/sparkdream/guardian/v1/query.rpc.Query.js +31 -0
- package/sparkdream/guardian/v1/tx.amino.d.ts +8 -0
- package/sparkdream/guardian/v1/tx.amino.js +12 -0
- package/sparkdream/guardian/v1/tx.d.ts +138 -0
- package/sparkdream/guardian/v1/tx.js +181 -0
- package/sparkdream/guardian/v1/tx.registry.d.ts +25 -0
- package/sparkdream/guardian/v1/tx.registry.js +37 -0
- package/sparkdream/guardian/v1/tx.rpc.msg.d.ts +22 -0
- package/sparkdream/guardian/v1/tx.rpc.msg.js +29 -0
- package/sparkdream/identity/module/v1/module.d.ts +54 -0
- package/sparkdream/identity/module/v1/module.js +74 -0
- package/sparkdream/identity/v1/chain_identity.d.ts +131 -0
- package/sparkdream/identity/v1/chain_identity.js +202 -0
- package/sparkdream/identity/v1/genesis.d.ts +65 -0
- package/sparkdream/identity/v1/genesis.js +87 -0
- package/sparkdream/identity/v1/query.d.ts +243 -0
- package/sparkdream/identity/v1/query.js +375 -0
- package/sparkdream/identity/v1/query.lcd.d.ts +11 -0
- package/sparkdream/identity/v1/query.lcd.js +25 -0
- package/sparkdream/identity/v1/query.rpc.Query.d.ts +26 -0
- package/sparkdream/identity/v1/query.rpc.Query.js +47 -0
- package/sparkdream/lcd.d.ts +9 -0
- package/sparkdream/lcd.js +15 -0
- package/sparkdream/name/v1/params.d.ts +25 -8
- package/sparkdream/name/v1/params.js +19 -18
- package/sparkdream/rep/v1/bonded_role.d.ts +51 -0
- package/sparkdream/rep/v1/bonded_role.js +48 -2
- package/sparkdream/rep/v1/member.d.ts +134 -0
- package/sparkdream/rep/v1/member.js +210 -2
- package/sparkdream/rep/v1/tag.d.ts +15 -2
- package/sparkdream/rep/v1/tag.js +6 -13
- package/sparkdream/rpc.query.d.ts +34 -2
- package/sparkdream/rpc.query.js +9 -0
- package/sparkdream/rpc.tx.d.ts +6 -0
- package/sparkdream/rpc.tx.js +6 -0
- package/sparkdream/service/module/v1/module.d.ts +54 -0
- package/sparkdream/service/module/v1/module.js +74 -0
- package/sparkdream/service/v1/controller_transfer_case.d.ts +125 -0
- package/sparkdream/service/v1/controller_transfer_case.js +158 -0
- package/sparkdream/service/v1/genesis.d.ts +172 -0
- package/sparkdream/service/v1/genesis.js +243 -0
- package/sparkdream/service/v1/operator.d.ts +215 -0
- package/sparkdream/service/v1/operator.js +253 -0
- package/sparkdream/service/v1/params.d.ts +346 -0
- package/sparkdream/service/v1/params.js +358 -0
- package/sparkdream/service/v1/query.d.ts +964 -0
- package/sparkdream/service/v1/query.js +1585 -0
- package/sparkdream/service/v1/query.lcd.d.ts +18 -0
- package/sparkdream/service/v1/query.lcd.js +111 -0
- package/sparkdream/service/v1/query.rpc.Query.d.ts +63 -0
- package/sparkdream/service/v1/query.rpc.Query.js +114 -0
- package/sparkdream/service/v1/refile_cooldown.d.ts +105 -0
- package/sparkdream/service/v1/refile_cooldown.js +124 -0
- package/sparkdream/service/v1/report.d.ts +174 -0
- package/sparkdream/service/v1/report.js +215 -0
- package/sparkdream/service/v1/reporter_rate_limit.d.ts +112 -0
- package/sparkdream/service/v1/reporter_rate_limit.js +140 -0
- package/sparkdream/service/v1/service_type_config.d.ts +222 -0
- package/sparkdream/service/v1/service_type_config.js +269 -0
- package/sparkdream/service/v1/system_report_rate_limit.d.ts +106 -0
- package/sparkdream/service/v1/system_report_rate_limit.js +118 -0
- package/sparkdream/service/v1/tier1_escrow_entry.d.ts +125 -0
- package/sparkdream/service/v1/tier1_escrow_entry.js +148 -0
- package/sparkdream/service/v1/tier1_last_slash.d.ts +101 -0
- package/sparkdream/service/v1/tier1_last_slash.js +124 -0
- package/sparkdream/service/v1/tx.amino.d.ts +68 -0
- package/sparkdream/service/v1/tx.amino.js +72 -0
- package/sparkdream/service/v1/tx.d.ts +1264 -0
- package/sparkdream/service/v1/tx.js +2127 -0
- package/sparkdream/service/v1/tx.registry.d.ts +169 -0
- package/sparkdream/service/v1/tx.registry.js +253 -0
- package/sparkdream/service/v1/tx.rpc.msg.d.ts +80 -0
- package/sparkdream/service/v1/tx.rpc.msg.js +105 -0
- package/sparkdream/service/v1/types.d.ts +94 -0
- package/sparkdream/service/v1/types.js +370 -0
- package/sparkdream/session/v1/genesis.d.ts +93 -9
- package/sparkdream/session/v1/genesis.js +137 -11
- package/sparkdream/session/v1/grant.d.ts +517 -0
- package/sparkdream/session/v1/grant.js +1027 -0
- package/sparkdream/session/v1/params.d.ts +338 -7
- package/sparkdream/session/v1/params.js +543 -19
- package/sparkdream/session/v1/query.d.ts +265 -0
- package/sparkdream/session/v1/query.js +488 -1
- package/sparkdream/session/v1/query.lcd.d.ts +4 -1
- package/sparkdream/session/v1/query.lcd.js +41 -3
- package/sparkdream/session/v1/query.rpc.Query.d.ts +27 -4
- package/sparkdream/session/v1/query.rpc.Query.js +35 -3
- package/sparkdream/session/v1/session.d.ts +18 -0
- package/sparkdream/session/v1/session.js +6 -0
- package/sparkdream/session/v1/tx.d.ts +660 -0
- package/sparkdream/session/v1/tx.js +1067 -1
- package/sparkdream/session/v1/tx.registry.d.ts +73 -1
- package/sparkdream/session/v1/tx.registry.js +109 -1
- package/sparkdream/session/v1/tx.rpc.msg.d.ts +63 -3
- package/sparkdream/session/v1/tx.rpc.msg.js +64 -2
- package/tendermint/bundle.d.ts +844 -844
- package/tendermint/bundle.js +20 -20
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PinnedReplyRecord = exports.BountyAward = exports.ModerationSourceAmino = exports.ModerationSource = exports.ModerationActionTypeAmino = exports.ModerationActionType = exports.BountyStatusAmino = exports.BountyStatus = exports.PostStatusAmino = exports.PostStatus = void 0;
|
|
3
|
+
exports.PostConvictionStake = exports.PostConvictionStake_AccruedRepPerTagEntry = exports.ForumRepEpochCounter = exports.PinnedReplyRecord = exports.BountyAward = exports.ModerationSourceAmino = exports.ModerationSource = exports.ModerationActionTypeAmino = exports.ModerationActionType = exports.BountyStatusAmino = exports.BountyStatus = exports.PostStatusAmino = exports.PostStatus = void 0;
|
|
4
4
|
exports.postStatusFromJSON = postStatusFromJSON;
|
|
5
5
|
exports.postStatusToJSON = postStatusToJSON;
|
|
6
6
|
exports.bountyStatusFromJSON = bountyStatusFromJSON;
|
|
@@ -11,6 +11,7 @@ exports.moderationSourceFromJSON = moderationSourceFromJSON;
|
|
|
11
11
|
exports.moderationSourceToJSON = moderationSourceToJSON;
|
|
12
12
|
//@ts-nocheck
|
|
13
13
|
const binary_1 = require("../../../binary");
|
|
14
|
+
const math_1 = require("@interchainjs/math");
|
|
14
15
|
/** PostStatus represents the status of a post. */
|
|
15
16
|
var PostStatus;
|
|
16
17
|
(function (PostStatus) {
|
|
@@ -551,3 +552,357 @@ exports.PinnedReplyRecord = {
|
|
|
551
552
|
};
|
|
552
553
|
}
|
|
553
554
|
};
|
|
555
|
+
function createBaseForumRepEpochCounter() {
|
|
556
|
+
return {
|
|
557
|
+
epochId: BigInt(0),
|
|
558
|
+
accumulated: ""
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* ForumRepEpochCounter tracks how much forum reputation a single author has
|
|
563
|
+
* earned in a single tag during the current UTC-day epoch. Reset implicitly
|
|
564
|
+
* by comparing epoch_id to floor(block_time / 86400) on read — when the
|
|
565
|
+
* stored epoch_id is stale, the accumulated counter is treated as zero and
|
|
566
|
+
* overwritten on the next credit. Used by the post-conviction accrual loop
|
|
567
|
+
* to enforce Params.max_forum_rep_per_tag_per_epoch.
|
|
568
|
+
* @name ForumRepEpochCounter
|
|
569
|
+
* @package sparkdream.forum.v1
|
|
570
|
+
* @see proto type: sparkdream.forum.v1.ForumRepEpochCounter
|
|
571
|
+
*/
|
|
572
|
+
exports.ForumRepEpochCounter = {
|
|
573
|
+
typeUrl: "/sparkdream.forum.v1.ForumRepEpochCounter",
|
|
574
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
575
|
+
if (message.epochId !== BigInt(0)) {
|
|
576
|
+
writer.uint32(8).int64(message.epochId);
|
|
577
|
+
}
|
|
578
|
+
if (message.accumulated !== "") {
|
|
579
|
+
writer.uint32(18).string(math_1.Decimal.fromUserInput(message.accumulated, 18).atomics);
|
|
580
|
+
}
|
|
581
|
+
return writer;
|
|
582
|
+
},
|
|
583
|
+
decode(input, length) {
|
|
584
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
585
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
586
|
+
const message = createBaseForumRepEpochCounter();
|
|
587
|
+
while (reader.pos < end) {
|
|
588
|
+
const tag = reader.uint32();
|
|
589
|
+
switch (tag >>> 3) {
|
|
590
|
+
case 1:
|
|
591
|
+
message.epochId = reader.int64();
|
|
592
|
+
break;
|
|
593
|
+
case 2:
|
|
594
|
+
message.accumulated = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
595
|
+
break;
|
|
596
|
+
default:
|
|
597
|
+
reader.skipType(tag & 7);
|
|
598
|
+
break;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
return message;
|
|
602
|
+
},
|
|
603
|
+
fromPartial(object) {
|
|
604
|
+
const message = createBaseForumRepEpochCounter();
|
|
605
|
+
message.epochId = object.epochId !== undefined && object.epochId !== null ? BigInt(object.epochId.toString()) : BigInt(0);
|
|
606
|
+
message.accumulated = object.accumulated ?? "";
|
|
607
|
+
return message;
|
|
608
|
+
},
|
|
609
|
+
fromAmino(object) {
|
|
610
|
+
const message = createBaseForumRepEpochCounter();
|
|
611
|
+
if (object.epoch_id !== undefined && object.epoch_id !== null) {
|
|
612
|
+
message.epochId = BigInt(object.epoch_id);
|
|
613
|
+
}
|
|
614
|
+
if (object.accumulated !== undefined && object.accumulated !== null) {
|
|
615
|
+
message.accumulated = object.accumulated;
|
|
616
|
+
}
|
|
617
|
+
return message;
|
|
618
|
+
},
|
|
619
|
+
toAmino(message) {
|
|
620
|
+
const obj = {};
|
|
621
|
+
obj.epoch_id = message.epochId !== BigInt(0) ? message.epochId?.toString() : undefined;
|
|
622
|
+
obj.accumulated = message.accumulated === "" ? undefined : message.accumulated;
|
|
623
|
+
return obj;
|
|
624
|
+
},
|
|
625
|
+
fromAminoMsg(object) {
|
|
626
|
+
return exports.ForumRepEpochCounter.fromAmino(object.value);
|
|
627
|
+
},
|
|
628
|
+
fromProtoMsg(message) {
|
|
629
|
+
return exports.ForumRepEpochCounter.decode(message.value);
|
|
630
|
+
},
|
|
631
|
+
toProto(message) {
|
|
632
|
+
return exports.ForumRepEpochCounter.encode(message).finish();
|
|
633
|
+
},
|
|
634
|
+
toProtoMsg(message) {
|
|
635
|
+
return {
|
|
636
|
+
typeUrl: "/sparkdream.forum.v1.ForumRepEpochCounter",
|
|
637
|
+
value: exports.ForumRepEpochCounter.encode(message).finish()
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
};
|
|
641
|
+
function createBasePostConvictionStake_AccruedRepPerTagEntry() {
|
|
642
|
+
return {
|
|
643
|
+
key: "",
|
|
644
|
+
value: ""
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* @name PostConvictionStake_AccruedRepPerTagEntry
|
|
649
|
+
* @package sparkdream.forum.v1
|
|
650
|
+
* @see proto type: sparkdream.forum.v1.undefined
|
|
651
|
+
*/
|
|
652
|
+
exports.PostConvictionStake_AccruedRepPerTagEntry = {
|
|
653
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
654
|
+
if (message.key !== "") {
|
|
655
|
+
writer.uint32(10).string(message.key);
|
|
656
|
+
}
|
|
657
|
+
if (message.value !== "") {
|
|
658
|
+
writer.uint32(18).string(message.value);
|
|
659
|
+
}
|
|
660
|
+
return writer;
|
|
661
|
+
},
|
|
662
|
+
decode(input, length) {
|
|
663
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
664
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
665
|
+
const message = createBasePostConvictionStake_AccruedRepPerTagEntry();
|
|
666
|
+
while (reader.pos < end) {
|
|
667
|
+
const tag = reader.uint32();
|
|
668
|
+
switch (tag >>> 3) {
|
|
669
|
+
case 1:
|
|
670
|
+
message.key = reader.string();
|
|
671
|
+
break;
|
|
672
|
+
case 2:
|
|
673
|
+
message.value = reader.string();
|
|
674
|
+
break;
|
|
675
|
+
default:
|
|
676
|
+
reader.skipType(tag & 7);
|
|
677
|
+
break;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
return message;
|
|
681
|
+
},
|
|
682
|
+
fromPartial(object) {
|
|
683
|
+
const message = createBasePostConvictionStake_AccruedRepPerTagEntry();
|
|
684
|
+
message.key = object.key ?? "";
|
|
685
|
+
message.value = object.value ?? "";
|
|
686
|
+
return message;
|
|
687
|
+
},
|
|
688
|
+
fromAmino(object) {
|
|
689
|
+
const message = createBasePostConvictionStake_AccruedRepPerTagEntry();
|
|
690
|
+
if (object.key !== undefined && object.key !== null) {
|
|
691
|
+
message.key = object.key;
|
|
692
|
+
}
|
|
693
|
+
if (object.value !== undefined && object.value !== null) {
|
|
694
|
+
message.value = object.value;
|
|
695
|
+
}
|
|
696
|
+
return message;
|
|
697
|
+
},
|
|
698
|
+
toAmino(message) {
|
|
699
|
+
const obj = {};
|
|
700
|
+
obj.key = message.key === "" ? undefined : message.key;
|
|
701
|
+
obj.value = message.value === "" ? undefined : message.value;
|
|
702
|
+
return obj;
|
|
703
|
+
},
|
|
704
|
+
fromAminoMsg(object) {
|
|
705
|
+
return exports.PostConvictionStake_AccruedRepPerTagEntry.fromAmino(object.value);
|
|
706
|
+
},
|
|
707
|
+
fromProtoMsg(message) {
|
|
708
|
+
return exports.PostConvictionStake_AccruedRepPerTagEntry.decode(message.value);
|
|
709
|
+
},
|
|
710
|
+
toProto(message) {
|
|
711
|
+
return exports.PostConvictionStake_AccruedRepPerTagEntry.encode(message).finish();
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
function createBasePostConvictionStake() {
|
|
715
|
+
return {
|
|
716
|
+
id: BigInt(0),
|
|
717
|
+
staker: "",
|
|
718
|
+
postId: BigInt(0),
|
|
719
|
+
amount: "",
|
|
720
|
+
stakedAt: BigInt(0),
|
|
721
|
+
unlocksAt: BigInt(0),
|
|
722
|
+
accruedRepPerTag: {},
|
|
723
|
+
lastAccrualAt: BigInt(0),
|
|
724
|
+
released: false
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* PostConvictionStake records an ESTABLISHED+ member's DREAM lock backing a
|
|
729
|
+
* post's author. While the stake is active, the EndBlocker streams per-tag
|
|
730
|
+
* reputation to the author proportional to the stake's share of total active
|
|
731
|
+
* stakes on the post (split evenly across the post's tags). On confirmed
|
|
732
|
+
* sentinel hide (ExpireHiddenPosts), the accrued rep is clawed back from the
|
|
733
|
+
* author per tag and a fraction of the staker's locked DREAM is slashed
|
|
734
|
+
* (staker_slash_bps) — both staker and author endorsed harm.
|
|
735
|
+
*
|
|
736
|
+
* Stakers cannot stake on their own posts. Stakes are released after
|
|
737
|
+
* unlocks_at via MsgReleasePostConviction; LockDREAM/UnlockDREAM bypass the
|
|
738
|
+
* 3% transfer tax because it is internal member-balance rebalancing, not a
|
|
739
|
+
* transfer.
|
|
740
|
+
* @name PostConvictionStake
|
|
741
|
+
* @package sparkdream.forum.v1
|
|
742
|
+
* @see proto type: sparkdream.forum.v1.PostConvictionStake
|
|
743
|
+
*/
|
|
744
|
+
exports.PostConvictionStake = {
|
|
745
|
+
typeUrl: "/sparkdream.forum.v1.PostConvictionStake",
|
|
746
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
747
|
+
if (message.id !== BigInt(0)) {
|
|
748
|
+
writer.uint32(8).uint64(message.id);
|
|
749
|
+
}
|
|
750
|
+
if (message.staker !== "") {
|
|
751
|
+
writer.uint32(18).string(message.staker);
|
|
752
|
+
}
|
|
753
|
+
if (message.postId !== BigInt(0)) {
|
|
754
|
+
writer.uint32(24).uint64(message.postId);
|
|
755
|
+
}
|
|
756
|
+
if (message.amount !== "") {
|
|
757
|
+
writer.uint32(34).string(message.amount);
|
|
758
|
+
}
|
|
759
|
+
if (message.stakedAt !== BigInt(0)) {
|
|
760
|
+
writer.uint32(40).int64(message.stakedAt);
|
|
761
|
+
}
|
|
762
|
+
if (message.unlocksAt !== BigInt(0)) {
|
|
763
|
+
writer.uint32(48).int64(message.unlocksAt);
|
|
764
|
+
}
|
|
765
|
+
Object.entries(message.accruedRepPerTag).forEach(([key, value]) => {
|
|
766
|
+
exports.PostConvictionStake_AccruedRepPerTagEntry.encode({
|
|
767
|
+
key: key,
|
|
768
|
+
value
|
|
769
|
+
}, writer.uint32(58).fork()).ldelim();
|
|
770
|
+
});
|
|
771
|
+
if (message.lastAccrualAt !== BigInt(0)) {
|
|
772
|
+
writer.uint32(64).int64(message.lastAccrualAt);
|
|
773
|
+
}
|
|
774
|
+
if (message.released === true) {
|
|
775
|
+
writer.uint32(72).bool(message.released);
|
|
776
|
+
}
|
|
777
|
+
return writer;
|
|
778
|
+
},
|
|
779
|
+
decode(input, length) {
|
|
780
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
781
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
782
|
+
const message = createBasePostConvictionStake();
|
|
783
|
+
while (reader.pos < end) {
|
|
784
|
+
const tag = reader.uint32();
|
|
785
|
+
switch (tag >>> 3) {
|
|
786
|
+
case 1:
|
|
787
|
+
message.id = reader.uint64();
|
|
788
|
+
break;
|
|
789
|
+
case 2:
|
|
790
|
+
message.staker = reader.string();
|
|
791
|
+
break;
|
|
792
|
+
case 3:
|
|
793
|
+
message.postId = reader.uint64();
|
|
794
|
+
break;
|
|
795
|
+
case 4:
|
|
796
|
+
message.amount = reader.string();
|
|
797
|
+
break;
|
|
798
|
+
case 5:
|
|
799
|
+
message.stakedAt = reader.int64();
|
|
800
|
+
break;
|
|
801
|
+
case 6:
|
|
802
|
+
message.unlocksAt = reader.int64();
|
|
803
|
+
break;
|
|
804
|
+
case 7:
|
|
805
|
+
const entry7 = exports.PostConvictionStake_AccruedRepPerTagEntry.decode(reader, reader.uint32());
|
|
806
|
+
if (entry7.value !== undefined) {
|
|
807
|
+
message.accruedRepPerTag[entry7.key] = entry7.value;
|
|
808
|
+
}
|
|
809
|
+
break;
|
|
810
|
+
case 8:
|
|
811
|
+
message.lastAccrualAt = reader.int64();
|
|
812
|
+
break;
|
|
813
|
+
case 9:
|
|
814
|
+
message.released = reader.bool();
|
|
815
|
+
break;
|
|
816
|
+
default:
|
|
817
|
+
reader.skipType(tag & 7);
|
|
818
|
+
break;
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
return message;
|
|
822
|
+
},
|
|
823
|
+
fromPartial(object) {
|
|
824
|
+
const message = createBasePostConvictionStake();
|
|
825
|
+
message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0);
|
|
826
|
+
message.staker = object.staker ?? "";
|
|
827
|
+
message.postId = object.postId !== undefined && object.postId !== null ? BigInt(object.postId.toString()) : BigInt(0);
|
|
828
|
+
message.amount = object.amount ?? "";
|
|
829
|
+
message.stakedAt = object.stakedAt !== undefined && object.stakedAt !== null ? BigInt(object.stakedAt.toString()) : BigInt(0);
|
|
830
|
+
message.unlocksAt = object.unlocksAt !== undefined && object.unlocksAt !== null ? BigInt(object.unlocksAt.toString()) : BigInt(0);
|
|
831
|
+
message.accruedRepPerTag = Object.entries(object.accruedRepPerTag ?? {}).reduce((acc, [key, value]) => {
|
|
832
|
+
if (value !== undefined) {
|
|
833
|
+
acc[key] = String(value);
|
|
834
|
+
}
|
|
835
|
+
return acc;
|
|
836
|
+
}, {});
|
|
837
|
+
message.lastAccrualAt = object.lastAccrualAt !== undefined && object.lastAccrualAt !== null ? BigInt(object.lastAccrualAt.toString()) : BigInt(0);
|
|
838
|
+
message.released = object.released ?? false;
|
|
839
|
+
return message;
|
|
840
|
+
},
|
|
841
|
+
fromAmino(object) {
|
|
842
|
+
const message = createBasePostConvictionStake();
|
|
843
|
+
if (object.id !== undefined && object.id !== null) {
|
|
844
|
+
message.id = BigInt(object.id);
|
|
845
|
+
}
|
|
846
|
+
if (object.staker !== undefined && object.staker !== null) {
|
|
847
|
+
message.staker = object.staker;
|
|
848
|
+
}
|
|
849
|
+
if (object.post_id !== undefined && object.post_id !== null) {
|
|
850
|
+
message.postId = BigInt(object.post_id);
|
|
851
|
+
}
|
|
852
|
+
if (object.amount !== undefined && object.amount !== null) {
|
|
853
|
+
message.amount = object.amount;
|
|
854
|
+
}
|
|
855
|
+
if (object.staked_at !== undefined && object.staked_at !== null) {
|
|
856
|
+
message.stakedAt = BigInt(object.staked_at);
|
|
857
|
+
}
|
|
858
|
+
if (object.unlocks_at !== undefined && object.unlocks_at !== null) {
|
|
859
|
+
message.unlocksAt = BigInt(object.unlocks_at);
|
|
860
|
+
}
|
|
861
|
+
message.accruedRepPerTag = Object.entries(object.accrued_rep_per_tag ?? {}).reduce((acc, [key, value]) => {
|
|
862
|
+
if (value !== undefined) {
|
|
863
|
+
acc[key] = String(value);
|
|
864
|
+
}
|
|
865
|
+
return acc;
|
|
866
|
+
}, {});
|
|
867
|
+
if (object.last_accrual_at !== undefined && object.last_accrual_at !== null) {
|
|
868
|
+
message.lastAccrualAt = BigInt(object.last_accrual_at);
|
|
869
|
+
}
|
|
870
|
+
if (object.released !== undefined && object.released !== null) {
|
|
871
|
+
message.released = object.released;
|
|
872
|
+
}
|
|
873
|
+
return message;
|
|
874
|
+
},
|
|
875
|
+
toAmino(message) {
|
|
876
|
+
const obj = {};
|
|
877
|
+
obj.id = message.id !== BigInt(0) ? message.id?.toString() : undefined;
|
|
878
|
+
obj.staker = message.staker === "" ? undefined : message.staker;
|
|
879
|
+
obj.post_id = message.postId !== BigInt(0) ? message.postId?.toString() : undefined;
|
|
880
|
+
obj.amount = message.amount === "" ? undefined : message.amount;
|
|
881
|
+
obj.staked_at = message.stakedAt !== BigInt(0) ? message.stakedAt?.toString() : undefined;
|
|
882
|
+
obj.unlocks_at = message.unlocksAt !== BigInt(0) ? message.unlocksAt?.toString() : undefined;
|
|
883
|
+
obj.accrued_rep_per_tag = {};
|
|
884
|
+
if (message.accruedRepPerTag) {
|
|
885
|
+
Object.entries(message.accruedRepPerTag).forEach(([k, v]) => {
|
|
886
|
+
obj.accrued_rep_per_tag[k] = v;
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
obj.last_accrual_at = message.lastAccrualAt !== BigInt(0) ? message.lastAccrualAt?.toString() : undefined;
|
|
890
|
+
obj.released = message.released === false ? undefined : message.released;
|
|
891
|
+
return obj;
|
|
892
|
+
},
|
|
893
|
+
fromAminoMsg(object) {
|
|
894
|
+
return exports.PostConvictionStake.fromAmino(object.value);
|
|
895
|
+
},
|
|
896
|
+
fromProtoMsg(message) {
|
|
897
|
+
return exports.PostConvictionStake.decode(message.value);
|
|
898
|
+
},
|
|
899
|
+
toProto(message) {
|
|
900
|
+
return exports.PostConvictionStake.encode(message).finish();
|
|
901
|
+
},
|
|
902
|
+
toProtoMsg(message) {
|
|
903
|
+
return {
|
|
904
|
+
typeUrl: "/sparkdream.forum.v1.PostConvictionStake",
|
|
905
|
+
value: exports.PostConvictionStake.encode(message).finish()
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
2
2
|
import { DeepPartial } from "../../../helpers";
|
|
3
3
|
/**
|
|
4
|
-
* UserRateLimit defines the UserRateLimit message.
|
|
4
|
+
* UserRateLimit defines the UserRateLimit message. Counters are split by
|
|
5
|
+
* action class — the post counter (fields 2-5) bounds CreatePost, the
|
|
6
|
+
* make-permanent counter (fields 6-8) bounds MakePostPermanent. They are
|
|
7
|
+
* kept on the same record to avoid an extra collection lookup per call.
|
|
5
8
|
* @name UserRateLimit
|
|
6
9
|
* @package sparkdream.forum.v1
|
|
7
10
|
* @see proto type: sparkdream.forum.v1.UserRateLimit
|
|
@@ -12,13 +15,22 @@ export interface UserRateLimit {
|
|
|
12
15
|
previousEpochCount: bigint;
|
|
13
16
|
currentEpochStart: bigint;
|
|
14
17
|
lastPostTime: bigint;
|
|
18
|
+
/**
|
|
19
|
+
* MakePostPermanent sliding-window counters, mirrored from the post counter.
|
|
20
|
+
*/
|
|
21
|
+
makePermanentCurrentEpochCount: bigint;
|
|
22
|
+
makePermanentPreviousEpochCount: bigint;
|
|
23
|
+
makePermanentCurrentEpochStart: bigint;
|
|
15
24
|
}
|
|
16
25
|
export interface UserRateLimitProtoMsg {
|
|
17
26
|
typeUrl: "/sparkdream.forum.v1.UserRateLimit";
|
|
18
27
|
value: Uint8Array;
|
|
19
28
|
}
|
|
20
29
|
/**
|
|
21
|
-
* UserRateLimit defines the UserRateLimit message.
|
|
30
|
+
* UserRateLimit defines the UserRateLimit message. Counters are split by
|
|
31
|
+
* action class — the post counter (fields 2-5) bounds CreatePost, the
|
|
32
|
+
* make-permanent counter (fields 6-8) bounds MakePostPermanent. They are
|
|
33
|
+
* kept on the same record to avoid an extra collection lookup per call.
|
|
22
34
|
* @name UserRateLimitAmino
|
|
23
35
|
* @package sparkdream.forum.v1
|
|
24
36
|
* @see proto type: sparkdream.forum.v1.UserRateLimit
|
|
@@ -29,13 +41,22 @@ export interface UserRateLimitAmino {
|
|
|
29
41
|
previous_epoch_count?: string;
|
|
30
42
|
current_epoch_start?: string;
|
|
31
43
|
last_post_time?: string;
|
|
44
|
+
/**
|
|
45
|
+
* MakePostPermanent sliding-window counters, mirrored from the post counter.
|
|
46
|
+
*/
|
|
47
|
+
make_permanent_current_epoch_count?: string;
|
|
48
|
+
make_permanent_previous_epoch_count?: string;
|
|
49
|
+
make_permanent_current_epoch_start?: string;
|
|
32
50
|
}
|
|
33
51
|
export interface UserRateLimitAminoMsg {
|
|
34
52
|
type: "/sparkdream.forum.v1.UserRateLimit";
|
|
35
53
|
value: UserRateLimitAmino;
|
|
36
54
|
}
|
|
37
55
|
/**
|
|
38
|
-
* UserRateLimit defines the UserRateLimit message.
|
|
56
|
+
* UserRateLimit defines the UserRateLimit message. Counters are split by
|
|
57
|
+
* action class — the post counter (fields 2-5) bounds CreatePost, the
|
|
58
|
+
* make-permanent counter (fields 6-8) bounds MakePostPermanent. They are
|
|
59
|
+
* kept on the same record to avoid an extra collection lookup per call.
|
|
39
60
|
* @name UserRateLimit
|
|
40
61
|
* @package sparkdream.forum.v1
|
|
41
62
|
* @see proto type: sparkdream.forum.v1.UserRateLimit
|
|
@@ -9,11 +9,17 @@ function createBaseUserRateLimit() {
|
|
|
9
9
|
currentEpochCount: BigInt(0),
|
|
10
10
|
previousEpochCount: BigInt(0),
|
|
11
11
|
currentEpochStart: BigInt(0),
|
|
12
|
-
lastPostTime: BigInt(0)
|
|
12
|
+
lastPostTime: BigInt(0),
|
|
13
|
+
makePermanentCurrentEpochCount: BigInt(0),
|
|
14
|
+
makePermanentPreviousEpochCount: BigInt(0),
|
|
15
|
+
makePermanentCurrentEpochStart: BigInt(0)
|
|
13
16
|
};
|
|
14
17
|
}
|
|
15
18
|
/**
|
|
16
|
-
* UserRateLimit defines the UserRateLimit message.
|
|
19
|
+
* UserRateLimit defines the UserRateLimit message. Counters are split by
|
|
20
|
+
* action class — the post counter (fields 2-5) bounds CreatePost, the
|
|
21
|
+
* make-permanent counter (fields 6-8) bounds MakePostPermanent. They are
|
|
22
|
+
* kept on the same record to avoid an extra collection lookup per call.
|
|
17
23
|
* @name UserRateLimit
|
|
18
24
|
* @package sparkdream.forum.v1
|
|
19
25
|
* @see proto type: sparkdream.forum.v1.UserRateLimit
|
|
@@ -36,6 +42,15 @@ exports.UserRateLimit = {
|
|
|
36
42
|
if (message.lastPostTime !== BigInt(0)) {
|
|
37
43
|
writer.uint32(40).int64(message.lastPostTime);
|
|
38
44
|
}
|
|
45
|
+
if (message.makePermanentCurrentEpochCount !== BigInt(0)) {
|
|
46
|
+
writer.uint32(48).uint64(message.makePermanentCurrentEpochCount);
|
|
47
|
+
}
|
|
48
|
+
if (message.makePermanentPreviousEpochCount !== BigInt(0)) {
|
|
49
|
+
writer.uint32(56).uint64(message.makePermanentPreviousEpochCount);
|
|
50
|
+
}
|
|
51
|
+
if (message.makePermanentCurrentEpochStart !== BigInt(0)) {
|
|
52
|
+
writer.uint32(64).int64(message.makePermanentCurrentEpochStart);
|
|
53
|
+
}
|
|
39
54
|
return writer;
|
|
40
55
|
},
|
|
41
56
|
decode(input, length) {
|
|
@@ -60,6 +75,15 @@ exports.UserRateLimit = {
|
|
|
60
75
|
case 5:
|
|
61
76
|
message.lastPostTime = reader.int64();
|
|
62
77
|
break;
|
|
78
|
+
case 6:
|
|
79
|
+
message.makePermanentCurrentEpochCount = reader.uint64();
|
|
80
|
+
break;
|
|
81
|
+
case 7:
|
|
82
|
+
message.makePermanentPreviousEpochCount = reader.uint64();
|
|
83
|
+
break;
|
|
84
|
+
case 8:
|
|
85
|
+
message.makePermanentCurrentEpochStart = reader.int64();
|
|
86
|
+
break;
|
|
63
87
|
default:
|
|
64
88
|
reader.skipType(tag & 7);
|
|
65
89
|
break;
|
|
@@ -74,6 +98,9 @@ exports.UserRateLimit = {
|
|
|
74
98
|
message.previousEpochCount = object.previousEpochCount !== undefined && object.previousEpochCount !== null ? BigInt(object.previousEpochCount.toString()) : BigInt(0);
|
|
75
99
|
message.currentEpochStart = object.currentEpochStart !== undefined && object.currentEpochStart !== null ? BigInt(object.currentEpochStart.toString()) : BigInt(0);
|
|
76
100
|
message.lastPostTime = object.lastPostTime !== undefined && object.lastPostTime !== null ? BigInt(object.lastPostTime.toString()) : BigInt(0);
|
|
101
|
+
message.makePermanentCurrentEpochCount = object.makePermanentCurrentEpochCount !== undefined && object.makePermanentCurrentEpochCount !== null ? BigInt(object.makePermanentCurrentEpochCount.toString()) : BigInt(0);
|
|
102
|
+
message.makePermanentPreviousEpochCount = object.makePermanentPreviousEpochCount !== undefined && object.makePermanentPreviousEpochCount !== null ? BigInt(object.makePermanentPreviousEpochCount.toString()) : BigInt(0);
|
|
103
|
+
message.makePermanentCurrentEpochStart = object.makePermanentCurrentEpochStart !== undefined && object.makePermanentCurrentEpochStart !== null ? BigInt(object.makePermanentCurrentEpochStart.toString()) : BigInt(0);
|
|
77
104
|
return message;
|
|
78
105
|
},
|
|
79
106
|
fromAmino(object) {
|
|
@@ -93,6 +120,15 @@ exports.UserRateLimit = {
|
|
|
93
120
|
if (object.last_post_time !== undefined && object.last_post_time !== null) {
|
|
94
121
|
message.lastPostTime = BigInt(object.last_post_time);
|
|
95
122
|
}
|
|
123
|
+
if (object.make_permanent_current_epoch_count !== undefined && object.make_permanent_current_epoch_count !== null) {
|
|
124
|
+
message.makePermanentCurrentEpochCount = BigInt(object.make_permanent_current_epoch_count);
|
|
125
|
+
}
|
|
126
|
+
if (object.make_permanent_previous_epoch_count !== undefined && object.make_permanent_previous_epoch_count !== null) {
|
|
127
|
+
message.makePermanentPreviousEpochCount = BigInt(object.make_permanent_previous_epoch_count);
|
|
128
|
+
}
|
|
129
|
+
if (object.make_permanent_current_epoch_start !== undefined && object.make_permanent_current_epoch_start !== null) {
|
|
130
|
+
message.makePermanentCurrentEpochStart = BigInt(object.make_permanent_current_epoch_start);
|
|
131
|
+
}
|
|
96
132
|
return message;
|
|
97
133
|
},
|
|
98
134
|
toAmino(message) {
|
|
@@ -102,6 +138,9 @@ exports.UserRateLimit = {
|
|
|
102
138
|
obj.previous_epoch_count = message.previousEpochCount !== BigInt(0) ? message.previousEpochCount?.toString() : undefined;
|
|
103
139
|
obj.current_epoch_start = message.currentEpochStart !== BigInt(0) ? message.currentEpochStart?.toString() : undefined;
|
|
104
140
|
obj.last_post_time = message.lastPostTime !== BigInt(0) ? message.lastPostTime?.toString() : undefined;
|
|
141
|
+
obj.make_permanent_current_epoch_count = message.makePermanentCurrentEpochCount !== BigInt(0) ? message.makePermanentCurrentEpochCount?.toString() : undefined;
|
|
142
|
+
obj.make_permanent_previous_epoch_count = message.makePermanentPreviousEpochCount !== BigInt(0) ? message.makePermanentPreviousEpochCount?.toString() : undefined;
|
|
143
|
+
obj.make_permanent_current_epoch_start = message.makePermanentCurrentEpochStart !== BigInt(0) ? message.makePermanentCurrentEpochStart?.toString() : undefined;
|
|
105
144
|
return obj;
|
|
106
145
|
},
|
|
107
146
|
fromAminoMsg(object) {
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "../../../../binary";
|
|
2
|
+
import { DeepPartial } from "../../../../helpers";
|
|
3
|
+
/**
|
|
4
|
+
* Module is the config object for the guardian module.
|
|
5
|
+
*
|
|
6
|
+
* guardian is a generic authority-gating module. It owns the authority
|
|
7
|
+
* addresses for one or more downstream modules (bank, mint, staking by
|
|
8
|
+
* default) and exposes a single MsgExec wrapper that gov can call to
|
|
9
|
+
* invoke msg-type-specific proxies. Per-msg-type filters reject changes
|
|
10
|
+
* to fields the chain has decided are immutable (e.g., mint inflation
|
|
11
|
+
* parameters, bank native-denom Symbol/Display).
|
|
12
|
+
*
|
|
13
|
+
* See docs/x-identity-spec.md §14.6 for the identity-protection use
|
|
14
|
+
* case, and the implementation-decisions doc for the broader rationale.
|
|
15
|
+
* @name Module
|
|
16
|
+
* @package sparkdream.guardian.module.v1
|
|
17
|
+
* @see proto type: sparkdream.guardian.module.v1.Module
|
|
18
|
+
*/
|
|
19
|
+
export interface Module {
|
|
20
|
+
}
|
|
21
|
+
export interface ModuleProtoMsg {
|
|
22
|
+
typeUrl: "/sparkdream.guardian.module.v1.Module";
|
|
23
|
+
value: Uint8Array;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Module is the config object for the guardian module.
|
|
27
|
+
*
|
|
28
|
+
* guardian is a generic authority-gating module. It owns the authority
|
|
29
|
+
* addresses for one or more downstream modules (bank, mint, staking by
|
|
30
|
+
* default) and exposes a single MsgExec wrapper that gov can call to
|
|
31
|
+
* invoke msg-type-specific proxies. Per-msg-type filters reject changes
|
|
32
|
+
* to fields the chain has decided are immutable (e.g., mint inflation
|
|
33
|
+
* parameters, bank native-denom Symbol/Display).
|
|
34
|
+
*
|
|
35
|
+
* See docs/x-identity-spec.md §14.6 for the identity-protection use
|
|
36
|
+
* case, and the implementation-decisions doc for the broader rationale.
|
|
37
|
+
* @name ModuleAmino
|
|
38
|
+
* @package sparkdream.guardian.module.v1
|
|
39
|
+
* @see proto type: sparkdream.guardian.module.v1.Module
|
|
40
|
+
*/
|
|
41
|
+
export interface ModuleAmino {
|
|
42
|
+
}
|
|
43
|
+
export interface ModuleAminoMsg {
|
|
44
|
+
type: "/sparkdream.guardian.module.v1.Module";
|
|
45
|
+
value: ModuleAmino;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Module is the config object for the guardian module.
|
|
49
|
+
*
|
|
50
|
+
* guardian is a generic authority-gating module. It owns the authority
|
|
51
|
+
* addresses for one or more downstream modules (bank, mint, staking by
|
|
52
|
+
* default) and exposes a single MsgExec wrapper that gov can call to
|
|
53
|
+
* invoke msg-type-specific proxies. Per-msg-type filters reject changes
|
|
54
|
+
* to fields the chain has decided are immutable (e.g., mint inflation
|
|
55
|
+
* parameters, bank native-denom Symbol/Display).
|
|
56
|
+
*
|
|
57
|
+
* See docs/x-identity-spec.md §14.6 for the identity-protection use
|
|
58
|
+
* case, and the implementation-decisions doc for the broader rationale.
|
|
59
|
+
* @name Module
|
|
60
|
+
* @package sparkdream.guardian.module.v1
|
|
61
|
+
* @see proto type: sparkdream.guardian.module.v1.Module
|
|
62
|
+
*/
|
|
63
|
+
export declare const Module: {
|
|
64
|
+
typeUrl: string;
|
|
65
|
+
encode(_: Module, writer?: BinaryWriter): BinaryWriter;
|
|
66
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Module;
|
|
67
|
+
fromPartial(_: DeepPartial<Module>): Module;
|
|
68
|
+
fromAmino(_: ModuleAmino): Module;
|
|
69
|
+
toAmino(_: Module): ModuleAmino;
|
|
70
|
+
fromAminoMsg(object: ModuleAminoMsg): Module;
|
|
71
|
+
fromProtoMsg(message: ModuleProtoMsg): Module;
|
|
72
|
+
toProto(message: Module): Uint8Array;
|
|
73
|
+
toProtoMsg(message: Module): ModuleProtoMsg;
|
|
74
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Module = void 0;
|
|
4
|
+
//@ts-nocheck
|
|
5
|
+
const binary_1 = require("../../../../binary");
|
|
6
|
+
function createBaseModule() {
|
|
7
|
+
return {};
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Module is the config object for the guardian module.
|
|
11
|
+
*
|
|
12
|
+
* guardian is a generic authority-gating module. It owns the authority
|
|
13
|
+
* addresses for one or more downstream modules (bank, mint, staking by
|
|
14
|
+
* default) and exposes a single MsgExec wrapper that gov can call to
|
|
15
|
+
* invoke msg-type-specific proxies. Per-msg-type filters reject changes
|
|
16
|
+
* to fields the chain has decided are immutable (e.g., mint inflation
|
|
17
|
+
* parameters, bank native-denom Symbol/Display).
|
|
18
|
+
*
|
|
19
|
+
* See docs/x-identity-spec.md §14.6 for the identity-protection use
|
|
20
|
+
* case, and the implementation-decisions doc for the broader rationale.
|
|
21
|
+
* @name Module
|
|
22
|
+
* @package sparkdream.guardian.module.v1
|
|
23
|
+
* @see proto type: sparkdream.guardian.module.v1.Module
|
|
24
|
+
*/
|
|
25
|
+
exports.Module = {
|
|
26
|
+
typeUrl: "/sparkdream.guardian.module.v1.Module",
|
|
27
|
+
encode(_, writer = binary_1.BinaryWriter.create()) {
|
|
28
|
+
return writer;
|
|
29
|
+
},
|
|
30
|
+
decode(input, length) {
|
|
31
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
32
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
33
|
+
const message = createBaseModule();
|
|
34
|
+
while (reader.pos < end) {
|
|
35
|
+
const tag = reader.uint32();
|
|
36
|
+
switch (tag >>> 3) {
|
|
37
|
+
default:
|
|
38
|
+
reader.skipType(tag & 7);
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return message;
|
|
43
|
+
},
|
|
44
|
+
fromPartial(_) {
|
|
45
|
+
const message = createBaseModule();
|
|
46
|
+
return message;
|
|
47
|
+
},
|
|
48
|
+
fromAmino(_) {
|
|
49
|
+
const message = createBaseModule();
|
|
50
|
+
return message;
|
|
51
|
+
},
|
|
52
|
+
toAmino(_) {
|
|
53
|
+
const obj = {};
|
|
54
|
+
return obj;
|
|
55
|
+
},
|
|
56
|
+
fromAminoMsg(object) {
|
|
57
|
+
return exports.Module.fromAmino(object.value);
|
|
58
|
+
},
|
|
59
|
+
fromProtoMsg(message) {
|
|
60
|
+
return exports.Module.decode(message.value);
|
|
61
|
+
},
|
|
62
|
+
toProto(message) {
|
|
63
|
+
return exports.Module.encode(message).finish();
|
|
64
|
+
},
|
|
65
|
+
toProtoMsg(message) {
|
|
66
|
+
return {
|
|
67
|
+
typeUrl: "/sparkdream.guardian.module.v1.Module",
|
|
68
|
+
value: exports.Module.encode(message).finish()
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
};
|