From a01a6e0025306403e06f915da2ba31aa19d8e41a Mon Sep 17 00:00:00 2001 From: samsiegart Date: Thu, 29 Feb 2024 23:37:41 -0800 Subject: [PATCH] chore: update README with custom ChainProvider guidance --- packages/react-components/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/react-components/README.md b/packages/react-components/README.md index 27f53f8..d4d45b5 100644 --- a/packages/react-components/README.md +++ b/packages/react-components/README.md @@ -78,3 +78,7 @@ The modal will persist the user's chosen API endpoints in local storage, and ove All Agoric-related state is accessible through the `useAgoric` hook. See [`AgoricContext`](https://github.com/Agoric/ui-kit/blob/585b47d158a983643659a2cfccd76f772933db7e/packages/react-components/src/lib/context/AgoricContext.ts#L28-L39) for the full interface. For more details on making offers and reading chain data with `AgoricWalletConnection` and `ChainStorageWatcher`, see [Agoric/ui-kit](https://github.com/Agoric/ui-kit). + +## Using a Custom `ChainProvider` + +If you need to configure `ChainProvider` more, or have an existing `cosmos-kit` dapp that you want to add Agoric functionality to, the [`AgoricProviderLite`](https://github.com/Agoric/ui-kit/blob/585b47d158a983643659a2cfccd76f772933db7e/packages/react-components/src/lib/context/AgoricProviderLite.tsx) component can be used directly inside your own `ChainProvider`. [Under the hood](https://github.com/Agoric/ui-kit/blob/585b47d158a983643659a2cfccd76f772933db7e/packages/react-components/src/lib/context/AgoricProvider.tsx#L27-L61), `AgoricProvider` provides a default `ChainProvider` implementation and wraps `AgoricProviderLite`.