Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding withOrchestration API page (WIP) #1144

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions main/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,12 @@ export default defineConfig({
{
text: 'Orchestration',
link: '/guides/orchestration/',
items: [
{
text: 'withOrchestration',
link: '/guides/orchestration/withOrchestration',
},
],
},
{
text: 'JavaScript Framework',
Expand Down
9 changes: 9 additions & 0 deletions main/guides/orchestration/withOrchestration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `withOrchestration` API

`withOrchestration` is a higher-order function that enhances a contract function `contractFn`
(usually the `start` function of the contract) with orchestration capabilities. It returns a
new asynchronous function that accepts `zcf` (Zoe Contract Facet), `privateArgs`, and
`baggage`. In its definition, `provideOrchestration` sets up orchestration tools and returns
an object containing `zone` and other tools. The original `contractFn` is then called with
the enhanced arguments: `zcf`, `privateArgs`, `zone`, and the extracted tools. This effectively wraps `contractFn` with additional orchestration capabilities provided by `provideOrchestration`.

Loading