open-index/open-npm huggingface dataset:
npm package: @m-doc/cbor
Description: mdl implementation in typescript
Author: Lukas.J.Han
Latest version: 0.1.0

# CBOR encoder/decoder for mdl

This package provides a [CBOR](https://datatracker.ietf.org/doc/html/rfc7049) encoder/decoder for the mdoc/mdl(ISO/IEC 18013-5).

## Supported Platforms

- Node.js
- Browser
- React Native

## Installation

```bash
npm install @m-doc/cbor
```

```bash
yarn install @m-doc/cbor
```

```bash
pnpm install @m-doc/cbor
```

## Usage

### Encode

```typescript
import { CBOR } from '@m-doc/cbor';
const encodedData = CBOR.encode('hello');
console.log(encodedData);
```

### Decode

```typescript
import { CBOR } from '@m-doc/cbor';
const decodedData = CBOR.decode(encodedData);
console.log(decodedData);
```

## License

Apache-2.0

## More Information

See the original Repo: https://github.com/openwallet-foundation-labs/mdl-js
npm package: @m-doc/cose
Description: mdl implementation in typescript
Author: Lukas.J.Han
Latest version: 0.1.0

# COSE for mdl

This package provides a COSE(Sign1, Mac0) for the mdoc/mdl(ISO/IEC 18013-5).

## Supported Platforms

- Node.js
- Browser
- React Native

## Installation

```bash
npm install @m-doc/cose
```

```bash
yarn install @m-doc/cose
```

```bash
pnpm install @m-doc/cose
```

## Features

- Sign1
- Mac0
- CoseKey

## License

Apache-2.0

## More Information

See the original Repo: https://github.com/openwallet-foundation-labs/mdl-js
npm package: @m-doc/decode
Description: mdl implementation in typescript
Author: Lukas.J.Han
Latest version: 0.1.0

# Decoder for mdl

This package provides a decoder function for the mdoc/mdl(ISO/IEC 18013-5).

## Supported Platforms

- Node.js
- Browser
- React Native

## Installation

```bash
npm install @m-doc/decode
```

```bash
yarn install @m-doc/decode
```

```bash
pnpm install @m-doc/decode
```

## Usage

```typescript
import { decodeMdl } from '@m-doc/decode';

const rawMdl = decodeMdl(buffer); // buffer is an ArrayBuffer
console.log(rawMdl);
```

To see the details, please refer to the [examples](https://github.com/openwallet-foundation-labs/mdl-js/tree/master/examples/mdl) folder.

## License

Apache-2.0

## More Information

See the original Repo: https://github.com/openwallet-foundation-labs/mdl-js
npm package: @m-doc/nodejs-crypto
Description: mdl implementation in typescript
Author: Lukas.J.Han
Latest version: 0.1.0

# Node.js crypto for mdl

This package provides crypto functions for the mdoc/mdl(ISO/IEC 18013-5).

## Supported Platforms

- Node.js

## Installation

```bash
npm install @m-doc/nodejs-crypto
```

```bash
yarn install @m-doc/nodejs-crypto
```

```bash
pnpm install @m-doc/nodejs-crypto
```

## License

Apache-2.0

## More Information

See the original Repo: https://github.com/openwallet-foundation-labs/mdl-js
npm package: @m-doc/types
Description: mdl implementation in typescript
Author: Lukas.J.Han
Latest version: 0.1.0

# Type definitions for mdl

This package provides type definitions for the mdoc/mdl(ISO/IEC 18013-5).

## Supported Platforms

- Node.js
- Browser
- React Native

## Installation

```bash
npm install @m-doc/types
```

```bash
yarn install @m-doc/types
```

```bash
pnpm install @m-doc/types
```

## License

Apache-2.0

## More Information

See the original Repo: https://github.com/openwallet-foundation-labs/mdl-js
npm package: @m-doc/utils
Description: mdl implementation in typescript
Author: Lukas.J.Han
Latest version: 0.1.0

# Utility functions for mdl

This package provides utility functions for the mdoc/mdl(ISO/IEC 18013-5).

## Supported Platforms

- Node.js
- Browser
- React Native

## Installation

```bash
npm install @m-doc/utils
```

```bash
yarn install @m-doc/utils
```

```bash
pnpm install @m-doc/utils
```

## Features

- Copy ArrayBuffer from Uint8Array
- Array Buffer to Hex String
- Hex String to Array Buffer

## License

Apache-2.0

## More Information

See the original Repo: https://github.com/openwallet-foundation-labs/mdl-js
npm package: @m-doc/x509
Description: mdl implementation in typescript
Author: Lukas.J.Han
Latest version: 0.1.0

# CBOR encoder/decoder for mdl

This package provides a [CBOR](https://datatracker.ietf.org/doc/html/rfc7049) encoder/decoder for the mdoc/mdl(ISO/IEC 18013-5).

## Installation

```bash
npm install @m-doc/x509
```

```bash
yarn install @m-doc/x509
```

```bash
pnpm install @m-doc/x509
```

## Usage

### Encode

```typescript
const textEncoder = new TextEncoder();
const textencode = (data: string) => textEncoder.encode(data);
const cborEncoder = new CBOREncoder(textencode);

const buffer = cborEncoder.encode('hi');
console.log(buffer);
```

### Decode

```typescript
const textDecoder = new TextDecoder();
const textdecode = (data: Uint8Array) => textDecoder.decode(data);
const cborDecoder = new CBORDecoder(textdecode);

const buffer = new Uint8Array([0x62, 0x68, 0x69]); // 'hi'
const data = cborDecoder.decode(new Uint8Array(buffer));
console.log(data);
```