@notabene/javascript-sdk 2.9.2 → 2.9.3
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 +18 -24
- package/dist/cjs/package.json +1 -1
- package/dist/esm/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -436,11 +436,11 @@ If any of the required parameters are missing the component will just show the N
|
|
|
436
436
|
|
|
437
437
|
---
|
|
438
438
|
|
|
439
|
-
## Counterparty
|
|
439
|
+
## Counterparty Handoff
|
|
440
440
|
|
|
441
|
-
|
|
441
|
+
**Counterparty Assist** is a feature built into the existing **Withdrawal** and **Deposit Assist** components. When enabled, it allows users to hand off data collection to a counterparty — or to another device — by sharing a secure link. This helps ensure more accurate and complete information, especially when the counterparty is best suited to provide the required data.
|
|
442
442
|
|
|
443
|
-
This feature
|
|
443
|
+
This feature does not function as a standalone component. Instead, it augments the Withdrawal and Deposit flows when configured.
|
|
444
444
|
|
|
445
445
|
### Use Cases
|
|
446
446
|
|
|
@@ -454,33 +454,27 @@ During the address verification step, users can share a link to complete self-ho
|
|
|
454
454
|
|
|
455
455
|
### Counterparty Assist Configuration
|
|
456
456
|
|
|
457
|
-
You can enable **Counterparty Assist**
|
|
457
|
+
You can enable **Counterparty Assist** by specifying the counterparty types you want the feature to apply to using the counterpartyAssist configuration field.
|
|
458
458
|
|
|
459
|
-
- `
|
|
460
|
-
- `
|
|
459
|
+
- `false`: Disable the feature explicitly
|
|
460
|
+
- `undefined` (not configured): Feature is disabled by default
|
|
461
461
|
- `{ counterpartyTypes: [PersonType.SELF, PersonType.NATURAL, PersonType.LEGAL] }`: Enable for specific counterparty types
|
|
462
462
|
|
|
463
463
|
**Example Config**
|
|
464
464
|
|
|
465
|
-
```
|
|
465
|
+
```js
|
|
466
466
|
import Notabene, {
|
|
467
467
|
PersonType,
|
|
468
468
|
} from '@notabene/javascript-sdk';
|
|
469
469
|
|
|
470
|
-
// Counterparty assist is enabled for all counterparty types
|
|
471
|
-
const optionsAllEnabled: TransactionOptions = {
|
|
472
|
-
...
|
|
473
|
-
counterpartyAssist: true, // 'self', 'natural', and 'legal' enabled
|
|
474
|
-
};
|
|
475
|
-
|
|
476
470
|
// Counterparty assist is enabled for specific counterparty types
|
|
477
471
|
const options: TransactionOptions = {
|
|
478
472
|
...
|
|
479
473
|
counterpartyAssist: {
|
|
480
474
|
counterpartyTypes: [
|
|
481
|
-
PersonType.LEGAL,
|
|
475
|
+
PersonType.LEGAL, // JS: 'legal'
|
|
482
476
|
PersonType.NATURAL, // JS: 'natural'
|
|
483
|
-
PersonType.SELF,
|
|
477
|
+
PersonType.SELF, // JS: 'self'
|
|
484
478
|
],
|
|
485
479
|
}
|
|
486
480
|
};
|
|
@@ -503,7 +497,7 @@ When a third party completes their step after following the shared link, the hos
|
|
|
503
497
|
|
|
504
498
|
**Example Response**
|
|
505
499
|
|
|
506
|
-
```
|
|
500
|
+
```js
|
|
507
501
|
{
|
|
508
502
|
type: CMType.COMPLETE, // 'complete'
|
|
509
503
|
response: { // transaciton data + refresh source
|
|
@@ -549,7 +543,7 @@ To simplify retrieval and decryption, we provide an asynchronous [`getRefreshRes
|
|
|
549
543
|
|
|
550
544
|
**Example**
|
|
551
545
|
|
|
552
|
-
```
|
|
546
|
+
```js
|
|
553
547
|
import { getRefreshResult } from "@notabene/javascript-sdk";
|
|
554
548
|
|
|
555
549
|
const transaction = await getRefreshResult({
|
|
@@ -571,7 +565,7 @@ const transaction = await getRefreshResult({
|
|
|
571
565
|
|
|
572
566
|
**Example Active Transaction Data**
|
|
573
567
|
|
|
574
|
-
```
|
|
568
|
+
```js
|
|
575
569
|
{
|
|
576
570
|
"id": "17f76e4c-9a2a-4c34-afcb-b4868e609a96",
|
|
577
571
|
"metadata": {
|
|
@@ -583,14 +577,14 @@ const transaction = await getRefreshResult({
|
|
|
583
577
|
},
|
|
584
578
|
"status": "active",
|
|
585
579
|
"tx": {
|
|
586
|
-
|
|
580
|
+
//...
|
|
587
581
|
}
|
|
588
582
|
}
|
|
589
583
|
```
|
|
590
584
|
|
|
591
585
|
**Example Completed Transaction Data**
|
|
592
586
|
|
|
593
|
-
```
|
|
587
|
+
```js
|
|
594
588
|
{
|
|
595
589
|
"id": "17f76e4c-9a2a-4c34-afcb-b4868e609a96",
|
|
596
590
|
"metadata": {
|
|
@@ -603,19 +597,19 @@ const transaction = await getRefreshResult({
|
|
|
603
597
|
"status": "completed",
|
|
604
598
|
"result": { // the response returned from the embedded component when all information is successfully collected
|
|
605
599
|
"proof": {
|
|
606
|
-
|
|
600
|
+
//...
|
|
607
601
|
},
|
|
608
602
|
"txCreate": {
|
|
609
|
-
|
|
603
|
+
//...
|
|
610
604
|
},
|
|
611
605
|
"errors": [],
|
|
612
606
|
"status": "pending",
|
|
613
607
|
"valid": true,
|
|
614
608
|
"value": {
|
|
615
|
-
|
|
609
|
+
//...
|
|
616
610
|
},
|
|
617
611
|
"ivms101": {
|
|
618
|
-
|
|
612
|
+
//...
|
|
619
613
|
}
|
|
620
614
|
}
|
|
621
615
|
}
|
package/dist/cjs/package.json
CHANGED
package/dist/esm/package.json
CHANGED
package/package.json
CHANGED