From 0c894f6b7126ccfa575c11117e82e87c93a67186 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 24 Jan 2024 17:46:33 -0600 Subject: [PATCH 1/6] feat: narrow publishBrandInfo power - 3 levels of boardAux power: just brands, TOFU, and full admin - add makeMarshal etc. to promise space under `endo1` --- contract/src/platform-goals/boardAux.js | 114 ++++++++++++++++++ contract/src/platform-goals/core-types.d.ts | 58 +++++++++ .../src/platform-goals/marshal-produce.js | 34 ++++++ 3 files changed, 206 insertions(+) create mode 100644 contract/src/platform-goals/boardAux.js create mode 100644 contract/src/platform-goals/core-types.d.ts create mode 100644 contract/src/platform-goals/marshal-produce.js diff --git a/contract/src/platform-goals/boardAux.js b/contract/src/platform-goals/boardAux.js new file mode 100644 index 0000000..0da3e36 --- /dev/null +++ b/contract/src/platform-goals/boardAux.js @@ -0,0 +1,114 @@ +// @ts-check +import { E, Far } from '@endo/far'; + +const { Fail } = assert; + +// vstorage paths under published.* +const BOARD_AUX = 'boardAux'; + +/** + * @param {import('@agoric/zone').Zone} zone + * @param {Marshaller} marshalData + * @param {{ + * board: ERef; + * chainStorage: ERef; + * }} powers + */ +export const makeBoardAuxManager = (zone, marshalData, powers) => { + const { board, chainStorage } = powers; + const store = zone.mapStore('boardAux'); + const boardAux = E(chainStorage).makeChildNode(BOARD_AUX); + + const formatValue = value => { + const aux = marshalData.toCapData(value); + // max length? + return JSON.stringify(aux); + }; + + const boardAuxNode = key => + E.when(E(board).getId(key), boardId => E(boardAux).makeChildNode(boardId)); + + const init = async (key, value) => { + store.init(key, value); + await E(boardAuxNode(key)).setValue(formatValue(value)); + }; + + const update = async (key, value) => { + if (store.has(key)) { + store.set(key, value); + } else { + store.init(key, value); + } + await E(boardAuxNode(key)).setValue(formatValue(value)); + }; + + /** + * Publish displayInfo of a brand to vstorage under its boardId. + * + * Works only once per brand. + * @see {BoardAuxAdmin} to over-write aux info + * + * @param {Brand} brand + */ + const publishBrandInfo = brand => + E.when( + Promise.all([E(brand).getAllegedName(), E(brand).getDisplayInfo()]), + ([allegedName, displayInfo]) => + init(brand, harden({ allegedName, displayInfo })), + ); + + return harden({ + brandAuxPublisher: Far('BrandAuxPublisher', { publishBrandInfo }), + boardAuxTOFU: Far('BoardAuxTOFU', { publishBrandInfo, init }), + boardAuxAdmin: Far('BoardAuxAdmin', { publishBrandInfo, init, update }), + }); +}; +/** @typedef {ReturnType} BoardAuxManager */ + +/** @typedef {BoardAuxManager['brandAuxPublisher']} BrandAuxPublisher */ +/** @typedef {BoardAuxManager['boardAuxTOFU']} BoardAuxTOFU */ +/** @typedef {BoardAuxManager['boardAuxAdmin']} BoardAuxAdmin */ + +/** + * @typedef {import('./core-types').PromiseSpaceOf<{ + * brandAuxPublisher: BrandAuxPublisher; + * boardAuxTOFU: BoardAuxTOFU; + * boardAuxAdmin: BoardAuxAdmin; + * }>} BoardAuxPowers + */ + +/** + * @param {import('./core-types').BootstrapPowers + * & import('./marshal-produce').Endo1Space + * & BoardAuxPowers + * } powers + */ +export const produceBoardAuxManager = async powers => { + const { zone } = powers; + const { board, chainStorage, endo1 } = powers.consume; + const { marshal } = await endo1; + const { makeMarshal } = marshal; + const marshalData = makeMarshal(_val => Fail`data only`); + + const mgr = makeBoardAuxManager(zone, marshalData, { board, chainStorage }); + powers.produce.brandAuxPublisher.reset(); + powers.produce.boardAuxTOFU.reset(); + powers.produce.boardAuxAdmin.reset(); + powers.produce.brandAuxPublisher.resolve(mgr.brandAuxPublisher); + powers.produce.boardAuxTOFU.resolve(mgr.boardAuxTOFU); + powers.produce.boardAuxAdmin.resolve(mgr.boardAuxAdmin); +}; + +export const permit = { + zone: true, + consume: { board: true, chainStorage: true, endo1: true }, + produce: { + brandAuxPublisher: true, + boardAuxTOFU: true, + boardAuxAdmin: true, + }, +}; + +export const manifest = { + [produceBoardAuxManager.name]: permit, +}; diff --git a/contract/src/platform-goals/core-types.d.ts b/contract/src/platform-goals/core-types.d.ts new file mode 100644 index 0000000..162b5df --- /dev/null +++ b/contract/src/platform-goals/core-types.d.ts @@ -0,0 +1,58 @@ +import type { Zone } from '@agoric/zone'; + +// XXX how to import types from @agoric/vats? +// cf. https://github.com/Agoric/agoric-sdk/blob/master/packages/vats/src/core/types-ambient.d.ts +type Board = { getId: (key: unknown) => string }; + +type WellKnown = { + asset: 'BLD' | 'IST'; + contract: 'VaultFactory' | 'FeeDistributor'; +}; + +// TODO: include AssetKind { IST: 'nat', ... } +type AssetsSpace = { + brand: PromiseSpaceOf>; + issuer: PromiseSpaceOf>; +}; + +// TODO: include contract start function types +type ContractSpace = { + installation: PromiseSpaceOf>; + instance: PromiseSpaceOf>; +}; + +type WellKnownSpaces = AssetsSpace & + ContractSpace; + +type BootstrapSpace = PromiseSpaceOf<{ + chainStorage: StorageNode; + board: Board; + startUpgradable: (...args: unknown[]) => any; + zoe: ZoeService; +}>; + +type BootstrapPowers = BootstrapSpace & + WellKnownSpaces & { + zone: Zone; + }; + +type Producer = { + resolve: (v: ERef) => void; + reject: (r: unknown) => void; + reset: (reason?: unknown) => void; +}; + +/** + * @template B - Bidirectional + * @template C - Consume only + * @template P - Produce only + */ +type PromiseSpaceOf = { + consume: { [K in keyof (B & C)]: Promise<(B & C)[K]> }; + produce: { [K in keyof (B & P)]: Producer<(B & P)[K]> }; +}; + +type BootstrapManifestPermit = + | true + | string + | { [key: string]: BootstrapManifestPermit }; diff --git a/contract/src/platform-goals/marshal-produce.js b/contract/src/platform-goals/marshal-produce.js new file mode 100644 index 0000000..9344208 --- /dev/null +++ b/contract/src/platform-goals/marshal-produce.js @@ -0,0 +1,34 @@ +// @ts-check +import * as marshal from '@endo/marshal'; +import * as patterns from '@endo/patterns'; + +/** + * @typedef {{ + * endo1: { + * marshal: typeof import('@endo/marshal'); + * patterns: typeof import('@endo/patterns'); + * } + * }} Endo1Modules + * @typedef {import('./core-types').PromiseSpaceOf} Endo1Space + */ + +/** + * Make @endo/marshal, @endo/patterns available to CoreEval scripts. + * + * @param {import('./core-types').BootstrapPowers & Endo1Space} permittedPowers + */ +export const produceEndoModules = permittedPowers => { + const { produce } = permittedPowers; + const endo = { marshal, patterns }; + produce.endo1.resolve(endo); +}; + +/** @type {import('./core-types').BootstrapManifestPermit} */ +export const permit = { + /** @type {Record} */ + produce: { endo1: true }, +}; + +export const manifest = { + [produceEndoModules.name]: permit, +}; From 6c724ff1aade3ece8a3642d80145daa25ba48d7e Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 24 Jan 2024 17:51:54 -0600 Subject: [PATCH 2/6] build: record dependencies from offer-up-proposal.js --- contract/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contract/Makefile b/contract/Makefile index f2b8506..324d298 100644 --- a/contract/Makefile +++ b/contract/Makefile @@ -113,9 +113,12 @@ install-bundles: bundles/bundle-list build-proposal: bundles/bundle-list -bundles/bundle-list $(SCRIPT) $(PERMIT): +bundles/bundle-list $(SCRIPT) $(PERMIT): ./scripts/build-contract-deployer.js ./scripts/build-proposal.sh ./scripts/build-proposal.sh +./scripts/build-contract-deployer.js: offer-up-proposal.js + +offer-up-proposal.js: platform-goals/boardAux.js platform-goals/marshal-produce.js clean: @rm -rf $(SCRIPT) $(PERMIT) bundles/ From b5c0fbcf85aa3c756ec3d6bac1db4991830d7693 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 24 Jan 2024 17:52:51 -0600 Subject: [PATCH 3/6] fix: use limited publishBrandInfo power, not all of chainStorage --- contract/src/offer-up-proposal.js | 54 ++++++++++++------------------- 1 file changed, 20 insertions(+), 34 deletions(-) diff --git a/contract/src/offer-up-proposal.js b/contract/src/offer-up-proposal.js index d35e1e3..70b6146 100644 --- a/contract/src/offer-up-proposal.js +++ b/contract/src/offer-up-proposal.js @@ -1,65 +1,51 @@ // @ts-check import { E } from '@endo/far'; -import { makeMarshal } from '@endo/marshal'; import { AmountMath } from '@agoric/ertp/src/amountMath.js'; -console.warn('start proposal module evaluating'); - -const { Fail } = assert; +import { manifest as boardAuxManifest } from './platform-goals/boardAux.js'; +import { manifest as endoManifest } from './platform-goals/marshal-produce.js'; -// vstorage paths under published.* -const BOARD_AUX = 'boardAux'; +export { produceBoardAuxManager } from './platform-goals/boardAux.js'; +export { produceEndoModules } from './platform-goals/marshal-produce.js'; -const marshalData = makeMarshal(_val => Fail`data only`); +console.warn('start proposal module evaluating'); const IST_UNIT = 1_000_000n; const CENT = IST_UNIT / 100n; +/** @template {string} T @typedef {import('./platform-goals/core-types').AssetsSpace} AssetsSpace */ +/** @template {string} T @typedef {import('./platform-goals/core-types').ContractSpace} ContractSpace */ + /** - * Make a storage node for auxilliary data for a value on the board. - * - * @param {ERef} chainStorage - * @param {string} boardId + * @typedef {AssetsSpace<'Item'> + * & ContractSpace<'offerUp'> + * } OfferUpPowers */ -const makeBoardAuxNode = async (chainStorage, boardId) => { - const boardAux = E(chainStorage).makeChildNode(BOARD_AUX); - return E(boardAux).makeChildNode(boardId); -}; - -const publishBrandInfo = async (chainStorage, board, brand) => { - const [id, displayInfo] = await Promise.all([ - E(board).getId(brand), - E(brand).getDisplayInfo(), - ]); - const node = makeBoardAuxNode(chainStorage, id); - const aux = marshalData.toCapData(harden({ displayInfo })); - await E(node).setValue(JSON.stringify(aux)); -}; /** * Core eval script to start contract * - * @param {BootstrapPowers} permittedPowers + * @param {import('./platform-goals/core-types').BootstrapPowers + * & OfferUpPowers + * & import('./platform-goals/boardAux').BoardAuxPowers + * } permittedPowers */ export const startOfferUpContract = async permittedPowers => { console.error('startOfferUpContract()...'); const { - consume: { board, chainStorage, startUpgradable, zoe }, + consume: { brandAuxPublisher, startUpgradable, zoe }, brand: { consume: { IST: istBrandP }, - // @ts-expect-error dynamic extension to promise space produce: { Item: produceItemBrand }, }, issuer: { consume: { IST: istIssuerP }, - // @ts-expect-error dynamic extension to promise space produce: { Item: produceItemIssuer }, }, installation: { consume: { offerUp: offerUpInstallationP }, }, instance: { - // @ts-expect-error dynamic extension to promise space produce: { offerUp: produceInstance }, }, } = permittedPowers; @@ -79,6 +65,7 @@ export const startOfferUpContract = async permittedPowers => { terms, }); console.log('CoreEval script: started contract', instance); + /** @type {StandardTerms} */ const { brands: { Item: brand }, issuers: { Item: issuer }, @@ -94,7 +81,7 @@ export const startOfferUpContract = async permittedPowers => { produceItemBrand.resolve(brand); produceItemIssuer.resolve(issuer); - await publishBrandInfo(chainStorage, board, brand); + await E(brandAuxPublisher).publishBrandInfo(brand); console.log('offerUp (re)started'); }; @@ -103,8 +90,7 @@ const offerUpManifest = { [startOfferUpContract.name]: { consume: { agoricNames: true, - board: true, // to publish boardAux info for NFT brand - chainStorage: true, // to publish boardAux info for NFT brand + brandAuxPublisher: true, // to publish displayInfo of NFT brand startUpgradable: true, // to start contract and save adminFacet zoe: true, // to get contract terms, including issuer/brand }, @@ -118,7 +104,7 @@ harden(offerUpManifest); export const getManifestForOfferUp = ({ restoreRef }, { offerUpRef }) => { return harden({ - manifest: offerUpManifest, + manifest: { ...offerUpManifest, ...boardAuxManifest, ...endoManifest }, installations: { offerUp: restoreRef(offerUpRef), }, From 227cc4b36f50754d432ec00c15e626734986c6fa Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 14 Feb 2024 17:22:23 -0600 Subject: [PATCH 4/6] fixup! fix: use limited publishBrandInfo power, not all of chainStorage --- contract/test/test-contract.js | 51 +++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/contract/test/test-contract.js b/contract/test/test-contract.js index 6dc1f6a..c43d335 100644 --- a/contract/test/test-contract.js +++ b/contract/test/test-contract.js @@ -13,9 +13,15 @@ import { makeCopyBag } from '@endo/patterns'; import { makeNodeBundleCache } from '@endo/bundle-source/cache.js'; import { makeZoeKitForTest } from '@agoric/zoe/tools/setup-zoe.js'; import { AmountMath, makeIssuerKit } from '@agoric/ertp'; +import { makeScalarMapStore } from '@agoric/store'; +import { makeDurableZone } from '@agoric/zone/durable.js'; import { makeStableFaucet } from './mintStable.js'; -import { startOfferUpContract } from '../src/offer-up-proposal.js'; +import { + produceBoardAuxManager, + produceEndoModules, + startOfferUpContract, +} from '../src/offer-up-proposal.js'; /** @typedef {typeof import('../src/offer-up.contract.js').start} AssetContractFn */ @@ -166,6 +172,12 @@ test('use the code that will go on chain to start the contract', async t => { instance: makeProducer(), brand: makeProducer(), issuer: makeProducer(), + endo1: makeProducer(), + boardAux: { + brand: makeProducer(), + tofu: makeProducer(), + admin: makeProducer(), + }, }; /** @@ -175,6 +187,8 @@ test('use the code that will go on chain to start the contract', async t => { * Here we simulate the ones needed for starting this contract. */ const mockBootstrap = async () => { + const baggage = makeScalarMapStore('testing'); + const zone = makeDurableZone(baggage); const board = { getId: noop }; const chainStorage = Far('chainStorage', { makeChildNode: async () => chainStorage, @@ -193,8 +207,24 @@ test('use the code that will go on chain to start the contract', async t => { const feeBrand = await E(feeIssuer).getBrand(); const pFor = x => Promise.resolve(x); - const powers = { - consume: { zoe, chainStorage, startUpgradable, board }, + const powers0 = { + zone, + produce: { + endo1: sync.endo1, + brandAuxPublisher: sync.boardAux.brand, + boardAuxTOFU: sync.boardAux.tofu, + boardAuxAdmin: sync.boardAux.admin, + }, + consume: { + zoe, + chainStorage, + startUpgradable, + board, + endo1: sync.endo1.promise, + brandAuxPublisher: sync.boardAux.brand.promise, + boardAuxTOFU: sync.boardAux.tofu.promise, + boardAuxAdmin: sync.boardAux.admin.promise, + }, brand: { consume: { IST: pFor(feeBrand) }, produce: { Item: sync.brand }, @@ -206,6 +236,15 @@ test('use the code that will go on chain to start the contract', async t => { installation: { consume: { offerUp: sync.installation.promise } }, instance: { produce: { offerUp: sync.instance } }, }; + /** + * @type {import('../src/platform-goals/core-types').BootstrapPowers + * & import('../src/platform-goals/marshal-produce').Endo1Space + * & import('../src/platform-goals/boardAux').BoardAuxPowers + * & import('../src/offer-up-proposal.js').OfferUpPowers + * } + */ + // @ts-expect-error mock + const powers = powers0; return powers; }; @@ -219,7 +258,11 @@ test('use the code that will go on chain to start the contract', async t => { // When the BLD staker governance proposal passes, // the startup function gets called. - await startOfferUpContract(powers); + await Promise.all([ + produceEndoModules(powers), + produceBoardAuxManager(powers), + startOfferUpContract(powers), + ]); const instance = await sync.instance.promise; // Now that we have the instance, resume testing as above. From 3927d940b71cbadae0302729510f11c8a2455647 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 14 Feb 2024 22:41:30 -0600 Subject: [PATCH 5/6] build: add store, zone packages --- contract/package.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contract/package.json b/contract/package.json index 1b473e8..11faf55 100644 --- a/contract/package.json +++ b/contract/package.json @@ -17,10 +17,9 @@ "lint:fix": "eslint --fix '**/*.js'" }, "devDependencies": { - "agoric": "^0.21.2-u12.0", "@agoric/deploy-script-support": "^0.10.4-u12.0", - "@endo/bundle-source": "^2.8.0", "@agoric/eslint-config": "dev", + "@endo/bundle-source": "^2.8.0", "@endo/eslint-plugin": "^0.5.2", "@endo/init": "^0.5.60", "@endo/promise-kit": "0.2.56", @@ -28,6 +27,7 @@ "@jessie.js/eslint-plugin": "^0.4.0", "@typescript-eslint/eslint-plugin": "^6.7.0", "@typescript-eslint/parser": "^6.7.0", + "agoric": "^0.21.2-u12.0", "ava": "^5.3.0", "eslint": "^8.47.0", "eslint-config-airbnb-base": "^15.0.0", @@ -45,8 +45,10 @@ "typescript": "~5.2.2" }, "dependencies": { - "@agoric/zoe": "^0.26.3-u12.0", "@agoric/ertp": "^0.16.3-u12.0", + "@agoric/store": "0.9.2", + "@agoric/zoe": "^0.26.3-u12.0", + "@agoric/zone": "0.2.2", "@endo/far": "^0.2.22", "@endo/marshal": "^0.8.9", "@endo/patterns": "^0.2.5" From ad36e36bdc98cab24054d209eca2c433cca497fd Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 14 Feb 2024 22:41:39 -0600 Subject: [PATCH 6/6] build: lock packages with zone, store --- yarn.lock | 198 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 184 insertions(+), 14 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1e27e50..3e81501 100644 --- a/yarn.lock +++ b/yarn.lock @@ -417,7 +417,7 @@ "@endo/import-bundle" "0.3.4" "@endo/marshal" "0.8.5" -"@agoric/store@^0.9.2": +"@agoric/store@0.9.2", "@agoric/store@^0.9.2": version "0.9.2" resolved "https://registry.yarnpkg.com/@agoric/store/-/store-0.9.2.tgz#0973e57b8811a70923c141fccfb002bbad8fed4b" integrity sha512-9YtBlQG1cO7COfprPqBUYDW1Jg805Ick1RHm8Etj5VyfkhF8emhv/OqJKi4FMlA3XDVL3Yvbptrjvdo1WjCvjg== @@ -815,7 +815,7 @@ "@endo/patterns" "0.2.2" "@endo/promise-kit" "0.2.56" -"@agoric/zone@^0.2.2": +"@agoric/zone@0.2.2", "@agoric/zone@^0.2.2": version "0.2.2" resolved "https://registry.yarnpkg.com/@agoric/zone/-/zone-0.2.2.tgz#df5cc091d4a83842b87888e74159a723a424a82e" integrity sha512-joVRnwH55xOeaoO2xYd1TWXXLPQ9pAeNsaiwTjO3FufYb/q55rv9mpYdUdhEy+zYQuFpPH87+6w/o3f/0AXrDQ== @@ -841,13 +841,21 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@babel/code-frame@7.18.6", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.22.13": +"@babel/code-frame@^7.0.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== dependencies: "@babel/highlight" "^7.18.6" +"@babel/code-frame@^7.22.13": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244" + integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== + dependencies: + "@babel/highlight" "^7.23.4" + chalk "^2.4.2" + "@babel/compat-data@^7.22.9": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.3.tgz#3febd552541e62b5e883a25eb3effd7c7379db11" @@ -976,7 +984,7 @@ "@babel/traverse" "^7.23.2" "@babel/types" "^7.23.0" -"@babel/highlight@7.22.5", "@babel/highlight@^7.18.6": +"@babel/highlight@^7.18.6": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031" integrity sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw== @@ -985,6 +993,15 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/highlight@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" + integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + "@babel/parser@^7.1.0", "@babel/parser@^7.17.3", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.23.3", "@babel/parser@^7.7.0": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.3.tgz#0ce0be31a4ca4f1884b5786057cadcb6c3be58f9" @@ -1286,7 +1303,12 @@ resolved "https://registry.yarnpkg.com/@endo/base64/-/base64-0.2.31.tgz#92378462cd791e0258a2291d44d2cfd15415cf32" integrity sha512-7IndkaZ7buIuFw8oBovNZV7epuyFWs0gdusSJ/zrx6fMXRqX0ycSTtxr6M5xADQGss1I9fqP3vteVLiNFlyIbw== -"@endo/bundle-source@2.5.2-upstream-rollup", "@endo/bundle-source@^2.5.1", "@endo/bundle-source@^2.8.0": +"@endo/base64@^0.2.35": + version "0.2.35" + resolved "https://registry.yarnpkg.com/@endo/base64/-/base64-0.2.35.tgz#7d18203d5807748388c935df7eb79c7672a0b64e" + integrity sha512-rsAicKvgNq/ar+9b3ElXRXglMiJcg1IErz3lx1HFYZUzfWp8r/Dibi3TEjYpSBmtOeYN9CeWH8CBluN0uFqdag== + +"@endo/bundle-source@2.5.2-upstream-rollup": version "2.5.2-upstream-rollup" resolved "https://registry.yarnpkg.com/@endo/bundle-source/-/bundle-source-2.5.2-upstream-rollup.tgz#89fdc6b1b6625ca8c484c12e7762f04cd711ca9f" integrity sha512-UoQlCMZ8jnQA6ulKYII+plWdyK0/XAj1clHPnAW1ILEthQWN1h9WeQT26mIWowGp+sX8CIyiRSVRQN/0pC35Fw== @@ -1305,6 +1327,26 @@ rollup "^2.79.1" source-map "^0.7.3" +"@endo/bundle-source@^2.5.1", "@endo/bundle-source@^2.8.0": + version "2.8.0" + resolved "https://registry.yarnpkg.com/@endo/bundle-source/-/bundle-source-2.8.0.tgz#56f25b3d9c74d3d0bede5c526647aaf02c0a8f94" + integrity sha512-nDiM3u/LKWq5xAnJ+zm35HC6kMKF3IG6Y5V0385slFHZVT8mXzRJ5ztEqRsVzvVeITfz3ZRFOaFer6v4V8Lkjg== + dependencies: + "@agoric/babel-generator" "^7.17.4" + "@babel/parser" "^7.17.3" + "@babel/traverse" "^7.17.3" + "@endo/base64" "^0.2.35" + "@endo/compartment-mapper" "^0.9.2" + "@endo/init" "^0.5.60" + "@endo/promise-kit" "^0.2.60" + "@endo/where" "^0.3.5" + "@rollup/plugin-commonjs" "^19.0.0" + "@rollup/plugin-node-resolve" "^13.0.0" + acorn "^8.2.4" + jessie.js "^0.3.2" + rollup "^2.79.1" + source-map "^0.7.3" + "@endo/captp@3.1.1", "@endo/captp@^3.1.1": version "3.1.1" resolved "https://registry.yarnpkg.com/@endo/captp/-/captp-3.1.1.tgz#538cdb7deec694cfce1015e1ccb387270172642d" @@ -1323,7 +1365,7 @@ "@endo/base64" "^0.2.31" "@endo/compartment-mapper" "^0.8.4" -"@endo/cjs-module-analyzer@^0.2.31": +"@endo/cjs-module-analyzer@^0.2.31", "@endo/cjs-module-analyzer@^0.2.35": version "0.2.35" resolved "https://registry.yarnpkg.com/@endo/cjs-module-analyzer/-/cjs-module-analyzer-0.2.35.tgz#0de39d2306bba5671e121efa091bf6cb9990f11e" integrity sha512-Ldr1auybH9AzrR/WV6bzP4aLRpv8CCl98mv0IAui4uQmmFOPOGchshyBfpiDF5XMKM6wh7z0VgmvmydQ5/7AHQ== @@ -1338,6 +1380,21 @@ "@endo/zip" "^0.2.31" ses "^0.18.4" +"@endo/compartment-mapper@^0.9.2": + version "0.9.2" + resolved "https://registry.yarnpkg.com/@endo/compartment-mapper/-/compartment-mapper-0.9.2.tgz#48bfa610179cc5521c745c7b2d1eb5fab52ed29a" + integrity sha512-zsAyTf87zBsE1yZ2CBzEGhcGZGGv5m93/CXZHQhut53o4DWwhuS/WTQ4cBoVFSGKWz63JbbA/7qa4fcOnv5dDw== + dependencies: + "@endo/cjs-module-analyzer" "^0.2.35" + "@endo/static-module-record" "^0.8.2" + "@endo/zip" "^0.2.35" + ses "^0.18.8" + +"@endo/env-options@^0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@endo/env-options/-/env-options-0.1.4.tgz#e516bc3864f00b154944e444fb8996a9a0c23a45" + integrity sha512-Ol8ct0aW8VK1ZaqntnUJfrYT59P6Xn36XPbHzkqQhsYkpudKDn5ILYEwGmSO/Ff+XJjv/pReNI0lhOyyrDa9mg== + "@endo/eslint-plugin@^0.5.2": version "0.5.2" resolved "https://registry.yarnpkg.com/@endo/eslint-plugin/-/eslint-plugin-0.5.2.tgz#835d22e9ff17d9935f7f565e50a21ef07aa92ca2" @@ -1348,11 +1405,18 @@ tsutils "~3.21.0" typescript "~5.2.2" -"@endo/eventual-send@0.17.2", "@endo/eventual-send@^0.17.2", "@endo/eventual-send@^0.17.5": +"@endo/eventual-send@0.17.2", "@endo/eventual-send@^0.17.2": version "0.17.2" resolved "https://registry.yarnpkg.com/@endo/eventual-send/-/eventual-send-0.17.2.tgz#c8710d557c2f57723be05fe99e941cd893acc5d2" integrity sha512-nux02l2yYXXUeUA2PigOO1K0gbVVMYx3prfYrW/G7Ny6PiDLtOyaeMWwKQwFTgJV2yAkOfvycr4LC1+tm7hu/Q== +"@endo/eventual-send@^0.17.5", "@endo/eventual-send@^0.17.6": + version "0.17.6" + resolved "https://registry.yarnpkg.com/@endo/eventual-send/-/eventual-send-0.17.6.tgz#86719e4e3ff76991c49f6680309dc77dff65fe55" + integrity sha512-73cKY2uiWdzMJn7i284NJyD3K0UKjpksBg/EA2GT8YJa0TgeBczFQIm81vC08itK5gHuDDH2vC5COSGR6hxKIg== + dependencies: + "@endo/env-options" "^0.1.4" + "@endo/exo@0.2.2", "@endo/exo@^0.2.2": version "0.2.2" resolved "https://registry.yarnpkg.com/@endo/exo/-/exo-0.2.2.tgz#eeebe3eeb40dcf9b409fddf8d5ff73821b470515" @@ -1361,7 +1425,7 @@ "@endo/far" "^0.2.18" "@endo/patterns" "^0.2.2" -"@endo/far@0.2.18", "@endo/far@^0.2.18", "@endo/far@^0.2.22", "@endo/far@^0.2.3": +"@endo/far@0.2.18", "@endo/far@^0.2.18", "@endo/far@^0.2.3": version "0.2.18" resolved "https://registry.yarnpkg.com/@endo/far/-/far-0.2.18.tgz#8d8ca8ac1f7c4b57871e55c2c2f06c8e4fcf3839" integrity sha512-NJPz5x11AOsFgxZNSIW4+llQtSUNQtcYCrvxpMwhofti3hncMjhIiUUrMVggw99pdHNmXEBr0gl16H3n/1X0sw== @@ -1369,6 +1433,14 @@ "@endo/eventual-send" "^0.17.2" "@endo/pass-style" "^0.1.3" +"@endo/far@^0.2.22": + version "0.2.22" + resolved "https://registry.yarnpkg.com/@endo/far/-/far-0.2.22.tgz#fda187289a903ee3f9d6dcc5664ee7fef1994b1f" + integrity sha512-LFOicqyHslKOSk/H5EfGOcw347ftDSwYHARPasnrG4UJOEkcU1ZG5bN/BmfONtcidB776gWZKrV/tNl4WLIlyw== + dependencies: + "@endo/eventual-send" "^0.17.6" + "@endo/pass-style" "^0.1.7" + "@endo/import-bundle@0.3.4", "@endo/import-bundle@^0.3.4": version "0.3.4" resolved "https://registry.yarnpkg.com/@endo/import-bundle/-/import-bundle-0.3.4.tgz#dd93dca2aa595f669365f05d03affd4465837919" @@ -1377,7 +1449,7 @@ "@endo/base64" "^0.2.31" "@endo/compartment-mapper" "^0.8.4" -"@endo/init@0.5.56", "@endo/init@^0.5.56", "@endo/init@^0.5.60": +"@endo/init@0.5.56", "@endo/init@^0.5.56": version "0.5.56" resolved "https://registry.yarnpkg.com/@endo/init/-/init-0.5.56.tgz#c241de519434309f362dc676e76ee36c93240151" integrity sha512-BKA7O2uy9uaGw9dB9X515SIaTumaO58HD30AXkJllW6bmLM/BxxFM3GCgS127x0Wot1ni32Y0DxkwxdEXFXJEQ== @@ -1387,6 +1459,16 @@ "@endo/lockdown" "^0.1.28" "@endo/promise-kit" "^0.2.56" +"@endo/init@^0.5.60": + version "0.5.60" + resolved "https://registry.yarnpkg.com/@endo/init/-/init-0.5.60.tgz#e78051b13cd4a04c72d5ec1d2a6011b7f987f7ff" + integrity sha512-AbAvs6Nk01fyJ+PaW0RzwemIWyomjzDf8ZEhVa3jCOhr8kBBsTnJdX0v7XkbZ/Y8NQxlrFaW0fPqlJK6aMWTlQ== + dependencies: + "@endo/base64" "^0.2.35" + "@endo/eventual-send" "^0.17.6" + "@endo/lockdown" "^0.1.32" + "@endo/promise-kit" "^0.2.60" + "@endo/lockdown@0.1.28", "@endo/lockdown@^0.1.28": version "0.1.28" resolved "https://registry.yarnpkg.com/@endo/lockdown/-/lockdown-0.1.28.tgz#43f23dcbb12b6ebd3ad2a3dc8c6bb3609dd9e95f" @@ -1394,7 +1476,14 @@ dependencies: ses "^0.18.4" -"@endo/marshal@0.8.5", "@endo/marshal@^0.8.5", "@endo/marshal@^0.8.8", "@endo/marshal@^0.8.9": +"@endo/lockdown@^0.1.32": + version "0.1.32" + resolved "https://registry.yarnpkg.com/@endo/lockdown/-/lockdown-0.1.32.tgz#2d13a9ca336d5dce243a3cf919c543b55973153c" + integrity sha512-AN696XS3robsopxVg7gc/6c9TXPGosGmKfcM0g9SNnD1rqgo1EakS4wf7f3AbICU9iJdo0e4V5JjzWPnjqoR0g== + dependencies: + ses "^0.18.8" + +"@endo/marshal@0.8.5", "@endo/marshal@^0.8.5": version "0.8.5" resolved "https://registry.yarnpkg.com/@endo/marshal/-/marshal-0.8.5.tgz#c1a10ed4d9b37ee7444d314d8dec9a9a96728d64" integrity sha512-oj2Ag/TlkoMPv8m00fjoa1uWPgDwm5w8nYUU0DPqaCLfTNGRe8a8s7kYDPbv+sQdiQbkZ1RgUQjdyr/O2Mvs+A== @@ -1404,11 +1493,26 @@ "@endo/pass-style" "^0.1.3" "@endo/promise-kit" "^0.2.56" +"@endo/marshal@^0.8.8", "@endo/marshal@^0.8.9": + version "0.8.9" + resolved "https://registry.yarnpkg.com/@endo/marshal/-/marshal-0.8.9.tgz#f6fcaf23ecad828f6d086657f1d1590ea8ef3840" + integrity sha512-wzYlY5/JFzY/wAVxZ6h0BxlRaAS/9KKnhircKO/tGw5bZYHFvLeSeMCBZ4VCSZg5aNgDlhuvB0S6iCwS5MYqcg== + dependencies: + "@endo/eventual-send" "^0.17.6" + "@endo/nat" "^4.1.31" + "@endo/pass-style" "^0.1.7" + "@endo/promise-kit" "^0.2.60" + "@endo/nat@4.1.27", "@endo/nat@^4.1.27": version "4.1.27" resolved "https://registry.yarnpkg.com/@endo/nat/-/nat-4.1.27.tgz#8f1a398b39f994b0769070a3fb36d3397bf86794" integrity sha512-mKRdIc4NvrxZ1qPBcYZH6zaj0RsRwADaCcfPNRnGWcHC9dY8DmZDDcgqNdSBFLiEto1RnXeoKAEGxk6hn253Ow== +"@endo/nat@^4.1.31": + version "4.1.31" + resolved "https://registry.yarnpkg.com/@endo/nat/-/nat-4.1.31.tgz#ca738f472481a572f47749b41529b3261ebb4c1e" + integrity sha512-tz0PnEmzX9BAtKEawYndsx+XC6f+2CKErtrpbpOuX3uct5VNLdw6q6cArSYtnHbxRHR0YaHUdeG0W6okmup4bg== + "@endo/netstring@0.3.26", "@endo/netstring@^0.3.26": version "0.3.26" resolved "https://registry.yarnpkg.com/@endo/netstring/-/netstring-0.3.26.tgz#7da8338cb372772894e1ebcc0728b23666fa2c89" @@ -1426,7 +1530,15 @@ "@endo/promise-kit" "^0.2.56" "@fast-check/ava" "^1.1.3" -"@endo/patterns@0.2.2", "@endo/patterns@^0.2.2", "@endo/patterns@^0.2.5": +"@endo/pass-style@^0.1.7": + version "0.1.7" + resolved "https://registry.yarnpkg.com/@endo/pass-style/-/pass-style-0.1.7.tgz#ea22568e8b86fb2d1a14a5fc042374cc0d8e310b" + integrity sha512-dlB62Ptjcy/+iachy7qzAdgIwaU60rE+XLummLRpE2tDSJF2jSFJlVwa/QuGw1KKO7Rt4vog/51sKev3EbJZQg== + dependencies: + "@endo/promise-kit" "^0.2.60" + "@fast-check/ava" "^1.1.5" + +"@endo/patterns@0.2.2", "@endo/patterns@^0.2.2": version "0.2.2" resolved "https://registry.yarnpkg.com/@endo/patterns/-/patterns-0.2.2.tgz#d4c4d63bf450477ed9a9cf194b4a8daa56fcb4f4" integrity sha512-rbS4BLRohZQhB+0aEPBoxmzOfOie9nAu8Qx55Fxe8xFQKS4k9acafeIYmKh9nvslEJISYQmogy5Lewm5mgdSjg== @@ -1435,6 +1547,15 @@ "@endo/marshal" "^0.8.5" "@endo/promise-kit" "^0.2.56" +"@endo/patterns@^0.2.5": + version "0.2.6" + resolved "https://registry.yarnpkg.com/@endo/patterns/-/patterns-0.2.6.tgz#abbbc3743ee313ffc6167d783d5fc78de74125fe" + integrity sha512-FbayXMv9sY4qP5vSaPhq9RSJmsTykImbCy0FN1YmZzaChGwOfSPOJw4898xVLDK5Xi6f+6zV02uXjuMTuZt6UA== + dependencies: + "@endo/eventual-send" "^0.17.6" + "@endo/marshal" "^0.8.9" + "@endo/promise-kit" "^0.2.60" + "@endo/promise-kit@0.2.56", "@endo/promise-kit@^0.2.56": version "0.2.56" resolved "https://registry.yarnpkg.com/@endo/promise-kit/-/promise-kit-0.2.56.tgz#24ed3cf87af1eec65f4635643b7e67617b909e71" @@ -1442,13 +1563,27 @@ dependencies: ses "^0.18.4" -"@endo/ses-ava@0.2.40", "@endo/ses-ava@^0.2.44": +"@endo/promise-kit@^0.2.60": + version "0.2.60" + resolved "https://registry.yarnpkg.com/@endo/promise-kit/-/promise-kit-0.2.60.tgz#8012ada06970c7eaf965cd856563b34a1790e163" + integrity sha512-6Zp9BqBbc3ywaG+iLRrQRmO/VLKrMnvsbgOKKPMpjEC3sUlksYA09uaH3GrKZgoGChF8m9bXK8eFW39z7wJNUw== + dependencies: + ses "^0.18.8" + +"@endo/ses-ava@0.2.40": version "0.2.40" resolved "https://registry.yarnpkg.com/@endo/ses-ava/-/ses-ava-0.2.40.tgz#8a6c1f668131ecbe4d06339cac2a8346253089b8" integrity sha512-YIiAPuUfjS5dzyqeiV36FASv4YiSdkRzdxXbntNTBdOvdDymbT37SMkG0mUxD5YZRQuKMTu9xQyaGYSRqf8zaw== dependencies: ses "^0.18.4" +"@endo/ses-ava@^0.2.44": + version "0.2.44" + resolved "https://registry.yarnpkg.com/@endo/ses-ava/-/ses-ava-0.2.44.tgz#b97b0d5a457b30b73c74b19091d67840984cf47e" + integrity sha512-Pp0os/ZN7r0L94eCxWFYhSWt+DIdIASIVlY4oYCwMLxLa28cuswCjRQvPKLINBpZezogCKKptEWJTyHhGWpVQw== + dependencies: + ses "^0.18.8" + "@endo/static-module-record@^0.7.19": version "0.7.20" resolved "https://registry.yarnpkg.com/@endo/static-module-record/-/static-module-record-0.7.20.tgz#5d9583aaa8042b8a6de58c72f765e5a28e880489" @@ -1460,6 +1595,17 @@ "@babel/types" "^7.17.0" ses "^0.18.5" +"@endo/static-module-record@^0.8.2": + version "0.8.2" + resolved "https://registry.yarnpkg.com/@endo/static-module-record/-/static-module-record-0.8.2.tgz#25f66d555d1a075e5258520405410fd01fc2d1f7" + integrity sha512-wHJLX/hU/MoSFvnFN9sZ/49DYPlbASHlVQrJszeKH3xIpBtl3SG4JdRswO6RQgLREQJD/HV/ZN5V8x2bCpMu4Q== + dependencies: + "@agoric/babel-generator" "^7.17.6" + "@babel/parser" "^7.17.3" + "@babel/traverse" "^7.17.3" + "@babel/types" "^7.17.0" + ses "^0.18.8" + "@endo/stream-node@0.2.26", "@endo/stream-node@^0.2.26": version "0.2.26" resolved "https://registry.yarnpkg.com/@endo/stream-node/-/stream-node-0.2.26.tgz#bf3c6ce6c506cde4468a64d220b8df4224638e16" @@ -1478,11 +1624,21 @@ "@endo/promise-kit" "^0.2.56" ses "^0.18.4" +"@endo/where@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@endo/where/-/where-0.3.5.tgz#df7661ec38ab6a327ef050aa88b50555876c39ef" + integrity sha512-y9agS7UWpSY9YSAAYwtn6sAE7zfU2BmYGOUJpw859WcmRt5ufCRi2XAXDcvIugAUPTsSVPqJj6FO3uZNVRmXPw== + "@endo/zip@0.2.31", "@endo/zip@^0.2.31": version "0.2.31" resolved "https://registry.yarnpkg.com/@endo/zip/-/zip-0.2.31.tgz#371b1a9ca8b3216ad8a3564e97e3d747be42a657" integrity sha512-rNCZtQzPm6Q8kW69gyeU0hUwKZtwuR8cX1+URgpDuUuaMUbKWBaqURKOmrqKVtE5fkqCE7pSrHvGH02DMDbDHQ== +"@endo/zip@^0.2.35": + version "0.2.35" + resolved "https://registry.yarnpkg.com/@endo/zip/-/zip-0.2.35.tgz#37a7f9266ca9c9167de5e42b55b0d9c979598d87" + integrity sha512-UM+mMZjBtJf33lXj38xXIEIe1B5wrgg/nT9CHrC8s+Pj/h63eMpQmcJzjL2vMKrvq3Tsj+TDzmQhtYcbrFACqQ== + "@es-joy/jsdoccomment@~0.41.0": version "0.41.0" resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.41.0.tgz#4a2f7db42209c0425c71a1476ef1bdb6dcd836f6" @@ -1641,6 +1797,13 @@ dependencies: fast-check "^3.0.0" +"@fast-check/ava@^1.1.5": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@fast-check/ava/-/ava-1.2.1.tgz#4f6621d039e855cbd3ee40512f442f82913c5a31" + integrity sha512-d7O8CjYV2e+JFnN67Yofw+tt16fJI7kuX1K7OZCNxqQL5XNrkipWBmAmW9sPxYVjaItPBPvTPp7nORsO9KuBgg== + dependencies: + fast-check "^3.0.0" + "@github/browserslist-config@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@github/browserslist-config/-/browserslist-config-1.0.0.tgz#952fe6da3e6b8ed6a368f3a1a08a9d2ef84e8d04" @@ -2686,7 +2849,7 @@ cbor@^8.1.0: dependencies: nofilter "^3.1.0" -chalk@^2.0.0: +chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -5954,11 +6117,18 @@ serialize-error@^7.0.1: dependencies: type-fest "^0.13.1" -ses@0.18.4, ses@^0.18.4, ses@^0.18.5, ses@^0.18.8: +ses@^0.18.4: version "0.18.4" resolved "https://registry.yarnpkg.com/ses/-/ses-0.18.4.tgz#28781719870262afc6928b7d6d94dc16318dbd86" integrity sha512-Ph0PC38Q7uutHmMM9XPqA7rp/2taiRwW6pIZJwTr4gz90DtrBvy/x7AmNPH2uqNPhKriZpYKvPi1xKWjM9xJuQ== +ses@^0.18.5, ses@^0.18.8: + version "0.18.8" + resolved "https://registry.yarnpkg.com/ses/-/ses-0.18.8.tgz#88036511ac3b3c07e4d82dd8cfc6e5f3788205b6" + integrity sha512-kOH1AhJc6gWDXKURKeU1w7iFUdImAegAljVvBg5EUBgNqjH4bxcEsGVUadVEPtA2PVRMyQp1fiSMDwEZkQNj1g== + dependencies: + "@endo/env-options" "^0.1.4" + set-function-length@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.1.1.tgz#4bc39fafb0307224a33e106a7d35ca1218d659ed"