Skip to content

Commit 77f1fd1

Browse files
lidelachingbrain
andauthored
feat: ed25519 keys by default (#3693)
Switch from RSA to ed25519 to match what we already do in go-ipfs. Closes ipfs/js-ipfs#3591 Co-authored-by: achingbrain <[email protected]>
1 parent 21adcca commit 77f1fd1

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/key/export.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict'
22

33
const configure = require('../lib/configure')
4+
const errCode = require('err-code')
45

56
/**
67
* @typedef {import('../types').HTTPClientExtraOptions} HTTPClientExtraOptions
@@ -12,7 +13,7 @@ module.exports = configure(api => {
1213
* @type {KeyAPI["export"]}
1314
*/
1415
const exportKey = async (name, password, options = {}) => {
15-
throw new Error('Not implemented')
16+
throw errCode(new Error('Not implemented'), 'ERR_NOT_IMPLEMENTED')
1617
}
1718

1819
return exportKey

src/key/info.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict'
22

33
const configure = require('../lib/configure')
4+
const errCode = require('err-code')
45

56
/**
67
* @typedef {import('../types').HTTPClientExtraOptions} HTTPClientExtraOptions
@@ -12,7 +13,7 @@ module.exports = configure(api => {
1213
* @type {KeyAPI["info"]}
1314
*/
1415
const info = async (name, options = {}) => {
15-
throw new Error('Not implemented')
16+
throw errCode(new Error('Not implemented'), 'ERR_NOT_IMPLEMENTED')
1617
}
1718

1819
return info

src/start.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict'
22

33
const configure = require('./lib/configure')
4+
const errCode = require('err-code')
45

56
/**
67
* @typedef {import('./types').HTTPClientExtraOptions} HTTPClientExtraOptions
@@ -12,7 +13,7 @@ module.exports = configure(api => {
1213
* @type {RootAPI["start"]}
1314
*/
1415
const start = async (options = {}) => {
15-
throw new Error('Not implemented')
16+
throw errCode(new Error('Not implemented'), 'ERR_NOT_IMPLEMENTED')
1617
}
1718

1819
return start

0 commit comments

Comments
 (0)