From 604190ca7ff553a5d09c228d6b834fbc5653966c Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Mon, 29 Jul 2024 14:30:14 -0500 Subject: [PATCH 1/4] feat: getVBankAssetInfo() on orc.getChain('agoric') --- .../src/exos/local-chain-facade.js | 57 +++++++++++++++++-- .../orchestration/src/orchestration-api.ts | 6 +- packages/orchestration/src/typeGuards.js | 6 +- packages/orchestration/src/types.ts | 1 + .../orchestration/src/utils/start-helper.js | 1 + 5 files changed, 64 insertions(+), 7 deletions(-) diff --git a/packages/orchestration/src/exos/local-chain-facade.js b/packages/orchestration/src/exos/local-chain-facade.js index 3677024c507..766afb110d9 100644 --- a/packages/orchestration/src/exos/local-chain-facade.js +++ b/packages/orchestration/src/exos/local-chain-facade.js @@ -6,24 +6,36 @@ import { M } from '@endo/patterns'; import { pickFacet } from '@agoric/vat-data'; import { VowShape } from '@agoric/vow'; -import { ChainFacadeI } from '../typeGuards.js'; +import { chainFacadeMethods } from '../typeGuards.js'; /** + * @import {HostOf} from '@agoric/async-flow'; * @import {Zone} from '@agoric/base-zone'; * @import {TimerService} from '@agoric/time'; * @import {Remote} from '@agoric/internal'; * @import {LocalChain, LocalChainAccount} from '@agoric/vats/src/localchain.js'; + * @import {AssetInfo} from '@agoric/vats/src/vat-bank.js'; + * @import {NameHub} from '@agoric/vats'; * @import {Vow, VowTools} from '@agoric/vow'; * @import {CosmosInterchainService} from './cosmos-interchain-service.js'; * @import {LocalOrchestrationAccountKit, MakeLocalOrchestrationAccountKit} from './local-orchestration-account.js'; * @import {ChainAddress, ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount} from '../types.js'; */ +/** + * @typedef {object} AgoricChainMethods + * @property {() => Promise} getVBankAssetInfo Get asset info from + * agoricNames.vbankAsset. + * + * Caches the query to agoricNames in the first call. + */ + /** * @typedef {{ * makeLocalOrchestrationAccountKit: MakeLocalOrchestrationAccountKit; * orchestration: Remote; * storageNode: Remote; + * agoricNames: Remote; * timer: Remote; * localchain: Remote; * vowTools: VowTools; @@ -38,17 +50,26 @@ const prepareLocalChainFacadeKit = ( zone, { makeLocalOrchestrationAccountKit, + agoricNames, localchain, // TODO vstorage design https://github.com/Agoric/agoric-sdk/issues/9066 // consider making an `accounts` childNode storageNode, - vowTools: { allVows, watch }, + vowTools: { allVows, watch, asVow }, }, ) => zone.exoClassKit( 'LocalChainFacade', { - public: ChainFacadeI, + public: M.interface('LocalChainFacade', { + ...chainFacadeMethods, + getVBankAssetInfo: M.call().optional(M.boolean()).returns(VowShape), + }), + vbankAssetValuesWatcher: M.interface('vbankAssetValuesWatcher', { + onFulfilled: M.call(M.arrayOf(M.record())) + .optional(M.arrayOf(M.undefined())) // empty context + .returns(VowShape), + }), makeAccountWatcher: M.interface('makeAccountWatcher', { onFulfilled: M.call([M.remotable('LCA Account'), M.string()]) .optional(M.arrayOf(M.undefined())) // empty context @@ -64,7 +85,10 @@ const prepareLocalChainFacadeKit = ( * @param {CosmosChainInfo} localChainInfo */ localChainInfo => { - return { localChainInfo }; + return { + localChainInfo, + vbankAssets: /** @type {AssetInfo[] | undefined} */ (undefined), + }; }, { public: { @@ -83,6 +107,31 @@ const prepareLocalChainFacadeKit = ( this.facets.makeAccountWatcher, ); }, + /** @type {HostOf} */ + getVBankAssetInfo() { + return asVow(() => { + const { vbankAssets } = this.state; + if (vbankAssets) { + return vbankAssets; + } + const vbankAssetNameHubP = E(agoricNames).lookup('vbankAsset'); + const vbankAssetValuesP = E(vbankAssetNameHubP).values(); + const { vbankAssetValuesWatcher } = this.facets; + return watch(vbankAssetValuesP, vbankAssetValuesWatcher); + }); + }, + }, + vbankAssetValuesWatcher: { + /** + * @param {AssetInfo[]} assets + */ + onFulfilled(assets) { + const { state } = this; + return asVow(() => { + state.vbankAssets = assets; + return assets; + }); + }, }, makeAccountWatcher: { /** diff --git a/packages/orchestration/src/orchestration-api.ts b/packages/orchestration/src/orchestration-api.ts index ee2201f63af..6f337d98a90 100644 --- a/packages/orchestration/src/orchestration-api.ts +++ b/packages/orchestration/src/orchestration-api.ts @@ -11,6 +11,7 @@ import type { LocalChainAccount } from '@agoric/vats/src/localchain.js'; import type { ResolvedPublicTopic } from '@agoric/zoe/src/contractSupport/topics.js'; import type { Passable } from '@endo/marshal'; import type { + AgoricChainMethods, ChainInfo, CosmosChainAccountMethods, CosmosChainInfo, @@ -96,7 +97,10 @@ export interface Chain { export interface Orchestrator { getChain: ( chainName: C, - ) => Promise>; + ) => Promise< + Chain & + (C extends 'agoric' ? AgoricChainMethods : {}) + >; makeLocalAccount: () => Promise; /** diff --git a/packages/orchestration/src/typeGuards.js b/packages/orchestration/src/typeGuards.js index bc0760a9b16..8a1164bcc73 100644 --- a/packages/orchestration/src/typeGuards.js +++ b/packages/orchestration/src/typeGuards.js @@ -117,12 +117,14 @@ export const DenomAmountShape = { denom: DenomShape, value: M.bigint() }; export const AmountArgShape = M.or(AmountShape, DenomAmountShape); -/** @see {Chain} */ -export const ChainFacadeI = M.interface('ChainFacade', { +export const chainFacadeMethods = harden({ getChainInfo: M.call().returns(VowShape), makeAccount: M.call().returns(VowShape), }); +/** @see {Chain} */ +export const ChainFacadeI = M.interface('ChainFacade', chainFacadeMethods); + /** * for google/protobuf/timestamp.proto, not to be confused with TimestampShape * from `@agoric/time` diff --git a/packages/orchestration/src/types.ts b/packages/orchestration/src/types.ts index b86d499442f..ef70cc8595a 100644 --- a/packages/orchestration/src/types.ts +++ b/packages/orchestration/src/types.ts @@ -4,6 +4,7 @@ export type * from './chain-info.js'; export type * from './cosmos-api.js'; export type * from './ethereum-api.js'; export type * from './exos/ica-account-kit.js'; +export type * from './exos/local-chain-facade.js'; export type * from './exos/icq-connection-kit.js'; export type * from './orchestration-api.js'; export type * from './exos/cosmos-interchain-service.js'; diff --git a/packages/orchestration/src/utils/start-helper.js b/packages/orchestration/src/utils/start-helper.js index ce14a1844b7..1bb57f1f87f 100644 --- a/packages/orchestration/src/utils/start-helper.js +++ b/packages/orchestration/src/utils/start-helper.js @@ -112,6 +112,7 @@ export const provideOrchestration = ( localchain: remotePowers.localchain, // FIXME what path? storageNode: remotePowers.storageNode, + agoricNames, orchestration: remotePowers.orchestrationService, timer: remotePowers.timerService, vowTools, From 1e726b22de5778af1bd62bda9098c5f931be9608 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Mon, 29 Jul 2024 18:18:17 -0500 Subject: [PATCH 2/4] chore: prune unused makeResumableAgoricNamesHack --- .../src/exos/agoric-names-tools.js | 109 ------------------ .../test/exos/agoric-names-tools.test.ts | 68 ----------- 2 files changed, 177 deletions(-) delete mode 100644 packages/orchestration/src/exos/agoric-names-tools.js delete mode 100644 packages/orchestration/test/exos/agoric-names-tools.test.ts diff --git a/packages/orchestration/src/exos/agoric-names-tools.js b/packages/orchestration/src/exos/agoric-names-tools.js deleted file mode 100644 index b6280b77180..00000000000 --- a/packages/orchestration/src/exos/agoric-names-tools.js +++ /dev/null @@ -1,109 +0,0 @@ -import { VowShape } from '@agoric/vow'; -import { E } from '@endo/far'; -import { M, makeCopyMap } from '@endo/patterns'; -import { BrandShape } from '@agoric/ertp'; - -const { Fail } = assert; - -/** - * @import {NameHub} from '@agoric/vats'; - * @import {AssetInfo} from '@agoric/vats/src/vat-bank.js'; - * @import {Remote} from '@agoric/internal'; - * @import {Vow, VowTools} from '@agoric/vow'; - * @import {Zone} from '@agoric/zone'; - */ - -/** - * Perform remote calls to agoricNames in membrane-friendly way. This is an - * interim approach until https://github.com/Agoric/agoric-sdk/issues/9541, - * https://github.com/Agoric/agoric-sdk/pull/9322, or - * https://github.com/Agoric/agoric-sdk/pull/9519. - * - * XXX only works once per zone. - * - * XXX consider exposing `has`, `entries`, `keys`, `values` from `NameHub` - * - * @param {Zone} zone - * @param {{ agoricNames: Remote; vowTools: VowTools }} powers - */ -export const makeResumableAgoricNamesHack = ( - zone, - { agoricNames, vowTools: { watch, asVow } }, -) => { - const makeResumableAgoricNamesHackKit = zone.exoClassKit( - 'ResumableAgoricNamesHack', - { - public: M.interface('ResumableAgoricNamesHackI', { - lookup: M.call().rest(M.arrayOf(M.string())).returns(VowShape), - findBrandInVBank: M.call(BrandShape) - .optional(M.boolean()) - .returns(VowShape), - }), - vbankAssetEntriesWatcher: M.interface('vbankAssetEntriesWatcher', { - onFulfilled: M.call(M.arrayOf(M.record())) - .optional(BrandShape) - .returns(VowShape), - }), - }, - () => ({ - vbankAssetsByBrand: zone.mapStore('vbankAssetsByBrand', { - keyShape: BrandShape, - valueShape: M.any(), - }), - }), - { - vbankAssetEntriesWatcher: { - /** - * @param {AssetInfo[]} assets - * @param {Brand<'nat'>} brand - */ - onFulfilled(assets, brand) { - return asVow(() => { - const { vbankAssetsByBrand } = this.state; - vbankAssetsByBrand.addAll( - makeCopyMap(assets.map(a => [a.brand, a])), - ); - vbankAssetsByBrand.has(brand) || - Fail`brand ${brand} not in agoricNames.vbankAsset`; - return vbankAssetsByBrand.get(brand); - }); - }, - }, - public: { - /** @param {...string} args */ - lookup(...args) { - return watch(E(agoricNames).lookup(...args)); - }, - /** - * Look up asset info, like denom, in agoricNames.vbankAsset using a - * Brand. - * - * Caches the query to agoricNames in the first call. Subsequent lookups - * are via cache unless a refetch is specified or a brand is not found. - * - * @param {Brand<'nat'>} brand - * @param {boolean} [refetch] if true, will invalidate the cache - * @returns {Vow} - */ - findBrandInVBank(brand, refetch) { - return asVow(() => { - const { vbankAssetsByBrand } = this.state; - if (vbankAssetsByBrand.has(brand) && !refetch) { - return vbankAssetsByBrand.get(brand); - } - const vbankAssetNameHubP = E(agoricNames).lookup('vbankAsset'); - const vbankAssetEntriesP = E(vbankAssetNameHubP).values(); - return watch( - vbankAssetEntriesP, - this.facets.vbankAssetEntriesWatcher, - brand, - ); - }); - }, - }, - }, - ); - // XXX only works once per zone. - return makeResumableAgoricNamesHackKit().public; -}; -/** @typedef {ReturnType} AgNamesTools */ diff --git a/packages/orchestration/test/exos/agoric-names-tools.test.ts b/packages/orchestration/test/exos/agoric-names-tools.test.ts deleted file mode 100644 index 924a72591a7..00000000000 --- a/packages/orchestration/test/exos/agoric-names-tools.test.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; - -import { heapVowE as E } from '@agoric/vow/vat.js'; -import { makeHeapZone } from '@agoric/zone'; -import { withAmountUtils } from '@agoric/zoe/tools/test-utils.js'; -import { makeIssuerKit } from '@agoric/ertp'; -import { AssetInfo } from '@agoric/vats/src/vat-bank.js'; -import { makeResumableAgoricNamesHack } from '../../src/exos/agoric-names-tools.js'; -import { commonSetup } from '../supports.js'; - -test('agoric names tools', async t => { - const { - bootstrap: { agoricNames, agoricNamesAdmin, bankManager, vowTools }, - brands: { ist }, - } = await commonSetup(t); - - const zone = makeHeapZone(); - const agNamesTools = makeResumableAgoricNamesHack(zone, { - agoricNames, - vowTools, - }); - - const chainEntry = await E.when(agNamesTools.lookup('chain', 'celestia')); - t.like(chainEntry, { chainId: 'celestia' }); - - const istDenom = await E.when(agNamesTools.findBrandInVBank(ist.brand)); - t.like(istDenom, { denom: 'uist' }); - - const moolah = withAmountUtils(makeIssuerKit('MOO')); - - await t.throwsAsync(E.when(agNamesTools.findBrandInVBank(moolah.brand)), { - message: /brand(.*?)not in agoricNames.vbankAsset/, - }); - - const mooToken: AssetInfo = { - brand: moolah.brand, - issuer: moolah.issuer, - issuerName: 'MOO', - denom: 'umoo', - proposedName: 'MOO', - displayInfo: { decimalPlaces: 6, assetKind: 'nat' }, - }; - - await E(E(agoricNamesAdmin).lookupAdmin('vbankAsset')).update( - 'umoo', - harden(mooToken), - ); - t.like( - await E.when(agNamesTools.findBrandInVBank(moolah.brand)), - { denom: 'umoo' }, - 'vbankAssets are refetched if brand is not found', - ); - - await E(E(agoricNamesAdmin).lookupAdmin('vbankAsset')).update( - 'umoo', - harden({ ...mooToken, denom: 'umoo2' }), - ); - t.like( - await E.when(agNamesTools.findBrandInVBank(moolah.brand)), - { denom: 'umoo' }, - 'old AssetInfo is cached', - ); - t.like( - await E.when(agNamesTools.findBrandInVBank(moolah.brand, true)), - { denom: 'umoo2' }, - 'new AssetInfo is fetched when refetch=true', - ); -}); From 4a2faca1310014265caee8769bac00bb1b218607 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Mon, 29 Jul 2024 18:23:05 -0500 Subject: [PATCH 3/4] chore(sendAnywhere): use agoric.getVBankAssetInfo() --- .../src/examples/sendAnywhere.contract.js | 20 +------------- .../src/examples/sendAnywhere.flows.js | 12 +++++--- .../snapshots/sendAnywhere.test.ts.md | 26 ++++++++---------- .../snapshots/sendAnywhere.test.ts.snap | Bin 992 -> 939 bytes 4 files changed, 20 insertions(+), 38 deletions(-) diff --git a/packages/orchestration/src/examples/sendAnywhere.contract.js b/packages/orchestration/src/examples/sendAnywhere.contract.js index cbe1e573e74..53e420d176b 100644 --- a/packages/orchestration/src/examples/sendAnywhere.contract.js +++ b/packages/orchestration/src/examples/sendAnywhere.contract.js @@ -1,8 +1,6 @@ import { makeStateRecord } from '@agoric/async-flow'; import { AmountShape } from '@agoric/ertp'; import { InvitationShape } from '@agoric/zoe/src/typeGuards.js'; -import { Fail } from '@endo/errors'; -import { E } from '@endo/far'; import { M } from '@endo/patterns'; import { withOrchestration } from '../utils/start-helper.js'; import * as flows from './sendAnywhere.flows.js'; @@ -50,7 +48,7 @@ const contract = async ( zcf, privateArgs, zone, - { chainHub, orchestrateAll, vowTools, zoeTools }, + { chainHub, orchestrateAll, zoeTools }, ) => { const contractState = makeStateRecord( /** @type {{ account: OrchestrationAccount | undefined }} */ { @@ -60,27 +58,11 @@ const contract = async ( const creatorFacet = prepareChainHubAdmin(zone, chainHub); - // TODO should be a provided helper - /** @type {(brand: Brand) => Vow} */ - const findBrandInVBank = vowTools.retriable( - zone, - 'findBrandInVBank', - /** @param {Brand} brand */ - async brand => { - const { agoricNames } = privateArgs; - const assets = await E(E(agoricNames).lookup('vbankAsset')).values(); - const it = assets.find(a => a.brand === brand); - it || Fail`brand ${brand} not in agoricNames.vbankAsset`; - return it; - }, - ); - // orchestrate uses the names on orchestrationFns to do a "prepare" of the associated behavior const orchFns = orchestrateAll(flows, { zcf, contractState, localTransfer: zoeTools.localTransfer, - findBrandInVBank, }); const publicFacet = zone.exo( diff --git a/packages/orchestration/src/examples/sendAnywhere.flows.js b/packages/orchestration/src/examples/sendAnywhere.flows.js index 1c9e987ef2f..626196187b8 100644 --- a/packages/orchestration/src/examples/sendAnywhere.flows.js +++ b/packages/orchestration/src/examples/sendAnywhere.flows.js @@ -1,8 +1,8 @@ +import { NonNullish } from '@agoric/internal'; import { M, mustMatch } from '@endo/patterns'; /** * @import {GuestOf} from '@agoric/async-flow'; - * @import {VBankAssetDetail} from '@agoric/vats/tools/board-utils.js'; * @import {ZoeTools} from '../utils/zoe-tools.js'; * @import {Orchestrator, LocalAccountMethods, OrchestrationAccountI, OrchestrationFlow} from '../types.js'; */ @@ -18,13 +18,12 @@ const { entries } = Object; * @param {object} ctx * @param {{ localAccount?: OrchestrationAccountI & LocalAccountMethods }} ctx.contractState * @param {GuestOf} ctx.localTransfer - * @param {(brand: Brand) => Promise} ctx.findBrandInVBank * @param {ZCFSeat} seat * @param {{ chainName: string; destAddr: string }} offerArgs */ export async function sendIt( orch, - { contractState, localTransfer, findBrandInVBank }, + { contractState, localTransfer }, seat, offerArgs, ) { @@ -33,7 +32,12 @@ export async function sendIt( // NOTE the proposal shape ensures that the `give` is a single asset const { give } = seat.getProposal(); const [[_kw, amt]] = entries(give); - const { denom } = await findBrandInVBank(amt.brand); + const agoric = await orch.getChain('agoric'); + const assets = await agoric.getVBankAssetInfo(); + const { denom } = NonNullish( + assets.find(a => a.brand === amt.brand), + `${amt.brand} not registered in vbank`, + ); const chain = await orch.getChain(chainName); if (!contractState.localAccount) { diff --git a/packages/orchestration/test/examples/snapshots/sendAnywhere.test.ts.md b/packages/orchestration/test/examples/snapshots/sendAnywhere.test.ts.md index 83ab5db513c..80bf079345b 100644 --- a/packages/orchestration/test/examples/snapshots/sendAnywhere.test.ts.md +++ b/packages/orchestration/test/examples/snapshots/sendAnywhere.test.ts.md @@ -29,21 +29,6 @@ Generated by [AVA](https://avajs.dev). 'ChainHub Admin_singleton': 'Alleged: ChainHub Admin', 'Send PF_kindHandle': 'Alleged: kind', 'Send PF_singleton': 'Alleged: Send PF', - orchestration: { - sendIt: { - asyncFlow_kindHandle: 'Alleged: kind', - endowments: { - 0: { - contractState_kindHandle: 'Alleged: kind', - contractState_singleton: 'Alleged: contractState', - findBrandInVBank_kindHandle: 'Alleged: kind', - findBrandInVBank_singleton: 'Alleged: findBrandInVBank', - localTransfer_kindHandle: 'Alleged: kind', - localTransfer_singleton: 'Alleged: localTransfer', - }, - }, - }, - }, }, orchestration: { 'Cosmos Orchestration Account Holder_kindHandle': 'Alleged: kind', @@ -52,6 +37,17 @@ Generated by [AVA](https://avajs.dev). Orchestrator_kindHandle: 'Alleged: kind', RemoteChainFacade_kindHandle: 'Alleged: kind', chainName: {}, + sendIt: { + asyncFlow_kindHandle: 'Alleged: kind', + endowments: { + 1: { + contractState_kindHandle: 'Alleged: kind', + contractState_singleton: 'Alleged: contractState', + localTransfer_kindHandle: 'Alleged: kind', + localTransfer_singleton: 'Alleged: localTransfer', + }, + }, + }, }, vows: { PromiseWatcher_kindHandle: 'Alleged: kind', diff --git a/packages/orchestration/test/examples/snapshots/sendAnywhere.test.ts.snap b/packages/orchestration/test/examples/snapshots/sendAnywhere.test.ts.snap index 13dce657d6c70c530e2c778e2c955b5da48ed40c..a0ccc4cb4cb8f7b1a1daf8e71b44347b8c566a4f 100644 GIT binary patch literal 939 zcmV;c162G$RzVy6S@MWC@d|Tx)o_Ey$ zyy-JEZXb&X00000000A>R!wi*L>PX?AG_;qHyUHIxglWdm2v%3y(-vPdK zfZrY9vI{(Pfp1*kPZxOI18#YM@PN-eE1^y~p)KP7-~qpSK*tAmeBcw`k~C~d>w6#g z#Rsl7fR7r$w+-O$25_wjY&0!-)0TU26L{1FzHS14+4Qp(y^MA$^>D^I%M0CjoQQ6I zDs@ZYyd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zgODHRF2eOE>`&-$TB4R&qPt2C!-(Cb+V2<7_vHgQ-V&NAL3#8F`MsF<-Pa+H&OtpM z`F2Yw`iNNR+v4J4ZXJ}*To$&uc}g#=oB)^7|Da?a6mG37J2#|WpOG^_v%|Zg2sRWI!In7K zpkh$C1#$wpNY-Y26Kf`fPsYt>ii)UPyct)s>@yOQ0WwZIj6YmYv*aEBu6wkrnerk{ OmHr>I_-|*^3jhG2kkaA+ From a06ffde19c2424f7968c840e6c3678e7701a1182 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 31 Jul 2024 13:19:55 -0500 Subject: [PATCH 4/4] test(sendAnywhere): regen snapshot --- .../snapshots/sendAnywhere.test.ts.md | 24 ++++++++++-------- .../snapshots/sendAnywhere.test.ts.snap | Bin 939 -> 957 bytes 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/orchestration/test/examples/snapshots/sendAnywhere.test.ts.md b/packages/orchestration/test/examples/snapshots/sendAnywhere.test.ts.md index 80bf079345b..96a80b9caa8 100644 --- a/packages/orchestration/test/examples/snapshots/sendAnywhere.test.ts.md +++ b/packages/orchestration/test/examples/snapshots/sendAnywhere.test.ts.md @@ -29,6 +29,19 @@ Generated by [AVA](https://avajs.dev). 'ChainHub Admin_singleton': 'Alleged: ChainHub Admin', 'Send PF_kindHandle': 'Alleged: kind', 'Send PF_singleton': 'Alleged: Send PF', + orchestration: { + sendIt: { + asyncFlow_kindHandle: 'Alleged: kind', + endowments: { + 0: { + contractState_kindHandle: 'Alleged: kind', + contractState_singleton: 'Alleged: contractState', + localTransfer_kindHandle: 'Alleged: kind', + localTransfer_singleton: 'Alleged: localTransfer', + }, + }, + }, + }, }, orchestration: { 'Cosmos Orchestration Account Holder_kindHandle': 'Alleged: kind', @@ -37,17 +50,6 @@ Generated by [AVA](https://avajs.dev). Orchestrator_kindHandle: 'Alleged: kind', RemoteChainFacade_kindHandle: 'Alleged: kind', chainName: {}, - sendIt: { - asyncFlow_kindHandle: 'Alleged: kind', - endowments: { - 1: { - contractState_kindHandle: 'Alleged: kind', - contractState_singleton: 'Alleged: contractState', - localTransfer_kindHandle: 'Alleged: kind', - localTransfer_singleton: 'Alleged: localTransfer', - }, - }, - }, }, vows: { PromiseWatcher_kindHandle: 'Alleged: kind', diff --git a/packages/orchestration/test/examples/snapshots/sendAnywhere.test.ts.snap b/packages/orchestration/test/examples/snapshots/sendAnywhere.test.ts.snap index a0ccc4cb4cb8f7b1a1daf8e71b44347b8c566a4f..19f55894a6e3711a0547a07b79c4b5d39b8b0a2c 100644 GIT binary patch literal 957 zcmV;u148^kRzV`!yk(X00000000A>R!xf>MHqgnzk8CI-N|lTlWe39dNB|LFCiz#=(r&pcg?yR z0z#36Imj(ZUpzKM+Um!9)JG0%@?6RFcHT^!% z^M2G@@7q7__Yx5f)2GjwidDk;J=*WnK8sUM$LT<*^y%{`qKZCf{A0q!^dTPcx&Sr- zJOl6>fWH9z2jD6J-X*{aaoWV$>OEqiB4qKpyu1w31aU!@utJPgVuILh^2P_5q`ia% z+gUG((?M`2Ru6|Uk2WZe5;li5J4wR&EV>y?ZJNf)Jr)WXF?j}Ji;xWh%*{ScpYX7o zh)Hhxu3+*)!Ih+;$}I;4OH;^jz)~ftiUrTjzHw}}J{OZT|9YeF)%;ShX#vmg8Ng=- z@Ph&TX#iJE;Gqe;Fo8o8c*_FrSOB+xZ!E2#M!BFKab8-$fdw>eVAlq|wt-)5jppby z_s|CZwt@E?;F$yb?f@+p*mgDQIh|?^UEr|`{Ne)t>hPupFI!ucemJL{<)uzEig{;# zDs@}ob&a0Jyq_>7_#CjdV3(1a&g%Q|G|E`;x)H2*GoBN7`9#w3_)J|{Qn*r8sHAau zAy5J9mt#}(ca)H|p zGRbBTR)p*)V$v0ID^sBuvAxP^`B@(2T{@nBxwr^z!szfW9p@#;JI>bgyfvUP-^hBi zj;P&n8vT@xDDE-wl~-YUynSDwOB_K;^ fk0oEM&jSmN{)_{y6S@MWC@d|Tx)o_Ey$ zyy-JEZX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