From 3d493ace8926c2b2bbba51c9fba1e884217a1ba9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Mar 2023 09:51:42 +0000 Subject: [PATCH 1/2] deps: bump protons-runtime from 4.0.2 to 5.0.0 Bumps [protons-runtime](https://github.com/ipfs/protons) from 4.0.2 to 5.0.0. - [Release notes](https://github.com/ipfs/protons/releases) - [Commits](https://github.com/ipfs/protons/compare/protons-runtime-v4.0.2...protons-runtime-v5.0.0) --- updated-dependencies: - dependency-name: protons-runtime dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4ead7c6a..b9b22f55 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" }, From f1fefda0a348f5ddb108ec25b64709b356b324af Mon Sep 17 00:00:00 2001 From: achingbrain Date: Fri, 10 Mar 2023 10:55:21 +0100 Subject: [PATCH 2/2] chore: regen proto file --- package.json | 1 + src/keys/keys.ts | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b9b22f55..7238fe10 100644 --- a/package.json +++ b/package.json @@ -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()) }