diff --git a/package.json b/package.json index 5cf38d85..9fafe115 100644 --- a/package.json +++ b/package.json @@ -185,7 +185,7 @@ "@noble/secp256k1": "^1.5.4", "multiformats": "^11.0.0", "node-forge": "^1.1.0", - "protons-runtime": "^4.0.1", + "protons-runtime": "^5.0.0", "uint8arraylist": "^2.4.3", "uint8arrays": "^4.0.2" }, @@ -193,6 +193,7 @@ "@types/mocha": "^10.0.0", "aegir": "^38.1.2", "benchmark": "^2.1.4", + "protons": "^7.0.2", "util": "^0.12.5" }, "browser": { diff --git a/src/keys/keys.ts b/src/keys/keys.ts index cea144dc..0d9fcd41 100644 --- a/src/keys/keys.ts +++ b/src/keys/keys.ts @@ -2,10 +2,11 @@ /* eslint-disable complexity */ /* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */ +/* eslint-disable @typescript-eslint/no-empty-interface */ import { enumeration, encodeMessage, decodeMessage, message } from 'protons-runtime' -import type { Uint8ArrayList } from 'uint8arraylist' import type { Codec } from 'protons-runtime' +import type { Uint8ArrayList } from 'uint8arraylist' export enum KeyType { RSA = 'RSA', @@ -80,7 +81,7 @@ export namespace PublicKey { return _codec } - export const encode = (obj: PublicKey): Uint8Array => { + export const encode = (obj: Partial): Uint8Array => { return encodeMessage(obj, PublicKey.codec()) } @@ -145,7 +146,7 @@ export namespace PrivateKey { return _codec } - export const encode = (obj: PrivateKey): Uint8Array => { + export const encode = (obj: Partial): Uint8Array => { return encodeMessage(obj, PrivateKey.codec()) }