Commit 48f40901 authored by Ori Pomerantz's avatar Ori Pomerantz Committed by GitHub

Update sdk.md

parent 76ff5894
...@@ -44,21 +44,25 @@ atst uses `@wagmi/core` under the hood. ...@@ -44,21 +44,25 @@ atst uses `@wagmi/core` under the hood.
[See their documentation for more information](https://wagmi.sh/core/getting-started). [See their documentation for more information](https://wagmi.sh/core/getting-started).
```javascript ```javascript
import { createClient } from '@wagmi/core' import ethers from "ethers"
import { providers } from 'ethers' const wagmiCore = await import("@wagmi/core")
const wagmiAlchemy = await import("@wagmi/core/providers/alchemy")
const provider = new providers.JsonRpcProvider({ const wagmiChains = await import("@wagmi/core/chains")
url: "https://mainnet.optimism.io",
headers: { const { chains, provider, webSocketProvider } = wagmiCore.configureChains(
'User-Agent': '@eth-optimism/atst', [wagmiChains.optimismGoerli],
}, [wagmiAlchemy.alchemyProvider({ apiKey: process.env.ALCHEMY_API_KEY })],
}) )
createClient({ wagmiCore.createClient({
provider, provider,
webSocketProvider
}) })
``` ```
To be able to write attesations you also need to connect to a wallet that will sign and pay the transactions.
[See here for more details](https://wagmi.sh/examples/connect-wallet)
### Reading an attestation ### Reading an attestation
Here is an example of reading an attestation used by the optimist nft Here is an example of reading an attestation used by the optimist nft
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment