@chain-registry/keplr
Advanced tools
Comparing version 0.2.1 to 0.3.0
@@ -6,4 +6,12 @@ # Change Log | ||
# [0.3.0](https://github.com/cosmology-tech/chain-registry/compare/@chain-registry/keplr@0.2.1...@chain-registry/keplr@0.3.0) (2022-08-13) | ||
**Note:** Version bump only for package @chain-registry/keplr | ||
## 0.2.1 (2022-08-13) | ||
**Note:** Version bump only for package @chain-registry/keplr |
{ | ||
"name": "@chain-registry/keplr", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "Chain Registry to Keplr", | ||
@@ -79,7 +79,7 @@ "author": "Dan Lynch <pyramation@gmail.com>", | ||
"@babel/runtime": "^7.18.3", | ||
"@chain-registry/types": "^0.2.1", | ||
"@chain-registry/types": "^0.3.0", | ||
"@keplr-wallet/cosmos": "^0.10.3", | ||
"@keplr-wallet/crypto": "^0.10.11" | ||
}, | ||
"gitHead": "786591e22bca470c80885f984369c1acb24ac36b" | ||
"gitHead": "60025ec3ae56af03dc7e4217344a915508f4d45a" | ||
} |
@@ -1,3 +0,39 @@ | ||
# chain-registry utils | ||
# @chain-registry/keplr | ||
Utility functions for the chain-registry | ||
<p align="center" width="100%"> | ||
<img height="90" src="https://user-images.githubusercontent.com/545047/184277736-69fef40f-1991-4c0e-b979-da125cf7fd8f.svg" /> | ||
</p> | ||
<p align="center" width="100%"> | ||
<a href="https://github.com/cosmology-tech/chain-registry/actions/workflows/run-tests.yml"> | ||
<img height="20" src="https://github.com/cosmology-tech/chain-registry/actions/workflows/run-tests.yml/badge.svg" /> | ||
</a> | ||
<a href="https://github.com/cosmology-tech/chain-registry/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"></a> | ||
<a href="https://www.npmjs.com/package/@chain-registry/keplr"><img height="20" src="https://img.shields.io/github/package-json/v/cosmology-tech/chain-registry?filename=packages%2Fkeplr%2Fpackage.json"></a> | ||
</p> | ||
Keplr integration for the chain-registry returning keplr's `ChainInfo` type from `@chain-registry/types` `Chain` type. | ||
``` | ||
npm install @chain-registry/keplr | ||
``` | ||
```js | ||
import { assets, chains } from 'chain-registry'; | ||
import { chainRegistryChainToKeplr } from '@chain-registry/keplr'; | ||
import { ChainInfo } from '@keplr-wallet/types'; | ||
const chain = chains.find(({chain_name})=>chain_name==='osmosis'); | ||
const config: ChainInfo = chainRegistryChainToKeplr(chain, assets); | ||
// you can add options as well to choose endpoints | ||
const config: ChainInfo = chainRegistryChainToKeplr(chain, assets, { | ||
getExplorer: () => 'https://myexplorer.com', | ||
getRestEndpoint: (chain) => chain.apis?.rest[1]?.address | ||
getRpcEndpoint: (chain) => chain.apis?.rpc[1]?.address | ||
}); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12225
39
+ Added@chain-registry/types@0.3.1(transitive)
- Removed@chain-registry/types@0.2.1(transitive)
Updated@chain-registry/types@^0.3.0