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

deps: bump protons-runtime from 4.0.2 to 5.0.0 #297

Merged
merged 2 commits into from
Mar 10, 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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,15 @@
"@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"
},
"devDependencies": {
"@types/mocha": "^10.0.0",
"aegir": "^38.1.2",
"benchmark": "^2.1.4",
"protons": "^7.0.2",
"util": "^0.12.5"
},
"browser": {
Expand Down
7 changes: 4 additions & 3 deletions src/keys/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -80,7 +81,7 @@ export namespace PublicKey {
return _codec
}

export const encode = (obj: PublicKey): Uint8Array => {
export const encode = (obj: Partial<PublicKey>): Uint8Array => {
return encodeMessage(obj, PublicKey.codec())
}

Expand Down Expand Up @@ -145,7 +146,7 @@ export namespace PrivateKey {
return _codec
}

export const encode = (obj: PrivateKey): Uint8Array => {
export const encode = (obj: Partial<PrivateKey>): Uint8Array => {
return encodeMessage(obj, PrivateKey.codec())
}

Expand Down