@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.
@@ -870,7 +870,8 @@ export const QueryGetProjectResponse = {
870
870
  };
871
871
  function createBaseQueryAllProjectRequest() {
872
872
  return {
873
- pagination: undefined
873
+ pagination: undefined,
874
+ sortBy: ""
874
875
  };
875
876
  }
876
877
  /**
@@ -885,6 +886,9 @@ export const QueryAllProjectRequest = {
885
886
  if (message.pagination !== undefined) {
886
887
  PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
887
888
  }
889
+ if (message.sortBy !== "") {
890
+ writer.uint32(18).string(message.sortBy);
891
+ }
888
892
  return writer;
889
893
  },
890
894
  decode(input, length) {
@@ -897,6 +901,9 @@ export const QueryAllProjectRequest = {
897
901
  case 1:
898
902
  message.pagination = PageRequest.decode(reader, reader.uint32());
899
903
  break;
904
+ case 2:
905
+ message.sortBy = reader.string();
906
+ break;
900
907
  default:
901
908
  reader.skipType(tag & 7);
902
909
  break;
@@ -907,6 +914,7 @@ export const QueryAllProjectRequest = {
907
914
  fromPartial(object) {
908
915
  const message = createBaseQueryAllProjectRequest();
909
916
  message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
917
+ message.sortBy = object.sortBy ?? "";
910
918
  return message;
911
919
  },
912
920
  fromAmino(object) {
@@ -914,11 +922,15 @@ export const QueryAllProjectRequest = {
914
922
  if (object.pagination !== undefined && object.pagination !== null) {
915
923
  message.pagination = PageRequest.fromAmino(object.pagination);
916
924
  }
925
+ if (object.sort_by !== undefined && object.sort_by !== null) {
926
+ message.sortBy = object.sort_by;
927
+ }
917
928
  return message;
918
929
  },
919
930
  toAmino(message) {
920
931
  const obj = {};
921
932
  obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
933
+ obj.sort_by = message.sortBy === "" ? undefined : message.sortBy;
922
934
  return obj;
923
935
  },
924
936
  fromAminoMsg(object) {
@@ -1161,7 +1173,8 @@ export const QueryGetInitiativeResponse = {
1161
1173
  };
1162
1174
  function createBaseQueryAllInitiativeRequest() {
1163
1175
  return {
1164
- pagination: undefined
1176
+ pagination: undefined,
1177
+ sortBy: ""
1165
1178
  };
1166
1179
  }
1167
1180
  /**
@@ -1176,6 +1189,9 @@ export const QueryAllInitiativeRequest = {
1176
1189
  if (message.pagination !== undefined) {
1177
1190
  PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
1178
1191
  }
1192
+ if (message.sortBy !== "") {
1193
+ writer.uint32(18).string(message.sortBy);
1194
+ }
1179
1195
  return writer;
1180
1196
  },
1181
1197
  decode(input, length) {
@@ -1188,6 +1204,9 @@ export const QueryAllInitiativeRequest = {
1188
1204
  case 1:
1189
1205
  message.pagination = PageRequest.decode(reader, reader.uint32());
1190
1206
  break;
1207
+ case 2:
1208
+ message.sortBy = reader.string();
1209
+ break;
1191
1210
  default:
1192
1211
  reader.skipType(tag & 7);
1193
1212
  break;
@@ -1198,6 +1217,7 @@ export const QueryAllInitiativeRequest = {
1198
1217
  fromPartial(object) {
1199
1218
  const message = createBaseQueryAllInitiativeRequest();
1200
1219
  message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
1220
+ message.sortBy = object.sortBy ?? "";
1201
1221
  return message;
1202
1222
  },
1203
1223
  fromAmino(object) {
@@ -1205,11 +1225,15 @@ export const QueryAllInitiativeRequest = {
1205
1225
  if (object.pagination !== undefined && object.pagination !== null) {
1206
1226
  message.pagination = PageRequest.fromAmino(object.pagination);
1207
1227
  }
1228
+ if (object.sort_by !== undefined && object.sort_by !== null) {
1229
+ message.sortBy = object.sort_by;
1230
+ }
1208
1231
  return message;
1209
1232
  },
1210
1233
  toAmino(message) {
1211
1234
  const obj = {};
1212
1235
  obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
1236
+ obj.sort_by = message.sortBy === "" ? undefined : message.sortBy;
1213
1237
  return obj;
1214
1238
  },
1215
1239
  fromAminoMsg(object) {
@@ -3670,7 +3694,8 @@ export const QueryInterimsByReferenceResponse = {
3670
3694
  function createBaseQueryProjectsByCouncilRequest() {
3671
3695
  return {
3672
3696
  council: "",
3673
- pagination: undefined
3697
+ pagination: undefined,
3698
+ sortBy: ""
3674
3699
  };
3675
3700
  }
3676
3701
  /**
@@ -3688,6 +3713,9 @@ export const QueryProjectsByCouncilRequest = {
3688
3713
  if (message.pagination !== undefined) {
3689
3714
  PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
3690
3715
  }
3716
+ if (message.sortBy !== "") {
3717
+ writer.uint32(26).string(message.sortBy);
3718
+ }
3691
3719
  return writer;
3692
3720
  },
3693
3721
  decode(input, length) {
@@ -3703,6 +3731,9 @@ export const QueryProjectsByCouncilRequest = {
3703
3731
  case 2:
3704
3732
  message.pagination = PageRequest.decode(reader, reader.uint32());
3705
3733
  break;
3734
+ case 3:
3735
+ message.sortBy = reader.string();
3736
+ break;
3706
3737
  default:
3707
3738
  reader.skipType(tag & 7);
3708
3739
  break;
@@ -3714,6 +3745,7 @@ export const QueryProjectsByCouncilRequest = {
3714
3745
  const message = createBaseQueryProjectsByCouncilRequest();
3715
3746
  message.council = object.council ?? "";
3716
3747
  message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
3748
+ message.sortBy = object.sortBy ?? "";
3717
3749
  return message;
3718
3750
  },
3719
3751
  fromAmino(object) {
@@ -3724,12 +3756,16 @@ export const QueryProjectsByCouncilRequest = {
3724
3756
  if (object.pagination !== undefined && object.pagination !== null) {
3725
3757
  message.pagination = PageRequest.fromAmino(object.pagination);
3726
3758
  }
3759
+ if (object.sort_by !== undefined && object.sort_by !== null) {
3760
+ message.sortBy = object.sort_by;
3761
+ }
3727
3762
  return message;
3728
3763
  },
3729
3764
  toAmino(message) {
3730
3765
  const obj = {};
3731
3766
  obj.council = message.council === "" ? undefined : message.council;
3732
3767
  obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
3768
+ obj.sort_by = message.sortBy === "" ? undefined : message.sortBy;
3733
3769
  return obj;
3734
3770
  },
3735
3771
  fromAminoMsg(object) {
@@ -3750,14 +3786,15 @@ export const QueryProjectsByCouncilRequest = {
3750
3786
  };
3751
3787
  function createBaseQueryProjectsByCouncilResponse() {
3752
3788
  return {
3753
- projectId: BigInt(0),
3754
- name: "",
3755
- status: BigInt(0),
3789
+ projects: [],
3756
3790
  pagination: undefined
3757
3791
  };
3758
3792
  }
3759
3793
  /**
3760
3794
  * QueryProjectsByCouncilResponse defines the QueryProjectsByCouncilResponse message.
3795
+ * Prior versions declared singular project_id/name/status fields, which could
3796
+ * never carry more than one match; the fields were replaced (not extended)
3797
+ * because no client could have used them meaningfully.
3761
3798
  * @name QueryProjectsByCouncilResponse
3762
3799
  * @package sparkdream.rep.v1
3763
3800
  * @see proto type: sparkdream.rep.v1.QueryProjectsByCouncilResponse
@@ -3765,17 +3802,11 @@ function createBaseQueryProjectsByCouncilResponse() {
3765
3802
  export const QueryProjectsByCouncilResponse = {
3766
3803
  typeUrl: "/sparkdream.rep.v1.QueryProjectsByCouncilResponse",
3767
3804
  encode(message, writer = BinaryWriter.create()) {
3768
- if (message.projectId !== BigInt(0)) {
3769
- writer.uint32(8).uint64(message.projectId);
3770
- }
3771
- if (message.name !== "") {
3772
- writer.uint32(18).string(message.name);
3773
- }
3774
- if (message.status !== BigInt(0)) {
3775
- writer.uint32(24).uint64(message.status);
3805
+ for (const v of message.projects) {
3806
+ Project.encode(v, writer.uint32(10).fork()).ldelim();
3776
3807
  }
3777
3808
  if (message.pagination !== undefined) {
3778
- PageResponse.encode(message.pagination, writer.uint32(34).fork()).ldelim();
3809
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
3779
3810
  }
3780
3811
  return writer;
3781
3812
  },
@@ -3787,15 +3818,9 @@ export const QueryProjectsByCouncilResponse = {
3787
3818
  const tag = reader.uint32();
3788
3819
  switch (tag >>> 3) {
3789
3820
  case 1:
3790
- message.projectId = reader.uint64();
3821
+ message.projects.push(Project.decode(reader, reader.uint32()));
3791
3822
  break;
3792
3823
  case 2:
3793
- message.name = reader.string();
3794
- break;
3795
- case 3:
3796
- message.status = reader.uint64();
3797
- break;
3798
- case 4:
3799
3824
  message.pagination = PageResponse.decode(reader, reader.uint32());
3800
3825
  break;
3801
3826
  default:
@@ -3807,23 +3832,13 @@ export const QueryProjectsByCouncilResponse = {
3807
3832
  },
3808
3833
  fromPartial(object) {
3809
3834
  const message = createBaseQueryProjectsByCouncilResponse();
3810
- message.projectId = object.projectId !== undefined && object.projectId !== null ? BigInt(object.projectId.toString()) : BigInt(0);
3811
- message.name = object.name ?? "";
3812
- message.status = object.status !== undefined && object.status !== null ? BigInt(object.status.toString()) : BigInt(0);
3835
+ message.projects = object.projects?.map(e => Project.fromPartial(e)) || [];
3813
3836
  message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
3814
3837
  return message;
3815
3838
  },
3816
3839
  fromAmino(object) {
3817
3840
  const message = createBaseQueryProjectsByCouncilResponse();
3818
- if (object.project_id !== undefined && object.project_id !== null) {
3819
- message.projectId = BigInt(object.project_id);
3820
- }
3821
- if (object.name !== undefined && object.name !== null) {
3822
- message.name = object.name;
3823
- }
3824
- if (object.status !== undefined && object.status !== null) {
3825
- message.status = BigInt(object.status);
3826
- }
3841
+ message.projects = object.projects?.map(e => Project.fromAmino(e)) || [];
3827
3842
  if (object.pagination !== undefined && object.pagination !== null) {
3828
3843
  message.pagination = PageResponse.fromAmino(object.pagination);
3829
3844
  }
@@ -3831,9 +3846,12 @@ export const QueryProjectsByCouncilResponse = {
3831
3846
  },
3832
3847
  toAmino(message) {
3833
3848
  const obj = {};
3834
- obj.project_id = message.projectId !== BigInt(0) ? message.projectId?.toString() : undefined;
3835
- obj.name = message.name === "" ? undefined : message.name;
3836
- obj.status = message.status !== BigInt(0) ? message.status?.toString() : undefined;
3849
+ if (message.projects) {
3850
+ obj.projects = message.projects.map(e => e ? Project.toAmino(e) : undefined);
3851
+ }
3852
+ else {
3853
+ obj.projects = message.projects;
3854
+ }
3837
3855
  obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
3838
3856
  return obj;
3839
3857
  },
@@ -3856,7 +3874,8 @@ export const QueryProjectsByCouncilResponse = {
3856
3874
  function createBaseQueryInitiativesByProjectRequest() {
3857
3875
  return {
3858
3876
  projectId: BigInt(0),
3859
- pagination: undefined
3877
+ pagination: undefined,
3878
+ sortBy: ""
3860
3879
  };
3861
3880
  }
3862
3881
  /**
@@ -3874,6 +3893,9 @@ export const QueryInitiativesByProjectRequest = {
3874
3893
  if (message.pagination !== undefined) {
3875
3894
  PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
3876
3895
  }
3896
+ if (message.sortBy !== "") {
3897
+ writer.uint32(26).string(message.sortBy);
3898
+ }
3877
3899
  return writer;
3878
3900
  },
3879
3901
  decode(input, length) {
@@ -3889,6 +3911,9 @@ export const QueryInitiativesByProjectRequest = {
3889
3911
  case 2:
3890
3912
  message.pagination = PageRequest.decode(reader, reader.uint32());
3891
3913
  break;
3914
+ case 3:
3915
+ message.sortBy = reader.string();
3916
+ break;
3892
3917
  default:
3893
3918
  reader.skipType(tag & 7);
3894
3919
  break;
@@ -3900,6 +3925,7 @@ export const QueryInitiativesByProjectRequest = {
3900
3925
  const message = createBaseQueryInitiativesByProjectRequest();
3901
3926
  message.projectId = object.projectId !== undefined && object.projectId !== null ? BigInt(object.projectId.toString()) : BigInt(0);
3902
3927
  message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
3928
+ message.sortBy = object.sortBy ?? "";
3903
3929
  return message;
3904
3930
  },
3905
3931
  fromAmino(object) {
@@ -3910,12 +3936,16 @@ export const QueryInitiativesByProjectRequest = {
3910
3936
  if (object.pagination !== undefined && object.pagination !== null) {
3911
3937
  message.pagination = PageRequest.fromAmino(object.pagination);
3912
3938
  }
3939
+ if (object.sort_by !== undefined && object.sort_by !== null) {
3940
+ message.sortBy = object.sort_by;
3941
+ }
3913
3942
  return message;
3914
3943
  },
3915
3944
  toAmino(message) {
3916
3945
  const obj = {};
3917
3946
  obj.project_id = message.projectId !== BigInt(0) ? message.projectId?.toString() : undefined;
3918
3947
  obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
3948
+ obj.sort_by = message.sortBy === "" ? undefined : message.sortBy;
3919
3949
  return obj;
3920
3950
  },
3921
3951
  fromAminoMsg(object) {
@@ -4021,7 +4051,8 @@ export const QueryInitiativesByProjectResponse = {
4021
4051
  function createBaseQueryInitiativesByAssigneeRequest() {
4022
4052
  return {
4023
4053
  assignee: "",
4024
- pagination: undefined
4054
+ pagination: undefined,
4055
+ sortBy: ""
4025
4056
  };
4026
4057
  }
4027
4058
  /**
@@ -4039,6 +4070,9 @@ export const QueryInitiativesByAssigneeRequest = {
4039
4070
  if (message.pagination !== undefined) {
4040
4071
  PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
4041
4072
  }
4073
+ if (message.sortBy !== "") {
4074
+ writer.uint32(26).string(message.sortBy);
4075
+ }
4042
4076
  return writer;
4043
4077
  },
4044
4078
  decode(input, length) {
@@ -4054,6 +4088,9 @@ export const QueryInitiativesByAssigneeRequest = {
4054
4088
  case 2:
4055
4089
  message.pagination = PageRequest.decode(reader, reader.uint32());
4056
4090
  break;
4091
+ case 3:
4092
+ message.sortBy = reader.string();
4093
+ break;
4057
4094
  default:
4058
4095
  reader.skipType(tag & 7);
4059
4096
  break;
@@ -4065,6 +4102,7 @@ export const QueryInitiativesByAssigneeRequest = {
4065
4102
  const message = createBaseQueryInitiativesByAssigneeRequest();
4066
4103
  message.assignee = object.assignee ?? "";
4067
4104
  message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
4105
+ message.sortBy = object.sortBy ?? "";
4068
4106
  return message;
4069
4107
  },
4070
4108
  fromAmino(object) {
@@ -4075,12 +4113,16 @@ export const QueryInitiativesByAssigneeRequest = {
4075
4113
  if (object.pagination !== undefined && object.pagination !== null) {
4076
4114
  message.pagination = PageRequest.fromAmino(object.pagination);
4077
4115
  }
4116
+ if (object.sort_by !== undefined && object.sort_by !== null) {
4117
+ message.sortBy = object.sort_by;
4118
+ }
4078
4119
  return message;
4079
4120
  },
4080
4121
  toAmino(message) {
4081
4122
  const obj = {};
4082
4123
  obj.assignee = message.assignee === "" ? undefined : message.assignee;
4083
4124
  obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
4125
+ obj.sort_by = message.sortBy === "" ? undefined : message.sortBy;
4084
4126
  return obj;
4085
4127
  },
4086
4128
  fromAminoMsg(object) {
@@ -4101,14 +4143,15 @@ export const QueryInitiativesByAssigneeRequest = {
4101
4143
  };
4102
4144
  function createBaseQueryInitiativesByAssigneeResponse() {
4103
4145
  return {
4104
- initiativeId: BigInt(0),
4105
- title: "",
4106
- status: BigInt(0),
4146
+ initiatives: [],
4107
4147
  pagination: undefined
4108
4148
  };
4109
4149
  }
4110
4150
  /**
4111
4151
  * QueryInitiativesByAssigneeResponse defines the QueryInitiativesByAssigneeResponse message.
4152
+ * Prior versions declared singular initiative_id/title/status fields, which
4153
+ * could never carry more than one match; the fields were replaced (not
4154
+ * extended) because no client could have used them meaningfully.
4112
4155
  * @name QueryInitiativesByAssigneeResponse
4113
4156
  * @package sparkdream.rep.v1
4114
4157
  * @see proto type: sparkdream.rep.v1.QueryInitiativesByAssigneeResponse
@@ -4116,17 +4159,11 @@ function createBaseQueryInitiativesByAssigneeResponse() {
4116
4159
  export const QueryInitiativesByAssigneeResponse = {
4117
4160
  typeUrl: "/sparkdream.rep.v1.QueryInitiativesByAssigneeResponse",
4118
4161
  encode(message, writer = BinaryWriter.create()) {
4119
- if (message.initiativeId !== BigInt(0)) {
4120
- writer.uint32(8).uint64(message.initiativeId);
4121
- }
4122
- if (message.title !== "") {
4123
- writer.uint32(18).string(message.title);
4124
- }
4125
- if (message.status !== BigInt(0)) {
4126
- writer.uint32(24).uint64(message.status);
4162
+ for (const v of message.initiatives) {
4163
+ Initiative.encode(v, writer.uint32(10).fork()).ldelim();
4127
4164
  }
4128
4165
  if (message.pagination !== undefined) {
4129
- PageResponse.encode(message.pagination, writer.uint32(34).fork()).ldelim();
4166
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
4130
4167
  }
4131
4168
  return writer;
4132
4169
  },
@@ -4138,15 +4175,9 @@ export const QueryInitiativesByAssigneeResponse = {
4138
4175
  const tag = reader.uint32();
4139
4176
  switch (tag >>> 3) {
4140
4177
  case 1:
4141
- message.initiativeId = reader.uint64();
4178
+ message.initiatives.push(Initiative.decode(reader, reader.uint32()));
4142
4179
  break;
4143
4180
  case 2:
4144
- message.title = reader.string();
4145
- break;
4146
- case 3:
4147
- message.status = reader.uint64();
4148
- break;
4149
- case 4:
4150
4181
  message.pagination = PageResponse.decode(reader, reader.uint32());
4151
4182
  break;
4152
4183
  default:
@@ -4158,23 +4189,13 @@ export const QueryInitiativesByAssigneeResponse = {
4158
4189
  },
4159
4190
  fromPartial(object) {
4160
4191
  const message = createBaseQueryInitiativesByAssigneeResponse();
4161
- message.initiativeId = object.initiativeId !== undefined && object.initiativeId !== null ? BigInt(object.initiativeId.toString()) : BigInt(0);
4162
- message.title = object.title ?? "";
4163
- message.status = object.status !== undefined && object.status !== null ? BigInt(object.status.toString()) : BigInt(0);
4192
+ message.initiatives = object.initiatives?.map(e => Initiative.fromPartial(e)) || [];
4164
4193
  message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
4165
4194
  return message;
4166
4195
  },
4167
4196
  fromAmino(object) {
4168
4197
  const message = createBaseQueryInitiativesByAssigneeResponse();
4169
- if (object.initiative_id !== undefined && object.initiative_id !== null) {
4170
- message.initiativeId = BigInt(object.initiative_id);
4171
- }
4172
- if (object.title !== undefined && object.title !== null) {
4173
- message.title = object.title;
4174
- }
4175
- if (object.status !== undefined && object.status !== null) {
4176
- message.status = BigInt(object.status);
4177
- }
4198
+ message.initiatives = object.initiatives?.map(e => Initiative.fromAmino(e)) || [];
4178
4199
  if (object.pagination !== undefined && object.pagination !== null) {
4179
4200
  message.pagination = PageResponse.fromAmino(object.pagination);
4180
4201
  }
@@ -4182,9 +4203,12 @@ export const QueryInitiativesByAssigneeResponse = {
4182
4203
  },
4183
4204
  toAmino(message) {
4184
4205
  const obj = {};
4185
- obj.initiative_id = message.initiativeId !== BigInt(0) ? message.initiativeId?.toString() : undefined;
4186
- obj.title = message.title === "" ? undefined : message.title;
4187
- obj.status = message.status !== BigInt(0) ? message.status?.toString() : undefined;
4206
+ if (message.initiatives) {
4207
+ obj.initiatives = message.initiatives.map(e => e ? Initiative.toAmino(e) : undefined);
4208
+ }
4209
+ else {
4210
+ obj.initiatives = message.initiatives;
4211
+ }
4188
4212
  obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
4189
4213
  return obj;
4190
4214
  },
@@ -4206,7 +4230,8 @@ export const QueryInitiativesByAssigneeResponse = {
4206
4230
  };
4207
4231
  function createBaseQueryAvailableInitiativesRequest() {
4208
4232
  return {
4209
- pagination: undefined
4233
+ pagination: undefined,
4234
+ sortBy: ""
4210
4235
  };
4211
4236
  }
4212
4237
  /**
@@ -4221,6 +4246,9 @@ export const QueryAvailableInitiativesRequest = {
4221
4246
  if (message.pagination !== undefined) {
4222
4247
  PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
4223
4248
  }
4249
+ if (message.sortBy !== "") {
4250
+ writer.uint32(18).string(message.sortBy);
4251
+ }
4224
4252
  return writer;
4225
4253
  },
4226
4254
  decode(input, length) {
@@ -4233,6 +4261,9 @@ export const QueryAvailableInitiativesRequest = {
4233
4261
  case 1:
4234
4262
  message.pagination = PageRequest.decode(reader, reader.uint32());
4235
4263
  break;
4264
+ case 2:
4265
+ message.sortBy = reader.string();
4266
+ break;
4236
4267
  default:
4237
4268
  reader.skipType(tag & 7);
4238
4269
  break;
@@ -4243,6 +4274,7 @@ export const QueryAvailableInitiativesRequest = {
4243
4274
  fromPartial(object) {
4244
4275
  const message = createBaseQueryAvailableInitiativesRequest();
4245
4276
  message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
4277
+ message.sortBy = object.sortBy ?? "";
4246
4278
  return message;
4247
4279
  },
4248
4280
  fromAmino(object) {
@@ -4250,11 +4282,15 @@ export const QueryAvailableInitiativesRequest = {
4250
4282
  if (object.pagination !== undefined && object.pagination !== null) {
4251
4283
  message.pagination = PageRequest.fromAmino(object.pagination);
4252
4284
  }
4285
+ if (object.sort_by !== undefined && object.sort_by !== null) {
4286
+ message.sortBy = object.sort_by;
4287
+ }
4253
4288
  return message;
4254
4289
  },
4255
4290
  toAmino(message) {
4256
4291
  const obj = {};
4257
4292
  obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
4293
+ obj.sort_by = message.sortBy === "" ? undefined : message.sortBy;
4258
4294
  return obj;
4259
4295
  },
4260
4296
  fromAminoMsg(object) {
@@ -4275,15 +4311,15 @@ export const QueryAvailableInitiativesRequest = {
4275
4311
  };
4276
4312
  function createBaseQueryAvailableInitiativesResponse() {
4277
4313
  return {
4278
- initiativeId: BigInt(0),
4279
- title: "",
4280
- tier: BigInt(0),
4281
- budget: "",
4314
+ initiatives: [],
4282
4315
  pagination: undefined
4283
4316
  };
4284
4317
  }
4285
4318
  /**
4286
4319
  * QueryAvailableInitiativesResponse defines the QueryAvailableInitiativesResponse message.
4320
+ * Prior versions declared singular initiative_id/title/tier/budget fields,
4321
+ * which could never carry more than one match; the fields were replaced (not
4322
+ * extended) because no client could have used them meaningfully.
4287
4323
  * @name QueryAvailableInitiativesResponse
4288
4324
  * @package sparkdream.rep.v1
4289
4325
  * @see proto type: sparkdream.rep.v1.QueryAvailableInitiativesResponse
@@ -4291,20 +4327,11 @@ function createBaseQueryAvailableInitiativesResponse() {
4291
4327
  export const QueryAvailableInitiativesResponse = {
4292
4328
  typeUrl: "/sparkdream.rep.v1.QueryAvailableInitiativesResponse",
4293
4329
  encode(message, writer = BinaryWriter.create()) {
4294
- if (message.initiativeId !== BigInt(0)) {
4295
- writer.uint32(8).uint64(message.initiativeId);
4296
- }
4297
- if (message.title !== "") {
4298
- writer.uint32(18).string(message.title);
4299
- }
4300
- if (message.tier !== BigInt(0)) {
4301
- writer.uint32(24).uint64(message.tier);
4302
- }
4303
- if (message.budget !== "") {
4304
- writer.uint32(34).string(message.budget);
4330
+ for (const v of message.initiatives) {
4331
+ Initiative.encode(v, writer.uint32(10).fork()).ldelim();
4305
4332
  }
4306
4333
  if (message.pagination !== undefined) {
4307
- PageResponse.encode(message.pagination, writer.uint32(42).fork()).ldelim();
4334
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
4308
4335
  }
4309
4336
  return writer;
4310
4337
  },
@@ -4316,18 +4343,9 @@ export const QueryAvailableInitiativesResponse = {
4316
4343
  const tag = reader.uint32();
4317
4344
  switch (tag >>> 3) {
4318
4345
  case 1:
4319
- message.initiativeId = reader.uint64();
4346
+ message.initiatives.push(Initiative.decode(reader, reader.uint32()));
4320
4347
  break;
4321
4348
  case 2:
4322
- message.title = reader.string();
4323
- break;
4324
- case 3:
4325
- message.tier = reader.uint64();
4326
- break;
4327
- case 4:
4328
- message.budget = reader.string();
4329
- break;
4330
- case 5:
4331
4349
  message.pagination = PageResponse.decode(reader, reader.uint32());
4332
4350
  break;
4333
4351
  default:
@@ -4339,27 +4357,13 @@ export const QueryAvailableInitiativesResponse = {
4339
4357
  },
4340
4358
  fromPartial(object) {
4341
4359
  const message = createBaseQueryAvailableInitiativesResponse();
4342
- message.initiativeId = object.initiativeId !== undefined && object.initiativeId !== null ? BigInt(object.initiativeId.toString()) : BigInt(0);
4343
- message.title = object.title ?? "";
4344
- message.tier = object.tier !== undefined && object.tier !== null ? BigInt(object.tier.toString()) : BigInt(0);
4345
- message.budget = object.budget ?? "";
4360
+ message.initiatives = object.initiatives?.map(e => Initiative.fromPartial(e)) || [];
4346
4361
  message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
4347
4362
  return message;
4348
4363
  },
4349
4364
  fromAmino(object) {
4350
4365
  const message = createBaseQueryAvailableInitiativesResponse();
4351
- if (object.initiative_id !== undefined && object.initiative_id !== null) {
4352
- message.initiativeId = BigInt(object.initiative_id);
4353
- }
4354
- if (object.title !== undefined && object.title !== null) {
4355
- message.title = object.title;
4356
- }
4357
- if (object.tier !== undefined && object.tier !== null) {
4358
- message.tier = BigInt(object.tier);
4359
- }
4360
- if (object.budget !== undefined && object.budget !== null) {
4361
- message.budget = object.budget;
4362
- }
4366
+ message.initiatives = object.initiatives?.map(e => Initiative.fromAmino(e)) || [];
4363
4367
  if (object.pagination !== undefined && object.pagination !== null) {
4364
4368
  message.pagination = PageResponse.fromAmino(object.pagination);
4365
4369
  }
@@ -4367,10 +4371,12 @@ export const QueryAvailableInitiativesResponse = {
4367
4371
  },
4368
4372
  toAmino(message) {
4369
4373
  const obj = {};
4370
- obj.initiative_id = message.initiativeId !== BigInt(0) ? message.initiativeId?.toString() : undefined;
4371
- obj.title = message.title === "" ? undefined : message.title;
4372
- obj.tier = message.tier !== BigInt(0) ? message.tier?.toString() : undefined;
4373
- obj.budget = message.budget === "" ? undefined : message.budget;
4374
+ if (message.initiatives) {
4375
+ obj.initiatives = message.initiatives.map(e => e ? Initiative.toAmino(e) : undefined);
4376
+ }
4377
+ else {
4378
+ obj.initiatives = message.initiatives;
4379
+ }
4374
4380
  obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
4375
4381
  return obj;
4376
4382
  },
@@ -4473,9 +4479,7 @@ export const QueryStakesByStakerRequest = {
4473
4479
  };
4474
4480
  function createBaseQueryStakesByStakerResponse() {
4475
4481
  return {
4476
- stakeId: BigInt(0),
4477
- targetType: BigInt(0),
4478
- amount: "",
4482
+ stakes: [],
4479
4483
  pagination: undefined
4480
4484
  };
4481
4485
  }
@@ -4488,17 +4492,11 @@ function createBaseQueryStakesByStakerResponse() {
4488
4492
  export const QueryStakesByStakerResponse = {
4489
4493
  typeUrl: "/sparkdream.rep.v1.QueryStakesByStakerResponse",
4490
4494
  encode(message, writer = BinaryWriter.create()) {
4491
- if (message.stakeId !== BigInt(0)) {
4492
- writer.uint32(8).uint64(message.stakeId);
4493
- }
4494
- if (message.targetType !== BigInt(0)) {
4495
- writer.uint32(16).uint64(message.targetType);
4496
- }
4497
- if (message.amount !== "") {
4498
- writer.uint32(26).string(message.amount);
4495
+ for (const v of message.stakes) {
4496
+ Stake.encode(v, writer.uint32(10).fork()).ldelim();
4499
4497
  }
4500
4498
  if (message.pagination !== undefined) {
4501
- PageResponse.encode(message.pagination, writer.uint32(34).fork()).ldelim();
4499
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
4502
4500
  }
4503
4501
  return writer;
4504
4502
  },
@@ -4510,15 +4508,9 @@ export const QueryStakesByStakerResponse = {
4510
4508
  const tag = reader.uint32();
4511
4509
  switch (tag >>> 3) {
4512
4510
  case 1:
4513
- message.stakeId = reader.uint64();
4511
+ message.stakes.push(Stake.decode(reader, reader.uint32()));
4514
4512
  break;
4515
4513
  case 2:
4516
- message.targetType = reader.uint64();
4517
- break;
4518
- case 3:
4519
- message.amount = reader.string();
4520
- break;
4521
- case 4:
4522
4514
  message.pagination = PageResponse.decode(reader, reader.uint32());
4523
4515
  break;
4524
4516
  default:
@@ -4530,23 +4522,13 @@ export const QueryStakesByStakerResponse = {
4530
4522
  },
4531
4523
  fromPartial(object) {
4532
4524
  const message = createBaseQueryStakesByStakerResponse();
4533
- message.stakeId = object.stakeId !== undefined && object.stakeId !== null ? BigInt(object.stakeId.toString()) : BigInt(0);
4534
- message.targetType = object.targetType !== undefined && object.targetType !== null ? BigInt(object.targetType.toString()) : BigInt(0);
4535
- message.amount = object.amount ?? "";
4525
+ message.stakes = object.stakes?.map(e => Stake.fromPartial(e)) || [];
4536
4526
  message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
4537
4527
  return message;
4538
4528
  },
4539
4529
  fromAmino(object) {
4540
4530
  const message = createBaseQueryStakesByStakerResponse();
4541
- if (object.stake_id !== undefined && object.stake_id !== null) {
4542
- message.stakeId = BigInt(object.stake_id);
4543
- }
4544
- if (object.target_type !== undefined && object.target_type !== null) {
4545
- message.targetType = BigInt(object.target_type);
4546
- }
4547
- if (object.amount !== undefined && object.amount !== null) {
4548
- message.amount = object.amount;
4549
- }
4531
+ message.stakes = object.stakes?.map(e => Stake.fromAmino(e)) || [];
4550
4532
  if (object.pagination !== undefined && object.pagination !== null) {
4551
4533
  message.pagination = PageResponse.fromAmino(object.pagination);
4552
4534
  }
@@ -4554,9 +4536,12 @@ export const QueryStakesByStakerResponse = {
4554
4536
  },
4555
4537
  toAmino(message) {
4556
4538
  const obj = {};
4557
- obj.stake_id = message.stakeId !== BigInt(0) ? message.stakeId?.toString() : undefined;
4558
- obj.target_type = message.targetType !== BigInt(0) ? message.targetType?.toString() : undefined;
4559
- obj.amount = message.amount === "" ? undefined : message.amount;
4539
+ if (message.stakes) {
4540
+ obj.stakes = message.stakes.map(e => e ? Stake.toAmino(e) : undefined);
4541
+ }
4542
+ else {
4543
+ obj.stakes = message.stakes;
4544
+ }
4560
4545
  obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
4561
4546
  return obj;
4562
4547
  },