eas-accessor
is a library for interacting with the Ethereum Attestation Service (EAS). It provides functionality for accessing and managing attestations to associate Ethereum Name Service Domain Names and Addresses to a main attesting account on the Ethereum blockchain.
You can install eas-accessor
using npm:
npm install @ethereum-attestation-service/eas-accessor
To use eas-accessor
, you first need to initialize it with a provider and contract addresses:
const { EASAccessor } = require('@ethereum-attestation-service/eas-accessor');
const provider = new ethers.providers.JsonRpcProvider('http://localhost:8545');
const contractAddresses = {
EAS: '0x...',
SchemaRegistry: '0x...',
...
};
const accessor = new EASAccessor(provider, contractAddresses);
Once initialized, you can use eas-accessor
to interact with the EAS contracts. For example, to get an attestation:
const attestation = await accessor.getAttestation('0x...');
console.log(attestation);
You can configure eas-accessor
by passing different options to the constructor. For example, you can specify a different gas price:
const accessor = new EASAccessor(provider, contractAddresses, {
gasPrice: ethers.utils.parseUnits('10', 'gwei')
});
Contributions are welcome! Please see the contribution guidelines for more information.
This project is licensed under the MIT License - see the LICENSE file for details.
eas-accessor
is developed and maintained by accessor.eth.