@agoric/governance 0.10.4-dev-82cced2.0 → 0.10.4-dev-354c092.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +12 -12
- package/src/contractGovernance/governApi.js +1 -1
- package/src/contractGovernance/governFilter.js +1 -1
- package/src/contractGovernance/governParam.js +1 -1
- package/src/contractGovernance/paramManager.js +4 -4
- package/src/contractGovernor.js +3 -3
- package/src/contractGovernorKit.js +1 -1
- package/src/electorateTools.js +1 -1
- package/src/types-ambient.js +11 -11
- package/src/types.js +11 -11
- package/tools/puppetContractGovernor.js +1 -1
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-354c092.0+354c092",
|
|
4
4
|
"description": "Core governance support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@agoric/assert": "0.6.1-dev-
|
|
35
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
36
|
-
"@agoric/internal": "0.3.3-dev-
|
|
37
|
-
"@agoric/network": "0.1.1-dev-
|
|
38
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
39
|
-
"@agoric/store": "0.9.3-dev-
|
|
40
|
-
"@agoric/time": "0.3.3-dev-
|
|
41
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
42
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
34
|
+
"@agoric/assert": "0.6.1-dev-354c092.0+354c092",
|
|
35
|
+
"@agoric/ertp": "0.16.3-dev-354c092.0+354c092",
|
|
36
|
+
"@agoric/internal": "0.3.3-dev-354c092.0+354c092",
|
|
37
|
+
"@agoric/network": "0.1.1-dev-354c092.0+354c092",
|
|
38
|
+
"@agoric/notifier": "0.6.3-dev-354c092.0+354c092",
|
|
39
|
+
"@agoric/store": "0.9.3-dev-354c092.0+354c092",
|
|
40
|
+
"@agoric/time": "0.3.3-dev-354c092.0+354c092",
|
|
41
|
+
"@agoric/vat-data": "0.5.3-dev-354c092.0+354c092",
|
|
42
|
+
"@agoric/zoe": "0.26.3-dev-354c092.0+354c092",
|
|
43
43
|
"@endo/bundle-source": "^2.7.0",
|
|
44
44
|
"@endo/captp": "^3.1.4",
|
|
45
45
|
"@endo/eventual-send": "^0.17.5",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"import-meta-resolve": "^2.2.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
53
|
+
"@agoric/swingset-vat": "0.32.3-dev-354c092.0+354c092",
|
|
54
54
|
"@endo/bundle-source": "^2.7.0",
|
|
55
55
|
"@endo/init": "^0.5.59",
|
|
56
56
|
"ava": "^5.3.0",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"typeCoverage": {
|
|
79
79
|
"atLeast": 83.56
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "354c09254ac91e9dc97ca97f6bef291b2cafabb6"
|
|
82
82
|
}
|
|
@@ -30,7 +30,7 @@ const makeApiInvocationPositions = (apiMethodName, methodArgs) => {
|
|
|
30
30
|
*
|
|
31
31
|
* @param {ERef<{ [methodName: string]: (...args: any) => unknown }>} governedApis
|
|
32
32
|
* @param {Array<string | symbol>} governedNames names of the governed API methods
|
|
33
|
-
* @param {ERef<import('@agoric/time
|
|
33
|
+
* @param {ERef<import('@agoric/time').TimerService>} timer
|
|
34
34
|
* @param {() => Promise<PoserFacet>} getUpdatedPoserFacet
|
|
35
35
|
* @returns {ApiGovernor}
|
|
36
36
|
*/
|
|
@@ -26,7 +26,7 @@ const makeOfferFilterPositions = strings => {
|
|
|
26
26
|
/**
|
|
27
27
|
* Setup to allow governance to block some invitations.
|
|
28
28
|
*
|
|
29
|
-
* @param {ERef<import('@agoric/time
|
|
29
|
+
* @param {ERef<import('@agoric/time').TimerService>} timer
|
|
30
30
|
* @param {() => Promise<PoserFacet>} getUpdatedPoserFacet
|
|
31
31
|
* @param {GovernedCreatorFacet<{}>} governedCF
|
|
32
32
|
* @returns {FilterGovernor}
|
|
@@ -54,7 +54,7 @@ const assertBallotConcernsParam = (paramSpec, questionSpec) => {
|
|
|
54
54
|
/**
|
|
55
55
|
* @param {ERef<ParamManagerRetriever>} paramManagerRetriever
|
|
56
56
|
* @param {Instance} contractInstance
|
|
57
|
-
* @param {import('@agoric/time
|
|
57
|
+
* @param {import('@agoric/time').TimerService} timer
|
|
58
58
|
* @param {() => Promise<PoserFacet>} getUpdatedPoserFacet
|
|
59
59
|
* @returns {ParamGovernor}
|
|
60
60
|
*/
|
|
@@ -47,8 +47,8 @@ const assertElectorateMatches = (paramManager, governedParams) => {
|
|
|
47
47
|
* @property {(name: string, value: Ratio) => ParamManagerBuilder} addRatio
|
|
48
48
|
* @property {(name: string, value: import('@endo/marshal').CopyRecord<unknown>) => ParamManagerBuilder} addRecord
|
|
49
49
|
* @property {(name: string, value: string) => ParamManagerBuilder} addString
|
|
50
|
-
* @property {(name: string, value: import('@agoric/time
|
|
51
|
-
* @property {(name: string, value: import('@agoric/time
|
|
50
|
+
* @property {(name: string, value: import('@agoric/time').Timestamp) => ParamManagerBuilder} addTimestamp
|
|
51
|
+
* @property {(name: string, value: import('@agoric/time').RelativeTime) => ParamManagerBuilder} addRelativeTime
|
|
52
52
|
* @property {(name: string, value: any) => ParamManagerBuilder} addUnknown
|
|
53
53
|
* @property {() => AnyParamManager} build
|
|
54
54
|
*/
|
|
@@ -197,13 +197,13 @@ const makeParamManagerBuilder = (publisherKit, zoe) => {
|
|
|
197
197
|
return builder;
|
|
198
198
|
};
|
|
199
199
|
|
|
200
|
-
/** @type {(name: string, value: import('@agoric/time
|
|
200
|
+
/** @type {(name: string, value: import('@agoric/time').Timestamp, builder: ParamManagerBuilder) => ParamManagerBuilder} */
|
|
201
201
|
const addTimestamp = (name, value, builder) => {
|
|
202
202
|
buildCopyParam(name, value, assertTimestamp, ParamTypes.TIMESTAMP);
|
|
203
203
|
return builder;
|
|
204
204
|
};
|
|
205
205
|
|
|
206
|
-
/** @type {(name: string, value: import('@agoric/time
|
|
206
|
+
/** @type {(name: string, value: import('@agoric/time').RelativeTime, builder: ParamManagerBuilder) => ParamManagerBuilder} */
|
|
207
207
|
const addRelativeTime = (name, value, builder) => {
|
|
208
208
|
buildCopyParam(name, value, assertRelativeTime, ParamTypes.RELATIVE_TIME);
|
|
209
209
|
return builder;
|
package/src/contractGovernor.js
CHANGED
|
@@ -68,7 +68,7 @@ harden(validateQuestionFromCounter);
|
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* @typedef {StandardTerms} ContractGovernorTerms
|
|
71
|
-
* @property {import('@agoric/time
|
|
71
|
+
* @property {import('@agoric/time').TimerService} timer
|
|
72
72
|
* @property {Installation} governedContractInstallation
|
|
73
73
|
*/
|
|
74
74
|
|
|
@@ -122,7 +122,7 @@ harden(validateQuestionFromCounter);
|
|
|
122
122
|
* GovernorPublic,
|
|
123
123
|
* GovernorCreatorFacet<PF,CF>,
|
|
124
124
|
* {
|
|
125
|
-
* timer: import('@agoric/time
|
|
125
|
+
* timer: import('@agoric/time').TimerService,
|
|
126
126
|
* governedContractInstallation: Installation<CF>,
|
|
127
127
|
* governed: {
|
|
128
128
|
* issuerKeywordRecord: IssuerKeywordRecord,
|
|
@@ -136,7 +136,7 @@ harden(validateQuestionFromCounter);
|
|
|
136
136
|
*
|
|
137
137
|
* @template {GovernableStartFn} SF Start function of governed contract
|
|
138
138
|
* @param {ZCF<{
|
|
139
|
-
* timer: import('@agoric/time
|
|
139
|
+
* timer: import('@agoric/time').TimerService,
|
|
140
140
|
* governedContractInstallation: Installation<SF>,
|
|
141
141
|
* governed: {
|
|
142
142
|
* issuerKeywordRecord: IssuerKeywordRecord,
|
|
@@ -15,7 +15,7 @@ const trace = makeTracer('CGK', false);
|
|
|
15
15
|
*
|
|
16
16
|
* @param {import('@agoric/vat-data').Baggage} baggage
|
|
17
17
|
* @param {{
|
|
18
|
-
* timer: import('@agoric/time
|
|
18
|
+
* timer: import('@agoric/time').TimerService,
|
|
19
19
|
* zoe: ERef<ZoeService>,
|
|
20
20
|
* }} powers
|
|
21
21
|
*/
|
package/src/electorateTools.js
CHANGED
|
@@ -6,7 +6,7 @@ import { deeplyFulfilled, Far } from '@endo/marshal';
|
|
|
6
6
|
* @typedef {object} QuestionRecord
|
|
7
7
|
* @property {ERef<VoteCounterCreatorFacet>} voteCap
|
|
8
8
|
* @property {VoteCounterPublicFacet} publicFacet
|
|
9
|
-
* @property {import('@agoric/time
|
|
9
|
+
* @property {import('@agoric/time').Timestamp} deadline
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
/**
|
package/src/types-ambient.js
CHANGED
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* @typedef { Amount | Brand | Installation | Instance | bigint |
|
|
34
|
-
* Ratio | string | import('@agoric/time
|
|
35
|
-
* import('@agoric/time
|
|
34
|
+
* Ratio | string | import('@agoric/time').TimestampRecord |
|
|
35
|
+
* import('@agoric/time').RelativeTimeRecord | unknown } ParamValue
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
38
|
// XXX better to use the manifest constant ParamTypes
|
|
@@ -331,8 +331,8 @@
|
|
|
331
331
|
|
|
332
332
|
/**
|
|
333
333
|
* @typedef {object} ClosingRule
|
|
334
|
-
* @property {ERef<
|
|
335
|
-
* @property {import('@agoric/time
|
|
334
|
+
* @property {ERef<import('@agoric/time').TimerService>} timer
|
|
335
|
+
* @property {import('@agoric/time').Timestamp} deadline
|
|
336
336
|
*/
|
|
337
337
|
|
|
338
338
|
/**
|
|
@@ -346,7 +346,7 @@
|
|
|
346
346
|
* @property {VoteCounterPublicFacet} publicFacet
|
|
347
347
|
* @property {VoteCounterCreatorFacet} creatorFacet
|
|
348
348
|
* @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<typeof import('./binaryVoteCounter.js').start>} instance
|
|
349
|
-
* @property {import('@agoric/time
|
|
349
|
+
* @property {import('@agoric/time').Timestamp} deadline
|
|
350
350
|
* @property {Handle<'Question'>} questionHandle
|
|
351
351
|
*/
|
|
352
352
|
|
|
@@ -430,8 +430,8 @@
|
|
|
430
430
|
* @property {(name: string) => bigint} getNat
|
|
431
431
|
* @property {(name: string) => Ratio} getRatio
|
|
432
432
|
* @property {(name: string) => string} getString
|
|
433
|
-
* @property {(name: string) => import('@agoric/time
|
|
434
|
-
* @property {(name: string) => import('@agoric/time
|
|
433
|
+
* @property {(name: string) => import('@agoric/time').TimestampRecord} getTimestamp
|
|
434
|
+
* @property {(name: string) => import('@agoric/time').RelativeTimeRecord} getRelativeTime
|
|
435
435
|
* @property {(name: string) => any} getUnknown
|
|
436
436
|
* @property {(name: string, proposedValue: ParamValue) => ParamValue} getVisibleValue - for
|
|
437
437
|
* most types, the visible value is the same as proposedValue. For Invitations
|
|
@@ -613,7 +613,7 @@
|
|
|
613
613
|
*
|
|
614
614
|
* @callback VoteOnParamChanges
|
|
615
615
|
* @param {Installation} voteCounterInstallation
|
|
616
|
-
* @param {import('@agoric/time
|
|
616
|
+
* @param {import('@agoric/time').Timestamp} deadline
|
|
617
617
|
* @param {ParamChangesSpec<P>} paramSpec
|
|
618
618
|
* @returns {Promise<ContractGovernanceVoteResult>}
|
|
619
619
|
*/
|
|
@@ -623,14 +623,14 @@
|
|
|
623
623
|
* @param {string} apiMethodName
|
|
624
624
|
* @param {unknown[]} methodArgs
|
|
625
625
|
* @param {Installation} voteCounterInstallation
|
|
626
|
-
* @param {import('@agoric/time
|
|
626
|
+
* @param {import('@agoric/time').Timestamp} deadline
|
|
627
627
|
* @returns {Promise<ContractGovernanceVoteResult>}
|
|
628
628
|
*/
|
|
629
629
|
|
|
630
630
|
/**
|
|
631
631
|
* @callback VoteOnOfferFilter
|
|
632
632
|
* @param {Installation} voteCounterInstallation
|
|
633
|
-
* @param {import('@agoric/time
|
|
633
|
+
* @param {import('@agoric/time').Timestamp} deadline
|
|
634
634
|
* @param {string[]} strings
|
|
635
635
|
* @returns {Promise<ContractGovernanceVoteResult>}
|
|
636
636
|
*/
|
|
@@ -669,7 +669,7 @@
|
|
|
669
669
|
|
|
670
670
|
/**
|
|
671
671
|
* @typedef {object} GovernedContractTerms
|
|
672
|
-
* @property {import('@agoric/time
|
|
672
|
+
* @property {import('@agoric/time').TimerService} timer
|
|
673
673
|
* @property {IssuerKeywordRecord} issuerKeywordRecord
|
|
674
674
|
* @property {object} privateArgs
|
|
675
675
|
*/
|
package/src/types.js
CHANGED
|
@@ -32,8 +32,8 @@ export {};
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* @typedef { Amount | Brand | Installation | Instance | bigint |
|
|
35
|
-
* Ratio | string | import('@agoric/time
|
|
36
|
-
* import('@agoric/time
|
|
35
|
+
* Ratio | string | import('@agoric/time').TimestampRecord |
|
|
36
|
+
* import('@agoric/time').RelativeTimeRecord | unknown } ParamValue
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
39
|
// XXX better to use the manifest constant ParamTypes
|
|
@@ -332,8 +332,8 @@ export {};
|
|
|
332
332
|
|
|
333
333
|
/**
|
|
334
334
|
* @typedef {object} ClosingRule
|
|
335
|
-
* @property {ERef<
|
|
336
|
-
* @property {import('@agoric/time
|
|
335
|
+
* @property {ERef<import('@agoric/time').TimerService>} timer
|
|
336
|
+
* @property {import('@agoric/time').Timestamp} deadline
|
|
337
337
|
*/
|
|
338
338
|
|
|
339
339
|
/**
|
|
@@ -347,7 +347,7 @@ export {};
|
|
|
347
347
|
* @property {VoteCounterPublicFacet} publicFacet
|
|
348
348
|
* @property {VoteCounterCreatorFacet} creatorFacet
|
|
349
349
|
* @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<typeof import('./binaryVoteCounter.js').start>} instance
|
|
350
|
-
* @property {import('@agoric/time
|
|
350
|
+
* @property {import('@agoric/time').Timestamp} deadline
|
|
351
351
|
* @property {Handle<'Question'>} questionHandle
|
|
352
352
|
*/
|
|
353
353
|
|
|
@@ -431,8 +431,8 @@ export {};
|
|
|
431
431
|
* @property {(name: string) => bigint} getNat
|
|
432
432
|
* @property {(name: string) => Ratio} getRatio
|
|
433
433
|
* @property {(name: string) => string} getString
|
|
434
|
-
* @property {(name: string) => import('@agoric/time
|
|
435
|
-
* @property {(name: string) => import('@agoric/time
|
|
434
|
+
* @property {(name: string) => import('@agoric/time').TimestampRecord} getTimestamp
|
|
435
|
+
* @property {(name: string) => import('@agoric/time').RelativeTimeRecord} getRelativeTime
|
|
436
436
|
* @property {(name: string) => any} getUnknown
|
|
437
437
|
* @property {(name: string, proposedValue: ParamValue) => ParamValue} getVisibleValue - for
|
|
438
438
|
* most types, the visible value is the same as proposedValue. For Invitations
|
|
@@ -614,7 +614,7 @@ export {};
|
|
|
614
614
|
*
|
|
615
615
|
* @callback VoteOnParamChanges
|
|
616
616
|
* @param {Installation} voteCounterInstallation
|
|
617
|
-
* @param {import('@agoric/time
|
|
617
|
+
* @param {import('@agoric/time').Timestamp} deadline
|
|
618
618
|
* @param {ParamChangesSpec<P>} paramSpec
|
|
619
619
|
* @returns {Promise<ContractGovernanceVoteResult>}
|
|
620
620
|
*/
|
|
@@ -624,14 +624,14 @@ export {};
|
|
|
624
624
|
* @param {string} apiMethodName
|
|
625
625
|
* @param {unknown[]} methodArgs
|
|
626
626
|
* @param {Installation} voteCounterInstallation
|
|
627
|
-
* @param {import('@agoric/time
|
|
627
|
+
* @param {import('@agoric/time').Timestamp} deadline
|
|
628
628
|
* @returns {Promise<ContractGovernanceVoteResult>}
|
|
629
629
|
*/
|
|
630
630
|
|
|
631
631
|
/**
|
|
632
632
|
* @callback VoteOnOfferFilter
|
|
633
633
|
* @param {Installation} voteCounterInstallation
|
|
634
|
-
* @param {import('@agoric/time
|
|
634
|
+
* @param {import('@agoric/time').Timestamp} deadline
|
|
635
635
|
* @param {string[]} strings
|
|
636
636
|
* @returns {Promise<ContractGovernanceVoteResult>}
|
|
637
637
|
*/
|
|
@@ -670,7 +670,7 @@ export {};
|
|
|
670
670
|
|
|
671
671
|
/**
|
|
672
672
|
* @typedef {object} GovernedContractTerms
|
|
673
|
-
* @property {import('@agoric/time
|
|
673
|
+
* @property {import('@agoric/time').TimerService} timer
|
|
674
674
|
* @property {IssuerKeywordRecord} issuerKeywordRecord
|
|
675
675
|
* @property {object} privateArgs
|
|
676
676
|
*/
|
|
@@ -17,7 +17,7 @@ import { makeApiInvocationPositions } from '../src/contractGovernance/governApi.
|
|
|
17
17
|
/**
|
|
18
18
|
* @template {GovernableStartFn} SF Start function of governed contract
|
|
19
19
|
* @param {ZCF<{
|
|
20
|
-
* timer: import('@agoric/time
|
|
20
|
+
* timer: import('@agoric/time').TimerService,
|
|
21
21
|
* governedContractInstallation: Installation<SF>,
|
|
22
22
|
* governed: {
|
|
23
23
|
* issuerKeywordRecord?: IssuerKeywordRecord,
|