@sparkdreamnft/sparkdreamjs 0.0.31 → 0.0.32

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.
@@ -20,7 +20,8 @@ function createBaseGenesisState() {
20
20
  categoryMap: [],
21
21
  nextCategoryId: BigInt(0),
22
22
  recurringSpends: [],
23
- nextRecurringSpendId: BigInt(0)
23
+ nextRecurringSpendId: BigInt(0),
24
+ foundingMembers: []
24
25
  };
25
26
  }
26
27
  /**
@@ -74,6 +75,9 @@ export const GenesisState = {
74
75
  if (message.nextRecurringSpendId !== BigInt(0)) {
75
76
  writer.uint32(112).uint64(message.nextRecurringSpendId);
76
77
  }
78
+ for (const v of message.foundingMembers) {
79
+ FoundingMember.encode(v, writer.uint32(122).fork()).ldelim();
80
+ }
77
81
  return writer;
78
82
  },
79
83
  decode(input, length) {
@@ -125,6 +129,9 @@ export const GenesisState = {
125
129
  case 14:
126
130
  message.nextRecurringSpendId = reader.uint64();
127
131
  break;
132
+ case 15:
133
+ message.foundingMembers.push(FoundingMember.decode(reader, reader.uint32()));
134
+ break;
128
135
  default:
129
136
  reader.skipType(tag & 7);
130
137
  break;
@@ -148,6 +155,7 @@ export const GenesisState = {
148
155
  message.nextCategoryId = object.nextCategoryId !== undefined && object.nextCategoryId !== null ? BigInt(object.nextCategoryId.toString()) : BigInt(0);
149
156
  message.recurringSpends = object.recurringSpends?.map(e => RecurringSpend.fromPartial(e)) || [];
150
157
  message.nextRecurringSpendId = object.nextRecurringSpendId !== undefined && object.nextRecurringSpendId !== null ? BigInt(object.nextRecurringSpendId.toString()) : BigInt(0);
158
+ message.foundingMembers = object.foundingMembers?.map(e => FoundingMember.fromPartial(e)) || [];
151
159
  return message;
152
160
  },
153
161
  fromAmino(object) {
@@ -176,6 +184,7 @@ export const GenesisState = {
176
184
  if (object.next_recurring_spend_id !== undefined && object.next_recurring_spend_id !== null) {
177
185
  message.nextRecurringSpendId = BigInt(object.next_recurring_spend_id);
178
186
  }
187
+ message.foundingMembers = object.founding_members?.map(e => FoundingMember.fromAmino(e)) || [];
179
188
  return message;
180
189
  },
181
190
  toAmino(message) {
@@ -239,6 +248,12 @@ export const GenesisState = {
239
248
  obj.recurring_spends = message.recurringSpends;
240
249
  }
241
250
  obj.next_recurring_spend_id = message.nextRecurringSpendId !== BigInt(0) ? message.nextRecurringSpendId?.toString() : undefined;
251
+ if (message.foundingMembers) {
252
+ obj.founding_members = message.foundingMembers.map(e => e ? FoundingMember.toAmino(e) : undefined);
253
+ }
254
+ else {
255
+ obj.founding_members = message.foundingMembers;
256
+ }
242
257
  return obj;
243
258
  },
244
259
  fromAminoMsg(object) {
@@ -257,6 +272,118 @@ export const GenesisState = {
257
272
  };
258
273
  }
259
274
  };
275
+ function createBaseFoundingMember() {
276
+ return {
277
+ address: "",
278
+ displayName: "",
279
+ handles: [],
280
+ founder: false
281
+ };
282
+ }
283
+ /**
284
+ * FoundingMember is one governance founding member for the InitGenesis
285
+ * bootstrap: a seat on the founding councils, a seeded x/name display name,
286
+ * and optionally pre-claimed x/name handles (first handle becomes primary).
287
+ * Exactly one entry must set founder=true; that account additionally anchors
288
+ * the Technical and Ecosystem councils and their committees.
289
+ * @name FoundingMember
290
+ * @package sparkdream.commons.v1
291
+ * @see proto type: sparkdream.commons.v1.FoundingMember
292
+ */
293
+ export const FoundingMember = {
294
+ typeUrl: "/sparkdream.commons.v1.FoundingMember",
295
+ encode(message, writer = BinaryWriter.create()) {
296
+ if (message.address !== "") {
297
+ writer.uint32(10).string(message.address);
298
+ }
299
+ if (message.displayName !== "") {
300
+ writer.uint32(18).string(message.displayName);
301
+ }
302
+ for (const v of message.handles) {
303
+ writer.uint32(26).string(v);
304
+ }
305
+ if (message.founder === true) {
306
+ writer.uint32(32).bool(message.founder);
307
+ }
308
+ return writer;
309
+ },
310
+ decode(input, length) {
311
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
312
+ let end = length === undefined ? reader.len : reader.pos + length;
313
+ const message = createBaseFoundingMember();
314
+ while (reader.pos < end) {
315
+ const tag = reader.uint32();
316
+ switch (tag >>> 3) {
317
+ case 1:
318
+ message.address = reader.string();
319
+ break;
320
+ case 2:
321
+ message.displayName = reader.string();
322
+ break;
323
+ case 3:
324
+ message.handles.push(reader.string());
325
+ break;
326
+ case 4:
327
+ message.founder = reader.bool();
328
+ break;
329
+ default:
330
+ reader.skipType(tag & 7);
331
+ break;
332
+ }
333
+ }
334
+ return message;
335
+ },
336
+ fromPartial(object) {
337
+ const message = createBaseFoundingMember();
338
+ message.address = object.address ?? "";
339
+ message.displayName = object.displayName ?? "";
340
+ message.handles = object.handles?.map(e => e) || [];
341
+ message.founder = object.founder ?? false;
342
+ return message;
343
+ },
344
+ fromAmino(object) {
345
+ const message = createBaseFoundingMember();
346
+ if (object.address !== undefined && object.address !== null) {
347
+ message.address = object.address;
348
+ }
349
+ if (object.display_name !== undefined && object.display_name !== null) {
350
+ message.displayName = object.display_name;
351
+ }
352
+ message.handles = object.handles?.map(e => e) || [];
353
+ if (object.founder !== undefined && object.founder !== null) {
354
+ message.founder = object.founder;
355
+ }
356
+ return message;
357
+ },
358
+ toAmino(message) {
359
+ const obj = {};
360
+ obj.address = message.address === "" ? undefined : message.address;
361
+ obj.display_name = message.displayName === "" ? undefined : message.displayName;
362
+ if (message.handles) {
363
+ obj.handles = message.handles.map(e => e);
364
+ }
365
+ else {
366
+ obj.handles = message.handles;
367
+ }
368
+ obj.founder = message.founder === false ? undefined : message.founder;
369
+ return obj;
370
+ },
371
+ fromAminoMsg(object) {
372
+ return FoundingMember.fromAmino(object.value);
373
+ },
374
+ fromProtoMsg(message) {
375
+ return FoundingMember.decode(message.value);
376
+ },
377
+ toProto(message) {
378
+ return FoundingMember.encode(message).finish();
379
+ },
380
+ toProtoMsg(message) {
381
+ return {
382
+ typeUrl: "/sparkdream.commons.v1.FoundingMember",
383
+ value: FoundingMember.encode(message).finish()
384
+ };
385
+ }
386
+ };
260
387
  function createBaseCouncilMembers() {
261
388
  return {
262
389
  councilName: "",
@@ -219,7 +219,8 @@ function createBaseInitiative() {
219
219
  status: 0,
220
220
  createdAt: BigInt(0),
221
221
  completedAt: BigInt(0),
222
- propagatedConviction: ""
222
+ propagatedConviction: "",
223
+ selfAssignBond: ""
223
224
  };
224
225
  }
225
226
  /**
@@ -306,6 +307,9 @@ export const Initiative = {
306
307
  if (message.propagatedConviction !== "") {
307
308
  writer.uint32(202).string(Decimal.fromUserInput(message.propagatedConviction, 18).atomics);
308
309
  }
310
+ if (message.selfAssignBond !== "") {
311
+ writer.uint32(210).string(message.selfAssignBond);
312
+ }
309
313
  return writer;
310
314
  },
311
315
  decode(input, length) {
@@ -390,6 +394,9 @@ export const Initiative = {
390
394
  case 25:
391
395
  message.propagatedConviction = Decimal.fromAtomics(reader.string(), 18).toString();
392
396
  break;
397
+ case 26:
398
+ message.selfAssignBond = reader.string();
399
+ break;
393
400
  default:
394
401
  reader.skipType(tag & 7);
395
402
  break;
@@ -424,6 +431,7 @@ export const Initiative = {
424
431
  message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? BigInt(object.createdAt.toString()) : BigInt(0);
425
432
  message.completedAt = object.completedAt !== undefined && object.completedAt !== null ? BigInt(object.completedAt.toString()) : BigInt(0);
426
433
  message.propagatedConviction = object.propagatedConviction ?? "";
434
+ message.selfAssignBond = object.selfAssignBond ?? "";
427
435
  return message;
428
436
  },
429
437
  fromAmino(object) {
@@ -499,6 +507,9 @@ export const Initiative = {
499
507
  if (object.propagated_conviction !== undefined && object.propagated_conviction !== null) {
500
508
  message.propagatedConviction = object.propagated_conviction;
501
509
  }
510
+ if (object.self_assign_bond !== undefined && object.self_assign_bond !== null) {
511
+ message.selfAssignBond = object.self_assign_bond;
512
+ }
502
513
  return message;
503
514
  },
504
515
  toAmino(message) {
@@ -538,6 +549,7 @@ export const Initiative = {
538
549
  obj.created_at = message.createdAt !== BigInt(0) ? message.createdAt?.toString() : undefined;
539
550
  obj.completed_at = message.completedAt !== BigInt(0) ? message.completedAt?.toString() : undefined;
540
551
  obj.propagated_conviction = message.propagatedConviction === "" ? undefined : message.propagatedConviction;
552
+ obj.self_assign_bond = message.selfAssignBond === "" ? undefined : message.selfAssignBond;
541
553
  return obj;
542
554
  },
543
555
  fromAminoMsg(object) {
@@ -411,7 +411,10 @@ function createBaseParams() {
411
411
  maxDreamMintPerEpoch: "",
412
412
  maxProjectRequestedBudget: "",
413
413
  maxProjectRequestedSpark: "",
414
- proposedProjectExpiryBlocks: BigInt(0)
414
+ proposedProjectExpiryBlocks: BigInt(0),
415
+ selfAssignedBondRate: "",
416
+ selfAssignedExternalConvictionRatio: "",
417
+ selfAssignedChallengeMultiplier: BigInt(0)
415
418
  };
416
419
  }
417
420
  /**
@@ -697,6 +700,15 @@ export const Params = {
697
700
  if (message.proposedProjectExpiryBlocks !== BigInt(0)) {
698
701
  writer.uint32(720).int64(message.proposedProjectExpiryBlocks);
699
702
  }
703
+ if (message.selfAssignedBondRate !== "") {
704
+ writer.uint32(738).string(Decimal.fromUserInput(message.selfAssignedBondRate, 18).atomics);
705
+ }
706
+ if (message.selfAssignedExternalConvictionRatio !== "") {
707
+ writer.uint32(746).string(Decimal.fromUserInput(message.selfAssignedExternalConvictionRatio, 18).atomics);
708
+ }
709
+ if (message.selfAssignedChallengeMultiplier !== BigInt(0)) {
710
+ writer.uint32(752).int64(message.selfAssignedChallengeMultiplier);
711
+ }
700
712
  return writer;
701
713
  },
702
714
  decode(input, length) {
@@ -979,6 +991,15 @@ export const Params = {
979
991
  case 90:
980
992
  message.proposedProjectExpiryBlocks = reader.int64();
981
993
  break;
994
+ case 92:
995
+ message.selfAssignedBondRate = Decimal.fromAtomics(reader.string(), 18).toString();
996
+ break;
997
+ case 93:
998
+ message.selfAssignedExternalConvictionRatio = Decimal.fromAtomics(reader.string(), 18).toString();
999
+ break;
1000
+ case 94:
1001
+ message.selfAssignedChallengeMultiplier = reader.int64();
1002
+ break;
982
1003
  default:
983
1004
  reader.skipType(tag & 7);
984
1005
  break;
@@ -1079,6 +1100,9 @@ export const Params = {
1079
1100
  message.maxProjectRequestedBudget = object.maxProjectRequestedBudget ?? "";
1080
1101
  message.maxProjectRequestedSpark = object.maxProjectRequestedSpark ?? "";
1081
1102
  message.proposedProjectExpiryBlocks = object.proposedProjectExpiryBlocks !== undefined && object.proposedProjectExpiryBlocks !== null ? BigInt(object.proposedProjectExpiryBlocks.toString()) : BigInt(0);
1103
+ message.selfAssignedBondRate = object.selfAssignedBondRate ?? "";
1104
+ message.selfAssignedExternalConvictionRatio = object.selfAssignedExternalConvictionRatio ?? "";
1105
+ message.selfAssignedChallengeMultiplier = object.selfAssignedChallengeMultiplier !== undefined && object.selfAssignedChallengeMultiplier !== null ? BigInt(object.selfAssignedChallengeMultiplier.toString()) : BigInt(0);
1082
1106
  return message;
1083
1107
  },
1084
1108
  fromAmino(object) {
@@ -1356,6 +1380,15 @@ export const Params = {
1356
1380
  if (object.proposed_project_expiry_blocks !== undefined && object.proposed_project_expiry_blocks !== null) {
1357
1381
  message.proposedProjectExpiryBlocks = BigInt(object.proposed_project_expiry_blocks);
1358
1382
  }
1383
+ if (object.self_assigned_bond_rate !== undefined && object.self_assigned_bond_rate !== null) {
1384
+ message.selfAssignedBondRate = object.self_assigned_bond_rate;
1385
+ }
1386
+ if (object.self_assigned_external_conviction_ratio !== undefined && object.self_assigned_external_conviction_ratio !== null) {
1387
+ message.selfAssignedExternalConvictionRatio = object.self_assigned_external_conviction_ratio;
1388
+ }
1389
+ if (object.self_assigned_challenge_multiplier !== undefined && object.self_assigned_challenge_multiplier !== null) {
1390
+ message.selfAssignedChallengeMultiplier = BigInt(object.self_assigned_challenge_multiplier);
1391
+ }
1359
1392
  return message;
1360
1393
  },
1361
1394
  toAmino(message) {
@@ -1451,6 +1484,9 @@ export const Params = {
1451
1484
  obj.max_project_requested_budget = message.maxProjectRequestedBudget === "" ? undefined : message.maxProjectRequestedBudget;
1452
1485
  obj.max_project_requested_spark = message.maxProjectRequestedSpark === "" ? undefined : message.maxProjectRequestedSpark;
1453
1486
  obj.proposed_project_expiry_blocks = message.proposedProjectExpiryBlocks !== BigInt(0) ? message.proposedProjectExpiryBlocks?.toString() : undefined;
1487
+ obj.self_assigned_bond_rate = message.selfAssignedBondRate === "" ? undefined : message.selfAssignedBondRate;
1488
+ obj.self_assigned_external_conviction_ratio = message.selfAssignedExternalConvictionRatio === "" ? undefined : message.selfAssignedExternalConvictionRatio;
1489
+ obj.self_assigned_challenge_multiplier = message.selfAssignedChallengeMultiplier !== BigInt(0) ? message.selfAssignedChallengeMultiplier?.toString() : undefined;
1454
1490
  return obj;
1455
1491
  },
1456
1492
  fromAminoMsg(object) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sparkdreamnft/sparkdreamjs",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "author": "kob <kob@sparkdream.io>",
5
5
  "description": "Spark Dream blockchain TypeScript library",
6
6
  "main": "index.js",
@@ -5408,6 +5408,18 @@ export declare namespace sparkdream {
5408
5408
  toProto(message: _375.GenesisState): Uint8Array;
5409
5409
  toProtoMsg(message: _375.GenesisState): _375.GenesisStateProtoMsg;
5410
5410
  };
5411
+ FoundingMember: {
5412
+ typeUrl: string;
5413
+ encode(message: _375.FoundingMember, writer?: import("..").BinaryWriter): import("..").BinaryWriter;
5414
+ decode(input: import("..").BinaryReader | Uint8Array, length?: number): _375.FoundingMember;
5415
+ fromPartial(object: import("../helpers").DeepPartial<_375.FoundingMember>): _375.FoundingMember;
5416
+ fromAmino(object: _375.FoundingMemberAmino): _375.FoundingMember;
5417
+ toAmino(message: _375.FoundingMember): _375.FoundingMemberAmino;
5418
+ fromAminoMsg(object: _375.FoundingMemberAminoMsg): _375.FoundingMember;
5419
+ fromProtoMsg(message: _375.FoundingMemberProtoMsg): _375.FoundingMember;
5420
+ toProto(message: _375.FoundingMember): Uint8Array;
5421
+ toProtoMsg(message: _375.FoundingMember): _375.FoundingMemberProtoMsg;
5422
+ };
5411
5423
  CouncilMembers: {
5412
5424
  typeUrl: string;
5413
5425
  encode(message: _375.CouncilMembers, writer?: import("..").BinaryWriter): import("..").BinaryWriter;
@@ -62,6 +62,17 @@ export interface GenesisState {
62
62
  * next_recurring_spend_id is the next auto-increment recurring spend ID.
63
63
  */
64
64
  nextRecurringSpendId: bigint;
65
+ /**
66
+ * founding_members overrides the build's compiled-in genesis founders
67
+ * (GenesisNames / GenesisHandles / FounderName) when non-empty, so a chain
68
+ * launched from a shared build can bootstrap governance around its own
69
+ * accounts. Empty means: use the build's founders. Consumed by the
70
+ * governance bootstrap at InitGenesis and intentionally not exported: an
71
+ * exported chain already carries its bootstrapped councils in group_map /
72
+ * council_members, and the bootstrap's early return (no founder accounts
73
+ * in the auth store) keeps a re-import from re-running it.
74
+ */
75
+ foundingMembers: FoundingMember[];
65
76
  }
66
77
  export interface GenesisStateProtoMsg {
67
78
  typeUrl: "/sparkdream.commons.v1.GenesisState";
@@ -124,11 +135,92 @@ export interface GenesisStateAmino {
124
135
  * next_recurring_spend_id is the next auto-increment recurring spend ID.
125
136
  */
126
137
  next_recurring_spend_id?: string;
138
+ /**
139
+ * founding_members overrides the build's compiled-in genesis founders
140
+ * (GenesisNames / GenesisHandles / FounderName) when non-empty, so a chain
141
+ * launched from a shared build can bootstrap governance around its own
142
+ * accounts. Empty means: use the build's founders. Consumed by the
143
+ * governance bootstrap at InitGenesis and intentionally not exported: an
144
+ * exported chain already carries its bootstrapped councils in group_map /
145
+ * council_members, and the bootstrap's early return (no founder accounts
146
+ * in the auth store) keeps a re-import from re-running it.
147
+ */
148
+ founding_members?: FoundingMemberAmino[];
127
149
  }
128
150
  export interface GenesisStateAminoMsg {
129
151
  type: "/sparkdream.commons.v1.GenesisState";
130
152
  value: GenesisStateAmino;
131
153
  }
154
+ /**
155
+ * FoundingMember is one governance founding member for the InitGenesis
156
+ * bootstrap: a seat on the founding councils, a seeded x/name display name,
157
+ * and optionally pre-claimed x/name handles (first handle becomes primary).
158
+ * Exactly one entry must set founder=true; that account additionally anchors
159
+ * the Technical and Ecosystem councils and their committees.
160
+ * @name FoundingMember
161
+ * @package sparkdream.commons.v1
162
+ * @see proto type: sparkdream.commons.v1.FoundingMember
163
+ */
164
+ export interface FoundingMember {
165
+ /**
166
+ * address is the member's bech32 account address. The account must exist
167
+ * in the auth genesis state or the bootstrap skips it.
168
+ */
169
+ address: string;
170
+ /**
171
+ * display_name is seeded as the x/name OwnerInfo display name and recorded
172
+ * as membership metadata.
173
+ */
174
+ displayName: string;
175
+ /**
176
+ * handles are x/name handles claimed for this address at genesis; the
177
+ * first one becomes the primary handle.
178
+ */
179
+ handles: string[];
180
+ /**
181
+ * founder marks the single founder account.
182
+ */
183
+ founder: boolean;
184
+ }
185
+ export interface FoundingMemberProtoMsg {
186
+ typeUrl: "/sparkdream.commons.v1.FoundingMember";
187
+ value: Uint8Array;
188
+ }
189
+ /**
190
+ * FoundingMember is one governance founding member for the InitGenesis
191
+ * bootstrap: a seat on the founding councils, a seeded x/name display name,
192
+ * and optionally pre-claimed x/name handles (first handle becomes primary).
193
+ * Exactly one entry must set founder=true; that account additionally anchors
194
+ * the Technical and Ecosystem councils and their committees.
195
+ * @name FoundingMemberAmino
196
+ * @package sparkdream.commons.v1
197
+ * @see proto type: sparkdream.commons.v1.FoundingMember
198
+ */
199
+ export interface FoundingMemberAmino {
200
+ /**
201
+ * address is the member's bech32 account address. The account must exist
202
+ * in the auth genesis state or the bootstrap skips it.
203
+ */
204
+ address?: string;
205
+ /**
206
+ * display_name is seeded as the x/name OwnerInfo display name and recorded
207
+ * as membership metadata.
208
+ */
209
+ display_name?: string;
210
+ /**
211
+ * handles are x/name handles claimed for this address at genesis; the
212
+ * first one becomes the primary handle.
213
+ */
214
+ handles?: string[];
215
+ /**
216
+ * founder marks the single founder account.
217
+ */
218
+ founder?: boolean;
219
+ }
220
+ export interface FoundingMemberAminoMsg {
221
+ type: "/sparkdream.commons.v1.FoundingMember";
222
+ value: FoundingMemberAmino;
223
+ }
132
224
  /**
133
225
  * CouncilMembers groups members by council name for genesis export.
134
226
  * @name CouncilMembers
@@ -259,6 +351,28 @@ export declare const GenesisState: {
259
351
  toProto(message: GenesisState): Uint8Array;
260
352
  toProtoMsg(message: GenesisState): GenesisStateProtoMsg;
261
353
  };
354
+ /**
355
+ * FoundingMember is one governance founding member for the InitGenesis
356
+ * bootstrap: a seat on the founding councils, a seeded x/name display name,
357
+ * and optionally pre-claimed x/name handles (first handle becomes primary).
358
+ * Exactly one entry must set founder=true; that account additionally anchors
359
+ * the Technical and Ecosystem councils and their committees.
360
+ * @name FoundingMember
361
+ * @package sparkdream.commons.v1
362
+ * @see proto type: sparkdream.commons.v1.FoundingMember
363
+ */
364
+ export declare const FoundingMember: {
365
+ typeUrl: string;
366
+ encode(message: FoundingMember, writer?: BinaryWriter): BinaryWriter;
367
+ decode(input: BinaryReader | Uint8Array, length?: number): FoundingMember;
368
+ fromPartial(object: DeepPartial<FoundingMember>): FoundingMember;
369
+ fromAmino(object: FoundingMemberAmino): FoundingMember;
370
+ toAmino(message: FoundingMember): FoundingMemberAmino;
371
+ fromAminoMsg(object: FoundingMemberAminoMsg): FoundingMember;
372
+ fromProtoMsg(message: FoundingMemberProtoMsg): FoundingMember;
373
+ toProto(message: FoundingMember): Uint8Array;
374
+ toProtoMsg(message: FoundingMember): FoundingMemberProtoMsg;
375
+ };
262
376
  /**
263
377
  * CouncilMembers groups members by council name for genesis export.
264
378
  * @name CouncilMembers
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProposalVotes = exports.PolicyVersionEntry = exports.PolicyWithAddress = exports.CouncilMembers = exports.GenesisState = void 0;
3
+ exports.ProposalVotes = exports.PolicyVersionEntry = exports.PolicyWithAddress = exports.CouncilMembers = exports.FoundingMember = exports.GenesisState = void 0;
4
4
  //@ts-nocheck
5
5
  const params_1 = require("./params");
6
6
  const policy_permissions_1 = require("./policy_permissions");
@@ -23,7 +23,8 @@ function createBaseGenesisState() {
23
23
  categoryMap: [],
24
24
  nextCategoryId: BigInt(0),
25
25
  recurringSpends: [],
26
- nextRecurringSpendId: BigInt(0)
26
+ nextRecurringSpendId: BigInt(0),
27
+ foundingMembers: []
27
28
  };
28
29
  }
29
30
  /**
@@ -77,6 +78,9 @@ exports.GenesisState = {
77
78
  if (message.nextRecurringSpendId !== BigInt(0)) {
78
79
  writer.uint32(112).uint64(message.nextRecurringSpendId);
79
80
  }
81
+ for (const v of message.foundingMembers) {
82
+ exports.FoundingMember.encode(v, writer.uint32(122).fork()).ldelim();
83
+ }
80
84
  return writer;
81
85
  },
82
86
  decode(input, length) {
@@ -128,6 +132,9 @@ exports.GenesisState = {
128
132
  case 14:
129
133
  message.nextRecurringSpendId = reader.uint64();
130
134
  break;
135
+ case 15:
136
+ message.foundingMembers.push(exports.FoundingMember.decode(reader, reader.uint32()));
137
+ break;
131
138
  default:
132
139
  reader.skipType(tag & 7);
133
140
  break;
@@ -151,6 +158,7 @@ exports.GenesisState = {
151
158
  message.nextCategoryId = object.nextCategoryId !== undefined && object.nextCategoryId !== null ? BigInt(object.nextCategoryId.toString()) : BigInt(0);
152
159
  message.recurringSpends = object.recurringSpends?.map(e => recurring_spend_1.RecurringSpend.fromPartial(e)) || [];
153
160
  message.nextRecurringSpendId = object.nextRecurringSpendId !== undefined && object.nextRecurringSpendId !== null ? BigInt(object.nextRecurringSpendId.toString()) : BigInt(0);
161
+ message.foundingMembers = object.foundingMembers?.map(e => exports.FoundingMember.fromPartial(e)) || [];
154
162
  return message;
155
163
  },
156
164
  fromAmino(object) {
@@ -179,6 +187,7 @@ exports.GenesisState = {
179
187
  if (object.next_recurring_spend_id !== undefined && object.next_recurring_spend_id !== null) {
180
188
  message.nextRecurringSpendId = BigInt(object.next_recurring_spend_id);
181
189
  }
190
+ message.foundingMembers = object.founding_members?.map(e => exports.FoundingMember.fromAmino(e)) || [];
182
191
  return message;
183
192
  },
184
193
  toAmino(message) {
@@ -242,6 +251,12 @@ exports.GenesisState = {
242
251
  obj.recurring_spends = message.recurringSpends;
243
252
  }
244
253
  obj.next_recurring_spend_id = message.nextRecurringSpendId !== BigInt(0) ? message.nextRecurringSpendId?.toString() : undefined;
254
+ if (message.foundingMembers) {
255
+ obj.founding_members = message.foundingMembers.map(e => e ? exports.FoundingMember.toAmino(e) : undefined);
256
+ }
257
+ else {
258
+ obj.founding_members = message.foundingMembers;
259
+ }
245
260
  return obj;
246
261
  },
247
262
  fromAminoMsg(object) {
@@ -260,6 +275,118 @@ exports.GenesisState = {
260
275
  };
261
276
  }
262
277
  };
278
+ function createBaseFoundingMember() {
279
+ return {
280
+ address: "",
281
+ displayName: "",
282
+ handles: [],
283
+ founder: false
284
+ };
285
+ }
286
+ /**
287
+ * FoundingMember is one governance founding member for the InitGenesis
288
+ * bootstrap: a seat on the founding councils, a seeded x/name display name,
289
+ * and optionally pre-claimed x/name handles (first handle becomes primary).
290
+ * Exactly one entry must set founder=true; that account additionally anchors
291
+ * the Technical and Ecosystem councils and their committees.
292
+ * @name FoundingMember
293
+ * @package sparkdream.commons.v1
294
+ * @see proto type: sparkdream.commons.v1.FoundingMember
295
+ */
296
+ exports.FoundingMember = {
297
+ typeUrl: "/sparkdream.commons.v1.FoundingMember",
298
+ encode(message, writer = binary_1.BinaryWriter.create()) {
299
+ if (message.address !== "") {
300
+ writer.uint32(10).string(message.address);
301
+ }
302
+ if (message.displayName !== "") {
303
+ writer.uint32(18).string(message.displayName);
304
+ }
305
+ for (const v of message.handles) {
306
+ writer.uint32(26).string(v);
307
+ }
308
+ if (message.founder === true) {
309
+ writer.uint32(32).bool(message.founder);
310
+ }
311
+ return writer;
312
+ },
313
+ decode(input, length) {
314
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
315
+ let end = length === undefined ? reader.len : reader.pos + length;
316
+ const message = createBaseFoundingMember();
317
+ while (reader.pos < end) {
318
+ const tag = reader.uint32();
319
+ switch (tag >>> 3) {
320
+ case 1:
321
+ message.address = reader.string();
322
+ break;
323
+ case 2:
324
+ message.displayName = reader.string();
325
+ break;
326
+ case 3:
327
+ message.handles.push(reader.string());
328
+ break;
329
+ case 4:
330
+ message.founder = reader.bool();
331
+ break;
332
+ default:
333
+ reader.skipType(tag & 7);
334
+ break;
335
+ }
336
+ }
337
+ return message;
338
+ },
339
+ fromPartial(object) {
340
+ const message = createBaseFoundingMember();
341
+ message.address = object.address ?? "";
342
+ message.displayName = object.displayName ?? "";
343
+ message.handles = object.handles?.map(e => e) || [];
344
+ message.founder = object.founder ?? false;
345
+ return message;
346
+ },
347
+ fromAmino(object) {
348
+ const message = createBaseFoundingMember();
349
+ if (object.address !== undefined && object.address !== null) {
350
+ message.address = object.address;
351
+ }
352
+ if (object.display_name !== undefined && object.display_name !== null) {
353
+ message.displayName = object.display_name;
354
+ }
355
+ message.handles = object.handles?.map(e => e) || [];
356
+ if (object.founder !== undefined && object.founder !== null) {
357
+ message.founder = object.founder;
358
+ }
359
+ return message;
360
+ },
361
+ toAmino(message) {
362
+ const obj = {};
363
+ obj.address = message.address === "" ? undefined : message.address;
364
+ obj.display_name = message.displayName === "" ? undefined : message.displayName;
365
+ if (message.handles) {
366
+ obj.handles = message.handles.map(e => e);
367
+ }
368
+ else {
369
+ obj.handles = message.handles;
370
+ }
371
+ obj.founder = message.founder === false ? undefined : message.founder;
372
+ return obj;
373
+ },
374
+ fromAminoMsg(object) {
375
+ return exports.FoundingMember.fromAmino(object.value);
376
+ },
377
+ fromProtoMsg(message) {
378
+ return exports.FoundingMember.decode(message.value);
379
+ },
380
+ toProto(message) {
381
+ return exports.FoundingMember.encode(message).finish();
382
+ },
383
+ toProtoMsg(message) {
384
+ return {
385
+ typeUrl: "/sparkdream.commons.v1.FoundingMember",
386
+ value: exports.FoundingMember.encode(message).finish()
387
+ };
388
+ }
389
+ };
263
390
  function createBaseCouncilMembers() {
264
391
  return {
265
392
  councilName: "",
@@ -75,6 +75,11 @@ export interface Initiative {
75
75
  * Conviction propagated from linked content
76
76
  */
77
77
  propagatedConviction: string;
78
+ /**
79
+ * DREAM locked by a self-assigning project creator (budget-backed projects
80
+ * only). Returned on completion/abandonment, burned on upheld challenge.
81
+ */
82
+ selfAssignBond: string;
78
83
  }
79
84
  export interface InitiativeProtoMsg {
80
85
  typeUrl: "/sparkdream.rep.v1.Initiative";
@@ -115,6 +120,11 @@ export interface InitiativeAmino {
115
120
  * Conviction propagated from linked content
116
121
  */
117
122
  propagated_conviction?: string;
123
+ /**
124
+ * DREAM locked by a self-assigning project creator (budget-backed projects
125
+ * only). Returned on completion/abandonment, burned on upheld challenge.
126
+ */
127
+ self_assign_bond?: string;
118
128
  }
119
129
  export interface InitiativeAminoMsg {
120
130
  type: "/sparkdream.rep.v1.Initiative";
@@ -228,7 +228,8 @@ function createBaseInitiative() {
228
228
  status: 0,
229
229
  createdAt: BigInt(0),
230
230
  completedAt: BigInt(0),
231
- propagatedConviction: ""
231
+ propagatedConviction: "",
232
+ selfAssignBond: ""
232
233
  };
233
234
  }
234
235
  /**
@@ -315,6 +316,9 @@ exports.Initiative = {
315
316
  if (message.propagatedConviction !== "") {
316
317
  writer.uint32(202).string(math_1.Decimal.fromUserInput(message.propagatedConviction, 18).atomics);
317
318
  }
319
+ if (message.selfAssignBond !== "") {
320
+ writer.uint32(210).string(message.selfAssignBond);
321
+ }
318
322
  return writer;
319
323
  },
320
324
  decode(input, length) {
@@ -399,6 +403,9 @@ exports.Initiative = {
399
403
  case 25:
400
404
  message.propagatedConviction = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
401
405
  break;
406
+ case 26:
407
+ message.selfAssignBond = reader.string();
408
+ break;
402
409
  default:
403
410
  reader.skipType(tag & 7);
404
411
  break;
@@ -433,6 +440,7 @@ exports.Initiative = {
433
440
  message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? BigInt(object.createdAt.toString()) : BigInt(0);
434
441
  message.completedAt = object.completedAt !== undefined && object.completedAt !== null ? BigInt(object.completedAt.toString()) : BigInt(0);
435
442
  message.propagatedConviction = object.propagatedConviction ?? "";
443
+ message.selfAssignBond = object.selfAssignBond ?? "";
436
444
  return message;
437
445
  },
438
446
  fromAmino(object) {
@@ -508,6 +516,9 @@ exports.Initiative = {
508
516
  if (object.propagated_conviction !== undefined && object.propagated_conviction !== null) {
509
517
  message.propagatedConviction = object.propagated_conviction;
510
518
  }
519
+ if (object.self_assign_bond !== undefined && object.self_assign_bond !== null) {
520
+ message.selfAssignBond = object.self_assign_bond;
521
+ }
511
522
  return message;
512
523
  },
513
524
  toAmino(message) {
@@ -547,6 +558,7 @@ exports.Initiative = {
547
558
  obj.created_at = message.createdAt !== BigInt(0) ? message.createdAt?.toString() : undefined;
548
559
  obj.completed_at = message.completedAt !== BigInt(0) ? message.completedAt?.toString() : undefined;
549
560
  obj.propagated_conviction = message.propagatedConviction === "" ? undefined : message.propagatedConviction;
561
+ obj.self_assign_bond = message.selfAssignBond === "" ? undefined : message.selfAssignBond;
550
562
  return obj;
551
563
  },
552
564
  fromAminoMsg(object) {
@@ -375,6 +375,24 @@ export interface Params {
375
375
  * pollution by stale unapproved proposals. Must be positive.
376
376
  */
377
377
  proposedProjectExpiryBlocks: bigint;
378
+ /**
379
+ * Fraction of the initiative budget locked as a DREAM bond when the project
380
+ * creator self-assigns on a budget-backed project (permissionless projects
381
+ * are exempt — no treasury exposure). Bond is returned on completion or
382
+ * abandonment and burned when a challenge is upheld. Range [0, 1]; 0 disables.
383
+ */
384
+ selfAssignedBondRate: string;
385
+ /**
386
+ * External-conviction ratio applied instead of external_conviction_ratio when
387
+ * the assignee is the project creator. Must be >= external_conviction_ratio
388
+ * and <= 1. Default 1.0: the community alone vouches for self-assigned work.
389
+ */
390
+ selfAssignedExternalConvictionRatio: string;
391
+ /**
392
+ * Multiplier applied to the challenge window for creator-assigned
393
+ * initiatives. Must be >= 1. Default 2.
394
+ */
395
+ selfAssignedChallengeMultiplier: bigint;
378
396
  }
379
397
  export interface ParamsProtoMsg {
380
398
  typeUrl: "/sparkdream.rep.v1.Params";
@@ -665,6 +683,24 @@ export interface ParamsAmino {
665
683
  * pollution by stale unapproved proposals. Must be positive.
666
684
  */
667
685
  proposed_project_expiry_blocks?: string;
686
+ /**
687
+ * Fraction of the initiative budget locked as a DREAM bond when the project
688
+ * creator self-assigns on a budget-backed project (permissionless projects
689
+ * are exempt — no treasury exposure). Bond is returned on completion or
690
+ * abandonment and burned when a challenge is upheld. Range [0, 1]; 0 disables.
691
+ */
692
+ self_assigned_bond_rate?: string;
693
+ /**
694
+ * External-conviction ratio applied instead of external_conviction_ratio when
695
+ * the assignee is the project creator. Must be >= external_conviction_ratio
696
+ * and <= 1. Default 1.0: the community alone vouches for self-assigned work.
697
+ */
698
+ self_assigned_external_conviction_ratio?: string;
699
+ /**
700
+ * Multiplier applied to the challenge window for creator-assigned
701
+ * initiatives. Must be >= 1. Default 2.
702
+ */
703
+ self_assigned_challenge_multiplier?: string;
668
704
  }
669
705
  export interface ParamsAminoMsg {
670
706
  type: "sparkdream/x/rep/Params";
@@ -414,7 +414,10 @@ function createBaseParams() {
414
414
  maxDreamMintPerEpoch: "",
415
415
  maxProjectRequestedBudget: "",
416
416
  maxProjectRequestedSpark: "",
417
- proposedProjectExpiryBlocks: BigInt(0)
417
+ proposedProjectExpiryBlocks: BigInt(0),
418
+ selfAssignedBondRate: "",
419
+ selfAssignedExternalConvictionRatio: "",
420
+ selfAssignedChallengeMultiplier: BigInt(0)
418
421
  };
419
422
  }
420
423
  /**
@@ -700,6 +703,15 @@ exports.Params = {
700
703
  if (message.proposedProjectExpiryBlocks !== BigInt(0)) {
701
704
  writer.uint32(720).int64(message.proposedProjectExpiryBlocks);
702
705
  }
706
+ if (message.selfAssignedBondRate !== "") {
707
+ writer.uint32(738).string(math_1.Decimal.fromUserInput(message.selfAssignedBondRate, 18).atomics);
708
+ }
709
+ if (message.selfAssignedExternalConvictionRatio !== "") {
710
+ writer.uint32(746).string(math_1.Decimal.fromUserInput(message.selfAssignedExternalConvictionRatio, 18).atomics);
711
+ }
712
+ if (message.selfAssignedChallengeMultiplier !== BigInt(0)) {
713
+ writer.uint32(752).int64(message.selfAssignedChallengeMultiplier);
714
+ }
703
715
  return writer;
704
716
  },
705
717
  decode(input, length) {
@@ -982,6 +994,15 @@ exports.Params = {
982
994
  case 90:
983
995
  message.proposedProjectExpiryBlocks = reader.int64();
984
996
  break;
997
+ case 92:
998
+ message.selfAssignedBondRate = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
999
+ break;
1000
+ case 93:
1001
+ message.selfAssignedExternalConvictionRatio = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
1002
+ break;
1003
+ case 94:
1004
+ message.selfAssignedChallengeMultiplier = reader.int64();
1005
+ break;
985
1006
  default:
986
1007
  reader.skipType(tag & 7);
987
1008
  break;
@@ -1082,6 +1103,9 @@ exports.Params = {
1082
1103
  message.maxProjectRequestedBudget = object.maxProjectRequestedBudget ?? "";
1083
1104
  message.maxProjectRequestedSpark = object.maxProjectRequestedSpark ?? "";
1084
1105
  message.proposedProjectExpiryBlocks = object.proposedProjectExpiryBlocks !== undefined && object.proposedProjectExpiryBlocks !== null ? BigInt(object.proposedProjectExpiryBlocks.toString()) : BigInt(0);
1106
+ message.selfAssignedBondRate = object.selfAssignedBondRate ?? "";
1107
+ message.selfAssignedExternalConvictionRatio = object.selfAssignedExternalConvictionRatio ?? "";
1108
+ message.selfAssignedChallengeMultiplier = object.selfAssignedChallengeMultiplier !== undefined && object.selfAssignedChallengeMultiplier !== null ? BigInt(object.selfAssignedChallengeMultiplier.toString()) : BigInt(0);
1085
1109
  return message;
1086
1110
  },
1087
1111
  fromAmino(object) {
@@ -1359,6 +1383,15 @@ exports.Params = {
1359
1383
  if (object.proposed_project_expiry_blocks !== undefined && object.proposed_project_expiry_blocks !== null) {
1360
1384
  message.proposedProjectExpiryBlocks = BigInt(object.proposed_project_expiry_blocks);
1361
1385
  }
1386
+ if (object.self_assigned_bond_rate !== undefined && object.self_assigned_bond_rate !== null) {
1387
+ message.selfAssignedBondRate = object.self_assigned_bond_rate;
1388
+ }
1389
+ if (object.self_assigned_external_conviction_ratio !== undefined && object.self_assigned_external_conviction_ratio !== null) {
1390
+ message.selfAssignedExternalConvictionRatio = object.self_assigned_external_conviction_ratio;
1391
+ }
1392
+ if (object.self_assigned_challenge_multiplier !== undefined && object.self_assigned_challenge_multiplier !== null) {
1393
+ message.selfAssignedChallengeMultiplier = BigInt(object.self_assigned_challenge_multiplier);
1394
+ }
1362
1395
  return message;
1363
1396
  },
1364
1397
  toAmino(message) {
@@ -1454,6 +1487,9 @@ exports.Params = {
1454
1487
  obj.max_project_requested_budget = message.maxProjectRequestedBudget === "" ? undefined : message.maxProjectRequestedBudget;
1455
1488
  obj.max_project_requested_spark = message.maxProjectRequestedSpark === "" ? undefined : message.maxProjectRequestedSpark;
1456
1489
  obj.proposed_project_expiry_blocks = message.proposedProjectExpiryBlocks !== BigInt(0) ? message.proposedProjectExpiryBlocks?.toString() : undefined;
1490
+ obj.self_assigned_bond_rate = message.selfAssignedBondRate === "" ? undefined : message.selfAssignedBondRate;
1491
+ obj.self_assigned_external_conviction_ratio = message.selfAssignedExternalConvictionRatio === "" ? undefined : message.selfAssignedExternalConvictionRatio;
1492
+ obj.self_assigned_challenge_multiplier = message.selfAssignedChallengeMultiplier !== BigInt(0) ? message.selfAssignedChallengeMultiplier?.toString() : undefined;
1457
1493
  return obj;
1458
1494
  },
1459
1495
  fromAminoMsg(object) {