2019-10-21 14:44:17 +02:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
class UnexpectedPeerError extends Error {
|
|
|
|
constructor (message = 'Unexpected Peer') {
|
|
|
|
super(message)
|
|
|
|
this.code = UnexpectedPeerError.code
|
|
|
|
}
|
|
|
|
|
|
|
|
static get code () {
|
|
|
|
return 'ERR_UNEXPECTED_PEER'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-29 12:12:09 +01:00
|
|
|
class InvalidCryptoExchangeError extends Error {
|
|
|
|
constructor (message = 'Invalid crypto exchange') {
|
|
|
|
super(message)
|
|
|
|
this.code = InvalidCryptoExchangeError.code
|
|
|
|
}
|
|
|
|
|
|
|
|
static get code () {
|
|
|
|
return 'ERR_INVALID_CRYPTO_EXCHANGE'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-27 19:51:10 -08:00
|
|
|
class InvalidCryptoTransmissionError extends Error {
|
|
|
|
constructor (message = 'Invalid crypto transmission') {
|
|
|
|
super(message)
|
|
|
|
this.code = InvalidCryptoTransmissionError.code
|
|
|
|
}
|
|
|
|
|
|
|
|
static get code () {
|
|
|
|
return 'ERR_INVALID_CRYPTO_TRANSMISSION'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-21 14:44:17 +02:00
|
|
|
module.exports = {
|
2019-10-29 12:12:09 +01:00
|
|
|
UnexpectedPeerError,
|
2019-12-27 19:51:10 -08:00
|
|
|
InvalidCryptoExchangeError,
|
|
|
|
InvalidCryptoTransmissionError
|
2019-10-21 14:44:17 +02:00
|
|
|
}
|