New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cosmos-wallet

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cosmos-wallet - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

dist/cjs/constants/cosmos.d.ts

96

package.json
{
"name": "cosmos-wallet",
"version": "0.1.0",
"description": "Configurable Wallet for Cosmos SDK Chains",
"scripts": {
"clean": "rm -rf lib",
"build": "webpack",
"test": "mocha --require ./babel-polyfill.js test/**/*.spec.ts",
"check": "npm run clean && npm run build && npm run test"
},
"description": "Cosmos Wallet with Direct and Amino signing",
"version": "1.0.0",
"author": "Pedro Gomes <github.com/pedrouid>",
"license": "MIT",
"keywords": [
"cosmos",
"wallet",
"sdk",
"crypto"
"signer",
"amino",
"direct",
"crypto",
"cosmjs",
"cosmwasm",
"ibc",
"cosmoshub"
],
"author": "Pedro Gomes <github.com/pedrouid>",
"license": "MIT",
"main": "lib/index.js",
"directories": {
"lib": "lib",
"test": "test"
},
"files": [
"lib",
"src"
"dist"
],
"main": "dist/cjs/index.js",
"types": "dist/cjs/index.d.ts",
"unpkg": "dist/umd/index.min.js",
"homepage": "https://github.com/pedrouid/cosmos-wallet",
"repository": {

@@ -35,33 +33,37 @@ "type": "git",

},
"dependencies": {
"bech32": "1.1.3",
"bip32": "2.0.1",
"bip39": "2.6.0",
"crypto-js": "^3.1.9-1",
"secp256k1": "3.6.2"
"scripts": {
"start": "tsdx watch",
"clean": "rm -rf dist",
"build:cjs": "./node_modules/.bin/tsc -p tsconfig.cjs.json",
"build:umd": "webpack",
"build": "yarn clean && yarn build:cjs && yarn build:umd",
"test": "tsdx test ./test",
"lint": "tsdx lint src test",
"prepare": "yarn lint && yarn build && yarn test"
},
"devDependencies": {
"@babel/cli": "^7.1.2",
"@babel/core": "^7.1.2",
"@babel/node": "^7.0.0",
"@babel/polyfill": "^7.0.0",
"@babel/preset-env": "^7.1.0",
"@babel/preset-typescript": "^7.1.0",
"@babel/register": "^7.0.0",
"@types/bip39": "^2.4.2",
"@types/bech32": "^1.1.1",
"@types/crypto-js": "^3.1.43",
"@types/secp256k1": "^3.5.0",
"@types/chai": "^4.1.6",
"@types/mocha": "^5.2.5",
"@types/qr-image": "^3.2.1",
"chai": "^4.1.2",
"isomorphic-fetch": "^2.2.1",
"mocha": "5.2.0",
"terser": "^3.14.1",
"ts-loader": "^5.3.3",
"typescript": "^3.1.3",
"webpack": "^4.28.3",
"webpack-cli": "^3.2.1"
"@types/jest": "25.1.1",
"@types/node": "13.7.0",
"husky": "4.2.1",
"tsdx": "0.12.3",
"tslib": "1.10.0",
"typescript": "3.7.5",
"webpack": "4.41.6",
"webpack-cli": "3.3.11"
},
"husky": {
"hooks": {
"pre-commit": "yarn lint"
}
},
"prettier": {
"printWidth": 80,
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
},
"dependencies": {
"@cosmjs/amino": "^0.25.4",
"@cosmjs/proto-signing": "^0.25.4"
}
}

@@ -1,101 +0,3 @@

# cosmos-wallet
# cosmos-wallet [![npm version](https://badge.fury.io/js/cosmos-wallet.svg)](https://badge.fury.io/js/cosmos-wallet)
Configurable Wallet for Cosmos SDK Chains
## Install
```sh
npm install --save cosmos-wallet
#or
yarn add cosmos-wallet
```
## Create New Wallet
**Required Params:** password, name
```js
import CosmosWallet from('cosmos-wallet')
const wallet = new CosmosWallet({
name: 'John Doe',
password: 'securepassword'
})
```
## Import Keystore
**Required Params:** password, name, keystore
```js
import CosmosWallet from('cosmos-wallet')
const wallet = new CosmosWallet({
name: 'John Doe',
password: 'securepassword',
keystore: <PREVIOUS_KEYSTORE>
})
```
## Import Mnemomic
**Required Params:** password, name, mnemomic
```js
import CosmosWallet from('cosmos-wallet')
const wallet = new CosmosWallet({
name: 'John Doe',
password: 'securepassword',
mnemomic: 'type nerve tumble culture stumble asset control still have spoon market pepper garbage alien actual awake guitar great mountain girl desk actual helmet risk'
})
```
## Sign Message
**Required Params:** password, name
```js
wallet.sign("some random message");
// signature
("bd527879250cdf6eec6e3c2004f926dcd07dc762201892ade4060feb3735fbc876fd4db6342509a80f200442d3347b5c5c6380b150dde7e84ef61ea36dda6060");
```
## Export Keystore
**Required Params:** password
Optional Params: name
```js
wallet.export("moresecurepassword")
// keystore
{
name: "John Doe",
address: "cosmos145cp9xuhscswsfztntx0e6pqskjaz37f9mqez3",
wallet:
"b87b31d99a076e642dfd95c52c27dc903160b7695ec70ada4f63442b6c5e6dffjIUt4msRJD4bFbD5oHmKq33Af5gC6Vm4YIBzid8KAs/1SJwbp91lx0HqbmmXtzzZBOH6DBPIM3DLXzL/er36TEC349Ds2+D9t1esCEZ3919IpRgTWyJoMWMy2OsDVgCiuXUPl/QhoTdOXalIQ73T/RIWHUuR9wJSoHEnRSUQa/gHxXhQP9bS8h2RG5JT+3oiIz91mPh1H/RFsH9xKOa5F7SXTvusIzyRKj6Sea3HIAfhP42xH29+WOczMGVdERLRov6zcNwgTzxKnNNbwOpH8SaEkWTA125yUaIPukmXpA4="
}
```
## Configuration Options
```typescript
ICosmosWalletOptions {
derivationPath?: string;
randomBytesFunc?: (size: number) => string;
formatAddress?: (publicKey: Buffer) => string;
keystore?: {
name: string;
address: string;
wallet: string;
}
mnemomic?: string;
password: string;
name: string;
}
```
Cosmos Wallet with Direct and Amino signing

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