Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
48f40901
Unverified
Commit
48f40901
authored
Mar 07, 2023
by
Ori Pomerantz
Committed by
GitHub
Mar 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update sdk.md
parent
76ff5894
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
sdk.md
packages/atst/docs/sdk.md
+14
-10
No files found.
packages/atst/docs/sdk.md
View file @
48f40901
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment