@eth-optimism/atst
v0.2.0
Published
<div align="center"> <br /> <br /> <a href="https://optimism.io"><img alt="Optimism" src="https://raw.githubusercontent.com/ethereum-optimism/brand-kit/main/assets/svg/OPTIMISM-R.svg" width=600></a> <br /> <h3>@eth-optimism/atst</h3> The officia
Downloads
42
Readme
atst
atst is a typescript / javascript sdk and cli around AttestationStation
Visit Docs for general documentation on AttestationStation.
Getting started
Install
npm install @eth-optimism/atst wagmi @wagmi/core [email protected]
atst typescript/javascript sdk
The typescript sdk provides a clean wagmi based interface for reading and writing to AttestationStation.
See sdk docs for usage instructions.
atst cli
The cli provides a convenient cli for interacting with the AttestationStation contract
See cli docs for usage instructions.
React API
For react hooks we recomend using the wagmi cli with the etherscan plugin and react plugin to automatically generate react hooks around AttestationStation.
Use createKey
and createValue
to convert your raw keys and values into bytes that can be used in AttestationStation contract calls
Use parseString
, parseBool
, parseAddress
and parseNumber
to convert values returned by AttestationStation to their correct data type.
For convenience we also export the hooks here:
useAttestationStationAttestation
- Reads attestations with useContractReaduseAttestationStationVersion
- Reads attestation versionuseAttestationStationAttest
- Wraps useContractWrite with AttestationStation abi calling attestusePrepareAttestationStationAttest
- Wraps usePrepare with AttestationStation abi calling attestuseAttestationStationAttestationCreatedEvent
- Wraps useContractEvents for Created events
Also some more hooks exported by the cli but these are likely the only ones you need.
Contributing
Please see our contributing.md. No contribution is too small.
Having your contribution denied feels bad. Please consider opening an issue before adding any new features or apis.
Getting help
If you have any problems, these resources could help you: