Skip to content

Commit

Permalink
feat!: export heapVowTools
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Jun 21, 2024
1 parent 944adea commit 1ed02ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 3 additions & 1 deletion packages/vow/test/vat.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
import test from 'ava';
import { E, Far } from '@endo/far';

import { V, makeVowKit } from '../vat.js';
import { V, heapVowTools } from '../vat.js';

const { makeVowKit } = heapVowTools;

test('heap messages', async t => {
const greeter = Far('Greeter', {
Expand Down
7 changes: 3 additions & 4 deletions packages/vow/vat.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export const defaultPowers = harden({
export const prepareVowTools = (zone, powers = {}) =>
rawPrepareVowTools(zone, { ...defaultPowers, ...powers });

export const vowTools = prepareVowTools(makeHeapZone());
export const { watch, when, makeVowKit, allVows } = vowTools;
export const heapVowTools = prepareVowTools(makeHeapZone());

/**
* A vow-shortening E. CAVEAT: This produces long-lived ephemeral
Expand All @@ -36,6 +35,6 @@ export const { watch, when, makeVowKit, allVows } = vowTools;
* you need to `watch` its resulting promises.
*/
export const V = makeE(globalThis.HandledPromise, {
unwrap: when,
additional: { when },
unwrap: heapVowTools.when,
additional: { when: heapVowTools.when },
});

0 comments on commit 1ed02ba

Please sign in to comment.