@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,136 +0,0 @@
1
- export const GOVERNANCE_STORAGE_KEY: "governance";
2
- export function validateElectorate(zcf: ZCF<GovernanceTerms<{}> & {}>, paramManager: import('./contractGovernance/typedParamManager').TypedParamManager<any>): Promise<void>;
3
- /**
4
- * Helper for the 90% of contracts that will have only a single set of
5
- * parameters. Using this for managed parameters, a contract only has to
6
- *
7
- * - Define the parameter template, which includes name, type and value
8
- * - Add any methods needed in the public and creator facets.
9
- *
10
- * It's also crucial that the governed contract not interact with the product of
11
- * makeGovernorFacet(). The wrapped creatorFacet has the power to change
12
- * parameter values, and the governance guarantees only hold if they're not used
13
- * directly by the governed contract.
14
- *
15
- * @template {import('./contractGovernance/typedParamManager').ParamTypesMap} M
16
- * Map of types of custom governed terms
17
- * @param {ZCF<GovernanceTerms<M>>} zcf
18
- * @param {Invitation} initialPoserInvitation
19
- * @param {M} paramTypesMap
20
- * @param {ERef<StorageNode>} [storageNode]
21
- * @param {ERef<Marshaller>} [marshaller]
22
- */
23
- export function handleParamGovernance<M extends import("./contractGovernance/typedParamManager.js").ParamTypesMap>(zcf: ZCF<GovernanceTerms<M>>, initialPoserInvitation: Invitation, paramTypesMap: M, storageNode?: ERef<StorageNode> | undefined, marshaller?: ERef<Marshaller<unknown>> | undefined): {
24
- publicMixin: {
25
- getAmount: (name: string) => Amount<AssetKind>;
26
- getBrand: (name: string) => Brand<AssetKind>;
27
- getInstance: (name: string) => Instance;
28
- getInstallation: (name: string) => Installation<any>;
29
- getInvitationAmount: (name: string) => Amount<"set">;
30
- getNat: (name: string) => bigint;
31
- getRatio: (name: string) => Ratio;
32
- getString: (name: string) => string;
33
- getTimestamp: (name: string) => import("@agoric/time/src/types.js").TimestampRecord;
34
- getRelativeTime: (name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord;
35
- getUnknown: (name: string) => any;
36
- getSubscription: () => StoredSubscription<GovernanceSubscriptionState>;
37
- getGovernedParams: () => ERef<ParamStateRecord>;
38
- };
39
- augmentPublicFacet: <PF extends {}>(originalPublicFacet: PF) => GovernedPublicFacet<PF>;
40
- augmentVirtualPublicFacet: <OPF extends {}>(originalPublicFacet: OPF) => OPF & {
41
- getAmount: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
42
- getBrand: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
43
- getInstance: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
44
- getInstallation: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
45
- getInvitationAmount: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
46
- getNat: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
47
- getRatio: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
48
- getString: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
49
- getTimestamp: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
50
- getRelativeTime: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
51
- getUnknown: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
52
- getSubscription: () => StoredSubscription<GovernanceSubscriptionState>;
53
- getGovernedParams: () => ERef<ParamStateRecord>;
54
- } & import("@endo/eventual-send").RemotableBrand<{}, OPF & {
55
- getAmount: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
56
- getBrand: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
57
- getInstance: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
58
- getInstallation: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
59
- getInvitationAmount: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
60
- getNat: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
61
- getRatio: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
62
- getString: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
63
- getTimestamp: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
64
- getRelativeTime: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
65
- getUnknown: import("@agoric/swingset-liveslots").PlusContext<never, ((name: string) => Amount<"set">) | ((name: string) => Amount<AssetKind>) | ((name: string) => Brand<AssetKind>) | ((name: string) => Instance) | ((name: string) => Installation<any>) | ((name: string) => bigint) | ((name: string) => Ratio) | ((name: string) => string) | ((name: string) => import("@agoric/time/src/types.js").TimestampRecord) | ((name: string) => import("@agoric/time/src/types.js").RelativeTimeRecord) | ((name: string) => any)>;
66
- getSubscription: () => StoredSubscription<GovernanceSubscriptionState>;
67
- getGovernedParams: () => ERef<ParamStateRecord>;
68
- }>;
69
- makeGovernorFacet: <CF extends {}>(originalCreatorFacet: CF, governedApis?: {} | undefined) => GovernedCreatorFacet<CF>;
70
- makeFarGovernorFacet: <CF_1 extends {}>(limitedCreatorFacet: CF_1, governedApis?: Record<string, (...any: any[]) => unknown> | undefined) => GovernedCreatorFacet<CF_1>;
71
- makeVirtualGovernorFacet: (limitedCreatorFacet: {
72
- [methodName: string]: (context?: unknown, ...rest: unknown[]) => unknown;
73
- }) => {
74
- governorFacet: import("@agoric/swingset-liveslots").FunctionsPlusContext<unknown, GovernedCreatorFacet<{
75
- [methodName: string]: (context?: unknown, ...rest: unknown[]) => unknown;
76
- }>>;
77
- limitedCreatorFacet: {
78
- [methodName: string]: (context?: unknown, ...rest: unknown[]) => unknown;
79
- };
80
- };
81
- makeDurableGovernorFacet: <CF_2>(baggage: import('@agoric/vat-data').Baggage, limitedCreatorFacet: CF_2, governedApis?: Record<string, (...any: any[]) => unknown> | undefined) => {
82
- governorFacet: {
83
- getParamMgrRetriever: () => {
84
- get: () => import("./contractGovernance/typedParamManager.js").TypedParamManager<M & {
85
- Electorate: "invitation";
86
- }>;
87
- } & import("@endo/eventual-send").RemotableBrand<{}, {
88
- get: () => import("./contractGovernance/typedParamManager.js").TypedParamManager<M & {
89
- Electorate: "invitation";
90
- }>;
91
- }>;
92
- getInvitation: (name: any) => Promise<Invitation<R, A>>;
93
- getLimitedCreatorFacet: () => CF_2;
94
- /** @type {() => GovernedApis} */
95
- getGovernedApis: () => GovernedApis;
96
- getGovernedApiNames: () => string[];
97
- setOfferFilter: (strings: any) => Promise<void>;
98
- } & import("@endo/eventual-send").RemotableBrand<{}, {
99
- getParamMgrRetriever: () => {
100
- get: () => import("./contractGovernance/typedParamManager.js").TypedParamManager<M & {
101
- Electorate: "invitation";
102
- }>;
103
- } & import("@endo/eventual-send").RemotableBrand<{}, {
104
- get: () => import("./contractGovernance/typedParamManager.js").TypedParamManager<M & {
105
- Electorate: "invitation";
106
- }>;
107
- }>;
108
- getInvitation: (name: any) => Promise<Invitation<R, A>>;
109
- getLimitedCreatorFacet: () => CF_2;
110
- /** @type {() => GovernedApis} */
111
- getGovernedApis: () => GovernedApis;
112
- getGovernedApiNames: () => string[];
113
- setOfferFilter: (strings: any) => Promise<void>;
114
- }>;
115
- limitedCreatorFacet: CF_2;
116
- };
117
- params: import("./contractGovernance/typedParamManager.js").Getters<M & {
118
- Electorate: "invitation";
119
- }>;
120
- };
121
- export namespace publicMixinAPI {
122
- let getSubscription: any;
123
- let getGovernedParams: any;
124
- let getAmount: any;
125
- let getBrand: any;
126
- let getInstance: any;
127
- let getInstallation: any;
128
- let getInvitationAmount: any;
129
- let getNat: any;
130
- let getRatio: any;
131
- let getString: any;
132
- let getTimestamp: any;
133
- let getRelativeTime: any;
134
- let getUnknown: any;
135
- }
136
- //# sourceMappingURL=contractHelper.d.ts.map
@@ -1 +0,0 @@
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,GAAG,CAAC,iBAejF;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;;;8CA8B1E,OAAO,kBAAkB,EAAE,OAAO,8EAEP,OAAO;;;;;;;;;;;;;YAkBvC,iCAAiC;mCAAhB,YAAY;;;;;;;;;;;;;;;YAA7B,iCAAiC;mCAAhB,YAAY;;;;;;;;;EAuEpC"}
@@ -1,37 +0,0 @@
1
- export type QuestionRecord = {
2
- voteCap: ERef<VoteCounterCreatorFacet>;
3
- publicFacet: VoteCounterPublicFacet;
4
- deadline: import('@agoric/time/src/types').Timestamp;
5
- };
6
- /**
7
- * @typedef {object} QuestionRecord
8
- * @property {ERef<VoteCounterCreatorFacet>} voteCap
9
- * @property {VoteCounterPublicFacet} publicFacet
10
- * @property {import('@agoric/time/src/types').Timestamp} deadline
11
- */
12
- /**
13
- * Start up a new Counter for a question
14
- *
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>} questionsPublisher
21
- * @param {Publisher<OutcomeRecord>} outcomePublisher
22
- * @returns {Promise<AddQuestionReturn>}
23
- */
24
- export function startCounter(zcf: ZCF, questionSpec: QuestionSpec, quorumThreshold: unknown, voteCounter: ERef<Installation>, questionStore: MapStore<Handle<'Question'>, QuestionRecord>, questionsPublisher: Publisher<unknown>, outcomePublisher: Publisher<OutcomeRecord>): Promise<AddQuestionReturn>;
25
- /** @param {MapStore<Handle<'Question'>, QuestionRecord>} questionStore */
26
- export function getOpenQuestions(questionStore: MapStore<Handle<'Question'>, QuestionRecord>): Promise<any>;
27
- /**
28
- * @param {ERef<Handle<'Question'>>} questionHandleP
29
- * @param {MapStore<Handle<'Question'>, QuestionRecord>} questionStore
30
- */
31
- export function getQuestion(questionHandleP: ERef<Handle<'Question'>>, questionStore: MapStore<Handle<'Question'>, QuestionRecord>): Promise<Question>;
32
- /**
33
- * @param {ZCF} zcf
34
- * @param {AddQuestion} addQuestion
35
- */
36
- export function getPoserInvitation(zcf: ZCF, addQuestion: AddQuestion): Promise<Invitation<R, A>>;
37
- //# sourceMappingURL=electorateTools.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"electorateTools.d.ts","sourceRoot":"","sources":["electorateTools.js"],"names":[],"mappings":";aAMc,KAAK,uBAAuB,CAAC;iBAC7B,sBAAsB;cACtB,OAAO,wBAAwB,EAAE,SAAS;;AAJxD;;;;;GAKG;AAEH;;;;;;;;;;;GAWG;AACH,kCATW,GAAG,gBACH,YAAY,mBACZ,OAAO,eACP,KAAK,YAAY,CAAC,iBAClB,SAAS,OAAO,UAAU,CAAC,EAAE,cAAc,CAAC,sBAC5C,UAAU,OAAO,CAAC,oBAClB,UAAU,aAAa,CAAC,GACtB,QAAQ,iBAAiB,CAAC,CAsCtC;AAED,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,6BAarB"}
package/src/index.d.ts DELETED
@@ -1,9 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":""}
@@ -1,16 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"multiCandidateVoteCounter.d.ts","sourceRoot":"","sources":["multiCandidateVoteCounter.js"],"names":[],"mappings":"AAiCA,oCAAoC;AACpC,4CADW,qBAAqB,CAwL9B;AAEF;;;GAGG;AACH;kBAH8B,YAAY;qBAAmB,MAAM;0BACxD;IAAC,gBAAgB,EAAE,UAAU,kBAAkB,CAAC,CAAA;CAAC;;;EAgB3D"}
@@ -1,8 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"noActionElectorate.d.ts","sourceRoot":"","sources":["noActionElectorate.js"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,oBAFW,gBAAgB,gBAAgB,EAAE,sBAAsB,CAAC,CAmDlE"}
package/src/question.d.ts DELETED
@@ -1,27 +0,0 @@
1
- /** @type {BuildQuestion} */
2
- export const buildQuestion: BuildQuestion;
3
- export namespace ChoiceMethod {
4
- let UNRANKED: "unranked";
5
- let ORDER: "order";
6
- let PLURALITY: "plurality";
7
- }
8
- export namespace ElectionType {
9
- let PARAM_CHANGE: "param_change";
10
- let ELECTION: "election";
11
- let SURVEY: "survey";
12
- let API_INVOCATION: "api_invocation";
13
- let 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
- let MAJORITY: "majority";
24
- let NO_QUORUM: "no_quorum";
25
- let ALL: "all";
26
- }
27
- //# sourceMappingURL=question.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,6 +0,0 @@
1
- export function makeQuorumCounter(quorumThreshold: any): {
2
- check: (stats: any) => boolean;
3
- } & import("@endo/eventual-send").RemotableBrand<{}, {
4
- check: (stats: any) => boolean;
5
- }>;
6
- //# sourceMappingURL=quorumCounter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quorumCounter.d.ts","sourceRoot":"","sources":["quorumCounter.js"],"names":[],"mappings":"AAIO;;;;GAUN"}
@@ -1,171 +0,0 @@
1
- export const ChoiceMethodShape: any;
2
- export const QuorumRuleShape: any;
3
- export const ElectionTypeShape: any;
4
- export namespace ClosingRuleShape {
5
- export let timer: any;
6
- export { TimestampShape as deadline };
7
- }
8
- export namespace YesOfferFilterPositionShape {
9
- let strings: any;
10
- }
11
- export namespace NoOfferFilterPositionShape {
12
- let dontUpdate: any;
13
- }
14
- export const OfferFilterPositionsShape: ({
15
- strings: any;
16
- } | {
17
- dontUpdate: any;
18
- })[];
19
- export namespace OfferFilterIssueShape {
20
- let strings_1: any;
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 let electionType: string;
28
- export let maxChoices: number;
29
- export let maxWinners: number;
30
- export { ClosingRuleShape as closingRule };
31
- export { QuorumRuleShape as quorumRule };
32
- export { NoOfferFilterPositionShape as tieOutcome };
33
- }
34
- export namespace OfferFilterQuestionDetailsShape {
35
- export let questionHandle: any;
36
- export { InstanceHandleShape as counterInstance };
37
- }
38
- export const ParamChangesSpecShape: any;
39
- export const YesParamChangesPositionShape: any;
40
- export namespace NoParamChangesPositionShape {
41
- let noChange: any;
42
- }
43
- export const ParamChangesPositionsShape: any[];
44
- export namespace ParamPathShape {
45
- let key: any;
46
- }
47
- export namespace ParamChangesIssueShape {
48
- export namespace spec {
49
- export { ParamPathShape as paramPath };
50
- export { ParamChangesSpecShape as changes };
51
- }
52
- export { InstanceHandleShape as contract };
53
- }
54
- export namespace ParamChangesQuestionSpecShape {
55
- export let method: string;
56
- export { ParamChangesIssueShape as issue };
57
- export { ParamChangesPositionsShape as positions };
58
- let electionType_1: string;
59
- export { electionType_1 as electionType };
60
- let maxChoices_1: number;
61
- export { maxChoices_1 as maxChoices };
62
- let maxWinners_1: number;
63
- export { maxWinners_1 as maxWinners };
64
- export { ClosingRuleShape as closingRule };
65
- export let quorumRule: string;
66
- export { NoParamChangesPositionShape as tieOutcome };
67
- }
68
- export namespace ParamChangesQuestionDetailsShape {
69
- let questionHandle_1: any;
70
- export { questionHandle_1 as questionHandle };
71
- export { InstanceHandleShape as counterInstance };
72
- }
73
- export namespace YesApiInvocationPositionShape {
74
- let apiMethodName: any;
75
- let methodArgs: any;
76
- }
77
- export namespace NoApiInvocationPositionShape {
78
- let dontInvoke: any;
79
- }
80
- export const ApiInvocationPositionsShape: ({
81
- apiMethodName: any;
82
- methodArgs: any;
83
- } | {
84
- dontInvoke: any;
85
- })[];
86
- export namespace ApiInvocationQuestionSpecShape {
87
- let method_1: string;
88
- export { method_1 as method };
89
- export { ApiInvocationSpecShape as issue };
90
- export { ApiInvocationPositionsShape as positions };
91
- let electionType_2: string;
92
- export { electionType_2 as electionType };
93
- let maxChoices_2: number;
94
- export { maxChoices_2 as maxChoices };
95
- let maxWinners_2: number;
96
- export { maxWinners_2 as maxWinners };
97
- export { ClosingRuleShape as closingRule };
98
- export { QuorumRuleShape as quorumRule };
99
- export { NoApiInvocationPositionShape as tieOutcome };
100
- }
101
- export namespace ApiInvocationQuestionDetailsShape {
102
- let questionHandle_2: any;
103
- export { questionHandle_2 as questionHandle };
104
- export { InstanceHandleShape as counterInstance };
105
- }
106
- export namespace YesSimplePositionShape {
107
- let text: any;
108
- }
109
- export namespace NoSimplePositionShape {
110
- let text_1: any;
111
- export { text_1 as text };
112
- }
113
- export const SimplePositionsShape: {
114
- text: any;
115
- }[];
116
- export namespace SimpleIssueShape {
117
- let text_2: any;
118
- export { text_2 as text };
119
- }
120
- export namespace SimpleQuestionSpecShape {
121
- export { ChoiceMethodShape as method };
122
- export { SimpleIssueShape as issue };
123
- export let positions: any;
124
- let electionType_3: any;
125
- export { electionType_3 as electionType };
126
- let maxChoices_3: any;
127
- export { maxChoices_3 as maxChoices };
128
- let maxWinners_3: any;
129
- export { maxWinners_3 as maxWinners };
130
- export { ClosingRuleShape as closingRule };
131
- export { QuorumRuleShape as quorumRule };
132
- export { NoSimplePositionShape as tieOutcome };
133
- }
134
- export namespace SimpleQuestionDetailsShape {
135
- let questionHandle_3: any;
136
- export { questionHandle_3 as questionHandle };
137
- export { InstanceHandleShape as counterInstance };
138
- }
139
- export const QuestionSpecShape: any;
140
- export const PositionShape: any;
141
- export const QuestionHandleShape: any;
142
- export const InvitationShape: any;
143
- export const QuestionDetailsShape: any;
144
- export const ElectoratePublicI: any;
145
- export const ElectorateCreatorI: any;
146
- export namespace QuestionStatsShape {
147
- let spoiled: any;
148
- let votes: any;
149
- let results: any;
150
- }
151
- export const QuestionI: any;
152
- export const BinaryVoteCounterPublicI: any;
153
- export const VoterHandle: any;
154
- export const BinaryVoteCounterAdminI: any;
155
- export const BinaryVoteCounterCloseI: any;
156
- export const VoteCounterPublicI: any;
157
- export const VoteCounterAdminI: any;
158
- export const VoteCounterCloseI: any;
159
- export namespace GovernorFacetShape {
160
- let getParamMgrRetriever: any;
161
- let getInvitation: any;
162
- let getLimitedCreatorFacet: any;
163
- let getGovernedApis: any;
164
- let getGovernedApiNames: any;
165
- let setOfferFilter: any;
166
- }
167
- import { TimestampShape } from '@agoric/time';
168
- import { InstanceHandleShape } from '@agoric/zoe/src/typeGuards.js';
169
- declare namespace ApiInvocationSpecShape { }
170
- export {};
171
- //# sourceMappingURL=typeGuards.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AASA,oCAAwE;AACxE,kCAAoE;AACpE,oCAME;;;;;;;;;;;AAcF;;;;KAGG;;;;;;;;;;;;;;;;;;;;AAsBH,wCAAqE;AACrE,+CAAkE;;;;AAIlE,+CAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCH;;;;;KAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBH;;IAGG;;;;;;;;;;;;;;;;;;;;;;;;AAmBH,oCAKE;AAEF,gCASE;AAEF,sCAA+D;AAG/D,kCAAyD;AAKzD,uCAKE;AAEF,oCAMG;AAGH,qCAQG;;;;;;AAQH,4BAGG;AAGH,2CAUE;AAEF,8BAAyC;AACzC,0CAOE;AAEF,0CAKE;AAEF,qCAOG;AAEH,oCAIG;AAEH,oCAEG;;;;;;;;;+BAlQ4B,cAAc;oCAKtC,+BAA+B"}