Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cosmjs/launchpad

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cosmjs/launchpad - npm Package Compare versions

Comparing version 0.22.1 to 0.22.2

21

build/coins.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.coins = exports.coin = void 0;
exports.parseCoins = exports.coins = exports.coin = void 0;
const math_1 = require("@cosmjs/math");

@@ -15,2 +15,21 @@ /** Creates a coin */

exports.coins = coins;
/**
* Takes a coins list like "819966000ucosm,700000000ustake" and parses it
*/
function parseCoins(input) {
return input
.replace(/\s/g, "")
.split(",")
.filter(Boolean)
.map((part) => {
const match = part.match(/^([0-9]+)([a-zA-Z]+)/);
if (!match)
throw new Error("Got an invalid coin string");
return {
amount: math_1.Uint64.fromString(match[1]).toString(),
denom: match[2],
};
});
}
exports.parseCoins = parseCoins;
//# sourceMappingURL=coins.js.map

@@ -31,2 +31,3 @@ "use strict";

Object.defineProperty(exports, "coins", { enumerable: true, get: function () { return coins_1.coins; } });
Object.defineProperty(exports, "parseCoins", { enumerable: true, get: function () { return coins_1.parseCoins; } });
var cosmosclient_1 = require("./cosmosclient");

@@ -33,0 +34,0 @@ Object.defineProperty(exports, "assertIsPostTxSuccess", { enumerable: true, get: function () { return cosmosclient_1.assertIsPostTxSuccess; } });

12

package.json
{
"name": "@cosmjs/launchpad",
"version": "0.22.1",
"version": "0.22.2",
"description": "A client library for the Cosmos SDK 0.37 (cosmoshub-3), 0.38 and 0.39 (Launchpad)",

@@ -44,6 +44,6 @@ "contributors": [

"dependencies": {
"@cosmjs/crypto": "^0.22.1",
"@cosmjs/encoding": "^0.22.1",
"@cosmjs/math": "^0.22.1",
"@cosmjs/utils": "^0.22.1",
"@cosmjs/crypto": "^0.22.2",
"@cosmjs/encoding": "^0.22.2",
"@cosmjs/math": "^0.22.2",
"@cosmjs/utils": "^0.22.2",
"axios": "^0.19.0"

@@ -54,3 +54,3 @@ },

},
"gitHead": "04a086a6cbaa79e52bda62e13913c88d6500139a"
"gitHead": "56d635fc6a0986972bb5e9a57625838627c10c7d"
}

@@ -9,1 +9,5 @@ export interface Coin {

export declare function coins(amount: number, denom: string): Coin[];
/**
* Takes a coins list like "819966000ucosm,700000000ustake" and parses it
*/
export declare function parseCoins(input: string): Coin[];
import * as logs from "./logs";
export { logs };
export { pubkeyToAddress, rawSecp256k1PubkeyToAddress } from "./address";
export { Coin, coin, coins } from "./coins";
export { Coin, coin, coins, parseCoins } from "./coins";
export {

@@ -6,0 +6,0 @@ Account,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc