Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .eslintrc.js → .eslintrc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export {
plugins: ['node', 'jest'],
extends: ['plugin:node/recommended', 'airbnb-base'],
rules: {
Expand Down Expand Up @@ -29,7 +29,7 @@ module.exports = {
},
env: {
node: true,
'jest/globals': true,
jest: true,
},
overrides: [{
files: '"./tests/**/*.spec.js"',
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ idea
.idea
.scannerwork
.vscode
dist
*.tsbuildinfo
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,32 @@ For each service you will need:
* Your Client SDK ID, generated by [Yoti Hub](https://hub.yoti.com) when you create (and then publish) your app.
* Your .pem file. This is your own unique private key which your browser generates from the [Yoti Hub](https://hub.yoti.com) when you create an application.

## TypeScript Support

The Yoti Node SDK is built with TypeScript-first architecture, providing full type definitions for all exports. The SDK automatically compiles TypeScript source to JavaScript with type declarations included.

### Using with TypeScript

```typescript
import { YotiClient, IDVClient, DigitalIdentityClient } from 'yoti';

const client = new YotiClient('YOUR_SDK_ID', pemString);
```

### Type Definitions

Type definitions are automatically included and will be recognized by TypeScript and modern IDEs. All classes, interfaces, and functions are fully typed.

### Building from Source

```bash
npm run build # Compile TypeScript to dist/
npm run build:watch # Watch mode for development
npm run clean # Remove build artifacts
```

For information about contributing TypeScript code or migrating JavaScript files, see [TYPESCRIPT_MIGRATION.md](TYPESCRIPT_MIGRATION.md).

## Products

The Yoti SDK can be used for the following products, follow the links for more information about each:
Expand Down
Loading