Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 4da4a08

Browse files
deps(dev): bump aegir from 38.1.8 to 39.0.10 (#70)
* deps(dev): bump aegir from 38.1.8 to 39.0.10 Bumps [aegir](https://github.com/ipfs/aegir) from 38.1.8 to 39.0.10. - [Release notes](https://github.com/ipfs/aegir/releases) - [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md) - [Commits](ipfs/aegir@v38.1.8...v39.0.10) --- updated-dependencies: - dependency-name: aegir dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore: fix linting --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: achingbrain <[email protected]>
1 parent 7fd8023 commit 4da4a08

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
},
158158
"devDependencies": {
159159
"@libp2p/peer-id-factory": "^2.0.1",
160-
"aegir": "^38.1.0",
160+
"aegir": "^39.0.10",
161161
"datastore-core": "^9.0.1",
162162
"multiformats": "^11.0.1"
163163
}

src/index.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
/* eslint max-nested-callbacks: ["error", 5] */
22

3+
import { pbkdf2, randomBytes } from '@libp2p/crypto'
4+
import { generateKeyPair, importKey, unmarshalPrivateKey } from '@libp2p/crypto/keys'
5+
import { CodeError } from '@libp2p/interfaces/errors'
36
import { logger } from '@libp2p/logger'
4-
import sanitize from 'sanitize-filename'
5-
import mergeOptions from 'merge-options'
7+
import { peerIdFromKeys } from '@libp2p/peer-id'
68
import { Key } from 'interface-datastore/key'
7-
import { CodeError } from '@libp2p/interfaces/errors'
8-
import { codes } from './errors.js'
9-
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
9+
import mergeOptions from 'merge-options'
10+
import sanitize from 'sanitize-filename'
1011
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
11-
import { generateKeyPair, importKey, unmarshalPrivateKey } from '@libp2p/crypto/keys'
12+
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
13+
import { codes } from './errors.js'
14+
import type { KeyChain, KeyInfo, KeyType } from '@libp2p/interface-keychain'
1215
import type { PeerId } from '@libp2p/interface-peer-id'
13-
import { pbkdf2, randomBytes } from '@libp2p/crypto'
1416
import type { Datastore } from 'interface-datastore'
15-
import { peerIdFromKeys } from '@libp2p/peer-id'
16-
import type { KeyChain, KeyInfo, KeyType } from '@libp2p/interface-keychain'
1717

1818
const log = logger('libp2p:keychain')
1919

@@ -390,7 +390,7 @@ export class DefaultKeyChain implements KeyChain {
390390
const pem = await this.exportKey(name, password)
391391
const privateKey = await importKey(pem, password)
392392

393-
return await peerIdFromKeys(privateKey.public.bytes, privateKey.bytes)
393+
return peerIdFromKeys(privateKey.public.bytes, privateKey.bytes)
394394
}
395395

396396
/**

test/keychain.spec.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/* eslint max-nested-callbacks: ["error", 8] */
22
/* eslint-env mocha */
33

4+
import { pbkdf2 } from '@libp2p/crypto'
5+
import { unmarshalPrivateKey } from '@libp2p/crypto/keys'
6+
import { createFromPrivKey } from '@libp2p/peer-id-factory'
47
import { expect } from 'aegir/chai'
8+
import { MemoryDatastore } from 'datastore-core/memory'
9+
import { Key } from 'interface-datastore/key'
510
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
611
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
7-
import { Key } from 'interface-datastore/key'
8-
import { MemoryDatastore } from 'datastore-core/memory'
9-
import { DefaultKeyChain, KeyChainInit } from '../src/index.js'
10-
import { pbkdf2 } from '@libp2p/crypto'
11-
import type { Datastore } from 'interface-datastore'
12-
import type { PeerId } from '@libp2p/interface-peer-id'
13-
import { createFromPrivKey } from '@libp2p/peer-id-factory'
14-
import { unmarshalPrivateKey } from '@libp2p/crypto/keys'
12+
import { DefaultKeyChain, type KeyChainInit } from '../src/index.js'
1513
import type { KeyChain, KeyInfo } from '@libp2p/interface-keychain'
14+
import type { PeerId } from '@libp2p/interface-peer-id'
15+
import type { Datastore } from 'interface-datastore'
1616

1717
describe('keychain', () => {
1818
const passPhrase = 'this is not a secure phrase'

test/peerid.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/* eslint-env mocha */
22

3+
import { supportedKeys, unmarshalPrivateKey, unmarshalPublicKey } from '@libp2p/crypto/keys'
4+
import { createFromPrivKey } from '@libp2p/peer-id-factory'
35
import { expect } from 'aegir/chai'
46
import { base58btc } from 'multiformats/bases/base58'
5-
import { supportedKeys, unmarshalPrivateKey, unmarshalPublicKey } from '@libp2p/crypto/keys'
67
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
78
import type { PeerId } from '@libp2p/interface-peer-id'
8-
import { createFromPrivKey } from '@libp2p/peer-id-factory'
99

1010
const sample = {
1111
id: '122019318b6e5e0cf93a2314bf01269a2cc23cd3dcd452d742cdb9379d8646f6e4a9',

0 commit comments

Comments
 (0)