atst is a typescript / javascript sdk and cli around AttestationStation
Visit Docs for general documentation on AttestationStation.
Install
npm install @eth-optimism/atst wagmi @wagmi/core ethers@5.7.0
The typescript sdk provides a clean wagmi based interface for reading and writing to AttestationStation.
See sdk docs for usage instructions.
The cli provides a convenient cli for interacting with the AttestationStation contract
See cli docs for usage instructions.
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.
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.
If you have any problems, these resources could help you: