From bec5f4af0d46292b6a5a7342921c1dfb4bedb324 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Thu, 12 Dec 2024 20:42:11 -0600 Subject: [PATCH 1/4] style: format-on-save --- ui-fusdc-lp/src/App.tsx | 127 ++++++++++++----------- ui-fusdc-lp/src/components/Dashboard.tsx | 19 ++-- 2 files changed, 76 insertions(+), 70 deletions(-) diff --git a/ui-fusdc-lp/src/App.tsx b/ui-fusdc-lp/src/App.tsx index 2fddb3a..bc539fc 100644 --- a/ui-fusdc-lp/src/App.tsx +++ b/ui-fusdc-lp/src/App.tsx @@ -1,36 +1,36 @@ import { makeAgoricChainStorageWatcher, AgoricChainStoragePathKind as Kind, -} from "@agoric/rpc"; +} from '@agoric/rpc'; import { multiplyBy, parseRatio, ceilDivideBy, -} from "@agoric/zoe/src/contractSupport/ratio.js"; -import { AmountMath } from "@agoric/ertp"; -import { create } from "zustand"; +} from '@agoric/zoe/src/contractSupport/ratio.js'; +import { AmountMath } from '@agoric/ertp'; +import { create } from 'zustand'; import { makeAgoricWalletConnection, suggestChain, -} from "@agoric/web-components"; -import { subscribeLatest } from "@agoric/notifier"; -import { AgoricProvider } from "@agoric/react-components"; -import { wallets } from "cosmos-kit"; -import { ThemeProvider, useTheme } from "@interchain-ui/react"; -import "./index.css"; -import "@agoric/react-components/dist/style.css"; -import { Navbar } from "./components/Navbar"; -import Dashboard from "./components/Dashboard"; -import { useEffect, useState } from "react"; +} from '@agoric/web-components'; +import { subscribeLatest } from '@agoric/notifier'; +import { AgoricProvider } from '@agoric/react-components'; +import { wallets } from 'cosmos-kit'; +import { ThemeProvider, useTheme } from '@interchain-ui/react'; +import './index.css'; +import '@agoric/react-components/dist/style.css'; +import { Navbar } from './components/Navbar'; +import Dashboard from './components/Dashboard'; +import { useEffect, useState } from 'react'; type Wallet = Awaited>; const ENDPOINTS = { - RPC: "http://localhost:26657", - API: "http://localhost:1317", + RPC: 'http://localhost:26657', + API: 'http://localhost:1317', }; -const watcher = makeAgoricChainStorageWatcher(ENDPOINTS.API, "agoriclocal"); +const watcher = makeAgoricChainStorageWatcher(ENDPOINTS.API, 'agoriclocal'); interface AppState { wallet?: Wallet; fusdcInstance?: unknown; @@ -42,19 +42,19 @@ const useAppStore = create(() => ({})); const setup = async () => { watcher.watchLatest>( - [Kind.Data, "published.agoricNames.instance"], - (instances) => { - console.log("got instances", instances); + [Kind.Data, 'published.agoricNames.instance'], + instances => { + console.log('got instances', instances); useAppStore.setState({ - fusdcInstance: instances.find(([name]) => name === "fastUsdc")!.at(1), + fusdcInstance: instances.find(([name]) => name === 'fastUsdc')!.at(1), }); } ); watcher.watchLatest>( - [Kind.Data, "published.agoricNames.brand"], - (brands) => { - console.log("Got brands", brands); + [Kind.Data, 'published.agoricNames.brand'], + brands => { + console.log('Got brands', brands); useAppStore.setState({ brands: Object.fromEntries(brands), }); @@ -62,15 +62,14 @@ const setup = async () => { ); watcher.watchLatest>( - [Kind.Data, "published.fastUsdc.poolMetrics"], - (metrics) => { - console.log("Got metrics", metrics); + [Kind.Data, 'published.fastUsdc.poolMetrics'], + metrics => { + console.log('Got metrics', metrics); useAppStore.setState({ - metrics: {...metrics}, + metrics: { ...metrics }, }); } ); - }; const parseUSDCAmount = (amountString, usdc) => { const USDC_DECIMALS = 6; @@ -79,44 +78,44 @@ const parseUSDCAmount = (amountString, usdc) => { }; const connectWallet = async () => { - await suggestChain("https://local.agoric.net/network-config"); + await suggestChain('https://local.agoric.net/network-config'); const wallet = await makeAgoricWalletConnection(watcher, ENDPOINTS.RPC); useAppStore.setState({ wallet }); - console.log("wallet", wallet); + console.log('wallet', wallet); const { pursesNotifier } = wallet; for await (const purses of subscribeLatest(pursesNotifier)) { - console.log("got purses", purses); + console.log('got purses', purses); useAppStore.setState({ purses }); } }; const makeDepositOffer = () => { const { wallet, fusdcInstance, brands } = useAppStore.getState(); - if (!fusdcInstance) throw Error("no contract instance"); - if (!(brands && brands.USDC)) throw Error("brands not available"); + if (!fusdcInstance) throw Error('no contract instance'); + if (!(brands && brands.USDC)) throw Error('brands not available'); const proposal = { give: { USDC: parseUSDCAmount('10', brands.USDC), }, }; - console.log("about to make offer", wallet); + console.log('about to make offer', wallet); wallet?.makeOffer( { - source: "agoricContract", + source: 'agoricContract', instance: fusdcInstance, - callPipe: [["makeDepositInvitation", []]], + callPipe: [['makeDepositInvitation', []]], }, proposal, undefined, (update: { status: string; data?: unknown }) => { - if (update.status === "error") { + if (update.status === 'error') { alert(`Offer error: ${update.data}`); } - if (update.status === "accepted") { - alert("Offer accepted"); + if (update.status === 'accepted') { + alert('Offer accepted'); } - if (update.status === "refunded") { - alert("Offer rejected"); + if (update.status === 'refunded') { + alert('Offer rejected'); } } ); @@ -124,11 +123,12 @@ const makeDepositOffer = () => { const makeWithdrawOffer = () => { const { wallet, fusdcInstance, brands, metrics } = useAppStore.getState(); - if (!fusdcInstance) throw Error("no contract instance"); - if (!(brands && brands.USDC && brands.FastLP)) throw Error("brands not available"); - if (!(metrics && metrics.shareWorth)) throw Error("metrics not available"); + if (!fusdcInstance) throw Error('no contract instance'); + if (!(brands && brands.USDC && brands.FastLP)) + throw Error('brands not available'); + if (!(metrics && metrics.shareWorth)) throw Error('metrics not available'); - const usdcAmount = parseUSDCAmount('10', brands.USDC) + const usdcAmount = parseUSDCAmount('10', brands.USDC); const fastLPAmount = ceilDivideBy(usdcAmount, metrics.shareWorth); const proposal = { give: { @@ -139,24 +139,24 @@ const makeWithdrawOffer = () => { }, }; console.log('fastLPAmount', fastLPAmount); - console.log("about to make withdraw offer"); + console.log('about to make withdraw offer'); wallet?.makeOffer( { - source: "agoricContract", + source: 'agoricContract', instance: fusdcInstance, - callPipe: [["makeWithdrawInvitation", []]], + callPipe: [['makeWithdrawInvitation', []]], }, proposal, undefined, (update: { status: string; data?: unknown }) => { - if (update.status === "error") { + if (update.status === 'error') { alert(`Offer error: ${update.data}`); } - if (update.status === "accepted") { - alert("Offer accepted"); + if (update.status === 'accepted') { + alert('Offer accepted'); } - if (update.status === "refunded") { - alert("Offer rejected"); + if (update.status === 'refunded') { + alert('Offer rejected'); } } ); @@ -168,10 +168,10 @@ function App() { setup(); }, []); const tryConnectWallet = () => { - connectWallet().catch((err) => { + connectWallet().catch(err => { switch (err.message) { - case "KEPLR_CONNECTION_ERROR_NO_SMART_WALLET": - alert("no smart wallet at that address"); + case 'KEPLR_CONNECTION_ERROR_NO_SMART_WALLET': + alert('no smart wallet at that address'); break; default: alert(err.message); @@ -187,19 +187,22 @@ function App() { agoricNetworkConfigs={[ { testChain: { - chainId: "agoriclocal", - chainName: "agoric-local", + chainId: 'agoriclocal', + chainName: 'agoric-local', }, apis: { - rest: ["http://localhost:1317"], - rpc: ["http://localhost:26657"], + rest: ['http://localhost:1317'], + rpc: ['http://localhost:26657'], }, }, ]} defaultChainName="agoric-local" > - + diff --git a/ui-fusdc-lp/src/components/Dashboard.tsx b/ui-fusdc-lp/src/components/Dashboard.tsx index 77faf53..c9b15ef 100644 --- a/ui-fusdc-lp/src/components/Dashboard.tsx +++ b/ui-fusdc-lp/src/components/Dashboard.tsx @@ -1,18 +1,21 @@ -import Form from "./Form"; -import Cards from "./Cards"; -import Transactions from "./Transactions"; +import Form from './Form'; +import Cards from './Cards'; +import Transactions from './Transactions'; const headerData = [ - { title: "Total Pool Balance", value: "$1,234,567", description: "USDC" }, - { title: "Your Pool Share", value: "$123,456", description: "10% of pool" }, - { title: "Awaiting Settlement", value: "$5,678", description: "USDC" }, - { title: "Fees Earned (24h)", value: "$890", description: "USDC" }, + { title: 'Total Pool Balance', value: '$1,234,567', description: 'USDC' }, + { title: 'Your Pool Share', value: '$123,456', description: '10% of pool' }, + { title: 'Awaiting Settlement', value: '$5,678', description: 'USDC' }, + { title: 'Fees Earned (24h)', value: '$890', description: 'USDC' }, ]; const Dashboard = ({ makeDepositOffer, makeWithdrawOffer }) => (
-
+
); From f778ee63f24610e0f5dbd4c819307b66df142108 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Thu, 12 Dec 2024 20:44:31 -0600 Subject: [PATCH 2/4] style: organize imports --- ui-fusdc-lp/src/App.tsx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ui-fusdc-lp/src/App.tsx b/ui-fusdc-lp/src/App.tsx index bc539fc..b839ed6 100644 --- a/ui-fusdc-lp/src/App.tsx +++ b/ui-fusdc-lp/src/App.tsx @@ -1,27 +1,27 @@ +import { AmountMath } from '@agoric/ertp'; +import { subscribeLatest } from '@agoric/notifier'; +import { AgoricProvider } from '@agoric/react-components'; +import '@agoric/react-components/dist/style.css'; import { - makeAgoricChainStorageWatcher, AgoricChainStoragePathKind as Kind, + makeAgoricChainStorageWatcher, } from '@agoric/rpc'; -import { - multiplyBy, - parseRatio, - ceilDivideBy, -} from '@agoric/zoe/src/contractSupport/ratio.js'; -import { AmountMath } from '@agoric/ertp'; -import { create } from 'zustand'; import { makeAgoricWalletConnection, suggestChain, } from '@agoric/web-components'; -import { subscribeLatest } from '@agoric/notifier'; -import { AgoricProvider } from '@agoric/react-components'; -import { wallets } from 'cosmos-kit'; +import { + ceilDivideBy, + multiplyBy, + parseRatio, +} from '@agoric/zoe/src/contractSupport/ratio.js'; import { ThemeProvider, useTheme } from '@interchain-ui/react'; -import './index.css'; -import '@agoric/react-components/dist/style.css'; -import { Navbar } from './components/Navbar'; -import Dashboard from './components/Dashboard'; +import { wallets } from 'cosmos-kit'; import { useEffect, useState } from 'react'; +import { create } from 'zustand'; +import Dashboard from './components/Dashboard'; +import { Navbar } from './components/Navbar'; +import './index.css'; type Wallet = Awaited>; From 56585e74768d2e63ab4f9c3d88169f8e08f9d7b9 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Thu, 12 Dec 2024 20:39:31 -0600 Subject: [PATCH 3/4] build: get types from @agoric/fast-usdc, @agoric/smart-wallet --- ui-fusdc-lp/package.json | 2 + yarn.lock | 718 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 718 insertions(+), 2 deletions(-) diff --git a/ui-fusdc-lp/package.json b/ui-fusdc-lp/package.json index 0a23300..a1df221 100644 --- a/ui-fusdc-lp/package.json +++ b/ui-fusdc-lp/package.json @@ -19,7 +19,9 @@ "@cosmos-kit/core": "2.8.9" }, "devDependencies": { + "@agoric/fast-usdc": "0.1.1-dev-ddff762.0", "@agoric/react-components": "^0.1.1-dev-ca0ddde.0", + "@agoric/smart-wallet": "0.5.4-dev-ddff762.0", "@agoric/ui-components": "^0.3.9-u13.0", "@agoric/web-components": "0.15.1-dev-8fc28e8.0", "@endo/eventual-send": "^1.2.8", diff --git a/yarn.lock b/yarn.lock index 31801cb..7900cf0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -75,6 +75,25 @@ __metadata: languageName: node linkType: hard +"@agoric/async-flow@npm:0.1.1-dev-ddff762.0+ddff762": + version: 0.1.1-dev-ddff762.0 + resolution: "@agoric/async-flow@npm:0.1.1-dev-ddff762.0" + dependencies: + "@agoric/base-zone": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/internal": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@agoric/vow": "npm:0.1.1-dev-ddff762.0+ddff762" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/marshal": "npm:^1.6.2" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/f4f5067d1ec0ad6c302a9909449366d64b7995f3e2ac312ec25876e7a88f0eecb9f111a7e1c513c7cfb40526a94f014954501774d85ec9d74d1b948dc8323dc6 + languageName: node + linkType: hard + "@agoric/babel-generator@npm:^7.17.6": version: 7.17.6 resolution: "@agoric/babel-generator@npm:7.17.6" @@ -101,6 +120,21 @@ __metadata: languageName: node linkType: hard +"@agoric/base-zone@npm:0.1.1-dev-ddff762.0+ddff762": + version: 0.1.1-dev-ddff762.0 + resolution: "@agoric/base-zone@npm:0.1.1-dev-ddff762.0" + dependencies: + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/far": "npm:^1.1.9" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + checksum: 10c0/7a858547dc67a4db2f9838a633cffd876c2079f41a04f54b171011a260a6d6ccd505ae3551bb974beacf8b0c323b55bb20cd553a83a2fcd968cff07397e05b86 + languageName: node + linkType: hard + "@agoric/base-zone@npm:0.1.1-upgrade-16a-dev-fb592e4.0+fb592e4": version: 0.1.1-upgrade-16a-dev-fb592e4.0 resolution: "@agoric/base-zone@npm:0.1.1-upgrade-16a-dev-fb592e4.0" @@ -143,6 +177,27 @@ __metadata: languageName: node linkType: hard +"@agoric/casting@npm:0.4.3-dev-ddff762.0+ddff762": + version: 0.4.3-dev-ddff762.0 + resolution: "@agoric/casting@npm:0.4.3-dev-ddff762.0" + dependencies: + "@agoric/internal": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/notifier": "npm:0.6.3-dev-ddff762.0+ddff762" + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@cosmjs/encoding": "npm:^0.32.3" + "@cosmjs/proto-signing": "npm:^0.32.3" + "@cosmjs/stargate": "npm:^0.32.3" + "@cosmjs/tendermint-rpc": "npm:^0.32.3" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/init": "npm:^1.1.7" + "@endo/lockdown": "npm:^1.0.13" + "@endo/marshal": "npm:^1.6.2" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/9c33a0a173ff0bd65240e92d25fac18f185078fd69365561260ad51b97c2061c5ef7b0cf7f21af90524477112885ab5e2a34af032ecfc70282cf52edb587dc83 + languageName: node + linkType: hard + "@agoric/casting@npm:0.4.3-upgrade-16a-dev-fb592e4.0+fb592e4, @agoric/casting@npm:^0.4.3-u13.0": version: 0.4.3-upgrade-16a-dev-fb592e4.0 resolution: "@agoric/casting@npm:0.4.3-upgrade-16a-dev-fb592e4.0" @@ -186,6 +241,27 @@ __metadata: languageName: node linkType: hard +"@agoric/client-utils@npm:0.1.1-dev-ddff762.0+ddff762": + version: 0.1.1-dev-ddff762.0 + resolution: "@agoric/client-utils@npm:0.1.1-dev-ddff762.0" + dependencies: + "@agoric/casting": "npm:0.4.3-dev-ddff762.0+ddff762" + "@agoric/ertp": "npm:0.16.3-dev-ddff762.0+ddff762" + "@agoric/internal": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/smart-wallet": "npm:0.5.4-dev-ddff762.0+ddff762" + "@agoric/vats": "npm:0.15.2-dev-ddff762.0+ddff762" + "@cosmjs/stargate": "npm:^0.32.3" + "@cosmjs/tendermint-rpc": "npm:^0.32.3" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/marshal": "npm:^1.6.2" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/eee100232a272fb731c2ae896ea13ba2f3921701ee96c6eda49906ed540fd846161a72543727659f35f17c82880c4a7b2b58fad1eb32713ba5bbd8b1a9c836d9 + languageName: node + linkType: hard + "@agoric/cosmic-proto@npm:0.3.0": version: 0.3.0 resolution: "@agoric/cosmic-proto@npm:0.3.0" @@ -205,6 +281,18 @@ __metadata: languageName: node linkType: hard +"@agoric/cosmic-proto@npm:0.4.1-dev-ddff762.0+ddff762": + version: 0.4.1-dev-ddff762.0 + resolution: "@agoric/cosmic-proto@npm:0.4.1-dev-ddff762.0" + dependencies: + "@endo/base64": "npm:^1.0.9" + "@endo/init": "npm:^1.1.7" + bech32: "npm:^2.0.0" + query-string: "npm:^9.1.1" + checksum: 10c0/0a958c0ef701c515792661b3b775ee900b26ae461738cd7c7abb96520201301f3e6c53fdc59d23256c5e9d61dfaeb5fc0955a6260e344ca8a47ad9c0c5df1fc2 + languageName: node + linkType: hard + "@agoric/cosmic-proto@npm:0.4.1-upgrade-16a-dev-fb592e4.0+fb592e4": version: 0.4.1-upgrade-16a-dev-fb592e4.0 resolution: "@agoric/cosmic-proto@npm:0.4.1-upgrade-16a-dev-fb592e4.0" @@ -262,6 +350,25 @@ __metadata: languageName: node linkType: hard +"@agoric/ertp@npm:0.16.3-dev-ddff762.0+ddff762": + version: 0.16.3-dev-ddff762.0 + resolution: "@agoric/ertp@npm:0.16.3-dev-ddff762.0" + dependencies: + "@agoric/notifier": "npm:0.6.3-dev-ddff762.0+ddff762" + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@agoric/vat-data": "npm:0.5.3-dev-ddff762.0+ddff762" + "@agoric/zone": "npm:0.2.3-dev-ddff762.0+ddff762" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/8d564c7465a933d04f15509c2fe15a86d9c69d83b19ea9ff65fc935549b33ec0fec1ef704dec382142ff78341c87ec0362b1e564457f03ee50f27be838c0ee22 + languageName: node + linkType: hard + "@agoric/ertp@npm:0.16.3-upgrade-14-dev-c8f9e7b.0+c8f9e7b": version: 0.16.3-upgrade-14-dev-c8f9e7b.0 resolution: "@agoric/ertp@npm:0.16.3-upgrade-14-dev-c8f9e7b.0" @@ -337,6 +444,42 @@ __metadata: languageName: node linkType: hard +"@agoric/fast-usdc@npm:0.1.1-dev-ddff762.0": + version: 0.1.1-dev-ddff762.0 + resolution: "@agoric/fast-usdc@npm:0.1.1-dev-ddff762.0" + dependencies: + "@agoric/client-utils": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/ertp": "npm:0.16.3-dev-ddff762.0+ddff762" + "@agoric/internal": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/notifier": "npm:0.6.3-dev-ddff762.0+ddff762" + "@agoric/orchestration": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@agoric/vat-data": "npm:0.5.3-dev-ddff762.0+ddff762" + "@agoric/vow": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/zoe": "npm:0.26.3-dev-ddff762.0+ddff762" + "@cosmjs/proto-signing": "npm:^0.32.4" + "@cosmjs/stargate": "npm:^0.32.4" + "@endo/base64": "npm:^1.0.9" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/init": "npm:^1.1.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + "@nick134-bit/noblejs": "npm:0.0.2" + bech32: "npm:^2.0.0" + commander: "npm:^12.1.0" + ethers: "npm:^6.13.4" + bin: + fast-usdc: src/cli/bin.js + checksum: 10c0/7bdb66c5ec5ba15b44b7d91c8321f2d5609b13355f3485744cf316d4b18828d0c8cd53bd21ce9eb0e49d6450e943413ff64d4032107c3f25f54309bd5cf19ead + languageName: node + linkType: hard + "@agoric/governance@npm:0.10.4-dev-3656582.0+3656582": version: 0.10.4-dev-3656582.0 resolution: "@agoric/governance@npm:0.10.4-dev-3656582.0" @@ -361,6 +504,30 @@ __metadata: languageName: node linkType: hard +"@agoric/governance@npm:0.10.4-dev-ddff762.0+ddff762": + version: 0.10.4-dev-ddff762.0 + resolution: "@agoric/governance@npm:0.10.4-dev-ddff762.0" + dependencies: + "@agoric/ertp": "npm:0.16.3-dev-ddff762.0+ddff762" + "@agoric/internal": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/notifier": "npm:0.6.3-dev-ddff762.0+ddff762" + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@agoric/time": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/vat-data": "npm:0.5.3-dev-ddff762.0+ddff762" + "@agoric/zoe": "npm:0.26.3-dev-ddff762.0+ddff762" + "@endo/bundle-source": "npm:^3.5.0" + "@endo/captp": "npm:^4.4.3" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/promise-kit": "npm:^1.1.8" + import-meta-resolve: "npm:^2.2.1" + checksum: 10c0/884fc6e37c4766df9983e69cde0a6b2b7d1dc02aa04f1f7a9c24b7d0bc22779152f3119b2e48f5002f634e9d056f2498e5500329671625e12962398cc3ab0a30 + languageName: node + linkType: hard + "@agoric/governance@npm:0.10.4-upgrade-16a-dev-fb592e4.0+fb592e4": version: 0.10.4-upgrade-16a-dev-fb592e4.0 resolution: "@agoric/governance@npm:0.10.4-upgrade-16a-dev-fb592e4.0" @@ -486,6 +653,26 @@ __metadata: languageName: node linkType: hard +"@agoric/internal@npm:0.3.3-dev-ddff762.0+ddff762": + version: 0.3.3-dev-ddff762.0 + resolution: "@agoric/internal@npm:0.3.3-dev-ddff762.0" + dependencies: + "@agoric/base-zone": "npm:0.1.1-dev-ddff762.0+ddff762" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/init": "npm:^1.1.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + "@endo/stream": "npm:^1.2.8" + anylogger: "npm:^0.21.0" + jessie.js: "npm:^0.3.4" + checksum: 10c0/c2cb9537b51aa220103d541247eac443e66f676070836f57fbd431b0d3a8a7ed1918e877c0a8d62d04a6f2da150643402b8a611e54364927013465bc8585f1d5 + languageName: node + linkType: hard + "@agoric/internal@npm:0.4.0-upgrade-14-dev-c8f9e7b.0+c8f9e7b": version: 0.4.0-upgrade-14-dev-c8f9e7b.0 resolution: "@agoric/internal@npm:0.4.0-upgrade-14-dev-c8f9e7b.0" @@ -549,6 +736,17 @@ __metadata: languageName: node linkType: hard +"@agoric/kmarshal@npm:0.1.1-dev-ddff762.0+ddff762": + version: 0.1.1-dev-ddff762.0 + resolution: "@agoric/kmarshal@npm:0.1.1-dev-ddff762.0" + dependencies: + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + checksum: 10c0/b790cda5f69bf774a7cef25072f165d37cb87e3736bcff397e57389a5362fb21d17c1e873feec3476194df45ea90eb940a5098875b8305409c9dd4497a193252 + languageName: node + linkType: hard + "@agoric/kmarshal@npm:0.1.1-upgrade-16a-dev-fb592e4.0+fb592e4": version: 0.1.1-upgrade-16a-dev-fb592e4.0 resolution: "@agoric/kmarshal@npm:0.1.1-upgrade-16a-dev-fb592e4.0" @@ -577,6 +775,23 @@ __metadata: languageName: node linkType: hard +"@agoric/network@npm:0.1.1-dev-ddff762.0+ddff762": + version: 0.1.1-dev-ddff762.0 + resolution: "@agoric/network@npm:0.1.1-dev-ddff762.0" + dependencies: + "@agoric/internal": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@agoric/vat-data": "npm:0.5.3-dev-ddff762.0+ddff762" + "@endo/base64": "npm:^1.0.9" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/7afe72cb0fb9421ba975bde4304a8e3946041e17f8665c0825367ef25731a1f8b59a0ff632f2a56b450960cc3e102f5af808035d4c657c2c018ef73488eaf070 + languageName: node + linkType: hard + "@agoric/network@npm:0.2.0-upgrade-16a-dev-fb592e4.0+fb592e4": version: 0.2.0-upgrade-16a-dev-fb592e4.0 resolution: "@agoric/network@npm:0.2.0-upgrade-16a-dev-fb592e4.0" @@ -609,6 +824,33 @@ __metadata: languageName: node linkType: hard +"@agoric/orchestration@npm:0.1.1-dev-ddff762.0+ddff762": + version: 0.1.1-dev-ddff762.0 + resolution: "@agoric/orchestration@npm:0.1.1-dev-ddff762.0" + dependencies: + "@agoric/async-flow": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/cosmic-proto": "npm:0.4.1-dev-ddff762.0+ddff762" + "@agoric/ertp": "npm:0.16.3-dev-ddff762.0+ddff762" + "@agoric/internal": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/network": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/notifier": "npm:0.6.3-dev-ddff762.0+ddff762" + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@agoric/time": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/vat-data": "npm:0.5.3-dev-ddff762.0+ddff762" + "@agoric/vats": "npm:0.15.2-dev-ddff762.0+ddff762" + "@agoric/vow": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/zoe": "npm:0.26.3-dev-ddff762.0+ddff762" + "@agoric/zone": "npm:0.2.3-dev-ddff762.0+ddff762" + "@endo/base64": "npm:^1.0.9" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + "@endo/patterns": "npm:^1.4.7" + "@noble/hashes": "npm:^1.5.0" + checksum: 10c0/4fef8c9d625e74cfbcdfecc84d56e376788e478913feee1d9276365732b3bf90d9f35ab120531bcf9302a1f012d6388e76216a0ac11835fb15da3e44460ca4f6 + languageName: node + linkType: hard + "@agoric/react-components@npm:^0.1.1-dev-ca0ddde.0": version: 0.1.1-dev-fd71909.0 resolution: "@agoric/react-components@npm:0.1.1-dev-fd71909.0" @@ -669,6 +911,29 @@ __metadata: languageName: node linkType: hard +"@agoric/smart-wallet@npm:0.5.4-dev-ddff762.0, @agoric/smart-wallet@npm:0.5.4-dev-ddff762.0+ddff762": + version: 0.5.4-dev-ddff762.0 + resolution: "@agoric/smart-wallet@npm:0.5.4-dev-ddff762.0" + dependencies: + "@agoric/ertp": "npm:0.16.3-dev-ddff762.0+ddff762" + "@agoric/internal": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/notifier": "npm:0.6.3-dev-ddff762.0+ddff762" + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@agoric/vat-data": "npm:0.5.3-dev-ddff762.0+ddff762" + "@agoric/vats": "npm:0.15.2-dev-ddff762.0+ddff762" + "@agoric/vow": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/zoe": "npm:0.26.3-dev-ddff762.0+ddff762" + "@agoric/zone": "npm:0.2.3-dev-ddff762.0+ddff762" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/e3cb9793eb5a34c41272716daa7022cfc2ad2a3aef5d66f0d21101dbfaf39f3346e75460a65f0f058ed3d8fdf5de442c19b99aaa5a3615025efea88922b2b934 + languageName: node + linkType: hard + "@agoric/smart-wallet@npm:0.5.4-upgrade-16a-dev-fb592e4.0+fb592e4": version: 0.5.4-upgrade-16a-dev-fb592e4.0 resolution: "@agoric/smart-wallet@npm:0.5.4-upgrade-16a-dev-fb592e4.0" @@ -739,6 +1004,19 @@ __metadata: languageName: node linkType: hard +"@agoric/store@npm:0.9.3-dev-ddff762.0+ddff762": + version: 0.9.3-dev-ddff762.0 + resolution: "@agoric/store@npm:0.9.3-dev-ddff762.0" + dependencies: + "@endo/errors": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + checksum: 10c0/bab357a7d71a5b762e292808313787d3d17481906d10e295dba4f0fa3def743e0f135ddb429ee2b84a51c53b060dd8004030eff075ea11e61eb9c01b3617a6e9 + languageName: node + linkType: hard + "@agoric/store@npm:0.9.3-upgrade-14-dev-c8f9e7b.0+c8f9e7b": version: 0.9.3-upgrade-14-dev-c8f9e7b.0 resolution: "@agoric/store@npm:0.9.3-upgrade-14-dev-c8f9e7b.0" @@ -797,6 +1075,21 @@ __metadata: languageName: node linkType: hard +"@agoric/swing-store@npm:0.9.2-dev-ddff762.0+ddff762": + version: 0.9.2-dev-ddff762.0 + resolution: "@agoric/swing-store@npm:0.9.2-dev-ddff762.0" + dependencies: + "@agoric/internal": "npm:0.3.3-dev-ddff762.0+ddff762" + "@endo/base64": "npm:^1.0.9" + "@endo/bundle-source": "npm:^3.5.0" + "@endo/check-bundle": "npm:^1.0.12" + "@endo/errors": "npm:^1.2.8" + "@endo/nat": "npm:^5.0.13" + better-sqlite3: "npm:^9.1.1" + checksum: 10c0/3aebb62fa685d3182a23c24c4138cdbacfebd0147e176a24b26db1ec1d11c24b5c9de43354fdf2fa4b285c613e603dc1e23d270381849ff435c43fb8bd9ad6c7 + languageName: node + linkType: hard + "@agoric/swing-store@npm:0.9.2-upgrade-14-dev-c8f9e7b.0+c8f9e7b": version: 0.9.2-upgrade-14-dev-c8f9e7b.0 resolution: "@agoric/swing-store@npm:0.9.2-upgrade-14-dev-c8f9e7b.0" @@ -863,6 +1156,27 @@ __metadata: languageName: node linkType: hard +"@agoric/swingset-liveslots@npm:0.10.3-dev-ddff762.0+ddff762": + version: 0.10.3-dev-ddff762.0 + resolution: "@agoric/swingset-liveslots@npm:0.10.3-dev-ddff762.0" + dependencies: + "@agoric/internal": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@endo/env-options": "npm:^1.1.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/far": "npm:^1.1.9" + "@endo/init": "npm:^1.1.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/9987f5fbd8f6d0c14a9fbfef71252ab0fdfb28c6bdde76e434b75b4823aabe43c88903c48e4cad538bed52200f3f0fdd2d4730084f97eaad8ad21a77991bd54d + languageName: node + linkType: hard + "@agoric/swingset-liveslots@npm:0.10.3-upgrade-14-dev-c8f9e7b.0+c8f9e7b": version: 0.10.3-upgrade-14-dev-c8f9e7b.0 resolution: "@agoric/swingset-liveslots@npm:0.10.3-upgrade-14-dev-c8f9e7b.0" @@ -978,6 +1292,54 @@ __metadata: languageName: node linkType: hard +"@agoric/swingset-vat@npm:0.32.3-dev-ddff762.0+ddff762": + version: 0.32.3-dev-ddff762.0 + resolution: "@agoric/swingset-vat@npm:0.32.3-dev-ddff762.0" + dependencies: + "@agoric/internal": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/kmarshal": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@agoric/swing-store": "npm:0.9.2-dev-ddff762.0+ddff762" + "@agoric/swingset-liveslots": "npm:0.10.3-dev-ddff762.0+ddff762" + "@agoric/swingset-xsnap-supervisor": "npm:0.10.3-dev-ddff762.0+ddff762" + "@agoric/time": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/vat-data": "npm:0.5.3-dev-ddff762.0+ddff762" + "@agoric/xsnap-lockdown": "npm:0.14.1-dev-ddff762.0+ddff762" + "@endo/base64": "npm:^1.0.9" + "@endo/bundle-source": "npm:^3.5.0" + "@endo/captp": "npm:^4.4.3" + "@endo/check-bundle": "npm:^1.0.12" + "@endo/compartment-mapper": "npm:^1.4.0" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/import-bundle": "npm:^1.3.2" + "@endo/init": "npm:^1.1.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + "@endo/ses-ava": "npm:^1.2.8" + "@endo/stream": "npm:^1.2.8" + "@endo/zip": "npm:^1.0.9" + ansi-styles: "npm:^6.2.1" + anylogger: "npm:^0.21.0" + better-sqlite3: "npm:^9.1.1" + import-meta-resolve: "npm:^2.2.1" + microtime: "npm:^3.1.0" + semver: "npm:^6.3.0" + tmp: "npm:^0.2.1" + yargs-parser: "npm:^21.1.1" + peerDependencies: + "@agoric/xsnap": ^0.14.2 + ava: ^5.3.0 + bin: + vat: bin/vat + checksum: 10c0/c5cf34f02282f5fe286b6936f745419c3fab69ab6e12fa1f630f7e6879c6a9286dfef0e3116c6072f1212238d788204cf5547660754bbf23fe7c13a20f8176f8 + languageName: node + linkType: hard + "@agoric/swingset-vat@npm:0.32.3-upgrade-14-dev-c8f9e7b.0+c8f9e7b": version: 0.32.3-upgrade-14-dev-c8f9e7b.0 resolution: "@agoric/swingset-vat@npm:0.32.3-upgrade-14-dev-c8f9e7b.0" @@ -1116,6 +1478,13 @@ __metadata: languageName: node linkType: hard +"@agoric/swingset-xsnap-supervisor@npm:0.10.3-dev-ddff762.0+ddff762": + version: 0.10.3-dev-ddff762.0 + resolution: "@agoric/swingset-xsnap-supervisor@npm:0.10.3-dev-ddff762.0" + checksum: 10c0/b5d162507223d9ac26de552ff2f6c516fbe58331f469c2221a046897ffa4714505c8c4ca0f1a79320c9396e2544d4d6de5a0222745ace714460a13786fe6d858 + languageName: node + linkType: hard + "@agoric/swingset-xsnap-supervisor@npm:0.10.3-upgrade-14-dev-c8f9e7b.0+c8f9e7b": version: 0.10.3-upgrade-14-dev-c8f9e7b.0 resolution: "@agoric/swingset-xsnap-supervisor@npm:0.10.3-upgrade-14-dev-c8f9e7b.0" @@ -1192,6 +1561,18 @@ __metadata: languageName: node linkType: hard +"@agoric/time@npm:0.3.3-dev-ddff762.0+ddff762": + version: 0.3.3-dev-ddff762.0 + resolution: "@agoric/time@npm:0.3.3-dev-ddff762.0" + dependencies: + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@endo/errors": "npm:^1.2.8" + "@endo/nat": "npm:^5.0.13" + "@endo/patterns": "npm:^1.4.7" + checksum: 10c0/f21c8765022894642500fce117fff99ada0dad20835d92cc3b4b54b33f3b7c8951a59d665b29c13d81fd2197d433d15c985f4a125180ef313338038942424bc1 + languageName: node + linkType: hard + "@agoric/time@npm:0.3.3-upgrade-14-dev-c8f9e7b.0+c8f9e7b": version: 0.3.3-upgrade-14-dev-c8f9e7b.0 resolution: "@agoric/time@npm:0.3.3-upgrade-14-dev-c8f9e7b.0" @@ -1271,6 +1652,20 @@ __metadata: languageName: node linkType: hard +"@agoric/vat-data@npm:0.5.3-dev-ddff762.0+ddff762": + version: 0.5.3-dev-ddff762.0 + resolution: "@agoric/vat-data@npm:0.5.3-dev-ddff762.0" + dependencies: + "@agoric/base-zone": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@agoric/swingset-liveslots": "npm:0.10.3-dev-ddff762.0+ddff762" + "@endo/errors": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/patterns": "npm:^1.4.7" + checksum: 10c0/d5f35a937b5299aaf922ccaa651a216d0db9ed1f5a4c40ca6086b95b972895888a524c36d37bbaa820c53f1fefcd4cfe1626934ca7422fbf9162983876352ea1 + languageName: node + linkType: hard + "@agoric/vat-data@npm:0.5.3-upgrade-14-dev-c8f9e7b.0+c8f9e7b": version: 0.5.3-upgrade-14-dev-c8f9e7b.0 resolution: "@agoric/vat-data@npm:0.5.3-upgrade-14-dev-c8f9e7b.0" @@ -1308,6 +1703,37 @@ __metadata: languageName: node linkType: hard +"@agoric/vats@npm:0.15.2-dev-ddff762.0+ddff762": + version: 0.15.2-dev-ddff762.0 + resolution: "@agoric/vats@npm:0.15.2-dev-ddff762.0" + dependencies: + "@agoric/cosmic-proto": "npm:0.4.1-dev-ddff762.0+ddff762" + "@agoric/ertp": "npm:0.16.3-dev-ddff762.0+ddff762" + "@agoric/governance": "npm:0.10.4-dev-ddff762.0+ddff762" + "@agoric/internal": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/network": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/notifier": "npm:0.6.3-dev-ddff762.0+ddff762" + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@agoric/swingset-vat": "npm:0.32.3-dev-ddff762.0+ddff762" + "@agoric/time": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/vat-data": "npm:0.5.3-dev-ddff762.0+ddff762" + "@agoric/vow": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/zoe": "npm:0.26.3-dev-ddff762.0+ddff762" + "@agoric/zone": "npm:0.2.3-dev-ddff762.0+ddff762" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/import-bundle": "npm:^1.3.2" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + import-meta-resolve: "npm:^2.2.1" + jessie.js: "npm:^0.3.4" + checksum: 10c0/40eeba7368c868b25b858a305fbca244996adcc1bcc1de5eb1d350f57eef16963cb30a40574f693042cf965d4787e247abc1f8a56db794ff30690c161c14cbe2 + languageName: node + linkType: hard + "@agoric/vats@npm:0.16.0-upgrade-16a-dev-fb592e4.0+fb592e4": version: 0.16.0-upgrade-16a-dev-fb592e4.0 resolution: "@agoric/vats@npm:0.16.0-upgrade-16a-dev-fb592e4.0" @@ -1413,6 +1839,22 @@ __metadata: languageName: node linkType: hard +"@agoric/vow@npm:0.1.1-dev-ddff762.0+ddff762": + version: 0.1.1-dev-ddff762.0 + resolution: "@agoric/vow@npm:0.1.1-dev-ddff762.0" + dependencies: + "@agoric/base-zone": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/internal": "npm:0.3.3-dev-ddff762.0+ddff762" + "@endo/env-options": "npm:^1.1.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/2c7c314c03866f11ffd37e41ae2f897a572d34cdb87e5442260a82f7b146510e3355cdb53383a8dc0db2eb0ac01e030b69b50e06eea2882a94de4182c50c90e4 + languageName: node + linkType: hard + "@agoric/vow@npm:0.2.0-upgrade-16a-dev-fb592e4.0+fb592e4": version: 0.2.0-upgrade-16a-dev-fb592e4.0 resolution: "@agoric/vow@npm:0.2.0-upgrade-16a-dev-fb592e4.0" @@ -1488,6 +1930,13 @@ __metadata: languageName: node linkType: hard +"@agoric/xsnap-lockdown@npm:0.14.1-dev-ddff762.0+ddff762": + version: 0.14.1-dev-ddff762.0 + resolution: "@agoric/xsnap-lockdown@npm:0.14.1-dev-ddff762.0" + checksum: 10c0/28779f0f9e9bedbe4d8ce849826464fecce530ed80c802d8db2b74d093c48ce188a7730f7b86c2594f318b22b46d1d4645e6c7d1f92502538b15f6d153c9374d + languageName: node + linkType: hard + "@agoric/xsnap-lockdown@npm:0.14.1-upgrade-14-dev-c8f9e7b.0+c8f9e7b": version: 0.14.1-upgrade-14-dev-c8f9e7b.0 resolution: "@agoric/xsnap-lockdown@npm:0.14.1-upgrade-14-dev-c8f9e7b.0" @@ -1634,6 +2083,39 @@ __metadata: languageName: node linkType: hard +"@agoric/zoe@npm:0.26.3-dev-ddff762.0+ddff762": + version: 0.26.3-dev-ddff762.0 + resolution: "@agoric/zoe@npm:0.26.3-dev-ddff762.0" + dependencies: + "@agoric/base-zone": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/ertp": "npm:0.16.3-dev-ddff762.0+ddff762" + "@agoric/internal": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/notifier": "npm:0.6.3-dev-ddff762.0+ddff762" + "@agoric/store": "npm:0.9.3-dev-ddff762.0+ddff762" + "@agoric/swingset-liveslots": "npm:0.10.3-dev-ddff762.0+ddff762" + "@agoric/swingset-vat": "npm:0.32.3-dev-ddff762.0+ddff762" + "@agoric/time": "npm:0.3.3-dev-ddff762.0+ddff762" + "@agoric/vat-data": "npm:0.5.3-dev-ddff762.0+ddff762" + "@agoric/vow": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/zone": "npm:0.2.3-dev-ddff762.0+ddff762" + "@endo/bundle-source": "npm:^3.5.0" + "@endo/captp": "npm:^4.4.3" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/far": "npm:^1.1.9" + "@endo/import-bundle": "npm:^1.3.2" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + yargs-parser: "npm:^21.1.1" + checksum: 10c0/87b09154aae91f38348798be81a1dee8e0752ba26147b79c6c2a09f3ba6951973609ab1079ee3018c2eadc831592d5c8fbff10f655daea79c4ec8081916c93a1 + languageName: node + linkType: hard + "@agoric/zoe@npm:0.26.3-upgrade-16a-dev-fb592e4.0+fb592e4, @agoric/zoe@npm:^0.26.3-u16.1": version: 0.26.3-upgrade-16a-dev-fb592e4.0 resolution: "@agoric/zoe@npm:0.26.3-upgrade-16a-dev-fb592e4.0" @@ -1703,6 +2185,19 @@ __metadata: languageName: node linkType: hard +"@agoric/zone@npm:0.2.3-dev-ddff762.0+ddff762": + version: 0.2.3-dev-ddff762.0 + resolution: "@agoric/zone@npm:0.2.3-dev-ddff762.0" + dependencies: + "@agoric/base-zone": "npm:0.1.1-dev-ddff762.0+ddff762" + "@agoric/vat-data": "npm:0.5.3-dev-ddff762.0+ddff762" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/pass-style": "npm:^1.4.7" + checksum: 10c0/9a8cee02f931123f30d37b678fc8878828940b626a9ab84be020a6f29ab6ec69b0027ae6ee90cffd5668882856765d7289c742e82a63815d543fab40c01780b7 + languageName: node + linkType: hard + "@agoric/zone@npm:0.2.3-upgrade-14-dev-c8f9e7b.0+c8f9e7b": version: 0.2.3-upgrade-14-dev-c8f9e7b.0 resolution: "@agoric/zone@npm:0.2.3-upgrade-14-dev-c8f9e7b.0" @@ -2382,6 +2877,18 @@ __metadata: languageName: node linkType: hard +"@cosmjs/amino@npm:0.32.3": + version: 0.32.3 + resolution: "@cosmjs/amino@npm:0.32.3" + dependencies: + "@cosmjs/crypto": "npm:^0.32.3" + "@cosmjs/encoding": "npm:^0.32.3" + "@cosmjs/math": "npm:^0.32.3" + "@cosmjs/utils": "npm:^0.32.3" + checksum: 10c0/6f3da2ba6d88257d6717898af798aad9f2a51bb2c0d0b61cd40cf103c86a1431f4fa5086df350f81371d3282b8a28bcbc4f97c6d9eb83a9831fad473ae1ab492 + languageName: node + linkType: hard + "@cosmjs/amino@npm:^0.30.0, @cosmjs/amino@npm:^0.30.1": version: 0.30.1 resolution: "@cosmjs/amino@npm:0.30.1" @@ -2530,6 +3037,17 @@ __metadata: languageName: node linkType: hard +"@cosmjs/encoding@npm:0.32.3": + version: 0.32.3 + resolution: "@cosmjs/encoding@npm:0.32.3" + dependencies: + base64-js: "npm:^1.3.0" + bech32: "npm:^1.1.4" + readonly-date: "npm:^1.0.0" + checksum: 10c0/3c3d4b610093c2c8ca13437664e4736d60cdfb309bf2671f492388c59a9bca20f1a75ab4686a7b73d48aa6208f454bee56c84c0fe780015473ea53353a70266a + languageName: node + linkType: hard + "@cosmjs/encoding@npm:^0.30.0, @cosmjs/encoding@npm:^0.30.1": version: 0.30.1 resolution: "@cosmjs/encoding@npm:0.30.1" @@ -2602,6 +3120,15 @@ __metadata: languageName: node linkType: hard +"@cosmjs/math@npm:0.32.3": + version: 0.32.3 + resolution: "@cosmjs/math@npm:0.32.3" + dependencies: + bn.js: "npm:^5.2.0" + checksum: 10c0/cad8b13a0db739ef4a416b334e39ea9f55874315ebdf91dc38772676c2ead6caccaf8a28b9e8803fc48680a72cf5a9fde97564f5efbfbe9a9073c95665f31294 + languageName: node + linkType: hard + "@cosmjs/math@npm:^0.30.0, @cosmjs/math@npm:^0.30.1": version: 0.30.1 resolution: "@cosmjs/math@npm:0.30.1" @@ -2629,6 +3156,20 @@ __metadata: languageName: node linkType: hard +"@cosmjs/proto-signing@npm:0.32.3": + version: 0.32.3 + resolution: "@cosmjs/proto-signing@npm:0.32.3" + dependencies: + "@cosmjs/amino": "npm:^0.32.3" + "@cosmjs/crypto": "npm:^0.32.3" + "@cosmjs/encoding": "npm:^0.32.3" + "@cosmjs/math": "npm:^0.32.3" + "@cosmjs/utils": "npm:^0.32.3" + cosmjs-types: "npm:^0.9.0" + checksum: 10c0/d44511d3a50489c1a3f61f28f68ca8cac87d6bdbb69e434cb0916dfc1d79e6a68ca0c09e074d4be73624f26fbb215024848225b862201b7f8d1d6a44014fd819 + languageName: node + linkType: hard + "@cosmjs/proto-signing@npm:^0.30.0, @cosmjs/proto-signing@npm:^0.30.1": version: 0.30.1 resolution: "@cosmjs/proto-signing@npm:0.30.1" @@ -2729,6 +3270,24 @@ __metadata: languageName: node linkType: hard +"@cosmjs/stargate@npm:0.32.3": + version: 0.32.3 + resolution: "@cosmjs/stargate@npm:0.32.3" + dependencies: + "@confio/ics23": "npm:^0.6.8" + "@cosmjs/amino": "npm:^0.32.3" + "@cosmjs/encoding": "npm:^0.32.3" + "@cosmjs/math": "npm:^0.32.3" + "@cosmjs/proto-signing": "npm:^0.32.3" + "@cosmjs/stream": "npm:^0.32.3" + "@cosmjs/tendermint-rpc": "npm:^0.32.3" + "@cosmjs/utils": "npm:^0.32.3" + cosmjs-types: "npm:^0.9.0" + xstream: "npm:^11.14.0" + checksum: 10c0/c82db0355f4b15ca988f0452f8142102b44840319fe48d44c8dc9c1a316cbe3c9e765eb90970348bd5b5fddd6d9452d5a556e14dbbbd93eda6a6c92ceb616241 + languageName: node + linkType: hard + "@cosmjs/stargate@npm:^0.30.0, @cosmjs/stargate@npm:^0.30.1": version: 0.30.1 resolution: "@cosmjs/stargate@npm:0.30.1" @@ -2805,7 +3364,7 @@ __metadata: languageName: node linkType: hard -"@cosmjs/stream@npm:^0.32.1, @cosmjs/stream@npm:^0.32.4": +"@cosmjs/stream@npm:^0.32.1, @cosmjs/stream@npm:^0.32.3, @cosmjs/stream@npm:^0.32.4": version: 0.32.4 resolution: "@cosmjs/stream@npm:0.32.4" dependencies: @@ -2882,7 +3441,7 @@ __metadata: languageName: node linkType: hard -"@cosmjs/utils@npm:^0.32.1, @cosmjs/utils@npm:^0.32.4": +"@cosmjs/utils@npm:^0.32.1, @cosmjs/utils@npm:^0.32.3, @cosmjs/utils@npm:^0.32.4": version: 0.32.4 resolution: "@cosmjs/utils@npm:0.32.4" checksum: 10c0/d5ff8b235094be1150853a715116049f73eb5cdfeea8ce8e22ecccc61ec99792db457404d4307782b1a2f935dcf438f5c485beabfcfbc1dc5df26eb6e6da9062 @@ -3720,6 +4279,17 @@ __metadata: languageName: node linkType: hard +"@endo/common@npm:^1.2.8": + version: 1.2.8 + resolution: "@endo/common@npm:1.2.8" + dependencies: + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/c9465721095d9f06278b6550909a02c330c7a69223f11aff29759067586d41b86054127639fa2c2c0345d0d0aa43518e5b72d5c547b67bfe8e802cd21756d87b + languageName: node + linkType: hard + "@endo/compartment-mapper@npm:^1.2.2": version: 1.2.2 resolution: "@endo/compartment-mapper@npm:1.2.2" @@ -3739,6 +4309,13 @@ __metadata: languageName: node linkType: hard +"@endo/env-options@npm:^1.1.8": + version: 1.1.8 + resolution: "@endo/env-options@npm:1.1.8" + checksum: 10c0/2f519f48a5b966dbd9e66134d4abc89ff02b9791d21146b49031ceb694584f3f41c6119125b6bb4eb0d347f5bcd846473b5f3c4ae6bae3dac19402fcaf522520 + languageName: node + linkType: hard + "@endo/errors@npm:^1.2.2, @endo/errors@npm:^1.2.5": version: 1.2.5 resolution: "@endo/errors@npm:1.2.5" @@ -3748,6 +4325,15 @@ __metadata: languageName: node linkType: hard +"@endo/errors@npm:^1.2.8": + version: 1.2.8 + resolution: "@endo/errors@npm:1.2.8" + dependencies: + ses: "npm:^1.10.0" + checksum: 10c0/3f33fc7119ab840ad0f5bdfb70e73cc99630f09593c31928e30de4d9c8e898c85397c5170964d54c819a757a74d3b005f6275480ff8d0f1aa2aa8ef872852e97 + languageName: node + linkType: hard + "@endo/eslint-plugin@npm:^2.2.1": version: 2.2.1 resolution: "@endo/eslint-plugin@npm:2.2.1" @@ -6099,6 +6685,20 @@ __metadata: languageName: node linkType: hard +"@nick134-bit/noblejs@npm:0.0.2": + version: 0.0.2 + resolution: "@nick134-bit/noblejs@npm:0.0.2" + dependencies: + "@cosmjs/amino": "npm:0.32.3" + "@cosmjs/encoding": "npm:0.32.3" + "@cosmjs/math": "npm:0.32.3" + "@cosmjs/proto-signing": "npm:0.32.3" + "@cosmjs/stargate": "npm:0.32.3" + typescript: "npm:^5.4.5" + checksum: 10c0/93a0d28459caf9649722d085f8a06f828ad878c2a2948beeb38eb583ebcb305ba15bff5f66ccc712e6068df93fb0cbd1b09bdf7681cc72ef37138f8c5484c287 + languageName: node + linkType: hard + "@noble/curves@npm:1.2.0, @noble/curves@npm:~1.2.0": version: 1.2.0 resolution: "@noble/curves@npm:1.2.0" @@ -9187,6 +9787,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:22.7.5": + version: 22.7.5 + resolution: "@types/node@npm:22.7.5" + dependencies: + undici-types: "npm:~6.19.2" + checksum: 10c0/cf11f74f1a26053ec58066616e3a8685b6bcd7259bc569738b8f752009f9f0f7f85a1b2d24908e5b0f752482d1e8b6babdf1fbb25758711ec7bb9500bfcd6e60 + languageName: node + linkType: hard + "@types/node@npm:^16.18.39": version: 16.18.93 resolution: "@types/node@npm:16.18.93" @@ -13089,6 +13698,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^12.1.0": + version: 12.1.0 + resolution: "commander@npm:12.1.0" + checksum: 10c0/6e1996680c083b3b897bfc1cfe1c58dfbcd9842fd43e1aaf8a795fbc237f65efcc860a3ef457b318e73f29a4f4a28f6403c3d653d021d960e4632dd45bde54a9 + languageName: node + linkType: hard + "commander@npm:^2.18.0, commander@npm:^2.20.0, commander@npm:^2.8.1": version: 2.20.3 resolution: "commander@npm:2.20.3" @@ -13879,6 +14495,13 @@ __metadata: languageName: node linkType: hard +"decode-uri-component@npm:^0.4.1": + version: 0.4.1 + resolution: "decode-uri-component@npm:0.4.1" + checksum: 10c0/a180bbdb5398ec8270d236a3ac07cb988bbf6097428481780b85840f088951dc0318a8d8f9d56796e1a322b55b29859cea29982f22f9b03af0bc60974c54e591 + languageName: node + linkType: hard + "decompress-response@npm:^3.3.0": version: 3.3.0 resolution: "decompress-response@npm:3.3.0" @@ -15916,6 +16539,21 @@ __metadata: languageName: node linkType: hard +"ethers@npm:^6.13.4": + version: 6.13.4 + resolution: "ethers@npm:6.13.4" + dependencies: + "@adraffy/ens-normalize": "npm:1.10.1" + "@noble/curves": "npm:1.2.0" + "@noble/hashes": "npm:1.3.2" + "@types/node": "npm:22.7.5" + aes-js: "npm:4.0.0-beta.5" + tslib: "npm:2.7.0" + ws: "npm:8.17.1" + checksum: 10c0/efcf9f39f841e38af68ec23cdbd745432c239c256aac4929842d1af04e55d7be0ff65e462f1cf3e93586f43f7bdcc0098fd56f2f7234f36d73e466521a5766ce + languageName: node + linkType: hard + "ethers@npm:^6.7.1": version: 6.11.1 resolution: "ethers@npm:6.11.1" @@ -16464,6 +17102,13 @@ __metadata: languageName: node linkType: hard +"filter-obj@npm:^5.1.0": + version: 5.1.0 + resolution: "filter-obj@npm:5.1.0" + checksum: 10c0/716e8ad2bc352e206556b3e5695b3cdff8aab80c53ea4b00c96315bbf467b987df3640575100aef8b84e812cf5ea4251db4cd672bbe33b1e78afea88400c67dd + languageName: node + linkType: hard + "finalhandler@npm:1.2.0": version: 1.2.0 resolution: "finalhandler@npm:1.2.0" @@ -22306,6 +22951,17 @@ __metadata: languageName: node linkType: hard +"query-string@npm:^9.1.1": + version: 9.1.1 + resolution: "query-string@npm:9.1.1" + dependencies: + decode-uri-component: "npm:^0.4.1" + filter-obj: "npm:^5.1.0" + split-on-first: "npm:^3.0.0" + checksum: 10c0/16481f17754f660aec3cae7abb838a70e383dfcf152414d184e0d0f81fae426acf112b4d51bf754f9c256eaf83ba4241241ba907c8d58b6ed9704425e1712e8c + languageName: node + linkType: hard + "querystring@npm:0.2.1": version: 0.2.1 resolution: "querystring@npm:0.2.1" @@ -23856,6 +24512,13 @@ __metadata: languageName: node linkType: hard +"split-on-first@npm:^3.0.0": + version: 3.0.0 + resolution: "split-on-first@npm:3.0.0" + checksum: 10c0/a1262eae12b68de235e1a08e011bf5b42c42621985ddf807e6221fb1e2b3304824913ae7019f18436b96b8fab8aef5f1ad80dedd2385317fdc51b521c3882cd0 + languageName: node + linkType: hard + "split2@npm:^4.0.0": version: 4.2.0 resolution: "split2@npm:4.2.0" @@ -24792,6 +25455,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:2.7.0": + version: 2.7.0 + resolution: "tslib@npm:2.7.0" + checksum: 10c0/469e1d5bf1af585742128827000711efa61010b699cb040ab1800bcd3ccdd37f63ec30642c9e07c4439c1db6e46345582614275daca3e0f4abae29b0083f04a6 + languageName: node + linkType: hard + "tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.6.2": version: 2.6.2 resolution: "tslib@npm:2.6.2" @@ -24995,6 +25665,16 @@ __metadata: languageName: node linkType: hard +"typescript@npm:^5.4.5": + version: 5.7.2 + resolution: "typescript@npm:5.7.2" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/a873118b5201b2ef332127ef5c63fb9d9c155e6fdbe211cbd9d8e65877283797cca76546bad742eea36ed7efbe3424a30376818f79c7318512064e8625d61622 + languageName: node + linkType: hard + "typescript@npm:^5.5.3": version: 5.6.2 resolution: "typescript@npm:5.6.2" @@ -25035,6 +25715,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@npm%3A^5.4.5#optional!builtin": + version: 5.7.2 + resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin::version=5.7.2&hash=8c6c40" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/c891ccf04008bc1305ba34053db951f8a4584b4a1bf2f68fd972c4a354df3dc5e62c8bfed4f6ac2d12e5b3b1c49af312c83a651048f818cd5b4949d17baacd79 + languageName: node + linkType: hard + "typescript@patch:typescript@npm%3A^5.5.3#optional!builtin": version: 5.6.2 resolution: "typescript@patch:typescript@npm%3A5.6.2#optional!builtin::version=5.6.2&hash=8c6c40" @@ -25092,7 +25782,9 @@ __metadata: version: 0.0.0-use.local resolution: "ui-fusdc-lp@workspace:ui-fusdc-lp" dependencies: + "@agoric/fast-usdc": "npm:0.1.1-dev-ddff762.0" "@agoric/react-components": "npm:^0.1.1-dev-ca0ddde.0" + "@agoric/smart-wallet": "npm:0.5.4-dev-ddff762.0" "@agoric/ui-components": "npm:^0.3.9-u13.0" "@agoric/web-components": "npm:0.15.1-dev-8fc28e8.0" "@endo/eventual-send": "npm:^1.2.8" @@ -25183,6 +25875,13 @@ __metadata: languageName: node linkType: hard +"undici-types@npm:~6.19.2": + version: 6.19.8 + resolution: "undici-types@npm:6.19.8" + checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344 + languageName: node + linkType: hard + "unenv@npm:^1.10.0": version: 1.10.0 resolution: "unenv@npm:1.10.0" @@ -26367,6 +27066,21 @@ __metadata: languageName: node linkType: hard +"ws@npm:8.17.1": + version: 8.17.1 + resolution: "ws@npm:8.17.1" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 10c0/f4a49064afae4500be772abdc2211c8518f39e1c959640457dcee15d4488628620625c783902a52af2dd02f68558da2868fd06e6fd0e67ebcd09e6881b1b5bfe + languageName: node + linkType: hard + "ws@npm:8.18.0": version: 8.18.0 resolution: "ws@npm:8.18.0" From 94b11df8cead2eb1e8093ea137057039985ff1e5 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Thu, 12 Dec 2024 20:40:15 -0600 Subject: [PATCH 4/4] WIP: misc static types --- ui-fusdc-lp/src/App.tsx | 72 ++++++++++++++++-------- ui-fusdc-lp/src/components/Dashboard.tsx | 5 +- 2 files changed, 52 insertions(+), 25 deletions(-) diff --git a/ui-fusdc-lp/src/App.tsx b/ui-fusdc-lp/src/App.tsx index b839ed6..d89b299 100644 --- a/ui-fusdc-lp/src/App.tsx +++ b/ui-fusdc-lp/src/App.tsx @@ -1,4 +1,5 @@ import { AmountMath } from '@agoric/ertp'; +import type { PoolMetrics } from '@agoric/fast-usdc/src/types.ts'; import { subscribeLatest } from '@agoric/notifier'; import { AgoricProvider } from '@agoric/react-components'; import '@agoric/react-components/dist/style.css'; @@ -6,6 +7,8 @@ import { AgoricChainStoragePathKind as Kind, makeAgoricChainStorageWatcher, } from '@agoric/rpc'; +import type { OfferSpec } from '@agoric/smart-wallet/src/offers'; +import type { CurrentWalletRecord } from '@agoric/smart-wallet/src/smartWallet.d.ts'; import { makeAgoricWalletConnection, suggestChain, @@ -23,8 +26,23 @@ import Dashboard from './components/Dashboard'; import { Navbar } from './components/Navbar'; import './index.css'; +// XXX import type { USDCProposalShapes } from '@agoric/fast-usdc/src/types.ts'; +type USDCProposalShapes = { + deposit: { + give: { USDC: Amount<'nat'> }; + want?: { PoolShare: Amount<'nat'> }; + }; + withdraw: { + give: { PoolShare: Amount<'nat'> }; + want: { USDC: Amount<'nat'> }; + }; +}; +type PurseRecord = CurrentWalletRecord['purses']; + type Wallet = Awaited>; +const { fromEntries } = Object; + const ENDPOINTS = { RPC: 'http://localhost:26657', API: 'http://localhost:1317', @@ -34,8 +52,8 @@ const watcher = makeAgoricChainStorageWatcher(ENDPOINTS.API, 'agoriclocal'); interface AppState { wallet?: Wallet; fusdcInstance?: unknown; - brands?: Record; - purses?: Array; + brands?: Record; + purses?: Array; metrics?: Record; } const useAppStore = create(() => ({})); @@ -43,25 +61,25 @@ const useAppStore = create(() => ({})); const setup = async () => { watcher.watchLatest>( [Kind.Data, 'published.agoricNames.instance'], - instances => { + pairs => { + const instances = fromEntries(pairs); console.log('got instances', instances); useAppStore.setState({ - fusdcInstance: instances.find(([name]) => name === 'fastUsdc')!.at(1), + fusdcInstance: instances.fastUsdc, }); } ); - watcher.watchLatest>( + watcher.watchLatest>( [Kind.Data, 'published.agoricNames.brand'], - brands => { + pairs => { + const brands = fromEntries(pairs); console.log('Got brands', brands); - useAppStore.setState({ - brands: Object.fromEntries(brands), - }); + useAppStore.setState({ brands }); } ); - watcher.watchLatest>( + watcher.watchLatest>( [Kind.Data, 'published.fastUsdc.poolMetrics'], metrics => { console.log('Got metrics', metrics); @@ -71,19 +89,21 @@ const setup = async () => { } ); }; -const parseUSDCAmount = (amountString, usdc) => { + +const parseUSDCAmount = (numeral: string, usdc: Brand): Amount<'nat'> => { const USDC_DECIMALS = 6; const unit = AmountMath.make(usdc, 10n ** BigInt(USDC_DECIMALS)); - return multiplyBy(unit, parseRatio(amountString, usdc)); + return multiplyBy(unit, parseRatio(numeral, usdc)); }; const connectWallet = async () => { - await suggestChain('https://local.agoric.net/network-config'); - const wallet = await makeAgoricWalletConnection(watcher, ENDPOINTS.RPC); + const info = await suggestChain('https://local.agoric.net/network-config'); + console.log('connectWallet: chain info', info); + const wallet = await makeAgoricWalletConnection(watcher, info.rpc); useAppStore.setState({ wallet }); console.log('wallet', wallet); const { pursesNotifier } = wallet; - for await (const purses of subscribeLatest(pursesNotifier)) { + for await (const purses of subscribeLatest(pursesNotifier)) { console.log('got purses', purses); useAppStore.setState({ purses }); } @@ -93,21 +113,25 @@ const makeDepositOffer = () => { const { wallet, fusdcInstance, brands } = useAppStore.getState(); if (!fusdcInstance) throw Error('no contract instance'); if (!(brands && brands.USDC)) throw Error('brands not available'); - const proposal = { - give: { - USDC: parseUSDCAmount('10', brands.USDC), - }, + const proposal: USDCProposalShapes['deposit'] = { + give: { USDC: parseUSDCAmount('10', brands.USDC) }, }; - console.log('about to make offer', wallet); - wallet?.makeOffer( - { - source: 'agoricContract', + const depositSpec: OfferSpec = { + id: 'unused', + invitationSpec: { + source: 'contract', instance: fusdcInstance, - callPipe: [['makeDepositInvitation', []]], + publicInvitationMaker: 'makeDepositInvitation', }, proposal, + }; + console.log('about to make offer', wallet, depositSpec); + wallet?.makeOffer( + depositSpec.invitationSpec, + depositSpec.proposal, undefined, (update: { status: string; data?: unknown }) => { + console.log('@@@@offer update', update); if (update.status === 'error') { alert(`Offer error: ${update.data}`); } diff --git a/ui-fusdc-lp/src/components/Dashboard.tsx b/ui-fusdc-lp/src/components/Dashboard.tsx index c9b15ef..b1f05d2 100644 --- a/ui-fusdc-lp/src/components/Dashboard.tsx +++ b/ui-fusdc-lp/src/components/Dashboard.tsx @@ -9,7 +9,10 @@ const headerData = [ { title: 'Fees Earned (24h)', value: '$890', description: 'USDC' }, ]; -const Dashboard = ({ makeDepositOffer, makeWithdrawOffer }) => ( +const Dashboard = ({ + makeDepositOffer, + makeWithdrawOffer, +}: Record) => (