Socket
Socket
Sign inDemoInstall

@chain-registry/keplr

Package Overview
Dependencies
5
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.2.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [1.2.0](https://github.com/cosmology-tech/chain-registry/compare/@chain-registry/keplr@1.1.0...@chain-registry/keplr@1.2.0) (2022-10-20)
**Note:** Version bump only for package @chain-registry/keplr
# [1.1.0](https://github.com/cosmology-tech/chain-registry/compare/@chain-registry/keplr@1.0.1...@chain-registry/keplr@1.1.0) (2022-10-20)

@@ -8,0 +16,0 @@

41

main/index.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -9,36 +8,24 @@ value: true

exports.chainRegistryChainToKeplr = void 0;
var _cosmos = require("@keplr-wallet/cosmos");
var _semver = _interopRequireDefault(require("semver"));
var getRpc = function getRpc(chain) {
var _chain$apis, _chain$apis$rpc$;
return (_chain$apis = chain.apis) === null || _chain$apis === void 0 ? void 0 : (_chain$apis$rpc$ = _chain$apis.rpc[0]) === null || _chain$apis$rpc$ === void 0 ? void 0 : _chain$apis$rpc$.address;
};
var getRest = function getRest(chain) {
var _chain$apis2, _chain$apis2$rest$;
return (_chain$apis2 = chain.apis) === null || _chain$apis2 === void 0 ? void 0 : (_chain$apis2$rest$ = _chain$apis2.rest[0]) === null || _chain$apis2$rest$ === void 0 ? void 0 : _chain$apis2$rest$.address;
};
var getExplr = function getExplr(chain) {
var _chain$explorers, _chain$explorers$;
return (_chain$explorers = chain.explorers) === null || _chain$explorers === void 0 ? void 0 : (_chain$explorers$ = _chain$explorers[0]) === null || _chain$explorers$ === void 0 ? void 0 : _chain$explorers$.url;
};
var cleanVer = function cleanVer(ver) {
if (!_semver["default"].valid(ver)) {
var spaces = ver.split('.').length;
switch (spaces) {
case 1:
return ver + '.0.0';
case 2:
return ver + '.0';
case 3:

@@ -50,6 +37,4 @@ default:

};
var chainRegistryChainToKeplr = function chainRegistryChainToKeplr(chain, assets) {
var _chain$codebase$cosmo, _chain$codebase, _chain$codebase2, _assets$find, _chain$fees, _chain$fees$fee_token, _chain$fees2, _chain$fees2$fee_toke, _chain$fees2$fee_toke2, _chain$fees$fee_token2, _chain$fees3, _chain$fees3$fee_toke, _chain$fees3$fee_toke2, _chain$fees$fee_token3, _chain$fees4, _chain$fees4$fee_toke, _chain$fees4$fee_toke2, _chain$staking, _currencies$find;
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {

@@ -63,17 +48,16 @@ getRpcEndpoint: getRpc,

if (!options.getExplorer) options.getExplorer = getExplr;
var features = []; // if NOT specified, we assume stargate, sorry not sorry
var features = [];
// if NOT specified, we assume stargate, sorry not sorry
var sdkVer = cleanVer((_chain$codebase$cosmo = (_chain$codebase = chain.codebase) === null || _chain$codebase === void 0 ? void 0 : _chain$codebase.cosmos_sdk_version) !== null && _chain$codebase$cosmo !== void 0 ? _chain$codebase$cosmo : '0.4');
// stargate
if (_semver["default"].satisfies(sdkVer, '>=0.4')) features.push('stargate');
// no-legacy-stdTx
if (_semver["default"].satisfies(sdkVer, '>=0.43')) features.push('no-legacy-stdTx');
// until further notice, assume 'ibc-transfer'
features.push('ibc-transfer');
var sdkVer = cleanVer((_chain$codebase$cosmo = (_chain$codebase = chain.codebase) === null || _chain$codebase === void 0 ? void 0 : _chain$codebase.cosmos_sdk_version) !== null && _chain$codebase$cosmo !== void 0 ? _chain$codebase$cosmo : '0.4'); // stargate
if (_semver["default"].satisfies(sdkVer, '>=0.4')) features.push('stargate'); // no-legacy-stdTx
if (_semver["default"].satisfies(sdkVer, '>=0.43')) features.push('no-legacy-stdTx'); // until further notice, assume 'ibc-transfer'
features.push('ibc-transfer'); // ibc-go
// ibc-go
if (_semver["default"].satisfies(sdkVer, '>=0.45')) features.push('ibc-go');
if ((_chain$codebase2 = chain.codebase) !== null && _chain$codebase2 !== void 0 && _chain$codebase2.cosmwasm_enabled) {
var _chain$codebase$cosmw;
features.push('cosmwasm');

@@ -83,3 +67,2 @@ var wasmVer = cleanVer((_chain$codebase$cosmw = chain.codebase.cosmwasm_version) !== null && _chain$codebase$cosmw !== void 0 ? _chain$codebase$cosmw : '0.24');

}
var chainAssets = ((_assets$find = assets.find(function (asset) {

@@ -91,2 +74,3 @@ return asset.chain_name === chain.chain_name;

})) || [];
/**

@@ -98,3 +82,2 @@ * FROM KEPLR chain-info.d.ts:

*/
var gasPriceStep = {

@@ -110,3 +93,2 @@ low: (_chain$fees$fee_token = (_chain$fees2 = chain.fees) === null || _chain$fees2 === void 0 ? void 0 : (_chain$fees2$fee_toke = _chain$fees2.fee_tokens) === null || _chain$fees2$fee_toke === void 0 ? void 0 : (_chain$fees2$fee_toke2 = _chain$fees2$fee_toke[0]) === null || _chain$fees2$fee_toke2 === void 0 ? void 0 : _chain$fees2$fee_toke2.low_gas_price) !== null && _chain$fees$fee_token !== void 0 ? _chain$fees$fee_token : 0.01,

var _currency$denom_units, _currency$logo_URIs$s, _currency$logo_URIs, _currency$logo_URIs2;
return {

@@ -145,3 +127,2 @@ coinDenom: currency.symbol,

};
exports.chainRegistryChainToKeplr = chainRegistryChainToKeplr;
{
"name": "@chain-registry/keplr",
"version": "1.1.0",
"version": "1.2.0",
"description": "Chain Registry to Keplr",

@@ -44,4 +44,4 @@ "author": "Dan Lynch <pyramation@gmail.com>",

"devDependencies": {
"@babel/cli": "7.18.10",
"@babel/core": "7.19.1",
"@babel/cli": "7.19.3",
"@babel/core": "7.19.6",
"@babel/eslint-parser": "^7.19.1",

@@ -51,15 +51,15 @@ "@babel/node": "^7.19.1",

"@babel/plugin-proposal-export-default-from": "7.18.10",
"@babel/plugin-proposal-object-rest-spread": "7.18.9",
"@babel/plugin-transform-runtime": "7.19.1",
"@babel/preset-env": "7.19.1",
"@babel/plugin-proposal-object-rest-spread": "7.19.4",
"@babel/plugin-transform-runtime": "7.19.6",
"@babel/preset-env": "7.19.4",
"@babel/preset-typescript": "^7.17.12",
"@types/jest": "^29.0.2",
"@typescript-eslint/eslint-plugin": "5.37.0",
"@typescript-eslint/parser": "5.37.0",
"@types/jest": "^29.2.0",
"@typescript-eslint/eslint-plugin": "5.40.1",
"@typescript-eslint/parser": "5.40.1",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "29.0.3",
"babel-jest": "29.2.1",
"babel-watch": "^7.0.0",
"chain-registry": "^1.1.0",
"chain-registry": "^1.2.0",
"cross-env": "^7.0.2",
"eslint": "8.23.1",
"eslint": "8.25.0",
"eslint-config-prettier": "^8.5.0",

@@ -69,17 +69,17 @@ "eslint-plugin-prettier": "^4.0.0",

"eslint-plugin-unused-imports": "2.0.0",
"jest": "^29.0.3",
"jest": "^29.2.1",
"long": "^5.2.0",
"prettier": "^2.7.0",
"regenerator-runtime": "^0.13.7",
"ts-jest": "^29.0.1",
"typescript": "^4.8.3"
"regenerator-runtime": "^0.13.10",
"ts-jest": "^29.0.3",
"typescript": "^4.8.4"
},
"dependencies": {
"@babel/runtime": "^7.19.0",
"@chain-registry/types": "^0.12.0",
"@keplr-wallet/cosmos": "^0.10.24",
"@keplr-wallet/crypto": "^0.10.24",
"semver": "^7.3.7"
"@babel/runtime": "^7.19.4",
"@chain-registry/types": "^0.13.0",
"@keplr-wallet/cosmos": "^0.11.12",
"@keplr-wallet/crypto": "^0.11.12",
"semver": "^7.3.8"
},
"gitHead": "1f570daf2ee8e4a86cd7addf97f453a322b2e9b3"
"gitHead": "36c1490330c272c8348ebc147595bd8af848d35d"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc