@sparkdreamnft/sparkdreamjs 0.0.12 → 0.0.14
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/esm/nested-amino.js +52 -0
- package/esm/sparkdream/commons/v1/tx.amino.js +68 -29
- package/esm/sparkdream/commons/v1/tx.js +147 -0
- package/esm/sparkdream/commons/v1/tx.registry.js +20 -2
- package/esm/sparkdream/commons/v1/tx.rpc.msg.js +7 -1
- package/esm/sparkdream/forum/v1/hide_record.js +19 -1
- package/esm/sparkdream/forum/v1/params.js +26 -2
- package/esm/sparkdream/forum/v1/tx.amino.js +6 -1
- package/esm/sparkdream/forum/v1/tx.js +144 -0
- package/esm/sparkdream/forum/v1/tx.registry.js +20 -2
- package/esm/sparkdream/forum/v1/tx.rpc.msg.js +12 -1
- package/esm/sparkdream/session/v1/tx.amino.js +30 -8
- package/nested-amino.d.ts +76 -0
- package/nested-amino.js +57 -0
- package/package.json +1 -1
- package/sparkdream/bundle.d.ts +89 -6
- package/sparkdream/client.d.ts +11 -6
- package/sparkdream/commons/v1/tx.amino.d.ts +6 -5
- package/sparkdream/commons/v1/tx.amino.js +70 -30
- package/sparkdream/commons/v1/tx.d.ts +99 -0
- package/sparkdream/commons/v1/tx.js +148 -1
- package/sparkdream/commons/v1/tx.registry.d.ts +13 -1
- package/sparkdream/commons/v1/tx.registry.js +19 -1
- package/sparkdream/commons/v1/tx.rpc.msg.d.ts +3 -1
- package/sparkdream/commons/v1/tx.rpc.msg.js +6 -0
- package/sparkdream/forum/v1/hide_record.d.ts +50 -0
- package/sparkdream/forum/v1/hide_record.js +19 -1
- package/sparkdream/forum/v1/params.d.ts +28 -0
- package/sparkdream/forum/v1/params.js +26 -2
- package/sparkdream/forum/v1/tx.amino.d.ts +6 -1
- package/sparkdream/forum/v1/tx.amino.js +5 -0
- package/sparkdream/forum/v1/tx.d.ts +90 -0
- package/sparkdream/forum/v1/tx.js +146 -2
- package/sparkdream/forum/v1/tx.registry.d.ts +13 -1
- package/sparkdream/forum/v1/tx.registry.js +19 -1
- package/sparkdream/forum/v1/tx.rpc.msg.d.ts +11 -1
- package/sparkdream/forum/v1/tx.rpc.msg.js +11 -0
- package/sparkdream/session/v1/tx.amino.d.ts +3 -3
- package/sparkdream/session/v1/tx.amino.js +30 -8
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* Shared registry + helpers for amino-converting messages that embed a
|
|
4
|
+
* `repeated google.protobuf.Any` field (`MsgSubmitProposal`,
|
|
5
|
+
* `MsgSubmitAnonymousProposal`, `MsgExecSession`).
|
|
6
|
+
*
|
|
7
|
+
* The Telescope-generated `Any.toAmino` just emits `{type, value: Uint8Array}`,
|
|
8
|
+
* which JSON.stringify turns into `{"0":N,"1":N,…}` — numeric keys that aren't
|
|
9
|
+
* lexicographically sorted, breaking Ledger's strict amino-JSON validator and
|
|
10
|
+
* leaving the chain unable to reconstruct identical sign bytes.
|
|
11
|
+
*
|
|
12
|
+
* Consumers must call `configureNestedAminoConverter({registry, aminoTypes})`
|
|
13
|
+
* once after they've built both their proto Registry and their stargate
|
|
14
|
+
* AminoTypes. The patched converters below then look up each inner Any's
|
|
15
|
+
* proto codec (to decode bytes back to a typed message) and its registered
|
|
16
|
+
* amino converter (to render the proper amino JSON) — symmetric to what
|
|
17
|
+
* `cosmossdk.io/x/tx/signing/aminojson` does on the chain side.
|
|
18
|
+
*/
|
|
19
|
+
let cfg = null;
|
|
20
|
+
export function configureNestedAminoConverter(next) {
|
|
21
|
+
cfg = next;
|
|
22
|
+
}
|
|
23
|
+
function requireCfg() {
|
|
24
|
+
if (!cfg) {
|
|
25
|
+
throw new Error("@sparkdreamnft/sparkdreamjs: configureNestedAminoConverter({registry, aminoTypes}) " +
|
|
26
|
+
"must be called before amino-signing a tx with MsgSubmitProposal / " +
|
|
27
|
+
"MsgSubmitAnonymousProposal / MsgExecSession (their `messages` / `msgs` " +
|
|
28
|
+
"field needs recursive Any conversion that Telescope can't generate).");
|
|
29
|
+
}
|
|
30
|
+
return cfg;
|
|
31
|
+
}
|
|
32
|
+
/** Convert one proto-encoded Any to its amino representation. */
|
|
33
|
+
export function anyToAmino(any) {
|
|
34
|
+
const { registry, aminoTypes } = requireCfg();
|
|
35
|
+
const codec = registry.lookupType(any.typeUrl);
|
|
36
|
+
if (!codec) {
|
|
37
|
+
throw new Error(`No proto codec registered for inner type ${any.typeUrl}. ` +
|
|
38
|
+
`Ensure the corresponding module's load() has been called on your Registry.`);
|
|
39
|
+
}
|
|
40
|
+
const decoded = codec.decode(any.value);
|
|
41
|
+
return aminoTypes.toAmino({ typeUrl: any.typeUrl, value: decoded });
|
|
42
|
+
}
|
|
43
|
+
/** Convert one amino-typed entry back to a proto-encoded Any. */
|
|
44
|
+
export function aminoToAny(entry) {
|
|
45
|
+
const { registry, aminoTypes } = requireCfg();
|
|
46
|
+
const decoded = aminoTypes.fromAmino(entry);
|
|
47
|
+
const codec = registry.lookupType(decoded.typeUrl);
|
|
48
|
+
if (!codec) {
|
|
49
|
+
throw new Error(`No proto codec registered for inner type ${decoded.typeUrl}.`);
|
|
50
|
+
}
|
|
51
|
+
return { typeUrl: decoded.typeUrl, value: codec.encode(codec.fromPartial(decoded.value)).finish() };
|
|
52
|
+
}
|
|
@@ -1,99 +1,138 @@
|
|
|
1
1
|
//@ts-nocheck
|
|
2
|
-
|
|
2
|
+
// HAND-WRITTEN OVERRIDE — overlaid on top of the Telescope-generated tx.amino.ts
|
|
3
|
+
// by scripts/codegen.ts after each codegen run. Do not let codegen wipe this.
|
|
4
|
+
//
|
|
5
|
+
// Why: Telescope emits a flat AminoConverter that hands each entry's toAmino
|
|
6
|
+
// straight through to the message's auto-generated toAmino. For
|
|
7
|
+
// MsgSubmitProposal and MsgSubmitAnonymousProposal (both have
|
|
8
|
+
// `repeated google.protobuf.Any messages`), the auto-generated toAmino calls
|
|
9
|
+
// Any.toAmino which just attaches the raw Uint8Array bytes — Ledger rejects
|
|
10
|
+
// the resulting JSON ("Dictionaries are not sorted") and the chain produces
|
|
11
|
+
// different sign bytes ("signature verification failed").
|
|
12
|
+
//
|
|
13
|
+
// This override delegates the inner Any conversion to a consumer-supplied
|
|
14
|
+
// proto registry + AminoTypes via `configureNestedAminoConverter`. The rest of
|
|
15
|
+
// the converters are unchanged.
|
|
16
|
+
import { MsgUpdateParams, MsgSpendFromCommons, MsgEmergencyCancelGovProposal, MsgCreatePolicyPermissions, MsgUpdatePolicyPermissions, MsgDeletePolicyPermissions, MsgRegisterGroup, MsgRenewGroup, MsgUpdateGroupMembers, MsgUpdateGroupConfig, MsgForceUpgrade, MsgDeleteGroup, MsgVetoGroupProposals, MsgVoteProposal, MsgExecuteProposal, MsgAnonymousVoteProposal, MsgCreateCategory, } from "./tx";
|
|
17
|
+
import { anyToAmino, aminoToAny } from "../../../nested-amino";
|
|
18
|
+
export { configureNestedAminoConverter } from "../../../nested-amino";
|
|
19
|
+
// Both proposal-submission messages share the same shape, so they share a
|
|
20
|
+
// converter factory.
|
|
21
|
+
function buildProposalConverter(aminoType) {
|
|
22
|
+
return {
|
|
23
|
+
aminoType,
|
|
24
|
+
toAmino(message) {
|
|
25
|
+
const obj = {};
|
|
26
|
+
obj.proposer = message.proposer === "" ? undefined : message.proposer;
|
|
27
|
+
obj.policy_address = message.policyAddress === "" ? undefined : message.policyAddress;
|
|
28
|
+
// Mirror cosmossdk.io/x/tx/signing/aminojson's omitempty default for
|
|
29
|
+
// repeated fields: omit when empty rather than emitting `[]`. Otherwise
|
|
30
|
+
// the JS side signs `"messages":[]` and the chain reconstructs without
|
|
31
|
+
// the key, causing signature verification to fail.
|
|
32
|
+
obj.messages = (message.messages?.length ?? 0) > 0
|
|
33
|
+
? message.messages.map((a) => anyToAmino(a))
|
|
34
|
+
: undefined;
|
|
35
|
+
obj.metadata = message.metadata === "" ? undefined : message.metadata;
|
|
36
|
+
return obj;
|
|
37
|
+
},
|
|
38
|
+
fromAmino(object) {
|
|
39
|
+
return {
|
|
40
|
+
proposer: object.proposer ?? "",
|
|
41
|
+
policyAddress: object.policy_address ?? "",
|
|
42
|
+
messages: (object.messages ?? []).map((e) => aminoToAny(e)),
|
|
43
|
+
metadata: object.metadata ?? "",
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
3
48
|
export const AminoConverter = {
|
|
4
49
|
"/sparkdream.commons.v1.MsgUpdateParams": {
|
|
5
50
|
aminoType: "sparkdream/x/commons/MsgUpdateParams",
|
|
6
51
|
toAmino: MsgUpdateParams.toAmino,
|
|
7
|
-
fromAmino: MsgUpdateParams.fromAmino
|
|
52
|
+
fromAmino: MsgUpdateParams.fromAmino,
|
|
8
53
|
},
|
|
9
54
|
"/sparkdream.commons.v1.MsgSpendFromCommons": {
|
|
10
55
|
aminoType: "sparkdream/x/commons/MsgSpendFromCommons",
|
|
11
56
|
toAmino: MsgSpendFromCommons.toAmino,
|
|
12
|
-
fromAmino: MsgSpendFromCommons.fromAmino
|
|
57
|
+
fromAmino: MsgSpendFromCommons.fromAmino,
|
|
13
58
|
},
|
|
14
59
|
"/sparkdream.commons.v1.MsgEmergencyCancelGovProposal": {
|
|
15
60
|
aminoType: "sparkdream/x/commons/MsgEmergencyCancelGovProposal",
|
|
16
61
|
toAmino: MsgEmergencyCancelGovProposal.toAmino,
|
|
17
|
-
fromAmino: MsgEmergencyCancelGovProposal.fromAmino
|
|
62
|
+
fromAmino: MsgEmergencyCancelGovProposal.fromAmino,
|
|
18
63
|
},
|
|
19
64
|
"/sparkdream.commons.v1.MsgCreatePolicyPermissions": {
|
|
20
65
|
aminoType: "sparkdream/x/commons/MsgCreatePolicyPermissions",
|
|
21
66
|
toAmino: MsgCreatePolicyPermissions.toAmino,
|
|
22
|
-
fromAmino: MsgCreatePolicyPermissions.fromAmino
|
|
67
|
+
fromAmino: MsgCreatePolicyPermissions.fromAmino,
|
|
23
68
|
},
|
|
24
69
|
"/sparkdream.commons.v1.MsgUpdatePolicyPermissions": {
|
|
25
70
|
aminoType: "sparkdream/x/commons/MsgUpdatePolicyPermissions",
|
|
26
71
|
toAmino: MsgUpdatePolicyPermissions.toAmino,
|
|
27
|
-
fromAmino: MsgUpdatePolicyPermissions.fromAmino
|
|
72
|
+
fromAmino: MsgUpdatePolicyPermissions.fromAmino,
|
|
28
73
|
},
|
|
29
74
|
"/sparkdream.commons.v1.MsgDeletePolicyPermissions": {
|
|
30
75
|
aminoType: "sparkdream/x/commons/MsgDeletePolicyPermissions",
|
|
31
76
|
toAmino: MsgDeletePolicyPermissions.toAmino,
|
|
32
|
-
fromAmino: MsgDeletePolicyPermissions.fromAmino
|
|
77
|
+
fromAmino: MsgDeletePolicyPermissions.fromAmino,
|
|
33
78
|
},
|
|
34
79
|
"/sparkdream.commons.v1.MsgRegisterGroup": {
|
|
35
80
|
aminoType: "sparkdream/x/commons/MsgRegisterGroup",
|
|
36
81
|
toAmino: MsgRegisterGroup.toAmino,
|
|
37
|
-
fromAmino: MsgRegisterGroup.fromAmino
|
|
82
|
+
fromAmino: MsgRegisterGroup.fromAmino,
|
|
38
83
|
},
|
|
39
84
|
"/sparkdream.commons.v1.MsgRenewGroup": {
|
|
40
85
|
aminoType: "sparkdream/x/commons/MsgRenewGroup",
|
|
41
86
|
toAmino: MsgRenewGroup.toAmino,
|
|
42
|
-
fromAmino: MsgRenewGroup.fromAmino
|
|
87
|
+
fromAmino: MsgRenewGroup.fromAmino,
|
|
43
88
|
},
|
|
44
89
|
"/sparkdream.commons.v1.MsgUpdateGroupMembers": {
|
|
45
90
|
aminoType: "sparkdream/x/commons/MsgUpdateGroupMembers",
|
|
46
91
|
toAmino: MsgUpdateGroupMembers.toAmino,
|
|
47
|
-
fromAmino: MsgUpdateGroupMembers.fromAmino
|
|
92
|
+
fromAmino: MsgUpdateGroupMembers.fromAmino,
|
|
48
93
|
},
|
|
49
94
|
"/sparkdream.commons.v1.MsgUpdateGroupConfig": {
|
|
50
95
|
aminoType: "sparkdream/x/commons/MsgUpdateGroupConfig",
|
|
51
96
|
toAmino: MsgUpdateGroupConfig.toAmino,
|
|
52
|
-
fromAmino: MsgUpdateGroupConfig.fromAmino
|
|
97
|
+
fromAmino: MsgUpdateGroupConfig.fromAmino,
|
|
53
98
|
},
|
|
54
99
|
"/sparkdream.commons.v1.MsgForceUpgrade": {
|
|
55
100
|
aminoType: "sparkdream/x/commons/MsgForceUpgrade",
|
|
56
101
|
toAmino: MsgForceUpgrade.toAmino,
|
|
57
|
-
fromAmino: MsgForceUpgrade.fromAmino
|
|
102
|
+
fromAmino: MsgForceUpgrade.fromAmino,
|
|
58
103
|
},
|
|
59
104
|
"/sparkdream.commons.v1.MsgDeleteGroup": {
|
|
60
105
|
aminoType: "sparkdream/x/commons/MsgDeleteGroup",
|
|
61
106
|
toAmino: MsgDeleteGroup.toAmino,
|
|
62
|
-
fromAmino: MsgDeleteGroup.fromAmino
|
|
107
|
+
fromAmino: MsgDeleteGroup.fromAmino,
|
|
63
108
|
},
|
|
64
109
|
"/sparkdream.commons.v1.MsgVetoGroupProposals": {
|
|
65
110
|
aminoType: "sparkdream/x/commons/MsgVetoGroupProposals",
|
|
66
111
|
toAmino: MsgVetoGroupProposals.toAmino,
|
|
67
|
-
fromAmino: MsgVetoGroupProposals.fromAmino
|
|
68
|
-
},
|
|
69
|
-
"/sparkdream.commons.v1.MsgSubmitProposal": {
|
|
70
|
-
aminoType: "sparkdream/x/commons/MsgSubmitProposal",
|
|
71
|
-
toAmino: MsgSubmitProposal.toAmino,
|
|
72
|
-
fromAmino: MsgSubmitProposal.fromAmino
|
|
112
|
+
fromAmino: MsgVetoGroupProposals.fromAmino,
|
|
73
113
|
},
|
|
114
|
+
// Recursive Any handling — see top-of-file comment.
|
|
115
|
+
"/sparkdream.commons.v1.MsgSubmitProposal": buildProposalConverter("sparkdream/x/commons/MsgSubmitProposal"),
|
|
74
116
|
"/sparkdream.commons.v1.MsgVoteProposal": {
|
|
75
117
|
aminoType: "sparkdream/x/commons/MsgVoteProposal",
|
|
76
118
|
toAmino: MsgVoteProposal.toAmino,
|
|
77
|
-
fromAmino: MsgVoteProposal.fromAmino
|
|
119
|
+
fromAmino: MsgVoteProposal.fromAmino,
|
|
78
120
|
},
|
|
79
121
|
"/sparkdream.commons.v1.MsgExecuteProposal": {
|
|
80
122
|
aminoType: "sparkdream/x/commons/MsgExecuteProposal",
|
|
81
123
|
toAmino: MsgExecuteProposal.toAmino,
|
|
82
|
-
fromAmino: MsgExecuteProposal.fromAmino
|
|
83
|
-
},
|
|
84
|
-
"/sparkdream.commons.v1.MsgSubmitAnonymousProposal": {
|
|
85
|
-
aminoType: "sparkdream/x/commons/MsgSubmitAnonymousProposal",
|
|
86
|
-
toAmino: MsgSubmitAnonymousProposal.toAmino,
|
|
87
|
-
fromAmino: MsgSubmitAnonymousProposal.fromAmino
|
|
124
|
+
fromAmino: MsgExecuteProposal.fromAmino,
|
|
88
125
|
},
|
|
126
|
+
// Recursive Any handling — see top-of-file comment.
|
|
127
|
+
"/sparkdream.commons.v1.MsgSubmitAnonymousProposal": buildProposalConverter("sparkdream/x/commons/MsgSubmitAnonymousProposal"),
|
|
89
128
|
"/sparkdream.commons.v1.MsgAnonymousVoteProposal": {
|
|
90
129
|
aminoType: "sparkdream/x/commons/MsgAnonymousVoteProposal",
|
|
91
130
|
toAmino: MsgAnonymousVoteProposal.toAmino,
|
|
92
|
-
fromAmino: MsgAnonymousVoteProposal.fromAmino
|
|
131
|
+
fromAmino: MsgAnonymousVoteProposal.fromAmino,
|
|
93
132
|
},
|
|
94
133
|
"/sparkdream.commons.v1.MsgCreateCategory": {
|
|
95
134
|
aminoType: "sparkdream/x/commons/MsgCreateCategory",
|
|
96
135
|
toAmino: MsgCreateCategory.toAmino,
|
|
97
|
-
fromAmino: MsgCreateCategory.fromAmino
|
|
98
|
-
}
|
|
136
|
+
fromAmino: MsgCreateCategory.fromAmino,
|
|
137
|
+
},
|
|
99
138
|
};
|
|
@@ -3564,3 +3564,150 @@ export const MsgCreateCategoryResponse = {
|
|
|
3564
3564
|
};
|
|
3565
3565
|
}
|
|
3566
3566
|
};
|
|
3567
|
+
function createBaseMsgDeleteCategory() {
|
|
3568
|
+
return {
|
|
3569
|
+
creator: "",
|
|
3570
|
+
categoryId: BigInt(0)
|
|
3571
|
+
};
|
|
3572
|
+
}
|
|
3573
|
+
/**
|
|
3574
|
+
* MsgDeleteCategory removes a shared content category. Restricted to
|
|
3575
|
+
* governance or the Commons Council Operations Committee. Refuses to
|
|
3576
|
+
* delete a category that still has forum posts attached — admins must
|
|
3577
|
+
* move/archive those first.
|
|
3578
|
+
* @name MsgDeleteCategory
|
|
3579
|
+
* @package sparkdream.commons.v1
|
|
3580
|
+
* @see proto type: sparkdream.commons.v1.MsgDeleteCategory
|
|
3581
|
+
*/
|
|
3582
|
+
export const MsgDeleteCategory = {
|
|
3583
|
+
typeUrl: "/sparkdream.commons.v1.MsgDeleteCategory",
|
|
3584
|
+
aminoType: "sparkdream/x/commons/MsgDeleteCategory",
|
|
3585
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
3586
|
+
if (message.creator !== "") {
|
|
3587
|
+
writer.uint32(10).string(message.creator);
|
|
3588
|
+
}
|
|
3589
|
+
if (message.categoryId !== BigInt(0)) {
|
|
3590
|
+
writer.uint32(16).uint64(message.categoryId);
|
|
3591
|
+
}
|
|
3592
|
+
return writer;
|
|
3593
|
+
},
|
|
3594
|
+
decode(input, length) {
|
|
3595
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3596
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3597
|
+
const message = createBaseMsgDeleteCategory();
|
|
3598
|
+
while (reader.pos < end) {
|
|
3599
|
+
const tag = reader.uint32();
|
|
3600
|
+
switch (tag >>> 3) {
|
|
3601
|
+
case 1:
|
|
3602
|
+
message.creator = reader.string();
|
|
3603
|
+
break;
|
|
3604
|
+
case 2:
|
|
3605
|
+
message.categoryId = reader.uint64();
|
|
3606
|
+
break;
|
|
3607
|
+
default:
|
|
3608
|
+
reader.skipType(tag & 7);
|
|
3609
|
+
break;
|
|
3610
|
+
}
|
|
3611
|
+
}
|
|
3612
|
+
return message;
|
|
3613
|
+
},
|
|
3614
|
+
fromPartial(object) {
|
|
3615
|
+
const message = createBaseMsgDeleteCategory();
|
|
3616
|
+
message.creator = object.creator ?? "";
|
|
3617
|
+
message.categoryId = object.categoryId !== undefined && object.categoryId !== null ? BigInt(object.categoryId.toString()) : BigInt(0);
|
|
3618
|
+
return message;
|
|
3619
|
+
},
|
|
3620
|
+
fromAmino(object) {
|
|
3621
|
+
const message = createBaseMsgDeleteCategory();
|
|
3622
|
+
if (object.creator !== undefined && object.creator !== null) {
|
|
3623
|
+
message.creator = object.creator;
|
|
3624
|
+
}
|
|
3625
|
+
if (object.category_id !== undefined && object.category_id !== null) {
|
|
3626
|
+
message.categoryId = BigInt(object.category_id);
|
|
3627
|
+
}
|
|
3628
|
+
return message;
|
|
3629
|
+
},
|
|
3630
|
+
toAmino(message) {
|
|
3631
|
+
const obj = {};
|
|
3632
|
+
obj.creator = message.creator === "" ? undefined : message.creator;
|
|
3633
|
+
obj.category_id = message.categoryId !== BigInt(0) ? message.categoryId?.toString() : undefined;
|
|
3634
|
+
return obj;
|
|
3635
|
+
},
|
|
3636
|
+
fromAminoMsg(object) {
|
|
3637
|
+
return MsgDeleteCategory.fromAmino(object.value);
|
|
3638
|
+
},
|
|
3639
|
+
toAminoMsg(message) {
|
|
3640
|
+
return {
|
|
3641
|
+
type: "sparkdream/x/commons/MsgDeleteCategory",
|
|
3642
|
+
value: MsgDeleteCategory.toAmino(message)
|
|
3643
|
+
};
|
|
3644
|
+
},
|
|
3645
|
+
fromProtoMsg(message) {
|
|
3646
|
+
return MsgDeleteCategory.decode(message.value);
|
|
3647
|
+
},
|
|
3648
|
+
toProto(message) {
|
|
3649
|
+
return MsgDeleteCategory.encode(message).finish();
|
|
3650
|
+
},
|
|
3651
|
+
toProtoMsg(message) {
|
|
3652
|
+
return {
|
|
3653
|
+
typeUrl: "/sparkdream.commons.v1.MsgDeleteCategory",
|
|
3654
|
+
value: MsgDeleteCategory.encode(message).finish()
|
|
3655
|
+
};
|
|
3656
|
+
}
|
|
3657
|
+
};
|
|
3658
|
+
function createBaseMsgDeleteCategoryResponse() {
|
|
3659
|
+
return {};
|
|
3660
|
+
}
|
|
3661
|
+
/**
|
|
3662
|
+
* MsgDeleteCategoryResponse defines the MsgDeleteCategoryResponse message.
|
|
3663
|
+
* @name MsgDeleteCategoryResponse
|
|
3664
|
+
* @package sparkdream.commons.v1
|
|
3665
|
+
* @see proto type: sparkdream.commons.v1.MsgDeleteCategoryResponse
|
|
3666
|
+
*/
|
|
3667
|
+
export const MsgDeleteCategoryResponse = {
|
|
3668
|
+
typeUrl: "/sparkdream.commons.v1.MsgDeleteCategoryResponse",
|
|
3669
|
+
encode(_, writer = BinaryWriter.create()) {
|
|
3670
|
+
return writer;
|
|
3671
|
+
},
|
|
3672
|
+
decode(input, length) {
|
|
3673
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3674
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3675
|
+
const message = createBaseMsgDeleteCategoryResponse();
|
|
3676
|
+
while (reader.pos < end) {
|
|
3677
|
+
const tag = reader.uint32();
|
|
3678
|
+
switch (tag >>> 3) {
|
|
3679
|
+
default:
|
|
3680
|
+
reader.skipType(tag & 7);
|
|
3681
|
+
break;
|
|
3682
|
+
}
|
|
3683
|
+
}
|
|
3684
|
+
return message;
|
|
3685
|
+
},
|
|
3686
|
+
fromPartial(_) {
|
|
3687
|
+
const message = createBaseMsgDeleteCategoryResponse();
|
|
3688
|
+
return message;
|
|
3689
|
+
},
|
|
3690
|
+
fromAmino(_) {
|
|
3691
|
+
const message = createBaseMsgDeleteCategoryResponse();
|
|
3692
|
+
return message;
|
|
3693
|
+
},
|
|
3694
|
+
toAmino(_) {
|
|
3695
|
+
const obj = {};
|
|
3696
|
+
return obj;
|
|
3697
|
+
},
|
|
3698
|
+
fromAminoMsg(object) {
|
|
3699
|
+
return MsgDeleteCategoryResponse.fromAmino(object.value);
|
|
3700
|
+
},
|
|
3701
|
+
fromProtoMsg(message) {
|
|
3702
|
+
return MsgDeleteCategoryResponse.decode(message.value);
|
|
3703
|
+
},
|
|
3704
|
+
toProto(message) {
|
|
3705
|
+
return MsgDeleteCategoryResponse.encode(message).finish();
|
|
3706
|
+
},
|
|
3707
|
+
toProtoMsg(message) {
|
|
3708
|
+
return {
|
|
3709
|
+
typeUrl: "/sparkdream.commons.v1.MsgDeleteCategoryResponse",
|
|
3710
|
+
value: MsgDeleteCategoryResponse.encode(message).finish()
|
|
3711
|
+
};
|
|
3712
|
+
}
|
|
3713
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MsgUpdateParams, MsgSpendFromCommons, MsgEmergencyCancelGovProposal, MsgCreatePolicyPermissions, MsgUpdatePolicyPermissions, MsgDeletePolicyPermissions, MsgRegisterGroup, MsgRenewGroup, MsgUpdateGroupMembers, MsgUpdateGroupConfig, MsgForceUpgrade, MsgDeleteGroup, MsgVetoGroupProposals, MsgSubmitProposal, MsgVoteProposal, MsgExecuteProposal, MsgSubmitAnonymousProposal, MsgAnonymousVoteProposal, MsgCreateCategory } from "./tx";
|
|
2
|
-
export const registry = [["/sparkdream.commons.v1.MsgUpdateParams", MsgUpdateParams], ["/sparkdream.commons.v1.MsgSpendFromCommons", MsgSpendFromCommons], ["/sparkdream.commons.v1.MsgEmergencyCancelGovProposal", MsgEmergencyCancelGovProposal], ["/sparkdream.commons.v1.MsgCreatePolicyPermissions", MsgCreatePolicyPermissions], ["/sparkdream.commons.v1.MsgUpdatePolicyPermissions", MsgUpdatePolicyPermissions], ["/sparkdream.commons.v1.MsgDeletePolicyPermissions", MsgDeletePolicyPermissions], ["/sparkdream.commons.v1.MsgRegisterGroup", MsgRegisterGroup], ["/sparkdream.commons.v1.MsgRenewGroup", MsgRenewGroup], ["/sparkdream.commons.v1.MsgUpdateGroupMembers", MsgUpdateGroupMembers], ["/sparkdream.commons.v1.MsgUpdateGroupConfig", MsgUpdateGroupConfig], ["/sparkdream.commons.v1.MsgForceUpgrade", MsgForceUpgrade], ["/sparkdream.commons.v1.MsgDeleteGroup", MsgDeleteGroup], ["/sparkdream.commons.v1.MsgVetoGroupProposals", MsgVetoGroupProposals], ["/sparkdream.commons.v1.MsgSubmitProposal", MsgSubmitProposal], ["/sparkdream.commons.v1.MsgVoteProposal", MsgVoteProposal], ["/sparkdream.commons.v1.MsgExecuteProposal", MsgExecuteProposal], ["/sparkdream.commons.v1.MsgSubmitAnonymousProposal", MsgSubmitAnonymousProposal], ["/sparkdream.commons.v1.MsgAnonymousVoteProposal", MsgAnonymousVoteProposal], ["/sparkdream.commons.v1.MsgCreateCategory", MsgCreateCategory]];
|
|
1
|
+
import { MsgUpdateParams, MsgSpendFromCommons, MsgEmergencyCancelGovProposal, MsgCreatePolicyPermissions, MsgUpdatePolicyPermissions, MsgDeletePolicyPermissions, MsgRegisterGroup, MsgRenewGroup, MsgUpdateGroupMembers, MsgUpdateGroupConfig, MsgForceUpgrade, MsgDeleteGroup, MsgVetoGroupProposals, MsgSubmitProposal, MsgVoteProposal, MsgExecuteProposal, MsgSubmitAnonymousProposal, MsgAnonymousVoteProposal, MsgCreateCategory, MsgDeleteCategory } from "./tx";
|
|
2
|
+
export const registry = [["/sparkdream.commons.v1.MsgUpdateParams", MsgUpdateParams], ["/sparkdream.commons.v1.MsgSpendFromCommons", MsgSpendFromCommons], ["/sparkdream.commons.v1.MsgEmergencyCancelGovProposal", MsgEmergencyCancelGovProposal], ["/sparkdream.commons.v1.MsgCreatePolicyPermissions", MsgCreatePolicyPermissions], ["/sparkdream.commons.v1.MsgUpdatePolicyPermissions", MsgUpdatePolicyPermissions], ["/sparkdream.commons.v1.MsgDeletePolicyPermissions", MsgDeletePolicyPermissions], ["/sparkdream.commons.v1.MsgRegisterGroup", MsgRegisterGroup], ["/sparkdream.commons.v1.MsgRenewGroup", MsgRenewGroup], ["/sparkdream.commons.v1.MsgUpdateGroupMembers", MsgUpdateGroupMembers], ["/sparkdream.commons.v1.MsgUpdateGroupConfig", MsgUpdateGroupConfig], ["/sparkdream.commons.v1.MsgForceUpgrade", MsgForceUpgrade], ["/sparkdream.commons.v1.MsgDeleteGroup", MsgDeleteGroup], ["/sparkdream.commons.v1.MsgVetoGroupProposals", MsgVetoGroupProposals], ["/sparkdream.commons.v1.MsgSubmitProposal", MsgSubmitProposal], ["/sparkdream.commons.v1.MsgVoteProposal", MsgVoteProposal], ["/sparkdream.commons.v1.MsgExecuteProposal", MsgExecuteProposal], ["/sparkdream.commons.v1.MsgSubmitAnonymousProposal", MsgSubmitAnonymousProposal], ["/sparkdream.commons.v1.MsgAnonymousVoteProposal", MsgAnonymousVoteProposal], ["/sparkdream.commons.v1.MsgCreateCategory", MsgCreateCategory], ["/sparkdream.commons.v1.MsgDeleteCategory", MsgDeleteCategory]];
|
|
3
3
|
export const load = (protoRegistry) => {
|
|
4
4
|
registry.forEach(([typeUrl, mod]) => {
|
|
5
5
|
protoRegistry.register(typeUrl, mod);
|
|
@@ -120,6 +120,12 @@ export const MessageComposer = {
|
|
|
120
120
|
typeUrl: "/sparkdream.commons.v1.MsgCreateCategory",
|
|
121
121
|
value: MsgCreateCategory.encode(value).finish()
|
|
122
122
|
};
|
|
123
|
+
},
|
|
124
|
+
deleteCategory(value) {
|
|
125
|
+
return {
|
|
126
|
+
typeUrl: "/sparkdream.commons.v1.MsgDeleteCategory",
|
|
127
|
+
value: MsgDeleteCategory.encode(value).finish()
|
|
128
|
+
};
|
|
123
129
|
}
|
|
124
130
|
},
|
|
125
131
|
withTypeUrl: {
|
|
@@ -236,6 +242,12 @@ export const MessageComposer = {
|
|
|
236
242
|
typeUrl: "/sparkdream.commons.v1.MsgCreateCategory",
|
|
237
243
|
value
|
|
238
244
|
};
|
|
245
|
+
},
|
|
246
|
+
deleteCategory(value) {
|
|
247
|
+
return {
|
|
248
|
+
typeUrl: "/sparkdream.commons.v1.MsgDeleteCategory",
|
|
249
|
+
value
|
|
250
|
+
};
|
|
239
251
|
}
|
|
240
252
|
},
|
|
241
253
|
fromPartial: {
|
|
@@ -352,6 +364,12 @@ export const MessageComposer = {
|
|
|
352
364
|
typeUrl: "/sparkdream.commons.v1.MsgCreateCategory",
|
|
353
365
|
value: MsgCreateCategory.fromPartial(value)
|
|
354
366
|
};
|
|
367
|
+
},
|
|
368
|
+
deleteCategory(value) {
|
|
369
|
+
return {
|
|
370
|
+
typeUrl: "/sparkdream.commons.v1.MsgDeleteCategory",
|
|
371
|
+
value: MsgDeleteCategory.fromPartial(value)
|
|
372
|
+
};
|
|
355
373
|
}
|
|
356
374
|
}
|
|
357
375
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BinaryReader } from "../../../binary";
|
|
2
|
-
import { MsgUpdateParams, MsgUpdateParamsResponse, MsgSpendFromCommons, MsgSpendFromCommonsResponse, MsgEmergencyCancelGovProposal, MsgEmergencyCancelGovProposalResponse, MsgCreatePolicyPermissions, MsgCreatePolicyPermissionsResponse, MsgUpdatePolicyPermissions, MsgUpdatePolicyPermissionsResponse, MsgDeletePolicyPermissions, MsgDeletePolicyPermissionsResponse, MsgRegisterGroup, MsgRegisterGroupResponse, MsgRenewGroup, MsgRenewGroupResponse, MsgUpdateGroupMembers, MsgUpdateGroupMembersResponse, MsgUpdateGroupConfig, MsgUpdateGroupConfigResponse, MsgForceUpgrade, MsgForceUpgradeResponse, MsgDeleteGroup, MsgDeleteGroupResponse, MsgVetoGroupProposals, MsgVetoGroupProposalsResponse, MsgSubmitProposal, MsgSubmitProposalResponse, MsgVoteProposal, MsgVoteProposalResponse, MsgExecuteProposal, MsgExecuteProposalResponse, MsgSubmitAnonymousProposal, MsgSubmitAnonymousProposalResponse, MsgAnonymousVoteProposal, MsgAnonymousVoteProposalResponse, MsgCreateCategory, MsgCreateCategoryResponse } from "./tx";
|
|
2
|
+
import { MsgUpdateParams, MsgUpdateParamsResponse, MsgSpendFromCommons, MsgSpendFromCommonsResponse, MsgEmergencyCancelGovProposal, MsgEmergencyCancelGovProposalResponse, MsgCreatePolicyPermissions, MsgCreatePolicyPermissionsResponse, MsgUpdatePolicyPermissions, MsgUpdatePolicyPermissionsResponse, MsgDeletePolicyPermissions, MsgDeletePolicyPermissionsResponse, MsgRegisterGroup, MsgRegisterGroupResponse, MsgRenewGroup, MsgRenewGroupResponse, MsgUpdateGroupMembers, MsgUpdateGroupMembersResponse, MsgUpdateGroupConfig, MsgUpdateGroupConfigResponse, MsgForceUpgrade, MsgForceUpgradeResponse, MsgDeleteGroup, MsgDeleteGroupResponse, MsgVetoGroupProposals, MsgVetoGroupProposalsResponse, MsgSubmitProposal, MsgSubmitProposalResponse, MsgVoteProposal, MsgVoteProposalResponse, MsgExecuteProposal, MsgExecuteProposalResponse, MsgSubmitAnonymousProposal, MsgSubmitAnonymousProposalResponse, MsgAnonymousVoteProposal, MsgAnonymousVoteProposalResponse, MsgCreateCategory, MsgCreateCategoryResponse, MsgDeleteCategory, MsgDeleteCategoryResponse } from "./tx";
|
|
3
3
|
export class MsgClientImpl {
|
|
4
4
|
rpc;
|
|
5
5
|
constructor(rpc) {
|
|
@@ -123,6 +123,12 @@ export class MsgClientImpl {
|
|
|
123
123
|
const promise = this.rpc.request("sparkdream.commons.v1.Msg", "CreateCategory", data);
|
|
124
124
|
return promise.then(data => MsgCreateCategoryResponse.decode(new BinaryReader(data)));
|
|
125
125
|
};
|
|
126
|
+
/* DeleteCategory */
|
|
127
|
+
deleteCategory = async (request) => {
|
|
128
|
+
const data = MsgDeleteCategory.encode(request).finish();
|
|
129
|
+
const promise = this.rpc.request("sparkdream.commons.v1.Msg", "DeleteCategory", data);
|
|
130
|
+
return promise.then(data => MsgDeleteCategoryResponse.decode(new BinaryReader(data)));
|
|
131
|
+
};
|
|
126
132
|
}
|
|
127
133
|
export const createClientImpl = (rpc) => {
|
|
128
134
|
return new MsgClientImpl(rpc);
|
|
@@ -8,11 +8,18 @@ function createBaseHideRecord() {
|
|
|
8
8
|
sentinelBackingSnapshot: "",
|
|
9
9
|
committedAmount: "",
|
|
10
10
|
reasonCode: 0,
|
|
11
|
-
reasonText: ""
|
|
11
|
+
reasonText: "",
|
|
12
|
+
authorBondAmount: ""
|
|
12
13
|
};
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* HideRecord defines the HideRecord message.
|
|
17
|
+
*
|
|
18
|
+
* Created by MsgHidePost for both sentinel hides and gov-authority hides.
|
|
19
|
+
* The `sentinel` field distinguishes the two: a non-empty address means a
|
|
20
|
+
* sentinel performed the hide and the record drives the appeal flow; an
|
|
21
|
+
* empty string is the gov-hide marker and the record exists only to enable
|
|
22
|
+
* council-driven reversal (author-bond restore + HideRecord cleanup).
|
|
16
23
|
* @name HideRecord
|
|
17
24
|
* @package sparkdream.forum.v1
|
|
18
25
|
* @see proto type: sparkdream.forum.v1.HideRecord
|
|
@@ -44,6 +51,9 @@ export const HideRecord = {
|
|
|
44
51
|
if (message.reasonText !== "") {
|
|
45
52
|
writer.uint32(66).string(message.reasonText);
|
|
46
53
|
}
|
|
54
|
+
if (message.authorBondAmount !== "") {
|
|
55
|
+
writer.uint32(74).string(message.authorBondAmount);
|
|
56
|
+
}
|
|
47
57
|
return writer;
|
|
48
58
|
},
|
|
49
59
|
decode(input, length) {
|
|
@@ -77,6 +87,9 @@ export const HideRecord = {
|
|
|
77
87
|
case 8:
|
|
78
88
|
message.reasonText = reader.string();
|
|
79
89
|
break;
|
|
90
|
+
case 9:
|
|
91
|
+
message.authorBondAmount = reader.string();
|
|
92
|
+
break;
|
|
80
93
|
default:
|
|
81
94
|
reader.skipType(tag & 7);
|
|
82
95
|
break;
|
|
@@ -94,6 +107,7 @@ export const HideRecord = {
|
|
|
94
107
|
message.committedAmount = object.committedAmount ?? "";
|
|
95
108
|
message.reasonCode = object.reasonCode ?? 0;
|
|
96
109
|
message.reasonText = object.reasonText ?? "";
|
|
110
|
+
message.authorBondAmount = object.authorBondAmount ?? "";
|
|
97
111
|
return message;
|
|
98
112
|
},
|
|
99
113
|
fromAmino(object) {
|
|
@@ -122,6 +136,9 @@ export const HideRecord = {
|
|
|
122
136
|
if (object.reason_text !== undefined && object.reason_text !== null) {
|
|
123
137
|
message.reasonText = object.reason_text;
|
|
124
138
|
}
|
|
139
|
+
if (object.author_bond_amount !== undefined && object.author_bond_amount !== null) {
|
|
140
|
+
message.authorBondAmount = object.author_bond_amount;
|
|
141
|
+
}
|
|
125
142
|
return message;
|
|
126
143
|
},
|
|
127
144
|
toAmino(message) {
|
|
@@ -134,6 +151,7 @@ export const HideRecord = {
|
|
|
134
151
|
obj.committed_amount = message.committedAmount === "" ? undefined : message.committedAmount;
|
|
135
152
|
obj.reason_code = message.reasonCode === 0 ? undefined : message.reasonCode;
|
|
136
153
|
obj.reason_text = message.reasonText === "" ? undefined : message.reasonText;
|
|
154
|
+
obj.author_bond_amount = message.authorBondAmount === "" ? undefined : message.authorBondAmount;
|
|
137
155
|
return obj;
|
|
138
156
|
},
|
|
139
157
|
fromAminoMsg(object) {
|
|
@@ -41,7 +41,8 @@ function createBaseParams() {
|
|
|
41
41
|
minSentinelTrustLevel: "",
|
|
42
42
|
minSentinelAgeBlocks: BigInt(0),
|
|
43
43
|
sentinelDemotionCooldown: BigInt(0),
|
|
44
|
-
sentinelDemotionThreshold: ""
|
|
44
|
+
sentinelDemotionThreshold: "",
|
|
45
|
+
sentinelUnhideWindow: BigInt(0)
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
48
|
/**
|
|
@@ -168,6 +169,9 @@ export const Params = {
|
|
|
168
169
|
if (message.sentinelDemotionThreshold !== "") {
|
|
169
170
|
writer.uint32(362).string(message.sentinelDemotionThreshold);
|
|
170
171
|
}
|
|
172
|
+
if (message.sentinelUnhideWindow !== BigInt(0)) {
|
|
173
|
+
writer.uint32(368).int64(message.sentinelUnhideWindow);
|
|
174
|
+
}
|
|
171
175
|
return writer;
|
|
172
176
|
},
|
|
173
177
|
decode(input, length) {
|
|
@@ -291,6 +295,9 @@ export const Params = {
|
|
|
291
295
|
case 45:
|
|
292
296
|
message.sentinelDemotionThreshold = reader.string();
|
|
293
297
|
break;
|
|
298
|
+
case 46:
|
|
299
|
+
message.sentinelUnhideWindow = reader.int64();
|
|
300
|
+
break;
|
|
294
301
|
default:
|
|
295
302
|
reader.skipType(tag & 7);
|
|
296
303
|
break;
|
|
@@ -338,6 +345,7 @@ export const Params = {
|
|
|
338
345
|
message.minSentinelAgeBlocks = object.minSentinelAgeBlocks !== undefined && object.minSentinelAgeBlocks !== null ? BigInt(object.minSentinelAgeBlocks.toString()) : BigInt(0);
|
|
339
346
|
message.sentinelDemotionCooldown = object.sentinelDemotionCooldown !== undefined && object.sentinelDemotionCooldown !== null ? BigInt(object.sentinelDemotionCooldown.toString()) : BigInt(0);
|
|
340
347
|
message.sentinelDemotionThreshold = object.sentinelDemotionThreshold ?? "";
|
|
348
|
+
message.sentinelUnhideWindow = object.sentinelUnhideWindow !== undefined && object.sentinelUnhideWindow !== null ? BigInt(object.sentinelUnhideWindow.toString()) : BigInt(0);
|
|
341
349
|
return message;
|
|
342
350
|
},
|
|
343
351
|
fromAmino(object) {
|
|
@@ -456,6 +464,9 @@ export const Params = {
|
|
|
456
464
|
if (object.sentinel_demotion_threshold !== undefined && object.sentinel_demotion_threshold !== null) {
|
|
457
465
|
message.sentinelDemotionThreshold = object.sentinel_demotion_threshold;
|
|
458
466
|
}
|
|
467
|
+
if (object.sentinel_unhide_window !== undefined && object.sentinel_unhide_window !== null) {
|
|
468
|
+
message.sentinelUnhideWindow = BigInt(object.sentinel_unhide_window);
|
|
469
|
+
}
|
|
459
470
|
return message;
|
|
460
471
|
},
|
|
461
472
|
toAmino(message) {
|
|
@@ -498,6 +509,7 @@ export const Params = {
|
|
|
498
509
|
obj.min_sentinel_age_blocks = message.minSentinelAgeBlocks !== BigInt(0) ? message.minSentinelAgeBlocks?.toString() : undefined;
|
|
499
510
|
obj.sentinel_demotion_cooldown = message.sentinelDemotionCooldown !== BigInt(0) ? message.sentinelDemotionCooldown?.toString() : undefined;
|
|
500
511
|
obj.sentinel_demotion_threshold = message.sentinelDemotionThreshold === "" ? undefined : message.sentinelDemotionThreshold;
|
|
512
|
+
obj.sentinel_unhide_window = message.sentinelUnhideWindow !== BigInt(0) ? message.sentinelUnhideWindow?.toString() : undefined;
|
|
501
513
|
return obj;
|
|
502
514
|
},
|
|
503
515
|
fromAminoMsg(object) {
|
|
@@ -558,7 +570,8 @@ function createBaseForumOperationalParams() {
|
|
|
558
570
|
minSentinelTrustLevel: "",
|
|
559
571
|
minSentinelAgeBlocks: BigInt(0),
|
|
560
572
|
sentinelDemotionCooldown: BigInt(0),
|
|
561
|
-
sentinelDemotionThreshold: ""
|
|
573
|
+
sentinelDemotionThreshold: "",
|
|
574
|
+
sentinelUnhideWindow: BigInt(0)
|
|
562
575
|
};
|
|
563
576
|
}
|
|
564
577
|
/**
|
|
@@ -679,6 +692,9 @@ export const ForumOperationalParams = {
|
|
|
679
692
|
if (message.sentinelDemotionThreshold !== "") {
|
|
680
693
|
writer.uint32(362).string(message.sentinelDemotionThreshold);
|
|
681
694
|
}
|
|
695
|
+
if (message.sentinelUnhideWindow !== BigInt(0)) {
|
|
696
|
+
writer.uint32(368).int64(message.sentinelUnhideWindow);
|
|
697
|
+
}
|
|
682
698
|
return writer;
|
|
683
699
|
},
|
|
684
700
|
decode(input, length) {
|
|
@@ -793,6 +809,9 @@ export const ForumOperationalParams = {
|
|
|
793
809
|
case 45:
|
|
794
810
|
message.sentinelDemotionThreshold = reader.string();
|
|
795
811
|
break;
|
|
812
|
+
case 46:
|
|
813
|
+
message.sentinelUnhideWindow = reader.int64();
|
|
814
|
+
break;
|
|
796
815
|
default:
|
|
797
816
|
reader.skipType(tag & 7);
|
|
798
817
|
break;
|
|
@@ -837,6 +856,7 @@ export const ForumOperationalParams = {
|
|
|
837
856
|
message.minSentinelAgeBlocks = object.minSentinelAgeBlocks !== undefined && object.minSentinelAgeBlocks !== null ? BigInt(object.minSentinelAgeBlocks.toString()) : BigInt(0);
|
|
838
857
|
message.sentinelDemotionCooldown = object.sentinelDemotionCooldown !== undefined && object.sentinelDemotionCooldown !== null ? BigInt(object.sentinelDemotionCooldown.toString()) : BigInt(0);
|
|
839
858
|
message.sentinelDemotionThreshold = object.sentinelDemotionThreshold ?? "";
|
|
859
|
+
message.sentinelUnhideWindow = object.sentinelUnhideWindow !== undefined && object.sentinelUnhideWindow !== null ? BigInt(object.sentinelUnhideWindow.toString()) : BigInt(0);
|
|
840
860
|
return message;
|
|
841
861
|
},
|
|
842
862
|
fromAmino(object) {
|
|
@@ -946,6 +966,9 @@ export const ForumOperationalParams = {
|
|
|
946
966
|
if (object.sentinel_demotion_threshold !== undefined && object.sentinel_demotion_threshold !== null) {
|
|
947
967
|
message.sentinelDemotionThreshold = object.sentinel_demotion_threshold;
|
|
948
968
|
}
|
|
969
|
+
if (object.sentinel_unhide_window !== undefined && object.sentinel_unhide_window !== null) {
|
|
970
|
+
message.sentinelUnhideWindow = BigInt(object.sentinel_unhide_window);
|
|
971
|
+
}
|
|
949
972
|
return message;
|
|
950
973
|
},
|
|
951
974
|
toAmino(message) {
|
|
@@ -985,6 +1008,7 @@ export const ForumOperationalParams = {
|
|
|
985
1008
|
obj.min_sentinel_age_blocks = message.minSentinelAgeBlocks !== BigInt(0) ? message.minSentinelAgeBlocks?.toString() : undefined;
|
|
986
1009
|
obj.sentinel_demotion_cooldown = message.sentinelDemotionCooldown !== BigInt(0) ? message.sentinelDemotionCooldown?.toString() : undefined;
|
|
987
1010
|
obj.sentinel_demotion_threshold = message.sentinelDemotionThreshold === "" ? undefined : message.sentinelDemotionThreshold;
|
|
1011
|
+
obj.sentinel_unhide_window = message.sentinelUnhideWindow !== BigInt(0) ? message.sentinelUnhideWindow?.toString() : undefined;
|
|
988
1012
|
return obj;
|
|
989
1013
|
},
|
|
990
1014
|
fromAminoMsg(object) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//@ts-nocheck
|
|
2
|
-
import { MsgUpdateParams, MsgUpdateOperationalParams, MsgCreatePost, MsgEditPost, MsgDeletePost, MsgFreezeThread, MsgUnarchiveThread, MsgPinPost, MsgUnpinPost, MsgLockThread, MsgUnlockThread, MsgMoveThread, MsgFollowThread, MsgUnfollowThread, MsgUpvotePost, MsgDownvotePost, MsgFlagPost, MsgDismissFlags, MsgHidePost, MsgAppealPost, MsgAppealThreadLock, MsgAppealThreadMove, MsgCreateBounty, MsgAwardBounty, MsgIncreaseBounty, MsgCancelBounty, MsgAssignBountyToReply, MsgPinReply, MsgUnpinReply, MsgDisputePin, MsgMarkAcceptedReply, MsgConfirmProposedReply, MsgRejectProposedReply, MsgSetForumPaused, MsgSetModerationPaused } from "./tx";
|
|
2
|
+
import { MsgUpdateParams, MsgUpdateOperationalParams, MsgCreatePost, MsgEditPost, MsgDeletePost, MsgFreezeThread, MsgUnarchiveThread, MsgPinPost, MsgUnpinPost, MsgLockThread, MsgUnlockThread, MsgMoveThread, MsgFollowThread, MsgUnfollowThread, MsgUpvotePost, MsgDownvotePost, MsgFlagPost, MsgDismissFlags, MsgHidePost, MsgUnhidePost, MsgAppealPost, MsgAppealThreadLock, MsgAppealThreadMove, MsgCreateBounty, MsgAwardBounty, MsgIncreaseBounty, MsgCancelBounty, MsgAssignBountyToReply, MsgPinReply, MsgUnpinReply, MsgDisputePin, MsgMarkAcceptedReply, MsgConfirmProposedReply, MsgRejectProposedReply, MsgSetForumPaused, MsgSetModerationPaused } from "./tx";
|
|
3
3
|
export const AminoConverter = {
|
|
4
4
|
"/sparkdream.forum.v1.MsgUpdateParams": {
|
|
5
5
|
aminoType: "sparkdream/x/forum/MsgUpdateParams",
|
|
@@ -96,6 +96,11 @@ export const AminoConverter = {
|
|
|
96
96
|
toAmino: MsgHidePost.toAmino,
|
|
97
97
|
fromAmino: MsgHidePost.fromAmino
|
|
98
98
|
},
|
|
99
|
+
"/sparkdream.forum.v1.MsgUnhidePost": {
|
|
100
|
+
aminoType: "sparkdream/x/forum/MsgUnhidePost",
|
|
101
|
+
toAmino: MsgUnhidePost.toAmino,
|
|
102
|
+
fromAmino: MsgUnhidePost.fromAmino
|
|
103
|
+
},
|
|
99
104
|
"/sparkdream.forum.v1.MsgAppealPost": {
|
|
100
105
|
aminoType: "sparkdream/x/forum/MsgAppealPost",
|
|
101
106
|
toAmino: MsgAppealPost.toAmino,
|