@sparkdreamnft/sparkdreamjs 0.0.32 → 0.0.34

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.
@@ -876,7 +876,8 @@ exports.QueryGetProjectResponse = {
876
876
  };
877
877
  function createBaseQueryAllProjectRequest() {
878
878
  return {
879
- pagination: undefined
879
+ pagination: undefined,
880
+ sortBy: ""
880
881
  };
881
882
  }
882
883
  /**
@@ -891,6 +892,9 @@ exports.QueryAllProjectRequest = {
891
892
  if (message.pagination !== undefined) {
892
893
  pagination_1.PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
893
894
  }
895
+ if (message.sortBy !== "") {
896
+ writer.uint32(18).string(message.sortBy);
897
+ }
894
898
  return writer;
895
899
  },
896
900
  decode(input, length) {
@@ -903,6 +907,9 @@ exports.QueryAllProjectRequest = {
903
907
  case 1:
904
908
  message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
905
909
  break;
910
+ case 2:
911
+ message.sortBy = reader.string();
912
+ break;
906
913
  default:
907
914
  reader.skipType(tag & 7);
908
915
  break;
@@ -913,6 +920,7 @@ exports.QueryAllProjectRequest = {
913
920
  fromPartial(object) {
914
921
  const message = createBaseQueryAllProjectRequest();
915
922
  message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
923
+ message.sortBy = object.sortBy ?? "";
916
924
  return message;
917
925
  },
918
926
  fromAmino(object) {
@@ -920,11 +928,15 @@ exports.QueryAllProjectRequest = {
920
928
  if (object.pagination !== undefined && object.pagination !== null) {
921
929
  message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
922
930
  }
931
+ if (object.sort_by !== undefined && object.sort_by !== null) {
932
+ message.sortBy = object.sort_by;
933
+ }
923
934
  return message;
924
935
  },
925
936
  toAmino(message) {
926
937
  const obj = {};
927
938
  obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
939
+ obj.sort_by = message.sortBy === "" ? undefined : message.sortBy;
928
940
  return obj;
929
941
  },
930
942
  fromAminoMsg(object) {
@@ -1167,7 +1179,8 @@ exports.QueryGetInitiativeResponse = {
1167
1179
  };
1168
1180
  function createBaseQueryAllInitiativeRequest() {
1169
1181
  return {
1170
- pagination: undefined
1182
+ pagination: undefined,
1183
+ sortBy: ""
1171
1184
  };
1172
1185
  }
1173
1186
  /**
@@ -1182,6 +1195,9 @@ exports.QueryAllInitiativeRequest = {
1182
1195
  if (message.pagination !== undefined) {
1183
1196
  pagination_1.PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
1184
1197
  }
1198
+ if (message.sortBy !== "") {
1199
+ writer.uint32(18).string(message.sortBy);
1200
+ }
1185
1201
  return writer;
1186
1202
  },
1187
1203
  decode(input, length) {
@@ -1194,6 +1210,9 @@ exports.QueryAllInitiativeRequest = {
1194
1210
  case 1:
1195
1211
  message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
1196
1212
  break;
1213
+ case 2:
1214
+ message.sortBy = reader.string();
1215
+ break;
1197
1216
  default:
1198
1217
  reader.skipType(tag & 7);
1199
1218
  break;
@@ -1204,6 +1223,7 @@ exports.QueryAllInitiativeRequest = {
1204
1223
  fromPartial(object) {
1205
1224
  const message = createBaseQueryAllInitiativeRequest();
1206
1225
  message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
1226
+ message.sortBy = object.sortBy ?? "";
1207
1227
  return message;
1208
1228
  },
1209
1229
  fromAmino(object) {
@@ -1211,11 +1231,15 @@ exports.QueryAllInitiativeRequest = {
1211
1231
  if (object.pagination !== undefined && object.pagination !== null) {
1212
1232
  message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
1213
1233
  }
1234
+ if (object.sort_by !== undefined && object.sort_by !== null) {
1235
+ message.sortBy = object.sort_by;
1236
+ }
1214
1237
  return message;
1215
1238
  },
1216
1239
  toAmino(message) {
1217
1240
  const obj = {};
1218
1241
  obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
1242
+ obj.sort_by = message.sortBy === "" ? undefined : message.sortBy;
1219
1243
  return obj;
1220
1244
  },
1221
1245
  fromAminoMsg(object) {
@@ -3676,7 +3700,8 @@ exports.QueryInterimsByReferenceResponse = {
3676
3700
  function createBaseQueryProjectsByCouncilRequest() {
3677
3701
  return {
3678
3702
  council: "",
3679
- pagination: undefined
3703
+ pagination: undefined,
3704
+ sortBy: ""
3680
3705
  };
3681
3706
  }
3682
3707
  /**
@@ -3694,6 +3719,9 @@ exports.QueryProjectsByCouncilRequest = {
3694
3719
  if (message.pagination !== undefined) {
3695
3720
  pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
3696
3721
  }
3722
+ if (message.sortBy !== "") {
3723
+ writer.uint32(26).string(message.sortBy);
3724
+ }
3697
3725
  return writer;
3698
3726
  },
3699
3727
  decode(input, length) {
@@ -3709,6 +3737,9 @@ exports.QueryProjectsByCouncilRequest = {
3709
3737
  case 2:
3710
3738
  message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
3711
3739
  break;
3740
+ case 3:
3741
+ message.sortBy = reader.string();
3742
+ break;
3712
3743
  default:
3713
3744
  reader.skipType(tag & 7);
3714
3745
  break;
@@ -3720,6 +3751,7 @@ exports.QueryProjectsByCouncilRequest = {
3720
3751
  const message = createBaseQueryProjectsByCouncilRequest();
3721
3752
  message.council = object.council ?? "";
3722
3753
  message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
3754
+ message.sortBy = object.sortBy ?? "";
3723
3755
  return message;
3724
3756
  },
3725
3757
  fromAmino(object) {
@@ -3730,12 +3762,16 @@ exports.QueryProjectsByCouncilRequest = {
3730
3762
  if (object.pagination !== undefined && object.pagination !== null) {
3731
3763
  message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
3732
3764
  }
3765
+ if (object.sort_by !== undefined && object.sort_by !== null) {
3766
+ message.sortBy = object.sort_by;
3767
+ }
3733
3768
  return message;
3734
3769
  },
3735
3770
  toAmino(message) {
3736
3771
  const obj = {};
3737
3772
  obj.council = message.council === "" ? undefined : message.council;
3738
3773
  obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
3774
+ obj.sort_by = message.sortBy === "" ? undefined : message.sortBy;
3739
3775
  return obj;
3740
3776
  },
3741
3777
  fromAminoMsg(object) {
@@ -3756,14 +3792,15 @@ exports.QueryProjectsByCouncilRequest = {
3756
3792
  };
3757
3793
  function createBaseQueryProjectsByCouncilResponse() {
3758
3794
  return {
3759
- projectId: BigInt(0),
3760
- name: "",
3761
- status: BigInt(0),
3795
+ projects: [],
3762
3796
  pagination: undefined
3763
3797
  };
3764
3798
  }
3765
3799
  /**
3766
3800
  * QueryProjectsByCouncilResponse defines the QueryProjectsByCouncilResponse message.
3801
+ * Prior versions declared singular project_id/name/status fields, which could
3802
+ * never carry more than one match; the fields were replaced (not extended)
3803
+ * because no client could have used them meaningfully.
3767
3804
  * @name QueryProjectsByCouncilResponse
3768
3805
  * @package sparkdream.rep.v1
3769
3806
  * @see proto type: sparkdream.rep.v1.QueryProjectsByCouncilResponse
@@ -3771,17 +3808,11 @@ function createBaseQueryProjectsByCouncilResponse() {
3771
3808
  exports.QueryProjectsByCouncilResponse = {
3772
3809
  typeUrl: "/sparkdream.rep.v1.QueryProjectsByCouncilResponse",
3773
3810
  encode(message, writer = binary_1.BinaryWriter.create()) {
3774
- if (message.projectId !== BigInt(0)) {
3775
- writer.uint32(8).uint64(message.projectId);
3776
- }
3777
- if (message.name !== "") {
3778
- writer.uint32(18).string(message.name);
3779
- }
3780
- if (message.status !== BigInt(0)) {
3781
- writer.uint32(24).uint64(message.status);
3811
+ for (const v of message.projects) {
3812
+ project_1.Project.encode(v, writer.uint32(10).fork()).ldelim();
3782
3813
  }
3783
3814
  if (message.pagination !== undefined) {
3784
- pagination_1.PageResponse.encode(message.pagination, writer.uint32(34).fork()).ldelim();
3815
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
3785
3816
  }
3786
3817
  return writer;
3787
3818
  },
@@ -3793,15 +3824,9 @@ exports.QueryProjectsByCouncilResponse = {
3793
3824
  const tag = reader.uint32();
3794
3825
  switch (tag >>> 3) {
3795
3826
  case 1:
3796
- message.projectId = reader.uint64();
3827
+ message.projects.push(project_1.Project.decode(reader, reader.uint32()));
3797
3828
  break;
3798
3829
  case 2:
3799
- message.name = reader.string();
3800
- break;
3801
- case 3:
3802
- message.status = reader.uint64();
3803
- break;
3804
- case 4:
3805
3830
  message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
3806
3831
  break;
3807
3832
  default:
@@ -3813,23 +3838,13 @@ exports.QueryProjectsByCouncilResponse = {
3813
3838
  },
3814
3839
  fromPartial(object) {
3815
3840
  const message = createBaseQueryProjectsByCouncilResponse();
3816
- message.projectId = object.projectId !== undefined && object.projectId !== null ? BigInt(object.projectId.toString()) : BigInt(0);
3817
- message.name = object.name ?? "";
3818
- message.status = object.status !== undefined && object.status !== null ? BigInt(object.status.toString()) : BigInt(0);
3841
+ message.projects = object.projects?.map(e => project_1.Project.fromPartial(e)) || [];
3819
3842
  message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
3820
3843
  return message;
3821
3844
  },
3822
3845
  fromAmino(object) {
3823
3846
  const message = createBaseQueryProjectsByCouncilResponse();
3824
- if (object.project_id !== undefined && object.project_id !== null) {
3825
- message.projectId = BigInt(object.project_id);
3826
- }
3827
- if (object.name !== undefined && object.name !== null) {
3828
- message.name = object.name;
3829
- }
3830
- if (object.status !== undefined && object.status !== null) {
3831
- message.status = BigInt(object.status);
3832
- }
3847
+ message.projects = object.projects?.map(e => project_1.Project.fromAmino(e)) || [];
3833
3848
  if (object.pagination !== undefined && object.pagination !== null) {
3834
3849
  message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
3835
3850
  }
@@ -3837,9 +3852,12 @@ exports.QueryProjectsByCouncilResponse = {
3837
3852
  },
3838
3853
  toAmino(message) {
3839
3854
  const obj = {};
3840
- obj.project_id = message.projectId !== BigInt(0) ? message.projectId?.toString() : undefined;
3841
- obj.name = message.name === "" ? undefined : message.name;
3842
- obj.status = message.status !== BigInt(0) ? message.status?.toString() : undefined;
3855
+ if (message.projects) {
3856
+ obj.projects = message.projects.map(e => e ? project_1.Project.toAmino(e) : undefined);
3857
+ }
3858
+ else {
3859
+ obj.projects = message.projects;
3860
+ }
3843
3861
  obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
3844
3862
  return obj;
3845
3863
  },
@@ -3862,7 +3880,8 @@ exports.QueryProjectsByCouncilResponse = {
3862
3880
  function createBaseQueryInitiativesByProjectRequest() {
3863
3881
  return {
3864
3882
  projectId: BigInt(0),
3865
- pagination: undefined
3883
+ pagination: undefined,
3884
+ sortBy: ""
3866
3885
  };
3867
3886
  }
3868
3887
  /**
@@ -3880,6 +3899,9 @@ exports.QueryInitiativesByProjectRequest = {
3880
3899
  if (message.pagination !== undefined) {
3881
3900
  pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
3882
3901
  }
3902
+ if (message.sortBy !== "") {
3903
+ writer.uint32(26).string(message.sortBy);
3904
+ }
3883
3905
  return writer;
3884
3906
  },
3885
3907
  decode(input, length) {
@@ -3895,6 +3917,9 @@ exports.QueryInitiativesByProjectRequest = {
3895
3917
  case 2:
3896
3918
  message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
3897
3919
  break;
3920
+ case 3:
3921
+ message.sortBy = reader.string();
3922
+ break;
3898
3923
  default:
3899
3924
  reader.skipType(tag & 7);
3900
3925
  break;
@@ -3906,6 +3931,7 @@ exports.QueryInitiativesByProjectRequest = {
3906
3931
  const message = createBaseQueryInitiativesByProjectRequest();
3907
3932
  message.projectId = object.projectId !== undefined && object.projectId !== null ? BigInt(object.projectId.toString()) : BigInt(0);
3908
3933
  message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
3934
+ message.sortBy = object.sortBy ?? "";
3909
3935
  return message;
3910
3936
  },
3911
3937
  fromAmino(object) {
@@ -3916,12 +3942,16 @@ exports.QueryInitiativesByProjectRequest = {
3916
3942
  if (object.pagination !== undefined && object.pagination !== null) {
3917
3943
  message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
3918
3944
  }
3945
+ if (object.sort_by !== undefined && object.sort_by !== null) {
3946
+ message.sortBy = object.sort_by;
3947
+ }
3919
3948
  return message;
3920
3949
  },
3921
3950
  toAmino(message) {
3922
3951
  const obj = {};
3923
3952
  obj.project_id = message.projectId !== BigInt(0) ? message.projectId?.toString() : undefined;
3924
3953
  obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
3954
+ obj.sort_by = message.sortBy === "" ? undefined : message.sortBy;
3925
3955
  return obj;
3926
3956
  },
3927
3957
  fromAminoMsg(object) {
@@ -4027,7 +4057,8 @@ exports.QueryInitiativesByProjectResponse = {
4027
4057
  function createBaseQueryInitiativesByAssigneeRequest() {
4028
4058
  return {
4029
4059
  assignee: "",
4030
- pagination: undefined
4060
+ pagination: undefined,
4061
+ sortBy: ""
4031
4062
  };
4032
4063
  }
4033
4064
  /**
@@ -4045,6 +4076,9 @@ exports.QueryInitiativesByAssigneeRequest = {
4045
4076
  if (message.pagination !== undefined) {
4046
4077
  pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
4047
4078
  }
4079
+ if (message.sortBy !== "") {
4080
+ writer.uint32(26).string(message.sortBy);
4081
+ }
4048
4082
  return writer;
4049
4083
  },
4050
4084
  decode(input, length) {
@@ -4060,6 +4094,9 @@ exports.QueryInitiativesByAssigneeRequest = {
4060
4094
  case 2:
4061
4095
  message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
4062
4096
  break;
4097
+ case 3:
4098
+ message.sortBy = reader.string();
4099
+ break;
4063
4100
  default:
4064
4101
  reader.skipType(tag & 7);
4065
4102
  break;
@@ -4071,6 +4108,7 @@ exports.QueryInitiativesByAssigneeRequest = {
4071
4108
  const message = createBaseQueryInitiativesByAssigneeRequest();
4072
4109
  message.assignee = object.assignee ?? "";
4073
4110
  message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
4111
+ message.sortBy = object.sortBy ?? "";
4074
4112
  return message;
4075
4113
  },
4076
4114
  fromAmino(object) {
@@ -4081,12 +4119,16 @@ exports.QueryInitiativesByAssigneeRequest = {
4081
4119
  if (object.pagination !== undefined && object.pagination !== null) {
4082
4120
  message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
4083
4121
  }
4122
+ if (object.sort_by !== undefined && object.sort_by !== null) {
4123
+ message.sortBy = object.sort_by;
4124
+ }
4084
4125
  return message;
4085
4126
  },
4086
4127
  toAmino(message) {
4087
4128
  const obj = {};
4088
4129
  obj.assignee = message.assignee === "" ? undefined : message.assignee;
4089
4130
  obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
4131
+ obj.sort_by = message.sortBy === "" ? undefined : message.sortBy;
4090
4132
  return obj;
4091
4133
  },
4092
4134
  fromAminoMsg(object) {
@@ -4107,14 +4149,15 @@ exports.QueryInitiativesByAssigneeRequest = {
4107
4149
  };
4108
4150
  function createBaseQueryInitiativesByAssigneeResponse() {
4109
4151
  return {
4110
- initiativeId: BigInt(0),
4111
- title: "",
4112
- status: BigInt(0),
4152
+ initiatives: [],
4113
4153
  pagination: undefined
4114
4154
  };
4115
4155
  }
4116
4156
  /**
4117
4157
  * QueryInitiativesByAssigneeResponse defines the QueryInitiativesByAssigneeResponse message.
4158
+ * Prior versions declared singular initiative_id/title/status fields, which
4159
+ * could never carry more than one match; the fields were replaced (not
4160
+ * extended) because no client could have used them meaningfully.
4118
4161
  * @name QueryInitiativesByAssigneeResponse
4119
4162
  * @package sparkdream.rep.v1
4120
4163
  * @see proto type: sparkdream.rep.v1.QueryInitiativesByAssigneeResponse
@@ -4122,17 +4165,11 @@ function createBaseQueryInitiativesByAssigneeResponse() {
4122
4165
  exports.QueryInitiativesByAssigneeResponse = {
4123
4166
  typeUrl: "/sparkdream.rep.v1.QueryInitiativesByAssigneeResponse",
4124
4167
  encode(message, writer = binary_1.BinaryWriter.create()) {
4125
- if (message.initiativeId !== BigInt(0)) {
4126
- writer.uint32(8).uint64(message.initiativeId);
4127
- }
4128
- if (message.title !== "") {
4129
- writer.uint32(18).string(message.title);
4130
- }
4131
- if (message.status !== BigInt(0)) {
4132
- writer.uint32(24).uint64(message.status);
4168
+ for (const v of message.initiatives) {
4169
+ initiative_1.Initiative.encode(v, writer.uint32(10).fork()).ldelim();
4133
4170
  }
4134
4171
  if (message.pagination !== undefined) {
4135
- pagination_1.PageResponse.encode(message.pagination, writer.uint32(34).fork()).ldelim();
4172
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
4136
4173
  }
4137
4174
  return writer;
4138
4175
  },
@@ -4144,15 +4181,9 @@ exports.QueryInitiativesByAssigneeResponse = {
4144
4181
  const tag = reader.uint32();
4145
4182
  switch (tag >>> 3) {
4146
4183
  case 1:
4147
- message.initiativeId = reader.uint64();
4184
+ message.initiatives.push(initiative_1.Initiative.decode(reader, reader.uint32()));
4148
4185
  break;
4149
4186
  case 2:
4150
- message.title = reader.string();
4151
- break;
4152
- case 3:
4153
- message.status = reader.uint64();
4154
- break;
4155
- case 4:
4156
4187
  message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
4157
4188
  break;
4158
4189
  default:
@@ -4164,23 +4195,13 @@ exports.QueryInitiativesByAssigneeResponse = {
4164
4195
  },
4165
4196
  fromPartial(object) {
4166
4197
  const message = createBaseQueryInitiativesByAssigneeResponse();
4167
- message.initiativeId = object.initiativeId !== undefined && object.initiativeId !== null ? BigInt(object.initiativeId.toString()) : BigInt(0);
4168
- message.title = object.title ?? "";
4169
- message.status = object.status !== undefined && object.status !== null ? BigInt(object.status.toString()) : BigInt(0);
4198
+ message.initiatives = object.initiatives?.map(e => initiative_1.Initiative.fromPartial(e)) || [];
4170
4199
  message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
4171
4200
  return message;
4172
4201
  },
4173
4202
  fromAmino(object) {
4174
4203
  const message = createBaseQueryInitiativesByAssigneeResponse();
4175
- if (object.initiative_id !== undefined && object.initiative_id !== null) {
4176
- message.initiativeId = BigInt(object.initiative_id);
4177
- }
4178
- if (object.title !== undefined && object.title !== null) {
4179
- message.title = object.title;
4180
- }
4181
- if (object.status !== undefined && object.status !== null) {
4182
- message.status = BigInt(object.status);
4183
- }
4204
+ message.initiatives = object.initiatives?.map(e => initiative_1.Initiative.fromAmino(e)) || [];
4184
4205
  if (object.pagination !== undefined && object.pagination !== null) {
4185
4206
  message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
4186
4207
  }
@@ -4188,9 +4209,12 @@ exports.QueryInitiativesByAssigneeResponse = {
4188
4209
  },
4189
4210
  toAmino(message) {
4190
4211
  const obj = {};
4191
- obj.initiative_id = message.initiativeId !== BigInt(0) ? message.initiativeId?.toString() : undefined;
4192
- obj.title = message.title === "" ? undefined : message.title;
4193
- obj.status = message.status !== BigInt(0) ? message.status?.toString() : undefined;
4212
+ if (message.initiatives) {
4213
+ obj.initiatives = message.initiatives.map(e => e ? initiative_1.Initiative.toAmino(e) : undefined);
4214
+ }
4215
+ else {
4216
+ obj.initiatives = message.initiatives;
4217
+ }
4194
4218
  obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
4195
4219
  return obj;
4196
4220
  },
@@ -4212,7 +4236,8 @@ exports.QueryInitiativesByAssigneeResponse = {
4212
4236
  };
4213
4237
  function createBaseQueryAvailableInitiativesRequest() {
4214
4238
  return {
4215
- pagination: undefined
4239
+ pagination: undefined,
4240
+ sortBy: ""
4216
4241
  };
4217
4242
  }
4218
4243
  /**
@@ -4227,6 +4252,9 @@ exports.QueryAvailableInitiativesRequest = {
4227
4252
  if (message.pagination !== undefined) {
4228
4253
  pagination_1.PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
4229
4254
  }
4255
+ if (message.sortBy !== "") {
4256
+ writer.uint32(18).string(message.sortBy);
4257
+ }
4230
4258
  return writer;
4231
4259
  },
4232
4260
  decode(input, length) {
@@ -4239,6 +4267,9 @@ exports.QueryAvailableInitiativesRequest = {
4239
4267
  case 1:
4240
4268
  message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
4241
4269
  break;
4270
+ case 2:
4271
+ message.sortBy = reader.string();
4272
+ break;
4242
4273
  default:
4243
4274
  reader.skipType(tag & 7);
4244
4275
  break;
@@ -4249,6 +4280,7 @@ exports.QueryAvailableInitiativesRequest = {
4249
4280
  fromPartial(object) {
4250
4281
  const message = createBaseQueryAvailableInitiativesRequest();
4251
4282
  message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
4283
+ message.sortBy = object.sortBy ?? "";
4252
4284
  return message;
4253
4285
  },
4254
4286
  fromAmino(object) {
@@ -4256,11 +4288,15 @@ exports.QueryAvailableInitiativesRequest = {
4256
4288
  if (object.pagination !== undefined && object.pagination !== null) {
4257
4289
  message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
4258
4290
  }
4291
+ if (object.sort_by !== undefined && object.sort_by !== null) {
4292
+ message.sortBy = object.sort_by;
4293
+ }
4259
4294
  return message;
4260
4295
  },
4261
4296
  toAmino(message) {
4262
4297
  const obj = {};
4263
4298
  obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
4299
+ obj.sort_by = message.sortBy === "" ? undefined : message.sortBy;
4264
4300
  return obj;
4265
4301
  },
4266
4302
  fromAminoMsg(object) {
@@ -4281,15 +4317,15 @@ exports.QueryAvailableInitiativesRequest = {
4281
4317
  };
4282
4318
  function createBaseQueryAvailableInitiativesResponse() {
4283
4319
  return {
4284
- initiativeId: BigInt(0),
4285
- title: "",
4286
- tier: BigInt(0),
4287
- budget: "",
4320
+ initiatives: [],
4288
4321
  pagination: undefined
4289
4322
  };
4290
4323
  }
4291
4324
  /**
4292
4325
  * QueryAvailableInitiativesResponse defines the QueryAvailableInitiativesResponse message.
4326
+ * Prior versions declared singular initiative_id/title/tier/budget fields,
4327
+ * which could never carry more than one match; the fields were replaced (not
4328
+ * extended) because no client could have used them meaningfully.
4293
4329
  * @name QueryAvailableInitiativesResponse
4294
4330
  * @package sparkdream.rep.v1
4295
4331
  * @see proto type: sparkdream.rep.v1.QueryAvailableInitiativesResponse
@@ -4297,20 +4333,11 @@ function createBaseQueryAvailableInitiativesResponse() {
4297
4333
  exports.QueryAvailableInitiativesResponse = {
4298
4334
  typeUrl: "/sparkdream.rep.v1.QueryAvailableInitiativesResponse",
4299
4335
  encode(message, writer = binary_1.BinaryWriter.create()) {
4300
- if (message.initiativeId !== BigInt(0)) {
4301
- writer.uint32(8).uint64(message.initiativeId);
4302
- }
4303
- if (message.title !== "") {
4304
- writer.uint32(18).string(message.title);
4305
- }
4306
- if (message.tier !== BigInt(0)) {
4307
- writer.uint32(24).uint64(message.tier);
4308
- }
4309
- if (message.budget !== "") {
4310
- writer.uint32(34).string(message.budget);
4336
+ for (const v of message.initiatives) {
4337
+ initiative_1.Initiative.encode(v, writer.uint32(10).fork()).ldelim();
4311
4338
  }
4312
4339
  if (message.pagination !== undefined) {
4313
- pagination_1.PageResponse.encode(message.pagination, writer.uint32(42).fork()).ldelim();
4340
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
4314
4341
  }
4315
4342
  return writer;
4316
4343
  },
@@ -4322,18 +4349,9 @@ exports.QueryAvailableInitiativesResponse = {
4322
4349
  const tag = reader.uint32();
4323
4350
  switch (tag >>> 3) {
4324
4351
  case 1:
4325
- message.initiativeId = reader.uint64();
4352
+ message.initiatives.push(initiative_1.Initiative.decode(reader, reader.uint32()));
4326
4353
  break;
4327
4354
  case 2:
4328
- message.title = reader.string();
4329
- break;
4330
- case 3:
4331
- message.tier = reader.uint64();
4332
- break;
4333
- case 4:
4334
- message.budget = reader.string();
4335
- break;
4336
- case 5:
4337
4355
  message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
4338
4356
  break;
4339
4357
  default:
@@ -4345,27 +4363,13 @@ exports.QueryAvailableInitiativesResponse = {
4345
4363
  },
4346
4364
  fromPartial(object) {
4347
4365
  const message = createBaseQueryAvailableInitiativesResponse();
4348
- message.initiativeId = object.initiativeId !== undefined && object.initiativeId !== null ? BigInt(object.initiativeId.toString()) : BigInt(0);
4349
- message.title = object.title ?? "";
4350
- message.tier = object.tier !== undefined && object.tier !== null ? BigInt(object.tier.toString()) : BigInt(0);
4351
- message.budget = object.budget ?? "";
4366
+ message.initiatives = object.initiatives?.map(e => initiative_1.Initiative.fromPartial(e)) || [];
4352
4367
  message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
4353
4368
  return message;
4354
4369
  },
4355
4370
  fromAmino(object) {
4356
4371
  const message = createBaseQueryAvailableInitiativesResponse();
4357
- if (object.initiative_id !== undefined && object.initiative_id !== null) {
4358
- message.initiativeId = BigInt(object.initiative_id);
4359
- }
4360
- if (object.title !== undefined && object.title !== null) {
4361
- message.title = object.title;
4362
- }
4363
- if (object.tier !== undefined && object.tier !== null) {
4364
- message.tier = BigInt(object.tier);
4365
- }
4366
- if (object.budget !== undefined && object.budget !== null) {
4367
- message.budget = object.budget;
4368
- }
4372
+ message.initiatives = object.initiatives?.map(e => initiative_1.Initiative.fromAmino(e)) || [];
4369
4373
  if (object.pagination !== undefined && object.pagination !== null) {
4370
4374
  message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
4371
4375
  }
@@ -4373,10 +4377,12 @@ exports.QueryAvailableInitiativesResponse = {
4373
4377
  },
4374
4378
  toAmino(message) {
4375
4379
  const obj = {};
4376
- obj.initiative_id = message.initiativeId !== BigInt(0) ? message.initiativeId?.toString() : undefined;
4377
- obj.title = message.title === "" ? undefined : message.title;
4378
- obj.tier = message.tier !== BigInt(0) ? message.tier?.toString() : undefined;
4379
- obj.budget = message.budget === "" ? undefined : message.budget;
4380
+ if (message.initiatives) {
4381
+ obj.initiatives = message.initiatives.map(e => e ? initiative_1.Initiative.toAmino(e) : undefined);
4382
+ }
4383
+ else {
4384
+ obj.initiatives = message.initiatives;
4385
+ }
4380
4386
  obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
4381
4387
  return obj;
4382
4388
  },
@@ -4479,9 +4485,7 @@ exports.QueryStakesByStakerRequest = {
4479
4485
  };
4480
4486
  function createBaseQueryStakesByStakerResponse() {
4481
4487
  return {
4482
- stakeId: BigInt(0),
4483
- targetType: BigInt(0),
4484
- amount: "",
4488
+ stakes: [],
4485
4489
  pagination: undefined
4486
4490
  };
4487
4491
  }
@@ -4494,17 +4498,11 @@ function createBaseQueryStakesByStakerResponse() {
4494
4498
  exports.QueryStakesByStakerResponse = {
4495
4499
  typeUrl: "/sparkdream.rep.v1.QueryStakesByStakerResponse",
4496
4500
  encode(message, writer = binary_1.BinaryWriter.create()) {
4497
- if (message.stakeId !== BigInt(0)) {
4498
- writer.uint32(8).uint64(message.stakeId);
4499
- }
4500
- if (message.targetType !== BigInt(0)) {
4501
- writer.uint32(16).uint64(message.targetType);
4502
- }
4503
- if (message.amount !== "") {
4504
- writer.uint32(26).string(message.amount);
4501
+ for (const v of message.stakes) {
4502
+ stake_1.Stake.encode(v, writer.uint32(10).fork()).ldelim();
4505
4503
  }
4506
4504
  if (message.pagination !== undefined) {
4507
- pagination_1.PageResponse.encode(message.pagination, writer.uint32(34).fork()).ldelim();
4505
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
4508
4506
  }
4509
4507
  return writer;
4510
4508
  },
@@ -4516,15 +4514,9 @@ exports.QueryStakesByStakerResponse = {
4516
4514
  const tag = reader.uint32();
4517
4515
  switch (tag >>> 3) {
4518
4516
  case 1:
4519
- message.stakeId = reader.uint64();
4517
+ message.stakes.push(stake_1.Stake.decode(reader, reader.uint32()));
4520
4518
  break;
4521
4519
  case 2:
4522
- message.targetType = reader.uint64();
4523
- break;
4524
- case 3:
4525
- message.amount = reader.string();
4526
- break;
4527
- case 4:
4528
4520
  message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
4529
4521
  break;
4530
4522
  default:
@@ -4536,23 +4528,13 @@ exports.QueryStakesByStakerResponse = {
4536
4528
  },
4537
4529
  fromPartial(object) {
4538
4530
  const message = createBaseQueryStakesByStakerResponse();
4539
- message.stakeId = object.stakeId !== undefined && object.stakeId !== null ? BigInt(object.stakeId.toString()) : BigInt(0);
4540
- message.targetType = object.targetType !== undefined && object.targetType !== null ? BigInt(object.targetType.toString()) : BigInt(0);
4541
- message.amount = object.amount ?? "";
4531
+ message.stakes = object.stakes?.map(e => stake_1.Stake.fromPartial(e)) || [];
4542
4532
  message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
4543
4533
  return message;
4544
4534
  },
4545
4535
  fromAmino(object) {
4546
4536
  const message = createBaseQueryStakesByStakerResponse();
4547
- if (object.stake_id !== undefined && object.stake_id !== null) {
4548
- message.stakeId = BigInt(object.stake_id);
4549
- }
4550
- if (object.target_type !== undefined && object.target_type !== null) {
4551
- message.targetType = BigInt(object.target_type);
4552
- }
4553
- if (object.amount !== undefined && object.amount !== null) {
4554
- message.amount = object.amount;
4555
- }
4537
+ message.stakes = object.stakes?.map(e => stake_1.Stake.fromAmino(e)) || [];
4556
4538
  if (object.pagination !== undefined && object.pagination !== null) {
4557
4539
  message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
4558
4540
  }
@@ -4560,9 +4542,12 @@ exports.QueryStakesByStakerResponse = {
4560
4542
  },
4561
4543
  toAmino(message) {
4562
4544
  const obj = {};
4563
- obj.stake_id = message.stakeId !== BigInt(0) ? message.stakeId?.toString() : undefined;
4564
- obj.target_type = message.targetType !== BigInt(0) ? message.targetType?.toString() : undefined;
4565
- obj.amount = message.amount === "" ? undefined : message.amount;
4545
+ if (message.stakes) {
4546
+ obj.stakes = message.stakes.map(e => e ? stake_1.Stake.toAmino(e) : undefined);
4547
+ }
4548
+ else {
4549
+ obj.stakes = message.stakes;
4550
+ }
4566
4551
  obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
4567
4552
  return obj;
4568
4553
  },