@validpay/node-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +33 -0
- package/package.json +26 -0
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# @validpay/node-sdk
|
|
2
|
+
|
|
3
|
+
Official Node.js SDK for the [ValidPay](https://validpay.io) document verification API.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
ValidPay provides cryptographic document verification infrastructure. This SDK enables issuers (banks, fintechs, check printers) to create tamper-proof verification intents and allows verifiers to authenticate documents in real-time.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @validpay/node-sdk
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { ValidPayClient } from '@validpay/node-sdk';
|
|
19
|
+
|
|
20
|
+
const client = new ValidPayClient({
|
|
21
|
+
apiKey: process.env.VALIDPAY_API_KEY,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// Create a verification intent
|
|
25
|
+
const intent = await client.createIntent({
|
|
26
|
+
documentType: 'check',
|
|
27
|
+
payload: { payee: 'Jane Doe', amount: 1500.00 },
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// intent.id → embed in QR code
|
|
31
|
+
// intent.verifyUrl → direct verification link
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Features
|
|
35
|
+
|
|
36
|
+
- Zero production dependencies (Node built-in crypto + native fetch)
|
|
37
|
+
- ESM-only, TypeScript-first
|
|
38
|
+
- AES-256-GCM encryption with client-side key generation
|
|
39
|
+
- XOR key splitting for multi-party verification
|
|
40
|
+
- Automatic retry with exponential backoff
|
|
41
|
+
|
|
42
|
+
## Documentation
|
|
43
|
+
|
|
44
|
+
Full API documentation: [https://validpay.io/docs](https://validpay.io/docs)
|
|
45
|
+
|
|
46
|
+
## Status
|
|
47
|
+
|
|
48
|
+
**Private Beta** — Contact mike@validpay.io for API access.
|
|
49
|
+
|
|
50
|
+
## License
|
|
51
|
+
|
|
52
|
+
MIT — Copyright (c) 2026 MiLu Technologies LLC
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ValidPayClientOptions {
|
|
2
|
+
apiKey: string;
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface CreateIntentParams {
|
|
7
|
+
documentType: 'check' | 'invoice' | 'receipt' | 'document';
|
|
8
|
+
payload: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface Intent {
|
|
12
|
+
id: string;
|
|
13
|
+
verifyUrl: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
expiresAt: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare class ValidPayClient {
|
|
19
|
+
constructor(options: ValidPayClientOptions);
|
|
20
|
+
createIntent(params: CreateIntentParams): Promise<Intent>;
|
|
21
|
+
getIntent(id: string): Promise<Intent>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default ValidPayClient;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @validpay/node-sdk
|
|
3
|
+
* Official Node.js SDK for the ValidPay document verification API.
|
|
4
|
+
*
|
|
5
|
+
* Status: Private Beta — Contact mike@validpay.io for API access.
|
|
6
|
+
* Docs: https://validpay.io/docs
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export class ValidPayClient {
|
|
10
|
+
constructor(options = {}) {
|
|
11
|
+
if (!options.apiKey) {
|
|
12
|
+
throw new Error(
|
|
13
|
+
'ValidPay: API key required. Get yours at https://validpay.io'
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
this.apiKey = options.apiKey;
|
|
17
|
+
this.baseUrl = options.baseUrl || 'https://api.validpay.io';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async createIntent(params) {
|
|
21
|
+
throw new Error(
|
|
22
|
+
'ValidPay SDK is in private beta. Contact mike@validpay.io for access.'
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async getIntent(id) {
|
|
27
|
+
throw new Error(
|
|
28
|
+
'ValidPay SDK is in private beta. Contact mike@validpay.io for access.'
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default ValidPayClient;
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@validpay/node-sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "ValidPay Node.js SDK — Document verification and authentication API client",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": ["dist", "README.md"],
|
|
15
|
+
"keywords": ["validpay", "document-verification", "authentication", "check-verification", "anti-fraud", "encryption"],
|
|
16
|
+
"author": "MiLu Technologies LLC <mike@validpay.io>",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"homepage": "https://validpay.io",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/ValidPay-io/validpay-node-sdk"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=20.0.0"
|
|
25
|
+
}
|
|
26
|
+
}
|