Skip to content

leapwallet/cosmos-directory-chains-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 -

import type { ChainInfo } from '@keplr-wallet/types'

type GeneratedData = {
  mainnet: Record<string, ChainInfo>
  testnet: Record<string, ChainInfo>
}

Usage

Install Dependencies

yarn install

Build TS Script

yarn build

Load the Environment Variables

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

yarn start

Data Usage

The data is served via cloudfront and can be accessed via the following path -

/cosmos-directory-cache/graz-chains.json

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published