@agoric/governance 0.10.4-dev-8e82183.0 → 0.10.4-dev-2e2466e.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/governance",
3
- "version": "0.10.4-dev-8e82183.0+8e82183",
3
+ "version": "0.10.4-dev-2e2466e.0+2e2466e",
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-8e82183.0+8e82183",
35
- "@agoric/ertp": "0.16.3-dev-8e82183.0+8e82183",
36
- "@agoric/internal": "0.3.3-dev-8e82183.0+8e82183",
37
- "@agoric/network": "0.1.1-dev-8e82183.0+8e82183",
38
- "@agoric/notifier": "0.6.3-dev-8e82183.0+8e82183",
39
- "@agoric/store": "0.9.3-dev-8e82183.0+8e82183",
40
- "@agoric/time": "0.3.3-dev-8e82183.0+8e82183",
41
- "@agoric/vat-data": "0.5.3-dev-8e82183.0+8e82183",
42
- "@agoric/zoe": "0.26.3-dev-8e82183.0+8e82183",
34
+ "@agoric/assert": "0.6.1-dev-2e2466e.0+2e2466e",
35
+ "@agoric/ertp": "0.16.3-dev-2e2466e.0+2e2466e",
36
+ "@agoric/internal": "0.3.3-dev-2e2466e.0+2e2466e",
37
+ "@agoric/network": "0.1.1-dev-2e2466e.0+2e2466e",
38
+ "@agoric/notifier": "0.6.3-dev-2e2466e.0+2e2466e",
39
+ "@agoric/store": "0.9.3-dev-2e2466e.0+2e2466e",
40
+ "@agoric/time": "0.3.3-dev-2e2466e.0+2e2466e",
41
+ "@agoric/vat-data": "0.5.3-dev-2e2466e.0+2e2466e",
42
+ "@agoric/zoe": "0.26.3-dev-2e2466e.0+2e2466e",
43
43
  "@endo/bundle-source": "^3.2.2",
44
44
  "@endo/captp": "^4.1.1",
45
45
  "@endo/eventual-send": "^1.2.1",
@@ -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-8e82183.0+8e82183",
53
+ "@agoric/swingset-vat": "0.32.3-dev-2e2466e.0+2e2466e",
54
54
  "@endo/bundle-source": "^3.2.2",
55
55
  "@endo/init": "^1.1.1",
56
56
  "ava": "^5.3.0",
@@ -79,5 +79,5 @@
79
79
  "typeCoverage": {
80
80
  "atLeast": 89.25
81
81
  },
82
- "gitHead": "8e821833bce43984d493d297c0513b474bb4532b"
82
+ "gitHead": "2e2466e86e6f5417557fa7a0d0f7ca5104061cdd"
83
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"contractGovernorKit.d.ts","sourceRoot":"","sources":["contractGovernorKit.js"],"names":[],"mappings":"AAkEO,oDANI,OAAO,kBAAkB,EAAE,OAAO,UAClC;IACV,KAAS,EAAE,OAAO,cAAc,EAAE,YAAY,CAAC;IAC/C,GAAO,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;CACvB;;QAiCI,sCAAsC;iCAArB,OAAO,CAAC,QAAQ,CAAC;QAOlC,wCAAwC;;;;;;;QAmExC;;;WAGG;2CAFQ,UAAU,GACR,OAAO,CAAC,IAAI,CAAC;QAgB1B,iCAAiC;;QAOjC,kCAAkC;+DAoFmjU,SAAS,2BAAwB,YAAY,YAAqC,OAAO,cAAc,EAAE,SAAS;QArEvsU,gCAAgC;mDAqEyxU,YAAY,YAAqC,OAAO,cAAc,EAAE,SAAS,WAAsB,QAAQ;;;;;;;;;QAzCx6U,gCAAgC;qCAApB,QAAQ;QAepB,6BAA6B;iCAAjB,QAAQ;QAWpB,uCAAuC;;;GAY9C;kCAEa,UAAU,CAAC,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC;uCApQ2K,YAAY;gCAAZ,YAAY;iCAAZ,YAAY"}
1
+ {"version":3,"file":"contractGovernorKit.d.ts","sourceRoot":"","sources":["contractGovernorKit.js"],"names":[],"mappings":"AAkEO,oDANI,OAAO,kBAAkB,EAAE,OAAO,UAClC;IACV,KAAS,EAAE,OAAO,cAAc,EAAE,YAAY,CAAC;IAC/C,GAAO,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;CACvB;;QAiCI,sCAAsC;iCAArB,OAAO,CAAC,QAAQ,CAAC;QAOlC,wCAAwC;;;;;;;QAmExC;;;WAGG;2CAFQ,UAAU,GACR,OAAO,CAAC,IAAI,CAAC;QAgB1B,iCAAiC;;QAOjC,kCAAkC;+DAoF4/T,SAAS,2BAAwB,YAAY,YAAqC,OAAO,cAAc,EAAE,SAAS;QArEhpU,gCAAgC;mDAqEkuU,YAAY,YAAqC,OAAO,cAAc,EAAE,SAAS,WAAsB,QAAQ;;;;;;;;;QAzCj3U,gCAAgC;qCAApB,QAAQ;QAepB,6BAA6B;iCAAjB,QAAQ;QAWpB,uCAAuC;;;GAY9C;kCAEa,UAAU,CAAC,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC;uCApQ2K,YAAY;gCAAZ,YAAY;iCAAZ,YAAY"}
package/src/types.d.ts CHANGED
@@ -502,7 +502,960 @@ export type AssertContractGovernance = (zoe: ERef<ZoeService>, allegedGoverned:
502
502
  };
503
503
  label?: string | undefined;
504
504
  };
505
- }>, privateArgs: {
505
+ }>, privateArgs:
506
+ /**
507
+ * @typedef {object} VoteStatistics
508
+ * @property {bigint} spoiled
509
+ * @property {number} votes
510
+ * @property {PositionCount[]} results
511
+ */
512
+ /**
513
+ * @typedef {object} QuorumCounter
514
+ * @property {(stats: VoteStatistics) => boolean} check
515
+ */
516
+ /**
517
+ * @callback BuildQuestion
518
+ * @param {QuestionSpec} questionSpec
519
+ * @param {Instance} instance - voteCounter instance
520
+ * @returns {Question}
521
+ */
522
+ /**
523
+ * @typedef {object} VoteCounterCreatorFacet - a facet that the Electorate should
524
+ * hold tightly. submitVote() is the core capability that allows the holder to
525
+ * specify the identity and choice of a voter. The voteCounter is making that
526
+ * available to the Electorate, which should wrap and attenuate it so each
527
+ * voter gets only the ability to cast their own vote at a weight specified by
528
+ * the electorate.
529
+ * @property {SubmitVote} submitVote
530
+ */
531
+ /**
532
+ * @typedef {object} VoteCounterPublicFacet
533
+ * @property {() => boolean} isOpen
534
+ * @property {() => Question} getQuestion
535
+ * @property {() => Promise<Position>} getOutcome
536
+ * @property {() => QuestionDetails} getDetails
537
+ * @property {() => Promise<VoteStatistics>} getStats
538
+ */
539
+ /**
540
+ * @typedef {object} MultiVoteCounterPublicFacet
541
+ * @property {() => boolean} isOpen
542
+ * @property {() => Question} getQuestion
543
+ * @property {() => Promise<Position[]>} getOutcome
544
+ * @property {() => QuestionDetails} getDetails
545
+ * @property {() => Promise<VoteStatistics>} getStats
546
+ */
547
+ /**
548
+ * @typedef {object} VoteCounterCloseFacet
549
+ * TEST ONLY: Should not be allowed to escape from contracts
550
+ * @property {() => void} closeVoting
551
+ */
552
+ /**
553
+ * @typedef {object} VoteCounterFacets
554
+ * @property {VoteCounterPublicFacet} publicFacet
555
+ * @property {VoteCounterCreatorFacet} creatorFacet
556
+ * @property {VoteCounterCloseFacet} closeFacet
557
+ */
558
+ /**
559
+ * @typedef {object} MultiVoteCounterFacets
560
+ * @property {MultiVoteCounterPublicFacet} publicFacet
561
+ * @property {VoteCounterCreatorFacet} creatorFacet
562
+ * @property {VoteCounterCloseFacet} closeFacet
563
+ */
564
+ /**
565
+ * @callback BuildVoteCounter
566
+ * @param {QuestionSpec} questionSpec
567
+ * @param {bigint} threshold - questionSpec includes quorumRule; the electorate
568
+ * converts that to a number that the counter can enforce.
569
+ * @param {Instance} instance
570
+ * @param {ERef<Publisher<OutcomeRecord>>} publisher
571
+ * @returns {VoteCounterFacets}
572
+ */
573
+ /**
574
+ * @callback BuildMultiVoteCounter
575
+ * @param {QuestionSpec} questionSpec
576
+ * @param {bigint} threshold - questionSpec includes quorumRule; the electorate
577
+ * converts that to a number that the counter can enforce.
578
+ * @param {Instance} instance
579
+ * @param {ERef<Publisher<MultiOutcomeRecord>>} publisher
580
+ * @returns {MultiVoteCounterFacets}
581
+ */
582
+ /**
583
+ * @typedef {object} CompletedBallet
584
+ * @property {Position} chosen
585
+ * @property {bigint} shares
586
+ */
587
+ /**
588
+ * @callback SubmitVote
589
+ * @param {Handle<'Voter'>} voterHandle
590
+ * @param {Position[]} chosenPositions
591
+ * @param {bigint} [weight]
592
+ * @returns {CompletedBallet}
593
+ */
594
+ /**
595
+ * @callback GetOpenQuestions
596
+ * @returns {Promise<Handle<'Question'>[]>}
597
+ */
598
+ /**
599
+ * @callback GetQuestion
600
+ * @param {Handle<'Question'>} h
601
+ * @returns {Promise<Question>}
602
+ */
603
+ /**
604
+ * @typedef {object} ElectoratePublic
605
+ * @property {() => Subscriber<QuestionDetails>} getQuestionSubscriber
606
+ * @property {GetOpenQuestions} getOpenQuestions,
607
+ * @property {() => Instance} getInstance
608
+ * @property {GetQuestion} getQuestion
609
+ */
610
+ /**
611
+ * @typedef { ElectoratePublic & {makeVoterInvitation: () => ERef<Invitation>} } ClaimsElectoratePublic
612
+ * @typedef { ElectoratePublic & {getName: () => string} } CommitteeElectoratePublic
613
+ */
614
+ /**
615
+ * @typedef {object} PoserFacet
616
+ * @property {AddQuestion} addQuestion
617
+ */
618
+ /**
619
+ * @typedef {object} ElectorateCreatorFacet
620
+ * @property {AddQuestion} addQuestion can be used directly when the creator doesn't need any
621
+ * reassurance. When someone needs to connect addQuestion to the Electorate
622
+ * instance, getPoserInvitation() lets them get addQuestion with assurance.
623
+ * @property {() => Promise<Invitation>} getPoserInvitation
624
+ * @property {() => Subscriber<QuestionDetails>} getQuestionSubscriber
625
+ * @property {() => ElectoratePublic} getPublicFacet
626
+ */
627
+ /**
628
+ * @typedef {object} GetVoterInvitations
629
+ * @property {() => Invitation[]} getVoterInvitations
630
+ */
631
+ /**
632
+ * @typedef {object} VoterFacet - a facet that the Electorate should hold
633
+ * tightly. It allows specification of the vote's weight, so the Electorate
634
+ * should distribute an attenuated wrapper that doesn't make that available!
635
+ * @property {SubmitVote} submitVote
636
+ */
637
+ /**
638
+ * @typedef {object} ClosingRule
639
+ * @property {ERef<import('@agoric/time').TimerService>} timer
640
+ * @property {import('@agoric/time').Timestamp} deadline
641
+ */
642
+ /**
643
+ * @callback CloseVoting
644
+ * @param {ClosingRule} closingRule
645
+ * @param {() => void} closeVoting
646
+ */
647
+ /**
648
+ * @typedef {object} AddQuestionReturn
649
+ * @property {VoteCounterPublicFacet} publicFacet
650
+ * @property {VoteCounterCreatorFacet} creatorFacet
651
+ * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<typeof import('./binaryVoteCounter.js').start>} instance
652
+ * @property {import('@agoric/time').Timestamp} deadline
653
+ * @property {Handle<'Question'>} questionHandle
654
+ */
655
+ /**
656
+ * @callback AddQuestion
657
+ * @param {ERef<Installation>} voteCounter
658
+ * @param {QuestionSpec} questionSpec
659
+ * @returns {Promise<AddQuestionReturn>}
660
+ */
661
+ /**
662
+ * @callback CreateQuestion
663
+ *
664
+ * @param {string} name - The name of the parameter to change
665
+ * @param {ParamValue} proposedValue - the proposed value for the named
666
+ * parameter
667
+ * @param {Installation} voteCounterInstallation - the voteCounter to
668
+ * instantiate to count votes. Expected to be a binaryVoteCounter. Other
669
+ * voteCounters might be added here, or might require separate governors.
670
+ * under management so users can trace it back and see that it would use
671
+ * this electionManager to manage parameters
672
+ * @param {Instance} contractInstance - include the instance of the contract
673
+ * @param {ClosingRule} closingRule - deadline and timer for closing voting
674
+ * @returns {Promise<QuestionDetails>}
675
+ */
676
+ /**
677
+ * @template [P=StandardParamPath] path for a paramManagerRetriever
678
+ * @typedef {object} ParamChangeIssue
679
+ * @property {ParamChangesSpec<P>} spec
680
+ * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>} contract
681
+ */
682
+ /**
683
+ * @typedef {object} ApiInvocationIssue
684
+ * @property {string} apiMethodName
685
+ * @property {unknown[]} methodArgs
686
+ */
687
+ /**
688
+ * @typedef {object} OfferFilterIssue
689
+ * @property {string[]} strings
690
+ */
691
+ /**
692
+ * @typedef {object} ParamChangePositions
693
+ * @property {ChangeParamsPosition} positive
694
+ * @property {NoChangeParamsPosition} negative
695
+ */
696
+ /**
697
+ * @typedef {object} ParamChangeIssueDetails
698
+ * details for a question that can change a contract parameter
699
+ * @property {ChoiceMethod} method
700
+ * @property {ParamChangeIssue<unknown>} issue
701
+ * @property {ParamChangePositions} positions
702
+ * @property {ElectionType} electionType
703
+ * @property {number} maxChoices
704
+ * @property {ClosingRule} closingRule
705
+ * @property {QuorumRule} quorumRule
706
+ * @property {NoChangeParamsPosition} tieOutcome
707
+ * @property {Instance} counterInstance - instance of the VoteCounter
708
+ * @property {Handle<'Question'>} questionHandle
709
+ */
710
+ /**
711
+ * @typedef {Record<Keyword, ParamValueTyped>} ParamStateRecord a Record containing
712
+ * keyword pairs with descriptions of parameters under governance.
713
+ */
714
+ /** @typedef {{current: ParamStateRecord}} GovernanceSubscriptionState */
715
+ /**
716
+ * @typedef {object} ParamManagerBase The base paramManager with typed getters
717
+ * @property {() => ERef<ParamStateRecord>} getParams
718
+ * @property {(name: string) => Amount} getAmount
719
+ * @property {(name: string) => Brand} getBrand
720
+ * @property {(name: string) => Instance} getInstance
721
+ * @property {(name: string) => Installation} getInstallation
722
+ * @property {(name: string) => Amount<'set'>} getInvitationAmount
723
+ * @property {(name: string) => bigint} getNat
724
+ * @property {(name: string) => Ratio} getRatio
725
+ * @property {(name: string) => string} getString
726
+ * @property {(name: string) => import('@agoric/time').TimestampRecord} getTimestamp
727
+ * @property {(name: string) => import('@agoric/time').RelativeTimeRecord} getRelativeTime
728
+ * @property {(name: string) => any} getUnknown
729
+ * @property {(name: string, proposedValue: ParamValue) => ParamValue} getVisibleValue - for
730
+ * most types, the visible value is the same as proposedValue. For Invitations
731
+ * the visible value is the amount of the invitation.
732
+ * @property {(name: string) => Promise<Invitation>} getInternalParamValue
733
+ * @property {() => StoredSubscription<GovernanceSubscriptionState>} getSubscription
734
+ */
735
+ /**
736
+ * @callback UpdateParams
737
+ * @param {Record<string,ParamValue>} paramChanges
738
+ * @returns {Promise<void>}
739
+ */
740
+ /**
741
+ * These are typed `any` because the builder pattern of paramManager makes it very
742
+ * complicated for the type system to know the set of param-specific functions
743
+ * returned by `.build()`. Instead we let paramManager create the desired methods
744
+ * and use typedParamManager to create a version that includes the static types.
745
+ *
746
+ * @typedef {Record<string, any>} ParamManagerGettersAndUpdaters
747
+ * @typedef {ParamManagerBase & ParamManagerGettersAndUpdaters & {updateParams: UpdateParams}} AnyParamManager
748
+ */
749
+ /**
750
+ * @typedef {Record<string, string[]>} ParameterNameList
751
+ */
752
+ /**
753
+ * @callback AssertParamManagerType
754
+ * @param {ParamType} type
755
+ * @param {ParamValue} value
756
+ * @param {string} name
757
+ */
758
+ /**
759
+ * @callback BuildParamManager - ParamManager is a facility that governed
760
+ * contracts can use to manage their visible state in a way that allows the
761
+ * ContractGovernor to update values using governance. When paramManager is
762
+ * instantiated inside the contract, the contract has synchronous access to
763
+ * the values, and clients of the contract can verify that a ContractGovernor
764
+ * can change the values in a legible way.
765
+ * @param {Iterable<ParamValueTyped>} paramDescriptions
766
+ * @returns {AnyParamManager}
767
+ */
768
+ /**
769
+ * @typedef {object} ChangeParamsPosition
770
+ * @property {Record<string,ParamValue>} changes one or more changes to parameters
771
+ */
772
+ /**
773
+ * @typedef {object} OfferFilterPosition
774
+ * @property {string[]} strings
775
+ */
776
+ /**
777
+ * @typedef {object} NoChangeOfferFilterPosition
778
+ * @property {string[]} dontUpdate
779
+ */
780
+ /**
781
+ * @typedef {object} InvokeApiPosition
782
+ * @property {string} apiMethodName
783
+ * @property {unknown[]} methodArgs
784
+ */
785
+ /**
786
+ * @typedef {object} DontInvokeApiPosition
787
+ * @property {string} dontInvoke
788
+ */
789
+ /**
790
+ * @typedef {object} NoChangeParamsPosition
791
+ * @property {string[]} noChange Parameters in the proposal that this position
792
+ * is opposed to
793
+ */
794
+ /**
795
+ * @typedef {object} Governor
796
+ * @property {CreateQuestion} createQuestion
797
+ */
798
+ /** @typedef {{ [methodName: string]: (...args: any) => unknown }} GovernedApis */
799
+ /**
800
+ * @typedef {object} GovernorPublic
801
+ * @property {() => Promise<Instance>} getElectorate
802
+ * @property {() => Instance} getGovernedContract
803
+ * @property {(voteCounter: Instance) => Promise<void>} validateVoteCounter
804
+ * @property {(regP: ERef<Instance>) => Promise<void>} validateElectorate
805
+ * @property {(closingRule: ClosingRule) => void} validateTimer
806
+ */
807
+ /**
808
+ * @typedef {object} ParamKey identifier for a paramManager within a contract
809
+ * @property {unknown} key
810
+ */
811
+ /**
812
+ * Description of a set of coordinated changes for a ParamManager
813
+ *
814
+ * @template P path for a paramManagerRetriever
815
+ * @typedef {object} ParamChangesSpec<P>
816
+ * @property {P} paramPath
817
+ * @property {Record<string, ParamValue>} changes one or more changes to parameters
818
+ */
819
+ /**
820
+ * @typedef {object} ContractGovernanceVoteResult
821
+ * @property {Instance} instance - instance of the VoteCounter
822
+ * @property {ERef<QuestionDetails>} details
823
+ * @property {Promise<ParamValue>} outcomeOfUpdate - A promise for the result
824
+ * of updating the parameter value. Primarily useful for its behavior on
825
+ * rejection.
826
+ */
827
+ /**
828
+ * @template {GovernableStartFn} SF Start function of governed contract
829
+ * @typedef {object} GovernorCreatorFacet
830
+ * @property {VoteOnParamChanges} voteOnParamChanges
831
+ * @property {VoteOnApiInvocation} voteOnApiInvocation
832
+ * @property {VoteOnOfferFilter} voteOnOfferFilter
833
+ * @property {() => LimitedCF<SF>} getCreatorFacet facet of the governed contract,
834
+ * with creator-like powers but without the tightly held ability to change
835
+ * param values.
836
+ * @property {(poserInvitation: Invitation) => Promise<void>} replaceElectorate
837
+ * @property {() => AdminFacet} getAdminFacet
838
+ * @property {() => GovernedPublicFacet<Awaited<ReturnType<SF>>['publicFacet']>} getPublicFacet - public facet of the governed contract
839
+ * @property {() => Instance} getInstance - instance of the governed
840
+ * contract
841
+ */
842
+ /**
843
+ * @typedef GovernedPublicFacetMethods
844
+ * @property {(key?: any) => StoredSubscription<GovernanceSubscriptionState>} getSubscription
845
+ * @property {(key?: any) => ERef<ParamStateRecord>} getGovernedParams - get descriptions of
846
+ * all the governed parameters
847
+ * @property {(name: string) => Amount} getInvitationAmount
848
+ */
849
+ /**
850
+ * @template {{}} PF Public facet
851
+ * @typedef {PF & GovernedPublicFacetMethods} GovernedPublicFacet
852
+ */
853
+ /**
854
+ * @template {GovernableStartFn} SF
855
+ * @typedef {ReturnType<Awaited<ReturnType<SF>>['creatorFacet']['getLimitedCreatorFacet']>} LimitedCF
856
+ */
857
+ /**
858
+ * @template {{}} CF creator facet
859
+ * @typedef GovernedCreatorFacet
860
+ * What a governed contract must return as its creatorFacet in order to be governed
861
+ * @property {() => ParamManagerRetriever} getParamMgrRetriever - allows accessing
862
+ * and updating governed parameters. Should only be directly accessible to the
863
+ * contractGovernor
864
+ * @property {() => ERef<CF>} getLimitedCreatorFacet - the creator
865
+ * facet of the governed contract. Doesn't provide access to any governance
866
+ * functionality
867
+ * @property {(name: string) => Promise<Invitation>} getInvitation
868
+ * @property {() => ERef<GovernedApis>} getGovernedApis
869
+ * @property {() => (string | symbol)[]} getGovernedApiNames
870
+ * @property {(strings: string[]) => void} setOfferFilter
871
+ */
872
+ /**
873
+ * @typedef {{key: string}} StandardParamPath
874
+ */
875
+ /**
876
+ * @typedef {object} ParamManagerRetriever
877
+ * @property {(paramKey?: ParamKey) => AnyParamManager} get
878
+ */
879
+ /**
880
+ * @template [P=StandardParamPath]
881
+ *
882
+ * @callback VoteOnParamChanges
883
+ * @param {Installation} voteCounterInstallation
884
+ * @param {import('@agoric/time').Timestamp} deadline
885
+ * @param {ParamChangesSpec<P>} paramSpec
886
+ * @returns {Promise<ContractGovernanceVoteResult>}
887
+ */
888
+ /**
889
+ * @callback VoteOnApiInvocation
890
+ * @param {string} apiMethodName
891
+ * @param {unknown[]} methodArgs
892
+ * @param {Installation} voteCounterInstallation
893
+ * @param {import('@agoric/time').Timestamp} deadline
894
+ * @returns {Promise<ContractGovernanceVoteResult>}
895
+ */
896
+ /**
897
+ * @callback VoteOnOfferFilter
898
+ * @param {Installation} voteCounterInstallation
899
+ * @param {import('@agoric/time').Timestamp} deadline
900
+ * @param {string[]} strings
901
+ * @returns {Promise<ContractGovernanceVoteResult>}
902
+ */
903
+ /**
904
+ * @typedef {object} ParamGovernor
905
+ * @property {VoteOnParamChanges} voteOnParamChanges
906
+ * @property {CreatedQuestion} createdQuestion
907
+ */
908
+ /**
909
+ * @typedef {object} ApiGovernor
910
+ * @property {VoteOnApiInvocation} voteOnApiInvocation
911
+ * @property {CreatedQuestion} createdQuestion
912
+ */
913
+ /**
914
+ * @typedef {object} FilterGovernor
915
+ * @property {VoteOnOfferFilter} voteOnFilter
916
+ * @property {CreatedQuestion} createdQuestion
917
+ */
918
+ /**
919
+ * @callback CreatedQuestion
920
+ * Was this question created by this ContractGovernor?
921
+ * @param {Instance} questionInstance
922
+ * @returns {boolean}
923
+ */
924
+ /**
925
+ * @callback PositionIncluded
926
+ * @param {Position[]} positions
927
+ * @param {Position} position
928
+ * @returns {boolean}
929
+ */
930
+ /**
931
+ * @typedef {object} GovernedContractTerms
932
+ * @property {import('@agoric/time').TimerService} timer
933
+ * @property {IssuerKeywordRecord} issuerKeywordRecord
934
+ * @property {object} privateArgs
935
+ */
936
+ /**
937
+ * @callback AssertContractGovernance
938
+ *
939
+ * @param {ERef<ZoeService>} zoe
940
+ * @param {import('@agoric/zoe/src/zoeService/utils.js').Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>} allegedGoverned
941
+ * @param {Instance} allegedGovernor
942
+ * @param {Installation<import('@agoric/governance/src/contractGovernor.js').start>} contractGovernorInstallation
943
+ * @returns {Promise<GovernancePair>}
944
+ */
945
+ /**
946
+ * @callback AssertContractElectorate - assert that the contract uses the
947
+ * electorate
948
+ *
949
+ * @param {ERef<ZoeService>} zoe
950
+ * @param {Instance} allegedGovernor
951
+ * @param {Instance} allegedElectorate
952
+ */
953
+ /**
954
+ * @typedef {ContractStartFunction
955
+ * & ((zcf?: any, pa?: any, baggage?: any) => ERef<{creatorFacet: GovernedCreatorFacet<{}>, publicFacet: GovernedPublicFacet<{}>}>)} GovernableStartFn
956
+ */
957
+ /**
958
+ * @typedef {import('./contractGovernor.js')['start']} GovernorSF
959
+ */
960
+ /**
961
+ * @see {StartedInstanceKit}
962
+ * @template {ERef<Installation<GovernableStartFn>>} I
963
+ * @typedef GovernorStartedInstallationKit
964
+ * Same result as StartedInstanceKit but:
965
+ * - typed for contractGovernor installation being started by Zoe. (It in turn starts the governed contract.)
966
+ * - parameterized by Installation instead of StartFunction
967
+ * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<GovernorSF>} instance
968
+ * @property {AdminFacet} adminFacet
969
+ * @property {GovernorCreatorFacet<InstallationStart<Awaited<I>>>} creatorFacet
970
+ * @property {GovernorPublic} publicFacet
971
+ */
972
+ /**
973
+ * @see {StartedInstanceKit}
974
+ * @template {GovernableStartFn} SF
975
+ * @typedef GovernanceFacetKit
976
+ * Akin to StartedInstanceKit but designed for the results of starting governed contracts. Used in bootstrap space.
977
+ * @property {AdminFacet} adminFacet of the governed contract
978
+ * @property {LimitedCF<SF>} creatorFacet creator-like facet within the governed contract (without the powers the governor needs)
979
+ * @property {GovernorCreatorFacet<SF>} governorCreatorFacet of the governing contract
980
+ * @property {AdminFacet} governorAdminFacet of the governing contract
981
+ * @property {Awaited<ReturnType<SF>>['publicFacet']} publicFacet
982
+ * @property {Instance} instance
983
+ * @property {Instance} governor
984
+ */
985
+ {
986
+ /**
987
+ * @typedef {object} QuorumCounter
988
+ * @property {(stats: VoteStatistics) => boolean} check
989
+ */
990
+ /**
991
+ * @callback BuildQuestion
992
+ * @param {QuestionSpec} questionSpec
993
+ * @param {Instance} instance - voteCounter instance
994
+ * @returns {Question}
995
+ */
996
+ /**
997
+ * @typedef {object} VoteCounterCreatorFacet - a facet that the Electorate should
998
+ * hold tightly. submitVote() is the core capability that allows the holder to
999
+ * specify the identity and choice of a voter. The voteCounter is making that
1000
+ * available to the Electorate, which should wrap and attenuate it so each
1001
+ * voter gets only the ability to cast their own vote at a weight specified by
1002
+ * the electorate.
1003
+ * @property {SubmitVote} submitVote
1004
+ */
1005
+ /**
1006
+ * @typedef {object} VoteCounterPublicFacet
1007
+ * @property {() => boolean} isOpen
1008
+ * @property {() => Question} getQuestion
1009
+ * @property {() => Promise<Position>} getOutcome
1010
+ * @property {() => QuestionDetails} getDetails
1011
+ * @property {() => Promise<VoteStatistics>} getStats
1012
+ */
1013
+ /**
1014
+ * @typedef {object} MultiVoteCounterPublicFacet
1015
+ * @property {() => boolean} isOpen
1016
+ * @property {() => Question} getQuestion
1017
+ * @property {() => Promise<Position[]>} getOutcome
1018
+ * @property {() => QuestionDetails} getDetails
1019
+ * @property {() => Promise<VoteStatistics>} getStats
1020
+ */
1021
+ /**
1022
+ * @typedef {object} VoteCounterCloseFacet
1023
+ * TEST ONLY: Should not be allowed to escape from contracts
1024
+ * @property {() => void} closeVoting
1025
+ */
1026
+ /**
1027
+ * @typedef {object} VoteCounterFacets
1028
+ * @property {VoteCounterPublicFacet} publicFacet
1029
+ * @property {VoteCounterCreatorFacet} creatorFacet
1030
+ * @property {VoteCounterCloseFacet} closeFacet
1031
+ */
1032
+ /**
1033
+ * @typedef {object} MultiVoteCounterFacets
1034
+ * @property {MultiVoteCounterPublicFacet} publicFacet
1035
+ * @property {VoteCounterCreatorFacet} creatorFacet
1036
+ * @property {VoteCounterCloseFacet} closeFacet
1037
+ */
1038
+ /**
1039
+ * @callback BuildVoteCounter
1040
+ * @param {QuestionSpec} questionSpec
1041
+ * @param {bigint} threshold - questionSpec includes quorumRule; the electorate
1042
+ * converts that to a number that the counter can enforce.
1043
+ * @param {Instance} instance
1044
+ * @param {ERef<Publisher<OutcomeRecord>>} publisher
1045
+ * @returns {VoteCounterFacets}
1046
+ */
1047
+ /**
1048
+ * @callback BuildMultiVoteCounter
1049
+ * @param {QuestionSpec} questionSpec
1050
+ * @param {bigint} threshold - questionSpec includes quorumRule; the electorate
1051
+ * converts that to a number that the counter can enforce.
1052
+ * @param {Instance} instance
1053
+ * @param {ERef<Publisher<MultiOutcomeRecord>>} publisher
1054
+ * @returns {MultiVoteCounterFacets}
1055
+ */
1056
+ /**
1057
+ * @typedef {object} CompletedBallet
1058
+ * @property {Position} chosen
1059
+ * @property {bigint} shares
1060
+ */
1061
+ /**
1062
+ * @callback SubmitVote
1063
+ * @param {Handle<'Voter'>} voterHandle
1064
+ * @param {Position[]} chosenPositions
1065
+ * @param {bigint} [weight]
1066
+ * @returns {CompletedBallet}
1067
+ */
1068
+ /**
1069
+ * @callback GetOpenQuestions
1070
+ * @returns {Promise<Handle<'Question'>[]>}
1071
+ */
1072
+ /**
1073
+ * @callback GetQuestion
1074
+ * @param {Handle<'Question'>} h
1075
+ * @returns {Promise<Question>}
1076
+ */
1077
+ /**
1078
+ * @typedef {object} ElectoratePublic
1079
+ * @property {() => Subscriber<QuestionDetails>} getQuestionSubscriber
1080
+ * @property {GetOpenQuestions} getOpenQuestions,
1081
+ * @property {() => Instance} getInstance
1082
+ * @property {GetQuestion} getQuestion
1083
+ */
1084
+ /**
1085
+ * @typedef { ElectoratePublic & {makeVoterInvitation: () => ERef<Invitation>} } ClaimsElectoratePublic
1086
+ * @typedef { ElectoratePublic & {getName: () => string} } CommitteeElectoratePublic
1087
+ */
1088
+ /**
1089
+ * @typedef {object} PoserFacet
1090
+ * @property {AddQuestion} addQuestion
1091
+ */
1092
+ /**
1093
+ * @typedef {object} ElectorateCreatorFacet
1094
+ * @property {AddQuestion} addQuestion can be used directly when the creator doesn't need any
1095
+ * reassurance. When someone needs to connect addQuestion to the Electorate
1096
+ * instance, getPoserInvitation() lets them get addQuestion with assurance.
1097
+ * @property {() => Promise<Invitation>} getPoserInvitation
1098
+ * @property {() => Subscriber<QuestionDetails>} getQuestionSubscriber
1099
+ * @property {() => ElectoratePublic} getPublicFacet
1100
+ */
1101
+ /**
1102
+ * @typedef {object} GetVoterInvitations
1103
+ * @property {() => Invitation[]} getVoterInvitations
1104
+ */
1105
+ /**
1106
+ * @typedef {object} VoterFacet - a facet that the Electorate should hold
1107
+ * tightly. It allows specification of the vote's weight, so the Electorate
1108
+ * should distribute an attenuated wrapper that doesn't make that available!
1109
+ * @property {SubmitVote} submitVote
1110
+ */
1111
+ /**
1112
+ * @typedef {object} ClosingRule
1113
+ * @property {ERef<import('@agoric/time').TimerService>} timer
1114
+ * @property {import('@agoric/time').Timestamp} deadline
1115
+ */
1116
+ /**
1117
+ * @callback CloseVoting
1118
+ * @param {ClosingRule} closingRule
1119
+ * @param {() => void} closeVoting
1120
+ */
1121
+ /**
1122
+ * @typedef {object} AddQuestionReturn
1123
+ * @property {VoteCounterPublicFacet} publicFacet
1124
+ * @property {VoteCounterCreatorFacet} creatorFacet
1125
+ * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<typeof import('./binaryVoteCounter.js').start>} instance
1126
+ * @property {import('@agoric/time').Timestamp} deadline
1127
+ * @property {Handle<'Question'>} questionHandle
1128
+ */
1129
+ /**
1130
+ * @callback AddQuestion
1131
+ * @param {ERef<Installation>} voteCounter
1132
+ * @param {QuestionSpec} questionSpec
1133
+ * @returns {Promise<AddQuestionReturn>}
1134
+ */
1135
+ /**
1136
+ * @callback CreateQuestion
1137
+ *
1138
+ * @param {string} name - The name of the parameter to change
1139
+ * @param {ParamValue} proposedValue - the proposed value for the named
1140
+ * parameter
1141
+ * @param {Installation} voteCounterInstallation - the voteCounter to
1142
+ * instantiate to count votes. Expected to be a binaryVoteCounter. Other
1143
+ * voteCounters might be added here, or might require separate governors.
1144
+ * under management so users can trace it back and see that it would use
1145
+ * this electionManager to manage parameters
1146
+ * @param {Instance} contractInstance - include the instance of the contract
1147
+ * @param {ClosingRule} closingRule - deadline and timer for closing voting
1148
+ * @returns {Promise<QuestionDetails>}
1149
+ */
1150
+ /**
1151
+ * @template [P=StandardParamPath] path for a paramManagerRetriever
1152
+ * @typedef {object} ParamChangeIssue
1153
+ * @property {ParamChangesSpec<P>} spec
1154
+ * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>} contract
1155
+ */
1156
+ /**
1157
+ * @typedef {object} ApiInvocationIssue
1158
+ * @property {string} apiMethodName
1159
+ * @property {unknown[]} methodArgs
1160
+ */
1161
+ /**
1162
+ * @typedef {object} OfferFilterIssue
1163
+ * @property {string[]} strings
1164
+ */
1165
+ /**
1166
+ * @typedef {object} ParamChangePositions
1167
+ * @property {ChangeParamsPosition} positive
1168
+ * @property {NoChangeParamsPosition} negative
1169
+ */
1170
+ /**
1171
+ * @typedef {object} ParamChangeIssueDetails
1172
+ * details for a question that can change a contract parameter
1173
+ * @property {ChoiceMethod} method
1174
+ * @property {ParamChangeIssue<unknown>} issue
1175
+ * @property {ParamChangePositions} positions
1176
+ * @property {ElectionType} electionType
1177
+ * @property {number} maxChoices
1178
+ * @property {ClosingRule} closingRule
1179
+ * @property {QuorumRule} quorumRule
1180
+ * @property {NoChangeParamsPosition} tieOutcome
1181
+ * @property {Instance} counterInstance - instance of the VoteCounter
1182
+ * @property {Handle<'Question'>} questionHandle
1183
+ */
1184
+ /**
1185
+ * @typedef {Record<Keyword, ParamValueTyped>} ParamStateRecord a Record containing
1186
+ * keyword pairs with descriptions of parameters under governance.
1187
+ */
1188
+ /** @typedef {{current: ParamStateRecord}} GovernanceSubscriptionState */
1189
+ /**
1190
+ * @typedef {object} ParamManagerBase The base paramManager with typed getters
1191
+ * @property {() => ERef<ParamStateRecord>} getParams
1192
+ * @property {(name: string) => Amount} getAmount
1193
+ * @property {(name: string) => Brand} getBrand
1194
+ * @property {(name: string) => Instance} getInstance
1195
+ * @property {(name: string) => Installation} getInstallation
1196
+ * @property {(name: string) => Amount<'set'>} getInvitationAmount
1197
+ * @property {(name: string) => bigint} getNat
1198
+ * @property {(name: string) => Ratio} getRatio
1199
+ * @property {(name: string) => string} getString
1200
+ * @property {(name: string) => import('@agoric/time').TimestampRecord} getTimestamp
1201
+ * @property {(name: string) => import('@agoric/time').RelativeTimeRecord} getRelativeTime
1202
+ * @property {(name: string) => any} getUnknown
1203
+ * @property {(name: string, proposedValue: ParamValue) => ParamValue} getVisibleValue - for
1204
+ * most types, the visible value is the same as proposedValue. For Invitations
1205
+ * the visible value is the amount of the invitation.
1206
+ * @property {(name: string) => Promise<Invitation>} getInternalParamValue
1207
+ * @property {() => StoredSubscription<GovernanceSubscriptionState>} getSubscription
1208
+ */
1209
+ /**
1210
+ * @callback UpdateParams
1211
+ * @param {Record<string,ParamValue>} paramChanges
1212
+ * @returns {Promise<void>}
1213
+ */
1214
+ /**
1215
+ * These are typed `any` because the builder pattern of paramManager makes it very
1216
+ * complicated for the type system to know the set of param-specific functions
1217
+ * returned by `.build()`. Instead we let paramManager create the desired methods
1218
+ * and use typedParamManager to create a version that includes the static types.
1219
+ *
1220
+ * @typedef {Record<string, any>} ParamManagerGettersAndUpdaters
1221
+ * @typedef {ParamManagerBase & ParamManagerGettersAndUpdaters & {updateParams: UpdateParams}} AnyParamManager
1222
+ */
1223
+ /**
1224
+ * @typedef {Record<string, string[]>} ParameterNameList
1225
+ */
1226
+ /**
1227
+ * @callback AssertParamManagerType
1228
+ * @param {ParamType} type
1229
+ * @param {ParamValue} value
1230
+ * @param {string} name
1231
+ */
1232
+ /**
1233
+ * @callback BuildParamManager - ParamManager is a facility that governed
1234
+ * contracts can use to manage their visible state in a way that allows the
1235
+ * ContractGovernor to update values using governance. When paramManager is
1236
+ * instantiated inside the contract, the contract has synchronous access to
1237
+ * the values, and clients of the contract can verify that a ContractGovernor
1238
+ * can change the values in a legible way.
1239
+ * @param {Iterable<ParamValueTyped>} paramDescriptions
1240
+ * @returns {AnyParamManager}
1241
+ */
1242
+ /**
1243
+ * @typedef {object} ChangeParamsPosition
1244
+ * @property {Record<string,ParamValue>} changes one or more changes to parameters
1245
+ */
1246
+ /**
1247
+ * @typedef {object} OfferFilterPosition
1248
+ * @property {string[]} strings
1249
+ */
1250
+ /**
1251
+ * @typedef {object} NoChangeOfferFilterPosition
1252
+ * @property {string[]} dontUpdate
1253
+ */
1254
+ /**
1255
+ * @typedef {object} InvokeApiPosition
1256
+ * @property {string} apiMethodName
1257
+ * @property {unknown[]} methodArgs
1258
+ */
1259
+ /**
1260
+ * @typedef {object} DontInvokeApiPosition
1261
+ * @property {string} dontInvoke
1262
+ */
1263
+ /**
1264
+ * @typedef {object} NoChangeParamsPosition
1265
+ * @property {string[]} noChange Parameters in the proposal that this position
1266
+ * is opposed to
1267
+ */
1268
+ /**
1269
+ * @typedef {object} Governor
1270
+ * @property {CreateQuestion} createQuestion
1271
+ */
1272
+ /** @typedef {{ [methodName: string]: (...args: any) => unknown }} GovernedApis */
1273
+ /**
1274
+ * @typedef {object} GovernorPublic
1275
+ * @property {() => Promise<Instance>} getElectorate
1276
+ * @property {() => Instance} getGovernedContract
1277
+ * @property {(voteCounter: Instance) => Promise<void>} validateVoteCounter
1278
+ * @property {(regP: ERef<Instance>) => Promise<void>} validateElectorate
1279
+ * @property {(closingRule: ClosingRule) => void} validateTimer
1280
+ */
1281
+ /**
1282
+ * @typedef {object} ParamKey identifier for a paramManager within a contract
1283
+ * @property {unknown} key
1284
+ */
1285
+ /**
1286
+ * Description of a set of coordinated changes for a ParamManager
1287
+ *
1288
+ * @template P path for a paramManagerRetriever
1289
+ * @typedef {object} ParamChangesSpec<P>
1290
+ * @property {P} paramPath
1291
+ * @property {Record<string, ParamValue>} changes one or more changes to parameters
1292
+ */
1293
+ /**
1294
+ * @typedef {object} ContractGovernanceVoteResult
1295
+ * @property {Instance} instance - instance of the VoteCounter
1296
+ * @property {ERef<QuestionDetails>} details
1297
+ * @property {Promise<ParamValue>} outcomeOfUpdate - A promise for the result
1298
+ * of updating the parameter value. Primarily useful for its behavior on
1299
+ * rejection.
1300
+ */
1301
+ /**
1302
+ * @template {GovernableStartFn} SF Start function of governed contract
1303
+ * @typedef {object} GovernorCreatorFacet
1304
+ * @property {VoteOnParamChanges} voteOnParamChanges
1305
+ * @property {VoteOnApiInvocation} voteOnApiInvocation
1306
+ * @property {VoteOnOfferFilter} voteOnOfferFilter
1307
+ * @property {() => LimitedCF<SF>} getCreatorFacet facet of the governed contract,
1308
+ * with creator-like powers but without the tightly held ability to change
1309
+ * param values.
1310
+ * @property {(poserInvitation: Invitation) => Promise<void>} replaceElectorate
1311
+ * @property {() => AdminFacet} getAdminFacet
1312
+ * @property {() => GovernedPublicFacet<Awaited<ReturnType<SF>>['publicFacet']>} getPublicFacet - public facet of the governed contract
1313
+ * @property {() => Instance} getInstance - instance of the governed
1314
+ * contract
1315
+ */
1316
+ /**
1317
+ * @typedef GovernedPublicFacetMethods
1318
+ * @property {(key?: any) => StoredSubscription<GovernanceSubscriptionState>} getSubscription
1319
+ * @property {(key?: any) => ERef<ParamStateRecord>} getGovernedParams - get descriptions of
1320
+ * all the governed parameters
1321
+ * @property {(name: string) => Amount} getInvitationAmount
1322
+ */
1323
+ /**
1324
+ * @template {{}} PF Public facet
1325
+ * @typedef {PF & GovernedPublicFacetMethods} GovernedPublicFacet
1326
+ */
1327
+ /**
1328
+ * @template {GovernableStartFn} SF
1329
+ * @typedef {ReturnType<Awaited<ReturnType<SF>>['creatorFacet']['getLimitedCreatorFacet']>} LimitedCF
1330
+ */
1331
+ /**
1332
+ * @template {{}} CF creator facet
1333
+ * @typedef GovernedCreatorFacet
1334
+ * What a governed contract must return as its creatorFacet in order to be governed
1335
+ * @property {() => ParamManagerRetriever} getParamMgrRetriever - allows accessing
1336
+ * and updating governed parameters. Should only be directly accessible to the
1337
+ * contractGovernor
1338
+ * @property {() => ERef<CF>} getLimitedCreatorFacet - the creator
1339
+ * facet of the governed contract. Doesn't provide access to any governance
1340
+ * functionality
1341
+ * @property {(name: string) => Promise<Invitation>} getInvitation
1342
+ * @property {() => ERef<GovernedApis>} getGovernedApis
1343
+ * @property {() => (string | symbol)[]} getGovernedApiNames
1344
+ * @property {(strings: string[]) => void} setOfferFilter
1345
+ */
1346
+ /**
1347
+ * @typedef {{key: string}} StandardParamPath
1348
+ */
1349
+ /**
1350
+ * @typedef {object} ParamManagerRetriever
1351
+ * @property {(paramKey?: ParamKey) => AnyParamManager} get
1352
+ */
1353
+ /**
1354
+ * @template [P=StandardParamPath]
1355
+ *
1356
+ * @callback VoteOnParamChanges
1357
+ * @param {Installation} voteCounterInstallation
1358
+ * @param {import('@agoric/time').Timestamp} deadline
1359
+ * @param {ParamChangesSpec<P>} paramSpec
1360
+ * @returns {Promise<ContractGovernanceVoteResult>}
1361
+ */
1362
+ /**
1363
+ * @callback VoteOnApiInvocation
1364
+ * @param {string} apiMethodName
1365
+ * @param {unknown[]} methodArgs
1366
+ * @param {Installation} voteCounterInstallation
1367
+ * @param {import('@agoric/time').Timestamp} deadline
1368
+ * @returns {Promise<ContractGovernanceVoteResult>}
1369
+ */
1370
+ /**
1371
+ * @callback VoteOnOfferFilter
1372
+ * @param {Installation} voteCounterInstallation
1373
+ * @param {import('@agoric/time').Timestamp} deadline
1374
+ * @param {string[]} strings
1375
+ * @returns {Promise<ContractGovernanceVoteResult>}
1376
+ */
1377
+ /**
1378
+ * @typedef {object} ParamGovernor
1379
+ * @property {VoteOnParamChanges} voteOnParamChanges
1380
+ * @property {CreatedQuestion} createdQuestion
1381
+ */
1382
+ /**
1383
+ * @typedef {object} ApiGovernor
1384
+ * @property {VoteOnApiInvocation} voteOnApiInvocation
1385
+ * @property {CreatedQuestion} createdQuestion
1386
+ */
1387
+ /**
1388
+ * @typedef {object} FilterGovernor
1389
+ * @property {VoteOnOfferFilter} voteOnFilter
1390
+ * @property {CreatedQuestion} createdQuestion
1391
+ */
1392
+ /**
1393
+ * @callback CreatedQuestion
1394
+ * Was this question created by this ContractGovernor?
1395
+ * @param {Instance} questionInstance
1396
+ * @returns {boolean}
1397
+ */
1398
+ /**
1399
+ * @callback PositionIncluded
1400
+ * @param {Position[]} positions
1401
+ * @param {Position} position
1402
+ * @returns {boolean}
1403
+ */
1404
+ /**
1405
+ * @typedef {object} GovernedContractTerms
1406
+ * @property {import('@agoric/time').TimerService} timer
1407
+ * @property {IssuerKeywordRecord} issuerKeywordRecord
1408
+ * @property {object} privateArgs
1409
+ */
1410
+ /**
1411
+ * @callback AssertContractGovernance
1412
+ *
1413
+ * @param {ERef<ZoeService>} zoe
1414
+ * @param {import('@agoric/zoe/src/zoeService/utils.js').Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>} allegedGoverned
1415
+ * @param {Instance} allegedGovernor
1416
+ * @param {Installation<import('@agoric/governance/src/contractGovernor.js').start>} contractGovernorInstallation
1417
+ * @returns {Promise<GovernancePair>}
1418
+ */
1419
+ /**
1420
+ * @callback AssertContractElectorate - assert that the contract uses the
1421
+ * electorate
1422
+ *
1423
+ * @param {ERef<ZoeService>} zoe
1424
+ * @param {Instance} allegedGovernor
1425
+ * @param {Instance} allegedElectorate
1426
+ */
1427
+ /**
1428
+ * @typedef {ContractStartFunction
1429
+ * & ((zcf?: any, pa?: any, baggage?: any) => ERef<{creatorFacet: GovernedCreatorFacet<{}>, publicFacet: GovernedPublicFacet<{}>}>)} GovernableStartFn
1430
+ */
1431
+ /**
1432
+ * @typedef {import('./contractGovernor.js')['start']} GovernorSF
1433
+ */
1434
+ /**
1435
+ * @see {StartedInstanceKit}
1436
+ * @template {ERef<Installation<GovernableStartFn>>} I
1437
+ * @typedef GovernorStartedInstallationKit
1438
+ * Same result as StartedInstanceKit but:
1439
+ * - typed for contractGovernor installation being started by Zoe. (It in turn starts the governed contract.)
1440
+ * - parameterized by Installation instead of StartFunction
1441
+ * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<GovernorSF>} instance
1442
+ * @property {AdminFacet} adminFacet
1443
+ * @property {GovernorCreatorFacet<InstallationStart<Awaited<I>>>} creatorFacet
1444
+ * @property {GovernorPublic} publicFacet
1445
+ */
1446
+ /**
1447
+ * @see {StartedInstanceKit}
1448
+ * @template {GovernableStartFn} SF
1449
+ * @typedef GovernanceFacetKit
1450
+ * Akin to StartedInstanceKit but designed for the results of starting governed contracts. Used in bootstrap space.
1451
+ * @property {AdminFacet} adminFacet of the governed contract
1452
+ * @property {LimitedCF<SF>} creatorFacet creator-like facet within the governed contract (without the powers the governor needs)
1453
+ * @property {GovernorCreatorFacet<SF>} governorCreatorFacet of the governing contract
1454
+ * @property {AdminFacet} governorAdminFacet of the governing contract
1455
+ * @property {Awaited<ReturnType<SF>>['publicFacet']} publicFacet
1456
+ * @property {Instance} instance
1457
+ * @property {Instance} governor
1458
+ */
506
1459
  governed: Record<string, unknown>;
507
1460
  }, baggage: import("@agoric/vat-data").Baggage) => Promise<{
508
1461
  creatorFacet: GovernorCreatorFacet<SF>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;;;;;;;;2BAOc,UAAU,GAAG,OAAO,GAAG,WAAW;;;;;;;2BAWlC,cAAc,GAAG,UAAU,GAAG,QAAQ,GAAG,gBAAgB,GACtE,cAAkB;yBAUL,UAAU,GAAG,KAAK,GAAG,WAAW;;UAKhC,MAAM;;yBAIN,MAAM,GAAG,KAAK,GAAG,YAAY,GAAG,QAAQ,GAAG,MAAM,GAC9D,KAAS,GAAG,MAAM,GAAG,OAAO,cAAc,EAAE,eAAe,GAC3D,OAAW,cAAc,EAAE,kBAAkB,GAAG,OAAO;8BAkBvD,CAAG,sBAAH,CAAG,AAVU,SAAS,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,GAU5C,CAAG,AATA,SAAS,OAAO,GAAG,KAAK,GAS3B,CAAG,AARA,SAAS,cAAc,GAAG,YAAY,GAQzC,CAAG,AAPA,SAAS,UAAU,GAAG,QAAQ,GAOjC,CAAG,AANA,SAAS,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,GAMxC,CAAG,AALA,SAAS,KAAK,GAAG,MAAM,GAK1B,C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CAC/B,WAM4B,OAC5B,kBAAkB,EAAE,OAAO;;;IA8eoD,KACtE,OAAO,CAAC,cAAc,CAAC;;;;;6CAOzB,IAAI,CAAC,UAAU,CAAC,mBAChB,QAAQ,qBACR,QAAQ;gEAKN,GAAG,OAAO,GAAG,YAAY,GAAG,KAAK,IAAI,CAAC;IAAC,YAAY,EAAE,oBAAoB,CAAC,EAAE,CAAC,CAAC;IAAC,WAAW,EAAE,mBAAmB,CAAC,EAAE,CAAC,CAAA;CAAC,CAAC;yBAIrH,uCAAgC,OAAO,CAAC;;;;;;2CAaQ,CAAC;cAFhD,OAAO,qCAAqC,EAAE,QAAQ,CAAC,UAAU,CAAC;gBAClE,UAAU;kBACV,oBAAoB,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;iBACnD,cAAc;;;;;+BAYK,EAAE;;;;gBAJrB,UAAU;;;;kBACV,SAAS,CAGU,EAAE,AAHT,CAAC;;;;0BACb,oBAAoB,CAED,EAAE,AAFE,CAAC;;;;wBACxB,UAAU;iBACV,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;cACtC,QAAQ;cACR,QAAQ;;+BArsBO,gBAAgB;2CAtBJ,qCAAqC"}
package/src/types.js CHANGED
@@ -1,5 +1,3 @@
1
- import '@agoric/zoe/src/zoeService/types-ambient.js';
2
-
3
1
  export {};
4
2
 
5
3
  /** @import {ContractStartFunction} from '@agoric/zoe/src/zoeService/utils.js' */