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

build orc docs #9291

Merged
merged 3 commits into from
Apr 29, 2024
Merged
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
2 changes: 1 addition & 1 deletion packages/boot/test/bootstrapTests/test-orchestration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { TestFn } from 'ava';

import { Fail } from '@agoric/assert';
import { AmountMath } from '@agoric/ertp';
import type { start as stakeBldStart } from '@agoric/orchestration/src/contracts/stakeBld.contract.js';
import type { start as stakeBldStart } from '@agoric/orchestration/src/examples/stakeBld.contract.js';
import type { Instance } from '@agoric/zoe/src/zoeService/utils.js';
import { M, matches } from '@endo/patterns';
import { makeWalletFactoryContext } from './walletFactory.ts';
Expand Down
4 changes: 1 addition & 3 deletions packages/builders/scripts/orchestration/init-stakeAtom.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ export const defaultProposalBuilder = async (
{
installKeys: {
stakeAtom: publishRef(
install(
'@agoric/orchestration/src/contracts/stakeAtom.contract.js',
),
install('@agoric/orchestration/src/examples/stakeAtom.contract.js'),
),
},
hostConnectionId,
Expand Down
2 changes: 1 addition & 1 deletion packages/builders/scripts/orchestration/init-stakeBld.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
{
installKeys: {
stakeBld: publishRef(
install('@agoric/orchestration/src/contracts/stakeBld.contract.js'),
install('@agoric/orchestration/src/examples/stakeBld.contract.js'),
),
},
},
Expand Down
3 changes: 2 additions & 1 deletion packages/orchestration/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Orchestration

Build feature-rich applications that can orchestrate assets and services across the interchain.

Interface for Cosmos Interchain Accounts [(ICS-27)](https://github.com/cosmos/ibc/blob/main/spec/app/ics-027-interchain-accounts/README.md).
Usage examples can be found under [src/examples](https://github.com/Agoric/agoric-sdk/tree/master/packages/orchestration/src/examples). They are exported for integration testing with other packages.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { makeDurableZone } from '@agoric/zone/durable.js';
import { V as E } from '@agoric/vat-data/vow.js';
import { M } from '@endo/patterns';
import { prepareRecorderKitMakers } from '@agoric/zoe/src/contractSupport';
import { prepareStakingAccountHolder } from './stakingAccountHolder.js';
import { prepareStakingAccountKit } from '../exos/stakingAccountKit.js';

const trace = makeTracer('StakeAtom');
/**
Expand Down Expand Up @@ -41,7 +41,7 @@ export const start = async (zcf, privateArgs, baggage) => {

const { makeRecorderKit } = prepareRecorderKitMakers(baggage, marshaller);

const makeStakingAccountHolder = prepareStakingAccountHolder(
const makeStakingAccountKit = prepareStakingAccountKit(
baggage,
makeRecorderKit,
zcf,
Expand All @@ -54,7 +54,7 @@ export const start = async (zcf, privateArgs, baggage) => {
);
const accountAddress = await E(account).getAccountAddress();
trace('account address', accountAddress);
const { holder, invitationMakers } = makeStakingAccountHolder(
const { holder, invitationMakers } = makeStakingAccountKit(
account,
storageNode,
accountAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { M } from '@endo/patterns';
import { E } from '@endo/far';
import { prepareRecorderKitMakers } from '@agoric/zoe/src/contractSupport/recorder.js';
import { atomicTransfer } from '@agoric/zoe/src/contractSupport/atomicTransfer.js';
import { prepareAccountHolder } from './localchainAccountHolder.js';
import { prepareLocalchainAccountKit } from '../exos/localchainAccountKit.js';

const trace = makeTracer('StakeBld');

Expand All @@ -35,7 +35,7 @@ export const start = async (zcf, privateArgs, baggage) => {
baggage,
privateArgs.marshaller,
);
const makeAccountHolderKit = prepareAccountHolder(
const makeLocalchainAccountKit = prepareLocalchainAccountKit(
baggage,
makeRecorderKit,
zcf,
Expand All @@ -56,7 +56,7 @@ export const start = async (zcf, privateArgs, baggage) => {
await E(lcaSeatKit.userSeat).tryExit();
trace('awaiting payouts');
const payouts = await E(lcaSeatKit.userSeat).getPayouts();
const { holder, invitationMakers } = makeAccountHolderKit(
const { holder, invitationMakers } = makeLocalchainAccountKit(
account,
privateArgs.storageNode,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const PUBLIC_TOPICS = {
* @param {import('@agoric/zoe/src/contractSupport/recorder.js').MakeRecorderKit} makeRecorderKit
* @param {ZCF} zcf
*/
export const prepareAccountHolder = (baggage, makeRecorderKit, zcf) => {
export const prepareLocalchainAccountKit = (baggage, makeRecorderKit, zcf) => {
const makeAccountHolderKit = prepareExoClassKit(
baggage,
'Account Holder',
Expand Down Expand Up @@ -152,3 +152,4 @@ export const prepareAccountHolder = (baggage, makeRecorderKit, zcf) => {
);
return makeAccountHolderKit;
};
/** @typedef {ReturnType<ReturnType<typeof prepareLocalchainAccountKit>>} LocalchainAccountKit */
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ const PUBLIC_TOPICS = {
* @param {MakeRecorderKit} makeRecorderKit
* @param {ZCF} zcf
*/
export const prepareStakingAccountHolder = (baggage, makeRecorderKit, zcf) => {
const makeAccountHolderKit = prepareExoClassKit(
export const prepareStakingAccountKit = (baggage, makeRecorderKit, zcf) => {
const makeStakingAccountKit = prepareExoClassKit(
baggage,
'Staking Account Holder',
{
Expand Down Expand Up @@ -193,5 +193,6 @@ export const prepareStakingAccountHolder = (baggage, makeRecorderKit, zcf) => {
},
},
);
return makeAccountHolderKit;
return makeStakingAccountKit;
};
/** @typedef {ReturnType<ReturnType<typeof prepareStakingAccountKit>>} StakingAccountKit */
4 changes: 2 additions & 2 deletions packages/orchestration/src/proposals/start-stakeAtom.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { makeTracer } from '@agoric/internal';
import { makeStorageNodeChild } from '@agoric/internal/src/lib-chainStorage.js';
import { E } from '@endo/far';

/** @import { StakeAtomSF, StakeAtomTerms} from '../contracts/stakeAtom.contract' */
/** @import { StakeAtomSF, StakeAtomTerms} from '../examples/stakeAtom.contract' */

const trace = makeTracer('StartStakeAtom', true);

/**
* @param {BootstrapPowers & { installation: {consume: {stakeAtom: Installation<import('../contracts/stakeAtom.contract.js').start>}}}} powers
* @param {BootstrapPowers & { installation: {consume: {stakeAtom: Installation<import('../examples/stakeAtom.contract.js').start>}}}} powers
* @param {{options: StakeAtomTerms }} options
*/
export const startStakeAtom = async (
Expand Down
4 changes: 2 additions & 2 deletions packages/orchestration/src/proposals/start-stakeBld.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { E } from '@endo/far';
const trace = makeTracer('StartStakeBld', true);

/**
* @param {BootstrapPowers & {installation: {consume: {stakeBld: Installation<import('../contracts/stakeBld.contract.js').start>}}}} powers
* @param {BootstrapPowers & {installation: {consume: {stakeBld: Installation<import('../../test/examples/stakeBld.contract.js').start>}}}} powers
*/
export const startStakeBld = async ({
consume: { board, chainStorage, localchain, startUpgradable },
Expand All @@ -29,7 +29,7 @@ export const startStakeBld = async ({
const marshaller = await E(board).getPublishingMarshaller();

// FIXME this isn't detecting missing privateArgs
/** @type {StartUpgradableOpts<import('../contracts/stakeBld.contract.js').start>} */
/** @type {StartUpgradableOpts<import('../../test/examples/stakeBld.contract.js').start>} */
const startOpts = {
label: 'stakeBld',
installation: stakeBld,
Expand Down
4 changes: 3 additions & 1 deletion packages/orchestration/typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"extends": [
"../../typedoc.base.json"
],
"entryPoints": []
"entryPoints": [
"index.js",
]
}
Loading