@agoric/governance 0.10.4-dev-eb7e9eb.0 → 0.10.4-u11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +431 -0
  2. package/package.json +26 -26
  3. package/src/binaryVoteCounter.d.ts.map +1 -1
  4. package/src/binaryVoteCounter.js +0 -1
  5. package/src/committee.d.ts +12 -10
  6. package/src/committee.d.ts.map +1 -1
  7. package/src/committee.js +7 -10
  8. package/src/constants.d.ts +12 -12
  9. package/src/contractGovernance/paramManager.d.ts +1 -1
  10. package/src/contractGovernance/paramManager.d.ts.map +1 -1
  11. package/src/contractGovernance/paramManager.js +2 -3
  12. package/src/contractGovernance/typedParamManager.d.ts +2 -2
  13. package/src/contractGovernance/typedParamManager.d.ts.map +1 -1
  14. package/src/contractGovernor.d.ts +3 -5
  15. package/src/contractGovernor.d.ts.map +1 -1
  16. package/src/contractGovernor.js +4 -10
  17. package/src/contractGovernorKit.d.ts +1 -1
  18. package/src/contractGovernorKit.d.ts.map +1 -1
  19. package/src/contractGovernorKit.js +0 -1
  20. package/src/contractHelper.d.ts +40 -40
  21. package/src/contractHelper.d.ts.map +1 -1
  22. package/src/contractHelper.js +3 -3
  23. package/src/electorateTools.d.ts +5 -1
  24. package/src/electorateTools.d.ts.map +1 -1
  25. package/src/index.js +1 -1
  26. package/src/multiCandidateVoteCounter.d.ts.map +1 -1
  27. package/src/multiCandidateVoteCounter.js +2 -3
  28. package/src/noActionElectorate.d.ts.map +1 -1
  29. package/src/noActionElectorate.js +2 -4
  30. package/src/question.d.ts +11 -11
  31. package/src/typeGuards.d.ts +74 -72
  32. package/src/typeGuards.d.ts.map +1 -1
  33. package/src/types-ambient.d.ts +493 -493
  34. package/src/types-ambient.d.ts.map +1 -1
  35. package/src/types-ambient.js +3 -3
  36. package/src/types.d.ts +8 -4
  37. package/src/types.d.ts.map +1 -1
  38. package/src/types.js +3 -3
  39. package/src/voterKit.d.ts +3 -3
  40. package/src/voterKit.d.ts.map +1 -1
  41. package/tools/puppetContractGovernor.d.ts +1 -1
  42. package/tools/puppetContractGovernor.d.ts.map +1 -1
  43. package/tools/puppetGovernance.d.ts.map +1 -1
  44. package/tools/puppetGovernance.js +2 -0
@@ -33,7 +33,7 @@ type ParamValueTyped<T extends import("./constants.js").ParamType = import("./co
33
33
  * <T>
34
34
  */
35
35
  type GovernanceTerms<T extends import("./contractGovernance/typedParamManager.js").ParamTypesMap> = {
36
- electionManager: import('@agoric/zoe/src/zoeService/utils.js').Instance<typeof import("./contractGovernor.js")['start']>;
36
+ electionManager: import('@agoric/zoe/src/zoeService/utils.js').Instance<typeof import("./contractGovernor.js")['prepare']>;
37
37
  governedParams: import('./contractGovernance/typedParamManager.js').ParamRecordsFromTypes<T & {
38
38
  Electorate: 'invitation';
39
39
  }>;
@@ -493,499 +493,499 @@ type GovernedContractTerms = {
493
493
  };
494
494
  type AssertContractGovernance = (zoe: ERef<ZoeService>, allegedGoverned: import("@agoric/zoe/src/zoeService/utils.js").Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>, allegedGovernor: Instance, contractGovernorInstallation: Installation<(<SF extends GovernableStartFn>(zcf: ZCF<{
495
495
  timer: import("@agoric/time/src/types").TimerService;
496
- /**
497
- * @typedef {object} CompleteOrderedBallot
498
- * @property {Handle<'Question'>} questionHandle
499
- * @property {Position[]} ordered - ordered list of position from most preferred
500
- * to least preferred
501
- */
502
- /**
503
- * @typedef {object} PositionCount
504
- * @property {Position} position
505
- * @property {bigint} total
506
- */
507
- /**
508
- * @typedef {object} VoteStatistics
509
- * @property {bigint} spoiled
510
- * @property {number} votes
511
- * @property {PositionCount[]} results
512
- */
513
- /**
514
- * @typedef {object} QuorumCounter
515
- * @property {(stats: VoteStatistics) => boolean} check
516
- */
517
- /**
518
- * @callback BuildQuestion
519
- * @param {QuestionSpec} questionSpec
520
- * @param {Instance} instance - voteCounter instance
521
- * @returns {Question}
522
- */
523
- /**
524
- * @typedef {object} VoteCounterCreatorFacet - a facet that the Electorate should
525
- * hold tightly. submitVote() is the core capability that allows the holder to
526
- * specify the identity and choice of a voter. The voteCounter is making that
527
- * available to the Electorate, which should wrap and attenuate it so each
528
- * voter gets only the ability to cast their own vote at a weight specified by
529
- * the electorate.
530
- * @property {SubmitVote} submitVote
531
- */
532
- /**
533
- * @typedef {object} VoteCounterPublicFacet
534
- * @property {() => boolean} isOpen
535
- * @property {() => Question} getQuestion
536
- * @property {() => Promise<Position>} getOutcome
537
- * @property {() => QuestionDetails} getDetails
538
- * @property {() => Promise<VoteStatistics>} getStats
539
- */
540
- /**
541
- * @typedef {object} MultiVoteCounterPublicFacet
542
- * @property {() => boolean} isOpen
543
- * @property {() => Question} getQuestion
544
- * @property {() => Promise<Position[]>} getOutcome
545
- * @property {() => QuestionDetails} getDetails
546
- * @property {() => Promise<VoteStatistics>} getStats
547
- */
548
- /**
549
- * @typedef {object} VoteCounterCloseFacet
550
- * TEST ONLY: Should not be allowed to escape from contracts
551
- * @property {() => void} closeVoting
552
- */
553
- /**
554
- * @typedef {object} VoteCounterFacets
555
- * @property {VoteCounterPublicFacet} publicFacet
556
- * @property {VoteCounterCreatorFacet} creatorFacet
557
- * @property {VoteCounterCloseFacet} closeFacet
558
- */
559
- /**
560
- * @typedef {object} MultiVoteCounterFacets
561
- * @property {MultiVoteCounterPublicFacet} publicFacet
562
- * @property {VoteCounterCreatorFacet} creatorFacet
563
- * @property {VoteCounterCloseFacet} closeFacet
564
- */
565
- /**
566
- * @callback BuildVoteCounter
567
- * @param {QuestionSpec} questionSpec
568
- * @param {bigint} threshold - questionSpec includes quorumRule; the electorate
569
- * converts that to a number that the counter can enforce.
570
- * @param {Instance} instance
571
- * @param {ERef<Publisher<OutcomeRecord>>} publisher
572
- * @returns {VoteCounterFacets}
573
- */
574
- /**
575
- * @callback BuildMultiVoteCounter
576
- * @param {QuestionSpec} questionSpec
577
- * @param {bigint} threshold - questionSpec includes quorumRule; the electorate
578
- * converts that to a number that the counter can enforce.
579
- * @param {Instance} instance
580
- * @param {ERef<Publisher<MultiOutcomeRecord>>} publisher
581
- * @returns {MultiVoteCounterFacets}
582
- */
583
- /**
584
- * @typedef {object} CompletedBallet
585
- * @property {Position} chosen
586
- * @property {bigint} shares
587
- */
588
- /**
589
- * @callback SubmitVote
590
- * @param {Handle<'Voter'>} voterHandle
591
- * @param {Position[]} chosenPositions
592
- * @param {bigint} [weight]
593
- * @returns {CompletedBallet}
594
- */
595
- /**
596
- * @callback GetOpenQuestions
597
- * @returns {Promise<Handle<'Question'>[]>}
598
- */
599
- /**
600
- * @callback GetQuestion
601
- * @param {Handle<'Question'>} h
602
- * @returns {Promise<Question>}
603
- */
604
- /**
605
- * @typedef {object} ElectoratePublic
606
- * @property {() => Subscriber<QuestionDetails>} getQuestionSubscriber
607
- * @property {GetOpenQuestions} getOpenQuestions,
608
- * @property {() => Instance} getInstance
609
- * @property {GetQuestion} getQuestion
610
- */
611
- /**
612
- * @typedef { ElectoratePublic & {makeVoterInvitation: () => ERef<Invitation>} } ClaimsElectoratePublic
613
- * @typedef { ElectoratePublic & {getName: () => string} } CommitteeElectoratePublic
614
- */
615
- /**
616
- * @typedef {object} PoserFacet
617
- * @property {AddQuestion} addQuestion
618
- */
619
- /**
620
- * @typedef {object} ElectorateCreatorFacet
621
- * @property {AddQuestion} addQuestion can be used directly when the creator doesn't need any
622
- * reassurance. When someone needs to connect addQuestion to the Electorate
623
- * instance, getPoserInvitation() lets them get addQuestion with assurance.
624
- * @property {() => Promise<Invitation>} getPoserInvitation
625
- * @property {() => Subscriber<QuestionDetails>} getQuestionSubscriber
626
- * @property {() => ElectoratePublic} getPublicFacet
627
- */
628
- /**
629
- * @typedef {object} GetVoterInvitations
630
- * @property {() => Invitation[]} getVoterInvitations
631
- */
632
- /**
633
- * @typedef {object} VoterFacet - a facet that the Electorate should hold
634
- * tightly. It allows specification of the vote's weight, so the Electorate
635
- * should distribute an attenuated wrapper that doesn't make that available!
636
- * @property {SubmitVote} submitVote
637
- */
638
- /**
639
- * @typedef {object} ClosingRule
640
- * @property {ERef<Timer>} timer
641
- * @property {import('@agoric/time/src/types').Timestamp} deadline
642
- */
643
- /**
644
- * @callback CloseVoting
645
- * @param {ClosingRule} closingRule
646
- * @param {() => void} closeVoting
647
- */
648
- /**
649
- * @typedef {object} AddQuestionReturn
650
- * @property {VoteCounterPublicFacet} publicFacet
651
- * @property {VoteCounterCreatorFacet} creatorFacet
652
- * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<typeof import('./binaryVoteCounter.js').start>} instance
653
- * @property {import('@agoric/time/src/types').Timestamp} deadline
654
- * @property {Handle<'Question'>} questionHandle
655
- */
656
- /**
657
- * @callback AddQuestion
658
- * @param {ERef<Installation>} voteCounter
659
- * @param {QuestionSpec} questionSpec
660
- * @returns {Promise<AddQuestionReturn>}
661
- */
662
- /**
663
- * @callback CreateQuestion
664
- *
665
- * @param {string} name - The name of the parameter to change
666
- * @param {ParamValue} proposedValue - the proposed value for the named
667
- * parameter
668
- * @param {Installation} voteCounterInstallation - the voteCounter to
669
- * instantiate to count votes. Expected to be a binaryVoteCounter. Other
670
- * voteCounters might be added here, or might require separate governors.
671
- * under management so users can trace it back and see that it would use
672
- * this electionManager to manage parameters
673
- * @param {Instance} contractInstance - include the instance of the contract
674
- * @param {ClosingRule} closingRule - deadline and timer for closing voting
675
- * @returns {Promise<QuestionDetails>}
676
- */
677
- /**
678
- * @template [P=StandardParamPath] path for a paramManagerRetriever
679
- * @typedef {object} ParamChangeIssue
680
- * @property {ParamChangesSpec<P>} spec
681
- * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>} contract
682
- */
683
- /**
684
- * @typedef {object} ApiInvocationIssue
685
- * @property {string} apiMethodName
686
- * @property {unknown[]} methodArgs
687
- */
688
- /**
689
- * @typedef {object} OfferFilterIssue
690
- * @property {string[]} strings
691
- */
692
- /**
693
- * @typedef {object} ParamChangePositions
694
- * @property {ChangeParamsPosition} positive
695
- * @property {NoChangeParamsPosition} negative
696
- */
697
- /**
698
- * @typedef {object} ParamChangeIssueDetails
699
- * details for a question that can change a contract parameter
700
- * @property {ChoiceMethod} method
701
- * @property {ParamChangeIssue<unknown>} issue
702
- * @property {ParamChangePositions} positions
703
- * @property {ElectionType} electionType
704
- * @property {number} maxChoices
705
- * @property {ClosingRule} closingRule
706
- * @property {QuorumRule} quorumRule
707
- * @property {NoChangeParamsPosition} tieOutcome
708
- * @property {Instance} counterInstance - instance of the VoteCounter
709
- * @property {Handle<'Question'>} questionHandle
710
- */
711
- /**
712
- * @typedef {Record<Keyword, ParamValueTyped>} ParamStateRecord a Record containing
713
- * keyword pairs with descriptions of parameters under governance.
714
- */
715
- /** @typedef {{current: ParamStateRecord}} GovernanceSubscriptionState */
716
- /**
717
- * @typedef {object} ParamManagerBase The base paramManager with typed getters
718
- * @property {() => ERef<ParamStateRecord>} getParams
719
- * @property {(name: string) => Amount} getAmount
720
- * @property {(name: string) => Brand} getBrand
721
- * @property {(name: string) => Instance} getInstance
722
- * @property {(name: string) => Installation} getInstallation
723
- * @property {(name: string) => Amount<'set'>} getInvitationAmount
724
- * @property {(name: string) => bigint} getNat
725
- * @property {(name: string) => Ratio} getRatio
726
- * @property {(name: string) => string} getString
727
- * @property {(name: string) => import('@agoric/time/src/types').TimestampRecord} getTimestamp
728
- * @property {(name: string) => import('@agoric/time/src/types').RelativeTimeRecord} getRelativeTime
729
- * @property {(name: string) => any} getUnknown
730
- * @property {(name: string, proposedValue: ParamValue) => ParamValue} getVisibleValue - for
731
- * most types, the visible value is the same as proposedValue. For Invitations
732
- * the visible value is the amount of the invitation.
733
- * @property {(name: string) => Promise<Invitation>} getInternalParamValue
734
- * @property {() => StoredSubscription<GovernanceSubscriptionState>} getSubscription
735
- */
736
- /**
737
- * @callback UpdateParams
738
- * @param {Record<string,ParamValue>} paramChanges
739
- * @returns {Promise<void>}
740
- */
741
- /**
742
- * These are typed `any` because the builder pattern of paramManager makes it very
743
- * complicated for the type system to know the set of param-specific functions
744
- * returned by `.build()`. Instead we let paramManager create the desired methods
745
- * and use typedParamManager to create a version that includes the static types.
746
- *
747
- * @typedef {Record<string, any>} ParamManagerGettersAndUpdaters
748
- * @typedef {ParamManagerBase & ParamManagerGettersAndUpdaters & {updateParams: UpdateParams}} AnyParamManager
749
- */
750
- /**
751
- * @typedef {Record<string, string[]>} ParameterNameList
752
- */
753
- /**
754
- * @callback AssertParamManagerType
755
- * @param {ParamType} type
756
- * @param {ParamValue} value
757
- * @param {string} name
758
- */
759
- /**
760
- * @callback BuildParamManager - ParamManager is a facility that governed
761
- * contracts can use to manage their visible state in a way that allows the
762
- * ContractGovernor to update values using governance. When paramManager is
763
- * instantiated inside the contract, the contract has synchronous access to
764
- * the values, and clients of the contract can verify that a ContractGovernor
765
- * can change the values in a legible way.
766
- * @param {Iterable<ParamValueTyped>} paramDescriptions
767
- * @returns {AnyParamManager}
768
- */
769
- /**
770
- * @typedef {object} ChangeParamsPosition
771
- * @property {Record<string,ParamValue>} changes one or more changes to parameters
772
- */
773
- /**
774
- * @typedef {object} OfferFilterPosition
775
- * @property {string[]} strings
776
- */
777
- /**
778
- * @typedef {object} NoChangeOfferFilterPosition
779
- * @property {string[]} dontUpdate
780
- */
781
- /**
782
- * @typedef {object} InvokeApiPosition
783
- * @property {string} apiMethodName
784
- * @property {unknown[]} methodArgs
785
- */
786
- /**
787
- * @typedef {object} DontInvokeApiPosition
788
- * @property {string} dontInvoke
789
- */
790
- /**
791
- * @typedef {object} NoChangeParamsPosition
792
- * @property {string[]} noChange Parameters in the proposal that this position
793
- * is opposed to
794
- */
795
- /**
796
- * @typedef {object} Governor
797
- * @property {CreateQuestion} createQuestion
798
- */
799
- /** @typedef {{ [methodName: string]: (...args: any) => unknown }} GovernedApis */
800
- /**
801
- * @typedef {object} GovernorPublic
802
- * @property {() => Promise<Instance>} getElectorate
803
- * @property {() => Instance} getGovernedContract
804
- * @property {(voteCounter: Instance) => Promise<void>} validateVoteCounter
805
- * @property {(regP: ERef<Instance>) => Promise<void>} validateElectorate
806
- * @property {(closingRule: ClosingRule) => void} validateTimer
807
- */
808
- /**
809
- * @typedef {object} ParamKey identifier for a paramManager within a contract
810
- * @property {unknown} key
811
- */
812
- /**
813
- * Description of a set of coordinated changes for a ParamManager
814
- *
815
- * @template P path for a paramManagerRetriever
816
- * @typedef {object} ParamChangesSpec<P>
817
- * @property {P} paramPath
818
- * @property {Record<string, ParamValue>} changes one or more changes to parameters
819
- */
820
- /**
821
- * @typedef {object} ContractGovernanceVoteResult
822
- * @property {Instance} instance - instance of the VoteCounter
823
- * @property {ERef<QuestionDetails>} details
824
- * @property {Promise<ParamValue>} outcomeOfUpdate - A promise for the result
825
- * of updating the parameter value. Primarily useful for its behavior on
826
- * rejection.
827
- */
828
- /**
829
- * @template {GovernableStartFn} SF Start function of governed contract
830
- * @typedef {object} GovernorCreatorFacet
831
- * @property {VoteOnParamChanges} voteOnParamChanges
832
- * @property {VoteOnApiInvocation} voteOnApiInvocation
833
- * @property {VoteOnOfferFilter} voteOnOfferFilter
834
- * @property {() => LimitedCF<SF>} getCreatorFacet facet of the governed contract,
835
- * with creator-like powers but without the tightly held ability to change
836
- * param values.
837
- * @property {(poserInvitation: Invitation) => Promise<void>} replaceElectorate
838
- * @property {() => AdminFacet} getAdminFacet
839
- * @property {() => GovernedPublicFacet<Awaited<ReturnType<SF>>['publicFacet']>} getPublicFacet - public facet of the governed contract
840
- * @property {() => Instance} getInstance - instance of the governed
841
- * contract
842
- */
843
- /**
844
- * @typedef GovernedPublicFacetMethods
845
- * @property {(key?: any) => StoredSubscription<GovernanceSubscriptionState>} getSubscription
846
- * @property {(key?: any) => ERef<ParamStateRecord>} getGovernedParams - get descriptions of
847
- * all the governed parameters
848
- * @property {(name: string) => Amount} getInvitationAmount
849
- */
850
- /**
851
- * @template {{}} PF Public facet
852
- * @typedef {PF & GovernedPublicFacetMethods} GovernedPublicFacet
853
- */
854
- /**
855
- * @template {GovernableStartFn} SF
856
- * @typedef {ReturnType<Awaited<ReturnType<SF>>['creatorFacet']['getLimitedCreatorFacet']>} LimitedCF
857
- */
858
- /**
859
- * @template {{}} CF creator facet
860
- * @typedef GovernedCreatorFacet
861
- * What a governed contract must return as its creatorFacet in order to be governed
862
- * @property {() => ParamManagerRetriever} getParamMgrRetriever - allows accessing
863
- * and updating governed parameters. Should only be directly accessible to the
864
- * contractGovernor
865
- * @property {() => ERef<CF>} getLimitedCreatorFacet - the creator
866
- * facet of the governed contract. Doesn't provide access to any governance
867
- * functionality
868
- * @property {(name: string) => Promise<Invitation>} getInvitation
869
- * @property {() => ERef<GovernedApis>} getGovernedApis
870
- * @property {() => (string | symbol)[]} getGovernedApiNames
871
- * @property {(strings: string[]) => void} setOfferFilter
872
- */
873
- /**
874
- * @typedef {{key: string}} StandardParamPath
875
- */
876
- /**
877
- * @typedef {object} ParamManagerRetriever
878
- * @property {(paramKey?: ParamKey) => AnyParamManager} get
879
- */
880
- /**
881
- * @template [P=StandardParamPath]
882
- *
883
- * @callback VoteOnParamChanges
884
- * @param {Installation} voteCounterInstallation
885
- * @param {import('@agoric/time/src/types').Timestamp} deadline
886
- * @param {ParamChangesSpec<P>} paramSpec
887
- * @returns {ContractGovernanceVoteResult}
888
- */
889
- /**
890
- * @callback VoteOnApiInvocation
891
- * @param {string} apiMethodName
892
- * @param {unknown[]} methodArgs
893
- * @param {Installation} voteCounterInstallation
894
- * @param {import('@agoric/time/src/types').Timestamp} deadline
895
- * @returns {Promise<ContractGovernanceVoteResult>}
896
- */
897
- /**
898
- * @callback VoteOnOfferFilter
899
- * @param {Installation} voteCounterInstallation
900
- * @param {import('@agoric/time/src/types').Timestamp} deadline
901
- * @param {string[]} strings
902
- * @returns {ContractGovernanceVoteResult}
903
- */
904
- /**
905
- * @typedef {object} ParamGovernor
906
- * @property {VoteOnParamChanges} voteOnParamChanges
907
- * @property {CreatedQuestion} createdQuestion
908
- */
909
- /**
910
- * @typedef {object} ApiGovernor
911
- * @property {VoteOnApiInvocation} voteOnApiInvocation
912
- * @property {CreatedQuestion} createdQuestion
913
- */
914
- /**
915
- * @typedef {object} FilterGovernor
916
- * @property {VoteOnOfferFilter} voteOnFilter
917
- * @property {CreatedQuestion} createdQuestion
918
- */
919
- /**
920
- * @callback CreatedQuestion
921
- * Was this question created by this ContractGovernor?
922
- * @param {Instance} questionInstance
923
- * @returns {boolean}
924
- */
925
- /**
926
- * @callback PositionIncluded
927
- * @param {Position[]} positions
928
- * @param {Position} position
929
- * @returns {boolean}
930
- */
931
- /**
932
- * @typedef {object} GovernedContractTerms
933
- * @property {import('@agoric/time/src/types').TimerService} timer
934
- * @property {IssuerKeywordRecord} issuerKeywordRecord
935
- * @property {object} privateArgs
936
- */
937
- /**
938
- * @callback AssertContractGovernance
939
- *
940
- * @param {ERef<ZoeService>} zoe
941
- * @param {import('@agoric/zoe/src/zoeService/utils.js').Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>} allegedGoverned
942
- * @param {Instance} allegedGovernor
943
- * @param {Installation<import('@agoric/governance/src/contractGovernor.js').start>} contractGovernorInstallation
944
- * @returns {Promise<GovernancePair>}
945
- */
946
- /**
947
- * @callback AssertContractElectorate - assert that the contract uses the
948
- * electorate
949
- *
950
- * @param {ERef<ZoeService>} zoe
951
- * @param {Instance} allegedGovernor
952
- * @param {Instance} allegedElectorate
953
- */
954
- /**
955
- * @typedef {import('@agoric/zoe/src/zoeService/utils.js').ContractStartFunction
956
- * & ((zcf?: any, pa?: any, baggage?: any) => ERef<{creatorFacet: GovernedCreatorFacet<{}>, publicFacet: GovernedPublicFacet<{}>}>)} GovernableStartFn
957
- */
958
- /**
959
- * @typedef {import('./contractGovernor.js')['start']} GovernorSF
960
- */
961
- /**
962
- * @see {StartedInstanceKit}
963
- * @template {ERef<Installation<GovernableStartFn>>} I
964
- * @typedef GovernorStartedInstallationKit
965
- * Same result as StartedInstanceKit but:
966
- * - typed for contractGovernor installation being started by Zoe. (It in turn starts the governed contract.)
967
- * - parameterized by Installation instead of StartFunction
968
- * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<GovernorSF>} instance
969
- * @property {AdminFacet} adminFacet
970
- * @property {GovernorCreatorFacet<InstallationStart<Awaited<I>>>} creatorFacet
971
- * @property {GovernorPublic} publicFacet
972
- */
973
- /**
974
- * @see {StartedInstanceKit}
975
- * @template {GovernableStartFn} SF
976
- * @typedef GovernanceFacetKit
977
- * Akin to StartedInstanceKit but designed for the results of starting governed contracts. Used in bootstrap space.
978
- * @property {AdminFacet} adminFacet of the governed contract
979
- * @property {LimitedCF<SF>} creatorFacet creator-like facet within the governed contract (without the powers the governor needs)
980
- * @property {GovernorCreatorFacet<SF>} governorCreatorFacet of the governing contract
981
- * @property {AdminFacet} governorAdminFacet of the governing contract
982
- * @property {Awaited<ReturnType<SF>>['publicFacet']} publicFacet
983
- * @property {Instance} instance
984
- * @property {Instance} governor
985
- */
986
496
  governedContractInstallation: Installation<SF>;
987
497
  governed: {
988
498
  issuerKeywordRecord: IssuerKeywordRecord;
499
+ /**
500
+ * @typedef {object} CompleteOrderedBallot
501
+ * @property {Handle<'Question'>} questionHandle
502
+ * @property {Position[]} ordered - ordered list of position from most preferred
503
+ * to least preferred
504
+ */
505
+ /**
506
+ * @typedef {object} PositionCount
507
+ * @property {Position} position
508
+ * @property {bigint} total
509
+ */
510
+ /**
511
+ * @typedef {object} VoteStatistics
512
+ * @property {bigint} spoiled
513
+ * @property {number} votes
514
+ * @property {PositionCount[]} results
515
+ */
516
+ /**
517
+ * @typedef {object} QuorumCounter
518
+ * @property {(stats: VoteStatistics) => boolean} check
519
+ */
520
+ /**
521
+ * @callback BuildQuestion
522
+ * @param {QuestionSpec} questionSpec
523
+ * @param {Instance} instance - voteCounter instance
524
+ * @returns {Question}
525
+ */
526
+ /**
527
+ * @typedef {object} VoteCounterCreatorFacet - a facet that the Electorate should
528
+ * hold tightly. submitVote() is the core capability that allows the holder to
529
+ * specify the identity and choice of a voter. The voteCounter is making that
530
+ * available to the Electorate, which should wrap and attenuate it so each
531
+ * voter gets only the ability to cast their own vote at a weight specified by
532
+ * the electorate.
533
+ * @property {SubmitVote} submitVote
534
+ */
535
+ /**
536
+ * @typedef {object} VoteCounterPublicFacet
537
+ * @property {() => boolean} isOpen
538
+ * @property {() => Question} getQuestion
539
+ * @property {() => Promise<Position>} getOutcome
540
+ * @property {() => QuestionDetails} getDetails
541
+ * @property {() => Promise<VoteStatistics>} getStats
542
+ */
543
+ /**
544
+ * @typedef {object} MultiVoteCounterPublicFacet
545
+ * @property {() => boolean} isOpen
546
+ * @property {() => Question} getQuestion
547
+ * @property {() => Promise<Position[]>} getOutcome
548
+ * @property {() => QuestionDetails} getDetails
549
+ * @property {() => Promise<VoteStatistics>} getStats
550
+ */
551
+ /**
552
+ * @typedef {object} VoteCounterCloseFacet
553
+ * TEST ONLY: Should not be allowed to escape from contracts
554
+ * @property {() => void} closeVoting
555
+ */
556
+ /**
557
+ * @typedef {object} VoteCounterFacets
558
+ * @property {VoteCounterPublicFacet} publicFacet
559
+ * @property {VoteCounterCreatorFacet} creatorFacet
560
+ * @property {VoteCounterCloseFacet} closeFacet
561
+ */
562
+ /**
563
+ * @typedef {object} MultiVoteCounterFacets
564
+ * @property {MultiVoteCounterPublicFacet} publicFacet
565
+ * @property {VoteCounterCreatorFacet} creatorFacet
566
+ * @property {VoteCounterCloseFacet} closeFacet
567
+ */
568
+ /**
569
+ * @callback BuildVoteCounter
570
+ * @param {QuestionSpec} questionSpec
571
+ * @param {bigint} threshold - questionSpec includes quorumRule; the electorate
572
+ * converts that to a number that the counter can enforce.
573
+ * @param {Instance} instance
574
+ * @param {ERef<Publisher<OutcomeRecord>>} publisher
575
+ * @returns {VoteCounterFacets}
576
+ */
577
+ /**
578
+ * @callback BuildMultiVoteCounter
579
+ * @param {QuestionSpec} questionSpec
580
+ * @param {bigint} threshold - questionSpec includes quorumRule; the electorate
581
+ * converts that to a number that the counter can enforce.
582
+ * @param {Instance} instance
583
+ * @param {ERef<Publisher<MultiOutcomeRecord>>} publisher
584
+ * @returns {MultiVoteCounterFacets}
585
+ */
586
+ /**
587
+ * @typedef {object} CompletedBallet
588
+ * @property {Position} chosen
589
+ * @property {bigint} shares
590
+ */
591
+ /**
592
+ * @callback SubmitVote
593
+ * @param {Handle<'Voter'>} voterHandle
594
+ * @param {Position[]} chosenPositions
595
+ * @param {bigint} [weight]
596
+ * @returns {CompletedBallet}
597
+ */
598
+ /**
599
+ * @callback GetOpenQuestions
600
+ * @returns {Promise<Handle<'Question'>[]>}
601
+ */
602
+ /**
603
+ * @callback GetQuestion
604
+ * @param {Handle<'Question'>} h
605
+ * @returns {Promise<Question>}
606
+ */
607
+ /**
608
+ * @typedef {object} ElectoratePublic
609
+ * @property {() => Subscriber<QuestionDetails>} getQuestionSubscriber
610
+ * @property {GetOpenQuestions} getOpenQuestions,
611
+ * @property {() => Instance} getInstance
612
+ * @property {GetQuestion} getQuestion
613
+ */
614
+ /**
615
+ * @typedef { ElectoratePublic & {makeVoterInvitation: () => ERef<Invitation>} } ClaimsElectoratePublic
616
+ * @typedef { ElectoratePublic & {getName: () => string} } CommitteeElectoratePublic
617
+ */
618
+ /**
619
+ * @typedef {object} PoserFacet
620
+ * @property {AddQuestion} addQuestion
621
+ */
622
+ /**
623
+ * @typedef {object} ElectorateCreatorFacet
624
+ * @property {AddQuestion} addQuestion can be used directly when the creator doesn't need any
625
+ * reassurance. When someone needs to connect addQuestion to the Electorate
626
+ * instance, getPoserInvitation() lets them get addQuestion with assurance.
627
+ * @property {() => Promise<Invitation>} getPoserInvitation
628
+ * @property {() => Subscriber<QuestionDetails>} getQuestionSubscriber
629
+ * @property {() => ElectoratePublic} getPublicFacet
630
+ */
631
+ /**
632
+ * @typedef {object} GetVoterInvitations
633
+ * @property {() => Invitation[]} getVoterInvitations
634
+ */
635
+ /**
636
+ * @typedef {object} VoterFacet - a facet that the Electorate should hold
637
+ * tightly. It allows specification of the vote's weight, so the Electorate
638
+ * should distribute an attenuated wrapper that doesn't make that available!
639
+ * @property {SubmitVote} submitVote
640
+ */
641
+ /**
642
+ * @typedef {object} ClosingRule
643
+ * @property {ERef<Timer>} timer
644
+ * @property {import('@agoric/time/src/types').Timestamp} deadline
645
+ */
646
+ /**
647
+ * @callback CloseVoting
648
+ * @param {ClosingRule} closingRule
649
+ * @param {() => void} closeVoting
650
+ */
651
+ /**
652
+ * @typedef {object} AddQuestionReturn
653
+ * @property {VoteCounterPublicFacet} publicFacet
654
+ * @property {VoteCounterCreatorFacet} creatorFacet
655
+ * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<typeof import('./binaryVoteCounter.js').start>} instance
656
+ * @property {import('@agoric/time/src/types').Timestamp} deadline
657
+ * @property {Handle<'Question'>} questionHandle
658
+ */
659
+ /**
660
+ * @callback AddQuestion
661
+ * @param {ERef<Installation>} voteCounter
662
+ * @param {QuestionSpec} questionSpec
663
+ * @returns {Promise<AddQuestionReturn>}
664
+ */
665
+ /**
666
+ * @callback CreateQuestion
667
+ *
668
+ * @param {string} name - The name of the parameter to change
669
+ * @param {ParamValue} proposedValue - the proposed value for the named
670
+ * parameter
671
+ * @param {Installation} voteCounterInstallation - the voteCounter to
672
+ * instantiate to count votes. Expected to be a binaryVoteCounter. Other
673
+ * voteCounters might be added here, or might require separate governors.
674
+ * under management so users can trace it back and see that it would use
675
+ * this electionManager to manage parameters
676
+ * @param {Instance} contractInstance - include the instance of the contract
677
+ * @param {ClosingRule} closingRule - deadline and timer for closing voting
678
+ * @returns {Promise<QuestionDetails>}
679
+ */
680
+ /**
681
+ * @template [P=StandardParamPath] path for a paramManagerRetriever
682
+ * @typedef {object} ParamChangeIssue
683
+ * @property {ParamChangesSpec<P>} spec
684
+ * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>} contract
685
+ */
686
+ /**
687
+ * @typedef {object} ApiInvocationIssue
688
+ * @property {string} apiMethodName
689
+ * @property {unknown[]} methodArgs
690
+ */
691
+ /**
692
+ * @typedef {object} OfferFilterIssue
693
+ * @property {string[]} strings
694
+ */
695
+ /**
696
+ * @typedef {object} ParamChangePositions
697
+ * @property {ChangeParamsPosition} positive
698
+ * @property {NoChangeParamsPosition} negative
699
+ */
700
+ /**
701
+ * @typedef {object} ParamChangeIssueDetails
702
+ * details for a question that can change a contract parameter
703
+ * @property {ChoiceMethod} method
704
+ * @property {ParamChangeIssue<unknown>} issue
705
+ * @property {ParamChangePositions} positions
706
+ * @property {ElectionType} electionType
707
+ * @property {number} maxChoices
708
+ * @property {ClosingRule} closingRule
709
+ * @property {QuorumRule} quorumRule
710
+ * @property {NoChangeParamsPosition} tieOutcome
711
+ * @property {Instance} counterInstance - instance of the VoteCounter
712
+ * @property {Handle<'Question'>} questionHandle
713
+ */
714
+ /**
715
+ * @typedef {Record<Keyword, ParamValueTyped>} ParamStateRecord a Record containing
716
+ * keyword pairs with descriptions of parameters under governance.
717
+ */
718
+ /** @typedef {{current: ParamStateRecord}} GovernanceSubscriptionState */
719
+ /**
720
+ * @typedef {object} ParamManagerBase The base paramManager with typed getters
721
+ * @property {() => ERef<ParamStateRecord>} getParams
722
+ * @property {(name: string) => Amount} getAmount
723
+ * @property {(name: string) => Brand} getBrand
724
+ * @property {(name: string) => Instance} getInstance
725
+ * @property {(name: string) => Installation} getInstallation
726
+ * @property {(name: string) => Amount<'set'>} getInvitationAmount
727
+ * @property {(name: string) => bigint} getNat
728
+ * @property {(name: string) => Ratio} getRatio
729
+ * @property {(name: string) => string} getString
730
+ * @property {(name: string) => import('@agoric/time/src/types').TimestampRecord} getTimestamp
731
+ * @property {(name: string) => import('@agoric/time/src/types').RelativeTimeRecord} getRelativeTime
732
+ * @property {(name: string) => any} getUnknown
733
+ * @property {(name: string, proposedValue: ParamValue) => ParamValue} getVisibleValue - for
734
+ * most types, the visible value is the same as proposedValue. For Invitations
735
+ * the visible value is the amount of the invitation.
736
+ * @property {(name: string) => Promise<Invitation>} getInternalParamValue
737
+ * @property {() => StoredSubscription<GovernanceSubscriptionState>} getSubscription
738
+ */
739
+ /**
740
+ * @callback UpdateParams
741
+ * @param {Record<string,ParamValue>} paramChanges
742
+ * @returns {Promise<void>}
743
+ */
744
+ /**
745
+ * These are typed `any` because the builder pattern of paramManager makes it very
746
+ * complicated for the type system to know the set of param-specific functions
747
+ * returned by `.build()`. Instead we let paramManager create the desired methods
748
+ * and use typedParamManager to create a version that includes the static types.
749
+ *
750
+ * @typedef {Record<string, any>} ParamManagerGettersAndUpdaters
751
+ * @typedef {ParamManagerBase & ParamManagerGettersAndUpdaters & {updateParams: UpdateParams}} AnyParamManager
752
+ */
753
+ /**
754
+ * @typedef {Record<string, string[]>} ParameterNameList
755
+ */
756
+ /**
757
+ * @callback AssertParamManagerType
758
+ * @param {ParamType} type
759
+ * @param {ParamValue} value
760
+ * @param {string} name
761
+ */
762
+ /**
763
+ * @callback BuildParamManager - ParamManager is a facility that governed
764
+ * contracts can use to manage their visible state in a way that allows the
765
+ * ContractGovernor to update values using governance. When paramManager is
766
+ * instantiated inside the contract, the contract has synchronous access to
767
+ * the values, and clients of the contract can verify that a ContractGovernor
768
+ * can change the values in a legible way.
769
+ * @param {Iterable<ParamValueTyped>} paramDescriptions
770
+ * @returns {AnyParamManager}
771
+ */
772
+ /**
773
+ * @typedef {object} ChangeParamsPosition
774
+ * @property {Record<string,ParamValue>} changes one or more changes to parameters
775
+ */
776
+ /**
777
+ * @typedef {object} OfferFilterPosition
778
+ * @property {string[]} strings
779
+ */
780
+ /**
781
+ * @typedef {object} NoChangeOfferFilterPosition
782
+ * @property {string[]} dontUpdate
783
+ */
784
+ /**
785
+ * @typedef {object} InvokeApiPosition
786
+ * @property {string} apiMethodName
787
+ * @property {unknown[]} methodArgs
788
+ */
789
+ /**
790
+ * @typedef {object} DontInvokeApiPosition
791
+ * @property {string} dontInvoke
792
+ */
793
+ /**
794
+ * @typedef {object} NoChangeParamsPosition
795
+ * @property {string[]} noChange Parameters in the proposal that this position
796
+ * is opposed to
797
+ */
798
+ /**
799
+ * @typedef {object} Governor
800
+ * @property {CreateQuestion} createQuestion
801
+ */
802
+ /** @typedef {{ [methodName: string]: (...args: any) => unknown }} GovernedApis */
803
+ /**
804
+ * @typedef {object} GovernorPublic
805
+ * @property {() => Promise<Instance>} getElectorate
806
+ * @property {() => Instance} getGovernedContract
807
+ * @property {(voteCounter: Instance) => Promise<void>} validateVoteCounter
808
+ * @property {(regP: ERef<Instance>) => Promise<void>} validateElectorate
809
+ * @property {(closingRule: ClosingRule) => void} validateTimer
810
+ */
811
+ /**
812
+ * @typedef {object} ParamKey identifier for a paramManager within a contract
813
+ * @property {unknown} key
814
+ */
815
+ /**
816
+ * Description of a set of coordinated changes for a ParamManager
817
+ *
818
+ * @template P path for a paramManagerRetriever
819
+ * @typedef {object} ParamChangesSpec<P>
820
+ * @property {P} paramPath
821
+ * @property {Record<string, ParamValue>} changes one or more changes to parameters
822
+ */
823
+ /**
824
+ * @typedef {object} ContractGovernanceVoteResult
825
+ * @property {Instance} instance - instance of the VoteCounter
826
+ * @property {ERef<QuestionDetails>} details
827
+ * @property {Promise<ParamValue>} outcomeOfUpdate - A promise for the result
828
+ * of updating the parameter value. Primarily useful for its behavior on
829
+ * rejection.
830
+ */
831
+ /**
832
+ * @template {GovernableStartFn} SF Start function of governed contract
833
+ * @typedef {object} GovernorCreatorFacet
834
+ * @property {VoteOnParamChanges} voteOnParamChanges
835
+ * @property {VoteOnApiInvocation} voteOnApiInvocation
836
+ * @property {VoteOnOfferFilter} voteOnOfferFilter
837
+ * @property {() => LimitedCF<SF>} getCreatorFacet facet of the governed contract,
838
+ * with creator-like powers but without the tightly held ability to change
839
+ * param values.
840
+ * @property {(poserInvitation: Invitation) => Promise<void>} replaceElectorate
841
+ * @property {() => AdminFacet} getAdminFacet
842
+ * @property {() => GovernedPublicFacet<Awaited<ReturnType<SF>>['publicFacet']>} getPublicFacet - public facet of the governed contract
843
+ * @property {() => Instance} getInstance - instance of the governed
844
+ * contract
845
+ */
846
+ /**
847
+ * @typedef GovernedPublicFacetMethods
848
+ * @property {(key?: any) => StoredSubscription<GovernanceSubscriptionState>} getSubscription
849
+ * @property {(key?: any) => ERef<ParamStateRecord>} getGovernedParams - get descriptions of
850
+ * all the governed parameters
851
+ * @property {(name: string) => Amount} getInvitationAmount
852
+ */
853
+ /**
854
+ * @template {{}} PF Public facet
855
+ * @typedef {PF & GovernedPublicFacetMethods} GovernedPublicFacet
856
+ */
857
+ /**
858
+ * @template {GovernableStartFn} SF
859
+ * @typedef {ReturnType<Awaited<ReturnType<SF>>['creatorFacet']['getLimitedCreatorFacet']>} LimitedCF
860
+ */
861
+ /**
862
+ * @template {{}} CF creator facet
863
+ * @typedef GovernedCreatorFacet
864
+ * What a governed contract must return as its creatorFacet in order to be governed
865
+ * @property {() => ParamManagerRetriever} getParamMgrRetriever - allows accessing
866
+ * and updating governed parameters. Should only be directly accessible to the
867
+ * contractGovernor
868
+ * @property {() => ERef<CF>} getLimitedCreatorFacet - the creator
869
+ * facet of the governed contract. Doesn't provide access to any governance
870
+ * functionality
871
+ * @property {(name: string) => Promise<Invitation>} getInvitation
872
+ * @property {() => ERef<GovernedApis>} getGovernedApis
873
+ * @property {() => (string | symbol)[]} getGovernedApiNames
874
+ * @property {(strings: string[]) => void} setOfferFilter
875
+ */
876
+ /**
877
+ * @typedef {{key: string}} StandardParamPath
878
+ */
879
+ /**
880
+ * @typedef {object} ParamManagerRetriever
881
+ * @property {(paramKey?: ParamKey) => AnyParamManager} get
882
+ */
883
+ /**
884
+ * @template [P=StandardParamPath]
885
+ *
886
+ * @callback VoteOnParamChanges
887
+ * @param {Installation} voteCounterInstallation
888
+ * @param {import('@agoric/time/src/types').Timestamp} deadline
889
+ * @param {ParamChangesSpec<P>} paramSpec
890
+ * @returns {ContractGovernanceVoteResult}
891
+ */
892
+ /**
893
+ * @callback VoteOnApiInvocation
894
+ * @param {string} apiMethodName
895
+ * @param {unknown[]} methodArgs
896
+ * @param {Installation} voteCounterInstallation
897
+ * @param {import('@agoric/time/src/types').Timestamp} deadline
898
+ * @returns {Promise<ContractGovernanceVoteResult>}
899
+ */
900
+ /**
901
+ * @callback VoteOnOfferFilter
902
+ * @param {Installation} voteCounterInstallation
903
+ * @param {import('@agoric/time/src/types').Timestamp} deadline
904
+ * @param {string[]} strings
905
+ * @returns {ContractGovernanceVoteResult}
906
+ */
907
+ /**
908
+ * @typedef {object} ParamGovernor
909
+ * @property {VoteOnParamChanges} voteOnParamChanges
910
+ * @property {CreatedQuestion} createdQuestion
911
+ */
912
+ /**
913
+ * @typedef {object} ApiGovernor
914
+ * @property {VoteOnApiInvocation} voteOnApiInvocation
915
+ * @property {CreatedQuestion} createdQuestion
916
+ */
917
+ /**
918
+ * @typedef {object} FilterGovernor
919
+ * @property {VoteOnOfferFilter} voteOnFilter
920
+ * @property {CreatedQuestion} createdQuestion
921
+ */
922
+ /**
923
+ * @callback CreatedQuestion
924
+ * Was this question created by this ContractGovernor?
925
+ * @param {Instance} questionInstance
926
+ * @returns {boolean}
927
+ */
928
+ /**
929
+ * @callback PositionIncluded
930
+ * @param {Position[]} positions
931
+ * @param {Position} position
932
+ * @returns {boolean}
933
+ */
934
+ /**
935
+ * @typedef {object} GovernedContractTerms
936
+ * @property {import('@agoric/time/src/types').TimerService} timer
937
+ * @property {IssuerKeywordRecord} issuerKeywordRecord
938
+ * @property {object} privateArgs
939
+ */
940
+ /**
941
+ * @callback AssertContractGovernance
942
+ *
943
+ * @param {ERef<ZoeService>} zoe
944
+ * @param {import('@agoric/zoe/src/zoeService/utils.js').Instance<(zcf: ZCF<GovernanceTerms<{}>>) => {}>} allegedGoverned
945
+ * @param {Instance} allegedGovernor
946
+ * @param {Installation<import('@agoric/governance/src/contractGovernor.js').prepare>} contractGovernorInstallation
947
+ * @returns {Promise<GovernancePair>}
948
+ */
949
+ /**
950
+ * @callback AssertContractElectorate - assert that the contract uses the
951
+ * electorate
952
+ *
953
+ * @param {ERef<ZoeService>} zoe
954
+ * @param {Instance} allegedGovernor
955
+ * @param {Instance} allegedElectorate
956
+ */
957
+ /**
958
+ * @typedef {import('@agoric/zoe/src/zoeService/utils.js').ContractStartFunction
959
+ * & ((zcf?: any, pa?: any, baggage?: any) => ERef<{creatorFacet: GovernedCreatorFacet<{}>, publicFacet: GovernedPublicFacet<{}>}>)} GovernableStartFn
960
+ */
961
+ /**
962
+ * @typedef {import('./contractGovernor.js')['prepare']} GovernorSF
963
+ */
964
+ /**
965
+ * @see {StartedInstanceKit}
966
+ * @template {ERef<Installation<GovernableStartFn>>} I
967
+ * @typedef GovernorStartedInstallationKit
968
+ * Same result as StartedInstanceKit but:
969
+ * - typed for contractGovernor installation being started by Zoe. (It in turn starts the governed contract.)
970
+ * - parameterized by Installation instead of StartFunction
971
+ * @property {import('@agoric/zoe/src/zoeService/utils.js').Instance<GovernorSF>} instance
972
+ * @property {AdminFacet} adminFacet
973
+ * @property {GovernorCreatorFacet<InstallationStart<Awaited<I>>>} creatorFacet
974
+ * @property {GovernorPublic} publicFacet
975
+ */
976
+ /**
977
+ * @see {StartedInstanceKit}
978
+ * @template {GovernableStartFn} SF
979
+ * @typedef GovernanceFacetKit
980
+ * Akin to StartedInstanceKit but designed for the results of starting governed contracts. Used in bootstrap space.
981
+ * @property {AdminFacet} adminFacet of the governed contract
982
+ * @property {LimitedCF<SF>} creatorFacet creator-like facet within the governed contract (without the powers the governor needs)
983
+ * @property {GovernorCreatorFacet<SF>} governorCreatorFacet of the governing contract
984
+ * @property {AdminFacet} governorAdminFacet of the governing contract
985
+ * @property {Awaited<ReturnType<SF>>['publicFacet']} publicFacet
986
+ * @property {Instance} instance
987
+ * @property {Instance} governor
988
+ */
989
989
  terms: {
990
990
  governedParams: {
991
991
  Electorate: import("./contractGovernance/typedParamManager.js").InvitationParam;
@@ -995,7 +995,7 @@ type AssertContractGovernance = (zoe: ERef<ZoeService>, allegedGoverned: import(
995
995
  };
996
996
  }>, privateArgs: {
997
997
  governed: Record<string, unknown>;
998
- }, baggage: import("@agoric/swingset-liveslots").Baggage) => Promise<{
998
+ }, baggage: MapStore<string, unknown>) => Promise<{
999
999
  creatorFacet: GovernorCreatorFacet<SF>;
1000
1000
  publicFacet: GovernorPublic;
1001
1001
  }>)>) => Promise<GovernancePair>;
@@ -1008,7 +1008,7 @@ type GovernableStartFn = import("@agoric/zoe/src/zoeService/utils.js").ContractS
1008
1008
  creatorFacet: GovernedCreatorFacet<{}>;
1009
1009
  publicFacet: GovernedPublicFacet<{}>;
1010
1010
  }>);
1011
- type GovernorSF = typeof import("./contractGovernor.js")['start'];
1011
+ type GovernorSF = typeof import("./contractGovernor.js")['prepare'];
1012
1012
  /**
1013
1013
  * Same result as StartedInstanceKit but:
1014
1014
  * - typed for contractGovernor installation being started by Zoe. (It in turn starts the governed contract.)