@agoric/governance 0.10.4-dev-5dc325b.0 → 0.10.4-getting-started-dev-d127d1d.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.
- package/CHANGELOG.md +448 -0
- package/package.json +26 -32
- package/src/binaryVoteCounter.d.ts +16 -0
- package/src/binaryVoteCounter.d.ts.map +1 -0
- package/src/binaryVoteCounter.js +0 -1
- package/src/breakTie.d.ts +2 -0
- package/src/breakTie.d.ts.map +1 -0
- package/src/closingRule.d.ts +3 -0
- package/src/closingRule.d.ts.map +1 -0
- package/src/committee.d.ts +23 -0
- package/src/committee.d.ts.map +1 -0
- package/src/committee.js +11 -20
- package/src/constants.d.ts +16 -0
- package/src/constants.d.ts.map +1 -0
- package/src/contractGovernance/assertions.d.ts +7 -0
- package/src/contractGovernance/assertions.d.ts.map +1 -0
- package/src/contractGovernance/governApi.d.ts +30 -0
- package/src/contractGovernance/governApi.d.ts.map +1 -0
- package/src/contractGovernance/governFilter.d.ts +25 -0
- package/src/contractGovernance/governFilter.d.ts.map +1 -0
- package/src/contractGovernance/governParam.d.ts +33 -0
- package/src/contractGovernance/governParam.d.ts.map +1 -0
- package/src/contractGovernance/paramManager.d.ts +45 -0
- package/src/contractGovernance/paramManager.d.ts.map +1 -0
- package/src/contractGovernance/paramManager.js +2 -3
- package/src/contractGovernance/typedParamManager.d.ts +29 -0
- package/src/contractGovernance/typedParamManager.d.ts.map +1 -0
- package/src/contractGovernor.d.ts +23 -0
- package/src/contractGovernor.d.ts.map +1 -0
- package/src/contractGovernor.js +4 -10
- package/src/contractGovernorKit.d.ts +80 -0
- package/src/contractGovernorKit.d.ts.map +1 -0
- package/src/contractGovernorKit.js +3 -3
- package/src/contractHelper.d.ts +136 -0
- package/src/contractHelper.d.ts.map +1 -0
- package/src/contractHelper.js +3 -3
- package/src/electorateTools.d.ts +46 -0
- package/src/electorateTools.d.ts.map +1 -0
- package/src/electorateTools.js +11 -15
- package/src/index.d.ts +9 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +5 -4
- package/src/multiCandidateVoteCounter.d.ts +16 -0
- package/src/multiCandidateVoteCounter.d.ts.map +1 -0
- package/src/multiCandidateVoteCounter.js +2 -3
- package/src/noActionElectorate.d.ts +8 -0
- package/src/noActionElectorate.d.ts.map +1 -0
- package/src/noActionElectorate.js +2 -7
- package/src/question.d.ts +27 -0
- package/src/question.d.ts.map +1 -0
- package/src/quorumCounter.d.ts +6 -0
- package/src/quorumCounter.d.ts.map +1 -0
- package/src/typeGuards.d.ts +173 -0
- package/src/typeGuards.d.ts.map +1 -0
- package/src/types-ambient.d.ts +1047 -0
- package/src/types-ambient.d.ts.map +1 -0
- package/src/types-ambient.js +5 -5
- package/src/types.d.ts +561 -0
- package/src/types.d.ts.map +1 -0
- package/src/types.js +5 -5
- package/src/validators.d.ts +16 -0
- package/src/validators.d.ts.map +1 -0
- package/src/validators.js +3 -2
- package/src/voterKit.d.ts +19 -0
- package/src/voterKit.d.ts.map +1 -0
- package/tools/puppetContractGovernor.d.ts +51 -0
- package/tools/puppetContractGovernor.d.ts.map +1 -0
- package/tools/puppetGovernance.d.ts +101 -0
- package/tools/puppetGovernance.d.ts.map +1 -0
- package/tools/puppetGovernance.js +2 -0
- package/tools/storageDoc.d.ts +10 -0
- package/tools/storageDoc.d.ts.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";;;;;;;;;oBACc,UAAU,GAAG,OAAO,GAAG,WAAW;;;;;;;oBAWlC,cAAc,GAAG,UAAU,GAAG,QAAQ,GAAG,gBAAgB,GACtE,cAAkB;iBAOL,OAAO,gBAAgB,EAAE,SAAS;kBAGlC,UAAU,GAAG,KAAK,GAAG,WAAW;;UAKhC,MAAM;;kBAIN,MAAM,GAAG,KAAK,GAAG,YAAY,GAAG,QAAQ,GAAG,MAAM,GAC9D,KAAS,GAAG,MAAM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ACnD,cAAc;;;;;;;;;gBAQd,UAAU;;;;kBACV,UAAU,EAAE,CAAC;;;;0BACb,qBAAqB,EAAE,CAAC;;;;wBACxB,UAAU;iBACV,QAAQ,WAAW,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;cACtC,QAAQ;cACR,QAAQ"}
|
package/src/types-ambient.js
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
*
|
|
66
66
|
* @template {import('./contractGovernance/typedParamManager.js').ParamTypesMap} T Governed parameters of contract
|
|
67
67
|
* @typedef {{
|
|
68
|
-
* electionManager: import('@agoric/zoe/src/zoeService/utils.js').Instance<import('./contractGovernor.js')['
|
|
68
|
+
* electionManager: import('@agoric/zoe/src/zoeService/utils.js').Instance<import('./contractGovernor.js')['prepare']>,
|
|
69
69
|
* governedParams: import('./contractGovernance/typedParamManager.js').ParamRecordsFromTypes<T & {
|
|
70
70
|
* Electorate: 'invitation'
|
|
71
71
|
* }>
|
|
@@ -615,7 +615,7 @@
|
|
|
615
615
|
* @param {Installation} voteCounterInstallation
|
|
616
616
|
* @param {import('@agoric/time/src/types').Timestamp} deadline
|
|
617
617
|
* @param {ParamChangesSpec<P>} paramSpec
|
|
618
|
-
* @returns {
|
|
618
|
+
* @returns {ContractGovernanceVoteResult}
|
|
619
619
|
*/
|
|
620
620
|
|
|
621
621
|
/**
|
|
@@ -632,7 +632,7 @@
|
|
|
632
632
|
* @param {Installation} voteCounterInstallation
|
|
633
633
|
* @param {import('@agoric/time/src/types').Timestamp} deadline
|
|
634
634
|
* @param {string[]} strings
|
|
635
|
-
* @returns {
|
|
635
|
+
* @returns {ContractGovernanceVoteResult}
|
|
636
636
|
*/
|
|
637
637
|
|
|
638
638
|
/**
|
|
@@ -680,7 +680,7 @@
|
|
|
680
680
|
* @param {ERef<ZoeService>} zoe
|
|
681
681
|
* @param {import('@agoric/zoe/src/zoeService/utils.js').Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>} allegedGoverned
|
|
682
682
|
* @param {Instance} allegedGovernor
|
|
683
|
-
* @param {Installation<import('@agoric/governance/src/contractGovernor.js').
|
|
683
|
+
* @param {Installation<import('@agoric/governance/src/contractGovernor.js').prepare>} contractGovernorInstallation
|
|
684
684
|
* @returns {Promise<GovernancePair>}
|
|
685
685
|
*/
|
|
686
686
|
|
|
@@ -699,7 +699,7 @@
|
|
|
699
699
|
*/
|
|
700
700
|
|
|
701
701
|
/**
|
|
702
|
-
* @typedef {import('./contractGovernor.js')['
|
|
702
|
+
* @typedef {import('./contractGovernor.js')['prepare']} GovernorSF
|
|
703
703
|
*/
|
|
704
704
|
|
|
705
705
|
// TODO find a way to parameterize the startInstance so the governed contract types flow
|
package/src/types.d.ts
ADDED
|
@@ -0,0 +1,561 @@
|
|
|
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
|
+
export 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
|
+
export type ElectionType = 'param_change' | 'election' | 'survey' | 'api_invocation' | 'offer_filter';
|
|
18
|
+
export type ParamType = import('./constants.js').ParamType;
|
|
19
|
+
export type QuorumRule = 'majority' | 'all' | 'no_quorum';
|
|
20
|
+
export type SimpleIssue = {
|
|
21
|
+
text: string;
|
|
22
|
+
};
|
|
23
|
+
export type ParamValue = Amount | Brand | Installation | Instance | bigint | Ratio | string | import('@agoric/time/src/types').TimestampRecord | import('@agoric/time/src/types').RelativeTimeRecord | unknown;
|
|
24
|
+
export 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
|
+
export 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
|
+
export type GovernanceTerms<T extends import("./contractGovernance/typedParamManager.js").ParamTypesMap> = {
|
|
36
|
+
electionManager: import('@agoric/zoe/src/zoeService/utils.js').Instance<typeof import("./contractGovernor.js")['prepare']>;
|
|
37
|
+
governedParams: import('./contractGovernance/typedParamManager.js').ParamRecordsFromTypes<T & {
|
|
38
|
+
Electorate: 'invitation';
|
|
39
|
+
}>;
|
|
40
|
+
};
|
|
41
|
+
export 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
|
+
export type QuestionTerms = {
|
|
48
|
+
questionSpec: QuestionSpec;
|
|
49
|
+
quorumThreshold: number;
|
|
50
|
+
electorate: Instance;
|
|
51
|
+
};
|
|
52
|
+
export type TextPosition = {
|
|
53
|
+
text: string;
|
|
54
|
+
};
|
|
55
|
+
export type Position = TextPosition | ChangeParamsPosition | NoChangeParamsPosition | InvokeApiPosition | DontInvokeApiPosition | OfferFilterPosition | NoChangeOfferFilterPosition | InvokeApiPosition;
|
|
56
|
+
export type OutcomeRecord = {
|
|
57
|
+
question: Handle<'Question'>;
|
|
58
|
+
} & ({
|
|
59
|
+
outcome: 'win';
|
|
60
|
+
position: Position;
|
|
61
|
+
} | {
|
|
62
|
+
outcome: 'fail';
|
|
63
|
+
reason: 'No quorum';
|
|
64
|
+
});
|
|
65
|
+
export 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
|
+
export 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
|
+
export 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
|
+
export type QuestionDetails = QuestionSpec & QuestionDetailsExtraProperties;
|
|
99
|
+
export type GovernancePair = {
|
|
100
|
+
governor: Instance;
|
|
101
|
+
governed: Instance;
|
|
102
|
+
};
|
|
103
|
+
export type Question = {
|
|
104
|
+
getVoteCounter: () => Instance;
|
|
105
|
+
getDetails: () => QuestionDetails;
|
|
106
|
+
};
|
|
107
|
+
export type CompleteUnrankedQuestion = {
|
|
108
|
+
questionHandle: Handle<'Question'>;
|
|
109
|
+
/**
|
|
110
|
+
* - a list of equal-weight preferred positions
|
|
111
|
+
*/
|
|
112
|
+
chosen: Position[];
|
|
113
|
+
};
|
|
114
|
+
export 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
|
+
export 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
|
+
export type PositionCount = {
|
|
131
|
+
position: Position;
|
|
132
|
+
total: bigint;
|
|
133
|
+
};
|
|
134
|
+
export type VoteStatistics = {
|
|
135
|
+
spoiled: bigint;
|
|
136
|
+
votes: number;
|
|
137
|
+
results: PositionCount[];
|
|
138
|
+
};
|
|
139
|
+
export type QuorumCounter = {
|
|
140
|
+
check: (stats: VoteStatistics) => boolean;
|
|
141
|
+
};
|
|
142
|
+
export 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
|
+
export type VoteCounterCreatorFacet = {
|
|
152
|
+
submitVote: SubmitVote;
|
|
153
|
+
};
|
|
154
|
+
export type VoteCounterPublicFacet = {
|
|
155
|
+
isOpen: () => boolean;
|
|
156
|
+
getQuestion: () => Question;
|
|
157
|
+
getOutcome: () => Promise<Position>;
|
|
158
|
+
getDetails: () => QuestionDetails;
|
|
159
|
+
getStats: () => Promise<VoteStatistics>;
|
|
160
|
+
};
|
|
161
|
+
export 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
|
+
export type VoteCounterCloseFacet = {
|
|
172
|
+
closeVoting: () => void;
|
|
173
|
+
};
|
|
174
|
+
export type VoteCounterFacets = {
|
|
175
|
+
publicFacet: VoteCounterPublicFacet;
|
|
176
|
+
creatorFacet: VoteCounterCreatorFacet;
|
|
177
|
+
closeFacet: VoteCounterCloseFacet;
|
|
178
|
+
};
|
|
179
|
+
export type MultiVoteCounterFacets = {
|
|
180
|
+
publicFacet: MultiVoteCounterPublicFacet;
|
|
181
|
+
creatorFacet: VoteCounterCreatorFacet;
|
|
182
|
+
closeFacet: VoteCounterCloseFacet;
|
|
183
|
+
};
|
|
184
|
+
export type BuildVoteCounter = (questionSpec: QuestionSpec, threshold: bigint, instance: Instance, publisher: ERef<Publisher<OutcomeRecord>>) => VoteCounterFacets;
|
|
185
|
+
export type BuildMultiVoteCounter = (questionSpec: QuestionSpec, threshold: bigint, instance: Instance, publisher: ERef<Publisher<MultiOutcomeRecord>>) => MultiVoteCounterFacets;
|
|
186
|
+
export type CompletedBallet = {
|
|
187
|
+
chosen: Position;
|
|
188
|
+
shares: bigint;
|
|
189
|
+
};
|
|
190
|
+
export type SubmitVote = (voterHandle: Handle<'Voter'>, chosenPositions: Position[], weight?: bigint | undefined) => CompletedBallet;
|
|
191
|
+
export type GetOpenQuestions = () => Promise<Handle<'Question'>[]>;
|
|
192
|
+
export type GetQuestion = (h: Handle<'Question'>) => Promise<Question>;
|
|
193
|
+
export type ElectoratePublic = {
|
|
194
|
+
getQuestionSubscriber: () => Subscriber<QuestionDetails>;
|
|
195
|
+
/**
|
|
196
|
+
* ,
|
|
197
|
+
*/
|
|
198
|
+
getOpenQuestions: GetOpenQuestions;
|
|
199
|
+
getInstance: () => Instance;
|
|
200
|
+
getQuestion: GetQuestion;
|
|
201
|
+
};
|
|
202
|
+
export type ClaimsElectoratePublic = ElectoratePublic & {
|
|
203
|
+
makeVoterInvitation: () => ERef<Invitation>;
|
|
204
|
+
};
|
|
205
|
+
export type CommitteeElectoratePublic = ElectoratePublic & {
|
|
206
|
+
getName: () => string;
|
|
207
|
+
};
|
|
208
|
+
export type PoserFacet = {
|
|
209
|
+
addQuestion: AddQuestion;
|
|
210
|
+
};
|
|
211
|
+
export 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
|
+
export 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
|
+
export type VoterFacet = {
|
|
231
|
+
submitVote: SubmitVote;
|
|
232
|
+
};
|
|
233
|
+
export type ClosingRule = {
|
|
234
|
+
timer: ERef<Timer>;
|
|
235
|
+
deadline: import('@agoric/time/src/types').Timestamp;
|
|
236
|
+
};
|
|
237
|
+
export type CloseVoting = (closingRule: ClosingRule, closeVoting: () => void) => any;
|
|
238
|
+
export 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
|
+
export type AddQuestion = (voteCounter: ERef<Installation>, questionSpec: QuestionSpec) => Promise<AddQuestionReturn>;
|
|
246
|
+
export type CreateQuestion = (name: string, proposedValue: ParamValue, voteCounterInstallation: Installation, contractInstance: Instance, closingRule: ClosingRule) => Promise<QuestionDetails>;
|
|
247
|
+
export type ParamChangeIssue<P = StandardParamPath> = {
|
|
248
|
+
spec: ParamChangesSpec<P>;
|
|
249
|
+
contract: import("@agoric/zoe/src/zoeService/utils.js").Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>;
|
|
250
|
+
};
|
|
251
|
+
export type ApiInvocationIssue = {
|
|
252
|
+
apiMethodName: string;
|
|
253
|
+
methodArgs: unknown[];
|
|
254
|
+
};
|
|
255
|
+
export type OfferFilterIssue = {
|
|
256
|
+
strings: string[];
|
|
257
|
+
};
|
|
258
|
+
export type ParamChangePositions = {
|
|
259
|
+
positive: ChangeParamsPosition;
|
|
260
|
+
negative: NoChangeParamsPosition;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* details for a question that can change a contract parameter
|
|
264
|
+
*/
|
|
265
|
+
export 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
|
+
export type ParamStateRecord = Record<Keyword, ParamValueTyped>;
|
|
285
|
+
export type GovernanceSubscriptionState = {
|
|
286
|
+
current: ParamStateRecord;
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* The base paramManager with typed getters
|
|
290
|
+
*/
|
|
291
|
+
export 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
|
+
export 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
|
+
export 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
|
+
export type AnyParamManager = ParamManagerBase & ParamManagerGettersAndUpdaters & {
|
|
328
|
+
updateParams: UpdateParams;
|
|
329
|
+
};
|
|
330
|
+
export type ParameterNameList = Record<string, string[]>;
|
|
331
|
+
export 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
|
+
export type BuildParamManager = (paramDescriptions: Iterable<ParamValueTyped>) => AnyParamManager;
|
|
341
|
+
export type ChangeParamsPosition = {
|
|
342
|
+
/**
|
|
343
|
+
* one or more changes to parameters
|
|
344
|
+
*/
|
|
345
|
+
changes: Record<string, ParamValue>;
|
|
346
|
+
};
|
|
347
|
+
export type OfferFilterPosition = {
|
|
348
|
+
strings: string[];
|
|
349
|
+
};
|
|
350
|
+
export type NoChangeOfferFilterPosition = {
|
|
351
|
+
dontUpdate: string[];
|
|
352
|
+
};
|
|
353
|
+
export type InvokeApiPosition = {
|
|
354
|
+
apiMethodName: string;
|
|
355
|
+
methodArgs: unknown[];
|
|
356
|
+
};
|
|
357
|
+
export type DontInvokeApiPosition = {
|
|
358
|
+
dontInvoke: string;
|
|
359
|
+
};
|
|
360
|
+
export type NoChangeParamsPosition = {
|
|
361
|
+
/**
|
|
362
|
+
* Parameters in the proposal that this position
|
|
363
|
+
* is opposed to
|
|
364
|
+
*/
|
|
365
|
+
noChange: string[];
|
|
366
|
+
};
|
|
367
|
+
export type Governor = {
|
|
368
|
+
createQuestion: CreateQuestion;
|
|
369
|
+
};
|
|
370
|
+
export type GovernedApis = {
|
|
371
|
+
[methodName: string]: (...args: any) => unknown;
|
|
372
|
+
};
|
|
373
|
+
export 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
|
+
export type ParamKey = {
|
|
384
|
+
key: unknown;
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* <P>
|
|
388
|
+
*/
|
|
389
|
+
export type ParamChangesSpec<P> = {
|
|
390
|
+
paramPath: P;
|
|
391
|
+
/**
|
|
392
|
+
* one or more changes to parameters
|
|
393
|
+
*/
|
|
394
|
+
changes: Record<string, ParamValue>;
|
|
395
|
+
};
|
|
396
|
+
export 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
|
+
export 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
|
+
export 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
|
+
export type GovernedPublicFacet<PF extends {}> = PF & GovernedPublicFacetMethods;
|
|
441
|
+
export 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
|
+
export 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
|
+
export type StandardParamPath = {
|
|
464
|
+
key: string;
|
|
465
|
+
};
|
|
466
|
+
export type ParamManagerRetriever = {
|
|
467
|
+
get: (paramKey?: ParamKey) => AnyParamManager;
|
|
468
|
+
};
|
|
469
|
+
export type VoteOnParamChanges<P = StandardParamPath> = (voteCounterInstallation: Installation, deadline: import('@agoric/time/src/types').Timestamp, paramSpec: ParamChangesSpec<P>) => ContractGovernanceVoteResult;
|
|
470
|
+
export type VoteOnApiInvocation = (apiMethodName: string, methodArgs: unknown[], voteCounterInstallation: Installation, deadline: import('@agoric/time/src/types').Timestamp) => Promise<ContractGovernanceVoteResult>;
|
|
471
|
+
export type VoteOnOfferFilter = (voteCounterInstallation: Installation, deadline: import('@agoric/time/src/types').Timestamp, strings: string[]) => ContractGovernanceVoteResult;
|
|
472
|
+
export type ParamGovernor = {
|
|
473
|
+
voteOnParamChanges: VoteOnParamChanges;
|
|
474
|
+
createdQuestion: CreatedQuestion;
|
|
475
|
+
};
|
|
476
|
+
export type ApiGovernor = {
|
|
477
|
+
voteOnApiInvocation: VoteOnApiInvocation;
|
|
478
|
+
createdQuestion: CreatedQuestion;
|
|
479
|
+
};
|
|
480
|
+
export type FilterGovernor = {
|
|
481
|
+
voteOnFilter: VoteOnOfferFilter;
|
|
482
|
+
createdQuestion: CreatedQuestion;
|
|
483
|
+
};
|
|
484
|
+
/**
|
|
485
|
+
* Was this question created by this ContractGovernor?
|
|
486
|
+
*/
|
|
487
|
+
export type CreatedQuestion = (questionInstance: Instance) => boolean;
|
|
488
|
+
export type PositionIncluded = (positions: Position[], position: Position) => boolean;
|
|
489
|
+
export type GovernedContractTerms = {
|
|
490
|
+
timer: import('@agoric/time/src/types').TimerService;
|
|
491
|
+
issuerKeywordRecord: IssuerKeywordRecord;
|
|
492
|
+
privateArgs: object;
|
|
493
|
+
};
|
|
494
|
+
export type AssertContractGovernance = (zoe: ERef<ZoeService>, allegedGoverned: import("@agoric/zoe/src/zoeService/utils.js").Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>, allegedGovernor: Instance, contractGovernorInstallation: Installation<(<SF extends globalThis.GovernableStartFn>(zcf: ZCF<{
|
|
495
|
+
timer: import("@agoric/time/src/types").TimerService;
|
|
496
|
+
governedContractInstallation: Installation<SF>;
|
|
497
|
+
governed: {
|
|
498
|
+
issuerKeywordRecord: IssuerKeywordRecord;
|
|
499
|
+
terms: {
|
|
500
|
+
governedParams: {
|
|
501
|
+
Electorate: import("./contractGovernance/typedParamManager.js").InvitationParam;
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
label?: string | undefined;
|
|
505
|
+
};
|
|
506
|
+
}>, privateArgs: {
|
|
507
|
+
governed: Record<string, unknown>; /**
|
|
508
|
+
* @typedef {object} PositionCount
|
|
509
|
+
* @property {Position} position
|
|
510
|
+
* @property {bigint} total
|
|
511
|
+
*/
|
|
512
|
+
}, baggage: MapStore<string, unknown>) => Promise<{
|
|
513
|
+
creatorFacet: globalThis.GovernorCreatorFacet<SF>;
|
|
514
|
+
publicFacet: globalThis.GovernorPublic;
|
|
515
|
+
}>)>) => Promise<GovernancePair>;
|
|
516
|
+
/**
|
|
517
|
+
* - assert that the contract uses the
|
|
518
|
+
* electorate
|
|
519
|
+
*/
|
|
520
|
+
export type AssertContractElectorate = (zoe: ERef<ZoeService>, allegedGovernor: Instance, allegedElectorate: Instance) => any;
|
|
521
|
+
export type GovernableStartFn = import("@agoric/zoe/src/zoeService/utils.js").ContractStartFunction & ((zcf?: any, pa?: any, baggage?: any) => ERef<{
|
|
522
|
+
creatorFacet: GovernedCreatorFacet<{}>;
|
|
523
|
+
publicFacet: GovernedPublicFacet<{}>;
|
|
524
|
+
}>);
|
|
525
|
+
export type GovernorSF = typeof import("./contractGovernor.js")['prepare'];
|
|
526
|
+
/**
|
|
527
|
+
* Same result as StartedInstanceKit but:
|
|
528
|
+
* - typed for contractGovernor installation being started by Zoe. (It in turn starts the governed contract.)
|
|
529
|
+
* - parameterized by Installation instead of StartFunction
|
|
530
|
+
*/
|
|
531
|
+
export type GovernorStartedInstallationKit<I extends ERef<Installation<GovernableStartFn>>> = {
|
|
532
|
+
instance: import('@agoric/zoe/src/zoeService/utils.js').Instance<GovernorSF>;
|
|
533
|
+
adminFacet: AdminFacet;
|
|
534
|
+
creatorFacet: GovernorCreatorFacet<InstallationStart<Awaited<I>>>;
|
|
535
|
+
publicFacet: GovernorPublic;
|
|
536
|
+
};
|
|
537
|
+
/**
|
|
538
|
+
* Akin to StartedInstanceKit but designed for the results of starting governed contracts. Used in bootstrap space.
|
|
539
|
+
*/
|
|
540
|
+
export type GovernanceFacetKit<SF extends GovernableStartFn> = {
|
|
541
|
+
/**
|
|
542
|
+
* of the governed contract
|
|
543
|
+
*/
|
|
544
|
+
adminFacet: AdminFacet;
|
|
545
|
+
/**
|
|
546
|
+
* creator-like facet within the governed contract (without the powers the governor needs)
|
|
547
|
+
*/
|
|
548
|
+
creatorFacet: LimitedCF<SF>;
|
|
549
|
+
/**
|
|
550
|
+
* of the governing contract
|
|
551
|
+
*/
|
|
552
|
+
governorCreatorFacet: GovernorCreatorFacet<SF>;
|
|
553
|
+
/**
|
|
554
|
+
* of the governing contract
|
|
555
|
+
*/
|
|
556
|
+
governorAdminFacet: AdminFacet;
|
|
557
|
+
publicFacet: Awaited<ReturnType<SF>>['publicFacet'];
|
|
558
|
+
instance: Instance;
|
|
559
|
+
governor: Instance;
|
|
560
|
+
};
|
|
561
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;;;;;;;;2BAEc,UAAU,GAAG,OAAO,GAAG,WAAW;;;;;;;2BAWlC,cAAc,GAAG,UAAU,GAAG,QAAQ,GAAG,gBAAgB,GACtE,cAAkB;wBAOL,OAAO,gBAAgB,EAAE,SAAS;yBAGlC,UAAU,GAAG,KAAK,GAAG,WAAW;;UAKhC,MAAM;;yBAIN,MAAM,GAAG,KAAK,GAAG,YAAY,GAAG,QAAQ,GAAG,MAAM,GAC9D,KAAS,GAAG,MAAM,GAAG,OAAO,wBAAwB,EAAE,eAAe,GACrE,OAAW,wBAAwB,EAAE,kBAAkB,GAAG,OAAO;8EAQrD,CAAC,SAAS,QAAQ,GAAG,OAAO,GAAG,CAAC,GAC5C,CAAG,SAAS,OAAO,GAAG,KAAK,GAC3B,CAAG,SAAS,cAAc,GAAG,YAAY,GACzC,CAAG,SAAS,UAAU,GAAG,QAAQ,GACjC,CAAG,SAAS,YAAY,GAAG,OAAO,KAAK,CAAC,GACxC,CAAG,SAAS,KAAK,GAAG,MAAM,GAC1B,CAAG,SAAS,OAAO,GAAG,KAAK,GAC3B,CAAG,SAAS,QAAQ,GAAG,MAAM,GAC7B,CAAG,SAAS,WAAW,GAAG,OAAO,cAAc,EAAE,SAAS,GAC1D,CAAG,SAAS,cAAc,GAAG,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AMlB,QAAQ,KACN,OAAO;2CAKT,QAAQ,EAAE,YACV,QAAQ,KACN,OAAO;;WAKN,OAAO,wBAAwB,EAAE,YAAY;yBAC7C,mBAAmB;iBACnB,MAAM;;6CAMT,KAAK,UAAU,CAAC,gFAC6C,IAAI,gBAAgB,EAAE,CAAC,CAAC,KAAK,EAAE,oBAC5F,QAAQ,gCACR;;;;;;;;;;;;;uCA7fX;;;;OAIG;;;;IAyfkF,KACxE,QAAQ,cAAc,CAAC;;;;;6CAOzB,KAAK,UAAU,CAAC,mBAChB,QAAQ,qBACR,QAAQ;8GAKN,GAAG,OAAO,GAAG,YAAY,GAAG,KAAK,KAAK;IAAC,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;IAAC,WAAW,EAAE,oBAAoB,EAAE,CAAC,CAAA;CAAC,CAAC;yBAIrH,uCAAgC,SAAS,CAAC;;;;;;;cAWzC,OAAO,qCAAqC,EAAE,QAAQ,CAAC,UAAU,CAAC;gBAClE,UAAU;kBACV,qBAAqB,kBAAkB,QAAQ,CAAC,CAAC,CAAC,CAAC;iBACnD,cAAc;;;;;;;;;gBAQd,UAAU;;;;kBACV,UAAU,EAAE,CAAC;;;;0BACb,qBAAqB,EAAE,CAAC;;;;wBACxB,UAAU;iBACV,QAAQ,WAAW,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;cACtC,QAAQ;cACR,QAAQ"}
|
package/src/types.js
CHANGED
|
@@ -66,7 +66,7 @@ export {};
|
|
|
66
66
|
*
|
|
67
67
|
* @template {import('./contractGovernance/typedParamManager.js').ParamTypesMap} T Governed parameters of contract
|
|
68
68
|
* @typedef {{
|
|
69
|
-
* electionManager: import('@agoric/zoe/src/zoeService/utils.js').Instance<import('./contractGovernor.js')['
|
|
69
|
+
* electionManager: import('@agoric/zoe/src/zoeService/utils.js').Instance<import('./contractGovernor.js')['prepare']>,
|
|
70
70
|
* governedParams: import('./contractGovernance/typedParamManager.js').ParamRecordsFromTypes<T & {
|
|
71
71
|
* Electorate: 'invitation'
|
|
72
72
|
* }>
|
|
@@ -616,7 +616,7 @@ export {};
|
|
|
616
616
|
* @param {Installation} voteCounterInstallation
|
|
617
617
|
* @param {import('@agoric/time/src/types').Timestamp} deadline
|
|
618
618
|
* @param {ParamChangesSpec<P>} paramSpec
|
|
619
|
-
* @returns {
|
|
619
|
+
* @returns {ContractGovernanceVoteResult}
|
|
620
620
|
*/
|
|
621
621
|
|
|
622
622
|
/**
|
|
@@ -633,7 +633,7 @@ export {};
|
|
|
633
633
|
* @param {Installation} voteCounterInstallation
|
|
634
634
|
* @param {import('@agoric/time/src/types').Timestamp} deadline
|
|
635
635
|
* @param {string[]} strings
|
|
636
|
-
* @returns {
|
|
636
|
+
* @returns {ContractGovernanceVoteResult}
|
|
637
637
|
*/
|
|
638
638
|
|
|
639
639
|
/**
|
|
@@ -681,7 +681,7 @@ export {};
|
|
|
681
681
|
* @param {ERef<ZoeService>} zoe
|
|
682
682
|
* @param {import('@agoric/zoe/src/zoeService/utils.js').Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>} allegedGoverned
|
|
683
683
|
* @param {Instance} allegedGovernor
|
|
684
|
-
* @param {Installation<import('@agoric/governance/src/contractGovernor.js').
|
|
684
|
+
* @param {Installation<import('@agoric/governance/src/contractGovernor.js').prepare>} contractGovernorInstallation
|
|
685
685
|
* @returns {Promise<GovernancePair>}
|
|
686
686
|
*/
|
|
687
687
|
|
|
@@ -700,7 +700,7 @@ export {};
|
|
|
700
700
|
*/
|
|
701
701
|
|
|
702
702
|
/**
|
|
703
|
-
* @typedef {import('./contractGovernor.js')['
|
|
703
|
+
* @typedef {import('./contractGovernor.js')['prepare']} GovernorSF
|
|
704
704
|
*/
|
|
705
705
|
|
|
706
706
|
// TODO find a way to parameterize the startInstance so the governed contract types flow
|