https://github.com/leapwallet/cosmos-directory-chains-sync
https://github.com/leapwallet/cosmos-directory-chains-sync
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/leapwallet/cosmos-directory-chains-sync
- Owner: leapwallet
- Created: 2024-06-11T04:38:04.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-08-08T10:15:47.000Z (10 months ago)
- Last Synced: 2024-12-27T17:30:22.207Z (5 months ago)
- Language: TypeScript
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction
This is a script that gets the cosmos.directory data from GitHub and converts it into a JSON file, stores it on S3 and invalidates the cloudfront cache.
The generated data is of the following type -
```ts
import type { ChainInfo } from '@keplr-wallet/types'type GeneratedData = {
mainnet: Record
testnet: Record
}
```# Usage
## Install Dependencies
```sh
yarn install
```## Build TS Script
```sh
yarn build
```## Load the Environment Variables
```sh
export AWS_REGION="..."
export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
export S3_BUCKET_NAME="..."
export CLOUDFRONT_DISTRIBUTION_ID="..."
```> Note: Missing environment variables will cause the script to throw an error.
## Run the Generated JS
```sh
yarn start
```# Data Usage
The data is served via cloudfront and can be accessed via the following path -
`/cosmos-directory-cache/graz-chains.json`