Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iov-one/asset-directory
https://github.com/iov-one/asset-directory
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/iov-one/asset-directory
- Owner: iov-one
- Created: 2020-09-03T09:11:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-30T11:08:34.000Z (almost 2 years ago)
- Last Synced: 2024-10-13T11:09:12.155Z (3 months ago)
- Language: TypeScript
- Size: 8.87 MB
- Stars: 3
- Watchers: 4
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IOV Asset Directory
A digital asset directory, that holds metadata of various crypto tokens
## How to add an asset
```sh
MY_FORK=github_id # replace 'github_id' with your github id
git clone --recurse-submodules https://github.com/${MY_FORK}/asset-directory.git \
&& cd asset-directory \
&& yarn install \
&& yarn add-asset \
&& yarn aggregate
```follow the prompt(s). You will see a success message at the end after aggregation of assets
If all goes well, commit your changes, push and then submit a PR.## Installation
```sh
yarn add @iov/asset-directory
```## Usage
```ts
import assets, { Asset } from "@iov/asset-directory";assets.map((asset: Asset) => console.log(asset.name));
// Output
Algorand
Bitcoin
Crypto.org
...
```## Scripts
- [asset.ts](src/addAsset.ts) - adds an asset to the directory
- [aggregate.ts](src/aggregate.ts) - combines indivdual asset data into single assets file
- [writer.ts](src/writer.ts) - writes aggregated assets.ts(json) file