Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
5c3ade5
* Update dependencies.
zone117x Dec 17, 2018
3a69d5f
add circle config
Dec 17, 2018
a0df74f
Merge pull request #9 from blockstack/develop
kantai Dec 17, 2018
4396d3a
version bump to 1.1.7
Dec 17, 2018
bbfa10e
Rename js to ts
zone117x Apr 30, 2019
089adc0
Move files to src dir
zone117x Apr 30, 2019
7c66eb5
Update code and fix tests
zone117x Apr 30, 2019
e5eb6d6
Fix demo.ts
zone117x Apr 30, 2019
0d3b826
Fix demo.ts
zone117x Apr 30, 2019
bf83a60
Update circleCI for coverage reporting
zone117x Apr 30, 2019
f49b792
Fix circleCI
zone117x Apr 30, 2019
95a253c
Remove demo.ts from coverage
zone117x Apr 30, 2019
755d6f6
Update deprecated npm script command
zone117x Apr 30, 2019
4a5b20f
Exclude test from output, bump version
zone117x Apr 30, 2019
2fccd7f
Use stable version of nyc
zone117x Apr 30, 2019
3a03c1f
Define discriminated union of string literals for valid key formats
zone117x May 3, 2019
f4e4edb
Merge pull request #11 from blockstack/feature/typescript-port
zone117x Jun 3, 2019
609d6c0
Merge branch 'develop'
Jun 3, 2019
5e97ec8
npm audit fix
Jun 3, 2019
0d5090d
Update `encode_` methods to return string type rather than `any` type.
zone117x Jun 3, 2019
540c41b
Merge branch 'develop' into feature/typescript-port
zone117x Jun 3, 2019
ab0fe56
Fix code coverage (update nyc and ts)
zone117x Jun 3, 2019
2b27255
Minor version bump
zone117x Jun 3, 2019
f136a94
Merge branch 'develop' of github.com:blockstack/key-encoder-js into f…
zone117x Jun 3, 2019
ff8846f
Update version in package lock
zone117x Jun 3, 2019
6063509
Merge pull request #12 from blockstack/feature/encode-return-type
zone117x Jun 3, 2019
af4ef9a
Move type packages from devDependencies to dependencies -- libs shoul…
zone117x Jun 25, 2019
b63479e
Merge pull request #13 from blockstack/hotfix/type-packages
zone117x Jun 25, 2019
9e1e840
Fix issue with buggy `bn.js` type defs, forcing lib consumers to enab…
zone117x Oct 15, 2019
669c863
Merge pull request #14 from blockstack/feature/fix-bn.js-export
zone117x Oct 17, 2019
df445ef
Bump https-proxy-agent from 2.2.2 to 2.2.4
dependabot[bot] Apr 16, 2020
e134edc
Bump elliptic from 6.5.1 to 6.5.3
dependabot[bot] Jul 30, 2020
41068bd
Merge pull request #21 from blockstack/dependabot/npm_and_yarn/ellipt…
zone117x Jul 30, 2020
0af5f37
Bump handlebars from 4.4.3 to 4.7.6
dependabot[bot] Sep 4, 2020
e40e9af
Merge pull request #22 from blockstack/dependabot/npm_and_yarn/handle…
zone117x Sep 8, 2020
271c2e3
Bump yargs-parser from 13.1.1 to 13.1.2
dependabot[bot] Sep 8, 2020
6ad377d
Merge pull request #23 from blockstack/dependabot/npm_and_yarn/yargs-…
zone117x Sep 8, 2020
af9812a
Bump node-fetch from 2.6.0 to 2.6.1
dependabot[bot] Sep 11, 2020
20e237e
Merge pull request #24 from blockstack/dependabot/npm_and_yarn/node-f…
zone117x Sep 11, 2020
8bc9113
Bump elliptic from 6.5.3 to 6.5.4
dependabot[bot] Mar 9, 2021
739a2a3
Bump y18n from 4.0.0 to 4.0.1
dependabot[bot] Mar 30, 2021
6648526
Bump handlebars from 4.7.6 to 4.7.7
dependabot[bot] May 7, 2021
bad6500
Bump lodash from 4.17.15 to 4.17.21
dependabot[bot] May 9, 2021
eb7411a
Bump hosted-git-info from 2.8.5 to 2.8.9
dependabot[bot] May 10, 2021
2ff866f
feat: basic support for export PKCS8
giovanni9793 Jun 9, 2021
fac6465
Bump path-parse from 1.0.6 to 1.0.7
dependabot[bot] Aug 11, 2021
c9cd859
Bump codecov from 3.6.1 to 3.8.3
dependabot[bot] Jun 23, 2022
0f90141
Bump node-fetch from 2.6.1 to 2.6.7
dependabot[bot] Jun 25, 2022
d7783f9
Merge pull request #35 from stacks-network/dependabot/npm_and_yarn/no…
wileyj Feb 16, 2024
5941973
Merge pull request #34 from stacks-network/dependabot/npm_and_yarn/co…
wileyj Feb 16, 2024
72c1c42
Merge pull request #31 from stacks-network/dependabot/npm_and_yarn/pa…
wileyj Feb 16, 2024
882dda7
Merge pull request #30 from stacks-network/dependabot/npm_and_yarn/ho…
wileyj Feb 16, 2024
3501670
Merge pull request #29 from stacks-network/dependabot/npm_and_yarn/lo…
wileyj Feb 16, 2024
bbc3559
Merge pull request #28 from stacks-network/dependabot/npm_and_yarn/ha…
wileyj Feb 16, 2024
dc0ab89
Bump @babel/traverse from 7.6.3 to 7.23.9
dependabot[bot] Feb 16, 2024
c5fdc26
Merge pull request #26 from stacks-network/dependabot/npm_and_yarn/y1…
wileyj Feb 16, 2024
52c7478
Bump ansi-regex from 4.1.0 to 4.1.1
dependabot[bot] Feb 16, 2024
8846dcf
Merge pull request #38 from stacks-network/dependabot/npm_and_yarn/ba…
wileyj Feb 16, 2024
8fb9845
Merge pull request #40 from stacks-network/dependabot/npm_and_yarn/an…
wileyj Feb 16, 2024
8705cd3
Bump minimist and mkdirp
dependabot[bot] Feb 16, 2024
6e5d2f9
Merge branch 'master' into dependabot/npm_and_yarn/https-proxy-agent-…
wileyj Feb 16, 2024
b3995f5
Merge pull request #18 from stacks-network/dependabot/npm_and_yarn/ht…
wileyj Feb 16, 2024
35c550b
Merge pull request #25 from stacks-network/dependabot/npm_and_yarn/el…
wileyj Feb 16, 2024
e2c33bc
Merge pull request #41 from stacks-network/dependabot/npm_and_yarn/mi…
wileyj Feb 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:10

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: npm install

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

# run tests!
- run: npm test

- run: npm run codecovUpload
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ build/Release
node_modules

*.pem
.nyc_output
lib
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Tests",
"args": ["${workspaceFolder}/src/test.ts"],
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
"cwd": "${workspaceRoot}"
}
]
}
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@ var rawPrivateKey = '844055cca13efd78ce79a4c3a4c5aba5db0ebeb7ae9d56906c03d333c56

### Encoding Private Keys

Encode to and from raw, PEM, and DER formats.
Encode to and from raw, PEM (encode to 'pkcs8' and 'pkcs1'), and DER formats.

#### Encoding Private Keys as PEMs

```js
var pemPrivateKey = keyEncoder.encodePrivate(rawPrivateKey, 'raw', 'pem')
var pemPrivateKey = keyEncoder.encodePrivate(rawPrivateKey, 'raw', 'pem', 'pkcs8') //default is 'pkcs1'
```

Example output:

```
-----BEGIN EC PRIVATE KEY-----
MHQCAQEEIIRAVcyhPv14znmkw6TFq6XbDr63rp1WkGwD0zPFZo1boAcGBSuBBAAK
oUQDQgAEFHt56eHdMyTO6hFf9AN7bId8c3dxMUGL+ytxPv/Q9QIye5I4YVgb1VNe
6uAGdlJp9AT19cUiFOlyGwSqfQQKdQ==
-----END EC PRIVATE KEY-----
-----BEGIN PRIVATE KEY-----
MIGNAgEAMBAGByqGSM49AgEGBSuBBAAKBHYwdAIBAQQghEBVzKE+/XjOeaTDpMWr
pdsOvreunVaQbAPTM8VmjVugBwYFK4EEAAqhRANCAAQUe3np4d0zJM7qEV/0A3ts
h3xzd3ExQYv7K3E+/9D1AjJ7kjhhWBvVU17q4AZ2Umn0BPX1xSIU6XIbBKp9BAp1
-----END PRIVATE KEY-----
```

#### Encoding Private Keys to DER Format
Expand Down
21 changes: 0 additions & 21 deletions demo.js

This file was deleted.

3 changes: 0 additions & 3 deletions index.js

This file was deleted.

163 changes: 0 additions & 163 deletions lib/key-encoder.js

This file was deleted.

Loading