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

deps(dev): bump aegir from 38.1.8 to 39.0.10 #70

Merged
merged 2 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
},
"devDependencies": {
"@libp2p/peer-id-factory": "^2.0.1",
"aegir": "^38.1.0",
"aegir": "^39.0.10",
"datastore-core": "^9.0.1",
"multiformats": "^11.0.1"
}
Expand Down
20 changes: 10 additions & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/* eslint max-nested-callbacks: ["error", 5] */

import { pbkdf2, randomBytes } from '@libp2p/crypto'
import { generateKeyPair, importKey, unmarshalPrivateKey } from '@libp2p/crypto/keys'
import { CodeError } from '@libp2p/interfaces/errors'
import { logger } from '@libp2p/logger'
import sanitize from 'sanitize-filename'
import mergeOptions from 'merge-options'
import { peerIdFromKeys } from '@libp2p/peer-id'
import { Key } from 'interface-datastore/key'
import { CodeError } from '@libp2p/interfaces/errors'
import { codes } from './errors.js'
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
import mergeOptions from 'merge-options'
import sanitize from 'sanitize-filename'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import { generateKeyPair, importKey, unmarshalPrivateKey } from '@libp2p/crypto/keys'
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
import { codes } from './errors.js'
import type { KeyChain, KeyInfo, KeyType } from '@libp2p/interface-keychain'
import type { PeerId } from '@libp2p/interface-peer-id'
import { pbkdf2, randomBytes } from '@libp2p/crypto'
import type { Datastore } from 'interface-datastore'
import { peerIdFromKeys } from '@libp2p/peer-id'
import type { KeyChain, KeyInfo, KeyType } from '@libp2p/interface-keychain'

const log = logger('libp2p:keychain')

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

return await peerIdFromKeys(privateKey.public.bytes, privateKey.bytes)
return peerIdFromKeys(privateKey.public.bytes, privateKey.bytes)
}

/**
Expand Down
16 changes: 8 additions & 8 deletions test/keychain.spec.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/* eslint max-nested-callbacks: ["error", 8] */
/* eslint-env mocha */

import { pbkdf2 } from '@libp2p/crypto'
import { unmarshalPrivateKey } from '@libp2p/crypto/keys'
import { createFromPrivKey } from '@libp2p/peer-id-factory'
import { expect } from 'aegir/chai'
import { MemoryDatastore } from 'datastore-core/memory'
import { Key } from 'interface-datastore/key'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
import { Key } from 'interface-datastore/key'
import { MemoryDatastore } from 'datastore-core/memory'
import { DefaultKeyChain, KeyChainInit } from '../src/index.js'
import { pbkdf2 } from '@libp2p/crypto'
import type { Datastore } from 'interface-datastore'
import type { PeerId } from '@libp2p/interface-peer-id'
import { createFromPrivKey } from '@libp2p/peer-id-factory'
import { unmarshalPrivateKey } from '@libp2p/crypto/keys'
import { DefaultKeyChain, type KeyChainInit } from '../src/index.js'
import type { KeyChain, KeyInfo } from '@libp2p/interface-keychain'
import type { PeerId } from '@libp2p/interface-peer-id'
import type { Datastore } from 'interface-datastore'

describe('keychain', () => {
const passPhrase = 'this is not a secure phrase'
Expand Down
4 changes: 2 additions & 2 deletions test/peerid.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* eslint-env mocha */

import { supportedKeys, unmarshalPrivateKey, unmarshalPublicKey } from '@libp2p/crypto/keys'
import { createFromPrivKey } from '@libp2p/peer-id-factory'
import { expect } from 'aegir/chai'
import { base58btc } from 'multiformats/bases/base58'
import { supportedKeys, unmarshalPrivateKey, unmarshalPublicKey } from '@libp2p/crypto/keys'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import type { PeerId } from '@libp2p/interface-peer-id'
import { createFromPrivKey } from '@libp2p/peer-id-factory'

const sample = {
id: '122019318b6e5e0cf93a2314bf01269a2cc23cd3dcd452d742cdb9379d8646f6e4a9',
Expand Down