https://github.com/foscomputerservices/cryptoscraper
CryptoScraper is a package for generalizing the retrieval of information from crypto block chains
https://github.com/foscomputerservices/cryptoscraper
cryptocurrency swift
Last synced: about 1 year ago
JSON representation
CryptoScraper is a package for generalizing the retrieval of information from crypto block chains
- Host: GitHub
- URL: https://github.com/foscomputerservices/cryptoscraper
- Owner: foscomputerservices
- License: mit
- Created: 2023-02-06T09:58:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-07T12:53:35.000Z (almost 3 years ago)
- Last Synced: 2025-02-09T03:07:33.679Z (over 1 year ago)
- Topics: cryptocurrency, swift
- Language: Swift
- Homepage:
- Size: 226 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# CryptoScraper
  [](https://swiftpackageindex.com/foscomputerservices/CryptoScraper) [](https://swiftpackageindex.com/foscomputerservices/CryptoScraper)
CryptoScraper is a package for generalizing the retrieval of information from crypto block chains.
## How To Get Started
### Swift Package Manager
CryptoScraper supports the [Swift Package Manager](https://www.swift.org/package-manager/). To include CryptoScraper in your project add the following to your Package.swift file:
```
.package(url: "git@github.com:foscomputerservices/CryptoScraper.git", branch: "main"),
```
### API Keys
To begin, api keys need to be set in order to access various services. These keys are stored in environment variables as follows:
| Service | Environment Variable | Required |
|----------------- | ----------------- | -------- |
| [Etherscan](https://docs.etherscan.io/getting-started/viewing-api-usage-statistics#creating-an-api-key) | ETHER_SCAN_KEY | No |
| [Fantom](https://docs.etherscan.io/getting-started/viewing-api-usage-statistics#creating-an-api-key) | FTM_SCAN_KEY | No |
| [BinanceSmartChain](https://docs.bscscan.com/getting-started/viewing-api-usage-statistics) | BSC_SCAN_KEY | No |
| [Polygon](https://docs.polygonscan.com/getting-started/viewing-api-usage-statistics) | POLYGON_SCAN_KEY | No |
| [Optimism](https://docs.optimism.etherscan.io/getting-started/viewing-api-usage-statistics) | OPTIMISTIC_ETHER_SCAN_KEY | No |
| [CoinGecko](https://www.coingecko.com/en/api) | COIN_GECKO_KEY| No |
| [CoinMarketCap](https://www.coingecko.com/en/api) | COIN_MARKETCAP_KEY| No |
To begin using the framework call the initialization method to initialize the block chains with their contract data.
```swift
try await CryptoScraper.initialize()
```
## Testing
In order for testing to succeed, a test contract is needed for each chain. These contracts can be provided in the environment as follows:
| Service | Environment Variable |
| --------------- | -------------------- |
| Bitcoin | BTC_TEST_CONTRACT_ADDRESS |
| Ethereum | ETH_TEST_CONTRACT_ADDRESS |
| Fantom | FTM_TEST_CONTRACT_ADDRESS |
| BNB | BSC_TEST_CONTRACT_ADDRESS |
| Matic | POLYGON_TEST_CONTRACT_ADDRESS |
| Optimism | OPTIMISTIC_TEST_CONTRACT_ADDRESS |
| Tron | TRON_TEST_CONTRACT_ADDRESS |
## Full Documentation
For complete documentation, please refer to the DocC documentation in Xcode or [here](https://swiftpackageindex.com/foscomputerservices/CryptoScraper) for an online version (see the documentation tab in the top-right).
## Contributing
All contributions are welcome! Please see [CONTRIBUTING.md](https://github.com/foscomputerservices/CryptoScraper/blob/main/CONTRIBUTING.md) for more details.
## Maintainers
This project is maintained by [David Hunt](https://www.linkedin.com/in/davidhun/) owner of [FOS Computer services, LLC](https://www.linkedin.com/company/1856731).
## License
CryptoScraper is under the MIT License. See the [LICENSE](https://github.com/foscomputerservices/CryptoScraper/blob/main/LICENSE) file for more information.