Function provideOrchestrationInternal
provide Orchestration ( zcf , baggage , remotePowers , marshaller ) : { asyncFlowTools : { adminAsyncFlow : Guarded < { getFailures ( ) : CopyMap < any , Passable > ; getFlowForOutcomeVow ( outcomeVow : any ) : any ; wakeAll ( ) : void ; } > ; allWokenP : Promise < void > ; asyncFlow : ( < F > ( zone : Zone , tag : string , guestFunc : F , options ??: { startEager ?: boolean ; } ) => HostOf < F > ) ; prepareAsyncFlowKit : ( ( zone : Zone , tag : string , guestAsyncFunc : GuestAsyncFunc , options ??: { startEager ?: boolean ; } ) => ( ( activationArgs : any ) => GuardedKit < { admin : { complete ( ) : void ; panic ( fatalProblem : any ) : never ; reset ( ) : void ; } ; flow : { dump ( ) : ( | [ op: "doFulfill" , vow: Vow < ( ...) > , fulfillment: Passable ] | [ op: "doReject" , vow: Vow < ( ...) > , reason: Passable ] | [ op: "doReturn" , callIndex: number , result: Passable ] | [ op: "doThrow" , callIndex: number , problem: Passable ] | [ op: "checkCall" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSendOnly" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSend" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] ) [] ; getFlowState ( ) : FlowState ; getOptFatalProblem ( ) : any ; getOutcome ( ) : Vow < any > ; restart ( eager ??: boolean ) : void ; wake ( ) : void ; } ; wakeWatcher : { onFulfilled ( _fulfillment : any ) : void ; onRejected ( _fulfillment : any ) : void ; } ; } > ) ) ; prepareEndowment : ( ( zone : Zone , tag : string , e : unknown ) => any ) ; } ; baggage : Baggage ; chainHub : Guarded < { getAsset ( denom : string , srcChainName : string ) : undefined | DenomDetail ; getChainInfo < K > ( chainName : K ) : Vow < ActualChainInfo < K > > ; getChainsAndConnection < C1 , C2 > ( primaryName : C1 , counterName : C2 ) : Vow < [ ActualChainInfo < C1 > , ActualChainInfo < C2 > , IBCConnectionInfo ] > ; getConnectionInfo ( primary : string | { chainId : string ; } , counter : string | { chainId : string ; } ) : Vow < IBCConnectionInfo > ; getDenom ( brand : Brand ) : undefined | string ; makeChainAddress ( address : string ) : ChainAddress ; makeTransferRoute ( destination : ChainAddress , denomAmount : DenomAmount , srcChainName : string , forwardOpts ?: { retries ?: number ; timeout ?: | ` ${ number } s ` | ` ${ number } m ` | ` ${ number } h ` | ` ${ number } ms ` | ` ${ number } us ` | ` ${ number } ns ` ; } ) : TransferRoute ; registerAsset ( denom : string , detail : DenomDetail ) : void ; registerChain ( name : string , chainInfo : Readonly < { bech32Prefix ?: string ; chainId : string ; connections ?: Record < string , IBCConnectionInfo > ; icqEnabled ?: boolean ; pfmEnabled ?: boolean ; stakingTokens ?: readonly { denom : string ; } [] ; } > ) : void ; registerConnection ( primaryChainId : string , counterpartyChainId : string , connectionInfo : IBCConnectionInfo ) : void ; } > ; makeOrchestrateKit : ( ( zone : Zone ) => { orchestrate : ( < HC , GF > ( durableName : string , hostCtx : HC , guestFn : GF ) => HostForGuest < GF > ) ; orchestrateAll : ( < HC , GFM > ( guestFns : GFM , hostCtx : HC ) => { [ N in string | number | symbol ] : HostForGuest < GFM [ N ] > } ) ; } ) ; orchestrate : ( < HC , GF > ( durableName : string , hostCtx : HC , guestFn : GF ) => HostForGuest < GF > ) ; orchestrateAll : ( < HC , GFM > ( guestFns : GFM , hostCtx : HC ) => { [ N in string | number | symbol ] : HostForGuest < GFM [ N ] > } ) ; vowTools : VowTools ; zcfTools : HostInterface < ZcfTools > ; zoeTools : { localTransfer : ( ( ... args : [ srcSeat: ZCFSeat , localAccount: LocalAccountMethods , amounts: AmountKeywordRecord ] ) => Vow < void > ) ; withdrawToSeat : ( ( ... args : [ localAccount: LocalAccountMethods , destSeat: ZCFSeat , amounts: AmountKeywordRecord ] ) => Vow < void > ) ; } ; zone : Zone ; } Parameters zcf : ZCF < Record < string , unknown > > baggage : Baggage remotePowers : OrchestrationPowers marshaller : { fromCapData : FromCapData < unknown > ; serialize : ToCapData < unknown > ; toCapData : ToCapData < unknown > ; unserialize : FromCapData < unknown > ; } from Cap Data : FromCapData < unknown > serialize : ToCapData < unknown > to Cap Data : ToCapData < unknown > unserialize : FromCapData < unknown > Returns { asyncFlowTools : { adminAsyncFlow : Guarded < { getFailures ( ) : CopyMap < any , Passable > ; getFlowForOutcomeVow ( outcomeVow : any ) : any ; wakeAll ( ) : void ; } > ; allWokenP : Promise < void > ; asyncFlow : ( < F > ( zone : Zone , tag : string , guestFunc : F , options ??: { startEager ?: boolean ; } ) => HostOf < F > ) ; prepareAsyncFlowKit : ( ( zone : Zone , tag : string , guestAsyncFunc : GuestAsyncFunc , options ??: { startEager ?: boolean ; } ) => ( ( activationArgs : any ) => GuardedKit < { admin : { complete ( ) : void ; panic ( fatalProblem : any ) : never ; reset ( ) : void ; } ; flow : { dump ( ) : ( | [ op: "doFulfill" , vow: Vow < ( ...) > , fulfillment: Passable ] | [ op: "doReject" , vow: Vow < ( ...) > , reason: Passable ] | [ op: "doReturn" , callIndex: number , result: Passable ] | [ op: "doThrow" , callIndex: number , problem: Passable ] | [ op: "checkCall" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSendOnly" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSend" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] ) [] ; getFlowState ( ) : FlowState ; getOptFatalProblem ( ) : any ; getOutcome ( ) : Vow < any > ; restart ( eager ??: boolean ) : void ; wake ( ) : void ; } ; wakeWatcher : { onFulfilled ( _fulfillment : any ) : void ; onRejected ( _fulfillment : any ) : void ; } ; } > ) ) ; prepareEndowment : ( ( zone : Zone , tag : string , e : unknown ) => any ) ; } ; baggage : Baggage ; chainHub : Guarded < { getAsset ( denom : string , srcChainName : string ) : undefined | DenomDetail ; getChainInfo < K > ( chainName : K ) : Vow < ActualChainInfo < K > > ; getChainsAndConnection < C1 , C2 > ( primaryName : C1 , counterName : C2 ) : Vow < [ ActualChainInfo < C1 > , ActualChainInfo < C2 > , IBCConnectionInfo ] > ; getConnectionInfo ( primary : string | { chainId : string ; } , counter : string | { chainId : string ; } ) : Vow < IBCConnectionInfo > ; getDenom ( brand : Brand ) : undefined | string ; makeChainAddress ( address : string ) : ChainAddress ; makeTransferRoute ( destination : ChainAddress , denomAmount : DenomAmount , srcChainName : string , forwardOpts ?: { retries ?: number ; timeout ?: | ` ${ number } s ` | ` ${ number } m ` | ` ${ number } h ` | ` ${ number } ms ` | ` ${ number } us ` | ` ${ number } ns ` ; } ) : TransferRoute ; registerAsset ( denom : string , detail : DenomDetail ) : void ; registerChain ( name : string , chainInfo : Readonly < { bech32Prefix ?: string ; chainId : string ; connections ?: Record < string , IBCConnectionInfo > ; icqEnabled ?: boolean ; pfmEnabled ?: boolean ; stakingTokens ?: readonly { denom : string ; } [] ; } > ) : void ; registerConnection ( primaryChainId : string , counterpartyChainId : string , connectionInfo : IBCConnectionInfo ) : void ; } > ; makeOrchestrateKit : ( ( zone : Zone ) => { orchestrate : ( < HC , GF > ( durableName : string , hostCtx : HC , guestFn : GF ) => HostForGuest < GF > ) ; orchestrateAll : ( < HC , GFM > ( guestFns : GFM , hostCtx : HC ) => { [ N in string | number | symbol ] : HostForGuest < GFM [ N ] > } ) ; } ) ; orchestrate : ( < HC , GF > ( durableName : string , hostCtx : HC , guestFn : GF ) => HostForGuest < GF > ) ; orchestrateAll : ( < HC , GFM > ( guestFns : GFM , hostCtx : HC ) => { [ N in string | number | symbol ] : HostForGuest < GFM [ N ] > } ) ; vowTools : VowTools ; zcfTools : HostInterface < ZcfTools > ; zoeTools : { localTransfer : ( ( ... args : [ srcSeat: ZCFSeat , localAccount: LocalAccountMethods , amounts: AmountKeywordRecord ] ) => Vow < void > ) ; withdrawToSeat : ( ( ... args : [ localAccount: LocalAccountMethods , destSeat: ZCFSeat , amounts: AmountKeywordRecord ] ) => Vow < void > ) ; } ; zone : Zone ; } async Flow Tools : { adminAsyncFlow : Guarded < { getFailures ( ) : CopyMap < any , Passable > ; getFlowForOutcomeVow ( outcomeVow : any ) : any ; wakeAll ( ) : void ; } > ; allWokenP : Promise < void > ; asyncFlow : ( < F > ( zone : Zone , tag : string , guestFunc : F , options ??: { startEager ?: boolean ; } ) => HostOf < F > ) ; prepareAsyncFlowKit : ( ( zone : Zone , tag : string , guestAsyncFunc : GuestAsyncFunc , options ??: { startEager ?: boolean ; } ) => ( ( activationArgs : any ) => GuardedKit < { admin : { complete ( ) : void ; panic ( fatalProblem : any ) : never ; reset ( ) : void ; } ; flow : { dump ( ) : ( | [ op: "doFulfill" , vow: Vow < ( ...) > , fulfillment: Passable ] | [ op: "doReject" , vow: Vow < ( ...) > , reason: Passable ] | [ op: "doReturn" , callIndex: number , result: Passable ] | [ op: "doThrow" , callIndex: number , problem: Passable ] | [ op: "checkCall" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSendOnly" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSend" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] ) [] ; getFlowState ( ) : FlowState ; getOptFatalProblem ( ) : any ; getOutcome ( ) : Vow < any > ; restart ( eager ??: boolean ) : void ; wake ( ) : void ; } ; wakeWatcher : { onFulfilled ( _fulfillment : any ) : void ; onRejected ( _fulfillment : any ) : void ; } ; } > ) ) ; prepareEndowment : ( ( zone : Zone , tag : string , e : unknown ) => any ) ; } admin Async Flow : Guarded < { getFailures ( ) : CopyMap < any , Passable > ; getFlowForOutcomeVow ( outcomeVow : any ) : any ; wakeAll ( ) : void ; } > all WokenP : Promise < void > async Flow : ( < F > ( zone : Zone , tag : string , guestFunc : F , options ??: { startEager ?: boolean ; } ) => HostOf < F > ) < F > ( zone , tag , guestFunc , options ? ) : HostOf < F > Parameters zone : Zone tag : string guestFunc : F Optional
options : { startEager ?: boolean ; } = undefined Optional
start Eager ?: boolean prepare Async Flow Kit : ( ( zone : Zone , tag : string , guestAsyncFunc : GuestAsyncFunc , options ??: { startEager ?: boolean ; } ) => ( ( activationArgs : any ) => GuardedKit < { admin : { complete ( ) : void ; panic ( fatalProblem : any ) : never ; reset ( ) : void ; } ; flow : { dump ( ) : ( | [ op: "doFulfill" , vow: Vow < ( ...) > , fulfillment: Passable ] | [ op: "doReject" , vow: Vow < ( ...) > , reason: Passable ] | [ op: "doReturn" , callIndex: number , result: Passable ] | [ op: "doThrow" , callIndex: number , problem: Passable ] | [ op: "checkCall" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSendOnly" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSend" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] ) [] ; getFlowState ( ) : FlowState ; getOptFatalProblem ( ) : any ; getOutcome ( ) : Vow < any > ; restart ( eager ??: boolean ) : void ; wake ( ) : void ; } ; wakeWatcher : { onFulfilled ( _fulfillment : any ) : void ; onRejected ( _fulfillment : any ) : void ; } ; } > ) ) ( zone , tag , guestAsyncFunc , options ? ) : ( ( activationArgs : any ) => GuardedKit < { admin : { complete ( ) : void ; panic ( fatalProblem : any ) : never ; reset ( ) : void ; } ; flow : { dump ( ) : ( | [ op: "doFulfill" , vow: Vow < ( ...) > , fulfillment: Passable ] | [ op: "doReject" , vow: Vow < ( ...) > , reason: Passable ] | [ op: "doReturn" , callIndex: number , result: Passable ] | [ op: "doThrow" , callIndex: number , problem: Passable ] | [ op: "checkCall" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSendOnly" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSend" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] ) [] ; getFlowState ( ) : FlowState ; getOptFatalProblem ( ) : any ; getOutcome ( ) : Vow < any > ; restart ( eager ??: boolean ) : void ; wake ( ) : void ; } ; wakeWatcher : { onFulfilled ( _fulfillment : any ) : void ; onRejected ( _fulfillment : any ) : void ; } ; } > ) Parameters zone : Zone tag : string guestAsyncFunc : GuestAsyncFunc Optional
options : { startEager ?: boolean ; } = {} Optional
start Eager ?: boolean Returns ( ( activationArgs : any ) => GuardedKit < { admin : { complete ( ) : void ; panic ( fatalProblem : any ) : never ; reset ( ) : void ; } ; flow : { dump ( ) : ( | [ op: "doFulfill" , vow: Vow < ( ...) > , fulfillment: Passable ] | [ op: "doReject" , vow: Vow < ( ...) > , reason: Passable ] | [ op: "doReturn" , callIndex: number , result: Passable ] | [ op: "doThrow" , callIndex: number , problem: Passable ] | [ op: "checkCall" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSendOnly" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSend" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] ) [] ; getFlowState ( ) : FlowState ; getOptFatalProblem ( ) : any ; getOutcome ( ) : Vow < any > ; restart ( eager ??: boolean ) : void ; wake ( ) : void ; } ; wakeWatcher : { onFulfilled ( _fulfillment : any ) : void ; onRejected ( _fulfillment : any ) : void ; } ; } > ) ( activationArgs ) : GuardedKit < { admin : { complete ( ) : void ; panic ( fatalProblem : any ) : never ; reset ( ) : void ; } ; flow : { dump ( ) : ( | [ op: "doFulfill" , vow: Vow < ( ...) > , fulfillment: Passable ] | [ op: "doReject" , vow: Vow < ( ...) > , reason: Passable ] | [ op: "doReturn" , callIndex: number , result: Passable ] | [ op: "doThrow" , callIndex: number , problem: Passable ] | [ op: "checkCall" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSendOnly" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSend" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] ) [] ; getFlowState ( ) : FlowState ; getOptFatalProblem ( ) : any ; getOutcome ( ) : Vow < any > ; restart ( eager ??: boolean ) : void ; wake ( ) : void ; } ; wakeWatcher : { onFulfilled ( _fulfillment : any ) : void ; onRejected ( _fulfillment : any ) : void ; } ; } > Returns GuardedKit < { admin : { complete ( ) : void ; panic ( fatalProblem : any ) : never ; reset ( ) : void ; } ; flow : { dump ( ) : ( | [ op: "doFulfill" , vow: Vow < ( ...) > , fulfillment: Passable ] | [ op: "doReject" , vow: Vow < ( ...) > , reason: Passable ] | [ op: "doReturn" , callIndex: number , result: Passable ] | [ op: "doThrow" , callIndex: number , problem: Passable ] | [ op: "checkCall" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSendOnly" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] | [ op: "checkSend" , target: Passable , optVerb: ( ...) | ( ...) , args: ( ...) [] , callIndex: number ] ) [] ; getFlowState ( ) : FlowState ; getOptFatalProblem ( ) : any ; getOutcome ( ) : Vow < any > ; restart ( eager ??: boolean ) : void ; wake ( ) : void ; } ; wakeWatcher : { onFulfilled ( _fulfillment : any ) : void ; onRejected ( _fulfillment : any ) : void ; } ; } > prepare Endowment : ( ( zone : Zone , tag : string , e : unknown ) => any ) ( zone , tag , e ) : any Parameters zone : Zone tag : string e : unknown Returns any chain Hub : Guarded < { getAsset ( denom : string , srcChainName : string ) : undefined | DenomDetail ; getChainInfo < K > ( chainName : K ) : Vow < ActualChainInfo < K > > ; getChainsAndConnection < C1 , C2 > ( primaryName : C1 , counterName : C2 ) : Vow < [ ActualChainInfo < C1 > , ActualChainInfo < C2 > , IBCConnectionInfo ] > ; getConnectionInfo ( primary : string | { chainId : string ; } , counter : string | { chainId : string ; } ) : Vow < IBCConnectionInfo > ; getDenom ( brand : Brand ) : undefined | string ; makeChainAddress ( address : string ) : ChainAddress ; makeTransferRoute ( destination : ChainAddress , denomAmount : DenomAmount , srcChainName : string , forwardOpts ?: { retries ?: number ; timeout ?: | ` ${ number } s ` | ` ${ number } m ` | ` ${ number } h ` | ` ${ number } ms ` | ` ${ number } us ` | ` ${ number } ns ` ; } ) : TransferRoute ; registerAsset ( denom : string , detail : DenomDetail ) : void ; registerChain ( name : string , chainInfo : Readonly < { bech32Prefix ?: string ; chainId : string ; connections ?: Record < string , IBCConnectionInfo > ; icqEnabled ?: boolean ; pfmEnabled ?: boolean ; stakingTokens ?: readonly { denom : string ; } [] ; } > ) : void ; registerConnection ( primaryChainId : string , counterpartyChainId : string , connectionInfo : IBCConnectionInfo ) : void ; } > make Orchestrate Kit : ( ( zone : Zone ) => { orchestrate : ( < HC , GF > ( durableName : string , hostCtx : HC , guestFn : GF ) => HostForGuest < GF > ) ; orchestrateAll : ( < HC , GFM > ( guestFns : GFM , hostCtx : HC ) => { [ N in string | number | symbol ] : HostForGuest < GFM [ N ] > } ) ; } ) ( zone ) : { orchestrate : ( < HC , GF > ( durableName : string , hostCtx : HC , guestFn : GF ) => HostForGuest < GF > ) ; orchestrateAll : ( < HC , GFM > ( guestFns : GFM , hostCtx : HC ) => { [ N in string | number | symbol ] : HostForGuest < GFM [ N ] > } ) ; } Returns { orchestrate : ( < HC , GF > ( durableName : string , hostCtx : HC , guestFn : GF ) => HostForGuest < GF > ) ; orchestrateAll : ( < HC , GFM > ( guestFns : GFM , hostCtx : HC ) => { [ N in string | number | symbol ] : HostForGuest < GFM [ N ] > } ) ; } orchestrate : ( < HC , GF > ( durableName : string , hostCtx : HC , guestFn : GF ) => HostForGuest < GF > ) < HC , GF > ( durableName , hostCtx , guestFn ) : HostForGuest < GF > Parameters durableName : string hostCtx : HC guestFn : GF Returns HostForGuest < GF > orchestrate All : ( < HC , GFM > ( guestFns : GFM , hostCtx : HC ) => { [ N in string | number | symbol ] : HostForGuest < GFM [ N ] > } ) < HC , GFM > ( guestFns , hostCtx ) : { [ N in string | number | symbol ] : HostForGuest < GFM [ N ] > } Returns { [ N in string | number | symbol ] : HostForGuest < GFM [ N ] > } orchestrate : ( < HC , GF > ( durableName : string , hostCtx : HC , guestFn : GF ) => HostForGuest < GF > ) < HC , GF > ( durableName , hostCtx , guestFn ) : HostForGuest < GF > Parameters durableName : string hostCtx : HC guestFn : GF Returns HostForGuest < GF > orchestrate All : ( < HC , GFM > ( guestFns : GFM , hostCtx : HC ) => { [ N in string | number | symbol ] : HostForGuest < GFM [ N ] > } ) < HC , GFM > ( guestFns , hostCtx ) : { [ N in string | number | symbol ] : HostForGuest < GFM [ N ] > } Returns { [ N in string | number | symbol ] : HostForGuest < GFM [ N ] > } vow Tools : VowTools ( ... args ) : Vow < void > Returns Vow < void > ( ... args ) : Vow < void > Returns Vow < void >
Helper that a contract start function can use to set up the objects needed for orchestration.
TODO strip problematic operations from ZCF (e.g., getPayouts)