@oneaddress/partner-sdk 2.4.0 → 2.5.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/dist/edge.mjs CHANGED
@@ -20,13 +20,13 @@ import {
20
20
  verifyLOA,
21
21
  verifySignature,
22
22
  verifyWithGrace
23
- } from "./chunk-4WYW6BM3.mjs";
23
+ } from "./chunk-DIUGEFIK.mjs";
24
24
  import {
25
25
  DEFAULT_REPLAY_WINDOW_SECS,
26
26
  computeBlindIndex,
27
27
  isFreshTimestamp,
28
28
  normalizeForBlindIndex
29
- } from "./chunk-FDMB4BNC.mjs";
29
+ } from "./chunk-ZY2K54LD.mjs";
30
30
  export {
31
31
  CURRENT_VERSION,
32
32
  DEFAULT_REPLAY_WINDOW_SECS,
package/dist/index.d.mts CHANGED
@@ -493,12 +493,30 @@ interface OneAddressLOA {
493
493
  * consumed. Production dispatches always include it.
494
494
  */
495
495
  interface OneAddressIdVerification {
496
- /** Verification method — `identity_document` for a completed document +
497
- * biometric check; `mock` in sandbox builds. Carries no provider identity. */
496
+ /**
497
+ * Verification method, and the field to route on.
498
+ *
499
+ * `identity_document`: a completed document plus biometric check ran at the
500
+ * identity provider and a government Document Verification Service
501
+ * cross-check was performed. This is what every production dispatch carries.
502
+ *
503
+ * `mock` - NO such verification stands behind this dispatch. It was
504
+ * authorised by a simulated credit, from a sandbox run, a product
505
+ * demonstration, or an internal test. A recipient treating an update as
506
+ * identity-assured should check for `identity_document` here rather than
507
+ * relying on `verified`.
508
+ *
509
+ * Carries no provider identity.
510
+ */
498
511
  method: string;
499
512
  /** ISO-8601 timestamp the verification was completed */
500
513
  verified_at: string;
501
- /** Always `true` on dispatches — partners can rely on the field's presence */
514
+ /**
515
+ * Always `true` on dispatches, so partners can rely on the field's presence.
516
+ *
517
+ * It is a presence marker and carries no assurance information: it is `true`
518
+ * for a `mock` dispatch too. `method` is the field that distinguishes them.
519
+ */
502
520
  verified: true;
503
521
  /** Format tag — currently `oneaddress/v1` */
504
522
  platform: string;
@@ -1312,15 +1330,16 @@ interface SessionData {
1312
1330
  *
1313
1331
  * **Important — `key_id` routing.** Under D5 you may hold multiple
1314
1332
  * private keys at once: one active (for new dispatches) plus zero-or-more
1315
- * retired keys still within their 90-day retention window. Look up the
1333
+ * retired keys still within the retention window you configured in the
1334
+ * partner portal (minimum 14 days). Look up the
1316
1335
  * private key by `share.key_id` from your local key store before calling
1317
1336
  * this function. The function does NOT pick a key for you.
1318
1337
  *
1319
1338
  * **Destroyed retired keys.** If you destroyed the private key for
1320
1339
  * `share.key_id` before its `destroy_after`, you cannot decrypt this
1321
- * envelope. That is a key-custody breach of the partner agreement and is
1322
- * recorded on the OneAddress side as a `partner_key_custody_failure`
1323
- * outcome on the reconstruction audit log.
1340
+ * envelope and neither can we: we hold no copy of your private key.
1341
+ * Destroying a retired key before your configured retention window closes
1342
+ * is a key-custody breach under the partner terms.
1324
1343
  *
1325
1344
  * @param share - The structured `session_key_share` block from the webhook.
1326
1345
  * @param envelopeB64 - The `session_envelope` base64url string from the webhook.
@@ -1582,7 +1601,7 @@ declare function fetchLoaPublicKey(appBaseUrl?: string): Promise<string>;
1582
1601
  * async onUpdate(event) {
1583
1602
  * if (event.loa) {
1584
1603
  * const valid = await verifyLOA(event.loa, loaPublicKey);
1585
- * if (!valid) throw new Error('LOA signature invalid — possible tampering');
1604
+ * if (!valid) throw new Error('LOA signature invalid, possible tampering');
1586
1605
  * }
1587
1606
  * await db.updateAddress(event.address);
1588
1607
  * },
package/dist/index.d.ts CHANGED
@@ -493,12 +493,30 @@ interface OneAddressLOA {
493
493
  * consumed. Production dispatches always include it.
494
494
  */
495
495
  interface OneAddressIdVerification {
496
- /** Verification method — `identity_document` for a completed document +
497
- * biometric check; `mock` in sandbox builds. Carries no provider identity. */
496
+ /**
497
+ * Verification method, and the field to route on.
498
+ *
499
+ * `identity_document`: a completed document plus biometric check ran at the
500
+ * identity provider and a government Document Verification Service
501
+ * cross-check was performed. This is what every production dispatch carries.
502
+ *
503
+ * `mock` - NO such verification stands behind this dispatch. It was
504
+ * authorised by a simulated credit, from a sandbox run, a product
505
+ * demonstration, or an internal test. A recipient treating an update as
506
+ * identity-assured should check for `identity_document` here rather than
507
+ * relying on `verified`.
508
+ *
509
+ * Carries no provider identity.
510
+ */
498
511
  method: string;
499
512
  /** ISO-8601 timestamp the verification was completed */
500
513
  verified_at: string;
501
- /** Always `true` on dispatches — partners can rely on the field's presence */
514
+ /**
515
+ * Always `true` on dispatches, so partners can rely on the field's presence.
516
+ *
517
+ * It is a presence marker and carries no assurance information: it is `true`
518
+ * for a `mock` dispatch too. `method` is the field that distinguishes them.
519
+ */
502
520
  verified: true;
503
521
  /** Format tag — currently `oneaddress/v1` */
504
522
  platform: string;
@@ -1312,15 +1330,16 @@ interface SessionData {
1312
1330
  *
1313
1331
  * **Important — `key_id` routing.** Under D5 you may hold multiple
1314
1332
  * private keys at once: one active (for new dispatches) plus zero-or-more
1315
- * retired keys still within their 90-day retention window. Look up the
1333
+ * retired keys still within the retention window you configured in the
1334
+ * partner portal (minimum 14 days). Look up the
1316
1335
  * private key by `share.key_id` from your local key store before calling
1317
1336
  * this function. The function does NOT pick a key for you.
1318
1337
  *
1319
1338
  * **Destroyed retired keys.** If you destroyed the private key for
1320
1339
  * `share.key_id` before its `destroy_after`, you cannot decrypt this
1321
- * envelope. That is a key-custody breach of the partner agreement and is
1322
- * recorded on the OneAddress side as a `partner_key_custody_failure`
1323
- * outcome on the reconstruction audit log.
1340
+ * envelope and neither can we: we hold no copy of your private key.
1341
+ * Destroying a retired key before your configured retention window closes
1342
+ * is a key-custody breach under the partner terms.
1324
1343
  *
1325
1344
  * @param share - The structured `session_key_share` block from the webhook.
1326
1345
  * @param envelopeB64 - The `session_envelope` base64url string from the webhook.
@@ -1582,7 +1601,7 @@ declare function fetchLoaPublicKey(appBaseUrl?: string): Promise<string>;
1582
1601
  * async onUpdate(event) {
1583
1602
  * if (event.loa) {
1584
1603
  * const valid = await verifyLOA(event.loa, loaPublicKey);
1585
- * if (!valid) throw new Error('LOA signature invalid — possible tampering');
1604
+ * if (!valid) throw new Error('LOA signature invalid, possible tampering');
1586
1605
  * }
1587
1606
  * await db.updateAddress(event.address);
1588
1607
  * },