cosmos-wallet
Advanced tools
Comparing version 0.1.0 to 1.0.0
{ | ||
"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" | ||
} | ||
} |
102
README.md
@@ -1,101 +0,3 @@ | ||
# cosmos-wallet | ||
# cosmos-wallet [](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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
2
8
33
0
1607987
2588
4
1
+ Added@cosmjs/amino@^0.25.4
+ Added@cosmjs/amino@0.25.6(transitive)
+ Added@cosmjs/crypto@0.25.6(transitive)
+ Added@cosmjs/encoding@0.25.6(transitive)
+ Added@cosmjs/math@0.25.6(transitive)
+ Added@cosmjs/proto-signing@0.25.6(transitive)
+ Added@cosmjs/utils@0.25.6(transitive)
+ Added@noble/hashes@1.7.1(transitive)
+ Added@protobufjs/aspromise@1.1.2(transitive)
+ Added@protobufjs/base64@1.1.2(transitive)
+ Added@protobufjs/codegen@2.0.4(transitive)
+ Added@protobufjs/eventemitter@1.1.0(transitive)
+ Added@protobufjs/fetch@1.1.0(transitive)
+ Added@protobufjs/float@1.0.2(transitive)
+ Added@protobufjs/inquire@1.1.0(transitive)
+ Added@protobufjs/path@1.1.2(transitive)
+ Added@protobufjs/pool@1.1.0(transitive)
+ Added@protobufjs/utf8@1.1.0(transitive)
+ Added@types/long@4.0.2(transitive)
+ Added@types/node@13.13.52(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbech32@1.1.4(transitive)
+ Addedbip39@3.1.0(transitive)
+ Addedjs-sha3@0.8.0(transitive)
+ Addedlibsodium@0.7.15(transitive)
+ Addedlibsodium-wrappers@0.7.15(transitive)
+ Addedlong@4.0.0(transitive)
+ Addedprotobufjs@6.10.3(transitive)
+ Addedreadonly-date@1.0.0(transitive)
- Removedbech32@1.1.3
- Removedbip32@2.0.1
- Removedbip39@2.6.0
- Removedcrypto-js@^3.1.9-1
- Removedsecp256k1@3.6.2
- Removed@types/node@10.12.18(transitive)
- Removedbase-x@3.0.10(transitive)
- Removedbech32@1.1.3(transitive)
- Removedbindings@1.5.0(transitive)
- Removedbip32@2.0.1(transitive)
- Removedbip39@2.6.0(transitive)
- Removedbip66@1.1.5(transitive)
- Removedbrowserify-aes@1.2.0(transitive)
- Removedbs58@4.0.1(transitive)
- Removedbs58check@2.1.2(transitive)
- Removedbuffer-xor@1.0.3(transitive)
- Removedcipher-base@1.0.6(transitive)
- Removedcreate-hash@1.2.0(transitive)
- Removedcreate-hmac@1.1.7(transitive)
- Removedcrypto-js@3.3.0(transitive)
- Removeddrbg.js@1.0.1(transitive)
- Removedevp_bytestokey@1.0.3(transitive)
- Removedfile-uri-to-path@1.0.0(transitive)
- Removedmd5.js@1.3.5(transitive)
- Removednan@2.22.0(transitive)
- Removedpbkdf2@3.1.2(transitive)
- Removedrandombytes@2.1.0(transitive)
- Removedsecp256k1@3.6.2(transitive)
- Removedtiny-secp256k1@1.1.7(transitive)
- Removedtypeforce@1.18.0(transitive)
- Removedunorm@1.6.0(transitive)
- Removedwif@2.0.6(transitive)