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
1ee5b9d9
Unverified
Commit
1ee5b9d9
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
c5b48fea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
sdk.md
packages/atst/docs/sdk.md
+8
-5
No files found.
packages/atst/docs/sdk.md
View file @
1ee5b9d9
...
...
@@ -13,7 +13,7 @@ Typescript sdk for interacting with the ATST based on [@wagmi/core](https://wagm
## Installation
Install atst and it
'
s peer dependencies.
Install atst and its peer dependencies.
npm
...
...
@@ -100,6 +100,7 @@ await writeAttestation(preparedTx)
### High level API
These functions are the easiest way to interact with the AttestationStation contract.
For a more detailed explanation,
[
see the tutorial
](
https://github.com/ethereum-optimism/optimism-tutorial/tree/main/ecosystem/attestation-station/using-sdk
)
.
#### `prepareWriteAttestation`
...
...
@@ -111,16 +112,18 @@ const preparedTx = await prepareWriteAttestation(about, key, 'hello world')
console
.
log
(
preparedTx
.
gasFee
)
```
**Return Value:**
A prepared transaction, ready for
[
`writeAttestation`
](
#writeattestation
)
.
#### `readAttestation`
[
Reads
](
https://wagmi.sh/core/actions/readContract
)
and parses an attestation based on its data type.
```
typescript
const
attestation
=
await
readAttestation
(
creator
,
// Address: The creator of the attestation
about
,
// Address: The about topic of the attestation
key
,
// string: The key of the attestation
dataType
,
// Optional, the data type of the attestation, 'string' | 'bytes' | 'number' | 'bool' | 'address'
creator
,
// Address: The creator of the attestation
about
,
// Address: The about topic of the attestation
key
,
// string: The key of the attestation
dataType
,
// Optional, the data type of the attestation, 'string' | 'bytes' | 'number' | 'bool' | 'address'
contractAddress
// Optional address: the contract address of the attestation station
)
```
...
...
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