@agoric/governance 0.10.4-dev-ae21a7e.0 → 0.10.4-dev-afcbcd7.0

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.
Files changed (58) hide show
  1. package/package.json +16 -13
  2. package/src/index.js +4 -5
  3. package/src/binaryVoteCounter.d.ts +0 -16
  4. package/src/binaryVoteCounter.d.ts.map +0 -1
  5. package/src/breakTie.d.ts +0 -2
  6. package/src/breakTie.d.ts.map +0 -1
  7. package/src/closingRule.d.ts +0 -3
  8. package/src/closingRule.d.ts.map +0 -1
  9. package/src/committee.d.ts +0 -21
  10. package/src/committee.d.ts.map +0 -1
  11. package/src/constants.d.ts +0 -16
  12. package/src/constants.d.ts.map +0 -1
  13. package/src/contractGovernance/assertions.d.ts +0 -7
  14. package/src/contractGovernance/assertions.d.ts.map +0 -1
  15. package/src/contractGovernance/governApi.d.ts +0 -30
  16. package/src/contractGovernance/governApi.d.ts.map +0 -1
  17. package/src/contractGovernance/governFilter.d.ts +0 -25
  18. package/src/contractGovernance/governFilter.d.ts.map +0 -1
  19. package/src/contractGovernance/governParam.d.ts +0 -33
  20. package/src/contractGovernance/governParam.d.ts.map +0 -1
  21. package/src/contractGovernance/paramManager.d.ts +0 -45
  22. package/src/contractGovernance/paramManager.d.ts.map +0 -1
  23. package/src/contractGovernance/typedParamManager.d.ts +0 -29
  24. package/src/contractGovernance/typedParamManager.d.ts.map +0 -1
  25. package/src/contractGovernor.d.ts +0 -25
  26. package/src/contractGovernor.d.ts.map +0 -1
  27. package/src/contractGovernorKit.d.ts +0 -80
  28. package/src/contractGovernorKit.d.ts.map +0 -1
  29. package/src/contractHelper.d.ts +0 -136
  30. package/src/contractHelper.d.ts.map +0 -1
  31. package/src/electorateTools.d.ts +0 -37
  32. package/src/electorateTools.d.ts.map +0 -1
  33. package/src/index.d.ts +0 -9
  34. package/src/index.d.ts.map +0 -1
  35. package/src/multiCandidateVoteCounter.d.ts +0 -16
  36. package/src/multiCandidateVoteCounter.d.ts.map +0 -1
  37. package/src/noActionElectorate.d.ts +0 -8
  38. package/src/noActionElectorate.d.ts.map +0 -1
  39. package/src/question.d.ts +0 -27
  40. package/src/question.d.ts.map +0 -1
  41. package/src/quorumCounter.d.ts +0 -6
  42. package/src/quorumCounter.d.ts.map +0 -1
  43. package/src/typeGuards.d.ts +0 -171
  44. package/src/typeGuards.d.ts.map +0 -1
  45. package/src/types-ambient.d.ts +0 -1047
  46. package/src/types-ambient.d.ts.map +0 -1
  47. package/src/types.d.ts +0 -557
  48. package/src/types.d.ts.map +0 -1
  49. package/src/validators.d.ts +0 -16
  50. package/src/validators.d.ts.map +0 -1
  51. package/src/voterKit.d.ts +0 -19
  52. package/src/voterKit.d.ts.map +0 -1
  53. package/tools/puppetContractGovernor.d.ts +0 -51
  54. package/tools/puppetContractGovernor.d.ts.map +0 -1
  55. package/tools/puppetGovernance.d.ts +0 -101
  56. package/tools/puppetGovernance.d.ts.map +0 -1
  57. package/tools/storageDoc.d.ts +0 -10
  58. package/tools/storageDoc.d.ts.map +0 -1
@@ -1,1047 +0,0 @@
1
- /**
2
- * * UNRANKED: "unranked voting" means that the voter specifies some number of
3
- * positions, and is endorsing them equally.
4
- * * ORDER: The voter assigns ordinal numbers to some of the positions. The
5
- * positions will be treated as an ordered list with no gaps.
6
- *
7
- * When voters are limited to choosing a single candidate, either UNRANKED or
8
- * ORDER would work. UNRANKED has a simpler representation so we use that.
9
- */
10
- type ChoiceMethod = 'unranked' | 'order' | 'plurality';
11
- /**
12
- * param_change is very specific. Survey means multiple answers are possible,
13
- * Election means some candidates are going to "win". It's not clear these are
14
- * orthogonal. The important distinction is that param_change has a structured
15
- * issue, while the others have a issue presented as a string.
16
- */
17
- type ElectionType = 'param_change' | 'election' | 'survey' | 'api_invocation' | 'offer_filter';
18
- type ParamType = import('./constants.js').ParamType;
19
- type QuorumRule = 'majority' | 'all' | 'no_quorum';
20
- type SimpleIssue = {
21
- text: string;
22
- };
23
- type ParamValue = Amount | Brand | Installation | Instance | bigint | Ratio | string | import('@agoric/time/src/types').TimestampRecord | import('@agoric/time/src/types').RelativeTimeRecord | unknown;
24
- type ParamValueForType<T extends import("./constants.js").ParamType> = T extends 'amount' ? Amount<any> : T extends 'brand' ? Brand : T extends 'installation' ? Installation : T extends 'instance' ? Instance : T extends 'invitation' ? Amount<'set'> : T extends 'nat' ? bigint : T extends 'ratio' ? Ratio : T extends 'string' ? string : T extends 'timestamp' ? import('@agoric/time').Timestamp : T extends 'relativeTime' ? import('@agoric/time').RelativeTime : T extends 'unknown' ? unknown : never;
25
- /**
26
- * <T>
27
- */
28
- type ParamValueTyped<T extends import("./constants.js").ParamType = import("./constants.js").ParamType> = {
29
- type: T;
30
- value: ParamValueForType<T>;
31
- };
32
- /**
33
- * <T>
34
- */
35
- type GovernanceTerms<T extends import("./contractGovernance/typedParamManager.js").ParamTypesMap> = {
36
- electionManager: import('@agoric/zoe/src/zoeService/utils.js').Instance<typeof import("./contractGovernor.js")['start']>;
37
- governedParams: import('./contractGovernance/typedParamManager.js').ParamRecordsFromTypes<T & {
38
- Electorate: 'invitation';
39
- }>;
40
- };
41
- type Issue = SimpleIssue | ParamChangeIssue<unknown> | ApiInvocationIssue | OfferFilterIssue;
42
- /**
43
- * - QuestionSpec plus the Electorate Instance and
44
- * a numerical threshold for the quorum. (The voteCounter doesn't know the
45
- * size of the electorate, so the Electorate has to say what limit to enforce.)
46
- */
47
- type QuestionTerms = {
48
- questionSpec: QuestionSpec;
49
- quorumThreshold: number;
50
- electorate: Instance;
51
- };
52
- type TextPosition = {
53
- text: string;
54
- };
55
- type Position = TextPosition | ChangeParamsPosition | NoChangeParamsPosition | InvokeApiPosition | DontInvokeApiPosition | OfferFilterPosition | NoChangeOfferFilterPosition | InvokeApiPosition;
56
- type OutcomeRecord = {
57
- question: Handle<'Question'>;
58
- } & ({
59
- outcome: 'win';
60
- position: Position;
61
- } | {
62
- outcome: 'fail';
63
- reason: 'No quorum';
64
- });
65
- type MultiOutcomeRecord = {
66
- question: Handle<'Question'>;
67
- } & ({
68
- outcome: 'win';
69
- positions: Position[];
70
- } | {
71
- outcome: 'fail';
72
- reason: 'No quorum';
73
- });
74
- /**
75
- * Specification when requesting creation of a Question
76
- */
77
- type QuestionSpec<I extends Issue = Issue> = {
78
- method: ChoiceMethod;
79
- issue: I;
80
- positions: Position[];
81
- electionType: ElectionType;
82
- maxChoices: number;
83
- maxWinners: number;
84
- closingRule: ClosingRule;
85
- quorumRule: QuorumRule;
86
- tieOutcome: Position;
87
- };
88
- type QuestionDetailsExtraProperties = {
89
- /**
90
- * - instance of the VoteCounter
91
- */
92
- counterInstance: Instance;
93
- questionHandle: Handle<'Question'>;
94
- };
95
- /**
96
- * complete question details: questionSpec plus counter and questionHandle
97
- */
98
- type QuestionDetails = QuestionSpec & QuestionDetailsExtraProperties;
99
- type GovernancePair = {
100
- governor: Instance;
101
- governed: Instance;
102
- };
103
- type Question = {
104
- getVoteCounter: () => Instance;
105
- getDetails: () => QuestionDetails;
106
- };
107
- type CompleteUnrankedQuestion = {
108
- questionHandle: Handle<'Question'>;
109
- /**
110
- * - a list of equal-weight preferred positions
111
- */
112
- chosen: Position[];
113
- };
114
- type CompleteWeightedBallot = {
115
- questionHandle: Handle<'Question'>;
116
- /**
117
- * - list of positions with
118
- * weights. VoteCounter may limit weights to a range or require uniqueness.
119
- */
120
- weighted: [Position, bigint][];
121
- };
122
- type CompleteOrderedBallot = {
123
- questionHandle: Handle<'Question'>;
124
- /**
125
- * - ordered list of position from most preferred
126
- * to least preferred
127
- */
128
- ordered: Position[];
129
- };
130
- type PositionCount = {
131
- position: Position;
132
- total: bigint;
133
- };
134
- type VoteStatistics = {
135
- spoiled: bigint;
136
- votes: number;
137
- results: PositionCount[];
138
- };
139
- type QuorumCounter = {
140
- check: (stats: VoteStatistics) => boolean;
141
- };
142
- type BuildQuestion = (questionSpec: QuestionSpec, instance: Instance) => Question;
143
- /**
144
- * - a facet that the Electorate should
145
- * hold tightly. submitVote() is the core capability that allows the holder to
146
- * specify the identity and choice of a voter. The voteCounter is making that
147
- * available to the Electorate, which should wrap and attenuate it so each
148
- * voter gets only the ability to cast their own vote at a weight specified by
149
- * the electorate.
150
- */
151
- type VoteCounterCreatorFacet = {
152
- submitVote: SubmitVote;
153
- };
154
- type VoteCounterPublicFacet = {
155
- isOpen: () => boolean;
156
- getQuestion: () => Question;
157
- getOutcome: () => Promise<Position>;
158
- getDetails: () => QuestionDetails;
159
- getStats: () => Promise<VoteStatistics>;
160
- };
161
- type MultiVoteCounterPublicFacet = {
162
- isOpen: () => boolean;
163
- getQuestion: () => Question;
164
- getOutcome: () => Promise<Position[]>;
165
- getDetails: () => QuestionDetails;
166
- getStats: () => Promise<VoteStatistics>;
167
- };
168
- /**
169
- * TEST ONLY: Should not be allowed to escape from contracts
170
- */
171
- type VoteCounterCloseFacet = {
172
- closeVoting: () => void;
173
- };
174
- type VoteCounterFacets = {
175
- publicFacet: VoteCounterPublicFacet;
176
- creatorFacet: VoteCounterCreatorFacet;
177
- closeFacet: VoteCounterCloseFacet;
178
- };
179
- type MultiVoteCounterFacets = {
180
- publicFacet: MultiVoteCounterPublicFacet;
181
- creatorFacet: VoteCounterCreatorFacet;
182
- closeFacet: VoteCounterCloseFacet;
183
- };
184
- type BuildVoteCounter = (questionSpec: QuestionSpec, threshold: bigint, instance: Instance, publisher: ERef<Publisher<OutcomeRecord>>) => VoteCounterFacets;
185
- type BuildMultiVoteCounter = (questionSpec: QuestionSpec, threshold: bigint, instance: Instance, publisher: ERef<Publisher<MultiOutcomeRecord>>) => MultiVoteCounterFacets;
186
- type CompletedBallet = {
187
- chosen: Position;
188
- shares: bigint;
189
- };
190
- type SubmitVote = (voterHandle: Handle<'Voter'>, chosenPositions: Position[], weight?: bigint | undefined) => CompletedBallet;
191
- type GetOpenQuestions = () => Promise<Handle<'Question'>[]>;
192
- type GetQuestion = (h: Handle<'Question'>) => Promise<Question>;
193
- type ElectoratePublic = {
194
- getQuestionSubscriber: () => Subscriber<QuestionDetails>;
195
- /**
196
- * ,
197
- */
198
- getOpenQuestions: GetOpenQuestions;
199
- getInstance: () => Instance;
200
- getQuestion: GetQuestion;
201
- };
202
- type ClaimsElectoratePublic = ElectoratePublic & {
203
- makeVoterInvitation: () => ERef<Invitation>;
204
- };
205
- type CommitteeElectoratePublic = ElectoratePublic & {
206
- getName: () => string;
207
- };
208
- type PoserFacet = {
209
- addQuestion: AddQuestion;
210
- };
211
- type ElectorateCreatorFacet = {
212
- /**
213
- * can be used directly when the creator doesn't need any
214
- * reassurance. When someone needs to connect addQuestion to the Electorate
215
- * instance, getPoserInvitation() lets them get addQuestion with assurance.
216
- */
217
- addQuestion: AddQuestion;
218
- getPoserInvitation: () => Promise<Invitation>;
219
- getQuestionSubscriber: () => Subscriber<QuestionDetails>;
220
- getPublicFacet: () => ElectoratePublic;
221
- };
222
- type GetVoterInvitations = {
223
- getVoterInvitations: () => Invitation[];
224
- };
225
- /**
226
- * - a facet that the Electorate should hold
227
- * tightly. It allows specification of the vote's weight, so the Electorate
228
- * should distribute an attenuated wrapper that doesn't make that available!
229
- */
230
- type VoterFacet = {
231
- submitVote: SubmitVote;
232
- };
233
- type ClosingRule = {
234
- timer: ERef<Timer>;
235
- deadline: import('@agoric/time/src/types').Timestamp;
236
- };
237
- type CloseVoting = (closingRule: ClosingRule, closeVoting: () => void) => any;
238
- type AddQuestionReturn = {
239
- publicFacet: VoteCounterPublicFacet;
240
- creatorFacet: VoteCounterCreatorFacet;
241
- instance: import('@agoric/zoe/src/zoeService/utils.js').Instance<typeof import('./binaryVoteCounter.js').start>;
242
- deadline: import('@agoric/time/src/types').Timestamp;
243
- questionHandle: Handle<'Question'>;
244
- };
245
- type AddQuestion = (voteCounter: ERef<Installation>, questionSpec: QuestionSpec) => Promise<AddQuestionReturn>;
246
- type CreateQuestion = (name: string, proposedValue: ParamValue, voteCounterInstallation: Installation, contractInstance: Instance, closingRule: ClosingRule) => Promise<QuestionDetails>;
247
- type ParamChangeIssue<P = StandardParamPath> = {
248
- spec: ParamChangesSpec<P>;
249
- contract: import("@agoric/zoe/src/zoeService/utils.js").Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>;
250
- };
251
- type ApiInvocationIssue = {
252
- apiMethodName: string;
253
- methodArgs: unknown[];
254
- };
255
- type OfferFilterIssue = {
256
- strings: string[];
257
- };
258
- type ParamChangePositions = {
259
- positive: ChangeParamsPosition;
260
- negative: NoChangeParamsPosition;
261
- };
262
- /**
263
- * details for a question that can change a contract parameter
264
- */
265
- type ParamChangeIssueDetails = {
266
- method: ChoiceMethod;
267
- issue: ParamChangeIssue<unknown>;
268
- positions: ParamChangePositions;
269
- electionType: ElectionType;
270
- maxChoices: number;
271
- closingRule: ClosingRule;
272
- quorumRule: QuorumRule;
273
- tieOutcome: NoChangeParamsPosition;
274
- /**
275
- * - instance of the VoteCounter
276
- */
277
- counterInstance: Instance;
278
- questionHandle: Handle<'Question'>;
279
- };
280
- /**
281
- * a Record containing
282
- * keyword pairs with descriptions of parameters under governance.
283
- */
284
- type ParamStateRecord = Record<Keyword, ParamValueTyped>;
285
- type GovernanceSubscriptionState = {
286
- current: ParamStateRecord;
287
- };
288
- /**
289
- * The base paramManager with typed getters
290
- */
291
- type ParamManagerBase = {
292
- getParams: () => ERef<ParamStateRecord>;
293
- getAmount: (name: string) => Amount;
294
- getBrand: (name: string) => Brand;
295
- getInstance: (name: string) => Instance;
296
- getInstallation: (name: string) => Installation;
297
- getInvitationAmount: (name: string) => Amount<'set'>;
298
- getNat: (name: string) => bigint;
299
- getRatio: (name: string) => Ratio;
300
- getString: (name: string) => string;
301
- getTimestamp: (name: string) => import('@agoric/time/src/types').TimestampRecord;
302
- getRelativeTime: (name: string) => import('@agoric/time/src/types').RelativeTimeRecord;
303
- getUnknown: (name: string) => any;
304
- /**
305
- * - for
306
- * most types, the visible value is the same as proposedValue. For Invitations
307
- * the visible value is the amount of the invitation.
308
- */
309
- getVisibleValue: (name: string, proposedValue: ParamValue) => ParamValue;
310
- getInternalParamValue: (name: string) => Promise<Invitation>;
311
- getSubscription: () => StoredSubscription<GovernanceSubscriptionState>;
312
- };
313
- type UpdateParams = (paramChanges: Record<string, ParamValue>) => Promise<void>;
314
- /**
315
- * These are typed `any` because the builder pattern of paramManager makes it very
316
- * complicated for the type system to know the set of param-specific functions
317
- * returned by `.build()`. Instead we let paramManager create the desired methods
318
- * and use typedParamManager to create a version that includes the static types.
319
- */
320
- type ParamManagerGettersAndUpdaters = Record<string, any>;
321
- /**
322
- * These are typed `any` because the builder pattern of paramManager makes it very
323
- * complicated for the type system to know the set of param-specific functions
324
- * returned by `.build()`. Instead we let paramManager create the desired methods
325
- * and use typedParamManager to create a version that includes the static types.
326
- */
327
- type AnyParamManager = ParamManagerBase & ParamManagerGettersAndUpdaters & {
328
- updateParams: UpdateParams;
329
- };
330
- type ParameterNameList = Record<string, string[]>;
331
- type AssertParamManagerType = (type: ParamType, value: ParamValue, name: string) => any;
332
- /**
333
- * - ParamManager is a facility that governed
334
- * contracts can use to manage their visible state in a way that allows the
335
- * ContractGovernor to update values using governance. When paramManager is
336
- * instantiated inside the contract, the contract has synchronous access to
337
- * the values, and clients of the contract can verify that a ContractGovernor
338
- * can change the values in a legible way.
339
- */
340
- type BuildParamManager = (paramDescriptions: Iterable<ParamValueTyped>) => AnyParamManager;
341
- type ChangeParamsPosition = {
342
- /**
343
- * one or more changes to parameters
344
- */
345
- changes: Record<string, ParamValue>;
346
- };
347
- type OfferFilterPosition = {
348
- strings: string[];
349
- };
350
- type NoChangeOfferFilterPosition = {
351
- dontUpdate: string[];
352
- };
353
- type InvokeApiPosition = {
354
- apiMethodName: string;
355
- methodArgs: unknown[];
356
- };
357
- type DontInvokeApiPosition = {
358
- dontInvoke: string;
359
- };
360
- type NoChangeParamsPosition = {
361
- /**
362
- * Parameters in the proposal that this position
363
- * is opposed to
364
- */
365
- noChange: string[];
366
- };
367
- type Governor = {
368
- createQuestion: CreateQuestion;
369
- };
370
- type GovernedApis = {
371
- [methodName: string]: (...args: any) => unknown;
372
- };
373
- type GovernorPublic = {
374
- getElectorate: () => Promise<Instance>;
375
- getGovernedContract: () => Instance;
376
- validateVoteCounter: (voteCounter: Instance) => Promise<void>;
377
- validateElectorate: (regP: ERef<Instance>) => Promise<void>;
378
- validateTimer: (closingRule: ClosingRule) => void;
379
- };
380
- /**
381
- * identifier for a paramManager within a contract
382
- */
383
- type ParamKey = {
384
- key: unknown;
385
- };
386
- /**
387
- * <P>
388
- */
389
- type ParamChangesSpec<P> = {
390
- paramPath: P;
391
- /**
392
- * one or more changes to parameters
393
- */
394
- changes: Record<string, ParamValue>;
395
- };
396
- type ContractGovernanceVoteResult = {
397
- /**
398
- * - instance of the VoteCounter
399
- */
400
- instance: Instance;
401
- details: ERef<QuestionDetails>;
402
- /**
403
- * - A promise for the result
404
- * of updating the parameter value. Primarily useful for its behavior on
405
- * rejection.
406
- */
407
- outcomeOfUpdate: Promise<ParamValue>;
408
- };
409
- type GovernorCreatorFacet<SF extends GovernableStartFn> = {
410
- voteOnParamChanges: VoteOnParamChanges;
411
- voteOnApiInvocation: VoteOnApiInvocation;
412
- voteOnOfferFilter: VoteOnOfferFilter;
413
- /**
414
- * facet of the governed contract,
415
- * with creator-like powers but without the tightly held ability to change
416
- * param values.
417
- */
418
- getCreatorFacet: () => LimitedCF<SF>;
419
- replaceElectorate: (poserInvitation: Invitation) => Promise<void>;
420
- getAdminFacet: () => AdminFacet;
421
- /**
422
- * - public facet of the governed contract
423
- */
424
- getPublicFacet: () => GovernedPublicFacet<Awaited<ReturnType<SF>>['publicFacet']>;
425
- /**
426
- * - instance of the governed
427
- * contract
428
- */
429
- getInstance: () => Instance;
430
- };
431
- type GovernedPublicFacetMethods = {
432
- getSubscription: (key?: any) => StoredSubscription<GovernanceSubscriptionState>;
433
- /**
434
- * - get descriptions of
435
- * all the governed parameters
436
- */
437
- getGovernedParams: (key?: any) => ERef<ParamStateRecord>;
438
- getInvitationAmount: (name: string) => Amount;
439
- };
440
- type GovernedPublicFacet<PF extends {}> = PF & GovernedPublicFacetMethods;
441
- type LimitedCF<SF extends GovernableStartFn> = ReturnType<Awaited<ReturnType<SF>>['creatorFacet']['getLimitedCreatorFacet']>;
442
- /**
443
- * What a governed contract must return as its creatorFacet in order to be governed
444
- */
445
- type GovernedCreatorFacet<CF extends {}> = {
446
- /**
447
- * - allows accessing
448
- * and updating governed parameters. Should only be directly accessible to the
449
- * contractGovernor
450
- */
451
- getParamMgrRetriever: () => ParamManagerRetriever;
452
- /**
453
- * - the creator
454
- * facet of the governed contract. Doesn't provide access to any governance
455
- * functionality
456
- */
457
- getLimitedCreatorFacet: () => ERef<CF>;
458
- getInvitation: (name: string) => Promise<Invitation>;
459
- getGovernedApis: () => ERef<GovernedApis>;
460
- getGovernedApiNames: () => (string | symbol)[];
461
- setOfferFilter: (strings: string[]) => void;
462
- };
463
- type StandardParamPath = {
464
- key: string;
465
- };
466
- type ParamManagerRetriever = {
467
- get: (paramKey?: ParamKey) => AnyParamManager;
468
- };
469
- type VoteOnParamChanges<P = StandardParamPath> = (voteCounterInstallation: Installation, deadline: import('@agoric/time/src/types').Timestamp, paramSpec: ParamChangesSpec<P>) => Promise<ContractGovernanceVoteResult>;
470
- type VoteOnApiInvocation = (apiMethodName: string, methodArgs: unknown[], voteCounterInstallation: Installation, deadline: import('@agoric/time/src/types').Timestamp) => Promise<ContractGovernanceVoteResult>;
471
- type VoteOnOfferFilter = (voteCounterInstallation: Installation, deadline: import('@agoric/time/src/types').Timestamp, strings: string[]) => Promise<ContractGovernanceVoteResult>;
472
- type ParamGovernor = {
473
- voteOnParamChanges: VoteOnParamChanges;
474
- createdQuestion: CreatedQuestion;
475
- };
476
- type ApiGovernor = {
477
- voteOnApiInvocation: VoteOnApiInvocation;
478
- createdQuestion: CreatedQuestion;
479
- };
480
- type FilterGovernor = {
481
- voteOnFilter: VoteOnOfferFilter;
482
- createdQuestion: CreatedQuestion;
483
- };
484
- /**
485
- * Was this question created by this ContractGovernor?
486
- */
487
- type CreatedQuestion = (questionInstance: Instance) => boolean;
488
- type PositionIncluded = (positions: Position[], position: Position) => boolean;
489
- type GovernedContractTerms = {
490
- timer: import('@agoric/time/src/types').TimerService;
491
- issuerKeywordRecord: IssuerKeywordRecord;
492
- privateArgs: object;
493
- };
494
- type AssertContractGovernance = (zoe: ERef<ZoeService>, allegedGoverned: import("@agoric/zoe/src/zoeService/utils.js").Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>, allegedGovernor: Instance, contractGovernorInstallation: Installation<(<SF extends GovernableStartFn>(zcf: ZCF<{
495
- timer: import("@agoric/time/src/types").TimerService;
496
- /**
497
- * @typedef {object} CompleteOrderedBallot
498
- * @property {Handle<'Question'>} questionHandle
499
- * @property {Position[]} ordered - ordered list of position from most preferred
500
- * to least preferred
501
- */
502
- /**
503
- * @typedef {object} PositionCount
504
- * @property {Position} position
505
- * @property {bigint} total
506
- */
507
- /**
508
- * @typedef {object} VoteStatistics
509
- * @property {bigint} spoiled
510
- * @property {number} votes
511
- * @property {PositionCount[]} results
512
- */
513
- /**
514
- * @typedef {object} QuorumCounter
515
- * @property {(stats: VoteStatistics) => boolean} check
516
- */
517
- /**
518
- * @callback BuildQuestion
519
- * @param {QuestionSpec} questionSpec
520
- * @param {Instance} instance - voteCounter instance
521
- * @returns {Question}
522
- */
523
- /**
524
- * @typedef {object} VoteCounterCreatorFacet - a facet that the Electorate should
525
- * hold tightly. submitVote() is the core capability that allows the holder to
526
- * specify the identity and choice of a voter. The voteCounter is making that
527
- * available to the Electorate, which should wrap and attenuate it so each
528
- * voter gets only the ability to cast their own vote at a weight specified by
529
- * the electorate.
530
- * @property {SubmitVote} submitVote
531
- */
532
- /**
533
- * @typedef {object} VoteCounterPublicFacet
534
- * @property {() => boolean} isOpen
535
- * @property {() => Question} getQuestion
536
- * @property {() => Promise<Position>} getOutcome
537
- * @property {() => QuestionDetails} getDetails
538
- * @property {() => Promise<VoteStatistics>} getStats
539
- */
540
- /**
541
- * @typedef {object} MultiVoteCounterPublicFacet
542
- * @property {() => boolean} isOpen
543
- * @property {() => Question} getQuestion
544
- * @property {() => Promise<Position[]>} getOutcome
545
- * @property {() => QuestionDetails} getDetails
546
- * @property {() => Promise<VoteStatistics>} getStats
547
- */
548
- /**
549
- * @typedef {object} VoteCounterCloseFacet
550
- * TEST ONLY: Should not be allowed to escape from contracts
551
- * @property {() => void} closeVoting
552
- */
553
- /**
554
- * @typedef {object} VoteCounterFacets
555
- * @property {VoteCounterPublicFacet} publicFacet
556
- * @property {VoteCounterCreatorFacet} creatorFacet
557
- * @property {VoteCounterCloseFacet} closeFacet
558
- */
559
- /**
560
- * @typedef {object} MultiVoteCounterFacets
561
- * @property {MultiVoteCounterPublicFacet} publicFacet
562
- * @property {VoteCounterCreatorFacet} creatorFacet
563
- * @property {VoteCounterCloseFacet} closeFacet
564
- */
565
- /**
566
- * @callback BuildVoteCounter
567
- * @param {QuestionSpec} questionSpec
568
- * @param {bigint} threshold - questionSpec includes quorumRule; the electorate
569
- * converts that to a number that the counter can enforce.
570
- * @param {Instance} instance
571
- * @param {ERef<Publisher<OutcomeRecord>>} publisher
572
- * @returns {VoteCounterFacets}
573
- */
574
- /**
575
- * @callback BuildMultiVoteCounter
576
- * @param {QuestionSpec} questionSpec
577
- * @param {bigint} threshold - questionSpec includes quorumRule; the electorate
578
- * converts that to a number that the counter can enforce.
579
- * @param {Instance} instance
580
- * @param {ERef<Publisher<MultiOutcomeRecord>>} publisher
581
- * @returns {MultiVoteCounterFacets}
582
- */
583
- /**
584
- * @typedef {object} CompletedBallet
585
- * @property {Position} chosen
586
- * @property {bigint} shares
587
- */
588
- /**
589
- * @callback SubmitVote
590
- * @param {Handle<'Voter'>} voterHandle
591
- * @param {Position[]} chosenPositions
592
- * @param {bigint} [weight]
593
- * @returns {CompletedBallet}
594
- */
595
- /**
596
- * @callback GetOpenQuestions
597
- * @returns {Promise<Handle<'Question'>[]>}
598
- */
599
- /**
600
- * @callback GetQuestion
601
- * @param {Handle<'Question'>} h
602
- * @returns {Promise<Question>}
603
- */
604
- /**
605
- * @typedef {object} ElectoratePublic
606
- * @property {() => Subscriber<QuestionDetails>} getQuestionSubscriber
607
- * @property {GetOpenQuestions} getOpenQuestions,
608
- * @property {() => Instance} getInstance
609
- * @property {GetQuestion} getQuestion
610
- */
611
- /**
612
- * @typedef { ElectoratePublic & {makeVoterInvitation: () => ERef<Invitation>} } ClaimsElectoratePublic
613
- * @typedef { ElectoratePublic & {getName: () => string} } CommitteeElectoratePublic
614
- */
615
- /**
616
- * @typedef {object} PoserFacet
617
- * @property {AddQuestion} addQuestion
618
- */
619
- /**
620
- * @typedef {object} ElectorateCreatorFacet
621
- * @property {AddQuestion} addQuestion can be used directly when the creator doesn't need any
622
- * reassurance. When someone needs to connect addQuestion to the Electorate
623
- * instance, getPoserInvitation() lets them get addQuestion with assurance.
624
- * @property {() => Promise<Invitation>} getPoserInvitation
625
- * @property {() => Subscriber<QuestionDetails>} getQuestionSubscriber
626
- * @property {() => ElectoratePublic} getPublicFacet
627
- */
628
- /**
629
- * @typedef {object} GetVoterInvitations
630
- * @property {() => Invitation[]} getVoterInvitations
631
- */
632
- /**
633
- * @typedef {object} VoterFacet - a facet that the Electorate should hold
634
- * tightly. It allows specification of the vote's weight, so the Electorate
635
- * should distribute an attenuated wrapper that doesn't make that available!
636
- * @property {SubmitVote} submitVote
637
- */
638
- /**
639
- * @typedef {object} ClosingRule
640
- * @property {ERef<Timer>} timer
641
- * @property {import('@agoric/time/src/types').Timestamp} deadline
642
- */
643
- /**
644
- * @callback CloseVoting
645
- * @param {ClosingRule} closingRule
646
- * @param {() => void} closeVoting
647
- */
648
- /**
649
- * @typedef {object} AddQuestionReturn
650
- * @property {VoteCounterPublicFacet} publicFacet
651
- * @property {VoteCounterCreatorFacet} creatorFacet
652
- * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<typeof import('./binaryVoteCounter.js').start>} instance
653
- * @property {import('@agoric/time/src/types').Timestamp} deadline
654
- * @property {Handle<'Question'>} questionHandle
655
- */
656
- /**
657
- * @callback AddQuestion
658
- * @param {ERef<Installation>} voteCounter
659
- * @param {QuestionSpec} questionSpec
660
- * @returns {Promise<AddQuestionReturn>}
661
- */
662
- /**
663
- * @callback CreateQuestion
664
- *
665
- * @param {string} name - The name of the parameter to change
666
- * @param {ParamValue} proposedValue - the proposed value for the named
667
- * parameter
668
- * @param {Installation} voteCounterInstallation - the voteCounter to
669
- * instantiate to count votes. Expected to be a binaryVoteCounter. Other
670
- * voteCounters might be added here, or might require separate governors.
671
- * under management so users can trace it back and see that it would use
672
- * this electionManager to manage parameters
673
- * @param {Instance} contractInstance - include the instance of the contract
674
- * @param {ClosingRule} closingRule - deadline and timer for closing voting
675
- * @returns {Promise<QuestionDetails>}
676
- */
677
- /**
678
- * @template [P=StandardParamPath] path for a paramManagerRetriever
679
- * @typedef {object} ParamChangeIssue
680
- * @property {ParamChangesSpec<P>} spec
681
- * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>} contract
682
- */
683
- /**
684
- * @typedef {object} ApiInvocationIssue
685
- * @property {string} apiMethodName
686
- * @property {unknown[]} methodArgs
687
- */
688
- /**
689
- * @typedef {object} OfferFilterIssue
690
- * @property {string[]} strings
691
- */
692
- /**
693
- * @typedef {object} ParamChangePositions
694
- * @property {ChangeParamsPosition} positive
695
- * @property {NoChangeParamsPosition} negative
696
- */
697
- /**
698
- * @typedef {object} ParamChangeIssueDetails
699
- * details for a question that can change a contract parameter
700
- * @property {ChoiceMethod} method
701
- * @property {ParamChangeIssue<unknown>} issue
702
- * @property {ParamChangePositions} positions
703
- * @property {ElectionType} electionType
704
- * @property {number} maxChoices
705
- * @property {ClosingRule} closingRule
706
- * @property {QuorumRule} quorumRule
707
- * @property {NoChangeParamsPosition} tieOutcome
708
- * @property {Instance} counterInstance - instance of the VoteCounter
709
- * @property {Handle<'Question'>} questionHandle
710
- */
711
- /**
712
- * @typedef {Record<Keyword, ParamValueTyped>} ParamStateRecord a Record containing
713
- * keyword pairs with descriptions of parameters under governance.
714
- */
715
- /** @typedef {{current: ParamStateRecord}} GovernanceSubscriptionState */
716
- /**
717
- * @typedef {object} ParamManagerBase The base paramManager with typed getters
718
- * @property {() => ERef<ParamStateRecord>} getParams
719
- * @property {(name: string) => Amount} getAmount
720
- * @property {(name: string) => Brand} getBrand
721
- * @property {(name: string) => Instance} getInstance
722
- * @property {(name: string) => Installation} getInstallation
723
- * @property {(name: string) => Amount<'set'>} getInvitationAmount
724
- * @property {(name: string) => bigint} getNat
725
- * @property {(name: string) => Ratio} getRatio
726
- * @property {(name: string) => string} getString
727
- * @property {(name: string) => import('@agoric/time/src/types').TimestampRecord} getTimestamp
728
- * @property {(name: string) => import('@agoric/time/src/types').RelativeTimeRecord} getRelativeTime
729
- * @property {(name: string) => any} getUnknown
730
- * @property {(name: string, proposedValue: ParamValue) => ParamValue} getVisibleValue - for
731
- * most types, the visible value is the same as proposedValue. For Invitations
732
- * the visible value is the amount of the invitation.
733
- * @property {(name: string) => Promise<Invitation>} getInternalParamValue
734
- * @property {() => StoredSubscription<GovernanceSubscriptionState>} getSubscription
735
- */
736
- /**
737
- * @callback UpdateParams
738
- * @param {Record<string,ParamValue>} paramChanges
739
- * @returns {Promise<void>}
740
- */
741
- /**
742
- * These are typed `any` because the builder pattern of paramManager makes it very
743
- * complicated for the type system to know the set of param-specific functions
744
- * returned by `.build()`. Instead we let paramManager create the desired methods
745
- * and use typedParamManager to create a version that includes the static types.
746
- *
747
- * @typedef {Record<string, any>} ParamManagerGettersAndUpdaters
748
- * @typedef {ParamManagerBase & ParamManagerGettersAndUpdaters & {updateParams: UpdateParams}} AnyParamManager
749
- */
750
- /**
751
- * @typedef {Record<string, string[]>} ParameterNameList
752
- */
753
- /**
754
- * @callback AssertParamManagerType
755
- * @param {ParamType} type
756
- * @param {ParamValue} value
757
- * @param {string} name
758
- */
759
- /**
760
- * @callback BuildParamManager - ParamManager is a facility that governed
761
- * contracts can use to manage their visible state in a way that allows the
762
- * ContractGovernor to update values using governance. When paramManager is
763
- * instantiated inside the contract, the contract has synchronous access to
764
- * the values, and clients of the contract can verify that a ContractGovernor
765
- * can change the values in a legible way.
766
- * @param {Iterable<ParamValueTyped>} paramDescriptions
767
- * @returns {AnyParamManager}
768
- */
769
- /**
770
- * @typedef {object} ChangeParamsPosition
771
- * @property {Record<string,ParamValue>} changes one or more changes to parameters
772
- */
773
- /**
774
- * @typedef {object} OfferFilterPosition
775
- * @property {string[]} strings
776
- */
777
- /**
778
- * @typedef {object} NoChangeOfferFilterPosition
779
- * @property {string[]} dontUpdate
780
- */
781
- /**
782
- * @typedef {object} InvokeApiPosition
783
- * @property {string} apiMethodName
784
- * @property {unknown[]} methodArgs
785
- */
786
- /**
787
- * @typedef {object} DontInvokeApiPosition
788
- * @property {string} dontInvoke
789
- */
790
- /**
791
- * @typedef {object} NoChangeParamsPosition
792
- * @property {string[]} noChange Parameters in the proposal that this position
793
- * is opposed to
794
- */
795
- /**
796
- * @typedef {object} Governor
797
- * @property {CreateQuestion} createQuestion
798
- */
799
- /** @typedef {{ [methodName: string]: (...args: any) => unknown }} GovernedApis */
800
- /**
801
- * @typedef {object} GovernorPublic
802
- * @property {() => Promise<Instance>} getElectorate
803
- * @property {() => Instance} getGovernedContract
804
- * @property {(voteCounter: Instance) => Promise<void>} validateVoteCounter
805
- * @property {(regP: ERef<Instance>) => Promise<void>} validateElectorate
806
- * @property {(closingRule: ClosingRule) => void} validateTimer
807
- */
808
- /**
809
- * @typedef {object} ParamKey identifier for a paramManager within a contract
810
- * @property {unknown} key
811
- */
812
- /**
813
- * Description of a set of coordinated changes for a ParamManager
814
- *
815
- * @template P path for a paramManagerRetriever
816
- * @typedef {object} ParamChangesSpec<P>
817
- * @property {P} paramPath
818
- * @property {Record<string, ParamValue>} changes one or more changes to parameters
819
- */
820
- /**
821
- * @typedef {object} ContractGovernanceVoteResult
822
- * @property {Instance} instance - instance of the VoteCounter
823
- * @property {ERef<QuestionDetails>} details
824
- * @property {Promise<ParamValue>} outcomeOfUpdate - A promise for the result
825
- * of updating the parameter value. Primarily useful for its behavior on
826
- * rejection.
827
- */
828
- /**
829
- * @template {GovernableStartFn} SF Start function of governed contract
830
- * @typedef {object} GovernorCreatorFacet
831
- * @property {VoteOnParamChanges} voteOnParamChanges
832
- * @property {VoteOnApiInvocation} voteOnApiInvocation
833
- * @property {VoteOnOfferFilter} voteOnOfferFilter
834
- * @property {() => LimitedCF<SF>} getCreatorFacet facet of the governed contract,
835
- * with creator-like powers but without the tightly held ability to change
836
- * param values.
837
- * @property {(poserInvitation: Invitation) => Promise<void>} replaceElectorate
838
- * @property {() => AdminFacet} getAdminFacet
839
- * @property {() => GovernedPublicFacet<Awaited<ReturnType<SF>>['publicFacet']>} getPublicFacet - public facet of the governed contract
840
- * @property {() => Instance} getInstance - instance of the governed
841
- * contract
842
- */
843
- /**
844
- * @typedef GovernedPublicFacetMethods
845
- * @property {(key?: any) => StoredSubscription<GovernanceSubscriptionState>} getSubscription
846
- * @property {(key?: any) => ERef<ParamStateRecord>} getGovernedParams - get descriptions of
847
- * all the governed parameters
848
- * @property {(name: string) => Amount} getInvitationAmount
849
- */
850
- /**
851
- * @template {{}} PF Public facet
852
- * @typedef {PF & GovernedPublicFacetMethods} GovernedPublicFacet
853
- */
854
- /**
855
- * @template {GovernableStartFn} SF
856
- * @typedef {ReturnType<Awaited<ReturnType<SF>>['creatorFacet']['getLimitedCreatorFacet']>} LimitedCF
857
- */
858
- /**
859
- * @template {{}} CF creator facet
860
- * @typedef GovernedCreatorFacet
861
- * What a governed contract must return as its creatorFacet in order to be governed
862
- * @property {() => ParamManagerRetriever} getParamMgrRetriever - allows accessing
863
- * and updating governed parameters. Should only be directly accessible to the
864
- * contractGovernor
865
- * @property {() => ERef<CF>} getLimitedCreatorFacet - the creator
866
- * facet of the governed contract. Doesn't provide access to any governance
867
- * functionality
868
- * @property {(name: string) => Promise<Invitation>} getInvitation
869
- * @property {() => ERef<GovernedApis>} getGovernedApis
870
- * @property {() => (string | symbol)[]} getGovernedApiNames
871
- * @property {(strings: string[]) => void} setOfferFilter
872
- */
873
- /**
874
- * @typedef {{key: string}} StandardParamPath
875
- */
876
- /**
877
- * @typedef {object} ParamManagerRetriever
878
- * @property {(paramKey?: ParamKey) => AnyParamManager} get
879
- */
880
- /**
881
- * @template [P=StandardParamPath]
882
- *
883
- * @callback VoteOnParamChanges
884
- * @param {Installation} voteCounterInstallation
885
- * @param {import('@agoric/time/src/types').Timestamp} deadline
886
- * @param {ParamChangesSpec<P>} paramSpec
887
- * @returns {Promise<ContractGovernanceVoteResult>}
888
- */
889
- /**
890
- * @callback VoteOnApiInvocation
891
- * @param {string} apiMethodName
892
- * @param {unknown[]} methodArgs
893
- * @param {Installation} voteCounterInstallation
894
- * @param {import('@agoric/time/src/types').Timestamp} deadline
895
- * @returns {Promise<ContractGovernanceVoteResult>}
896
- */
897
- /**
898
- * @callback VoteOnOfferFilter
899
- * @param {Installation} voteCounterInstallation
900
- * @param {import('@agoric/time/src/types').Timestamp} deadline
901
- * @param {string[]} strings
902
- * @returns {Promise<ContractGovernanceVoteResult>}
903
- */
904
- /**
905
- * @typedef {object} ParamGovernor
906
- * @property {VoteOnParamChanges} voteOnParamChanges
907
- * @property {CreatedQuestion} createdQuestion
908
- */
909
- /**
910
- * @typedef {object} ApiGovernor
911
- * @property {VoteOnApiInvocation} voteOnApiInvocation
912
- * @property {CreatedQuestion} createdQuestion
913
- */
914
- /**
915
- * @typedef {object} FilterGovernor
916
- * @property {VoteOnOfferFilter} voteOnFilter
917
- * @property {CreatedQuestion} createdQuestion
918
- */
919
- /**
920
- * @callback CreatedQuestion
921
- * Was this question created by this ContractGovernor?
922
- * @param {Instance} questionInstance
923
- * @returns {boolean}
924
- */
925
- /**
926
- * @callback PositionIncluded
927
- * @param {Position[]} positions
928
- * @param {Position} position
929
- * @returns {boolean}
930
- */
931
- /**
932
- * @typedef {object} GovernedContractTerms
933
- * @property {import('@agoric/time/src/types').TimerService} timer
934
- * @property {IssuerKeywordRecord} issuerKeywordRecord
935
- * @property {object} privateArgs
936
- */
937
- /**
938
- * @callback AssertContractGovernance
939
- *
940
- * @param {ERef<ZoeService>} zoe
941
- * @param {import('@agoric/zoe/src/zoeService/utils.js').Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>} allegedGoverned
942
- * @param {Instance} allegedGovernor
943
- * @param {Installation<import('@agoric/governance/src/contractGovernor.js').start>} contractGovernorInstallation
944
- * @returns {Promise<GovernancePair>}
945
- */
946
- /**
947
- * @callback AssertContractElectorate - assert that the contract uses the
948
- * electorate
949
- *
950
- * @param {ERef<ZoeService>} zoe
951
- * @param {Instance} allegedGovernor
952
- * @param {Instance} allegedElectorate
953
- */
954
- /**
955
- * @typedef {import('@agoric/zoe/src/zoeService/utils.js').ContractStartFunction
956
- * & ((zcf?: any, pa?: any, baggage?: any) => ERef<{creatorFacet: GovernedCreatorFacet<{}>, publicFacet: GovernedPublicFacet<{}>}>)} GovernableStartFn
957
- */
958
- /**
959
- * @typedef {import('./contractGovernor.js')['start']} GovernorSF
960
- */
961
- /**
962
- * @see {StartedInstanceKit}
963
- * @template {ERef<Installation<GovernableStartFn>>} I
964
- * @typedef GovernorStartedInstallationKit
965
- * Same result as StartedInstanceKit but:
966
- * - typed for contractGovernor installation being started by Zoe. (It in turn starts the governed contract.)
967
- * - parameterized by Installation instead of StartFunction
968
- * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<GovernorSF>} instance
969
- * @property {AdminFacet} adminFacet
970
- * @property {GovernorCreatorFacet<InstallationStart<Awaited<I>>>} creatorFacet
971
- * @property {GovernorPublic} publicFacet
972
- */
973
- /**
974
- * @see {StartedInstanceKit}
975
- * @template {GovernableStartFn} SF
976
- * @typedef GovernanceFacetKit
977
- * Akin to StartedInstanceKit but designed for the results of starting governed contracts. Used in bootstrap space.
978
- * @property {AdminFacet} adminFacet of the governed contract
979
- * @property {LimitedCF<SF>} creatorFacet creator-like facet within the governed contract (without the powers the governor needs)
980
- * @property {GovernorCreatorFacet<SF>} governorCreatorFacet of the governing contract
981
- * @property {AdminFacet} governorAdminFacet of the governing contract
982
- * @property {Awaited<ReturnType<SF>>['publicFacet']} publicFacet
983
- * @property {Instance} instance
984
- * @property {Instance} governor
985
- */
986
- governedContractInstallation: Installation<SF>;
987
- governed: {
988
- issuerKeywordRecord: IssuerKeywordRecord;
989
- terms: {
990
- governedParams: {
991
- Electorate: import("./contractGovernance/typedParamManager.js").InvitationParam;
992
- };
993
- };
994
- label?: string | undefined;
995
- };
996
- }>, privateArgs: {
997
- governed: Record<string, unknown>;
998
- }, baggage: import("@agoric/swingset-liveslots").Baggage) => Promise<{
999
- creatorFacet: GovernorCreatorFacet<SF>;
1000
- publicFacet: GovernorPublic;
1001
- }>)>) => Promise<GovernancePair>;
1002
- /**
1003
- * - assert that the contract uses the
1004
- * electorate
1005
- */
1006
- type AssertContractElectorate = (zoe: ERef<ZoeService>, allegedGovernor: Instance, allegedElectorate: Instance) => any;
1007
- type GovernableStartFn = import("@agoric/zoe/src/zoeService/utils.js").ContractStartFunction & ((zcf?: any, pa?: any, baggage?: any) => ERef<{
1008
- creatorFacet: GovernedCreatorFacet<{}>;
1009
- publicFacet: GovernedPublicFacet<{}>;
1010
- }>);
1011
- type GovernorSF = typeof import("./contractGovernor.js")['start'];
1012
- /**
1013
- * Same result as StartedInstanceKit but:
1014
- * - typed for contractGovernor installation being started by Zoe. (It in turn starts the governed contract.)
1015
- * - parameterized by Installation instead of StartFunction
1016
- */
1017
- type GovernorStartedInstallationKit<I extends ERef<Installation<GovernableStartFn>>> = {
1018
- instance: import('@agoric/zoe/src/zoeService/utils.js').Instance<GovernorSF>;
1019
- adminFacet: AdminFacet;
1020
- creatorFacet: GovernorCreatorFacet<InstallationStart<Awaited<I>>>;
1021
- publicFacet: GovernorPublic;
1022
- };
1023
- /**
1024
- * Akin to StartedInstanceKit but designed for the results of starting governed contracts. Used in bootstrap space.
1025
- */
1026
- type GovernanceFacetKit<SF extends GovernableStartFn> = {
1027
- /**
1028
- * of the governed contract
1029
- */
1030
- adminFacet: AdminFacet;
1031
- /**
1032
- * creator-like facet within the governed contract (without the powers the governor needs)
1033
- */
1034
- creatorFacet: LimitedCF<SF>;
1035
- /**
1036
- * of the governing contract
1037
- */
1038
- governorCreatorFacet: GovernorCreatorFacet<SF>;
1039
- /**
1040
- * of the governing contract
1041
- */
1042
- governorAdminFacet: AdminFacet;
1043
- publicFacet: Awaited<ReturnType<SF>>['publicFacet'];
1044
- instance: Instance;
1045
- governor: Instance;
1046
- };
1047
- //# sourceMappingURL=types-ambient.d.ts.map