@sparkdreamnft/sparkdreamjs 0.0.19 → 0.0.20
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/sparkdream/forum/v1/query.js +469 -0
- package/esm/sparkdream/forum/v1/query.lcd.js +30 -0
- package/esm/sparkdream/forum/v1/query.rpc.Query.js +31 -1
- package/esm/sparkdream/rep/v1/query.js +13 -22
- package/package.json +1 -1
- package/sparkdream/bundle.d.ts +78 -0
- package/sparkdream/forum/v1/query.d.ts +273 -0
- package/sparkdream/forum/v1/query.js +470 -1
- package/sparkdream/forum/v1/query.lcd.d.ts +4 -1
- package/sparkdream/forum/v1/query.lcd.js +30 -0
- package/sparkdream/forum/v1/query.rpc.Query.d.ts +18 -1
- package/sparkdream/forum/v1/query.rpc.Query.js +30 -0
- package/sparkdream/rep/v1/query.d.ts +2 -4
- package/sparkdream/rep/v1/query.js +13 -22
- package/sparkdream/rpc.query.d.ts +3 -0
|
@@ -14,6 +14,7 @@ import { ThreadMetadata } from "./thread_metadata";
|
|
|
14
14
|
import { ThreadFollow } from "./thread_follow";
|
|
15
15
|
import { ThreadFollowCount } from "./thread_follow_count";
|
|
16
16
|
import { ArchiveMetadata } from "./archive_metadata";
|
|
17
|
+
import { PostConvictionStake } from "./types";
|
|
17
18
|
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
18
19
|
function createBaseQueryParamsRequest() {
|
|
19
20
|
return {};
|
|
@@ -7165,3 +7166,471 @@ export const QueryFlagReviewQueueResponse = {
|
|
|
7165
7166
|
};
|
|
7166
7167
|
}
|
|
7167
7168
|
};
|
|
7169
|
+
function createBaseQueryGetPostConvictionStakeRequest() {
|
|
7170
|
+
return {
|
|
7171
|
+
id: BigInt(0)
|
|
7172
|
+
};
|
|
7173
|
+
}
|
|
7174
|
+
/**
|
|
7175
|
+
* QueryGetPostConvictionStakeRequest defines the QueryGetPostConvictionStakeRequest message.
|
|
7176
|
+
* @name QueryGetPostConvictionStakeRequest
|
|
7177
|
+
* @package sparkdream.forum.v1
|
|
7178
|
+
* @see proto type: sparkdream.forum.v1.QueryGetPostConvictionStakeRequest
|
|
7179
|
+
*/
|
|
7180
|
+
export const QueryGetPostConvictionStakeRequest = {
|
|
7181
|
+
typeUrl: "/sparkdream.forum.v1.QueryGetPostConvictionStakeRequest",
|
|
7182
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
7183
|
+
if (message.id !== BigInt(0)) {
|
|
7184
|
+
writer.uint32(8).uint64(message.id);
|
|
7185
|
+
}
|
|
7186
|
+
return writer;
|
|
7187
|
+
},
|
|
7188
|
+
decode(input, length) {
|
|
7189
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7190
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
7191
|
+
const message = createBaseQueryGetPostConvictionStakeRequest();
|
|
7192
|
+
while (reader.pos < end) {
|
|
7193
|
+
const tag = reader.uint32();
|
|
7194
|
+
switch (tag >>> 3) {
|
|
7195
|
+
case 1:
|
|
7196
|
+
message.id = reader.uint64();
|
|
7197
|
+
break;
|
|
7198
|
+
default:
|
|
7199
|
+
reader.skipType(tag & 7);
|
|
7200
|
+
break;
|
|
7201
|
+
}
|
|
7202
|
+
}
|
|
7203
|
+
return message;
|
|
7204
|
+
},
|
|
7205
|
+
fromPartial(object) {
|
|
7206
|
+
const message = createBaseQueryGetPostConvictionStakeRequest();
|
|
7207
|
+
message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0);
|
|
7208
|
+
return message;
|
|
7209
|
+
},
|
|
7210
|
+
fromAmino(object) {
|
|
7211
|
+
const message = createBaseQueryGetPostConvictionStakeRequest();
|
|
7212
|
+
if (object.id !== undefined && object.id !== null) {
|
|
7213
|
+
message.id = BigInt(object.id);
|
|
7214
|
+
}
|
|
7215
|
+
return message;
|
|
7216
|
+
},
|
|
7217
|
+
toAmino(message) {
|
|
7218
|
+
const obj = {};
|
|
7219
|
+
obj.id = message.id !== BigInt(0) ? message.id?.toString() : undefined;
|
|
7220
|
+
return obj;
|
|
7221
|
+
},
|
|
7222
|
+
fromAminoMsg(object) {
|
|
7223
|
+
return QueryGetPostConvictionStakeRequest.fromAmino(object.value);
|
|
7224
|
+
},
|
|
7225
|
+
fromProtoMsg(message) {
|
|
7226
|
+
return QueryGetPostConvictionStakeRequest.decode(message.value);
|
|
7227
|
+
},
|
|
7228
|
+
toProto(message) {
|
|
7229
|
+
return QueryGetPostConvictionStakeRequest.encode(message).finish();
|
|
7230
|
+
},
|
|
7231
|
+
toProtoMsg(message) {
|
|
7232
|
+
return {
|
|
7233
|
+
typeUrl: "/sparkdream.forum.v1.QueryGetPostConvictionStakeRequest",
|
|
7234
|
+
value: QueryGetPostConvictionStakeRequest.encode(message).finish()
|
|
7235
|
+
};
|
|
7236
|
+
}
|
|
7237
|
+
};
|
|
7238
|
+
function createBaseQueryGetPostConvictionStakeResponse() {
|
|
7239
|
+
return {
|
|
7240
|
+
stake: PostConvictionStake.fromPartial({})
|
|
7241
|
+
};
|
|
7242
|
+
}
|
|
7243
|
+
/**
|
|
7244
|
+
* QueryGetPostConvictionStakeResponse defines the QueryGetPostConvictionStakeResponse message.
|
|
7245
|
+
* @name QueryGetPostConvictionStakeResponse
|
|
7246
|
+
* @package sparkdream.forum.v1
|
|
7247
|
+
* @see proto type: sparkdream.forum.v1.QueryGetPostConvictionStakeResponse
|
|
7248
|
+
*/
|
|
7249
|
+
export const QueryGetPostConvictionStakeResponse = {
|
|
7250
|
+
typeUrl: "/sparkdream.forum.v1.QueryGetPostConvictionStakeResponse",
|
|
7251
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
7252
|
+
if (message.stake !== undefined) {
|
|
7253
|
+
PostConvictionStake.encode(message.stake, writer.uint32(10).fork()).ldelim();
|
|
7254
|
+
}
|
|
7255
|
+
return writer;
|
|
7256
|
+
},
|
|
7257
|
+
decode(input, length) {
|
|
7258
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7259
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
7260
|
+
const message = createBaseQueryGetPostConvictionStakeResponse();
|
|
7261
|
+
while (reader.pos < end) {
|
|
7262
|
+
const tag = reader.uint32();
|
|
7263
|
+
switch (tag >>> 3) {
|
|
7264
|
+
case 1:
|
|
7265
|
+
message.stake = PostConvictionStake.decode(reader, reader.uint32());
|
|
7266
|
+
break;
|
|
7267
|
+
default:
|
|
7268
|
+
reader.skipType(tag & 7);
|
|
7269
|
+
break;
|
|
7270
|
+
}
|
|
7271
|
+
}
|
|
7272
|
+
return message;
|
|
7273
|
+
},
|
|
7274
|
+
fromPartial(object) {
|
|
7275
|
+
const message = createBaseQueryGetPostConvictionStakeResponse();
|
|
7276
|
+
message.stake = object.stake !== undefined && object.stake !== null ? PostConvictionStake.fromPartial(object.stake) : undefined;
|
|
7277
|
+
return message;
|
|
7278
|
+
},
|
|
7279
|
+
fromAmino(object) {
|
|
7280
|
+
const message = createBaseQueryGetPostConvictionStakeResponse();
|
|
7281
|
+
if (object.stake !== undefined && object.stake !== null) {
|
|
7282
|
+
message.stake = PostConvictionStake.fromAmino(object.stake);
|
|
7283
|
+
}
|
|
7284
|
+
return message;
|
|
7285
|
+
},
|
|
7286
|
+
toAmino(message) {
|
|
7287
|
+
const obj = {};
|
|
7288
|
+
obj.stake = message.stake ? PostConvictionStake.toAmino(message.stake) : undefined;
|
|
7289
|
+
return obj;
|
|
7290
|
+
},
|
|
7291
|
+
fromAminoMsg(object) {
|
|
7292
|
+
return QueryGetPostConvictionStakeResponse.fromAmino(object.value);
|
|
7293
|
+
},
|
|
7294
|
+
fromProtoMsg(message) {
|
|
7295
|
+
return QueryGetPostConvictionStakeResponse.decode(message.value);
|
|
7296
|
+
},
|
|
7297
|
+
toProto(message) {
|
|
7298
|
+
return QueryGetPostConvictionStakeResponse.encode(message).finish();
|
|
7299
|
+
},
|
|
7300
|
+
toProtoMsg(message) {
|
|
7301
|
+
return {
|
|
7302
|
+
typeUrl: "/sparkdream.forum.v1.QueryGetPostConvictionStakeResponse",
|
|
7303
|
+
value: QueryGetPostConvictionStakeResponse.encode(message).finish()
|
|
7304
|
+
};
|
|
7305
|
+
}
|
|
7306
|
+
};
|
|
7307
|
+
function createBaseQueryPostConvictionStakesByStakerRequest() {
|
|
7308
|
+
return {
|
|
7309
|
+
staker: "",
|
|
7310
|
+
pagination: undefined
|
|
7311
|
+
};
|
|
7312
|
+
}
|
|
7313
|
+
/**
|
|
7314
|
+
* QueryPostConvictionStakesByStakerRequest defines the QueryPostConvictionStakesByStakerRequest message.
|
|
7315
|
+
* @name QueryPostConvictionStakesByStakerRequest
|
|
7316
|
+
* @package sparkdream.forum.v1
|
|
7317
|
+
* @see proto type: sparkdream.forum.v1.QueryPostConvictionStakesByStakerRequest
|
|
7318
|
+
*/
|
|
7319
|
+
export const QueryPostConvictionStakesByStakerRequest = {
|
|
7320
|
+
typeUrl: "/sparkdream.forum.v1.QueryPostConvictionStakesByStakerRequest",
|
|
7321
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
7322
|
+
if (message.staker !== "") {
|
|
7323
|
+
writer.uint32(10).string(message.staker);
|
|
7324
|
+
}
|
|
7325
|
+
if (message.pagination !== undefined) {
|
|
7326
|
+
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
7327
|
+
}
|
|
7328
|
+
return writer;
|
|
7329
|
+
},
|
|
7330
|
+
decode(input, length) {
|
|
7331
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7332
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
7333
|
+
const message = createBaseQueryPostConvictionStakesByStakerRequest();
|
|
7334
|
+
while (reader.pos < end) {
|
|
7335
|
+
const tag = reader.uint32();
|
|
7336
|
+
switch (tag >>> 3) {
|
|
7337
|
+
case 1:
|
|
7338
|
+
message.staker = reader.string();
|
|
7339
|
+
break;
|
|
7340
|
+
case 2:
|
|
7341
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
7342
|
+
break;
|
|
7343
|
+
default:
|
|
7344
|
+
reader.skipType(tag & 7);
|
|
7345
|
+
break;
|
|
7346
|
+
}
|
|
7347
|
+
}
|
|
7348
|
+
return message;
|
|
7349
|
+
},
|
|
7350
|
+
fromPartial(object) {
|
|
7351
|
+
const message = createBaseQueryPostConvictionStakesByStakerRequest();
|
|
7352
|
+
message.staker = object.staker ?? "";
|
|
7353
|
+
message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
|
|
7354
|
+
return message;
|
|
7355
|
+
},
|
|
7356
|
+
fromAmino(object) {
|
|
7357
|
+
const message = createBaseQueryPostConvictionStakesByStakerRequest();
|
|
7358
|
+
if (object.staker !== undefined && object.staker !== null) {
|
|
7359
|
+
message.staker = object.staker;
|
|
7360
|
+
}
|
|
7361
|
+
if (object.pagination !== undefined && object.pagination !== null) {
|
|
7362
|
+
message.pagination = PageRequest.fromAmino(object.pagination);
|
|
7363
|
+
}
|
|
7364
|
+
return message;
|
|
7365
|
+
},
|
|
7366
|
+
toAmino(message) {
|
|
7367
|
+
const obj = {};
|
|
7368
|
+
obj.staker = message.staker === "" ? undefined : message.staker;
|
|
7369
|
+
obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
|
|
7370
|
+
return obj;
|
|
7371
|
+
},
|
|
7372
|
+
fromAminoMsg(object) {
|
|
7373
|
+
return QueryPostConvictionStakesByStakerRequest.fromAmino(object.value);
|
|
7374
|
+
},
|
|
7375
|
+
fromProtoMsg(message) {
|
|
7376
|
+
return QueryPostConvictionStakesByStakerRequest.decode(message.value);
|
|
7377
|
+
},
|
|
7378
|
+
toProto(message) {
|
|
7379
|
+
return QueryPostConvictionStakesByStakerRequest.encode(message).finish();
|
|
7380
|
+
},
|
|
7381
|
+
toProtoMsg(message) {
|
|
7382
|
+
return {
|
|
7383
|
+
typeUrl: "/sparkdream.forum.v1.QueryPostConvictionStakesByStakerRequest",
|
|
7384
|
+
value: QueryPostConvictionStakesByStakerRequest.encode(message).finish()
|
|
7385
|
+
};
|
|
7386
|
+
}
|
|
7387
|
+
};
|
|
7388
|
+
function createBaseQueryPostConvictionStakesByStakerResponse() {
|
|
7389
|
+
return {
|
|
7390
|
+
stakes: [],
|
|
7391
|
+
pagination: undefined
|
|
7392
|
+
};
|
|
7393
|
+
}
|
|
7394
|
+
/**
|
|
7395
|
+
* QueryPostConvictionStakesByStakerResponse defines the QueryPostConvictionStakesByStakerResponse message.
|
|
7396
|
+
* @name QueryPostConvictionStakesByStakerResponse
|
|
7397
|
+
* @package sparkdream.forum.v1
|
|
7398
|
+
* @see proto type: sparkdream.forum.v1.QueryPostConvictionStakesByStakerResponse
|
|
7399
|
+
*/
|
|
7400
|
+
export const QueryPostConvictionStakesByStakerResponse = {
|
|
7401
|
+
typeUrl: "/sparkdream.forum.v1.QueryPostConvictionStakesByStakerResponse",
|
|
7402
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
7403
|
+
for (const v of message.stakes) {
|
|
7404
|
+
PostConvictionStake.encode(v, writer.uint32(10).fork()).ldelim();
|
|
7405
|
+
}
|
|
7406
|
+
if (message.pagination !== undefined) {
|
|
7407
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
7408
|
+
}
|
|
7409
|
+
return writer;
|
|
7410
|
+
},
|
|
7411
|
+
decode(input, length) {
|
|
7412
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7413
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
7414
|
+
const message = createBaseQueryPostConvictionStakesByStakerResponse();
|
|
7415
|
+
while (reader.pos < end) {
|
|
7416
|
+
const tag = reader.uint32();
|
|
7417
|
+
switch (tag >>> 3) {
|
|
7418
|
+
case 1:
|
|
7419
|
+
message.stakes.push(PostConvictionStake.decode(reader, reader.uint32()));
|
|
7420
|
+
break;
|
|
7421
|
+
case 2:
|
|
7422
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
7423
|
+
break;
|
|
7424
|
+
default:
|
|
7425
|
+
reader.skipType(tag & 7);
|
|
7426
|
+
break;
|
|
7427
|
+
}
|
|
7428
|
+
}
|
|
7429
|
+
return message;
|
|
7430
|
+
},
|
|
7431
|
+
fromPartial(object) {
|
|
7432
|
+
const message = createBaseQueryPostConvictionStakesByStakerResponse();
|
|
7433
|
+
message.stakes = object.stakes?.map(e => PostConvictionStake.fromPartial(e)) || [];
|
|
7434
|
+
message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
|
|
7435
|
+
return message;
|
|
7436
|
+
},
|
|
7437
|
+
fromAmino(object) {
|
|
7438
|
+
const message = createBaseQueryPostConvictionStakesByStakerResponse();
|
|
7439
|
+
message.stakes = object.stakes?.map(e => PostConvictionStake.fromAmino(e)) || [];
|
|
7440
|
+
if (object.pagination !== undefined && object.pagination !== null) {
|
|
7441
|
+
message.pagination = PageResponse.fromAmino(object.pagination);
|
|
7442
|
+
}
|
|
7443
|
+
return message;
|
|
7444
|
+
},
|
|
7445
|
+
toAmino(message) {
|
|
7446
|
+
const obj = {};
|
|
7447
|
+
if (message.stakes) {
|
|
7448
|
+
obj.stakes = message.stakes.map(e => e ? PostConvictionStake.toAmino(e) : undefined);
|
|
7449
|
+
}
|
|
7450
|
+
else {
|
|
7451
|
+
obj.stakes = message.stakes;
|
|
7452
|
+
}
|
|
7453
|
+
obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
|
|
7454
|
+
return obj;
|
|
7455
|
+
},
|
|
7456
|
+
fromAminoMsg(object) {
|
|
7457
|
+
return QueryPostConvictionStakesByStakerResponse.fromAmino(object.value);
|
|
7458
|
+
},
|
|
7459
|
+
fromProtoMsg(message) {
|
|
7460
|
+
return QueryPostConvictionStakesByStakerResponse.decode(message.value);
|
|
7461
|
+
},
|
|
7462
|
+
toProto(message) {
|
|
7463
|
+
return QueryPostConvictionStakesByStakerResponse.encode(message).finish();
|
|
7464
|
+
},
|
|
7465
|
+
toProtoMsg(message) {
|
|
7466
|
+
return {
|
|
7467
|
+
typeUrl: "/sparkdream.forum.v1.QueryPostConvictionStakesByStakerResponse",
|
|
7468
|
+
value: QueryPostConvictionStakesByStakerResponse.encode(message).finish()
|
|
7469
|
+
};
|
|
7470
|
+
}
|
|
7471
|
+
};
|
|
7472
|
+
function createBaseQueryPostConvictionStakesByPostRequest() {
|
|
7473
|
+
return {
|
|
7474
|
+
postId: BigInt(0),
|
|
7475
|
+
pagination: undefined
|
|
7476
|
+
};
|
|
7477
|
+
}
|
|
7478
|
+
/**
|
|
7479
|
+
* QueryPostConvictionStakesByPostRequest defines the QueryPostConvictionStakesByPostRequest message.
|
|
7480
|
+
* @name QueryPostConvictionStakesByPostRequest
|
|
7481
|
+
* @package sparkdream.forum.v1
|
|
7482
|
+
* @see proto type: sparkdream.forum.v1.QueryPostConvictionStakesByPostRequest
|
|
7483
|
+
*/
|
|
7484
|
+
export const QueryPostConvictionStakesByPostRequest = {
|
|
7485
|
+
typeUrl: "/sparkdream.forum.v1.QueryPostConvictionStakesByPostRequest",
|
|
7486
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
7487
|
+
if (message.postId !== BigInt(0)) {
|
|
7488
|
+
writer.uint32(8).uint64(message.postId);
|
|
7489
|
+
}
|
|
7490
|
+
if (message.pagination !== undefined) {
|
|
7491
|
+
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
7492
|
+
}
|
|
7493
|
+
return writer;
|
|
7494
|
+
},
|
|
7495
|
+
decode(input, length) {
|
|
7496
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7497
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
7498
|
+
const message = createBaseQueryPostConvictionStakesByPostRequest();
|
|
7499
|
+
while (reader.pos < end) {
|
|
7500
|
+
const tag = reader.uint32();
|
|
7501
|
+
switch (tag >>> 3) {
|
|
7502
|
+
case 1:
|
|
7503
|
+
message.postId = reader.uint64();
|
|
7504
|
+
break;
|
|
7505
|
+
case 2:
|
|
7506
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
7507
|
+
break;
|
|
7508
|
+
default:
|
|
7509
|
+
reader.skipType(tag & 7);
|
|
7510
|
+
break;
|
|
7511
|
+
}
|
|
7512
|
+
}
|
|
7513
|
+
return message;
|
|
7514
|
+
},
|
|
7515
|
+
fromPartial(object) {
|
|
7516
|
+
const message = createBaseQueryPostConvictionStakesByPostRequest();
|
|
7517
|
+
message.postId = object.postId !== undefined && object.postId !== null ? BigInt(object.postId.toString()) : BigInt(0);
|
|
7518
|
+
message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
|
|
7519
|
+
return message;
|
|
7520
|
+
},
|
|
7521
|
+
fromAmino(object) {
|
|
7522
|
+
const message = createBaseQueryPostConvictionStakesByPostRequest();
|
|
7523
|
+
if (object.post_id !== undefined && object.post_id !== null) {
|
|
7524
|
+
message.postId = BigInt(object.post_id);
|
|
7525
|
+
}
|
|
7526
|
+
if (object.pagination !== undefined && object.pagination !== null) {
|
|
7527
|
+
message.pagination = PageRequest.fromAmino(object.pagination);
|
|
7528
|
+
}
|
|
7529
|
+
return message;
|
|
7530
|
+
},
|
|
7531
|
+
toAmino(message) {
|
|
7532
|
+
const obj = {};
|
|
7533
|
+
obj.post_id = message.postId !== BigInt(0) ? message.postId?.toString() : undefined;
|
|
7534
|
+
obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
|
|
7535
|
+
return obj;
|
|
7536
|
+
},
|
|
7537
|
+
fromAminoMsg(object) {
|
|
7538
|
+
return QueryPostConvictionStakesByPostRequest.fromAmino(object.value);
|
|
7539
|
+
},
|
|
7540
|
+
fromProtoMsg(message) {
|
|
7541
|
+
return QueryPostConvictionStakesByPostRequest.decode(message.value);
|
|
7542
|
+
},
|
|
7543
|
+
toProto(message) {
|
|
7544
|
+
return QueryPostConvictionStakesByPostRequest.encode(message).finish();
|
|
7545
|
+
},
|
|
7546
|
+
toProtoMsg(message) {
|
|
7547
|
+
return {
|
|
7548
|
+
typeUrl: "/sparkdream.forum.v1.QueryPostConvictionStakesByPostRequest",
|
|
7549
|
+
value: QueryPostConvictionStakesByPostRequest.encode(message).finish()
|
|
7550
|
+
};
|
|
7551
|
+
}
|
|
7552
|
+
};
|
|
7553
|
+
function createBaseQueryPostConvictionStakesByPostResponse() {
|
|
7554
|
+
return {
|
|
7555
|
+
stakes: [],
|
|
7556
|
+
pagination: undefined
|
|
7557
|
+
};
|
|
7558
|
+
}
|
|
7559
|
+
/**
|
|
7560
|
+
* QueryPostConvictionStakesByPostResponse defines the QueryPostConvictionStakesByPostResponse message.
|
|
7561
|
+
* @name QueryPostConvictionStakesByPostResponse
|
|
7562
|
+
* @package sparkdream.forum.v1
|
|
7563
|
+
* @see proto type: sparkdream.forum.v1.QueryPostConvictionStakesByPostResponse
|
|
7564
|
+
*/
|
|
7565
|
+
export const QueryPostConvictionStakesByPostResponse = {
|
|
7566
|
+
typeUrl: "/sparkdream.forum.v1.QueryPostConvictionStakesByPostResponse",
|
|
7567
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
7568
|
+
for (const v of message.stakes) {
|
|
7569
|
+
PostConvictionStake.encode(v, writer.uint32(10).fork()).ldelim();
|
|
7570
|
+
}
|
|
7571
|
+
if (message.pagination !== undefined) {
|
|
7572
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
7573
|
+
}
|
|
7574
|
+
return writer;
|
|
7575
|
+
},
|
|
7576
|
+
decode(input, length) {
|
|
7577
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
7578
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
7579
|
+
const message = createBaseQueryPostConvictionStakesByPostResponse();
|
|
7580
|
+
while (reader.pos < end) {
|
|
7581
|
+
const tag = reader.uint32();
|
|
7582
|
+
switch (tag >>> 3) {
|
|
7583
|
+
case 1:
|
|
7584
|
+
message.stakes.push(PostConvictionStake.decode(reader, reader.uint32()));
|
|
7585
|
+
break;
|
|
7586
|
+
case 2:
|
|
7587
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
7588
|
+
break;
|
|
7589
|
+
default:
|
|
7590
|
+
reader.skipType(tag & 7);
|
|
7591
|
+
break;
|
|
7592
|
+
}
|
|
7593
|
+
}
|
|
7594
|
+
return message;
|
|
7595
|
+
},
|
|
7596
|
+
fromPartial(object) {
|
|
7597
|
+
const message = createBaseQueryPostConvictionStakesByPostResponse();
|
|
7598
|
+
message.stakes = object.stakes?.map(e => PostConvictionStake.fromPartial(e)) || [];
|
|
7599
|
+
message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
|
|
7600
|
+
return message;
|
|
7601
|
+
},
|
|
7602
|
+
fromAmino(object) {
|
|
7603
|
+
const message = createBaseQueryPostConvictionStakesByPostResponse();
|
|
7604
|
+
message.stakes = object.stakes?.map(e => PostConvictionStake.fromAmino(e)) || [];
|
|
7605
|
+
if (object.pagination !== undefined && object.pagination !== null) {
|
|
7606
|
+
message.pagination = PageResponse.fromAmino(object.pagination);
|
|
7607
|
+
}
|
|
7608
|
+
return message;
|
|
7609
|
+
},
|
|
7610
|
+
toAmino(message) {
|
|
7611
|
+
const obj = {};
|
|
7612
|
+
if (message.stakes) {
|
|
7613
|
+
obj.stakes = message.stakes.map(e => e ? PostConvictionStake.toAmino(e) : undefined);
|
|
7614
|
+
}
|
|
7615
|
+
else {
|
|
7616
|
+
obj.stakes = message.stakes;
|
|
7617
|
+
}
|
|
7618
|
+
obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
|
|
7619
|
+
return obj;
|
|
7620
|
+
},
|
|
7621
|
+
fromAminoMsg(object) {
|
|
7622
|
+
return QueryPostConvictionStakesByPostResponse.fromAmino(object.value);
|
|
7623
|
+
},
|
|
7624
|
+
fromProtoMsg(message) {
|
|
7625
|
+
return QueryPostConvictionStakesByPostResponse.decode(message.value);
|
|
7626
|
+
},
|
|
7627
|
+
toProto(message) {
|
|
7628
|
+
return QueryPostConvictionStakesByPostResponse.encode(message).finish();
|
|
7629
|
+
},
|
|
7630
|
+
toProtoMsg(message) {
|
|
7631
|
+
return {
|
|
7632
|
+
typeUrl: "/sparkdream.forum.v1.QueryPostConvictionStakesByPostResponse",
|
|
7633
|
+
value: QueryPostConvictionStakesByPostResponse.encode(message).finish()
|
|
7634
|
+
};
|
|
7635
|
+
}
|
|
7636
|
+
};
|
|
@@ -417,4 +417,34 @@ export class LCDQueryClient {
|
|
|
417
417
|
const endpoint = `sparkdream/forum/v1/flag_review_queue`;
|
|
418
418
|
return await this.req.get(endpoint, options);
|
|
419
419
|
};
|
|
420
|
+
/* GetPostConvictionStake returns a single post-conviction stake by id. */
|
|
421
|
+
getPostConvictionStake = async (params) => {
|
|
422
|
+
const endpoint = `sparkdream/forum/v1/post_conviction_stake/${params.id}`;
|
|
423
|
+
return await this.req.get(endpoint);
|
|
424
|
+
};
|
|
425
|
+
/* PostConvictionStakesByStaker lists a staker's open post-conviction stakes.
|
|
426
|
+
Replaces the need for clients to mirror their own stake ids locally: the
|
|
427
|
+
stake id required by MsgReleasePostConviction is otherwise only returned in
|
|
428
|
+
the StakePostConviction tx response/event. */
|
|
429
|
+
postConvictionStakesByStaker = async (params) => {
|
|
430
|
+
const options = {
|
|
431
|
+
params: {}
|
|
432
|
+
};
|
|
433
|
+
if (typeof params?.pagination !== "undefined") {
|
|
434
|
+
setPaginationParams(options, params.pagination);
|
|
435
|
+
}
|
|
436
|
+
const endpoint = `sparkdream/forum/v1/post_conviction_stakes_by_staker/${params.staker}`;
|
|
437
|
+
return await this.req.get(endpoint, options);
|
|
438
|
+
};
|
|
439
|
+
/* PostConvictionStakesByPost lists all active stakes backing a post. */
|
|
440
|
+
postConvictionStakesByPost = async (params) => {
|
|
441
|
+
const options = {
|
|
442
|
+
params: {}
|
|
443
|
+
};
|
|
444
|
+
if (typeof params?.pagination !== "undefined") {
|
|
445
|
+
setPaginationParams(options, params.pagination);
|
|
446
|
+
}
|
|
447
|
+
const endpoint = `sparkdream/forum/v1/post_conviction_stakes_by_post/${params.postId}`;
|
|
448
|
+
return await this.req.get(endpoint, options);
|
|
449
|
+
};
|
|
420
450
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BinaryReader } from "../../../binary";
|
|
2
2
|
import { createProtobufRpcClient } from "@cosmjs/stargate";
|
|
3
|
-
import { QueryParamsRequest, QueryParamsResponse, QueryGetPostRequest, QueryGetPostResponse, QueryAllPostRequest, QueryAllPostResponse, QueryGetUserRateLimitRequest, QueryGetUserRateLimitResponse, QueryAllUserRateLimitRequest, QueryAllUserRateLimitResponse, QueryGetUserReactionLimitRequest, QueryGetUserReactionLimitResponse, QueryAllUserReactionLimitRequest, QueryAllUserReactionLimitResponse, QueryGetSentinelActivityRequest, QueryGetSentinelActivityResponse, QueryAllSentinelActivityRequest, QueryAllSentinelActivityResponse, QueryGetHideRecordRequest, QueryGetHideRecordResponse, QueryAllHideRecordRequest, QueryAllHideRecordResponse, QueryGetThreadLockRecordRequest, QueryGetThreadLockRecordResponse, QueryAllThreadLockRecordRequest, QueryAllThreadLockRecordResponse, QueryGetThreadMoveRecordRequest, QueryGetThreadMoveRecordResponse, QueryAllThreadMoveRecordRequest, QueryAllThreadMoveRecordResponse, QueryGetPostFlagRequest, QueryGetPostFlagResponse, QueryAllPostFlagRequest, QueryAllPostFlagResponse, QueryGetBountyRequest, QueryGetBountyResponse, QueryAllBountyRequest, QueryAllBountyResponse, QueryGetThreadMetadataRequest, QueryGetThreadMetadataResponse, QueryAllThreadMetadataRequest, QueryAllThreadMetadataResponse, QueryGetThreadFollowRequest, QueryGetThreadFollowResponse, QueryAllThreadFollowRequest, QueryAllThreadFollowResponse, QueryGetThreadFollowCountRequest, QueryGetThreadFollowCountResponse, QueryAllThreadFollowCountRequest, QueryAllThreadFollowCountResponse, QueryGetArchiveMetadataRequest, QueryGetArchiveMetadataResponse, QueryAllArchiveMetadataRequest, QueryAllArchiveMetadataResponse, QueryPostsRequest, QueryPostsResponse, QueryThreadRequest, QueryThreadResponse, QueryUserPostsRequest, QueryUserPostsResponse, QueryArchiveCooldownRequest, QueryArchiveCooldownResponse, QueryForumStatusRequest, QueryForumStatusResponse, QueryAppealCooldownRequest, QueryAppealCooldownResponse, QueryPinnedPostsRequest, QueryPinnedPostsResponse, QueryLockedThreadsRequest, QueryLockedThreadsResponse, QueryThreadLockStatusRequest, QueryThreadLockStatusResponse, QueryTopPostsRequest, QueryTopPostsResponse, QueryThreadFollowersRequest, QueryThreadFollowersResponse, QueryUserFollowedThreadsRequest, QueryUserFollowedThreadsResponse, QueryIsFollowingThreadRequest, QueryIsFollowingThreadResponse, QueryBountyByThreadRequest, QueryBountyByThreadResponse, QueryActiveBountiesRequest, QueryActiveBountiesResponse, QueryUserBountiesRequest, QueryUserBountiesResponse, QueryBountyExpiringSoonRequest, QueryBountyExpiringSoonResponse, QueryPostFlagsRequest, QueryPostFlagsResponse, QueryFlagReviewQueueRequest, QueryFlagReviewQueueResponse } from "./query";
|
|
3
|
+
import { QueryParamsRequest, QueryParamsResponse, QueryGetPostRequest, QueryGetPostResponse, QueryAllPostRequest, QueryAllPostResponse, QueryGetUserRateLimitRequest, QueryGetUserRateLimitResponse, QueryAllUserRateLimitRequest, QueryAllUserRateLimitResponse, QueryGetUserReactionLimitRequest, QueryGetUserReactionLimitResponse, QueryAllUserReactionLimitRequest, QueryAllUserReactionLimitResponse, QueryGetSentinelActivityRequest, QueryGetSentinelActivityResponse, QueryAllSentinelActivityRequest, QueryAllSentinelActivityResponse, QueryGetHideRecordRequest, QueryGetHideRecordResponse, QueryAllHideRecordRequest, QueryAllHideRecordResponse, QueryGetThreadLockRecordRequest, QueryGetThreadLockRecordResponse, QueryAllThreadLockRecordRequest, QueryAllThreadLockRecordResponse, QueryGetThreadMoveRecordRequest, QueryGetThreadMoveRecordResponse, QueryAllThreadMoveRecordRequest, QueryAllThreadMoveRecordResponse, QueryGetPostFlagRequest, QueryGetPostFlagResponse, QueryAllPostFlagRequest, QueryAllPostFlagResponse, QueryGetBountyRequest, QueryGetBountyResponse, QueryAllBountyRequest, QueryAllBountyResponse, QueryGetThreadMetadataRequest, QueryGetThreadMetadataResponse, QueryAllThreadMetadataRequest, QueryAllThreadMetadataResponse, QueryGetThreadFollowRequest, QueryGetThreadFollowResponse, QueryAllThreadFollowRequest, QueryAllThreadFollowResponse, QueryGetThreadFollowCountRequest, QueryGetThreadFollowCountResponse, QueryAllThreadFollowCountRequest, QueryAllThreadFollowCountResponse, QueryGetArchiveMetadataRequest, QueryGetArchiveMetadataResponse, QueryAllArchiveMetadataRequest, QueryAllArchiveMetadataResponse, QueryPostsRequest, QueryPostsResponse, QueryThreadRequest, QueryThreadResponse, QueryUserPostsRequest, QueryUserPostsResponse, QueryArchiveCooldownRequest, QueryArchiveCooldownResponse, QueryForumStatusRequest, QueryForumStatusResponse, QueryAppealCooldownRequest, QueryAppealCooldownResponse, QueryPinnedPostsRequest, QueryPinnedPostsResponse, QueryLockedThreadsRequest, QueryLockedThreadsResponse, QueryThreadLockStatusRequest, QueryThreadLockStatusResponse, QueryTopPostsRequest, QueryTopPostsResponse, QueryThreadFollowersRequest, QueryThreadFollowersResponse, QueryUserFollowedThreadsRequest, QueryUserFollowedThreadsResponse, QueryIsFollowingThreadRequest, QueryIsFollowingThreadResponse, QueryBountyByThreadRequest, QueryBountyByThreadResponse, QueryActiveBountiesRequest, QueryActiveBountiesResponse, QueryUserBountiesRequest, QueryUserBountiesResponse, QueryBountyExpiringSoonRequest, QueryBountyExpiringSoonResponse, QueryPostFlagsRequest, QueryPostFlagsResponse, QueryFlagReviewQueueRequest, QueryFlagReviewQueueResponse, QueryGetPostConvictionStakeRequest, QueryGetPostConvictionStakeResponse, QueryPostConvictionStakesByStakerRequest, QueryPostConvictionStakesByStakerResponse, QueryPostConvictionStakesByPostRequest, QueryPostConvictionStakesByPostResponse } from "./query";
|
|
4
4
|
export class QueryClientImpl {
|
|
5
5
|
rpc;
|
|
6
6
|
constructor(rpc) {
|
|
@@ -314,6 +314,27 @@ export class QueryClientImpl {
|
|
|
314
314
|
const promise = this.rpc.request("sparkdream.forum.v1.Query", "FlagReviewQueue", data);
|
|
315
315
|
return promise.then(data => QueryFlagReviewQueueResponse.decode(new BinaryReader(data)));
|
|
316
316
|
};
|
|
317
|
+
/* GetPostConvictionStake returns a single post-conviction stake by id. */
|
|
318
|
+
getPostConvictionStake = async (request) => {
|
|
319
|
+
const data = QueryGetPostConvictionStakeRequest.encode(request).finish();
|
|
320
|
+
const promise = this.rpc.request("sparkdream.forum.v1.Query", "GetPostConvictionStake", data);
|
|
321
|
+
return promise.then(data => QueryGetPostConvictionStakeResponse.decode(new BinaryReader(data)));
|
|
322
|
+
};
|
|
323
|
+
/* PostConvictionStakesByStaker lists a staker's open post-conviction stakes.
|
|
324
|
+
Replaces the need for clients to mirror their own stake ids locally: the
|
|
325
|
+
stake id required by MsgReleasePostConviction is otherwise only returned in
|
|
326
|
+
the StakePostConviction tx response/event. */
|
|
327
|
+
postConvictionStakesByStaker = async (request) => {
|
|
328
|
+
const data = QueryPostConvictionStakesByStakerRequest.encode(request).finish();
|
|
329
|
+
const promise = this.rpc.request("sparkdream.forum.v1.Query", "PostConvictionStakesByStaker", data);
|
|
330
|
+
return promise.then(data => QueryPostConvictionStakesByStakerResponse.decode(new BinaryReader(data)));
|
|
331
|
+
};
|
|
332
|
+
/* PostConvictionStakesByPost lists all active stakes backing a post. */
|
|
333
|
+
postConvictionStakesByPost = async (request) => {
|
|
334
|
+
const data = QueryPostConvictionStakesByPostRequest.encode(request).finish();
|
|
335
|
+
const promise = this.rpc.request("sparkdream.forum.v1.Query", "PostConvictionStakesByPost", data);
|
|
336
|
+
return promise.then(data => QueryPostConvictionStakesByPostResponse.decode(new BinaryReader(data)));
|
|
337
|
+
};
|
|
317
338
|
}
|
|
318
339
|
export const createRpcQueryExtension = (base) => {
|
|
319
340
|
const rpc = createProtobufRpcClient(base);
|
|
@@ -456,6 +477,15 @@ export const createRpcQueryExtension = (base) => {
|
|
|
456
477
|
},
|
|
457
478
|
flagReviewQueue(request) {
|
|
458
479
|
return queryService.flagReviewQueue(request);
|
|
480
|
+
},
|
|
481
|
+
getPostConvictionStake(request) {
|
|
482
|
+
return queryService.getPostConvictionStake(request);
|
|
483
|
+
},
|
|
484
|
+
postConvictionStakesByStaker(request) {
|
|
485
|
+
return queryService.postConvictionStakesByStaker(request);
|
|
486
|
+
},
|
|
487
|
+
postConvictionStakesByPost(request) {
|
|
488
|
+
return queryService.postConvictionStakesByPost(request);
|
|
459
489
|
}
|
|
460
490
|
};
|
|
461
491
|
};
|
|
@@ -2850,8 +2850,7 @@ export const QueryMembersByTrustLevelRequest = {
|
|
|
2850
2850
|
};
|
|
2851
2851
|
function createBaseQueryMembersByTrustLevelResponse() {
|
|
2852
2852
|
return {
|
|
2853
|
-
|
|
2854
|
-
dreamBalance: "",
|
|
2853
|
+
members: [],
|
|
2855
2854
|
pagination: undefined
|
|
2856
2855
|
};
|
|
2857
2856
|
}
|
|
@@ -2864,14 +2863,11 @@ function createBaseQueryMembersByTrustLevelResponse() {
|
|
|
2864
2863
|
export const QueryMembersByTrustLevelResponse = {
|
|
2865
2864
|
typeUrl: "/sparkdream.rep.v1.QueryMembersByTrustLevelResponse",
|
|
2866
2865
|
encode(message, writer = BinaryWriter.create()) {
|
|
2867
|
-
|
|
2868
|
-
writer.uint32(10).
|
|
2869
|
-
}
|
|
2870
|
-
if (message.dreamBalance !== "") {
|
|
2871
|
-
writer.uint32(18).string(message.dreamBalance);
|
|
2866
|
+
for (const v of message.members) {
|
|
2867
|
+
Member.encode(v, writer.uint32(10).fork()).ldelim();
|
|
2872
2868
|
}
|
|
2873
2869
|
if (message.pagination !== undefined) {
|
|
2874
|
-
PageResponse.encode(message.pagination, writer.uint32(
|
|
2870
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
2875
2871
|
}
|
|
2876
2872
|
return writer;
|
|
2877
2873
|
},
|
|
@@ -2883,12 +2879,9 @@ export const QueryMembersByTrustLevelResponse = {
|
|
|
2883
2879
|
const tag = reader.uint32();
|
|
2884
2880
|
switch (tag >>> 3) {
|
|
2885
2881
|
case 1:
|
|
2886
|
-
message.
|
|
2882
|
+
message.members.push(Member.decode(reader, reader.uint32()));
|
|
2887
2883
|
break;
|
|
2888
2884
|
case 2:
|
|
2889
|
-
message.dreamBalance = reader.string();
|
|
2890
|
-
break;
|
|
2891
|
-
case 3:
|
|
2892
2885
|
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
2893
2886
|
break;
|
|
2894
2887
|
default:
|
|
@@ -2900,19 +2893,13 @@ export const QueryMembersByTrustLevelResponse = {
|
|
|
2900
2893
|
},
|
|
2901
2894
|
fromPartial(object) {
|
|
2902
2895
|
const message = createBaseQueryMembersByTrustLevelResponse();
|
|
2903
|
-
message.
|
|
2904
|
-
message.dreamBalance = object.dreamBalance ?? "";
|
|
2896
|
+
message.members = object.members?.map(e => Member.fromPartial(e)) || [];
|
|
2905
2897
|
message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
|
|
2906
2898
|
return message;
|
|
2907
2899
|
},
|
|
2908
2900
|
fromAmino(object) {
|
|
2909
2901
|
const message = createBaseQueryMembersByTrustLevelResponse();
|
|
2910
|
-
|
|
2911
|
-
message.address = object.address;
|
|
2912
|
-
}
|
|
2913
|
-
if (object.dream_balance !== undefined && object.dream_balance !== null) {
|
|
2914
|
-
message.dreamBalance = object.dream_balance;
|
|
2915
|
-
}
|
|
2902
|
+
message.members = object.members?.map(e => Member.fromAmino(e)) || [];
|
|
2916
2903
|
if (object.pagination !== undefined && object.pagination !== null) {
|
|
2917
2904
|
message.pagination = PageResponse.fromAmino(object.pagination);
|
|
2918
2905
|
}
|
|
@@ -2920,8 +2907,12 @@ export const QueryMembersByTrustLevelResponse = {
|
|
|
2920
2907
|
},
|
|
2921
2908
|
toAmino(message) {
|
|
2922
2909
|
const obj = {};
|
|
2923
|
-
|
|
2924
|
-
|
|
2910
|
+
if (message.members) {
|
|
2911
|
+
obj.members = message.members.map(e => e ? Member.toAmino(e) : undefined);
|
|
2912
|
+
}
|
|
2913
|
+
else {
|
|
2914
|
+
obj.members = message.members;
|
|
2915
|
+
}
|
|
2925
2916
|
obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
|
|
2926
2917
|
return obj;
|
|
2927
2918
|
},
|