@splitin/verification-adapter-plaid-idv 0.1.0-beta.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/LICENSE +21 -0
- package/NOTICE +32 -0
- package/README.md +46 -0
- package/dist/browser.cjs +19 -0
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.cts +27 -0
- package/dist/browser.d.ts +27 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +16 -0
- package/dist/browser.js.map +1 -0
- package/dist/index.cjs +734 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +95 -0
- package/dist/index.d.ts +95 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +727 -0
- package/dist/index.js.map +1 -0
- package/package.json +56 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SplitInTech
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Verification Adapter SDK
|
|
2
|
+
Copyright (c) 2026 SplitInTech
|
|
3
|
+
|
|
4
|
+
This product is licensed under the MIT License. See LICENSE.
|
|
5
|
+
|
|
6
|
+
Third-party notices
|
|
7
|
+
===================
|
|
8
|
+
|
|
9
|
+
This project redistributes no vendor identity SDKs in its core or server
|
|
10
|
+
packages. Optional peer dependencies used by browser plugins:
|
|
11
|
+
|
|
12
|
+
- `@stripe/stripe-js` — Stripe, Inc. (MIT). Used only by the Stripe Identity
|
|
13
|
+
browser plugin via dynamic import. Stripe is a trademark of Stripe, Inc.
|
|
14
|
+
- `persona` — Persona Identities, Inc. Used only by the Persona browser plugin
|
|
15
|
+
via dynamic import.
|
|
16
|
+
- `react-plaid-link` — Plaid Inc. (MIT). Used only by the Plaid Identity
|
|
17
|
+
Verification browser plugin via dynamic import. Plaid is a trademark of
|
|
18
|
+
Plaid Inc.
|
|
19
|
+
|
|
20
|
+
Server adapters speak HTTPS to provider APIs with an injected Fetch
|
|
21
|
+
implementation. They do not bundle Stripe, Persona, or Plaid Node SDKs.
|
|
22
|
+
|
|
23
|
+
Runtime and tooling (declared in package.json; not vendored):
|
|
24
|
+
|
|
25
|
+
- `ajv` — MIT
|
|
26
|
+
- `jose` — MIT (Plaid webhook JWT verification)
|
|
27
|
+
- `pg` — MIT (optional PostgreSQL executor)
|
|
28
|
+
- TypeScript, tsup, vitest, Changesets — Apache-2.0 / MIT as published by
|
|
29
|
+
their authors
|
|
30
|
+
|
|
31
|
+
This project provides engineering primitives. It is not a legal, KYC, KYB, or
|
|
32
|
+
regulatory compliance certification.
|
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# `@splitin/verification-adapter-plaid-idv`
|
|
2
|
+
|
|
3
|
+
Official Plaid **Identity Verification** plugin for the Universal Open-Source
|
|
4
|
+
Verification Adapter SDK.
|
|
5
|
+
|
|
6
|
+
This adapter is IDV-only. It does not implement Auth, Identity (non-IDV),
|
|
7
|
+
Monitor, payments, or bank account products. Redaction is advertised as
|
|
8
|
+
`notApplicable` because Plaid does not expose an IDV redaction API.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @splitin/verification-adapter-plaid-idv @splitin/verification-adapter-sdk
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Optional browser peer: `react-plaid-link`.
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
Construct with an injected `ProviderRuntimeContext`. API hosts are code-owned:
|
|
21
|
+
`sandbox.plaid.com` and `production.plaid.com`. Configuration cannot supply an
|
|
22
|
+
arbitrary production origin.
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { createDefaultRuntime } from '@splitin/verification-adapter-sdk';
|
|
26
|
+
import {
|
|
27
|
+
PlaidIdvVerificationAdapter,
|
|
28
|
+
createPlaidIdvConfiguration,
|
|
29
|
+
plaidIdvProviderManifest,
|
|
30
|
+
} from '@splitin/verification-adapter-plaid-idv';
|
|
31
|
+
|
|
32
|
+
const configuration = createPlaidIdvConfiguration(process.env, 'sandbox');
|
|
33
|
+
const runtime = createDefaultRuntime('sandbox', configuration, {
|
|
34
|
+
allowedHosts: plaidIdvProviderManifest.apiHosts,
|
|
35
|
+
});
|
|
36
|
+
const adapter = new PlaidIdvVerificationAdapter(runtime);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Creates use `is_idempotent: true`. Retries that allocate a new Plaid resource
|
|
40
|
+
preserve lineage through `linkedResources`. Webhooks are verified with Plaid's
|
|
41
|
+
ES256 JWT (`jose`) over the unmodified request body.
|
|
42
|
+
|
|
43
|
+
The browser entry (`@splitin/verification-adapter-plaid-idv/browser`) exports a
|
|
44
|
+
`plaid_link` plugin that dynamically imports `react-plaid-link`.
|
|
45
|
+
|
|
46
|
+
This package is not a compliance certification.
|
package/dist/browser.cjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/browser.ts
|
|
4
|
+
var plaidLinkLauncherKey = "plaid_link";
|
|
5
|
+
var plaidIdvBrowserPlugin = Object.freeze({
|
|
6
|
+
launcherKey: plaidLinkLauncherKey,
|
|
7
|
+
async loadReactPlaidLink() {
|
|
8
|
+
try {
|
|
9
|
+
return await import('react-plaid-link');
|
|
10
|
+
} catch {
|
|
11
|
+
throw new Error("Optional peer dependency react-plaid-link is not installed.");
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
exports.plaidIdvBrowserPlugin = plaidIdvBrowserPlugin;
|
|
17
|
+
exports.plaidLinkLauncherKey = plaidLinkLauncherKey;
|
|
18
|
+
//# sourceMappingURL=browser.cjs.map
|
|
19
|
+
//# sourceMappingURL=browser.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/browser.ts"],"names":[],"mappings":";;;AAQO,IAAM,oBAAA,GAAuB;AAE7B,IAAM,qBAAA,GAAwB,OAAO,MAAA,CAAO;AAAA,EACjD,WAAA,EAAa,oBAAA;AAAA,EACb,MAAM,kBAAA,GAAoD;AACxD,IAAA,IAAI;AACF,MAAA,OAAO,MAAM,OAAO,kBAAkB,CAAA;AAAA,IACxC,CAAA,CAAA,MAAQ;AACN,MAAA,MAAM,IAAI,MAAM,6DAA6D,CAAA;AAAA,IAC/E;AAAA,EACF;AACF,CAAC","file":"browser.cjs","sourcesContent":["/**\n * Browser launcher for Plaid Identity Verification Link.\n *\n * Dynamically imports optional peer `react-plaid-link`. Hosts pass the\n * memory-only `transientSecret` (Link token) from the V1 launch envelope.\n * Browser callbacks are UX signals only.\n */\n\nexport const plaidLinkLauncherKey = 'plaid_link' as const;\n\nexport const plaidIdvBrowserPlugin = Object.freeze({\n launcherKey: plaidLinkLauncherKey,\n async loadReactPlaidLink(): Promise<ReactPlaidLinkModule> {\n try {\n return await import('react-plaid-link') as ReactPlaidLinkModule;\n } catch {\n throw new Error('Optional peer dependency react-plaid-link is not installed.');\n }\n },\n});\n\ninterface ReactPlaidLinkModule {\n usePlaidLink: (config: {\n token: string | null;\n onSuccess: () => void;\n onExit?: () => void;\n onEvent?: (eventName: string) => void;\n }) => { open: () => void; ready: boolean; error: Error | null; exit: () => void };\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser launcher for Plaid Identity Verification Link.
|
|
3
|
+
*
|
|
4
|
+
* Dynamically imports optional peer `react-plaid-link`. Hosts pass the
|
|
5
|
+
* memory-only `transientSecret` (Link token) from the V1 launch envelope.
|
|
6
|
+
* Browser callbacks are UX signals only.
|
|
7
|
+
*/
|
|
8
|
+
declare const plaidLinkLauncherKey: "plaid_link";
|
|
9
|
+
declare const plaidIdvBrowserPlugin: Readonly<{
|
|
10
|
+
launcherKey: "plaid_link";
|
|
11
|
+
loadReactPlaidLink(): Promise<ReactPlaidLinkModule>;
|
|
12
|
+
}>;
|
|
13
|
+
interface ReactPlaidLinkModule {
|
|
14
|
+
usePlaidLink: (config: {
|
|
15
|
+
token: string | null;
|
|
16
|
+
onSuccess: () => void;
|
|
17
|
+
onExit?: () => void;
|
|
18
|
+
onEvent?: (eventName: string) => void;
|
|
19
|
+
}) => {
|
|
20
|
+
open: () => void;
|
|
21
|
+
ready: boolean;
|
|
22
|
+
error: Error | null;
|
|
23
|
+
exit: () => void;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { plaidIdvBrowserPlugin, plaidLinkLauncherKey };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser launcher for Plaid Identity Verification Link.
|
|
3
|
+
*
|
|
4
|
+
* Dynamically imports optional peer `react-plaid-link`. Hosts pass the
|
|
5
|
+
* memory-only `transientSecret` (Link token) from the V1 launch envelope.
|
|
6
|
+
* Browser callbacks are UX signals only.
|
|
7
|
+
*/
|
|
8
|
+
declare const plaidLinkLauncherKey: "plaid_link";
|
|
9
|
+
declare const plaidIdvBrowserPlugin: Readonly<{
|
|
10
|
+
launcherKey: "plaid_link";
|
|
11
|
+
loadReactPlaidLink(): Promise<ReactPlaidLinkModule>;
|
|
12
|
+
}>;
|
|
13
|
+
interface ReactPlaidLinkModule {
|
|
14
|
+
usePlaidLink: (config: {
|
|
15
|
+
token: string | null;
|
|
16
|
+
onSuccess: () => void;
|
|
17
|
+
onExit?: () => void;
|
|
18
|
+
onEvent?: (eventName: string) => void;
|
|
19
|
+
}) => {
|
|
20
|
+
open: () => void;
|
|
21
|
+
ready: boolean;
|
|
22
|
+
error: Error | null;
|
|
23
|
+
exit: () => void;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { plaidIdvBrowserPlugin, plaidLinkLauncherKey };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sources":["browser.d.ts"],"names":[],"mappings":"AAAA"}
|
package/dist/browser.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/browser.ts
|
|
2
|
+
var plaidLinkLauncherKey = "plaid_link";
|
|
3
|
+
var plaidIdvBrowserPlugin = Object.freeze({
|
|
4
|
+
launcherKey: plaidLinkLauncherKey,
|
|
5
|
+
async loadReactPlaidLink() {
|
|
6
|
+
try {
|
|
7
|
+
return await import('react-plaid-link');
|
|
8
|
+
} catch {
|
|
9
|
+
throw new Error("Optional peer dependency react-plaid-link is not installed.");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { plaidIdvBrowserPlugin, plaidLinkLauncherKey };
|
|
15
|
+
//# sourceMappingURL=browser.js.map
|
|
16
|
+
//# sourceMappingURL=browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/browser.ts"],"names":[],"mappings":";AAQO,IAAM,oBAAA,GAAuB;AAE7B,IAAM,qBAAA,GAAwB,OAAO,MAAA,CAAO;AAAA,EACjD,WAAA,EAAa,oBAAA;AAAA,EACb,MAAM,kBAAA,GAAoD;AACxD,IAAA,IAAI;AACF,MAAA,OAAO,MAAM,OAAO,kBAAkB,CAAA;AAAA,IACxC,CAAA,CAAA,MAAQ;AACN,MAAA,MAAM,IAAI,MAAM,6DAA6D,CAAA;AAAA,IAC/E;AAAA,EACF;AACF,CAAC","file":"browser.js","sourcesContent":["/**\n * Browser launcher for Plaid Identity Verification Link.\n *\n * Dynamically imports optional peer `react-plaid-link`. Hosts pass the\n * memory-only `transientSecret` (Link token) from the V1 launch envelope.\n * Browser callbacks are UX signals only.\n */\n\nexport const plaidLinkLauncherKey = 'plaid_link' as const;\n\nexport const plaidIdvBrowserPlugin = Object.freeze({\n launcherKey: plaidLinkLauncherKey,\n async loadReactPlaidLink(): Promise<ReactPlaidLinkModule> {\n try {\n return await import('react-plaid-link') as ReactPlaidLinkModule;\n } catch {\n throw new Error('Optional peer dependency react-plaid-link is not installed.');\n }\n },\n});\n\ninterface ReactPlaidLinkModule {\n usePlaidLink: (config: {\n token: string | null;\n onSuccess: () => void;\n onExit?: () => void;\n onEvent?: (eventName: string) => void;\n }) => { open: () => void; ready: boolean; error: Error | null; exit: () => void };\n}\n"]}
|