@sparkdreamnft/sparkdreamjs 0.0.9 → 0.0.11
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 +25 -1
- package/esm/sparkdream/blog/v1/post.js +16 -1
- package/esm/sparkdream/blog/v1/query.js +165 -0
- package/esm/sparkdream/blog/v1/query.lcd.js +11 -0
- package/esm/sparkdream/blog/v1/query.rpc.Query.js +10 -1
- package/esm/sparkdream/blog/v1/tx.js +32 -2
- package/esm/sparkdream/bundle.js +343 -339
- package/esm/sparkdream/collect/v1/curator_activity.js +158 -0
- package/esm/sparkdream/collect/v1/genesis.js +12 -11
- package/esm/sparkdream/collect/v1/params.js +37 -1
- package/esm/sparkdream/collect/v1/query.js +201 -186
- package/esm/sparkdream/collect/v1/query.lcd.js +16 -16
- package/esm/sparkdream/collect/v1/query.rpc.Query.js +19 -19
- package/esm/sparkdream/collect/v1/tx.amino.js +1 -11
- package/esm/sparkdream/collect/v1/tx.js +0 -258
- package/esm/sparkdream/collect/v1/tx.registry.js +2 -38
- package/esm/sparkdream/collect/v1/tx.rpc.msg.js +3 -14
- package/esm/sparkdream/collect/v1/types.js +50 -143
- package/esm/sparkdream/federation/v1/genesis.js +12 -11
- package/esm/sparkdream/federation/v1/query.js +37 -187
- package/esm/sparkdream/federation/v1/query.lcd.js +6 -16
- package/esm/sparkdream/federation/v1/query.rpc.Query.js +11 -19
- package/esm/sparkdream/federation/v1/tx.amino.js +1 -11
- package/esm/sparkdream/federation/v1/tx.js +0 -270
- package/esm/sparkdream/federation/v1/tx.registry.js +2 -38
- package/esm/sparkdream/federation/v1/tx.rpc.msg.js +4 -14
- package/esm/sparkdream/federation/v1/types.js +13 -318
- package/esm/sparkdream/federation/v1/verifier_activity.js +194 -0
- package/esm/sparkdream/forum/v1/params.js +146 -2
- package/esm/sparkdream/futarchy/v1/market.js +13 -1
- package/esm/sparkdream/name/v1/owner_info.js +13 -1
- package/esm/sparkdream/name/v1/query.js +141 -0
- package/esm/sparkdream/name/v1/query.lcd.js +7 -0
- package/esm/sparkdream/name/v1/query.rpc.Query.js +12 -1
- package/esm/sparkdream/name/v1/tx.amino.js +6 -1
- package/esm/sparkdream/name/v1/tx.js +147 -0
- package/esm/sparkdream/name/v1/tx.registry.js +20 -2
- package/esm/sparkdream/name/v1/tx.rpc.msg.js +8 -1
- package/esm/sparkdream/rep/v1/bonded_role.js +446 -0
- package/esm/sparkdream/rep/v1/genesis.js +32 -17
- package/esm/sparkdream/rep/v1/member_report.js +98 -1
- package/esm/sparkdream/rep/v1/query.js +297 -306
- package/esm/sparkdream/rep/v1/query.lcd.js +23 -16
- package/esm/sparkdream/rep/v1/query.rpc.Query.js +36 -35
- package/esm/sparkdream/rep/v1/tx.amino.js +9 -9
- package/esm/sparkdream/rep/v1/tx.js +86 -58
- package/esm/sparkdream/rep/v1/tx.registry.js +18 -18
- package/esm/sparkdream/rep/v1/tx.rpc.msg.js +16 -14
- package/esm/sparkdream/season/v1/enums.js +10 -0
- package/esm/tendermint/bundle.js +18 -18
- 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 +16 -0
- package/sparkdream/blog/v1/params.js +25 -1
- package/sparkdream/blog/v1/post.d.ts +8 -0
- package/sparkdream/blog/v1/post.js +16 -1
- package/sparkdream/blog/v1/query.d.ts +92 -0
- package/sparkdream/blog/v1/query.js +166 -1
- package/sparkdream/blog/v1/query.lcd.d.ts +2 -1
- package/sparkdream/blog/v1/query.lcd.js +11 -0
- package/sparkdream/blog/v1/query.rpc.Query.d.ts +5 -1
- package/sparkdream/blog/v1/query.rpc.Query.js +9 -0
- package/sparkdream/blog/v1/tx.d.ts +16 -0
- package/sparkdream/blog/v1/tx.js +32 -2
- package/sparkdream/bundle.d.ts +14445 -14514
- package/sparkdream/bundle.js +343 -339
- package/sparkdream/client.d.ts +11 -26
- package/sparkdream/collect/v1/curator_activity.d.ts +123 -0
- package/sparkdream/collect/v1/curator_activity.js +161 -0
- package/sparkdream/collect/v1/genesis.d.ts +4 -3
- package/sparkdream/collect/v1/genesis.js +11 -10
- package/sparkdream/collect/v1/params.d.ts +32 -0
- package/sparkdream/collect/v1/params.js +37 -1
- package/sparkdream/collect/v1/query.d.ts +142 -133
- package/sparkdream/collect/v1/query.js +201 -186
- package/sparkdream/collect/v1/query.lcd.d.ts +3 -3
- package/sparkdream/collect/v1/query.lcd.js +16 -16
- package/sparkdream/collect/v1/query.rpc.Query.d.ts +13 -7
- package/sparkdream/collect/v1/query.rpc.Query.js +18 -18
- package/sparkdream/collect/v1/tx.amino.d.ts +1 -11
- package/sparkdream/collect/v1/tx.amino.js +0 -10
- package/sparkdream/collect/v1/tx.d.ts +0 -162
- package/sparkdream/collect/v1/tx.js +2 -260
- package/sparkdream/collect/v1/tx.registry.d.ts +1 -25
- package/sparkdream/collect/v1/tx.registry.js +1 -37
- package/sparkdream/collect/v1/tx.rpc.msg.d.ts +5 -5
- package/sparkdream/collect/v1/tx.rpc.msg.js +2 -13
- package/sparkdream/collect/v1/types.d.ts +26 -56
- package/sparkdream/collect/v1/types.js +51 -144
- package/sparkdream/federation/v1/genesis.d.ts +4 -3
- package/sparkdream/federation/v1/genesis.js +11 -10
- package/sparkdream/federation/v1/query.d.ts +53 -136
- package/sparkdream/federation/v1/query.js +37 -187
- package/sparkdream/federation/v1/query.lcd.d.ts +2 -3
- package/sparkdream/federation/v1/query.lcd.js +6 -16
- package/sparkdream/federation/v1/query.rpc.Query.d.ts +10 -7
- package/sparkdream/federation/v1/query.rpc.Query.js +10 -18
- package/sparkdream/federation/v1/tx.amino.d.ts +1 -11
- package/sparkdream/federation/v1/tx.amino.js +0 -10
- package/sparkdream/federation/v1/tx.d.ts +0 -164
- package/sparkdream/federation/v1/tx.js +1 -272
- package/sparkdream/federation/v1/tx.registry.d.ts +1 -25
- package/sparkdream/federation/v1/tx.registry.js +1 -37
- package/sparkdream/federation/v1/tx.rpc.msg.d.ts +6 -5
- package/sparkdream/federation/v1/tx.rpc.msg.js +3 -13
- package/sparkdream/federation/v1/types.d.ts +10 -106
- package/sparkdream/federation/v1/types.js +14 -321
- package/sparkdream/federation/v1/verifier_activity.d.ts +113 -0
- package/sparkdream/federation/v1/verifier_activity.js +197 -0
- package/sparkdream/forum/v1/params.d.ts +112 -0
- package/sparkdream/forum/v1/params.js +146 -2
- package/sparkdream/futarchy/v1/market.d.ts +14 -0
- package/sparkdream/futarchy/v1/market.js +13 -1
- package/sparkdream/name/v1/owner_info.d.ts +12 -0
- package/sparkdream/name/v1/owner_info.js +13 -1
- package/sparkdream/name/v1/query.d.ts +95 -0
- package/sparkdream/name/v1/query.js +142 -1
- package/sparkdream/name/v1/query.lcd.d.ts +2 -1
- package/sparkdream/name/v1/query.lcd.js +7 -0
- package/sparkdream/name/v1/query.rpc.Query.d.ts +9 -1
- package/sparkdream/name/v1/query.rpc.Query.js +11 -0
- package/sparkdream/name/v1/tx.amino.d.ts +6 -1
- package/sparkdream/name/v1/tx.amino.js +5 -0
- package/sparkdream/name/v1/tx.d.ts +105 -0
- package/sparkdream/name/v1/tx.js +148 -1
- package/sparkdream/name/v1/tx.registry.d.ts +13 -1
- package/sparkdream/name/v1/tx.registry.js +19 -1
- package/sparkdream/name/v1/tx.rpc.msg.d.ts +7 -1
- package/sparkdream/name/v1/tx.rpc.msg.js +7 -0
- package/sparkdream/rep/v1/bonded_role.d.ts +330 -0
- package/sparkdream/rep/v1/bonded_role.js +453 -0
- package/sparkdream/rep/v1/genesis.d.ts +11 -9
- package/sparkdream/rep/v1/genesis.js +32 -17
- package/sparkdream/rep/v1/member_report.d.ts +61 -0
- package/sparkdream/rep/v1/member_report.js +99 -2
- package/sparkdream/rep/v1/query.d.ts +259 -261
- package/sparkdream/rep/v1/query.js +299 -308
- package/sparkdream/rep/v1/query.lcd.d.ts +5 -5
- package/sparkdream/rep/v1/query.lcd.js +23 -16
- package/sparkdream/rep/v1/query.rpc.Query.d.ts +20 -17
- package/sparkdream/rep/v1/query.rpc.Query.js +35 -34
- package/sparkdream/rep/v1/tx.amino.d.ts +7 -7
- package/sparkdream/rep/v1/tx.amino.js +9 -9
- package/sparkdream/rep/v1/tx.d.ts +121 -104
- package/sparkdream/rep/v1/tx.js +87 -59
- package/sparkdream/rep/v1/tx.registry.d.ts +11 -11
- package/sparkdream/rep/v1/tx.registry.js +17 -17
- package/sparkdream/rep/v1/tx.rpc.msg.d.ts +11 -9
- package/sparkdream/rep/v1/tx.rpc.msg.js +15 -13
- package/sparkdream/rpc.query.d.ts +9 -8
- package/sparkdream/season/v1/enums.d.ts +5 -0
- package/sparkdream/season/v1/enums.js +10 -0
- package/tendermint/bundle.d.ts +844 -844
- package/tendermint/bundle.js +18 -18
- package/esm/sparkdream/rep/v1/sentinel_activity.js +0 -214
- package/sparkdream/rep/v1/sentinel_activity.d.ts +0 -79
- package/sparkdream/rep/v1/sentinel_activity.js +0 -219
|
@@ -1220,3 +1220,150 @@ export const MsgUpdateNameResponse = {
|
|
|
1220
1220
|
};
|
|
1221
1221
|
}
|
|
1222
1222
|
};
|
|
1223
|
+
function createBaseMsgSetDisplayName() {
|
|
1224
|
+
return {
|
|
1225
|
+
authority: "",
|
|
1226
|
+
displayName: ""
|
|
1227
|
+
};
|
|
1228
|
+
}
|
|
1229
|
+
/**
|
|
1230
|
+
* MsgSetDisplayName sets (or clears) the free-form display name on the
|
|
1231
|
+
* signer's OwnerInfo. Empty display_name clears the field. Aesthetic
|
|
1232
|
+
* policing (impersonation similarity, profanity) is a frontend concern;
|
|
1233
|
+
* chain-level validation is bytes-only.
|
|
1234
|
+
* @name MsgSetDisplayName
|
|
1235
|
+
* @package sparkdream.name.v1
|
|
1236
|
+
* @see proto type: sparkdream.name.v1.MsgSetDisplayName
|
|
1237
|
+
*/
|
|
1238
|
+
export const MsgSetDisplayName = {
|
|
1239
|
+
typeUrl: "/sparkdream.name.v1.MsgSetDisplayName",
|
|
1240
|
+
aminoType: "sparkdream/x/name/MsgSetDisplayName",
|
|
1241
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
1242
|
+
if (message.authority !== "") {
|
|
1243
|
+
writer.uint32(10).string(message.authority);
|
|
1244
|
+
}
|
|
1245
|
+
if (message.displayName !== "") {
|
|
1246
|
+
writer.uint32(18).string(message.displayName);
|
|
1247
|
+
}
|
|
1248
|
+
return writer;
|
|
1249
|
+
},
|
|
1250
|
+
decode(input, length) {
|
|
1251
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1252
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1253
|
+
const message = createBaseMsgSetDisplayName();
|
|
1254
|
+
while (reader.pos < end) {
|
|
1255
|
+
const tag = reader.uint32();
|
|
1256
|
+
switch (tag >>> 3) {
|
|
1257
|
+
case 1:
|
|
1258
|
+
message.authority = reader.string();
|
|
1259
|
+
break;
|
|
1260
|
+
case 2:
|
|
1261
|
+
message.displayName = reader.string();
|
|
1262
|
+
break;
|
|
1263
|
+
default:
|
|
1264
|
+
reader.skipType(tag & 7);
|
|
1265
|
+
break;
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
return message;
|
|
1269
|
+
},
|
|
1270
|
+
fromPartial(object) {
|
|
1271
|
+
const message = createBaseMsgSetDisplayName();
|
|
1272
|
+
message.authority = object.authority ?? "";
|
|
1273
|
+
message.displayName = object.displayName ?? "";
|
|
1274
|
+
return message;
|
|
1275
|
+
},
|
|
1276
|
+
fromAmino(object) {
|
|
1277
|
+
const message = createBaseMsgSetDisplayName();
|
|
1278
|
+
if (object.authority !== undefined && object.authority !== null) {
|
|
1279
|
+
message.authority = object.authority;
|
|
1280
|
+
}
|
|
1281
|
+
if (object.display_name !== undefined && object.display_name !== null) {
|
|
1282
|
+
message.displayName = object.display_name;
|
|
1283
|
+
}
|
|
1284
|
+
return message;
|
|
1285
|
+
},
|
|
1286
|
+
toAmino(message) {
|
|
1287
|
+
const obj = {};
|
|
1288
|
+
obj.authority = message.authority === "" ? undefined : message.authority;
|
|
1289
|
+
obj.display_name = message.displayName === "" ? undefined : message.displayName;
|
|
1290
|
+
return obj;
|
|
1291
|
+
},
|
|
1292
|
+
fromAminoMsg(object) {
|
|
1293
|
+
return MsgSetDisplayName.fromAmino(object.value);
|
|
1294
|
+
},
|
|
1295
|
+
toAminoMsg(message) {
|
|
1296
|
+
return {
|
|
1297
|
+
type: "sparkdream/x/name/MsgSetDisplayName",
|
|
1298
|
+
value: MsgSetDisplayName.toAmino(message)
|
|
1299
|
+
};
|
|
1300
|
+
},
|
|
1301
|
+
fromProtoMsg(message) {
|
|
1302
|
+
return MsgSetDisplayName.decode(message.value);
|
|
1303
|
+
},
|
|
1304
|
+
toProto(message) {
|
|
1305
|
+
return MsgSetDisplayName.encode(message).finish();
|
|
1306
|
+
},
|
|
1307
|
+
toProtoMsg(message) {
|
|
1308
|
+
return {
|
|
1309
|
+
typeUrl: "/sparkdream.name.v1.MsgSetDisplayName",
|
|
1310
|
+
value: MsgSetDisplayName.encode(message).finish()
|
|
1311
|
+
};
|
|
1312
|
+
}
|
|
1313
|
+
};
|
|
1314
|
+
function createBaseMsgSetDisplayNameResponse() {
|
|
1315
|
+
return {};
|
|
1316
|
+
}
|
|
1317
|
+
/**
|
|
1318
|
+
* MsgSetDisplayNameResponse defines the response for MsgSetDisplayName.
|
|
1319
|
+
* @name MsgSetDisplayNameResponse
|
|
1320
|
+
* @package sparkdream.name.v1
|
|
1321
|
+
* @see proto type: sparkdream.name.v1.MsgSetDisplayNameResponse
|
|
1322
|
+
*/
|
|
1323
|
+
export const MsgSetDisplayNameResponse = {
|
|
1324
|
+
typeUrl: "/sparkdream.name.v1.MsgSetDisplayNameResponse",
|
|
1325
|
+
encode(_, writer = BinaryWriter.create()) {
|
|
1326
|
+
return writer;
|
|
1327
|
+
},
|
|
1328
|
+
decode(input, length) {
|
|
1329
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1330
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1331
|
+
const message = createBaseMsgSetDisplayNameResponse();
|
|
1332
|
+
while (reader.pos < end) {
|
|
1333
|
+
const tag = reader.uint32();
|
|
1334
|
+
switch (tag >>> 3) {
|
|
1335
|
+
default:
|
|
1336
|
+
reader.skipType(tag & 7);
|
|
1337
|
+
break;
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
return message;
|
|
1341
|
+
},
|
|
1342
|
+
fromPartial(_) {
|
|
1343
|
+
const message = createBaseMsgSetDisplayNameResponse();
|
|
1344
|
+
return message;
|
|
1345
|
+
},
|
|
1346
|
+
fromAmino(_) {
|
|
1347
|
+
const message = createBaseMsgSetDisplayNameResponse();
|
|
1348
|
+
return message;
|
|
1349
|
+
},
|
|
1350
|
+
toAmino(_) {
|
|
1351
|
+
const obj = {};
|
|
1352
|
+
return obj;
|
|
1353
|
+
},
|
|
1354
|
+
fromAminoMsg(object) {
|
|
1355
|
+
return MsgSetDisplayNameResponse.fromAmino(object.value);
|
|
1356
|
+
},
|
|
1357
|
+
fromProtoMsg(message) {
|
|
1358
|
+
return MsgSetDisplayNameResponse.decode(message.value);
|
|
1359
|
+
},
|
|
1360
|
+
toProto(message) {
|
|
1361
|
+
return MsgSetDisplayNameResponse.encode(message).finish();
|
|
1362
|
+
},
|
|
1363
|
+
toProtoMsg(message) {
|
|
1364
|
+
return {
|
|
1365
|
+
typeUrl: "/sparkdream.name.v1.MsgSetDisplayNameResponse",
|
|
1366
|
+
value: MsgSetDisplayNameResponse.encode(message).finish()
|
|
1367
|
+
};
|
|
1368
|
+
}
|
|
1369
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MsgUpdateParams, MsgUpdateOperationalParams, MsgRegisterName, MsgSetPrimary, MsgFileDispute, MsgContestDispute, MsgResolveDispute, MsgUpdateName } from "./tx";
|
|
2
|
-
export const registry = [["/sparkdream.name.v1.MsgUpdateParams", MsgUpdateParams], ["/sparkdream.name.v1.MsgUpdateOperationalParams", MsgUpdateOperationalParams], ["/sparkdream.name.v1.MsgRegisterName", MsgRegisterName], ["/sparkdream.name.v1.MsgSetPrimary", MsgSetPrimary], ["/sparkdream.name.v1.MsgFileDispute", MsgFileDispute], ["/sparkdream.name.v1.MsgContestDispute", MsgContestDispute], ["/sparkdream.name.v1.MsgResolveDispute", MsgResolveDispute], ["/sparkdream.name.v1.MsgUpdateName", MsgUpdateName]];
|
|
1
|
+
import { MsgUpdateParams, MsgUpdateOperationalParams, MsgRegisterName, MsgSetPrimary, MsgFileDispute, MsgContestDispute, MsgResolveDispute, MsgUpdateName, MsgSetDisplayName } from "./tx";
|
|
2
|
+
export const registry = [["/sparkdream.name.v1.MsgUpdateParams", MsgUpdateParams], ["/sparkdream.name.v1.MsgUpdateOperationalParams", MsgUpdateOperationalParams], ["/sparkdream.name.v1.MsgRegisterName", MsgRegisterName], ["/sparkdream.name.v1.MsgSetPrimary", MsgSetPrimary], ["/sparkdream.name.v1.MsgFileDispute", MsgFileDispute], ["/sparkdream.name.v1.MsgContestDispute", MsgContestDispute], ["/sparkdream.name.v1.MsgResolveDispute", MsgResolveDispute], ["/sparkdream.name.v1.MsgUpdateName", MsgUpdateName], ["/sparkdream.name.v1.MsgSetDisplayName", MsgSetDisplayName]];
|
|
3
3
|
export const load = (protoRegistry) => {
|
|
4
4
|
registry.forEach(([typeUrl, mod]) => {
|
|
5
5
|
protoRegistry.register(typeUrl, mod);
|
|
@@ -54,6 +54,12 @@ export const MessageComposer = {
|
|
|
54
54
|
typeUrl: "/sparkdream.name.v1.MsgUpdateName",
|
|
55
55
|
value: MsgUpdateName.encode(value).finish()
|
|
56
56
|
};
|
|
57
|
+
},
|
|
58
|
+
setDisplayName(value) {
|
|
59
|
+
return {
|
|
60
|
+
typeUrl: "/sparkdream.name.v1.MsgSetDisplayName",
|
|
61
|
+
value: MsgSetDisplayName.encode(value).finish()
|
|
62
|
+
};
|
|
57
63
|
}
|
|
58
64
|
},
|
|
59
65
|
withTypeUrl: {
|
|
@@ -104,6 +110,12 @@ export const MessageComposer = {
|
|
|
104
110
|
typeUrl: "/sparkdream.name.v1.MsgUpdateName",
|
|
105
111
|
value
|
|
106
112
|
};
|
|
113
|
+
},
|
|
114
|
+
setDisplayName(value) {
|
|
115
|
+
return {
|
|
116
|
+
typeUrl: "/sparkdream.name.v1.MsgSetDisplayName",
|
|
117
|
+
value
|
|
118
|
+
};
|
|
107
119
|
}
|
|
108
120
|
},
|
|
109
121
|
fromPartial: {
|
|
@@ -154,6 +166,12 @@ export const MessageComposer = {
|
|
|
154
166
|
typeUrl: "/sparkdream.name.v1.MsgUpdateName",
|
|
155
167
|
value: MsgUpdateName.fromPartial(value)
|
|
156
168
|
};
|
|
169
|
+
},
|
|
170
|
+
setDisplayName(value) {
|
|
171
|
+
return {
|
|
172
|
+
typeUrl: "/sparkdream.name.v1.MsgSetDisplayName",
|
|
173
|
+
value: MsgSetDisplayName.fromPartial(value)
|
|
174
|
+
};
|
|
157
175
|
}
|
|
158
176
|
}
|
|
159
177
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BinaryReader } from "../../../binary";
|
|
2
|
-
import { MsgUpdateParams, MsgUpdateParamsResponse, MsgUpdateOperationalParams, MsgUpdateOperationalParamsResponse, MsgRegisterName, MsgRegisterNameResponse, MsgSetPrimary, MsgSetPrimaryResponse, MsgFileDispute, MsgFileDisputeResponse, MsgContestDispute, MsgContestDisputeResponse, MsgResolveDispute, MsgResolveDisputeResponse, MsgUpdateName, MsgUpdateNameResponse } from "./tx";
|
|
2
|
+
import { MsgUpdateParams, MsgUpdateParamsResponse, MsgUpdateOperationalParams, MsgUpdateOperationalParamsResponse, MsgRegisterName, MsgRegisterNameResponse, MsgSetPrimary, MsgSetPrimaryResponse, MsgFileDispute, MsgFileDisputeResponse, MsgContestDispute, MsgContestDisputeResponse, MsgResolveDispute, MsgResolveDisputeResponse, MsgUpdateName, MsgUpdateNameResponse, MsgSetDisplayName, MsgSetDisplayNameResponse } from "./tx";
|
|
3
3
|
export class MsgClientImpl {
|
|
4
4
|
rpc;
|
|
5
5
|
constructor(rpc) {
|
|
@@ -56,6 +56,13 @@ export class MsgClientImpl {
|
|
|
56
56
|
const promise = this.rpc.request("sparkdream.name.v1.Msg", "UpdateName", data);
|
|
57
57
|
return promise.then(data => MsgUpdateNameResponse.decode(new BinaryReader(data)));
|
|
58
58
|
};
|
|
59
|
+
/* SetDisplayName sets (or clears) the free-form display name on the
|
|
60
|
+
signer's OwnerInfo. Empty display_name clears the field. */
|
|
61
|
+
setDisplayName = async (request) => {
|
|
62
|
+
const data = MsgSetDisplayName.encode(request).finish();
|
|
63
|
+
const promise = this.rpc.request("sparkdream.name.v1.Msg", "SetDisplayName", data);
|
|
64
|
+
return promise.then(data => MsgSetDisplayNameResponse.decode(new BinaryReader(data)));
|
|
65
|
+
};
|
|
59
66
|
}
|
|
60
67
|
export const createClientImpl = (rpc) => {
|
|
61
68
|
return new MsgClientImpl(rpc);
|
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
3
|
+
/**
|
|
4
|
+
* RoleType identifies a kind of bonded role across the chain. Values are
|
|
5
|
+
* module-scoped: naming convention is ROLE_TYPE_<OWNING_MODULE>_<ROLE>. A role
|
|
6
|
+
* is owned by exactly one module, which is the sole writer of its
|
|
7
|
+
* BondedRoleConfig. Independent bond pools, configs, and slashing surfaces per
|
|
8
|
+
* role; cross-role coupling (if ever needed) belongs in the gaining module, not
|
|
9
|
+
* in this primitive.
|
|
10
|
+
*/
|
|
11
|
+
export var RoleType;
|
|
12
|
+
(function (RoleType) {
|
|
13
|
+
RoleType[RoleType["ROLE_TYPE_UNSPECIFIED"] = 0] = "ROLE_TYPE_UNSPECIFIED";
|
|
14
|
+
RoleType[RoleType["ROLE_TYPE_FORUM_SENTINEL"] = 1] = "ROLE_TYPE_FORUM_SENTINEL";
|
|
15
|
+
RoleType[RoleType["ROLE_TYPE_COLLECT_CURATOR"] = 2] = "ROLE_TYPE_COLLECT_CURATOR";
|
|
16
|
+
RoleType[RoleType["ROLE_TYPE_FEDERATION_VERIFIER"] = 3] = "ROLE_TYPE_FEDERATION_VERIFIER";
|
|
17
|
+
RoleType[RoleType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
18
|
+
})(RoleType || (RoleType = {}));
|
|
19
|
+
export const RoleTypeAmino = RoleType;
|
|
20
|
+
export function roleTypeFromJSON(object) {
|
|
21
|
+
switch (object) {
|
|
22
|
+
case 0:
|
|
23
|
+
case "ROLE_TYPE_UNSPECIFIED":
|
|
24
|
+
return RoleType.ROLE_TYPE_UNSPECIFIED;
|
|
25
|
+
case 1:
|
|
26
|
+
case "ROLE_TYPE_FORUM_SENTINEL":
|
|
27
|
+
return RoleType.ROLE_TYPE_FORUM_SENTINEL;
|
|
28
|
+
case 2:
|
|
29
|
+
case "ROLE_TYPE_COLLECT_CURATOR":
|
|
30
|
+
return RoleType.ROLE_TYPE_COLLECT_CURATOR;
|
|
31
|
+
case 3:
|
|
32
|
+
case "ROLE_TYPE_FEDERATION_VERIFIER":
|
|
33
|
+
return RoleType.ROLE_TYPE_FEDERATION_VERIFIER;
|
|
34
|
+
case -1:
|
|
35
|
+
case "UNRECOGNIZED":
|
|
36
|
+
default:
|
|
37
|
+
return RoleType.UNRECOGNIZED;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export function roleTypeToJSON(object) {
|
|
41
|
+
switch (object) {
|
|
42
|
+
case RoleType.ROLE_TYPE_UNSPECIFIED:
|
|
43
|
+
return "ROLE_TYPE_UNSPECIFIED";
|
|
44
|
+
case RoleType.ROLE_TYPE_FORUM_SENTINEL:
|
|
45
|
+
return "ROLE_TYPE_FORUM_SENTINEL";
|
|
46
|
+
case RoleType.ROLE_TYPE_COLLECT_CURATOR:
|
|
47
|
+
return "ROLE_TYPE_COLLECT_CURATOR";
|
|
48
|
+
case RoleType.ROLE_TYPE_FEDERATION_VERIFIER:
|
|
49
|
+
return "ROLE_TYPE_FEDERATION_VERIFIER";
|
|
50
|
+
case RoleType.UNRECOGNIZED:
|
|
51
|
+
default:
|
|
52
|
+
return "UNRECOGNIZED";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* BondedRoleStatus represents the lifecycle status of a bonded role record.
|
|
57
|
+
* NORMAL: full privileges; bond at or above min_bond.
|
|
58
|
+
* RECOVERY: bond dropped below min_bond but at or above demotion_threshold;
|
|
59
|
+
* reduced privileges depending on role, rewards may auto-bond.
|
|
60
|
+
* DEMOTED: bond below demotion_threshold; privileges revoked; cooldown
|
|
61
|
+
* enforced before re-bonding.
|
|
62
|
+
*/
|
|
63
|
+
export var BondedRoleStatus;
|
|
64
|
+
(function (BondedRoleStatus) {
|
|
65
|
+
BondedRoleStatus[BondedRoleStatus["BONDED_ROLE_STATUS_UNSPECIFIED"] = 0] = "BONDED_ROLE_STATUS_UNSPECIFIED";
|
|
66
|
+
BondedRoleStatus[BondedRoleStatus["BONDED_ROLE_STATUS_NORMAL"] = 1] = "BONDED_ROLE_STATUS_NORMAL";
|
|
67
|
+
BondedRoleStatus[BondedRoleStatus["BONDED_ROLE_STATUS_RECOVERY"] = 2] = "BONDED_ROLE_STATUS_RECOVERY";
|
|
68
|
+
BondedRoleStatus[BondedRoleStatus["BONDED_ROLE_STATUS_DEMOTED"] = 3] = "BONDED_ROLE_STATUS_DEMOTED";
|
|
69
|
+
BondedRoleStatus[BondedRoleStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
70
|
+
})(BondedRoleStatus || (BondedRoleStatus = {}));
|
|
71
|
+
export const BondedRoleStatusAmino = BondedRoleStatus;
|
|
72
|
+
export function bondedRoleStatusFromJSON(object) {
|
|
73
|
+
switch (object) {
|
|
74
|
+
case 0:
|
|
75
|
+
case "BONDED_ROLE_STATUS_UNSPECIFIED":
|
|
76
|
+
return BondedRoleStatus.BONDED_ROLE_STATUS_UNSPECIFIED;
|
|
77
|
+
case 1:
|
|
78
|
+
case "BONDED_ROLE_STATUS_NORMAL":
|
|
79
|
+
return BondedRoleStatus.BONDED_ROLE_STATUS_NORMAL;
|
|
80
|
+
case 2:
|
|
81
|
+
case "BONDED_ROLE_STATUS_RECOVERY":
|
|
82
|
+
return BondedRoleStatus.BONDED_ROLE_STATUS_RECOVERY;
|
|
83
|
+
case 3:
|
|
84
|
+
case "BONDED_ROLE_STATUS_DEMOTED":
|
|
85
|
+
return BondedRoleStatus.BONDED_ROLE_STATUS_DEMOTED;
|
|
86
|
+
case -1:
|
|
87
|
+
case "UNRECOGNIZED":
|
|
88
|
+
default:
|
|
89
|
+
return BondedRoleStatus.UNRECOGNIZED;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export function bondedRoleStatusToJSON(object) {
|
|
93
|
+
switch (object) {
|
|
94
|
+
case BondedRoleStatus.BONDED_ROLE_STATUS_UNSPECIFIED:
|
|
95
|
+
return "BONDED_ROLE_STATUS_UNSPECIFIED";
|
|
96
|
+
case BondedRoleStatus.BONDED_ROLE_STATUS_NORMAL:
|
|
97
|
+
return "BONDED_ROLE_STATUS_NORMAL";
|
|
98
|
+
case BondedRoleStatus.BONDED_ROLE_STATUS_RECOVERY:
|
|
99
|
+
return "BONDED_ROLE_STATUS_RECOVERY";
|
|
100
|
+
case BondedRoleStatus.BONDED_ROLE_STATUS_DEMOTED:
|
|
101
|
+
return "BONDED_ROLE_STATUS_DEMOTED";
|
|
102
|
+
case BondedRoleStatus.UNRECOGNIZED:
|
|
103
|
+
default:
|
|
104
|
+
return "UNRECOGNIZED";
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function createBaseBondedRole() {
|
|
108
|
+
return {
|
|
109
|
+
address: "",
|
|
110
|
+
roleType: 0,
|
|
111
|
+
bondStatus: 0,
|
|
112
|
+
currentBond: "",
|
|
113
|
+
totalCommittedBond: "",
|
|
114
|
+
registeredAt: BigInt(0),
|
|
115
|
+
lastActiveEpoch: BigInt(0),
|
|
116
|
+
consecutiveInactiveEpochs: BigInt(0),
|
|
117
|
+
demotionCooldownUntil: BigInt(0),
|
|
118
|
+
cumulativeRewards: "",
|
|
119
|
+
lastRewardEpoch: BigInt(0)
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* BondedRole is the generic accountability record for a role-playing member:
|
|
124
|
+
* identity, bond, bond status, and activity stamps. Module-specific action
|
|
125
|
+
* counters (hides, reviews, verifications, etc.) live in per-module activity
|
|
126
|
+
* protos owned by the role's module.
|
|
127
|
+
* @name BondedRole
|
|
128
|
+
* @package sparkdream.rep.v1
|
|
129
|
+
* @see proto type: sparkdream.rep.v1.BondedRole
|
|
130
|
+
*/
|
|
131
|
+
export const BondedRole = {
|
|
132
|
+
typeUrl: "/sparkdream.rep.v1.BondedRole",
|
|
133
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
134
|
+
if (message.address !== "") {
|
|
135
|
+
writer.uint32(10).string(message.address);
|
|
136
|
+
}
|
|
137
|
+
if (message.roleType !== 0) {
|
|
138
|
+
writer.uint32(16).int32(message.roleType);
|
|
139
|
+
}
|
|
140
|
+
if (message.bondStatus !== 0) {
|
|
141
|
+
writer.uint32(24).int32(message.bondStatus);
|
|
142
|
+
}
|
|
143
|
+
if (message.currentBond !== "") {
|
|
144
|
+
writer.uint32(34).string(message.currentBond);
|
|
145
|
+
}
|
|
146
|
+
if (message.totalCommittedBond !== "") {
|
|
147
|
+
writer.uint32(42).string(message.totalCommittedBond);
|
|
148
|
+
}
|
|
149
|
+
if (message.registeredAt !== BigInt(0)) {
|
|
150
|
+
writer.uint32(48).int64(message.registeredAt);
|
|
151
|
+
}
|
|
152
|
+
if (message.lastActiveEpoch !== BigInt(0)) {
|
|
153
|
+
writer.uint32(56).int64(message.lastActiveEpoch);
|
|
154
|
+
}
|
|
155
|
+
if (message.consecutiveInactiveEpochs !== BigInt(0)) {
|
|
156
|
+
writer.uint32(64).uint64(message.consecutiveInactiveEpochs);
|
|
157
|
+
}
|
|
158
|
+
if (message.demotionCooldownUntil !== BigInt(0)) {
|
|
159
|
+
writer.uint32(72).int64(message.demotionCooldownUntil);
|
|
160
|
+
}
|
|
161
|
+
if (message.cumulativeRewards !== "") {
|
|
162
|
+
writer.uint32(82).string(message.cumulativeRewards);
|
|
163
|
+
}
|
|
164
|
+
if (message.lastRewardEpoch !== BigInt(0)) {
|
|
165
|
+
writer.uint32(88).int64(message.lastRewardEpoch);
|
|
166
|
+
}
|
|
167
|
+
return writer;
|
|
168
|
+
},
|
|
169
|
+
decode(input, length) {
|
|
170
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
171
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
172
|
+
const message = createBaseBondedRole();
|
|
173
|
+
while (reader.pos < end) {
|
|
174
|
+
const tag = reader.uint32();
|
|
175
|
+
switch (tag >>> 3) {
|
|
176
|
+
case 1:
|
|
177
|
+
message.address = reader.string();
|
|
178
|
+
break;
|
|
179
|
+
case 2:
|
|
180
|
+
message.roleType = reader.int32();
|
|
181
|
+
break;
|
|
182
|
+
case 3:
|
|
183
|
+
message.bondStatus = reader.int32();
|
|
184
|
+
break;
|
|
185
|
+
case 4:
|
|
186
|
+
message.currentBond = reader.string();
|
|
187
|
+
break;
|
|
188
|
+
case 5:
|
|
189
|
+
message.totalCommittedBond = reader.string();
|
|
190
|
+
break;
|
|
191
|
+
case 6:
|
|
192
|
+
message.registeredAt = reader.int64();
|
|
193
|
+
break;
|
|
194
|
+
case 7:
|
|
195
|
+
message.lastActiveEpoch = reader.int64();
|
|
196
|
+
break;
|
|
197
|
+
case 8:
|
|
198
|
+
message.consecutiveInactiveEpochs = reader.uint64();
|
|
199
|
+
break;
|
|
200
|
+
case 9:
|
|
201
|
+
message.demotionCooldownUntil = reader.int64();
|
|
202
|
+
break;
|
|
203
|
+
case 10:
|
|
204
|
+
message.cumulativeRewards = reader.string();
|
|
205
|
+
break;
|
|
206
|
+
case 11:
|
|
207
|
+
message.lastRewardEpoch = reader.int64();
|
|
208
|
+
break;
|
|
209
|
+
default:
|
|
210
|
+
reader.skipType(tag & 7);
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return message;
|
|
215
|
+
},
|
|
216
|
+
fromPartial(object) {
|
|
217
|
+
const message = createBaseBondedRole();
|
|
218
|
+
message.address = object.address ?? "";
|
|
219
|
+
message.roleType = object.roleType ?? 0;
|
|
220
|
+
message.bondStatus = object.bondStatus ?? 0;
|
|
221
|
+
message.currentBond = object.currentBond ?? "";
|
|
222
|
+
message.totalCommittedBond = object.totalCommittedBond ?? "";
|
|
223
|
+
message.registeredAt = object.registeredAt !== undefined && object.registeredAt !== null ? BigInt(object.registeredAt.toString()) : BigInt(0);
|
|
224
|
+
message.lastActiveEpoch = object.lastActiveEpoch !== undefined && object.lastActiveEpoch !== null ? BigInt(object.lastActiveEpoch.toString()) : BigInt(0);
|
|
225
|
+
message.consecutiveInactiveEpochs = object.consecutiveInactiveEpochs !== undefined && object.consecutiveInactiveEpochs !== null ? BigInt(object.consecutiveInactiveEpochs.toString()) : BigInt(0);
|
|
226
|
+
message.demotionCooldownUntil = object.demotionCooldownUntil !== undefined && object.demotionCooldownUntil !== null ? BigInt(object.demotionCooldownUntil.toString()) : BigInt(0);
|
|
227
|
+
message.cumulativeRewards = object.cumulativeRewards ?? "";
|
|
228
|
+
message.lastRewardEpoch = object.lastRewardEpoch !== undefined && object.lastRewardEpoch !== null ? BigInt(object.lastRewardEpoch.toString()) : BigInt(0);
|
|
229
|
+
return message;
|
|
230
|
+
},
|
|
231
|
+
fromAmino(object) {
|
|
232
|
+
const message = createBaseBondedRole();
|
|
233
|
+
if (object.address !== undefined && object.address !== null) {
|
|
234
|
+
message.address = object.address;
|
|
235
|
+
}
|
|
236
|
+
if (object.role_type !== undefined && object.role_type !== null) {
|
|
237
|
+
message.roleType = object.role_type;
|
|
238
|
+
}
|
|
239
|
+
if (object.bond_status !== undefined && object.bond_status !== null) {
|
|
240
|
+
message.bondStatus = object.bond_status;
|
|
241
|
+
}
|
|
242
|
+
if (object.current_bond !== undefined && object.current_bond !== null) {
|
|
243
|
+
message.currentBond = object.current_bond;
|
|
244
|
+
}
|
|
245
|
+
if (object.total_committed_bond !== undefined && object.total_committed_bond !== null) {
|
|
246
|
+
message.totalCommittedBond = object.total_committed_bond;
|
|
247
|
+
}
|
|
248
|
+
if (object.registered_at !== undefined && object.registered_at !== null) {
|
|
249
|
+
message.registeredAt = BigInt(object.registered_at);
|
|
250
|
+
}
|
|
251
|
+
if (object.last_active_epoch !== undefined && object.last_active_epoch !== null) {
|
|
252
|
+
message.lastActiveEpoch = BigInt(object.last_active_epoch);
|
|
253
|
+
}
|
|
254
|
+
if (object.consecutive_inactive_epochs !== undefined && object.consecutive_inactive_epochs !== null) {
|
|
255
|
+
message.consecutiveInactiveEpochs = BigInt(object.consecutive_inactive_epochs);
|
|
256
|
+
}
|
|
257
|
+
if (object.demotion_cooldown_until !== undefined && object.demotion_cooldown_until !== null) {
|
|
258
|
+
message.demotionCooldownUntil = BigInt(object.demotion_cooldown_until);
|
|
259
|
+
}
|
|
260
|
+
if (object.cumulative_rewards !== undefined && object.cumulative_rewards !== null) {
|
|
261
|
+
message.cumulativeRewards = object.cumulative_rewards;
|
|
262
|
+
}
|
|
263
|
+
if (object.last_reward_epoch !== undefined && object.last_reward_epoch !== null) {
|
|
264
|
+
message.lastRewardEpoch = BigInt(object.last_reward_epoch);
|
|
265
|
+
}
|
|
266
|
+
return message;
|
|
267
|
+
},
|
|
268
|
+
toAmino(message) {
|
|
269
|
+
const obj = {};
|
|
270
|
+
obj.address = message.address === "" ? undefined : message.address;
|
|
271
|
+
obj.role_type = message.roleType === 0 ? undefined : message.roleType;
|
|
272
|
+
obj.bond_status = message.bondStatus === 0 ? undefined : message.bondStatus;
|
|
273
|
+
obj.current_bond = message.currentBond === "" ? undefined : message.currentBond;
|
|
274
|
+
obj.total_committed_bond = message.totalCommittedBond === "" ? undefined : message.totalCommittedBond;
|
|
275
|
+
obj.registered_at = message.registeredAt !== BigInt(0) ? message.registeredAt?.toString() : undefined;
|
|
276
|
+
obj.last_active_epoch = message.lastActiveEpoch !== BigInt(0) ? message.lastActiveEpoch?.toString() : undefined;
|
|
277
|
+
obj.consecutive_inactive_epochs = message.consecutiveInactiveEpochs !== BigInt(0) ? message.consecutiveInactiveEpochs?.toString() : undefined;
|
|
278
|
+
obj.demotion_cooldown_until = message.demotionCooldownUntil !== BigInt(0) ? message.demotionCooldownUntil?.toString() : undefined;
|
|
279
|
+
obj.cumulative_rewards = message.cumulativeRewards === "" ? undefined : message.cumulativeRewards;
|
|
280
|
+
obj.last_reward_epoch = message.lastRewardEpoch !== BigInt(0) ? message.lastRewardEpoch?.toString() : undefined;
|
|
281
|
+
return obj;
|
|
282
|
+
},
|
|
283
|
+
fromAminoMsg(object) {
|
|
284
|
+
return BondedRole.fromAmino(object.value);
|
|
285
|
+
},
|
|
286
|
+
fromProtoMsg(message) {
|
|
287
|
+
return BondedRole.decode(message.value);
|
|
288
|
+
},
|
|
289
|
+
toProto(message) {
|
|
290
|
+
return BondedRole.encode(message).finish();
|
|
291
|
+
},
|
|
292
|
+
toProtoMsg(message) {
|
|
293
|
+
return {
|
|
294
|
+
typeUrl: "/sparkdream.rep.v1.BondedRole",
|
|
295
|
+
value: BondedRole.encode(message).finish()
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
function createBaseBondedRoleConfig() {
|
|
300
|
+
return {
|
|
301
|
+
roleType: 0,
|
|
302
|
+
minBond: "",
|
|
303
|
+
minRepTier: BigInt(0),
|
|
304
|
+
minTrustLevel: "",
|
|
305
|
+
minAgeBlocks: BigInt(0),
|
|
306
|
+
demotionCooldown: BigInt(0),
|
|
307
|
+
demotionThreshold: ""
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* BondedRoleConfig holds the per-role policy knobs enforced by x/rep at
|
|
312
|
+
* MsgBondRole time. The source-of-truth field values live on the owning
|
|
313
|
+
* module's operational params (flattened); the owning module write-throughs
|
|
314
|
+
* the full config via SetBondedRoleConfig on change and at InitGenesis.
|
|
315
|
+
*
|
|
316
|
+
* Every field is mutable via the owning module's operational-params flow. No
|
|
317
|
+
* chain-upgrade gates — these are operational accountability knobs, not
|
|
318
|
+
* monetary policy.
|
|
319
|
+
* @name BondedRoleConfig
|
|
320
|
+
* @package sparkdream.rep.v1
|
|
321
|
+
* @see proto type: sparkdream.rep.v1.BondedRoleConfig
|
|
322
|
+
*/
|
|
323
|
+
export const BondedRoleConfig = {
|
|
324
|
+
typeUrl: "/sparkdream.rep.v1.BondedRoleConfig",
|
|
325
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
326
|
+
if (message.roleType !== 0) {
|
|
327
|
+
writer.uint32(8).int32(message.roleType);
|
|
328
|
+
}
|
|
329
|
+
if (message.minBond !== "") {
|
|
330
|
+
writer.uint32(18).string(message.minBond);
|
|
331
|
+
}
|
|
332
|
+
if (message.minRepTier !== BigInt(0)) {
|
|
333
|
+
writer.uint32(24).uint64(message.minRepTier);
|
|
334
|
+
}
|
|
335
|
+
if (message.minTrustLevel !== "") {
|
|
336
|
+
writer.uint32(34).string(message.minTrustLevel);
|
|
337
|
+
}
|
|
338
|
+
if (message.minAgeBlocks !== BigInt(0)) {
|
|
339
|
+
writer.uint32(40).int64(message.minAgeBlocks);
|
|
340
|
+
}
|
|
341
|
+
if (message.demotionCooldown !== BigInt(0)) {
|
|
342
|
+
writer.uint32(48).int64(message.demotionCooldown);
|
|
343
|
+
}
|
|
344
|
+
if (message.demotionThreshold !== "") {
|
|
345
|
+
writer.uint32(58).string(message.demotionThreshold);
|
|
346
|
+
}
|
|
347
|
+
return writer;
|
|
348
|
+
},
|
|
349
|
+
decode(input, length) {
|
|
350
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
351
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
352
|
+
const message = createBaseBondedRoleConfig();
|
|
353
|
+
while (reader.pos < end) {
|
|
354
|
+
const tag = reader.uint32();
|
|
355
|
+
switch (tag >>> 3) {
|
|
356
|
+
case 1:
|
|
357
|
+
message.roleType = reader.int32();
|
|
358
|
+
break;
|
|
359
|
+
case 2:
|
|
360
|
+
message.minBond = reader.string();
|
|
361
|
+
break;
|
|
362
|
+
case 3:
|
|
363
|
+
message.minRepTier = reader.uint64();
|
|
364
|
+
break;
|
|
365
|
+
case 4:
|
|
366
|
+
message.minTrustLevel = reader.string();
|
|
367
|
+
break;
|
|
368
|
+
case 5:
|
|
369
|
+
message.minAgeBlocks = reader.int64();
|
|
370
|
+
break;
|
|
371
|
+
case 6:
|
|
372
|
+
message.demotionCooldown = reader.int64();
|
|
373
|
+
break;
|
|
374
|
+
case 7:
|
|
375
|
+
message.demotionThreshold = reader.string();
|
|
376
|
+
break;
|
|
377
|
+
default:
|
|
378
|
+
reader.skipType(tag & 7);
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
return message;
|
|
383
|
+
},
|
|
384
|
+
fromPartial(object) {
|
|
385
|
+
const message = createBaseBondedRoleConfig();
|
|
386
|
+
message.roleType = object.roleType ?? 0;
|
|
387
|
+
message.minBond = object.minBond ?? "";
|
|
388
|
+
message.minRepTier = object.minRepTier !== undefined && object.minRepTier !== null ? BigInt(object.minRepTier.toString()) : BigInt(0);
|
|
389
|
+
message.minTrustLevel = object.minTrustLevel ?? "";
|
|
390
|
+
message.minAgeBlocks = object.minAgeBlocks !== undefined && object.minAgeBlocks !== null ? BigInt(object.minAgeBlocks.toString()) : BigInt(0);
|
|
391
|
+
message.demotionCooldown = object.demotionCooldown !== undefined && object.demotionCooldown !== null ? BigInt(object.demotionCooldown.toString()) : BigInt(0);
|
|
392
|
+
message.demotionThreshold = object.demotionThreshold ?? "";
|
|
393
|
+
return message;
|
|
394
|
+
},
|
|
395
|
+
fromAmino(object) {
|
|
396
|
+
const message = createBaseBondedRoleConfig();
|
|
397
|
+
if (object.role_type !== undefined && object.role_type !== null) {
|
|
398
|
+
message.roleType = object.role_type;
|
|
399
|
+
}
|
|
400
|
+
if (object.min_bond !== undefined && object.min_bond !== null) {
|
|
401
|
+
message.minBond = object.min_bond;
|
|
402
|
+
}
|
|
403
|
+
if (object.min_rep_tier !== undefined && object.min_rep_tier !== null) {
|
|
404
|
+
message.minRepTier = BigInt(object.min_rep_tier);
|
|
405
|
+
}
|
|
406
|
+
if (object.min_trust_level !== undefined && object.min_trust_level !== null) {
|
|
407
|
+
message.minTrustLevel = object.min_trust_level;
|
|
408
|
+
}
|
|
409
|
+
if (object.min_age_blocks !== undefined && object.min_age_blocks !== null) {
|
|
410
|
+
message.minAgeBlocks = BigInt(object.min_age_blocks);
|
|
411
|
+
}
|
|
412
|
+
if (object.demotion_cooldown !== undefined && object.demotion_cooldown !== null) {
|
|
413
|
+
message.demotionCooldown = BigInt(object.demotion_cooldown);
|
|
414
|
+
}
|
|
415
|
+
if (object.demotion_threshold !== undefined && object.demotion_threshold !== null) {
|
|
416
|
+
message.demotionThreshold = object.demotion_threshold;
|
|
417
|
+
}
|
|
418
|
+
return message;
|
|
419
|
+
},
|
|
420
|
+
toAmino(message) {
|
|
421
|
+
const obj = {};
|
|
422
|
+
obj.role_type = message.roleType === 0 ? undefined : message.roleType;
|
|
423
|
+
obj.min_bond = message.minBond === "" ? undefined : message.minBond;
|
|
424
|
+
obj.min_rep_tier = message.minRepTier !== BigInt(0) ? message.minRepTier?.toString() : undefined;
|
|
425
|
+
obj.min_trust_level = message.minTrustLevel === "" ? undefined : message.minTrustLevel;
|
|
426
|
+
obj.min_age_blocks = message.minAgeBlocks !== BigInt(0) ? message.minAgeBlocks?.toString() : undefined;
|
|
427
|
+
obj.demotion_cooldown = message.demotionCooldown !== BigInt(0) ? message.demotionCooldown?.toString() : undefined;
|
|
428
|
+
obj.demotion_threshold = message.demotionThreshold === "" ? undefined : message.demotionThreshold;
|
|
429
|
+
return obj;
|
|
430
|
+
},
|
|
431
|
+
fromAminoMsg(object) {
|
|
432
|
+
return BondedRoleConfig.fromAmino(object.value);
|
|
433
|
+
},
|
|
434
|
+
fromProtoMsg(message) {
|
|
435
|
+
return BondedRoleConfig.decode(message.value);
|
|
436
|
+
},
|
|
437
|
+
toProto(message) {
|
|
438
|
+
return BondedRoleConfig.encode(message).finish();
|
|
439
|
+
},
|
|
440
|
+
toProtoMsg(message) {
|
|
441
|
+
return {
|
|
442
|
+
typeUrl: "/sparkdream.rep.v1.BondedRoleConfig",
|
|
443
|
+
value: BondedRoleConfig.encode(message).finish()
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
};
|