@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":"contractHelper.d.ts","sourceRoot":"","sources":["contractHelper.js"],"names":[],"mappings":"AAcA,kDAAmD;AAsB5C,wCAHI,IAAI,gBAAgB,EAAE,CAAC,GAAG,EAAE,CAAC,gBAC7B,OAAO,wCAAwC,EAAE,iBAAiB,CAAC,OAAO,CAAC,iBAerF;AAyLD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,yKALW,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wHAtImB,OAAO;;yCAuCC,OAAO,WAAW,OAAO,EAAE,KAAK,OAAO;;;6CAAvC,OAAO,WAAW,OAAO,EAAE,KAAK,OAAO;;;6CAAvC,OAAO,WAAW,OAAO,EAAE,KAAK,OAAO;;;qJAgC/C,OAAO;;;;;;;;;;;;;YAkBvC,iCAAiC;mCAAhB,YAAY;;;;;;;;;;;;;;;YAA7B,iCAAiC;mCAAhB,YAAY;;;;;;;;;EAuEpC"}
|
package/src/contractHelper.js
CHANGED
|
@@ -32,7 +32,7 @@ const publicMixinAPI = harden({
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* @param {ZCF<GovernanceTerms<{}> & {}>} zcf
|
|
35
|
-
* @param {import('./contractGovernance/typedParamManager').TypedParamManager<
|
|
35
|
+
* @param {import('./contractGovernance/typedParamManager').TypedParamManager<unknown>} paramManager
|
|
36
36
|
*/
|
|
37
37
|
export const validateElectorate = (zcf, paramManager) => {
|
|
38
38
|
const { governedParams } = zcf.getTerms();
|
|
@@ -53,7 +53,7 @@ harden(validateElectorate);
|
|
|
53
53
|
/**
|
|
54
54
|
* Utility function for `makeParamGovernance`.
|
|
55
55
|
*
|
|
56
|
-
* @template
|
|
56
|
+
* @template T
|
|
57
57
|
* @param {ZCF<GovernanceTerms<{}> & {}>} zcf
|
|
58
58
|
* @param {import('./contractGovernance/typedParamManager').TypedParamManager<T>} paramManager
|
|
59
59
|
*/
|
|
@@ -155,7 +155,7 @@ const facetHelpers = (zcf, paramManager) => {
|
|
|
155
155
|
* @param {{ [methodName: string]: (context?: unknown, ...rest: unknown[]) => unknown}} limitedCreatorFacet
|
|
156
156
|
*/
|
|
157
157
|
const makeVirtualGovernorFacet = limitedCreatorFacet => {
|
|
158
|
-
/** @type {import('@agoric/
|
|
158
|
+
/** @type {import('@agoric/vat-data/src/types.js').FunctionsPlusContext<unknown, GovernedCreatorFacet<limitedCreatorFacet>>} */
|
|
159
159
|
const governorFacet = harden({
|
|
160
160
|
getParamMgrRetriever: () =>
|
|
161
161
|
Far('paramRetriever', { get: () => paramManager }),
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type QuestionRecord = {
|
|
2
|
+
voteCap: ERef<VoteCounterCreatorFacet>;
|
|
3
|
+
publicFacet: VoteCounterPublicFacet;
|
|
4
|
+
deadline: import('@agoric/time/src/types').Timestamp;
|
|
5
|
+
};
|
|
6
|
+
export type StartCounter = (zcf: ZCF, questionSpec: QuestionSpec, quorumThreshold: unknown, voteCounter: ERef<Installation>, questionStore: MapStore<Handle<'Question'>, QuestionRecord>, questionPublisher: Publisher<unknown>, outcomePublisher: Publisher<OutcomeRecord>) => AddQuestionReturn;
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {object} QuestionRecord
|
|
9
|
+
* @property {ERef<VoteCounterCreatorFacet>} voteCap
|
|
10
|
+
* @property {VoteCounterPublicFacet} publicFacet
|
|
11
|
+
* @property {import('@agoric/time/src/types').Timestamp} deadline
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* @callback StartCounter
|
|
15
|
+
* @param {ZCF} zcf
|
|
16
|
+
* @param {QuestionSpec} questionSpec
|
|
17
|
+
* @param {unknown} quorumThreshold
|
|
18
|
+
* @param {ERef<Installation>} voteCounter
|
|
19
|
+
* @param {MapStore<Handle<'Question'>, QuestionRecord>} questionStore
|
|
20
|
+
* @param {Publisher<unknown>} questionPublisher
|
|
21
|
+
* @param {Publisher<OutcomeRecord>} outcomePublisher
|
|
22
|
+
* @returns {AddQuestionReturn}
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Start up a new Counter for a question
|
|
26
|
+
*
|
|
27
|
+
* @type {StartCounter}
|
|
28
|
+
*/
|
|
29
|
+
export const startCounter: StartCounter;
|
|
30
|
+
/** @param {MapStore<Handle<'Question'>, QuestionRecord>} questionStore */
|
|
31
|
+
export function getOpenQuestions(questionStore: MapStore<Handle<'Question'>, QuestionRecord>): Promise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* @param {ERef<Handle<'Question'>>} questionHandleP
|
|
34
|
+
* @param {MapStore<Handle<'Question'>, QuestionRecord>} questionStore
|
|
35
|
+
*/
|
|
36
|
+
export function getQuestion(questionHandleP: ERef<Handle<'Question'>>, questionStore: MapStore<Handle<'Question'>, QuestionRecord>): Promise<Question>;
|
|
37
|
+
/**
|
|
38
|
+
* @param {ZCF} zcf
|
|
39
|
+
* @param {AddQuestion} addQuestion
|
|
40
|
+
*/
|
|
41
|
+
export function getPoserInvitation(zcf: ZCF, addQuestion: AddQuestion): Promise<Invitation<{
|
|
42
|
+
addQuestion: AddQuestion;
|
|
43
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
44
|
+
addQuestion: AddQuestion;
|
|
45
|
+
}>, never>>;
|
|
46
|
+
//# sourceMappingURL=electorateTools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electorateTools.d.ts","sourceRoot":"","sources":["electorateTools.js"],"names":[],"mappings":";aAKc,KAAK,uBAAuB,CAAC;iBAC7B,sBAAsB;cACtB,OAAO,wBAAwB,EAAE,SAAS;;iCAK7C,GAAG,gBACH,YAAY,mBACZ,OAAO,eACP,KAAK,YAAY,CAAC,iBAClB,SAAS,OAAO,UAAU,CAAC,EAAE,cAAc,CAAC,qBAC5C,UAAU,OAAO,CAAC,oBAClB,UAAU,aAAa,CAAC,KACtB,iBAAiB;AAhB9B;;;;;GAKG;AAEH;;;;;;;;;;GAUG;AAEH;;;;GAIG;AACH,2BAFU,YAAY,CAsCpB;AAEF,0EAA0E;AAC1E,gDADY,SAAS,OAAO,UAAU,CAAC,EAAE,cAAc,CAAC,gBAYvD;AAED;;;GAGG;AACH,6CAHW,KAAK,OAAO,UAAU,CAAC,CAAC,iBACxB,SAAS,OAAO,UAAU,CAAC,EAAE,cAAc,CAAC,qBAKpD;AAEH;;;GAGG;AACH,wCAHW,GAAG,eACH,WAAW;;;;YAKrB"}
|
package/src/electorateTools.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EmptyProposalShape } from '@agoric/zoe/src/typeGuards.js';
|
|
2
1
|
import { E } from '@endo/eventual-send';
|
|
3
2
|
import { deeplyFulfilled, Far } from '@endo/marshal';
|
|
4
3
|
|
|
@@ -10,16 +9,21 @@ import { deeplyFulfilled, Far } from '@endo/marshal';
|
|
|
10
9
|
*/
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* @callback StartCounter
|
|
15
13
|
* @param {ZCF} zcf
|
|
16
14
|
* @param {QuestionSpec} questionSpec
|
|
17
15
|
* @param {unknown} quorumThreshold
|
|
18
16
|
* @param {ERef<Installation>} voteCounter
|
|
19
17
|
* @param {MapStore<Handle<'Question'>, QuestionRecord>} questionStore
|
|
20
|
-
* @param {Publisher<unknown>}
|
|
18
|
+
* @param {Publisher<unknown>} questionPublisher
|
|
21
19
|
* @param {Publisher<OutcomeRecord>} outcomePublisher
|
|
22
|
-
* @returns {
|
|
20
|
+
* @returns {AddQuestionReturn}
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Start up a new Counter for a question
|
|
25
|
+
*
|
|
26
|
+
* @type {StartCounter}
|
|
23
27
|
*/
|
|
24
28
|
const startCounter = async (
|
|
25
29
|
zcf,
|
|
@@ -87,16 +91,8 @@ const getQuestion = (questionHandleP, questionStore) =>
|
|
|
87
91
|
* @param {AddQuestion} addQuestion
|
|
88
92
|
*/
|
|
89
93
|
const getPoserInvitation = (zcf, addQuestion) => {
|
|
90
|
-
const questionPoserHandler =
|
|
91
|
-
|
|
92
|
-
return Far(`questionPoser`, { addQuestion });
|
|
93
|
-
};
|
|
94
|
-
return zcf.makeInvitation(
|
|
95
|
-
questionPoserHandler,
|
|
96
|
-
`questionPoser`,
|
|
97
|
-
undefined,
|
|
98
|
-
EmptyProposalShape,
|
|
99
|
-
);
|
|
94
|
+
const questionPoserHandler = () => Far(`questionPoser`, { addQuestion });
|
|
95
|
+
return zcf.makeInvitation(questionPoserHandler, `questionPoser`);
|
|
100
96
|
};
|
|
101
97
|
|
|
102
98
|
harden(startCounter);
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { ParamTypes } from "./constants.js";
|
|
2
|
+
export { ChoiceMethod, ElectionType, QuorumRule, coerceQuestionSpec, positionIncluded, buildQuestion } from "./question.js";
|
|
3
|
+
export { validateQuestionDetails, validateQuestionFromCounter } from "./contractGovernor.js";
|
|
4
|
+
export { handleParamGovernance, publicMixinAPI } from "./contractHelper.js";
|
|
5
|
+
export { assertBallotConcernsParam, makeParamChangePositions, setupParamGovernance, CONTRACT_ELECTORATE } from "./contractGovernance/governParam.js";
|
|
6
|
+
export { assertElectorateMatches, makeParamManagerBuilder } from "./contractGovernance/paramManager.js";
|
|
7
|
+
export { makeParamManager, makeParamManagerSync } from "./contractGovernance/typedParamManager.js";
|
|
8
|
+
export { assertContractGovernance, assertContractElectorate } from "./validators.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":""}
|
package/src/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// Ambient types. https://github.com/Agoric/agoric-sdk/issues/6512
|
|
2
|
+
import '@agoric/swingset-vat/src/vats/network/types.js';
|
|
3
|
+
import '@agoric/ertp/exported.js';
|
|
4
|
+
import '@agoric/zoe/exported.js';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
import './types-ambient.js';
|
|
6
7
|
|
|
7
8
|
export {
|
|
8
9
|
ChoiceMethod,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** @type {BuildMultiVoteCounter} */
|
|
2
|
+
export const makeMultiCandidateVoteCounter: BuildMultiVoteCounter;
|
|
3
|
+
/**
|
|
4
|
+
* @param {ZCF<{questionSpec: QuestionSpec, quorumThreshold: bigint }>} zcf
|
|
5
|
+
* @param {{outcomePublisher: Publisher<MultiOutcomeRecord>}} outcomePublisher
|
|
6
|
+
*/
|
|
7
|
+
export function start(zcf: ZCF<{
|
|
8
|
+
questionSpec: QuestionSpec;
|
|
9
|
+
quorumThreshold: bigint;
|
|
10
|
+
}>, { outcomePublisher }: {
|
|
11
|
+
outcomePublisher: Publisher<MultiOutcomeRecord>;
|
|
12
|
+
}): {
|
|
13
|
+
publicFacet: MultiVoteCounterPublicFacet;
|
|
14
|
+
creatorFacet: VoteCounterCreatorFacet;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=multiCandidateVoteCounter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiCandidateVoteCounter.d.ts","sourceRoot":"","sources":["multiCandidateVoteCounter.js"],"names":[],"mappings":"AAgCA,oCAAoC;AACpC,4CADW,qBAAqB,CAwL9B;AAEF;;;GAGG;AACH;kBAH8B,YAAY;qBAAmB,MAAM;0BACxD;IAAC,gBAAgB,EAAE,UAAU,kBAAkB,CAAC,CAAA;CAAC;;;EAgB3D"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint @typescript-eslint/no-floating-promises: "warn" */
|
|
2
1
|
import { keyEQ, makeExo, makeScalarMapStore } from '@agoric/store';
|
|
3
2
|
import { E } from '@endo/eventual-send';
|
|
4
3
|
import { makePromiseKit } from '@endo/promise-kit';
|
|
@@ -170,10 +169,10 @@ const makeMultiCandidateVoteCounter = (
|
|
|
170
169
|
chosenPositions.length <= maxChoices ||
|
|
171
170
|
Fail`The number of choices exceeds the max choices.`;
|
|
172
171
|
|
|
173
|
-
|
|
172
|
+
chosenPositions.forEach(position => {
|
|
174
173
|
positionIncluded(positions, position) ||
|
|
175
174
|
Fail`The specified choice is not a legal position: ${position}.`;
|
|
176
|
-
}
|
|
175
|
+
});
|
|
177
176
|
|
|
178
177
|
const completedBallot = harden({ chosen: chosenPositions, shares });
|
|
179
178
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This Electorate visibly has no members, takes no votes, and approves no
|
|
3
|
+
* changes.
|
|
4
|
+
*
|
|
5
|
+
* @type {ContractStartFn<ElectoratePublic, ElectorateCreatorFacet>}
|
|
6
|
+
*/
|
|
7
|
+
export const start: ContractStartFn<ElectoratePublic, ElectorateCreatorFacet>;
|
|
8
|
+
//# sourceMappingURL=noActionElectorate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noActionElectorate.d.ts","sourceRoot":"","sources":["noActionElectorate.js"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,oBAFW,gBAAgB,gBAAgB,EAAE,sBAAsB,CAAC,CA+ClE"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { makePublishKit } from '@agoric/notifier';
|
|
2
2
|
import { makePromiseKit } from '@endo/promise-kit';
|
|
3
3
|
import { makeExo } from '@agoric/store';
|
|
4
|
-
import { EmptyProposalShape } from '@agoric/zoe/src/typeGuards.js';
|
|
5
4
|
|
|
6
5
|
import { ElectoratePublicI, ElectorateCreatorI } from './typeGuards.js';
|
|
7
6
|
|
|
@@ -38,12 +37,8 @@ const start = zcf => {
|
|
|
38
37
|
|
|
39
38
|
const creatorFacet = makeExo('creatorFacet', ElectorateCreatorI, {
|
|
40
39
|
getPoserInvitation() {
|
|
41
|
-
return zcf.makeInvitation(
|
|
42
|
-
|
|
43
|
-
`noActionElectorate doesn't allow posing questions`,
|
|
44
|
-
undefined,
|
|
45
|
-
EmptyProposalShape,
|
|
46
|
-
);
|
|
40
|
+
return zcf.makeInvitation(() => {},
|
|
41
|
+
`noActionElectorate doesn't allow posing questions`);
|
|
47
42
|
},
|
|
48
43
|
addQuestion(_instance, _question) {
|
|
49
44
|
throw Error(`noActionElectorate doesn't add questions.`);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @type {BuildQuestion} */
|
|
2
|
+
export const buildQuestion: BuildQuestion;
|
|
3
|
+
export namespace ChoiceMethod {
|
|
4
|
+
const UNRANKED: "unranked";
|
|
5
|
+
const ORDER: "order";
|
|
6
|
+
const PLURALITY: "plurality";
|
|
7
|
+
}
|
|
8
|
+
export namespace ElectionType {
|
|
9
|
+
const PARAM_CHANGE: "param_change";
|
|
10
|
+
const ELECTION: "election";
|
|
11
|
+
const SURVEY: "survey";
|
|
12
|
+
const API_INVOCATION: "api_invocation";
|
|
13
|
+
const OFFER_FILTER: "offer_filter";
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @param {QuestionSpec} allegedQuestionSpec
|
|
17
|
+
* @returns {QuestionSpec}
|
|
18
|
+
*/
|
|
19
|
+
export function coerceQuestionSpec({ method, issue, positions, electionType, maxChoices, maxWinners, closingRule, quorumRule, tieOutcome, }: QuestionSpec): QuestionSpec;
|
|
20
|
+
/** @type {PositionIncluded} */
|
|
21
|
+
export const positionIncluded: PositionIncluded;
|
|
22
|
+
export namespace QuorumRule {
|
|
23
|
+
const MAJORITY: "majority";
|
|
24
|
+
const NO_QUORUM: "no_quorum";
|
|
25
|
+
const ALL: "all";
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=question.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["question.js"],"names":[],"mappings":"AAgFA,4BAA4B;AAC5B,4BADW,aAAa,CAiBtB;;;;;;;;;;;;;AAvDF;;;GAGG;AACH,6IAHW,YAAY,GACV,YAAY,CAkCxB;AAvCD,+BAA+B;AAC/B,+BADW,gBAAgB,CACiD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quorumCounter.d.ts","sourceRoot":"","sources":["quorumCounter.js"],"names":[],"mappings":"AAIO;;;;GAUN"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
export const ChoiceMethodShape: import("@endo/patterns").Matcher;
|
|
2
|
+
export const QuorumRuleShape: import("@endo/patterns").Matcher;
|
|
3
|
+
export const ElectionTypeShape: import("@endo/patterns").Matcher;
|
|
4
|
+
export namespace ClosingRuleShape {
|
|
5
|
+
export const timer: any;
|
|
6
|
+
export { TimestampShape as deadline };
|
|
7
|
+
}
|
|
8
|
+
export namespace YesOfferFilterPositionShape {
|
|
9
|
+
const strings: import("@endo/patterns").Matcher;
|
|
10
|
+
}
|
|
11
|
+
export namespace NoOfferFilterPositionShape {
|
|
12
|
+
const dontUpdate: import("@endo/patterns").Matcher;
|
|
13
|
+
}
|
|
14
|
+
export const OfferFilterPositionsShape: ({
|
|
15
|
+
strings: import("@endo/patterns").Matcher;
|
|
16
|
+
} | {
|
|
17
|
+
dontUpdate: import("@endo/patterns").Matcher;
|
|
18
|
+
})[];
|
|
19
|
+
export namespace OfferFilterIssueShape {
|
|
20
|
+
const strings_1: import("@endo/patterns").Matcher;
|
|
21
|
+
export { strings_1 as strings };
|
|
22
|
+
}
|
|
23
|
+
export namespace OfferFilterQuestionSpecShape {
|
|
24
|
+
export { ChoiceMethodShape as method };
|
|
25
|
+
export { OfferFilterIssueShape as issue };
|
|
26
|
+
export { OfferFilterPositionsShape as positions };
|
|
27
|
+
export const electionType: string;
|
|
28
|
+
export const maxChoices: number;
|
|
29
|
+
export const maxWinners: number;
|
|
30
|
+
export { ClosingRuleShape as closingRule };
|
|
31
|
+
export { QuorumRuleShape as quorumRule };
|
|
32
|
+
export { NoOfferFilterPositionShape as tieOutcome };
|
|
33
|
+
}
|
|
34
|
+
export namespace OfferFilterQuestionDetailsShape {
|
|
35
|
+
export const questionHandle: import("@endo/patterns").Matcher;
|
|
36
|
+
export { InstanceHandleShape as counterInstance };
|
|
37
|
+
}
|
|
38
|
+
export const ParamChangesSpecShape: import("@endo/patterns").Matcher;
|
|
39
|
+
export const YesParamChangesPositionShape: import("@endo/patterns").Matcher;
|
|
40
|
+
export namespace NoParamChangesPositionShape {
|
|
41
|
+
const noChange: import("@endo/patterns").Matcher;
|
|
42
|
+
}
|
|
43
|
+
export const ParamChangesPositionsShape: (import("@endo/patterns").Matcher | {
|
|
44
|
+
noChange: import("@endo/patterns").Matcher;
|
|
45
|
+
})[];
|
|
46
|
+
export namespace ParamPathShape {
|
|
47
|
+
const key: import("@endo/patterns").Matcher;
|
|
48
|
+
}
|
|
49
|
+
export namespace ParamChangesIssueShape {
|
|
50
|
+
export namespace spec {
|
|
51
|
+
export { ParamPathShape as paramPath };
|
|
52
|
+
export { ParamChangesSpecShape as changes };
|
|
53
|
+
}
|
|
54
|
+
export { InstanceHandleShape as contract };
|
|
55
|
+
}
|
|
56
|
+
export namespace ParamChangesQuestionSpecShape {
|
|
57
|
+
export const method: string;
|
|
58
|
+
export { ParamChangesIssueShape as issue };
|
|
59
|
+
export { ParamChangesPositionsShape as positions };
|
|
60
|
+
const electionType_1: string;
|
|
61
|
+
export { electionType_1 as electionType };
|
|
62
|
+
const maxChoices_1: number;
|
|
63
|
+
export { maxChoices_1 as maxChoices };
|
|
64
|
+
const maxWinners_1: number;
|
|
65
|
+
export { maxWinners_1 as maxWinners };
|
|
66
|
+
export { ClosingRuleShape as closingRule };
|
|
67
|
+
export const quorumRule: string;
|
|
68
|
+
export { NoParamChangesPositionShape as tieOutcome };
|
|
69
|
+
}
|
|
70
|
+
export namespace ParamChangesQuestionDetailsShape {
|
|
71
|
+
const questionHandle_1: import("@endo/patterns").Matcher;
|
|
72
|
+
export { questionHandle_1 as questionHandle };
|
|
73
|
+
export { InstanceHandleShape as counterInstance };
|
|
74
|
+
}
|
|
75
|
+
export namespace YesApiInvocationPositionShape {
|
|
76
|
+
const apiMethodName: import("@endo/patterns").Matcher;
|
|
77
|
+
const methodArgs: import("@endo/patterns").Matcher;
|
|
78
|
+
}
|
|
79
|
+
export namespace NoApiInvocationPositionShape {
|
|
80
|
+
const dontInvoke: import("@endo/patterns").Matcher;
|
|
81
|
+
}
|
|
82
|
+
export const ApiInvocationPositionsShape: ({
|
|
83
|
+
apiMethodName: import("@endo/patterns").Matcher;
|
|
84
|
+
methodArgs: import("@endo/patterns").Matcher;
|
|
85
|
+
} | {
|
|
86
|
+
dontInvoke: import("@endo/patterns").Matcher;
|
|
87
|
+
})[];
|
|
88
|
+
export namespace ApiInvocationQuestionSpecShape {
|
|
89
|
+
const method_1: string;
|
|
90
|
+
export { method_1 as method };
|
|
91
|
+
export { ApiInvocationSpecShape as issue };
|
|
92
|
+
export { ApiInvocationPositionsShape as positions };
|
|
93
|
+
const electionType_2: string;
|
|
94
|
+
export { electionType_2 as electionType };
|
|
95
|
+
const maxChoices_2: number;
|
|
96
|
+
export { maxChoices_2 as maxChoices };
|
|
97
|
+
const maxWinners_2: number;
|
|
98
|
+
export { maxWinners_2 as maxWinners };
|
|
99
|
+
export { ClosingRuleShape as closingRule };
|
|
100
|
+
export { QuorumRuleShape as quorumRule };
|
|
101
|
+
export { NoApiInvocationPositionShape as tieOutcome };
|
|
102
|
+
}
|
|
103
|
+
export namespace ApiInvocationQuestionDetailsShape {
|
|
104
|
+
const questionHandle_2: import("@endo/patterns").Matcher;
|
|
105
|
+
export { questionHandle_2 as questionHandle };
|
|
106
|
+
export { InstanceHandleShape as counterInstance };
|
|
107
|
+
}
|
|
108
|
+
export namespace YesSimplePositionShape {
|
|
109
|
+
const text: import("@endo/patterns").Matcher;
|
|
110
|
+
}
|
|
111
|
+
export namespace NoSimplePositionShape {
|
|
112
|
+
const text_1: import("@endo/patterns").Matcher;
|
|
113
|
+
export { text_1 as text };
|
|
114
|
+
}
|
|
115
|
+
export const SimplePositionsShape: {
|
|
116
|
+
text: import("@endo/patterns").Matcher;
|
|
117
|
+
}[];
|
|
118
|
+
export namespace SimpleIssueShape {
|
|
119
|
+
const text_2: import("@endo/patterns").Matcher;
|
|
120
|
+
export { text_2 as text };
|
|
121
|
+
}
|
|
122
|
+
export namespace SimpleQuestionSpecShape {
|
|
123
|
+
export { ChoiceMethodShape as method };
|
|
124
|
+
export { SimpleIssueShape as issue };
|
|
125
|
+
export const positions: import("@endo/patterns").Matcher;
|
|
126
|
+
const electionType_3: import("@endo/patterns").Matcher;
|
|
127
|
+
export { electionType_3 as electionType };
|
|
128
|
+
const maxChoices_3: import("@endo/patterns").Matcher;
|
|
129
|
+
export { maxChoices_3 as maxChoices };
|
|
130
|
+
const maxWinners_3: import("@endo/patterns").Matcher;
|
|
131
|
+
export { maxWinners_3 as maxWinners };
|
|
132
|
+
export { ClosingRuleShape as closingRule };
|
|
133
|
+
export { QuorumRuleShape as quorumRule };
|
|
134
|
+
export { NoSimplePositionShape as tieOutcome };
|
|
135
|
+
}
|
|
136
|
+
export namespace SimpleQuestionDetailsShape {
|
|
137
|
+
const questionHandle_3: import("@endo/patterns").Matcher;
|
|
138
|
+
export { questionHandle_3 as questionHandle };
|
|
139
|
+
export { InstanceHandleShape as counterInstance };
|
|
140
|
+
}
|
|
141
|
+
export const QuestionSpecShape: import("@endo/patterns").Matcher;
|
|
142
|
+
export const PositionShape: import("@endo/patterns").Matcher;
|
|
143
|
+
export const QuestionHandleShape: import("@endo/patterns").Matcher;
|
|
144
|
+
export const InvitationShape: import("@endo/patterns").Matcher;
|
|
145
|
+
export const QuestionDetailsShape: import("@endo/patterns").Matcher;
|
|
146
|
+
export const ElectoratePublicI: import("@endo/patterns").InterfaceGuard;
|
|
147
|
+
export const ElectorateCreatorI: import("@endo/patterns").InterfaceGuard;
|
|
148
|
+
export namespace QuestionStatsShape {
|
|
149
|
+
const spoiled: import("@endo/patterns").Matcher;
|
|
150
|
+
const votes: import("@endo/patterns").Matcher;
|
|
151
|
+
const results: import("@endo/patterns").Matcher;
|
|
152
|
+
}
|
|
153
|
+
export const QuestionI: import("@endo/patterns").InterfaceGuard;
|
|
154
|
+
export const BinaryVoteCounterPublicI: import("@endo/patterns").InterfaceGuard;
|
|
155
|
+
export const VoterHandle: import("@endo/patterns").Matcher;
|
|
156
|
+
export const BinaryVoteCounterAdminI: import("@endo/patterns").InterfaceGuard;
|
|
157
|
+
export const BinaryVoteCounterCloseI: import("@endo/patterns").InterfaceGuard;
|
|
158
|
+
export const VoteCounterPublicI: import("@endo/patterns").InterfaceGuard;
|
|
159
|
+
export const VoteCounterAdminI: import("@endo/patterns").InterfaceGuard;
|
|
160
|
+
export const VoteCounterCloseI: import("@endo/patterns").InterfaceGuard;
|
|
161
|
+
export namespace GovernorFacetShape {
|
|
162
|
+
const getParamMgrRetriever: any;
|
|
163
|
+
const getInvitation: any;
|
|
164
|
+
const getLimitedCreatorFacet: any;
|
|
165
|
+
const getGovernedApis: any;
|
|
166
|
+
const getGovernedApiNames: any;
|
|
167
|
+
const setOfferFilter: any;
|
|
168
|
+
}
|
|
169
|
+
import { TimestampShape } from "@agoric/time/src/typeGuards";
|
|
170
|
+
import { InstanceHandleShape } from "@agoric/zoe/src/typeGuards.js";
|
|
171
|
+
declare namespace ApiInvocationSpecShape { }
|
|
172
|
+
export {};
|
|
173
|
+
//# sourceMappingURL=typeGuards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AASA,iEAAwE;AACxE,+DAAoE;AACpE,iEAME;;;;;;;;;;;AAcF;;;;KAGG;;;;;;;;;;;;;;;;;;;;AAsBH,qEAAqE;AACrE,4EAAkE;;;;AAIlE;;KAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCH;;;;;KAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBH;;IAGG;;;;;;;;;;;;;;;;;;;;;;;;AAmBH,iEAKE;AAEF,6DASE;AAEF,mEAA+D;AAG/D,+DAAyD;AAKzD,oEAKE;AAEF,wEAMG;AAGH,yEAQG;;;;;;AAQH,gEAGG;AAGH,+EAUE;AAEF,2DAAyC;AACzC,8EAOE;AAEF,8EAKE;AAEF,yEAOG;AAEH,wEAIG;AAEH,wEAEG"}
|