1.0.0 • Published 6 months ago
get-address-activity v1.0.0
getAddressActivity
A TypeScript utility for querying address activity from a blockchain graph API. This package provides a function to retrieve detailed account activity, including user operations and deposits, for a specified address.
Features
- Query address activity within specified block ranges.
- Retrieve account details, user operations, and deposit information.
- Format user operations to match Jiffyscan output.
Installation
Install the package using npm:
npm install your-package-name
To install dependencies:
bun install
To run:
bun run index.ts
This project was created using bun init
in bun v1.1.13. Bun is a fast all-in-one JavaScript runtime.
Usage
Here's a basic example of how to use the getAddressActivityFromGraph
function:
## API
### `getAddressActivityFromGraph`
Fetches address activity from the graph API.
#### Parameters
- `network`: `NetworkType` - The network to query (e.g., 'mainnet').
- `address`: `string` - The address to query.
- `first`: `number` - The number of records to fetch.
- `skip`: `number` - The number of records to skip.
- `start_block`: `number` - The starting block number.
- `end_block`: `number` - The ending block number.
- `graphApiKey`: `string` - Your graph API key.
#### Returns
- `Promise<any>` - A promise that resolves to the address activity data.
## Contributing
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Contact
For questions or support, please contact [Your Name](mailto:your.email@example.com).
1.0.0
6 months ago