API documentation of Agoric SDK / Exports / @agoric/governance / tools/puppetGovernance
Module: tools/puppetGovernance
Table of contents
Functions
Functions
setUpGovernedContract
▸ setUpGovernedContract<T
>(zoe
, governedP
, timer
, termsOfGoverned?
, privateArgsOfGoverned?
, issuerKeywordRecord?
): Promise
<{ getFakeInvitation
: () => Promise
<{ fakeInvitationAmount
: Amount
<"set"
> ; fakeInvitationPayment
: any
}> ; governorFacets
: StartedInstanceKit
<<SF>(zcf
: ZCF
<{ governed
: { issuerKeywordRecord?
: IssuerKeywordRecord
; terms
: { governedParams
: { Electorate
: InvitationParam
} } } ; governedContractInstallation
: Installation
<SF
> ; timer
: TimerService
}>, privateArgs
: { governed
: Record
<string
, unknown
> }) => Promise
<{ creatorFacet
: { changeParams
: (paramSpec
: ParamChangesSpec
<any
>) => Promise
<void
> ; getAdminFacet
: () => AdminFacet
<SF
> ; getCreatorFacet
: () => Promise
<{}> ; getInstance
: () => Instance
<SF
> ; getPublicFacet
: () => Awaited
<...>["publicFacet"
] ; invokeAPI
: (apiMethodName
: string
, methodArgs
: unknown
[]) => Promise
<{ apiMethodName
: ... ; methodArgs
: ... }> ; setFilters
: (strings
: string
[]) => Promise
<void
> } & RemotableBrand
<{}, { changeParams
: (paramSpec
: ParamChangesSpec
<...>) => Promise
<...> ; getAdminFacet
: () => AdminFacet
<...> ; getCreatorFacet
: () => Promise
<...> ; getInstance
: () => Instance
<...> ; getPublicFacet
: () => ...[...] ; invokeAPI
: (apiMethodName
: string
, methodArgs
: ...[]) => Promise
<...> ; setFilters
: (strings
: ...[]) => Promise
<...> }> ; publicFacet
: { getGovernedContract
: () => Instance
<SF
> } & RemotableBrand
<{}, { getGovernedContract
: () => Instance
<...> }> }>> ; installs
: { autoRefund
: Installation
<any
> ; governed
: Installation
<T
> ; governor
: Installation
<<SF>(zcf
: ZCF
<{ governed
: { issuerKeywordRecord?
: IssuerKeywordRecord
; terms
: { governedParams
: { Electorate
: InvitationParam
} } } ; governedContractInstallation
: Installation
<SF
> ; timer
: TimerService
}>, privateArgs
: { governed
: Record
<string
, unknown
> }) => Promise
<{ creatorFacet
: { changeParams
: (paramSpec
: ParamChangesSpec
<...>) => Promise
<...> ; getAdminFacet
: () => AdminFacet
<...> ; getCreatorFacet
: () => Promise
<...> ; getInstance
: () => Instance
<...> ; getPublicFacet
: () => ...[...] ; invokeAPI
: (apiMethodName
: string
, methodArgs
: ...[]) => Promise
<...> ; setFilters
: (strings
: ...[]) => Promise
<...> } & RemotableBrand
<{}, { changeParams
: (paramSpec
: ...) => ... ; getAdminFacet
: () => ... ; getCreatorFacet
: () => ... ; getInstance
: () => ... ; getPublicFacet
: () => ... ; invokeAPI
: (apiMethodName
: ..., methodArgs
: ...) => ... ; setFilters
: (strings
: ...) => ... }> ; publicFacet
: { getGovernedContract
: () => Instance
<...> } & RemotableBrand
<{}, { getGovernedContract
: () => ... }> }>> } }>
Type parameters
Name | Type | Description |
---|---|---|
T | extends GovernableStartFn | governed contract startfn |
Parameters
Name | Type |
---|---|
zoe | ERef <ZoeService > |
governedP | ERef <Installation <T >> |
timer | TimerService |
termsOfGoverned | Object |
termsOfGoverned.governedApis? | string [] |
termsOfGoverned.governedParams? | Record <string , unknown > |
privateArgsOfGoverned | Object |
issuerKeywordRecord? | IssuerKeywordRecord |
Returns
Promise
<{ getFakeInvitation
: () => Promise
<{ fakeInvitationAmount
: Amount
<"set"
> ; fakeInvitationPayment
: any
}> ; governorFacets
: StartedInstanceKit
<<SF>(zcf
: ZCF
<{ governed
: { issuerKeywordRecord?
: IssuerKeywordRecord
; terms
: { governedParams
: { Electorate
: InvitationParam
} } } ; governedContractInstallation
: Installation
<SF
> ; timer
: TimerService
}>, privateArgs
: { governed
: Record
<string
, unknown
> }) => Promise
<{ creatorFacet
: { changeParams
: (paramSpec
: ParamChangesSpec
<any
>) => Promise
<void
> ; getAdminFacet
: () => AdminFacet
<SF
> ; getCreatorFacet
: () => Promise
<{}> ; getInstance
: () => Instance
<SF
> ; getPublicFacet
: () => Awaited
<...>["publicFacet"
] ; invokeAPI
: (apiMethodName
: string
, methodArgs
: unknown
[]) => Promise
<{ apiMethodName
: ... ; methodArgs
: ... }> ; setFilters
: (strings
: string
[]) => Promise
<void
> } & RemotableBrand
<{}, { changeParams
: (paramSpec
: ParamChangesSpec
<...>) => Promise
<...> ; getAdminFacet
: () => AdminFacet
<...> ; getCreatorFacet
: () => Promise
<...> ; getInstance
: () => Instance
<...> ; getPublicFacet
: () => ...[...] ; invokeAPI
: (apiMethodName
: string
, methodArgs
: ...[]) => Promise
<...> ; setFilters
: (strings
: ...[]) => Promise
<...> }> ; publicFacet
: { getGovernedContract
: () => Instance
<SF
> } & RemotableBrand
<{}, { getGovernedContract
: () => Instance
<...> }> }>> ; installs
: { autoRefund
: Installation
<any
> ; governed
: Installation
<T
> ; governor
: Installation
<<SF>(zcf
: ZCF
<{ governed
: { issuerKeywordRecord?
: IssuerKeywordRecord
; terms
: { governedParams
: { Electorate
: InvitationParam
} } } ; governedContractInstallation
: Installation
<SF
> ; timer
: TimerService
}>, privateArgs
: { governed
: Record
<string
, unknown
> }) => Promise
<{ creatorFacet
: { changeParams
: (paramSpec
: ParamChangesSpec
<...>) => Promise
<...> ; getAdminFacet
: () => AdminFacet
<...> ; getCreatorFacet
: () => Promise
<...> ; getInstance
: () => Instance
<...> ; getPublicFacet
: () => ...[...] ; invokeAPI
: (apiMethodName
: string
, methodArgs
: ...[]) => Promise
<...> ; setFilters
: (strings
: ...[]) => Promise
<...> } & RemotableBrand
<{}, { changeParams
: (paramSpec
: ...) => ... ; getAdminFacet
: () => ... ; getCreatorFacet
: () => ... ; getInstance
: () => ... ; getPublicFacet
: () => ... ; invokeAPI
: (apiMethodName
: ..., methodArgs
: ...) => ... ; setFilters
: (strings
: ...) => ... }> ; publicFacet
: { getGovernedContract
: () => Instance
<...> } & RemotableBrand
<{}, { getGovernedContract
: () => ... }> }>> } }>