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.
[See their documentation for more information](https://wagmi.sh/core/getting-started).
```javascript
import { createClient } from '@wagmi/core'
import { providers } from 'ethers'
const provider = new providers.JsonRpcProvider({
url: "https://mainnet.optimism.io",
headers: {
'User-Agent': '@eth-optimism/atst',
},
})
import ethers from "ethers"
const wagmiCore = await import("@wagmi/core")
const wagmiAlchemy = await import("@wagmi/core/providers/alchemy")
const wagmiChains = await import("@wagmi/core/chains")
const { chains, provider, webSocketProvider } = wagmiCore.configureChains(
[wagmiChains.optimismGoerli],
[wagmiAlchemy.alchemyProvider({ apiKey: process.env.ALCHEMY_API_KEY })],
)
createClient({
wagmiCore.createClient({
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
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