From fbe738105e0aaa871d2b78dcc73f6db9d93fb197 Mon Sep 17 00:00:00 2001 From: Brian Doyle Date: Mon, 20 Nov 2023 08:59:39 -0500 Subject: [PATCH] Partial --- .../configuring-providers-sbs.md | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/apps/base-docs/docs/connecting-to-the-blockchain/configuring-providers-sbs.md b/apps/base-docs/docs/connecting-to-the-blockchain/configuring-providers-sbs.md index c54581d0ef..d5053bcc03 100644 --- a/apps/base-docs/docs/connecting-to-the-blockchain/configuring-providers-sbs.md +++ b/apps/base-docs/docs/connecting-to-the-blockchain/configuring-providers-sbs.md @@ -171,10 +171,33 @@ To test this out, comment out `publicProvider()`, and switch networks a few time ### Blockdaemon -[Blockdaemon] also needs to be set up as a JSON RPC provider. Log in, [or create an account], navigate to the `API Suite` tab on the left, and click `Create API Key`. +You'll also need an account with [Blockdaemon], if you want to use it as a JSON RPC provider. Log in, [or create an account], navigate to the `API Suite` tab on the left, and click `Create API Key`. ![Create api key](../../assets/images/connecting-to-the-blockchain/blockdaemon-create-key.png) +You can find the [urls for different networks] in their docs. To connect to Base, add the below to your list of providers: + +```typescript +const { chains, publicClient, webSocketPublicClient } = configureChains( + [mainnet, optimism, base], + [ + // other providers + jsonRpcProvider({ + rpc: () => ({ + http: 'https://svc.blockdaemon.com/base/mainnet/native/http-rpc?apiKey=', + }), + }), + publicProvider(), + ], +); +``` + +:::caution + +This key is also exposed publicly! Be sure to configure an allowlist before deploying! + +::: + TODO PENDING MORE INFORMATION!!! ### Alchemy @@ -233,3 +256,5 @@ In this guide, you've learned how to connect your app to the blockchain using se [allowlist]: https://docs.alchemy.com/docs/how-to-add-allowlists-to-your-apps-for-enhanced-security [baked into wagmi]: https://wagmi.sh/react/providers/alchemy [create an account]: https://app.blockdaemon.com/signin/register + +[urls for different networks]