@agoric/governance 0.12.0-u23.0 → 0.12.0-u23.1

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 (57) hide show
  1. package/package.json +8 -8
  2. package/source-spec-registry.d.ts +49 -0
  3. package/source-spec-registry.d.ts.map +1 -0
  4. package/src/binaryVoteCounter.d.ts +21 -0
  5. package/src/binaryVoteCounter.d.ts.map +1 -0
  6. package/src/breakTie.d.ts +3 -0
  7. package/src/breakTie.d.ts.map +1 -0
  8. package/src/closingRule.d.ts +7 -0
  9. package/src/closingRule.d.ts.map +1 -0
  10. package/src/committee.d.ts +46 -0
  11. package/src/committee.d.ts.map +1 -0
  12. package/src/constants.d.ts +49 -0
  13. package/src/constants.d.ts.map +1 -0
  14. package/src/contractGovernance/assertions.d.ts +11 -0
  15. package/src/contractGovernance/assertions.d.ts.map +1 -0
  16. package/src/contractGovernance/governApi.d.ts +41 -0
  17. package/src/contractGovernance/governApi.d.ts.map +1 -0
  18. package/src/contractGovernance/governFilter.d.ts +36 -0
  19. package/src/contractGovernance/governFilter.d.ts.map +1 -0
  20. package/src/contractGovernance/governParam.d.ts +50 -0
  21. package/src/contractGovernance/governParam.d.ts.map +1 -0
  22. package/src/contractGovernance/paramManager.d.ts +75 -0
  23. package/src/contractGovernance/paramManager.d.ts.map +1 -0
  24. package/src/contractGovernance/typedParamManager.d.ts +41 -0
  25. package/src/contractGovernance/typedParamManager.d.ts.map +1 -0
  26. package/src/contractGovernor.d.ts +40 -0
  27. package/src/contractGovernor.d.ts.map +1 -0
  28. package/src/contractGovernorKit.d.ts +50 -0
  29. package/src/contractGovernorKit.d.ts.map +1 -0
  30. package/src/contractHelper.d.ts +145 -0
  31. package/src/contractHelper.d.ts.map +1 -0
  32. package/src/electorateTools.d.ts +64 -0
  33. package/src/electorateTools.d.ts.map +1 -0
  34. package/src/index.d.ts +10 -0
  35. package/src/index.d.ts.map +1 -0
  36. package/src/multiCandidateVoteCounter.d.ts +21 -0
  37. package/src/multiCandidateVoteCounter.d.ts.map +1 -0
  38. package/src/noActionElectorate.d.ts +16 -0
  39. package/src/noActionElectorate.d.ts.map +1 -0
  40. package/src/question.d.ts +31 -0
  41. package/src/question.d.ts.map +1 -0
  42. package/src/quorumCounter.d.ts +6 -0
  43. package/src/quorumCounter.d.ts.map +1 -0
  44. package/src/typeGuards.d.ts +210 -0
  45. package/src/typeGuards.d.ts.map +1 -0
  46. package/src/types.d.ts +577 -0
  47. package/src/types.d.ts.map +1 -0
  48. package/src/validators.d.ts +21 -0
  49. package/src/validators.d.ts.map +1 -0
  50. package/src/voterKit.d.ts +19 -0
  51. package/src/voterKit.d.ts.map +1 -0
  52. package/tools/puppetContractGovernor.d.ts +60 -0
  53. package/tools/puppetContractGovernor.d.ts.map +1 -0
  54. package/tools/puppetGovernance.d.ts +109 -0
  55. package/tools/puppetGovernance.d.ts.map +1 -0
  56. package/tools/storageDoc.d.ts +2 -0
  57. package/tools/storageDoc.d.ts.map +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/governance",
3
- "version": "0.12.0-u23.0",
3
+ "version": "0.12.0-u23.1",
4
4
  "description": "Core governance support",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -29,13 +29,13 @@
29
29
  },
30
30
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
31
31
  "dependencies": {
32
- "@agoric/ertp": "0.18.0-u23.0",
33
- "@agoric/internal": "0.5.0-u23.0",
34
- "@agoric/notifier": "0.8.0-u23.0",
32
+ "@agoric/ertp": "0.18.0-u23.1",
33
+ "@agoric/internal": "0.5.0-u23.1",
34
+ "@agoric/notifier": "0.8.0-u23.1",
35
35
  "@agoric/store": "0.11.0-u23.0",
36
36
  "@agoric/time": "0.5.0-u23.0",
37
- "@agoric/vat-data": "0.7.0-u23.0",
38
- "@agoric/zoe": "0.28.0-u23.0",
37
+ "@agoric/vat-data": "0.7.0-u23.1",
38
+ "@agoric/zoe": "0.28.0-u23.1",
39
39
  "@endo/bundle-source": "^4.1.2",
40
40
  "@endo/captp": "^4.4.8",
41
41
  "@endo/errors": "^1.2.13",
@@ -47,7 +47,7 @@
47
47
  "import-meta-resolve": "^4.1.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@agoric/swingset-vat": "0.34.0-u23.0",
50
+ "@agoric/swingset-vat": "0.34.0-u23.1",
51
51
  "@endo/bundle-source": "^4.1.2",
52
52
  "@endo/init": "^1.1.12",
53
53
  "ava": "^6.4.1",
@@ -76,5 +76,5 @@
76
76
  "typeCoverage": {
77
77
  "atLeast": 89.5
78
78
  },
79
- "gitHead": "1147be15b0704de17204d04e2407fa3192b98a1c"
79
+ "gitHead": "6a6343510742fef366aa7b4a31a862f9ef409656"
80
80
  }
@@ -0,0 +1,49 @@
1
+ export namespace governanceSourceSpecRegistry {
2
+ namespace binaryVoteCounter {
3
+ let bundleName: string;
4
+ let packagePath: string;
5
+ let sourceSpec: string;
6
+ }
7
+ namespace committee {
8
+ let bundleName_1: string;
9
+ export { bundleName_1 as bundleName };
10
+ let packagePath_1: string;
11
+ export { packagePath_1 as packagePath };
12
+ let sourceSpec_1: string;
13
+ export { sourceSpec_1 as sourceSpec };
14
+ }
15
+ namespace contractGovernor {
16
+ let bundleName_2: string;
17
+ export { bundleName_2 as bundleName };
18
+ let packagePath_2: string;
19
+ export { packagePath_2 as packagePath };
20
+ let sourceSpec_2: string;
21
+ export { sourceSpec_2 as sourceSpec };
22
+ }
23
+ namespace puppetContractGovernor {
24
+ let bundleName_3: string;
25
+ export { bundleName_3 as bundleName };
26
+ let packagePath_3: string;
27
+ export { packagePath_3 as packagePath };
28
+ let sourceSpec_3: string;
29
+ export { sourceSpec_3 as sourceSpec };
30
+ }
31
+ }
32
+ export function getGovernanceSourceSpec(name: keyof typeof governanceSourceSpecRegistry): {
33
+ bundleName: string;
34
+ packagePath: string;
35
+ sourceSpec: string;
36
+ } | {
37
+ bundleName: string;
38
+ packagePath: string;
39
+ sourceSpec: string;
40
+ } | {
41
+ bundleName: string;
42
+ packagePath: string;
43
+ sourceSpec: string;
44
+ } | {
45
+ bundleName: string;
46
+ packagePath: string;
47
+ sourceSpec: string;
48
+ };
49
+ //# sourceMappingURL=source-spec-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-spec-registry.d.ts","sourceRoot":"","sources":["source-spec-registry.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCO,8CADK,MAAM,OAAO,4BAA4B;;;;;;;;;;;;;;;;EAEjB"}
@@ -0,0 +1,21 @@
1
+ /** @type {BuildVoteCounter} */
2
+ export const makeBinaryVoteCounter: BuildVoteCounter;
3
+ /**
4
+ * @param {ZCF<{questionSpec: QuestionSpec, quorumThreshold: bigint}>} zcf
5
+ * @param {{outcomePublisher: Publisher<OutcomeRecord>}} outcomePublisher
6
+ */
7
+ export function start(zcf: ZCF<{
8
+ questionSpec: QuestionSpec;
9
+ quorumThreshold: bigint;
10
+ }>, { outcomePublisher }: {
11
+ outcomePublisher: Publisher<OutcomeRecord>;
12
+ }): {
13
+ publicFacet: import("./types.js").VoteCounterPublicFacet;
14
+ creatorFacet: import("./types.js").VoteCounterCreatorFacet;
15
+ };
16
+ import type { BuildVoteCounter } from './types.js';
17
+ import type { QuestionSpec } from './types.js';
18
+ import type { ZCF } from '@agoric/zoe';
19
+ import type { OutcomeRecord } from './types.js';
20
+ import type { Publisher } from '@agoric/notifier';
21
+ //# sourceMappingURL=binaryVoteCounter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"binaryVoteCounter.d.ts","sourceRoot":"","sources":["binaryVoteCounter.js"],"names":[],"mappings":"AA+CA,+BAA+B;AAC/B,oCADW,gBAAgB,CA8JzB;AAMF;;;GAGG;AACH,2BAHW,IAAI;IAAC,YAAY,EAAE,YAAY,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAC,CAAC,wBAC1D;IAAC,gBAAgB,EAAE,UAAU,aAAa,CAAC,CAAA;CAAC;;;EAoBtD;sCAjNyF,YAAY;kCAAZ,YAAY;yBADhF,aAAa;mCACuD,YAAY;+BAF1E,kBAAkB"}
@@ -0,0 +1,3 @@
1
+ export function breakTie(positions: Position[], n: number): Position[];
2
+ import type { Position } from './types.js';
3
+ //# sourceMappingURL=breakTie.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakTie.d.ts","sourceRoot":"","sources":["breakTie.js"],"names":[],"mappings":"AA4BO,oCAJI,QAAQ,EAAE,KACV,MAAM,GACJ,QAAQ,EAAE,CAItB;8BA7B0B,YAAY"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @import {CloseVoting} from './types.js';
3
+ */
4
+ /** @type {CloseVoting} */
5
+ export const scheduleClose: CloseVoting;
6
+ import type { CloseVoting } from './types.js';
7
+ //# sourceMappingURL=closingRule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"closingRule.d.ts","sourceRoot":"","sources":["closingRule.js"],"names":[],"mappings":"AAOA;;GAEG;AAEH,0BAA0B;AAC1B,4BADW,WAAW,CASpB;iCAZ4B,YAAY"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @import {Handle} from '@agoric/zoe';
3
+ * @import {Remote} from '@agoric/internal';
4
+ * @import {StoredPublishKit} from '@agoric/notifier';
5
+ * @import {MapStore} from '@agoric/swingset-liveslots';
6
+ * @import {ContractMeta, Invitation, ZCF} from '@agoric/zoe';
7
+ * @import {ElectorateCreatorFacet, CommitteeElectoratePublic, QuestionDetails, OutcomeRecord, AddQuestion} from './types.js';
8
+ * @import {Baggage} from '@agoric/vat-data';
9
+ * @import {QuestionRecord} from './electorateTools.js';
10
+ * @import {StorageNode} from '@agoric/internal/src/lib-chainStorage.js';
11
+ * @import {Marshaller} from '@agoric/internal/src/lib-chainStorage.js';
12
+ */
13
+ /**
14
+ * @typedef { ElectorateCreatorFacet & {
15
+ * getVoterInvitations: () => Promise<Invitation<{ voter: { castBallotFor(handle: any, choice?: any, ): void}}>>[]
16
+ * }} CommitteeElectorateCreatorFacet
17
+ */
18
+ /** @type {ContractMeta<typeof start>} */
19
+ export const meta: ContractMeta<typeof start>;
20
+ export function start(zcf: ZCF<{
21
+ committeeName: string;
22
+ committeeSize: number;
23
+ }>, privateArgs: {
24
+ storageNode: Remote<StorageNode>;
25
+ marshaller: Remote<Marshaller>;
26
+ }, baggage: Baggage): {
27
+ creatorFacet: CommitteeElectorateCreatorFacet;
28
+ publicFacet: CommitteeElectoratePublic;
29
+ };
30
+ export type CommitteeElectorateCreatorFacet = ElectorateCreatorFacet & {
31
+ getVoterInvitations: () => Promise<Invitation<{
32
+ voter: {
33
+ castBallotFor(handle: any, choice?: any): void;
34
+ };
35
+ }>>[];
36
+ };
37
+ import type { ContractMeta } from '@agoric/zoe';
38
+ import type { ZCF } from '@agoric/zoe';
39
+ import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
40
+ import type { Remote } from '@agoric/internal';
41
+ import type { Marshaller } from '@agoric/internal/src/lib-chainStorage.js';
42
+ import type { Baggage } from '@agoric/vat-data';
43
+ import type { CommitteeElectoratePublic } from './types.js';
44
+ import type { ElectorateCreatorFacet } from './types.js';
45
+ import type { Invitation } from '@agoric/zoe';
46
+ //# sourceMappingURL=committee.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"committee.d.ts","sourceRoot":"","sources":["committee.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;GAWG;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;kCAX4C,aAAa;yBAAb,aAAa;iCAI/B,0CAA0C;4BAP/C,kBAAkB;gCAQd,0CAA0C;6BAH7C,kBAAkB;+CADqE,YAAY;4CAAZ,YAAY;gCAD7E,aAAa"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Enum of parameter types
3
+ *
4
+ * UNKNOWN is an escape hatch for types we haven't added yet. If you are
5
+ * developing a new contract and use UNKNOWN, please also file an issue to ask
6
+ * us to support the new type.
7
+ */
8
+ export type ParamType = (typeof ParamType)[keyof typeof ParamType];
9
+ export namespace ParamType {
10
+ let AMOUNT: "amount";
11
+ let BRAND: "brand";
12
+ let INSTALLATION: "installation";
13
+ let INSTANCE: "instance";
14
+ let INVITATION: "invitation";
15
+ let NAT: "nat";
16
+ let RATIO: "ratio";
17
+ let STRING: "string";
18
+ let PASSABLE_RECORD: "record";
19
+ let TIMESTAMP: "timestamp";
20
+ let RELATIVE_TIME: "relativeTime";
21
+ let UNKNOWN: "unknown";
22
+ }
23
+ export namespace ParamTypes {
24
+ let AMOUNT_1: "amount";
25
+ export { AMOUNT_1 as AMOUNT };
26
+ let BRAND_1: "brand";
27
+ export { BRAND_1 as BRAND };
28
+ let INSTALLATION_1: "installation";
29
+ export { INSTALLATION_1 as INSTALLATION };
30
+ let INSTANCE_1: "instance";
31
+ export { INSTANCE_1 as INSTANCE };
32
+ let INVITATION_1: "invitation";
33
+ export { INVITATION_1 as INVITATION };
34
+ let NAT_1: "nat";
35
+ export { NAT_1 as NAT };
36
+ let RATIO_1: "ratio";
37
+ export { RATIO_1 as RATIO };
38
+ let STRING_1: "string";
39
+ export { STRING_1 as STRING };
40
+ let PASSABLE_RECORD_1: "record";
41
+ export { PASSABLE_RECORD_1 as PASSABLE_RECORD };
42
+ let TIMESTAMP_1: "timestamp";
43
+ export { TIMESTAMP_1 as TIMESTAMP };
44
+ let RELATIVE_TIME_1: "relativeTime";
45
+ export { RELATIVE_TIME_1 as RELATIVE_TIME };
46
+ let UNKNOWN_1: "unknown";
47
+ export { UNKNOWN_1 as UNKNOWN };
48
+ }
49
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["constants.js"],"names":[],"mappings":";;;;;;;wBAMU,CAAA,OAAO,SAAS,EAAC,MAAM,OAAO,SAAS,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @import {Brand} from '@agoric/ertp';
3
+ */
4
+ export function makeLooksLikeBrand(name: any): (brand: Brand) => void;
5
+ export function makeAssertInstallation(name: any): (installation: any) => void;
6
+ export function makeAssertInstance(name: any): (instance: any) => void;
7
+ export function makeAssertBrandedRatio(name: any, modelRatio: any): (ratio: any) => boolean;
8
+ export function assertRelativeTime(value: any): void;
9
+ export function assertTimestamp(value: any): void;
10
+ import type { Brand } from '@agoric/ertp';
11
+ //# sourceMappingURL=assertions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertions.d.ts","sourceRoot":"","sources":["assertions.js"],"names":[],"mappings":"AAMA;;GAEG;AAEH,gDAES,OADK,KACA,UAGb;AAGD,oDACS,iBAAY,UAKpB;AAGD,gDACS,aAAQ,UAKhB;AAGD,qEACS,UAAK,aAQb;AAGD,qDAEC;AAGD,kDAEC;2BAhDuB,cAAc"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * manage contracts that allow governance to invoke functions.
3
+ *
4
+ * @param {() => ERef<GovernedApis>} getGovernedApis
5
+ * @param {() => Promise<Array<string | symbol>>} getGovernedNames names of the governed API methods
6
+ * @param {ERef<TimerService>} timer
7
+ * @param {() => Promise<PoserFacet>} getUpdatedPoserFacet
8
+ * @returns {ApiGovernor}
9
+ */
10
+ export function setupApiGovernance(getGovernedApis: () => ERef<GovernedApis>, getGovernedNames: () => Promise<Array<string | symbol>>, timer: ERef<TimerService>, getUpdatedPoserFacet: () => Promise<PoserFacet>): ApiGovernor;
11
+ /**
12
+ * @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
13
+ * @import {Passable, RemotableObject} from '@endo/pass-style';
14
+ * @import {Position, ApiGovernor, ApiInvocationIssue, PoserFacet, VoteOnApiInvocation, GovernedApis} from '../types.js';
15
+ * @import {TimerService} from '@agoric/time';
16
+ * @import {ERef} from '@agoric/vow';
17
+ */
18
+ /**
19
+ * Make a pair of positions for a question about whether to invoke an API. If
20
+ * the vote passes, the method will be called on the governedApis facet with the
21
+ * arguments that were provided.
22
+ *
23
+ * @param {string} apiMethodName
24
+ * @param {Passable[]} methodArgs
25
+ */
26
+ export function makeApiInvocationPositions(apiMethodName: string, methodArgs: Passable[]): {
27
+ positive: {
28
+ apiMethodName: string;
29
+ methodArgs: Passable[];
30
+ };
31
+ negative: {
32
+ dontInvoke: string;
33
+ };
34
+ };
35
+ import type { GovernedApis } from '../types.js';
36
+ import type { ERef } from '@agoric/vow';
37
+ import type { TimerService } from '@agoric/time';
38
+ import type { PoserFacet } from '../types.js';
39
+ import type { ApiGovernor } from '../types.js';
40
+ import type { Passable } from '@endo/pass-style';
41
+ //# sourceMappingURL=governApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"governApi.d.ts","sourceRoot":"","sources":["governApi.js"],"names":[],"mappings":"AAkCA;;;;;;;;GAQG;AACH,oDANW,MAAM,KAAK,YAAY,CAAC,oBACxB,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,SACrC,KAAK,YAAY,CAAC,wBAClB,MAAM,OAAO,CAAC,UAAU,CAAC,GACvB,WAAW,CA4FvB;AAzHD;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH,0DAHW,MAAM,cACN,QAAQ,EAAE;;;;;;;;EAMpB;kCAjB0G,aAAa;0BAEjG,aAAa;kCADL,cAAc;gCAD8D,aAAa;iCAAb,aAAa;8BAD5E,kBAAkB"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Setup to allow governance to block some invitations.
3
+ *
4
+ * @param {ERef<TimerService>} timer
5
+ * @param {() => Promise<PoserFacet>} getUpdatedPoserFacet
6
+ * @param {GovernedCreatorFacet<{}>} governedCF
7
+ * @returns {FilterGovernor}
8
+ */
9
+ export function setupFilterGovernance(timer: ERef<TimerService>, getUpdatedPoserFacet: () => Promise<PoserFacet>, governedCF: GovernedCreatorFacet<{}>): FilterGovernor;
10
+ /**
11
+ * @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
12
+ * @import {Position, ApiGovernor, ApiInvocationIssue, PoserFacet, VoteOnApiInvocation, FilterGovernor, GovernedCreatorFacet, OfferFilterIssue, VoteOnOfferFilter} from '../types.js';
13
+ * @import {TimerService} from '@agoric/time';
14
+ * @import {ERef} from '@agoric/vow';
15
+ */
16
+ /**
17
+ * Make a pair of positions for a question about whether to update the offer
18
+ * filter. If the vote passes, the list of blocked invitation strings will be
19
+ * updated.
20
+ *
21
+ * @param {string[]} strings
22
+ */
23
+ export function makeOfferFilterPositions(strings: string[]): {
24
+ positive: {
25
+ strings: string[];
26
+ };
27
+ negative: {
28
+ dontUpdate: string[];
29
+ };
30
+ };
31
+ import type { TimerService } from '@agoric/time';
32
+ import type { ERef } from '@agoric/vow';
33
+ import type { PoserFacet } from '../types.js';
34
+ import type { GovernedCreatorFacet } from '../types.js';
35
+ import type { FilterGovernor } from '../types.js';
36
+ //# sourceMappingURL=governFilter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"governFilter.d.ts","sourceRoot":"","sources":["governFilter.js"],"names":[],"mappings":"AAgCA;;;;;;;GAOG;AACH,6CALW,KAAK,YAAY,CAAC,wBAClB,MAAM,OAAO,CAAC,UAAU,CAAC,cACzB,qBAAqB,EAAE,CAAC,GACtB,cAAc,CAqE1B;AA/FD;;;;;GAKG;AAEH;;;;;;GAMG;AACH,kDAFW,MAAM,EAAE;;;;;;;EAMlB;kCAf8B,cAAc;0BACtB,aAAa;gCAFoI,aAAa;0CAAb,aAAa;oCAAb,aAAa"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * @param {() => ERef<ParamManagerRetriever>} paramManagerRetrieverAccessor
3
+ * @param {Instance} contractInstance
4
+ * @param {TimerService} timer
5
+ * @param {() => Promise<PoserFacet>} getUpdatedPoserFacet
6
+ * @returns {ParamGovernor}
7
+ */
8
+ export function setupParamGovernance(paramManagerRetrieverAccessor: () => ERef<ParamManagerRetriever>, contractInstance: Instance, timer: TimerService, getUpdatedPoserFacet: () => Promise<PoserFacet>): ParamGovernor;
9
+ /**
10
+ * Return a record containing the positive and negative positions for a
11
+ * question on changing the param to the proposedValue.
12
+ *
13
+ * @param {Record<string, ParamValue>} changes
14
+ * @returns {ParamChangePositions}
15
+ */
16
+ export function makeParamChangePositions(changes: Record<string, ParamValue>): ParamChangePositions;
17
+ /**
18
+ * assert that the parameter described by paramSpec is proposed to be changed in
19
+ * the question described by questionSpec.
20
+ *
21
+ * @param {{ parameterName: string, paramPath: unknown}} paramSpec
22
+ * @param {QuestionSpec<ParamChangeIssue>} questionSpec
23
+ */
24
+ export function assertBallotConcernsParam(paramSpec: {
25
+ parameterName: string;
26
+ paramPath: unknown;
27
+ }, questionSpec: QuestionSpec<ParamChangeIssue>): void;
28
+ /**
29
+ * @import {ContractMeta, Installation, Instance, Invitation, ZCF} from '@agoric/zoe';
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';
33
+ * @import {ERef} from '@agoric/vow';
34
+ */
35
+ /**
36
+ * The electorate that governs changes to the contract's parameters. It must be
37
+ * declared in the governed contract.
38
+ */
39
+ export const CONTRACT_ELECTORATE: "Electorate";
40
+ import type { ParamManagerRetriever } from '../types.js';
41
+ import type { ERef } from '@agoric/vow';
42
+ import type { Instance } from '@agoric/zoe';
43
+ import type { TimerService } from '@agoric/time';
44
+ import type { PoserFacet } from '../types.js';
45
+ import type { ParamGovernor } from '../types.js';
46
+ import type { ParamValue } from '../types.js';
47
+ import type { ParamChangePositions } from '../types.js';
48
+ import type { ParamChangeIssue } from '../types.js';
49
+ import type { QuestionSpec } from '../types.js';
50
+ //# sourceMappingURL=governParam.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"governParam.d.ts","sourceRoot":"","sources":["governParam.js"],"names":[],"mappings":"AA4DA;;;;;;GAMG;AACH,oEANW,MAAM,KAAK,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,gBAAgB,CAAC,QAWxC;AA7CD;;;;;;GAMG;AAEH;;;GAGG;AACH,kCAA4B,YAAY,CAAC;2CAVsI,aAAa;0BAGrK,aAAa;8BAJoC,aAAa;kCAEtD,cAAc;gCADkI,aAAa;mCAAb,aAAa;gCAAb,aAAa;0CAAb,aAAa;sCAAb,aAAa;kCAAb,aAAa"}
@@ -0,0 +1,75 @@
1
+ export type ParamManagerBuilder = {
2
+ addAmount: (name: string, value: Amount) => ParamManagerBuilder;
3
+ addBrand: (name: string, value: Brand) => ParamManagerBuilder;
4
+ addInstallation: (name: string, value: Installation) => ParamManagerBuilder;
5
+ addInstance: (name: string, value: Instance) => ParamManagerBuilder;
6
+ addInvitation: (name: string, value: Invitation) => ParamManagerBuilder;
7
+ addNat: (name: string, value: bigint) => ParamManagerBuilder;
8
+ addRatio: (name: string, value: Ratio) => ParamManagerBuilder;
9
+ addRecord: (name: string, value: CopyRecord<any>) => ParamManagerBuilder;
10
+ addString: (name: string, value: string) => ParamManagerBuilder;
11
+ addTimestamp: (name: string, value: Timestamp) => ParamManagerBuilder;
12
+ addRelativeTime: (name: string, value: RelativeTime) => ParamManagerBuilder;
13
+ addUnknown: (name: string, value: any) => ParamManagerBuilder;
14
+ build: () => AnyParamManager;
15
+ };
16
+ /**
17
+ * @import {MapStore} from '@agoric/swingset-liveslots';
18
+ * @import {ContractMeta, Installation, Instance, Invitation, Keyword, ZCF, ZoeService} from '@agoric/zoe';
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';
25
+ * @import {Ratio} from '@agoric/ertp';
26
+ * @import {Amount} from '@agoric/ertp';
27
+ * @import {Brand} from '@agoric/ertp';
28
+ * @import {ERef} from '@agoric/vow';
29
+ */
30
+ /**
31
+ * @param {ParamManagerBase} paramManager
32
+ * @param {{[CONTRACT_ELECTORATE]: ParamValueTyped<'invitation'>}} governedParams
33
+ */
34
+ export function assertElectorateMatches(paramManager: ParamManagerBase, governedParams: {
35
+ [CONTRACT_ELECTORATE]: ParamValueTyped<"invitation">;
36
+ }): void;
37
+ /**
38
+ * @typedef {object} ParamManagerBuilder
39
+ * @property {(name: string, value: Amount) => ParamManagerBuilder} addAmount
40
+ * @property {(name: string, value: Brand) => ParamManagerBuilder} addBrand
41
+ * @property {(name: string, value: Installation) => ParamManagerBuilder} addInstallation
42
+ * @property {(name: string, value: Instance) => ParamManagerBuilder} addInstance
43
+ * @property {(name: string, value: Invitation) => ParamManagerBuilder} addInvitation
44
+ * @property {(name: string, value: bigint) => ParamManagerBuilder} addNat
45
+ * @property {(name: string, value: Ratio) => ParamManagerBuilder} addRatio
46
+ * @property {(name: string, value: CopyRecord<any>) => ParamManagerBuilder} addRecord
47
+ * @property {(name: string, value: string) => ParamManagerBuilder} addString
48
+ * @property {(name: string, value: Timestamp) => ParamManagerBuilder} addTimestamp
49
+ * @property {(name: string, value: RelativeTime) => ParamManagerBuilder} addRelativeTime
50
+ * @property {(name: string, value: any) => ParamManagerBuilder} addUnknown
51
+ * @property {() => AnyParamManager} build
52
+ */
53
+ /**
54
+ * @param {StoredPublisherKit<GovernanceSubscriptionState>} publisherKit
55
+ * @param {ERef<ZoeService>} [zoe]
56
+ */
57
+ export function makeParamManagerBuilder(publisherKit: StoredPublisherKit<GovernanceSubscriptionState>, zoe?: ERef<ZoeService>): ParamManagerBuilder;
58
+ import type { Amount } from '@agoric/ertp';
59
+ import type { Brand } from '@agoric/ertp';
60
+ import type { Installation } from '@agoric/zoe';
61
+ import type { Instance } from '@agoric/zoe';
62
+ import type { Invitation } from '@agoric/zoe';
63
+ import type { Ratio } from '@agoric/ertp';
64
+ import type { CopyRecord } from '@endo/marshal';
65
+ import type { Timestamp } from '@agoric/time';
66
+ import type { RelativeTime } from '@agoric/time';
67
+ import type { AnyParamManager } from '../types.js';
68
+ import type { ParamManagerBase } from '../types.js';
69
+ import { CONTRACT_ELECTORATE } from './governParam.js';
70
+ import type { ParamValueTyped } from '../types.js';
71
+ import type { GovernanceSubscriptionState } from '../types.js';
72
+ import type { StoredPublisherKit } from '@agoric/notifier';
73
+ import type { ZoeService } from '@agoric/zoe';
74
+ import type { ERef } from '@agoric/vow';
75
+ //# sourceMappingURL=paramManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paramManager.d.ts","sourceRoot":"","sources":["paramManager.js"],"names":[],"mappings":";eAqDc,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;;AA7CnC;;;;;;;;;;;;;GAaG;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,KAAK,UAAU,CAAC,uBAgX1B;4BAxZwB,cAAc;2BACf,cAAc;kCATuD,aAAa;8BAAb,aAAa;gCAAb,aAAa;2BAOlF,cAAc;gCALT,eAAe;+BAChB,cAAc;kCACX,cAAc;qCAHqF,aAAa;sCAAb,aAAa;oCAL3G,kBAAkB;qCAK4E,aAAa;iDAAb,aAAa;wCAI1G,kBAAkB;gCALsC,aAAa;0BAUnF,aAAa"}
@@ -0,0 +1,41 @@
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
+ export function makeParamManagerFromTerms<I extends Record<string, Invitation> & {
4
+ Electorate: Invitation;
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
+ export type ParamTypesMap = Record<Keyword, ParamType>;
7
+ export type ParamTypesMapFromRecord<M extends ParamStateRecord> = { [R in keyof M]: M[R]["type"]; };
8
+ export type ParamRecordsFromTypes<M extends ParamTypesMap> = { [T in keyof M]: {
9
+ type: M[T];
10
+ value: ParamValueForType<M[T]>;
11
+ }; };
12
+ export type Getters<M extends ParamTypesMap> = { [K in keyof M as `get${string & K}`]: () => ParamValueForType<M[K]>; };
13
+ export type Updaters<T extends ParamTypesMap> = { [K in keyof T as `update${string & K}`]: (value: ParamValueForType<T[K]>) => void; };
14
+ export type TypedParamManager<M extends ParamTypesMap> = ParamManagerBase & Getters<M> & Updaters<M> & {
15
+ readonly: () => Getters<M>;
16
+ } & {
17
+ updateParams: UpdateParams;
18
+ };
19
+ /**
20
+ * param spec tuple
21
+ */
22
+ export type ST<T extends ParamType> = [type: T, value: ParamValueForType<T>];
23
+ export type InvitationParam = {
24
+ type: "invitation";
25
+ value: Amount<"set">;
26
+ };
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
+ export type AsyncSpecTuple = ["invitation", Invitation];
29
+ import type { Keyword } from '@agoric/zoe';
30
+ import type { GovernanceSubscriptionState } from '../types.js';
31
+ import type { StoredPublisherKit } from '@agoric/notifier';
32
+ import type { ZCF } from '@agoric/zoe';
33
+ import type { Invitation } from '@agoric/zoe';
34
+ import type { GovernanceTerms } from '../types.js';
35
+ import type { ParamType } from '../constants.js';
36
+ import type { ParamStateRecord } from '../types.js';
37
+ import type { ParamValueForType } from '../types.js';
38
+ import type { ParamManagerBase } from '../types.js';
39
+ import type { UpdateParams } from '../types.js';
40
+ import type { Amount } from '@agoric/ertp';
41
+ //# sourceMappingURL=typedParamManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typedParamManager.d.ts","sourceRoot":"","sources":["typedParamManager.js"],"names":[],"mappings":"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"}
@@ -0,0 +1,40 @@
1
+ /** @type {ContractMeta<typeof start>} */
2
+ export const meta: ContractMeta<typeof start>;
3
+ export function validateQuestionDetails(zoe: ERef<ZoeService>, electorate: Instance, details: ParamChangeIssueDetails): Promise<[void, void, void]>;
4
+ export function validateQuestionFromCounter(zoe: ERef<ZoeService>, electorate: Instance, voteCounter: Instance): Promise<[void, void, void]>;
5
+ export function start<SF extends GovernableStartFn>(zcf: ZCF<{
6
+ timer: TimerService;
7
+ governedContractInstallation: Installation<SF>;
8
+ governed: {
9
+ issuerKeywordRecord: IssuerKeywordRecord;
10
+ terms: {
11
+ governedParams: {
12
+ [CONTRACT_ELECTORATE]: InvitationParam;
13
+ };
14
+ };
15
+ label?: string;
16
+ };
17
+ }>, privateArgs: {
18
+ governed: Record<string, unknown>;
19
+ }, baggage: Baggage): Promise<{
20
+ creatorFacet: GovernorCreatorFacet<SF>;
21
+ publicFacet: GovernorPublic;
22
+ }>;
23
+ export type ContractGovernorTerms = StandardTerms;
24
+ import type { ContractMeta } from '@agoric/zoe';
25
+ import type { ZoeService } from '@agoric/zoe';
26
+ import type { ERef } from '@agoric/vow';
27
+ import type { Instance } from '@agoric/zoe';
28
+ import type { ParamChangeIssueDetails } from './types.js';
29
+ import type { GovernableStartFn } from './types.js';
30
+ import type { TimerService } from '@agoric/time';
31
+ import type { Installation } from '@agoric/zoe';
32
+ import type { IssuerKeywordRecord } from '@agoric/zoe';
33
+ import { CONTRACT_ELECTORATE } from './contractGovernance/governParam.js';
34
+ import type { InvitationParam } from './contractGovernance/typedParamManager.js';
35
+ import type { ZCF } from '@agoric/zoe';
36
+ import type { Baggage } from '@agoric/vat-data';
37
+ import type { GovernorCreatorFacet } from './types.js';
38
+ import type { GovernorPublic } from './types.js';
39
+ import type { StandardTerms } from '@agoric/zoe';
40
+ //# sourceMappingURL=contractGovernor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contractGovernor.d.ts","sourceRoot":"","sources":["contractGovernor.js"],"names":[],"mappings":"AAqBA,yCAAyC;AACzC,mBADW,aAAa,OAAO,KAAK,CAAC,CAGnC;AAYK,6CAJI,KAAK,UAAU,CAAC,cAChB,QAAQ,WACR,uBAAuB,+BAkBjC;AAYM,iDAJI,KAAK,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;kCAnE8F,aAAa;gCAAb,aAAa;0BAK9G,aAAa;8BALoF,aAAa;6CAClC,YAAY;uCAAZ,YAAY;kCAChF,cAAc;kCAF2E,aAAa;yCAAb,aAAa;oCALjG,qCAAqC;qCAQvC,2CAA2C;yBAH2C,aAAa;6BAI3G,kBAAkB;0CAHuD,YAAY;oCAAZ,YAAY;mCADS,aAAa"}
@@ -0,0 +1,50 @@
1
+ export function prepareContractGovernorKit(baggage: Baggage, powers: {
2
+ timer: TimerService;
3
+ zoe: ERef<ZoeService>;
4
+ }): (startedInstanceKit: StartedInstanceKit<GovernableStartFn>, limitedCreatorFacet: any) => import("@endo/exo").GuardedKit<{
5
+ helper: {
6
+ getElectorateInstance(): Promise<Instance>;
7
+ getUpdatedPoserFacet(): Promise<PoserFacet>;
8
+ provideApiGovernance(): Promise<import("./types.js").ApiGovernor>;
9
+ provideFilterGovernance(): import("./types.js").FilterGovernor;
10
+ provideParamGovernance(): import("./types.js").ParamGovernor;
11
+ };
12
+ creator: {
13
+ /**
14
+ * @param {Invitation} poserInvitation
15
+ * @returns {Promise<void>}
16
+ */
17
+ replaceElectorate(poserInvitation: Invitation): Promise<void>;
18
+ voteOnParamChanges(voteCounterInstallation: Installation, deadline: import("@agoric/time").Timestamp, paramSpec: import("./types.js").ParamChangesSpec): Promise<import("./types.js").ContractGovernanceVoteResult>;
19
+ voteOnApiInvocation(apiMethodName: string, methodArgs: import("@endo/pass-style").Passable[], voteCounterInstallation: Installation, deadline: import("@agoric/time").Timestamp): Promise<import("./types.js").ContractGovernanceVoteResult>;
20
+ voteOnOfferFilter(voteCounterInstallation: Installation, deadline: import("@agoric/time").Timestamp, strings: string[]): Promise<import("./types.js").ContractGovernanceVoteResult>;
21
+ getCreatorFacet(): any;
22
+ getAdminFacet(): import("@agoric/zoe/src/zoeService/utils.js").AdminFacet<GovernableStartFn>;
23
+ getInstance(): import("@agoric/zoe/src/zoeService/utils.js").Instance<GovernableStartFn>;
24
+ getPublicFacet(): object & import("./types.js").GovernedPublicFacetMethods;
25
+ };
26
+ public: {
27
+ getElectorate(): Promise<Instance>;
28
+ getGovernedContract(): import("@agoric/zoe/src/zoeService/utils.js").Instance<GovernableStartFn>;
29
+ /** @param {Instance} counter */
30
+ validateVoteCounter(counter: Instance): Promise<void>;
31
+ /** @param {Instance} regP */
32
+ validateElectorate(regP: Instance): Promise<void>;
33
+ /** @param {ClosingRule} closingRule */
34
+ validateTimer(closingRule: ClosingRule): void;
35
+ };
36
+ }>;
37
+ export type ContractGovernorKit = EReturn<EReturn<typeof prepareContractGovernorKit>>;
38
+ import type { Baggage } from '@agoric/vat-data';
39
+ import type { TimerService } from '@agoric/time';
40
+ import type { ZoeService } from '@agoric/zoe';
41
+ import type { ERef } from '@agoric/vow';
42
+ import type { GovernableStartFn } from './types.js';
43
+ import type { StartedInstanceKit } from '@agoric/zoe/src/zoeService/utils.js';
44
+ import type { Instance } from '@agoric/zoe';
45
+ import type { PoserFacet } from './types.js';
46
+ import type { Invitation } from '@agoric/zoe';
47
+ import type { Installation } from '@agoric/zoe';
48
+ import type { ClosingRule } from './types.js';
49
+ import type { EReturn } from '@endo/far';
50
+ //# sourceMappingURL=contractGovernorKit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contractGovernorKit.d.ts","sourceRoot":"","sources":["contractGovernorKit.js"],"names":[],"mappings":"AAyEO,oDANI,OAAO,UACP;IACN,KAAK,EAAE,YAAY,CAAC;IACpB,GAAG,EAAE,KAAK,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;6BAxQvC,kBAAkB;kCACb,cAAc;gCAHuC,aAAa;0BAM1E,aAAa;uCALgG,YAAY;wCAG3G,qCAAqC;8BAJU,aAAa;gCACmC,YAAY;gCAD5D,aAAa;kCAAb,aAAa;iCACmC,YAAY;6BAFtH,WAAW"}