@agoric/governance 0.10.4-dev-d6fae11.0.d6fae11 → 0.10.4-dev-64cee5a.0.64cee5a
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/package.json +10 -10
- package/src/committee.d.ts +4 -1
- package/src/committee.d.ts.map +1 -1
- package/src/committee.js +4 -2
- package/src/contractGovernance/governApi.d.ts +4 -2
- package/src/contractGovernance/governApi.d.ts.map +1 -1
- package/src/contractGovernance/governApi.js +2 -1
- package/src/contractGovernance/governFilter.d.ts +4 -2
- package/src/contractGovernance/governFilter.d.ts.map +1 -1
- package/src/contractGovernance/governFilter.js +2 -1
- package/src/contractGovernance/governParam.d.ts +5 -2
- package/src/contractGovernance/governParam.d.ts.map +1 -1
- package/src/contractGovernance/governParam.js +4 -2
- package/src/contractGovernance/paramManager.d.ts +17 -8
- package/src/contractGovernance/paramManager.d.ts.map +1 -1
- package/src/contractGovernance/paramManager.js +13 -8
- package/src/contractGovernance/typedParamManager.d.ts +4 -3
- package/src/contractGovernance/typedParamManager.d.ts.map +1 -1
- package/src/contractGovernance/typedParamManager.js +4 -3
- package/src/contractGovernor.d.ts +6 -3
- package/src/contractGovernor.d.ts.map +1 -1
- package/src/contractGovernor.js +8 -5
- package/src/contractGovernorKit.d.ts +6 -3
- package/src/contractGovernorKit.d.ts.map +1 -1
- package/src/contractGovernorKit.js +8 -4
- package/src/contractHelper.d.ts +13 -6
- package/src/contractHelper.d.ts.map +1 -1
- package/src/contractHelper.js +10 -6
- package/src/electorateTools.d.ts +4 -2
- package/src/electorateTools.d.ts.map +1 -1
- package/src/electorateTools.js +2 -1
- package/src/types.d.ts +3 -20
- package/src/types.d.ts.map +1 -1
- package/src/types.js +3 -3
- package/src/voterKit.d.ts +2 -1
- package/src/voterKit.d.ts.map +1 -1
- package/src/voterKit.js +2 -1
- package/tools/puppetContractGovernor.d.ts +4 -2
- package/tools/puppetContractGovernor.d.ts.map +1 -1
- package/tools/puppetContractGovernor.js +4 -2
- package/tools/puppetGovernance.d.ts +4 -3
- package/tools/puppetGovernance.d.ts.map +1 -1
- package/tools/puppetGovernance.js +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/governance",
|
|
3
|
-
"version": "0.10.4-dev-
|
|
3
|
+
"version": "0.10.4-dev-64cee5a.0.64cee5a",
|
|
4
4
|
"description": "Core governance support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
35
|
-
"@agoric/internal": "0.3.3-dev-
|
|
36
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
37
|
-
"@agoric/store": "0.9.3-dev-
|
|
38
|
-
"@agoric/time": "0.3.3-dev-
|
|
39
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
40
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
34
|
+
"@agoric/ertp": "0.16.3-dev-64cee5a.0.64cee5a",
|
|
35
|
+
"@agoric/internal": "0.3.3-dev-64cee5a.0.64cee5a",
|
|
36
|
+
"@agoric/notifier": "0.6.3-dev-64cee5a.0.64cee5a",
|
|
37
|
+
"@agoric/store": "0.9.3-dev-64cee5a.0.64cee5a",
|
|
38
|
+
"@agoric/time": "0.3.3-dev-64cee5a.0.64cee5a",
|
|
39
|
+
"@agoric/vat-data": "0.5.3-dev-64cee5a.0.64cee5a",
|
|
40
|
+
"@agoric/zoe": "0.26.3-dev-64cee5a.0.64cee5a",
|
|
41
41
|
"@endo/bundle-source": "^4.1.2",
|
|
42
42
|
"@endo/captp": "^4.4.8",
|
|
43
43
|
"@endo/errors": "^1.2.13",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"import-meta-resolve": "^4.1.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
52
|
+
"@agoric/swingset-vat": "0.32.3-dev-64cee5a.0.64cee5a",
|
|
53
53
|
"@endo/bundle-source": "^4.1.2",
|
|
54
54
|
"@endo/init": "^1.1.12",
|
|
55
55
|
"ava": "^5.3.0",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"typeCoverage": {
|
|
79
79
|
"atLeast": 89.48
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "64cee5ae5d1a3488a30ce042d6f3f561ac2a6e82"
|
|
82
82
|
}
|
package/src/committee.d.ts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* @import {MapStore} from '@agoric/swingset-liveslots';
|
|
4
4
|
* @import {ContractMeta, Invitation, ZCF} from '@agoric/zoe';
|
|
5
5
|
* @import {ElectorateCreatorFacet, CommitteeElectoratePublic, QuestionDetails, OutcomeRecord, AddQuestion} from './types.js';
|
|
6
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
7
|
+
* @import {QuestionRecord} from './electorateTools.js';
|
|
6
8
|
*/
|
|
7
9
|
/**
|
|
8
10
|
* @typedef { ElectorateCreatorFacet & {
|
|
@@ -17,7 +19,7 @@ export function start(zcf: ZCF<{
|
|
|
17
19
|
}>, privateArgs: {
|
|
18
20
|
storageNode: Remote<StorageNode>;
|
|
19
21
|
marshaller: Remote<Marshaller>;
|
|
20
|
-
}, baggage:
|
|
22
|
+
}, baggage: Baggage): {
|
|
21
23
|
creatorFacet: CommitteeElectorateCreatorFacet;
|
|
22
24
|
publicFacet: CommitteeElectoratePublic;
|
|
23
25
|
};
|
|
@@ -31,6 +33,7 @@ export type CommitteeElectorateCreatorFacet = ElectorateCreatorFacet & {
|
|
|
31
33
|
import type { ContractMeta } from '@agoric/zoe';
|
|
32
34
|
import type { ZCF } from '@agoric/zoe';
|
|
33
35
|
import type { Remote } from '@agoric/internal';
|
|
36
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
34
37
|
import type { CommitteeElectoratePublic } from './types.js';
|
|
35
38
|
import type { ElectorateCreatorFacet } from './types.js';
|
|
36
39
|
import type { Invitation } from '@agoric/zoe';
|
package/src/committee.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"committee.d.ts","sourceRoot":"","sources":["committee.js"],"names":[],"mappings":"AAkBA
|
|
1
|
+
{"version":3,"file":"committee.d.ts","sourceRoot":"","sources":["committee.js"],"names":[],"mappings":"AAkBA;;;;;;;GAOG;AAEH;;;;GAIG;AAEH,yCAAyC;AACzC,mBADW,aAAa,OAAO,KAAK,CAAC,CAOnC;AAoBK,2BARI,IAAI;IACV,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC,eACM;IAAE,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IAAC,UAAU,EAAE,OAAO,UAAU,CAAC,CAAA;CAAC,WACnE,OAAO,GACL;IAAC,YAAY,EAAE,+BAA+B,CAAC;IAAC,WAAW,EAAE,yBAAyB,CAAA;CAAC,CAuInG;8CArKa,sBAAsB,GAAG;IAClC,mBAAmB,EAAE,MAAM,OAAO,CAAC,WAAW;QAAE,KAAK,EAAE;YAAE,aAAa,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,GAAG,GAAK,IAAI,CAAA;SAAC,CAAA;KAAC,CAAC,CAAC,EAAE,CAAA;CAChH;kCAT4C,aAAa;yBAAb,aAAa;4BAFpC,kBAAkB;6BAIjB,kBAAkB;+CADqE,YAAY;4CAAZ,YAAY;gCAD7E,aAAa"}
|
package/src/committee.js
CHANGED
|
@@ -21,6 +21,8 @@ import { prepareVoterKit } from './voterKit.js';
|
|
|
21
21
|
* @import {MapStore} from '@agoric/swingset-liveslots';
|
|
22
22
|
* @import {ContractMeta, Invitation, ZCF} from '@agoric/zoe';
|
|
23
23
|
* @import {ElectorateCreatorFacet, CommitteeElectoratePublic, QuestionDetails, OutcomeRecord, AddQuestion} from './types.js';
|
|
24
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
25
|
+
* @import {QuestionRecord} from './electorateTools.js';
|
|
24
26
|
*/
|
|
25
27
|
|
|
26
28
|
/**
|
|
@@ -53,11 +55,11 @@ harden(meta);
|
|
|
53
55
|
* committeeSize: number,
|
|
54
56
|
* }>} zcf
|
|
55
57
|
* @param {{ storageNode: Remote<StorageNode>, marshaller: Remote<Marshaller>}} privateArgs
|
|
56
|
-
* @param {
|
|
58
|
+
* @param {Baggage} baggage
|
|
57
59
|
* @returns {{creatorFacet: CommitteeElectorateCreatorFacet, publicFacet: CommitteeElectoratePublic}}
|
|
58
60
|
*/
|
|
59
61
|
export const start = (zcf, privateArgs, baggage) => {
|
|
60
|
-
/** @type {MapStore<Handle<'Question'>,
|
|
62
|
+
/** @type {MapStore<Handle<'Question'>, QuestionRecord>} */
|
|
61
63
|
const allQuestions = provideDurableMapStore(baggage, 'Question');
|
|
62
64
|
|
|
63
65
|
// CRUCIAL: voteCap carries the ability to cast votes for any voter at
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param {() => ERef<GovernedApis>} getGovernedApis
|
|
5
5
|
* @param {() => Promise<Array<string | symbol>>} getGovernedNames names of the governed API methods
|
|
6
|
-
* @param {ERef<
|
|
6
|
+
* @param {ERef<TimerService>} timer
|
|
7
7
|
* @param {() => Promise<PoserFacet>} getUpdatedPoserFacet
|
|
8
8
|
* @returns {ApiGovernor}
|
|
9
9
|
*/
|
|
10
|
-
export function setupApiGovernance(getGovernedApis: () => ERef<GovernedApis>, getGovernedNames: () => Promise<Array<string | symbol>>, timer: ERef<
|
|
10
|
+
export function setupApiGovernance(getGovernedApis: () => ERef<GovernedApis>, getGovernedNames: () => Promise<Array<string | symbol>>, timer: ERef<TimerService>, getUpdatedPoserFacet: () => Promise<PoserFacet>): ApiGovernor;
|
|
11
11
|
/**
|
|
12
12
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
13
13
|
* @import {Passable, RemotableObject} from '@endo/pass-style';
|
|
14
14
|
* @import {Position, ApiGovernor, ApiInvocationIssue, PoserFacet, VoteOnApiInvocation, GovernedApis} from '../types.js';
|
|
15
|
+
* @import {TimerService} from '@agoric/time';
|
|
15
16
|
*/
|
|
16
17
|
/**
|
|
17
18
|
* Make a pair of positions for a question about whether to invoke an API. If
|
|
@@ -31,6 +32,7 @@ export function makeApiInvocationPositions(apiMethodName: string, methodArgs: Pa
|
|
|
31
32
|
};
|
|
32
33
|
};
|
|
33
34
|
import type { GovernedApis } from '../types.js';
|
|
35
|
+
import type { TimerService } from '@agoric/time';
|
|
34
36
|
import type { PoserFacet } from '../types.js';
|
|
35
37
|
import type { ApiGovernor } from '../types.js';
|
|
36
38
|
import type { Passable } from '@endo/pass-style';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"governApi.d.ts","sourceRoot":"","sources":["governApi.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"governApi.d.ts","sourceRoot":"","sources":["governApi.js"],"names":[],"mappings":"AAiCA;;;;;;;;GAQG;AACH,oDANW,MAAM,IAAI,CAAC,YAAY,CAAC,oBACxB,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,SACrC,IAAI,CAAC,YAAY,CAAC,wBAClB,MAAM,OAAO,CAAC,UAAU,CAAC,GACvB,WAAW,CA4FvB;AAxHD;;;;;GAKG;AAEH;;;;;;;GAOG;AACH,0DAHW,MAAM,cACN,QAAQ,EAAE;;;;;;;;EAMpB;kCAhB0G,aAAa;kCACzF,cAAc;gCAD8D,aAAa;iCAAb,aAAa;8BAD5E,kBAAkB"}
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
15
15
|
* @import {Passable, RemotableObject} from '@endo/pass-style';
|
|
16
16
|
* @import {Position, ApiGovernor, ApiInvocationIssue, PoserFacet, VoteOnApiInvocation, GovernedApis} from '../types.js';
|
|
17
|
+
* @import {TimerService} from '@agoric/time';
|
|
17
18
|
*/
|
|
18
19
|
|
|
19
20
|
/**
|
|
@@ -35,7 +36,7 @@ const makeApiInvocationPositions = (apiMethodName, methodArgs) => {
|
|
|
35
36
|
*
|
|
36
37
|
* @param {() => ERef<GovernedApis>} getGovernedApis
|
|
37
38
|
* @param {() => Promise<Array<string | symbol>>} getGovernedNames names of the governed API methods
|
|
38
|
-
* @param {ERef<
|
|
39
|
+
* @param {ERef<TimerService>} timer
|
|
39
40
|
* @param {() => Promise<PoserFacet>} getUpdatedPoserFacet
|
|
40
41
|
* @returns {ApiGovernor}
|
|
41
42
|
*/
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Setup to allow governance to block some invitations.
|
|
3
3
|
*
|
|
4
|
-
* @param {ERef<
|
|
4
|
+
* @param {ERef<TimerService>} timer
|
|
5
5
|
* @param {() => Promise<PoserFacet>} getUpdatedPoserFacet
|
|
6
6
|
* @param {GovernedCreatorFacet<{}>} governedCF
|
|
7
7
|
* @returns {FilterGovernor}
|
|
8
8
|
*/
|
|
9
|
-
export function setupFilterGovernance(timer: ERef<
|
|
9
|
+
export function setupFilterGovernance(timer: ERef<TimerService>, getUpdatedPoserFacet: () => Promise<PoserFacet>, governedCF: GovernedCreatorFacet<{}>): FilterGovernor;
|
|
10
10
|
/**
|
|
11
11
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
12
12
|
* @import {Position, ApiGovernor, ApiInvocationIssue, PoserFacet, VoteOnApiInvocation, FilterGovernor, GovernedCreatorFacet, OfferFilterIssue, VoteOnOfferFilter} from '../types.js';
|
|
13
|
+
* @import {TimerService} from '@agoric/time';
|
|
13
14
|
*/
|
|
14
15
|
/**
|
|
15
16
|
* Make a pair of positions for a question about whether to update the offer
|
|
@@ -26,6 +27,7 @@ export function makeOfferFilterPositions(strings: string[]): {
|
|
|
26
27
|
dontUpdate: string[];
|
|
27
28
|
};
|
|
28
29
|
};
|
|
30
|
+
import type { TimerService } from '@agoric/time';
|
|
29
31
|
import type { PoserFacet } from '../types.js';
|
|
30
32
|
import type { GovernedCreatorFacet } from '../types.js';
|
|
31
33
|
import type { FilterGovernor } from '../types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"governFilter.d.ts","sourceRoot":"","sources":["governFilter.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"governFilter.d.ts","sourceRoot":"","sources":["governFilter.js"],"names":[],"mappings":"AA+BA;;;;;;;GAOG;AACH,6CALW,IAAI,CAAC,YAAY,CAAC,wBAClB,MAAM,OAAO,CAAC,UAAU,CAAC,cACzB,qBAAqB,EAAE,CAAC,GACtB,cAAc,CAqE1B;AA9FD;;;;GAIG;AAEH;;;;;;GAMG;AACH,kDAFW,MAAM,EAAE;;;;;;;EAMlB;kCAd8B,cAAc;gCAD2H,aAAa;0CAAb,aAAa;oCAAb,aAAa"}
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
/**
|
|
14
14
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
15
15
|
* @import {Position, ApiGovernor, ApiInvocationIssue, PoserFacet, VoteOnApiInvocation, FilterGovernor, GovernedCreatorFacet, OfferFilterIssue, VoteOnOfferFilter} from '../types.js';
|
|
16
|
+
* @import {TimerService} from '@agoric/time';
|
|
16
17
|
*/
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -31,7 +32,7 @@ const makeOfferFilterPositions = strings => {
|
|
|
31
32
|
/**
|
|
32
33
|
* Setup to allow governance to block some invitations.
|
|
33
34
|
*
|
|
34
|
-
* @param {ERef<
|
|
35
|
+
* @param {ERef<TimerService>} timer
|
|
35
36
|
* @param {() => Promise<PoserFacet>} getUpdatedPoserFacet
|
|
36
37
|
* @param {GovernedCreatorFacet<{}>} governedCF
|
|
37
38
|
* @returns {FilterGovernor}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {() => ERef<ParamManagerRetriever>} paramManagerRetrieverAccessor
|
|
3
3
|
* @param {Instance} contractInstance
|
|
4
|
-
* @param {
|
|
4
|
+
* @param {TimerService} timer
|
|
5
5
|
* @param {() => Promise<PoserFacet>} getUpdatedPoserFacet
|
|
6
6
|
* @returns {ParamGovernor}
|
|
7
7
|
*/
|
|
8
|
-
export function setupParamGovernance(paramManagerRetrieverAccessor: () => ERef<ParamManagerRetriever>, contractInstance: Instance, timer:
|
|
8
|
+
export function setupParamGovernance(paramManagerRetrieverAccessor: () => ERef<ParamManagerRetriever>, contractInstance: Instance, timer: TimerService, getUpdatedPoserFacet: () => Promise<PoserFacet>): ParamGovernor;
|
|
9
9
|
/**
|
|
10
10
|
* Return a record containing the positive and negative positions for a
|
|
11
11
|
* question on changing the param to the proposedValue.
|
|
@@ -28,6 +28,8 @@ export function assertBallotConcernsParam(paramSpec: {
|
|
|
28
28
|
/**
|
|
29
29
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
30
30
|
* @import {ParamValue, ParamChangePositions, QuestionSpec, ChangeParamsPosition, ParamChangeIssue, ParamGovernor, ParamManagerRetriever, PoserFacet, VoteOnParamChanges} from '../types.js';
|
|
31
|
+
* @import {TimerService} from '@agoric/time';
|
|
32
|
+
* @import {Passable} from '@endo/marshal';
|
|
31
33
|
*/
|
|
32
34
|
/**
|
|
33
35
|
* The electorate that governs changes to the contract's parameters. It must be
|
|
@@ -36,6 +38,7 @@ export function assertBallotConcernsParam(paramSpec: {
|
|
|
36
38
|
export const CONTRACT_ELECTORATE: "Electorate";
|
|
37
39
|
import type { ParamManagerRetriever } from '../types.js';
|
|
38
40
|
import type { Instance } from '@agoric/zoe';
|
|
41
|
+
import type { TimerService } from '@agoric/time';
|
|
39
42
|
import type { PoserFacet } from '../types.js';
|
|
40
43
|
import type { ParamGovernor } from '../types.js';
|
|
41
44
|
import type { ParamValue } from '../types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"governParam.d.ts","sourceRoot":"","sources":["governParam.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"governParam.d.ts","sourceRoot":"","sources":["governParam.js"],"names":[],"mappings":"AA2DA;;;;;;GAMG;AACH,oEANW,MAAM,IAAI,CAAC,qBAAqB,CAAC,oBACjC,QAAQ,SACR,YAAY,wBACZ,MAAM,OAAO,CAAC,UAAU,CAAC,GACvB,aAAa,CA0FzB;AAhID;;;;;;GAMG;AACH,kDAHW,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GACxB,oBAAoB,CAQhC;AAED;;;;;;GAMG;AACH,qDAHW;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAC,gBAC5C,aAAa,iBAAiB,OAAO,CAAC,CAAC,QAWjD;AA5CD;;;;;GAKG;AAEH;;;GAGG;AACH,kCAA4B,YAAY,CAAC;2CATsI,aAAa;8BADpH,aAAa;kCAEtD,cAAc;gCADkI,aAAa;mCAAb,aAAa;gCAAb,aAAa;0CAAb,aAAa;sCAAb,aAAa;kCAAb,aAAa"}
|
|
@@ -14,6 +14,8 @@ import { ParamChangesQuestionDetailsShape } from '../typeGuards.js';
|
|
|
14
14
|
/**
|
|
15
15
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
16
16
|
* @import {ParamValue, ParamChangePositions, QuestionSpec, ChangeParamsPosition, ParamChangeIssue, ParamGovernor, ParamManagerRetriever, PoserFacet, VoteOnParamChanges} from '../types.js';
|
|
17
|
+
* @import {TimerService} from '@agoric/time';
|
|
18
|
+
* @import {Passable} from '@endo/marshal';
|
|
17
19
|
*/
|
|
18
20
|
|
|
19
21
|
/**
|
|
@@ -58,7 +60,7 @@ const assertBallotConcernsParam = (paramSpec, questionSpec) => {
|
|
|
58
60
|
/**
|
|
59
61
|
* @param {() => ERef<ParamManagerRetriever>} paramManagerRetrieverAccessor
|
|
60
62
|
* @param {Instance} contractInstance
|
|
61
|
-
* @param {
|
|
63
|
+
* @param {TimerService} timer
|
|
62
64
|
* @param {() => Promise<PoserFacet>} getUpdatedPoserFacet
|
|
63
65
|
* @returns {ParamGovernor}
|
|
64
66
|
*/
|
|
@@ -79,7 +81,7 @@ const setupParamGovernance = (
|
|
|
79
81
|
) => {
|
|
80
82
|
const paramManagerRetriever = paramManagerRetrieverAccessor();
|
|
81
83
|
const paramMgr = await E(paramManagerRetriever).get(paramSpec.paramPath);
|
|
82
|
-
/** @type {
|
|
84
|
+
/** @type {Passable} */
|
|
83
85
|
const changePs = {};
|
|
84
86
|
for (const name of Object.keys(paramSpec.changes)) {
|
|
85
87
|
const proposedValue = E(paramMgr).getVisibleValue(
|
|
@@ -6,10 +6,10 @@ export type ParamManagerBuilder = {
|
|
|
6
6
|
addInvitation: (name: string, value: Invitation) => ParamManagerBuilder;
|
|
7
7
|
addNat: (name: string, value: bigint) => ParamManagerBuilder;
|
|
8
8
|
addRatio: (name: string, value: Ratio) => ParamManagerBuilder;
|
|
9
|
-
addRecord: (name: string, value:
|
|
9
|
+
addRecord: (name: string, value: CopyRecord<any>) => ParamManagerBuilder;
|
|
10
10
|
addString: (name: string, value: string) => ParamManagerBuilder;
|
|
11
|
-
addTimestamp: (name: string, value:
|
|
12
|
-
addRelativeTime: (name: string, value:
|
|
11
|
+
addTimestamp: (name: string, value: Timestamp) => ParamManagerBuilder;
|
|
12
|
+
addRelativeTime: (name: string, value: RelativeTime) => ParamManagerBuilder;
|
|
13
13
|
addUnknown: (name: string, value: any) => ParamManagerBuilder;
|
|
14
14
|
build: () => AnyParamManager;
|
|
15
15
|
};
|
|
@@ -17,6 +17,11 @@ export type ParamManagerBuilder = {
|
|
|
17
17
|
* @import {MapStore} from '@agoric/swingset-liveslots';
|
|
18
18
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
19
19
|
* @import {AnyParamManager, GovernanceSubscriptionState, ParamManagerBase, ParamStateRecord, ParamValueTyped, UpdateParams} from '../types.js';
|
|
20
|
+
* @import {CopyRecord} from '@endo/marshal';
|
|
21
|
+
* @import {Timestamp} from '@agoric/time';
|
|
22
|
+
* @import {RelativeTime} from '@agoric/time';
|
|
23
|
+
* @import {StoredPublisherKit} from '@agoric/notifier';
|
|
24
|
+
* @import {ParamType} from '../constants.js';
|
|
20
25
|
*/
|
|
21
26
|
/**
|
|
22
27
|
* @param {ParamManagerBase} paramManager
|
|
@@ -34,24 +39,28 @@ export function assertElectorateMatches(paramManager: ParamManagerBase, governed
|
|
|
34
39
|
* @property {(name: string, value: Invitation) => ParamManagerBuilder} addInvitation
|
|
35
40
|
* @property {(name: string, value: bigint) => ParamManagerBuilder} addNat
|
|
36
41
|
* @property {(name: string, value: Ratio) => ParamManagerBuilder} addRatio
|
|
37
|
-
* @property {(name: string, value:
|
|
42
|
+
* @property {(name: string, value: CopyRecord<any>) => ParamManagerBuilder} addRecord
|
|
38
43
|
* @property {(name: string, value: string) => ParamManagerBuilder} addString
|
|
39
|
-
* @property {(name: string, value:
|
|
40
|
-
* @property {(name: string, value:
|
|
44
|
+
* @property {(name: string, value: Timestamp) => ParamManagerBuilder} addTimestamp
|
|
45
|
+
* @property {(name: string, value: RelativeTime) => ParamManagerBuilder} addRelativeTime
|
|
41
46
|
* @property {(name: string, value: any) => ParamManagerBuilder} addUnknown
|
|
42
47
|
* @property {() => AnyParamManager} build
|
|
43
48
|
*/
|
|
44
49
|
/**
|
|
45
|
-
* @param {
|
|
50
|
+
* @param {StoredPublisherKit<GovernanceSubscriptionState>} publisherKit
|
|
46
51
|
* @param {ERef<ZoeService>} [zoe]
|
|
47
52
|
*/
|
|
48
|
-
export function makeParamManagerBuilder(publisherKit:
|
|
53
|
+
export function makeParamManagerBuilder(publisherKit: StoredPublisherKit<GovernanceSubscriptionState>, zoe?: ERef<ZoeService>): ParamManagerBuilder;
|
|
49
54
|
import type { Installation } from '@agoric/zoe';
|
|
50
55
|
import type { Instance } from '@agoric/zoe';
|
|
51
56
|
import type { Invitation } from '@agoric/zoe';
|
|
57
|
+
import type { CopyRecord } from '@endo/marshal';
|
|
58
|
+
import type { Timestamp } from '@agoric/time';
|
|
59
|
+
import type { RelativeTime } from '@agoric/time';
|
|
52
60
|
import type { AnyParamManager } from '../types.js';
|
|
53
61
|
import type { ParamManagerBase } from '../types.js';
|
|
54
62
|
import { CONTRACT_ELECTORATE } from './governParam.js';
|
|
55
63
|
import type { ParamValueTyped } from '../types.js';
|
|
56
64
|
import type { GovernanceSubscriptionState } from '../types.js';
|
|
65
|
+
import type { StoredPublisherKit } from '@agoric/notifier';
|
|
57
66
|
//# sourceMappingURL=paramManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paramManager.d.ts","sourceRoot":"","sources":["paramManager.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"paramManager.d.ts","sourceRoot":"","sources":["paramManager.js"],"names":[],"mappings":";eAiDc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,mBAAmB;cACpD,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,mBAAmB;qBACnD,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,KAAK,mBAAmB;iBAC1D,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,KAAK,mBAAmB;mBACtD,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,mBAAmB;YACxD,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,mBAAmB;cACpD,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,mBAAmB;eACnD,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,CAAC,KAAK,mBAAmB;eAC7D,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,mBAAmB;kBACpD,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,KAAK,mBAAmB;qBACvD,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,KAAK,mBAAmB;gBAC1D,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,mBAAmB;WACjD,MAAM,eAAe;;AAzCnC;;;;;;;;;GASG;AAEH;;;GAGG;AACH,sDAHW,gBAAgB,kBAChB;IAAC,CAAC,mBAAmB,CAAC,EAAE,gBAAgB,YAAY,CAAC,CAAA;CAAC,QAYhE;AAED;;;;;;;;;;;;;;;GAeG;AAEH;;;GAGG;AACH,sDAHW,mBAAmB,2BAA2B,CAAC,QAC/C,IAAI,CAAC,UAAU,CAAC,uBAgX1B;kCA5ZuE,aAAa;8BAAb,aAAa;gCAAb,aAAa;gCAExD,eAAe;+BAChB,cAAc;kCACX,cAAc;qCAHqF,aAAa;sCAAb,aAAa;oCAL3G,kBAAkB;qCAK4E,aAAa;iDAAb,aAAa;wCAI1G,kBAAkB"}
|
|
@@ -22,6 +22,11 @@ import { CONTRACT_ELECTORATE } from './governParam.js';
|
|
|
22
22
|
* @import {MapStore} from '@agoric/swingset-liveslots';
|
|
23
23
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
24
24
|
* @import {AnyParamManager, GovernanceSubscriptionState, ParamManagerBase, ParamStateRecord, ParamValueTyped, UpdateParams} from '../types.js';
|
|
25
|
+
* @import {CopyRecord} from '@endo/marshal';
|
|
26
|
+
* @import {Timestamp} from '@agoric/time';
|
|
27
|
+
* @import {RelativeTime} from '@agoric/time';
|
|
28
|
+
* @import {StoredPublisherKit} from '@agoric/notifier';
|
|
29
|
+
* @import {ParamType} from '../constants.js';
|
|
25
30
|
*/
|
|
26
31
|
|
|
27
32
|
/**
|
|
@@ -49,16 +54,16 @@ const assertElectorateMatches = (paramManager, governedParams) => {
|
|
|
49
54
|
* @property {(name: string, value: Invitation) => ParamManagerBuilder} addInvitation
|
|
50
55
|
* @property {(name: string, value: bigint) => ParamManagerBuilder} addNat
|
|
51
56
|
* @property {(name: string, value: Ratio) => ParamManagerBuilder} addRatio
|
|
52
|
-
* @property {(name: string, value:
|
|
57
|
+
* @property {(name: string, value: CopyRecord<any>) => ParamManagerBuilder} addRecord
|
|
53
58
|
* @property {(name: string, value: string) => ParamManagerBuilder} addString
|
|
54
|
-
* @property {(name: string, value:
|
|
55
|
-
* @property {(name: string, value:
|
|
59
|
+
* @property {(name: string, value: Timestamp) => ParamManagerBuilder} addTimestamp
|
|
60
|
+
* @property {(name: string, value: RelativeTime) => ParamManagerBuilder} addRelativeTime
|
|
56
61
|
* @property {(name: string, value: any) => ParamManagerBuilder} addUnknown
|
|
57
62
|
* @property {() => AnyParamManager} build
|
|
58
63
|
*/
|
|
59
64
|
|
|
60
65
|
/**
|
|
61
|
-
* @param {
|
|
66
|
+
* @param {StoredPublisherKit<GovernanceSubscriptionState>} publisherKit
|
|
62
67
|
* @param {ERef<ZoeService>} [zoe]
|
|
63
68
|
*/
|
|
64
69
|
const makeParamManagerBuilder = (publisherKit, zoe) => {
|
|
@@ -94,7 +99,7 @@ const makeParamManagerBuilder = (publisherKit, zoe) => {
|
|
|
94
99
|
* @param {Keyword} name
|
|
95
100
|
* @param {unknown} value
|
|
96
101
|
* @param {(val) => void} assertion
|
|
97
|
-
* @param {
|
|
102
|
+
* @param {ParamType} type
|
|
98
103
|
*/
|
|
99
104
|
const buildCopyParam = (name, value, assertion, type) => {
|
|
100
105
|
let current;
|
|
@@ -183,7 +188,7 @@ const makeParamManagerBuilder = (publisherKit, zoe) => {
|
|
|
183
188
|
return builder;
|
|
184
189
|
};
|
|
185
190
|
|
|
186
|
-
/** @type {(name: string, value:
|
|
191
|
+
/** @type {(name: string, value: CopyRecord, builder: ParamManagerBuilder) => ParamManagerBuilder} */
|
|
187
192
|
const addRecord = (name, value, builder) => {
|
|
188
193
|
const assertRecord = v => {
|
|
189
194
|
passStyleOf(v);
|
|
@@ -200,13 +205,13 @@ const makeParamManagerBuilder = (publisherKit, zoe) => {
|
|
|
200
205
|
return builder;
|
|
201
206
|
};
|
|
202
207
|
|
|
203
|
-
/** @type {(name: string, value:
|
|
208
|
+
/** @type {(name: string, value: Timestamp, builder: ParamManagerBuilder) => ParamManagerBuilder} */
|
|
204
209
|
const addTimestamp = (name, value, builder) => {
|
|
205
210
|
buildCopyParam(name, value, assertTimestamp, ParamTypes.TIMESTAMP);
|
|
206
211
|
return builder;
|
|
207
212
|
};
|
|
208
213
|
|
|
209
|
-
/** @type {(name: string, value:
|
|
214
|
+
/** @type {(name: string, value: RelativeTime, builder: ParamManagerBuilder) => ParamManagerBuilder} */
|
|
210
215
|
const addRelativeTime = (name, value, builder) => {
|
|
211
216
|
buildCopyParam(name, value, assertRelativeTime, ParamTypes.RELATIVE_TIME);
|
|
212
217
|
return builder;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export function makeParamManager<T extends Record<Keyword, AsyncSpecTuple | SyncSpecTuple>>(publisherKit:
|
|
2
|
-
export function makeParamManagerSync<T extends Record<Keyword, SyncSpecTuple>>(publisherKit:
|
|
1
|
+
export function makeParamManager<T extends Record<Keyword, AsyncSpecTuple | SyncSpecTuple>>(publisherKit: StoredPublisherKit<GovernanceSubscriptionState>, spec: T, zcf: ZCF): TypedParamManager<{ [K in keyof T]: T[K][0]; }>;
|
|
2
|
+
export function makeParamManagerSync<T extends Record<Keyword, SyncSpecTuple>>(publisherKit: StoredPublisherKit<GovernanceSubscriptionState>, spec: T): TypedParamManager<{ [K in keyof T]: T[K][0]; }>;
|
|
3
3
|
export function makeParamManagerFromTerms<I extends Record<string, Invitation> & {
|
|
4
4
|
Electorate: Invitation;
|
|
5
|
-
}, M extends ParamTypesMap>(publisherKit:
|
|
5
|
+
}, M extends ParamTypesMap>(publisherKit: StoredPublisherKit<GovernanceSubscriptionState>, zcf: ZCF<GovernanceTerms<M>>, invitations: I, paramTypesMap: M, overrides?: object): TypedParamManager<M & { [K in keyof I]: "invitation"; }>;
|
|
6
6
|
export type ParamTypesMap = Record<Keyword, ParamType>;
|
|
7
7
|
export type ParamTypesMapFromRecord<M extends ParamStateRecord> = { [R in keyof M]: M[R]["type"]; };
|
|
8
8
|
export type ParamRecordsFromTypes<M extends ParamTypesMap> = { [T in keyof M]: {
|
|
@@ -27,6 +27,7 @@ export type InvitationParam = {
|
|
|
27
27
|
export type SyncSpecTuple = ST<"amount"> | ST<"brand"> | ST<"installation"> | ST<"instance"> | ST<"nat"> | ST<"ratio"> | ST<"string"> | ST<"timestamp"> | ST<"relativeTime"> | ST<"unknown">;
|
|
28
28
|
export type AsyncSpecTuple = ["invitation", Invitation];
|
|
29
29
|
import type { GovernanceSubscriptionState } from '../types.js';
|
|
30
|
+
import type { StoredPublisherKit } from '@agoric/notifier';
|
|
30
31
|
import type { ZCF } from '@agoric/zoe';
|
|
31
32
|
import type { Invitation } from '@agoric/zoe';
|
|
32
33
|
import type { GovernanceTerms } from '../types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typedParamManager.d.ts","sourceRoot":"","sources":["typedParamManager.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typedParamManager.d.ts","sourceRoot":"","sources":["typedParamManager.js"],"names":[],"mappings":"AA0FO,iCANwD,CAAC,SAAlD,MAAM,CAAC,OAAO,EAAE,cAAc,GAAG,aAAa,CAAE,gBACnD,mBAAmB,2BAA2B,CAAC,QAC/C,CAAC,OACD,GAAG,GACD,iBAAiB,CAAC,GAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAC,CAAC,CAuBxD;AAaM,qCALuC,CAAC,SAAjC,MAAM,CAAC,OAAO,EAAE,aAAa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AO,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG;IAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,CAAA;CAAC,GAAG;IAAC,YAAY,EAAE,YAAY,CAAA;CAAC;;;;eAe7F,CAAC,SAAb,SAAW,IACX,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC;8BAItC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;CAAE;4BAO5C,EAAE,CAAC,QAAQ,CAAC,GACpB,EAAE,CAAC,OAAO,CAAC,GACX,EAAE,CAAC,cAAc,CAAC,GAClB,EAAE,CAAC,UAAU,CAAC,GACd,EAAE,CAAC,KAAK,CAAC,GACT,EAAE,CAAC,OAAO,CAAC,GACX,EAAE,CAAC,QAAQ,CAAC,GACZ,EAAE,CAAC,WAAW,CAAC,GACf,EAAE,CAAC,cAAc,CAAC,GAClB,EAAE,CAAC,SAAS,CAAC;6BAEL,CAAC,YAAY,EAAE,UAAU,CAAC;iDAvE2M,aAAa;wCAE1N,kBAAkB;yBAHiB,aAAa;gCAAb,aAAa;qCAC6J,aAAa;+BACnO,iBAAiB;sCADqM,aAAa;uCAAb,aAAa;sCAAb,aAAa;kCAAb,aAAa"}
|
|
@@ -8,6 +8,7 @@ import { makeParamManagerBuilder } from './paramManager.js';
|
|
|
8
8
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
9
9
|
* @import {VoteCounterCreatorFacet, VoteCounterPublicFacet, QuestionSpec, OutcomeRecord, AddQuestion, AddQuestionReturn, GovernanceSubscriptionState, GovernanceTerms, ParamManagerBase, ParamStateRecord, ParamValueForType, UpdateParams} from '../types.js';
|
|
10
10
|
* @import {ParamType} from '../constants.js';
|
|
11
|
+
* @import {StoredPublisherKit} from '@agoric/notifier';
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -82,7 +83,7 @@ const isAsync = {
|
|
|
82
83
|
/**
|
|
83
84
|
* @see makeParamManagerSync
|
|
84
85
|
* @template {Record<Keyword, AsyncSpecTuple | SyncSpecTuple>} T
|
|
85
|
-
* @param {
|
|
86
|
+
* @param {StoredPublisherKit<GovernanceSubscriptionState>} publisherKit
|
|
86
87
|
* @param {T} spec
|
|
87
88
|
* @param {ZCF} zcf
|
|
88
89
|
* @returns {TypedParamManager<{[K in keyof T]: T[K][0]}>}
|
|
@@ -117,7 +118,7 @@ harden(makeParamManager);
|
|
|
117
118
|
*
|
|
118
119
|
* @see makeParamManager
|
|
119
120
|
* @template {Record<Keyword, SyncSpecTuple>} T
|
|
120
|
-
* @param {
|
|
121
|
+
* @param {StoredPublisherKit<GovernanceSubscriptionState>} publisherKit
|
|
121
122
|
* @param {T} spec
|
|
122
123
|
* @returns {TypedParamManager<{[K in keyof T]: T[K][0]}>}
|
|
123
124
|
*/
|
|
@@ -138,7 +139,7 @@ harden(makeParamManagerSync);
|
|
|
138
139
|
/**
|
|
139
140
|
* @template {Record<string, Invitation> & {Electorate: Invitation}} I Private invitation values
|
|
140
141
|
* @template {ParamTypesMap} M Map of types of custom governed terms
|
|
141
|
-
* @param {
|
|
142
|
+
* @param {StoredPublisherKit<GovernanceSubscriptionState>} publisherKit
|
|
142
143
|
* @param {ZCF<GovernanceTerms<M>>} zcf
|
|
143
144
|
* @param {I} invitations invitation objects, which must come from privateArgs
|
|
144
145
|
* @param {M} paramTypesMap
|
|
@@ -3,20 +3,20 @@ export const meta: ContractMeta<typeof start>;
|
|
|
3
3
|
export function validateQuestionDetails(zoe: ERef<ZoeService>, electorate: Instance, details: ParamChangeIssueDetails): Promise<[void, void, void]>;
|
|
4
4
|
export function validateQuestionFromCounter(zoe: ERef<ZoeService>, electorate: Instance, voteCounter: Instance): Promise<[void, void, void]>;
|
|
5
5
|
export function start<SF extends GovernableStartFn>(zcf: ZCF<{
|
|
6
|
-
timer:
|
|
6
|
+
timer: TimerService;
|
|
7
7
|
governedContractInstallation: Installation<SF>;
|
|
8
8
|
governed: {
|
|
9
9
|
issuerKeywordRecord: IssuerKeywordRecord;
|
|
10
10
|
terms: {
|
|
11
11
|
governedParams: {
|
|
12
|
-
[CONTRACT_ELECTORATE]:
|
|
12
|
+
[CONTRACT_ELECTORATE]: InvitationParam;
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
label?: string;
|
|
16
16
|
};
|
|
17
17
|
}>, privateArgs: {
|
|
18
18
|
governed: Record<string, unknown>;
|
|
19
|
-
}, baggage:
|
|
19
|
+
}, baggage: Baggage): Promise<{
|
|
20
20
|
creatorFacet: GovernorCreatorFacet<SF>;
|
|
21
21
|
publicFacet: GovernorPublic;
|
|
22
22
|
}>;
|
|
@@ -25,9 +25,12 @@ import type { ContractMeta } from '@agoric/zoe';
|
|
|
25
25
|
import type { Instance } from '@agoric/zoe';
|
|
26
26
|
import type { ParamChangeIssueDetails } from './types.js';
|
|
27
27
|
import type { GovernableStartFn } from './types.js';
|
|
28
|
+
import type { TimerService } from '@agoric/time';
|
|
28
29
|
import type { Installation } from '@agoric/zoe';
|
|
29
30
|
import { CONTRACT_ELECTORATE } from './contractGovernance/governParam.js';
|
|
31
|
+
import type { InvitationParam } from './contractGovernance/typedParamManager.js';
|
|
30
32
|
import type { ZCF } from '@agoric/zoe';
|
|
33
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
31
34
|
import type { GovernorCreatorFacet } from './types.js';
|
|
32
35
|
import type { GovernorPublic } from './types.js';
|
|
33
36
|
import type { StandardTerms } from '@agoric/zoe';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractGovernor.d.ts","sourceRoot":"","sources":["contractGovernor.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contractGovernor.d.ts","sourceRoot":"","sources":["contractGovernor.js"],"names":[],"mappings":"AAoBA,yCAAyC;AACzC,mBADW,aAAa,OAAO,KAAK,CAAC,CAGnC;AAYK,6CAJI,IAAI,CAAC,UAAU,CAAC,cAChB,QAAQ,WACR,uBAAuB,+BAkBjC;AAYM,iDAJI,IAAI,CAAC,UAAU,CAAC,cAChB,QAAQ,eACR,QAAQ,+BAYlB;AA0FM,sBAnB0B,EAAE,SAAtB,iBAAmB,OACrB,IAAI;IACV,KAAK,EAAE,YAAY,CAAC;IACpB,4BAA4B,EAAE,aAAa,EAAE,CAAC,CAAC;IAC/C,QAAQ,EAAE;QACR,mBAAmB,EAAE,mBAAmB,CAAC;QACzC,KAAK,EAAE;YAAC,cAAc,EAAE;gBAAC,CAAC,mBAAmB,CAAC,EAAE,eAAe,CAAA;aAAC,CAAA;SAAC,CAAC;QAClE,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAA;CACF,CAAC,eACM;IACN,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC,WAKO,OAAO,GAJL,OAAO,CAAC;IAChB,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;IACvC,WAAW,EAAE,cAAc,CAAC;CAC7B,CAAC,CA8DJ;oCAjJY,aAAa;kCAlE6D,aAAa;8BAAb,aAAa;6CACD,YAAY;uCAAZ,YAAY;kCAChF,cAAc;kCAF0C,aAAa;oCALhE,qCAAqC;qCAQvC,2CAA2C;yBAHU,aAAa;6BAI1E,kBAAkB;0CAHuD,YAAY;oCAAZ,YAAY;mCADxB,aAAa"}
|
package/src/contractGovernor.js
CHANGED
|
@@ -11,6 +11,9 @@ import { ParamChangesQuestionDetailsShape } from './typeGuards.js';
|
|
|
11
11
|
/**
|
|
12
12
|
* @import {ContractMeta, Installation, Instance, Invitation, StandardTerms, ZCF} from '@agoric/zoe';
|
|
13
13
|
* @import {GovernableStartFn, GovernorCreatorFacet, GovernorPublic, ParamChangeIssueDetails} from './types.js';
|
|
14
|
+
* @import {TimerService} from '@agoric/time';
|
|
15
|
+
* @import {InvitationParam} from './contractGovernance/typedParamManager.js';
|
|
16
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
14
17
|
*/
|
|
15
18
|
|
|
16
19
|
const trace = makeTracer('CGov', false);
|
|
@@ -73,7 +76,7 @@ harden(validateQuestionFromCounter);
|
|
|
73
76
|
|
|
74
77
|
/**
|
|
75
78
|
* @typedef {StandardTerms} ContractGovernorTerms
|
|
76
|
-
* @property {
|
|
79
|
+
* @property {TimerService} timer
|
|
77
80
|
* @property {Installation} governedContractInstallation
|
|
78
81
|
*/
|
|
79
82
|
|
|
@@ -127,7 +130,7 @@ harden(validateQuestionFromCounter);
|
|
|
127
130
|
* GovernorPublic,
|
|
128
131
|
* GovernorCreatorFacet<PF,CF>,
|
|
129
132
|
* {
|
|
130
|
-
* timer:
|
|
133
|
+
* timer: TimerService,
|
|
131
134
|
* governedContractInstallation: Installation<CF>,
|
|
132
135
|
* governed: {
|
|
133
136
|
* issuerKeywordRecord: IssuerKeywordRecord,
|
|
@@ -141,11 +144,11 @@ harden(validateQuestionFromCounter);
|
|
|
141
144
|
*
|
|
142
145
|
* @template {GovernableStartFn} SF Start function of governed contract
|
|
143
146
|
* @param {ZCF<{
|
|
144
|
-
* timer:
|
|
147
|
+
* timer: TimerService,
|
|
145
148
|
* governedContractInstallation: Installation<SF>,
|
|
146
149
|
* governed: {
|
|
147
150
|
* issuerKeywordRecord: IssuerKeywordRecord,
|
|
148
|
-
* terms: {governedParams: {[CONTRACT_ELECTORATE]:
|
|
151
|
+
* terms: {governedParams: {[CONTRACT_ELECTORATE]: InvitationParam}},
|
|
149
152
|
* label?: string,
|
|
150
153
|
* }
|
|
151
154
|
* }>} zcf
|
|
@@ -156,7 +159,7 @@ harden(validateQuestionFromCounter);
|
|
|
156
159
|
* creatorFacet: GovernorCreatorFacet<SF>,
|
|
157
160
|
* publicFacet: GovernorPublic,
|
|
158
161
|
* }>}
|
|
159
|
-
* @param {
|
|
162
|
+
* @param {Baggage} baggage
|
|
160
163
|
*/
|
|
161
164
|
export const start = async (zcf, privateArgs, baggage) => {
|
|
162
165
|
trace('start');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export function prepareContractGovernorKit(baggage:
|
|
2
|
-
timer:
|
|
1
|
+
export function prepareContractGovernorKit(baggage: Baggage, powers: {
|
|
2
|
+
timer: TimerService;
|
|
3
3
|
zoe: ERef<ZoeService>;
|
|
4
|
-
}): (startedInstanceKit:
|
|
4
|
+
}): (startedInstanceKit: StartedInstanceKit<GovernableStartFn>, limitedCreatorFacet: any) => import("@endo/exo").GuardedKit<{
|
|
5
5
|
helper: {
|
|
6
6
|
getElectorateInstance(): Promise<Instance>;
|
|
7
7
|
getUpdatedPoserFacet(): Promise<PoserFacet>;
|
|
@@ -35,7 +35,10 @@ export function prepareContractGovernorKit(baggage: import("@agoric/vat-data").B
|
|
|
35
35
|
};
|
|
36
36
|
}>;
|
|
37
37
|
export type ContractGovernorKit = EReturn<EReturn<typeof prepareContractGovernorKit>>;
|
|
38
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
39
|
+
import type { TimerService } from '@agoric/time';
|
|
38
40
|
import type { GovernableStartFn } from './types.js';
|
|
41
|
+
import type { StartedInstanceKit } from '@agoric/zoe/src/zoeService/utils.js';
|
|
39
42
|
import type { Instance } from '@agoric/zoe';
|
|
40
43
|
import type { PoserFacet } from './types.js';
|
|
41
44
|
import type { Invitation } from '@agoric/zoe';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractGovernorKit.d.ts","sourceRoot":"","sources":["contractGovernorKit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contractGovernorKit.d.ts","sourceRoot":"","sources":["contractGovernorKit.js"],"names":[],"mappings":"AAwEO,oDANI,OAAO,UACP;IACN,KAAK,EAAE,YAAY,CAAC;IACpB,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;CACvB;;iCAiCqB,OAAO,CAAC,QAAQ,CAAC;gCAOjB,OAAO,CAAC,UAAU,CAAC;;;;;;QAmEpC;;;WAGG;2CAFQ,UAAU,GACR,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;QAkE1B,gCAAgC;qCAApB,QAAQ;QAepB,6BAA6B;iCAAjB,QAAQ;QAWpB,uCAAuC;mCAA3B,WAAW;;GAY9B;kCAEa,QAAQ,QAAQ,OAAO,0BAA0B,CAAC,CAAC;6BAvQvC,kBAAkB;kCACb,cAAc;uCAFuF,YAAY;wCAG3G,qCAAqC;8BAJF,aAAa;gCAC+C,YAAY;gCADxE,aAAa;kCAAb,aAAa;iCAC+C,YAAY;6BAFtH,WAAW"}
|
|
@@ -20,6 +20,10 @@ import { ClosingRuleShape, ParamChangesSpecShape } from './typeGuards.js';
|
|
|
20
20
|
* @import {EReturn} from '@endo/far';
|
|
21
21
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
22
22
|
* @import {ClosingRule, GovernableStartFn, LimitedCF, PoserFacet, VoteOnApiInvocation, VoteOnOfferFilter, VoteOnParamChanges} from './types.js';
|
|
23
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
24
|
+
* @import {TimerService} from '@agoric/time';
|
|
25
|
+
* @import {StartedInstanceKit} from '@agoric/zoe/src/zoeService/utils.js';
|
|
26
|
+
* @import {TypedParamManager} from './contractGovernance/typedParamManager.js';
|
|
23
27
|
*/
|
|
24
28
|
|
|
25
29
|
const trace = makeTracer('CGK', false);
|
|
@@ -60,9 +64,9 @@ const ContractGovernorKitI = {
|
|
|
60
64
|
|
|
61
65
|
/**
|
|
62
66
|
*
|
|
63
|
-
* @param {
|
|
67
|
+
* @param {Baggage} baggage
|
|
64
68
|
* @param {{
|
|
65
|
-
* timer:
|
|
69
|
+
* timer: TimerService,
|
|
66
70
|
* zoe: ERef<ZoeService>,
|
|
67
71
|
* }} powers
|
|
68
72
|
*/
|
|
@@ -85,7 +89,7 @@ export const prepareContractGovernorKit = (baggage, powers) => {
|
|
|
85
89
|
'ContractGovernorKit',
|
|
86
90
|
ContractGovernorKitI,
|
|
87
91
|
/**
|
|
88
|
-
* @param {
|
|
92
|
+
* @param {StartedInstanceKit<GovernableStartFn>} startedInstanceKit
|
|
89
93
|
* @param {LimitedCF<unknown>} limitedCreatorFacet
|
|
90
94
|
*/
|
|
91
95
|
(startedInstanceKit, limitedCreatorFacet) => {
|
|
@@ -177,7 +181,7 @@ export const prepareContractGovernorKit = (baggage, powers) => {
|
|
|
177
181
|
*/
|
|
178
182
|
replaceElectorate(poserInvitation) {
|
|
179
183
|
const { creatorFacet } = this.state;
|
|
180
|
-
/** @type {Promise<
|
|
184
|
+
/** @type {Promise<TypedParamManager<{'Electorate': 'invitation'}>>} */
|
|
181
185
|
|
|
182
186
|
// @ts-expect-error cast
|
|
183
187
|
const paramMgr = E(E(creatorFacet).getParamMgrRetriever()).get({
|
package/src/contractHelper.d.ts
CHANGED
|
@@ -4,11 +4,16 @@
|
|
|
4
4
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
5
5
|
* @import {VoteCounterCreatorFacet, VoteCounterPublicFacet, QuestionSpec, OutcomeRecord, AddQuestion, AddQuestionReturn, GovernanceSubscriptionState, GovernanceTerms, GovernedApis, GovernedCreatorFacet, GovernedPublicFacet} from './types.js';
|
|
6
6
|
* @import {Baggage} from '@agoric/vat-data';
|
|
7
|
+
* @import {TypedParamManager} from './contractGovernance/typedParamManager.js';
|
|
8
|
+
* @import {ParamTypesMap} from './contractGovernance/typedParamManager.js';
|
|
9
|
+
* @import {FunctionsPlusContext} from '@agoric/swingset-liveslots';
|
|
10
|
+
* @import {StoredPublisherKit} from '@agoric/notifier';
|
|
7
11
|
*/
|
|
8
12
|
export const GOVERNANCE_STORAGE_KEY: "governance";
|
|
9
|
-
export function validateElectorate(zcf: ZCF<GovernanceTerms<{}> & {}>, paramManager:
|
|
13
|
+
export function validateElectorate(zcf: ZCF<GovernanceTerms<{}> & {}>, paramManager: TypedParamManager<any>): Promise<true>;
|
|
10
14
|
import type { GovernanceTerms } from './types.js';
|
|
11
15
|
import type { ZCF } from '@agoric/zoe';
|
|
16
|
+
import type { TypedParamManager } from './contractGovernance/typedParamManager.js';
|
|
12
17
|
/**
|
|
13
18
|
* Helper for the 90% of contracts that will have only a single set of
|
|
14
19
|
* parameters. Using this for managed parameters, a contract only has to
|
|
@@ -21,7 +26,7 @@ import type { ZCF } from '@agoric/zoe';
|
|
|
21
26
|
* parameter values, and the governance guarantees only hold if they're not used
|
|
22
27
|
* directly by the governed contract.
|
|
23
28
|
*
|
|
24
|
-
* @template {
|
|
29
|
+
* @template {ParamTypesMap} M
|
|
25
30
|
* Map of types of custom governed terms
|
|
26
31
|
* @param {ZCF<GovernanceTerms<M>>} zcf
|
|
27
32
|
* @param {Invitation} initialPoserInvitation
|
|
@@ -30,7 +35,7 @@ import type { ZCF } from '@agoric/zoe';
|
|
|
30
35
|
* @param {ERemote<EMarshaller>} [marshaller]
|
|
31
36
|
* @param {object} [overrides]
|
|
32
37
|
*/
|
|
33
|
-
export function handleParamGovernance<M extends
|
|
38
|
+
export function handleParamGovernance<M extends ParamTypesMap>(zcf: ZCF<GovernanceTerms<M>>, initialPoserInvitation: Invitation, paramTypesMap: M, storageNode?: ERemote<StorageNode>, marshaller?: ERemote<EMarshaller>, overrides?: object): {
|
|
34
39
|
publicMixin: {
|
|
35
40
|
getAmount: (name: string) => Amount;
|
|
36
41
|
getBrand: (name: string) => Brand;
|
|
@@ -81,17 +86,17 @@ export function handleParamGovernance<M extends import("./contractGovernance/typ
|
|
|
81
86
|
makeVirtualGovernorFacet: <LCF extends {
|
|
82
87
|
[methodName: string]: (context?: unknown, ...rest: unknown[]) => unknown;
|
|
83
88
|
}>(limitedCreatorFacet: LCF) => {
|
|
84
|
-
governorFacet:
|
|
89
|
+
governorFacet: FunctionsPlusContext<unknown, GovernedCreatorFacet<LCF>>;
|
|
85
90
|
limitedCreatorFacet: LCF;
|
|
86
91
|
};
|
|
87
92
|
makeDurableGovernorFacet: <CF>(baggage: Baggage, limitedCreatorFacet: CF, governedApis?: Record<string, (...any: any[]) => unknown> | undefined) => {
|
|
88
93
|
governorFacet: import("@endo/exo").Guarded<{
|
|
89
94
|
getParamMgrRetriever: () => {
|
|
90
|
-
get: () =>
|
|
95
|
+
get: () => TypedParamManager<M & {
|
|
91
96
|
Electorate: "invitation";
|
|
92
97
|
}>;
|
|
93
98
|
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
94
|
-
get: () =>
|
|
99
|
+
get: () => TypedParamManager<M & {
|
|
95
100
|
Electorate: "invitation";
|
|
96
101
|
}>;
|
|
97
102
|
}>;
|
|
@@ -123,6 +128,7 @@ export namespace publicMixinAPI {
|
|
|
123
128
|
let getRelativeTime: import("@endo/patterns").MethodGuard;
|
|
124
129
|
let getUnknown: import("@endo/patterns").MethodGuard;
|
|
125
130
|
}
|
|
131
|
+
import type { ParamTypesMap } from './contractGovernance/typedParamManager.js';
|
|
126
132
|
import type { Invitation } from '@agoric/zoe';
|
|
127
133
|
import type { ERemote } from '@agoric/internal';
|
|
128
134
|
import type { EMarshaller } from '@agoric/internal/src/marshal/wrap-marshaller.js';
|
|
@@ -131,6 +137,7 @@ import type { Installation } from '@agoric/zoe';
|
|
|
131
137
|
import type { GovernanceSubscriptionState } from './types.js';
|
|
132
138
|
import type { GovernedPublicFacet } from './types.js';
|
|
133
139
|
import type { GovernedCreatorFacet } from './types.js';
|
|
140
|
+
import type { FunctionsPlusContext } from '@agoric/swingset-liveslots';
|
|
134
141
|
import type { Baggage } from '@agoric/vat-data';
|
|
135
142
|
import type { GovernedApis } from './types.js';
|
|
136
143
|
//# sourceMappingURL=contractHelper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractHelper.d.ts","sourceRoot":"","sources":["contractHelper.js"],"names":[],"mappings":"AAcA
|
|
1
|
+
{"version":3,"file":"contractHelper.d.ts","sourceRoot":"","sources":["contractHelper.js"],"names":[],"mappings":"AAcA;;;;;;;;;;GAUG;AAEH,qCAAsC,YAAY,CAAC;AAwB5C,wCAHI,IAAI,gBAAgB,EAAE,CAAC,GAAG,EAAE,CAAC,gBAC7B,kBAAkB,GAAG,CAAC,iBAQhC;qCAtCqO,YAAY;yBAD1K,aAAa;uCAGjD,2CAA2C;AA+N/E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,sCAT6B,CAAC,SAAjB,aAAe,OAEjB,IAAI,gBAAgB,CAAC,CAAC,CAAC,0BACvB,UAAU,iBACV,CAAC,gBACD,QAAQ,WAAW,CAAC,eACpB,QAAQ,WAAW,CAAC,cACpB,MAAM;;;;;;;;;;;;;;;;yBAzKG,EAAE,SAAP,EAAI;gCAgBC,GAAG,SAAR,EAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsCC,EAAE,SAAP,EAAI,2CAEN,EAAE;2BA7BK,EAAE,SAAP,EAAI,4EAEqB,OAAO;+BAuC8C,GAAG;yCAA7C,OAAO,WAAW,OAAO,EAAE,KAAK,OAAO;;;;;+BA8B3E,EAAE,WACJ,OAAO,4EAEoB,OAAO;;;;;;;;;;;;;YAmBvC,iCAAiC;mCAAhB,YAAY;;;;;;;;;EA0EpC;;;;;;;;;;;;;;;;mCA1Q+B,2CAA2C;gCAJH,aAAa;6BAF3D,kBAAkB;iCACd,iDAAiD;8BACP,aAAa;kCAAb,aAAa;iDACiJ,YAAY;yCAAZ,YAAY;0CAAZ,YAAY;0CAI3M,4BAA4B;6BAHzC,kBAAkB;kCAD0L,YAAY"}
|
package/src/contractHelper.js
CHANGED
|
@@ -18,6 +18,10 @@ import { CONTRACT_ELECTORATE } from './contractGovernance/governParam.js';
|
|
|
18
18
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
19
19
|
* @import {VoteCounterCreatorFacet, VoteCounterPublicFacet, QuestionSpec, OutcomeRecord, AddQuestion, AddQuestionReturn, GovernanceSubscriptionState, GovernanceTerms, GovernedApis, GovernedCreatorFacet, GovernedPublicFacet} from './types.js';
|
|
20
20
|
* @import {Baggage} from '@agoric/vat-data';
|
|
21
|
+
* @import {TypedParamManager} from './contractGovernance/typedParamManager.js';
|
|
22
|
+
* @import {ParamTypesMap} from './contractGovernance/typedParamManager.js';
|
|
23
|
+
* @import {FunctionsPlusContext} from '@agoric/swingset-liveslots';
|
|
24
|
+
* @import {StoredPublisherKit} from '@agoric/notifier';
|
|
21
25
|
*/
|
|
22
26
|
|
|
23
27
|
export const GOVERNANCE_STORAGE_KEY = 'governance';
|
|
@@ -42,7 +46,7 @@ const publicMixinAPI = harden({
|
|
|
42
46
|
* Verify that the electorate is represented by a live invitation.
|
|
43
47
|
*
|
|
44
48
|
* @param {ZCF<GovernanceTerms<{}> & {}>} zcf
|
|
45
|
-
* @param {
|
|
49
|
+
* @param {TypedParamManager<any>} paramManager
|
|
46
50
|
*/
|
|
47
51
|
export const validateElectorate = (zcf, paramManager) => {
|
|
48
52
|
const invitation = paramManager.getInternalParamValue(CONTRACT_ELECTORATE);
|
|
@@ -56,9 +60,9 @@ harden(validateElectorate);
|
|
|
56
60
|
/**
|
|
57
61
|
* Utility function for `makeParamGovernance`.
|
|
58
62
|
*
|
|
59
|
-
* @template {
|
|
63
|
+
* @template {ParamTypesMap} T
|
|
60
64
|
* @param {ZCF<GovernanceTerms<{}> & {}>} zcf
|
|
61
|
-
* @param {
|
|
65
|
+
* @param {TypedParamManager<T>} paramManager
|
|
62
66
|
*/
|
|
63
67
|
const facetHelpers = (zcf, paramManager) => {
|
|
64
68
|
// validate async to wait for params to be finished
|
|
@@ -159,7 +163,7 @@ const facetHelpers = (zcf, paramManager) => {
|
|
|
159
163
|
* @param {LCF} limitedCreatorFacet
|
|
160
164
|
*/
|
|
161
165
|
const makeVirtualGovernorFacet = limitedCreatorFacet => {
|
|
162
|
-
/** @type {
|
|
166
|
+
/** @type {FunctionsPlusContext<unknown, GovernedCreatorFacet<typeof limitedCreatorFacet>>} */
|
|
163
167
|
const governorFacet = harden({
|
|
164
168
|
getParamMgrRetriever: () =>
|
|
165
169
|
Far('paramRetriever', { get: () => paramManager }),
|
|
@@ -249,7 +253,7 @@ const facetHelpers = (zcf, paramManager) => {
|
|
|
249
253
|
* parameter values, and the governance guarantees only hold if they're not used
|
|
250
254
|
* directly by the governed contract.
|
|
251
255
|
*
|
|
252
|
-
* @template {
|
|
256
|
+
* @template {ParamTypesMap} M
|
|
253
257
|
* Map of types of custom governed terms
|
|
254
258
|
* @param {ZCF<GovernanceTerms<M>>} zcf
|
|
255
259
|
* @param {Invitation} initialPoserInvitation
|
|
@@ -266,7 +270,7 @@ const handleParamGovernance = (
|
|
|
266
270
|
marshaller,
|
|
267
271
|
overrides,
|
|
268
272
|
) => {
|
|
269
|
-
/** @type {
|
|
273
|
+
/** @type {StoredPublisherKit<GovernanceSubscriptionState>} */
|
|
270
274
|
const publisherKit = makeStoredPublisherKit(
|
|
271
275
|
storageNode,
|
|
272
276
|
marshaller,
|
package/src/electorateTools.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
export type QuestionRecord = {
|
|
2
2
|
voteCap: ERef<VoteCounterCreatorFacet>;
|
|
3
3
|
publicFacet: VoteCounterPublicFacet;
|
|
4
|
-
deadline:
|
|
4
|
+
deadline: Timestamp;
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
7
7
|
* @import {MapStore} from '@agoric/swingset-liveslots';
|
|
8
8
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
9
9
|
* @import {VoteCounterCreatorFacet, VoteCounterPublicFacet, QuestionSpec, OutcomeRecord, AddQuestion, AddQuestionReturn} from './types.js';
|
|
10
|
+
* @import {Timestamp} from '@agoric/time';
|
|
10
11
|
*/
|
|
11
12
|
/**
|
|
12
13
|
* @typedef {object} QuestionRecord
|
|
13
14
|
* @property {ERef<VoteCounterCreatorFacet>} voteCap
|
|
14
15
|
* @property {VoteCounterPublicFacet} publicFacet
|
|
15
|
-
* @property {
|
|
16
|
+
* @property {Timestamp} deadline
|
|
16
17
|
*/
|
|
17
18
|
/**
|
|
18
19
|
* Start up a new Counter for a question
|
|
@@ -45,6 +46,7 @@ export function getPoserInvitation(zcf: ZCF, addQuestion: AddQuestion): Promise<
|
|
|
45
46
|
}>, undefined>>;
|
|
46
47
|
import type { VoteCounterCreatorFacet } from './types.js';
|
|
47
48
|
import type { VoteCounterPublicFacet } from './types.js';
|
|
49
|
+
import type { Timestamp } from '@agoric/time';
|
|
48
50
|
import type { ZCF } from '@agoric/zoe';
|
|
49
51
|
import type { QuestionSpec } from './types.js';
|
|
50
52
|
import type { Installation } from '@agoric/zoe';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"electorateTools.d.ts","sourceRoot":"","sources":["electorateTools.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"electorateTools.d.ts","sourceRoot":"","sources":["electorateTools.js"],"names":[],"mappings":";aAac,IAAI,CAAC,uBAAuB,CAAC;iBAC7B,sBAAsB;cACtB,SAAS;;AAXvB;;;;;GAKG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;GAWG;AACH,kCATW,GAAG,gBACH,YAAY,mBACZ,OAAO,eACP,IAAI,CAAC,YAAY,CAAC,iBAClB,SAAS,MAAM,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,sBAC5C,SAAS,CAAC,OAAO,CAAC,oBAClB,SAAS,CAAC,aAAa,CAAC,GACtB,OAAO,CAAC,iBAAiB,CAAC,CAsCtC;AAED,0EAA0E;AAC1E,gDADY,SAAS,MAAM,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,4CAcvD;AAED;;;GAGG;AACH,6CAHW,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,iBACxB,SAAS,MAAM,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,0CAKpD;AAEH;;;GAGG;AACH,wCAHW,GAAG,eACH,WAAW;;;;gBAarB;6CArG8H,YAAY;4CAAZ,YAAY;+BAC/G,cAAc;yBAF8B,aAAa;kCAC0C,YAAY;kCADnE,aAAa;8BAD1D,4BAA4B;mCAEwE,YAAY;uCAAZ,YAAY;iCAAZ,YAAY;gCADnE,aAAa"}
|
package/src/electorateTools.js
CHANGED
|
@@ -6,13 +6,14 @@ import { deeplyFulfilled, Far } from '@endo/marshal';
|
|
|
6
6
|
* @import {MapStore} from '@agoric/swingset-liveslots';
|
|
7
7
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
8
8
|
* @import {VoteCounterCreatorFacet, VoteCounterPublicFacet, QuestionSpec, OutcomeRecord, AddQuestion, AddQuestionReturn} from './types.js';
|
|
9
|
+
* @import {Timestamp} from '@agoric/time';
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* @typedef {object} QuestionRecord
|
|
13
14
|
* @property {ERef<VoteCounterCreatorFacet>} voteCap
|
|
14
15
|
* @property {VoteCounterPublicFacet} publicFacet
|
|
15
|
-
* @property {
|
|
16
|
+
* @property {Timestamp} deadline
|
|
16
17
|
*/
|
|
17
18
|
|
|
18
19
|
/**
|
package/src/types.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export type ParamValueTyped<T extends ParamType = ParamType> = {
|
|
|
29
29
|
* Terms a contract must provide in order to be governed.
|
|
30
30
|
*/
|
|
31
31
|
export type GovernanceTerms<T extends import("./contractGovernance/typedParamManager.js").ParamTypesMap> = {
|
|
32
|
-
electionManager: import("@agoric/zoe/src/zoeService/utils.js").Instance<typeof import("./contractGovernor.js")
|
|
32
|
+
electionManager: import("@agoric/zoe/src/zoeService/utils.js").Instance<typeof import("./contractGovernor.js").start>;
|
|
33
33
|
governedParams: import("./contractGovernance/typedParamManager.js").ParamRecordsFromTypes<T & {
|
|
34
34
|
Electorate: "invitation";
|
|
35
35
|
}>;
|
|
@@ -495,24 +495,7 @@ export type GovernedContractTerms = {
|
|
|
495
495
|
};
|
|
496
496
|
export type AssertContractGovernance = (zoe: ERef<ZoeService>, allegedGoverned: import("@agoric/zoe/src/zoeService/utils.js").Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>, allegedGovernor: Instance<(zcf: any) => {
|
|
497
497
|
publicFacet: GovernorPublic;
|
|
498
|
-
}>, contractGovernorInstallation: Installation<(
|
|
499
|
-
timer: import("@agoric/time").TimerService;
|
|
500
|
-
governedContractInstallation: Installation<SF>;
|
|
501
|
-
governed: {
|
|
502
|
-
issuerKeywordRecord: IssuerKeywordRecord;
|
|
503
|
-
terms: {
|
|
504
|
-
governedParams: {
|
|
505
|
-
Electorate: import("./contractGovernance/typedParamManager.js").InvitationParam;
|
|
506
|
-
};
|
|
507
|
-
};
|
|
508
|
-
label?: string;
|
|
509
|
-
};
|
|
510
|
-
}>, privateArgs: {
|
|
511
|
-
governed: Record<string, unknown>;
|
|
512
|
-
}, baggage: import("@agoric/vat-data").Baggage) => Promise<{
|
|
513
|
-
creatorFacet: GovernorCreatorFacet<SF>;
|
|
514
|
-
publicFacet: GovernorPublic;
|
|
515
|
-
}>)>) => Promise<GovernancePair>;
|
|
498
|
+
}>, contractGovernorInstallation: Installation<typeof import("@agoric/governance/src/contractGovernor.js").start>) => Promise<GovernancePair>;
|
|
516
499
|
/**
|
|
517
500
|
* - assert that the contract uses the
|
|
518
501
|
* electorate
|
|
@@ -524,7 +507,7 @@ export type GovernableStartFn = ContractStartFunction & ((zcf?: any, pa?: any, b
|
|
|
524
507
|
creatorFacet: GovernedCreatorFacet<{}>;
|
|
525
508
|
publicFacet: GovernedPublicFacet<{}>;
|
|
526
509
|
}>);
|
|
527
|
-
export type GovernorSF = typeof import("./contractGovernor.js")
|
|
510
|
+
export type GovernorSF = typeof import("./contractGovernor.js").start;
|
|
528
511
|
/**
|
|
529
512
|
* Same result as StartedInstanceKit but:
|
|
530
513
|
* - typed for contractGovernor installation being started by Zoe. (It in turn starts the governed contract.)
|
package/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","s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gCAE0B,aAAa;yBAAb,aAAa;sCADnB,aAAa;8BAFzC,kBAAkB;gCAEU,aAAa;2CAEvC,qCAAqC;uCAFX,aAAa;6BAHrD,WAAW"}
|
package/src/types.js
CHANGED
|
@@ -76,7 +76,7 @@ export {};
|
|
|
76
76
|
*
|
|
77
77
|
* @template {import('./contractGovernance/typedParamManager.js').ParamTypesMap} T Governed parameters of contract
|
|
78
78
|
* @typedef {{
|
|
79
|
-
* electionManager: import('@agoric/zoe/src/zoeService/utils.js').Instance<import('./contractGovernor.js')
|
|
79
|
+
* electionManager: import('@agoric/zoe/src/zoeService/utils.js').Instance<typeof import('./contractGovernor.js').start>,
|
|
80
80
|
* governedParams: import('./contractGovernance/typedParamManager.js').ParamRecordsFromTypes<T & {
|
|
81
81
|
* Electorate: 'invitation'
|
|
82
82
|
* }>
|
|
@@ -691,7 +691,7 @@ export {};
|
|
|
691
691
|
* @param {ERef<ZoeService>} zoe
|
|
692
692
|
* @param {import('@agoric/zoe/src/zoeService/utils.js').Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>} allegedGoverned
|
|
693
693
|
* @param {Instance<(zcf) => {publicFacet: GovernorPublic}>} allegedGovernor
|
|
694
|
-
* @param {Installation<import('@agoric/governance/src/contractGovernor.js').start>} contractGovernorInstallation
|
|
694
|
+
* @param {Installation<typeof import('@agoric/governance/src/contractGovernor.js').start>} contractGovernorInstallation
|
|
695
695
|
* @returns {Promise<GovernancePair>}
|
|
696
696
|
*/
|
|
697
697
|
|
|
@@ -711,7 +711,7 @@ export {};
|
|
|
711
711
|
*/
|
|
712
712
|
|
|
713
713
|
/**
|
|
714
|
-
* @typedef {import('./contractGovernor.js')
|
|
714
|
+
* @typedef {typeof import('./contractGovernor.js').start} GovernorSF
|
|
715
715
|
*/
|
|
716
716
|
|
|
717
717
|
// TODO find a way to parameterize the startInstance so the governed contract types flow
|
package/src/voterKit.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function prepareVoterKit(baggage:
|
|
1
|
+
export function prepareVoterKit(baggage: Baggage, { submitVote, zcf }: {
|
|
2
2
|
zcf: ZCF;
|
|
3
3
|
submitVote: (questionHandle: Handle<"Question">, voterHandle: Handle<"Voter">, chosenPositions: Position[], weight: bigint) => ERef<CompletedBallet>;
|
|
4
4
|
}): (id: any) => import("@endo/exo").GuardedKit<{
|
|
@@ -9,6 +9,7 @@ export function prepareVoterKit(baggage: import("@agoric/vat-data").Baggage, { s
|
|
|
9
9
|
makeVoteInvitation(positions: any, questionHandle: any): Promise<Invitation<CompletedBallet, undefined>>;
|
|
10
10
|
};
|
|
11
11
|
}>;
|
|
12
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
12
13
|
import type { ZCF } from '@agoric/zoe';
|
|
13
14
|
import type { Position } from './types.js';
|
|
14
15
|
import type { CompletedBallet } from './types.js';
|
package/src/voterKit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voterKit.d.ts","sourceRoot":"","sources":["voterKit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"voterKit.d.ts","sourceRoot":"","sources":["voterKit.js"],"names":[],"mappings":"AAgCO,yCALI,OAAO,uBAEf;IAAoB,GAAG,EAAf,GAAG;IAC8I,UAAU,EAA3J,CAAC,cAAc,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,eAAe,CAAC;CAClJ;;;;;;;GAgCA;6BAvDyB,kBAAkB;yBAF4B,aAAa;8BACqE,YAAY;qCAAZ,YAAY;gCAD9F,aAAa"}
|
package/src/voterKit.js
CHANGED
|
@@ -6,6 +6,7 @@ import { PositionShape, QuestionHandleShape } from './typeGuards.js';
|
|
|
6
6
|
/**
|
|
7
7
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
8
8
|
* @import {VoteCounterCreatorFacet, VoteCounterPublicFacet, QuestionSpec, OutcomeRecord, AddQuestion, AddQuestionReturn, CompletedBallet, Position} from './types.js';
|
|
9
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
const VoterI = M.interface('voter', {
|
|
@@ -24,7 +25,7 @@ const InvitationMakerI = M.interface('invitationMaker', {
|
|
|
24
25
|
/**
|
|
25
26
|
* Make a kit suitable for returning to a voter invited to a committee.
|
|
26
27
|
*
|
|
27
|
-
* @param {
|
|
28
|
+
* @param {Baggage} baggage
|
|
28
29
|
* @param {object} powers
|
|
29
30
|
* @param {ZCF} powers.zcf
|
|
30
31
|
* @param {(questionHandle: Handle<'Question'>, voterHandle: Handle<'Voter'>, chosenPositions: Position[], weight: bigint) => ERef<CompletedBallet>} powers.submitVote
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export function start<SF extends GovernableStartFn>(zcf: ZCF<{
|
|
2
|
-
timer:
|
|
2
|
+
timer: TimerService;
|
|
3
3
|
governedContractInstallation: Installation<SF>;
|
|
4
4
|
governed: {
|
|
5
5
|
issuerKeywordRecord?: IssuerKeywordRecord;
|
|
6
6
|
terms: {
|
|
7
7
|
governedParams: {
|
|
8
|
-
[CONTRACT_ELECTORATE]:
|
|
8
|
+
[CONTRACT_ELECTORATE]: InvitationParam;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
11
|
};
|
|
@@ -48,8 +48,10 @@ export function start<SF extends GovernableStartFn>(zcf: ZCF<{
|
|
|
48
48
|
*/
|
|
49
49
|
export type PuppetContractGovernorKit<SF extends GovernableStartFn> = Awaited<ReturnType<typeof start<SF>>>;
|
|
50
50
|
import type { GovernableStartFn } from '../src/types.js';
|
|
51
|
+
import type { TimerService } from '@agoric/time';
|
|
51
52
|
import type { Installation } from '@agoric/zoe';
|
|
52
53
|
import { CONTRACT_ELECTORATE } from '../src/contractGovernance/governParam.js';
|
|
54
|
+
import type { InvitationParam } from '../src/contractGovernance/typedParamManager.js';
|
|
53
55
|
import type { ZCF } from '@agoric/zoe';
|
|
54
56
|
import type { ParamChangesSpec } from '../src/types.js';
|
|
55
57
|
import type { Passable } from '@endo/pass-style';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"puppetContractGovernor.d.ts","sourceRoot":"","sources":["puppetContractGovernor.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"puppetContractGovernor.d.ts","sourceRoot":"","sources":["puppetContractGovernor.js"],"names":[],"mappings":"AAmCO,sBAb0B,EAAE,SAAtB,iBAAmB,OACrB,IAAI;IACV,KAAK,EAAE,YAAY,CAAC;IACpB,4BAA4B,EAAE,aAAa,EAAE,CAAC,CAAC;IAC/C,QAAQ,EAAE;QACR,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;QAC1C,KAAK,EAAE;YAAC,cAAc,EAAE;gBAAC,CAAC,mBAAmB,CAAC,EAAE,eAAe,CAAA;aAAE,CAAA;SAAC,CAAC;KACpE,CAAA;CACF,CAAC,eACM;IACN,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;;kCAkCU,iBAAiB,GAAG,CAAC;mCAUtB,MAAM,cACN,QAAQ,EAAE;;;;8BALT,KAAK,CAAC,MAAM,CAAC;;;;QA2BvB,wDAAwD;8BAA1C,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;;kCAjC1C,iBAAiB,GAAG,CAAC;mCAUtB,MAAM,cACN,QAAQ,EAAE;;;;8BALT,KAAK,CAAC,MAAM,CAAC;;;;QA2BvB,wDAAwD;8BAA1C,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;;;;;;;GASvD;;;;sCAGgC,EAAE,SAAtB,iBAAmB,IACnB,OAAO,CAAC,UAAU,CAAC,OAAO,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;uCAtGI,iBAAiB;kCACxC,cAAc;kCAF2B,aAAa;oCALjD,0CAA0C;qCAQ5C,gDAAgD;yBAHV,aAAa;sCAC/B,iBAAiB;8BAF3B,kBAAkB;8BACU,aAAa;qCADzC,kBAAkB"}
|
|
@@ -10,6 +10,8 @@ import { makeApiInvocationPositions } from '../src/contractGovernance/governApi.
|
|
|
10
10
|
* @import {Passable, RemotableObject} from '@endo/pass-style';
|
|
11
11
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
12
12
|
* @import {GovernableStartFn, ParamChangesSpec} from '../src/types.js';
|
|
13
|
+
* @import {TimerService} from '@agoric/time';
|
|
14
|
+
* @import {InvitationParam} from '../src/contractGovernance/typedParamManager.js';
|
|
13
15
|
*/
|
|
14
16
|
|
|
15
17
|
// @file a version of the contractGovernor.js contract simplified for testing.
|
|
@@ -20,11 +22,11 @@ import { makeApiInvocationPositions } from '../src/contractGovernance/governApi.
|
|
|
20
22
|
/**
|
|
21
23
|
* @template {GovernableStartFn} SF Start function of governed contract
|
|
22
24
|
* @param {ZCF<{
|
|
23
|
-
* timer:
|
|
25
|
+
* timer: TimerService,
|
|
24
26
|
* governedContractInstallation: Installation<SF>,
|
|
25
27
|
* governed: {
|
|
26
28
|
* issuerKeywordRecord?: IssuerKeywordRecord,
|
|
27
|
-
* terms: {governedParams: {[CONTRACT_ELECTORATE]:
|
|
29
|
+
* terms: {governedParams: {[CONTRACT_ELECTORATE]: InvitationParam }},
|
|
28
30
|
* }
|
|
29
31
|
* }>} zcf
|
|
30
32
|
* @param {{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function setUpGovernedContract<T extends GovernableStartFn>(zoe: ERef<ZoeService>, governedP: ERef<Installation<T>>, timer:
|
|
1
|
+
export function setUpGovernedContract<T extends GovernableStartFn>(zoe: ERef<ZoeService>, governedP: ERef<Installation<T>>, timer: TimerService, termsOfGoverned?: {
|
|
2
2
|
[k: string]: any;
|
|
3
3
|
governedParams?: Record<string, unknown>;
|
|
4
4
|
governedApis?: string[];
|
|
@@ -8,7 +8,7 @@ export function setUpGovernedContract<T extends GovernableStartFn>(zoe: ERef<Zoe
|
|
|
8
8
|
fakeInvitationAmount: import("@agoric/ertp").SetAmount<import("@agoric/zoe").InvitationDetails>;
|
|
9
9
|
}>;
|
|
10
10
|
governorFacets: import("@agoric/zoe/src/zoeService/utils.js").StartedInstanceKit<(<SF extends GovernableStartFn>(zcf: ZCF<{
|
|
11
|
-
timer:
|
|
11
|
+
timer: TimerService;
|
|
12
12
|
governedContractInstallation: Installation<SF>;
|
|
13
13
|
governed: {
|
|
14
14
|
issuerKeywordRecord?: IssuerKeywordRecord;
|
|
@@ -52,7 +52,7 @@ export function setUpGovernedContract<T extends GovernableStartFn>(zoe: ERef<Zoe
|
|
|
52
52
|
}>)>;
|
|
53
53
|
installs: {
|
|
54
54
|
governor: Installation<(<SF extends GovernableStartFn>(zcf: ZCF<{
|
|
55
|
-
timer:
|
|
55
|
+
timer: TimerService;
|
|
56
56
|
governedContractInstallation: Installation<SF>;
|
|
57
57
|
governed: {
|
|
58
58
|
issuerKeywordRecord?: IssuerKeywordRecord;
|
|
@@ -100,6 +100,7 @@ export function setUpGovernedContract<T extends GovernableStartFn>(zoe: ERef<Zoe
|
|
|
100
100
|
}>;
|
|
101
101
|
import type { GovernableStartFn } from '../src/types.js';
|
|
102
102
|
import type { Installation } from '@agoric/zoe';
|
|
103
|
+
import type { TimerService } from '@agoric/time';
|
|
103
104
|
import { CONTRACT_ELECTORATE } from '../src/index.js';
|
|
104
105
|
import type { ZCF } from '@agoric/zoe';
|
|
105
106
|
import type { Instance } from '@agoric/zoe';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"puppetGovernance.d.ts","sourceRoot":"","sources":["puppetGovernance.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"puppetGovernance.d.ts","sourceRoot":"","sources":["puppetGovernance.js"],"names":[],"mappings":"AAqCO,sCAR0B,CAAC,SAArB,iBAAmB,OACrB,IAAI,CAAC,UAAU,CAAC,aAChB,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,SACrB,YAAY,oBACZ;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,0BACvF,EAAE,wBACF,mBAAmB;;;;;;;;;+BAFH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgF3B;uCA1GmC,iBAAiB;kCADmB,aAAa;kCAEtD,cAAc;oCALG,iBAAiB;yBAGO,aAAa;8BAAb,aAAa"}
|
|
@@ -6,6 +6,8 @@ import { CONTRACT_ELECTORATE, ParamTypes } from '../src/index.js';
|
|
|
6
6
|
/**
|
|
7
7
|
* @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
|
|
8
8
|
* @import {GovernableStartFn} from '../src/types.js';
|
|
9
|
+
* @import {TimerService} from '@agoric/time';
|
|
10
|
+
* @import {start} from './puppetContractGovernor.js';
|
|
9
11
|
*/
|
|
10
12
|
|
|
11
13
|
const makeBundle = async sourceRoot => {
|
|
@@ -28,7 +30,7 @@ const autoRefundBundleP = makeBundle(
|
|
|
28
30
|
* @template {GovernableStartFn} T governed contract startfn
|
|
29
31
|
* @param {ERef<ZoeService>} zoe
|
|
30
32
|
* @param {ERef<Installation<T>>} governedP
|
|
31
|
-
* @param {
|
|
33
|
+
* @param {TimerService} timer
|
|
32
34
|
* @param {{ [k: string]: any, governedParams?: Record<string, unknown>, governedApis?: string[] }} termsOfGoverned
|
|
33
35
|
* @param {{}} privateArgsOfGoverned
|
|
34
36
|
* @param {IssuerKeywordRecord} [issuerKeywordRecord]
|
|
@@ -48,7 +50,7 @@ export const setUpGovernedContract = async (
|
|
|
48
50
|
|
|
49
51
|
/**
|
|
50
52
|
* @type {[
|
|
51
|
-
* Installation<
|
|
53
|
+
* Installation<typeof start>,
|
|
52
54
|
* Installation<any>,
|
|
53
55
|
* Installation<T>,
|
|
54
56
|
* ]}
|