Gathering detailed insights and metrics for @types/cose-js
Gathering detailed insights and metrics for @types/cose-js
Gathering detailed insights and metrics for @types/cose-js
Gathering detailed insights and metrics for @types/cose-js
The repository for high quality TypeScript type definitions.
npm install @types/cose-js
Typescript
Module System
TypeScript (99.84%)
JavaScript (0.15%)
Shell (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
50,051 Stars
89,753 Commits
30,434 Forks
640 Watchers
6 Branches
9,957 Contributors
Updated on Jul 17, 2025
Latest Version
0.8.3
Package Id
@types/cose-js@0.8.3
Unpacked Size
6.93 kB
Size
2.11 kB
File Count
5
Published on
Nov 07, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
npm install --save @types/cose-js
This package contains type definitions for cose-js (https://github.com/erdtman/COSE-JS).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cose-js.
1/// <reference types="node" /> 2 3import { Readable } from "stream"; 4 5export type BufferLike = string | Buffer | ArrayBuffer | Uint8Array | Uint8ClampedArray | DataView | Readable; 6 7export interface HeaderParameters { 8 partyUNonce?: BufferLike; 9 static_key_id?: BufferLike; 10 static_key?: BufferLike; 11 ephemeral_key?: BufferLike; 12 alg?: BufferLike; 13 crit?: BufferLike; 14 content_type?: BufferLike; 15 ctyp?: BufferLike; 16 kid?: BufferLike; 17 IV?: BufferLike; 18 Partial_IV?: BufferLike; 19 counter_signature?: BufferLike; 20} 21 22export interface Headers { 23 u?: HeaderParameters; 24 p?: HeaderParameters; 25} 26 27export interface Key { 28 crv?: string; 29 k?: string; 30 x?: BufferLike; 31 y?: BufferLike; 32 d?: BufferLike; 33 kty?: string; 34} 35 36export namespace encrypt { 37 interface Signer { 38 key: Buffer; 39 } 40 41 interface CreateOptions { 42 externalAAD?: Buffer; 43 randomSource?(bytes: number): Buffer; 44 contextIv?: Buffer; 45 encodep?: "empty"; 46 excludetag?: boolean; 47 } 48 49 function create( 50 headers: Headers, 51 payload: string, 52 recipient: Signer | Signer[], 53 options?: CreateOptions, 54 ): Promise<Buffer>; 55 56 function read(COSEMessage: Buffer, key: Buffer): Promise<Buffer>; 57} 58 59export namespace mac { 60 interface Signer { 61 key: Buffer; 62 } 63 64 function create(headers: Headers, plaintext: string, signer: Signer): Promise<Buffer>; 65 66 function read(COSEMessage: Buffer, key: Buffer): Promise<Buffer>; 67} 68 69export namespace sign { 70 interface Signer { 71 key: Key; 72 externalAAD?: Buffer; 73 } 74 75 interface VerifyOptions { 76 defaultType?: number; 77 } 78 79 interface CreateOptions { 80 encodep?: "empty"; 81 excludetag?: boolean; 82 } 83 84 /** throws an error if verification fails */ 85 function verify(payload: BufferLike, verifier: Signer, options?: VerifyOptions): Promise<Buffer>; 86 87 /** throws an error if verification fails */ 88 function verifySync(payload: BufferLike, verifier: Signer, options?: VerifyOptions): Buffer; 89 90 function create( 91 headers: Headers, 92 payload: BufferLike, 93 signers: Signer | Signer[], 94 options?: CreateOptions, 95 ): Promise<Buffer>; 96} 97
These definitions were written by Kyle Hensel.
No vulnerabilities found.
Reason
30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
no binaries found in the repo
Reason
Found 27/30 approved changesets -- score normalized to 9
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 8
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More