Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahmad-maartmesrini/first-package
https://github.com/ahmad-maartmesrini/first-package
alchemy ethereum etherscan
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ahmad-maartmesrini/first-package
- Owner: Ahmad-Maartmesrini
- License: mit
- Created: 2024-03-03T17:02:27.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-03-17T15:26:15.000Z (10 months ago)
- Last Synced: 2024-03-17T16:29:50.621Z (10 months ago)
- Topics: alchemy, ethereum, etherscan
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/con3x-task-package
- Size: 170 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**Technical Task Package**
---
### Installation
You can install this npm package by typing the following command in your terminal:
```
npm install technical-task
```### Usage
This npm package provides two main functions:
1. **getLastBlockNumber**: Fetches the last block number of the Ethereum mainnet using the Alchemy SDK API key.
2. **Balance**: Fetches the balance of a given Ethereum address.
### How to Use
To use the functions provided by this package, import them into your project as needed.
```typescript
import { getLastBlockNumber, Balance } from "technical-task";// Example usage of getLastBlockNumber
const lastBlockNumber = await getLastBlockNumber();// Example usage of Balance
const address = "0x1234567890123456789012345678901234567890";
const balance = await Balance(address, "your-api-key");
```- **getLastBlockNumber** function expects an Alchemy SDK API key as an argument.
- **Balance** function expects an Ethereum address as an argument.### License
This package is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.