@astrasyncai/verification-gateway 3.4.0 → 3.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.
Files changed (84) hide show
  1. package/README.md +86 -0
  2. package/dist/adapter-interface/interface.d.mts +2 -2
  3. package/dist/adapter-interface/interface.d.ts +2 -2
  4. package/dist/adapters/express.d.mts +2 -2
  5. package/dist/adapters/express.d.ts +2 -2
  6. package/dist/adapters/express.js +18 -1
  7. package/dist/adapters/express.js.map +1 -1
  8. package/dist/adapters/express.mjs +18 -1
  9. package/dist/adapters/express.mjs.map +1 -1
  10. package/dist/adapters/mcp.d.mts +1 -1
  11. package/dist/adapters/mcp.d.ts +1 -1
  12. package/dist/adapters/mcp.js +1 -1
  13. package/dist/adapters/mcp.js.map +1 -1
  14. package/dist/adapters/mcp.mjs +1 -1
  15. package/dist/adapters/mcp.mjs.map +1 -1
  16. package/dist/adapters/nextjs.d.mts +2 -2
  17. package/dist/adapters/nextjs.d.ts +2 -2
  18. package/dist/adapters/nextjs.js +1 -1
  19. package/dist/adapters/nextjs.js.map +1 -1
  20. package/dist/adapters/nextjs.mjs +1 -1
  21. package/dist/adapters/nextjs.mjs.map +1 -1
  22. package/dist/adapters/sdk.d.mts +2 -2
  23. package/dist/adapters/sdk.d.ts +2 -2
  24. package/dist/adapters/sdk.js +1 -1
  25. package/dist/adapters/sdk.js.map +1 -1
  26. package/dist/adapters/sdk.mjs +1 -1
  27. package/dist/adapters/sdk.mjs.map +1 -1
  28. package/dist/agent/index.d.mts +2 -2
  29. package/dist/agent/index.d.ts +2 -2
  30. package/dist/browser/background.js +1 -1
  31. package/dist/browser/background.js.map +1 -1
  32. package/dist/browser/background.mjs +1 -1
  33. package/dist/browser/background.mjs.map +1 -1
  34. package/dist/browser/browser-adapter.d.mts +2 -2
  35. package/dist/browser/browser-adapter.d.ts +2 -2
  36. package/dist/cli/index.d.mts +2 -2
  37. package/dist/cli/index.d.ts +2 -2
  38. package/dist/cursor/cursor-adapter.d.mts +2 -2
  39. package/dist/cursor/cursor-adapter.d.ts +2 -2
  40. package/dist/cursor/extension.d.mts +2 -2
  41. package/dist/cursor/extension.d.ts +2 -2
  42. package/dist/cursor/extension.js +1 -1
  43. package/dist/cursor/extension.js.map +1 -1
  44. package/dist/cursor/extension.mjs +1 -1
  45. package/dist/cursor/extension.mjs.map +1 -1
  46. package/dist/{express-CeFvNWDD.d.mts → express-BH5ADAyb.d.mts} +1 -1
  47. package/dist/{express-RIh05wW2.d.ts → express-jUzLIoep.d.ts} +1 -1
  48. package/dist/gateway/gateway.d.mts +2 -2
  49. package/dist/gateway/gateway.d.ts +2 -2
  50. package/dist/gateway/gateway.js +1 -1
  51. package/dist/gateway/gateway.js.map +1 -1
  52. package/dist/gateway/gateway.mjs +1 -1
  53. package/dist/gateway/gateway.mjs.map +1 -1
  54. package/dist/git-trigger/git-hooks.d.mts +2 -2
  55. package/dist/git-trigger/git-hooks.d.ts +2 -2
  56. package/dist/{index-Bw4FeHMY.d.mts → index-BR2nmxBU.d.mts} +5 -1
  57. package/dist/{index-C-K0WCrk.d.ts → index-DEixUCu0.d.ts} +5 -1
  58. package/dist/{index-BYu1FKMy.d.ts → index-DlCnmpJH.d.ts} +1 -1
  59. package/dist/{index-DgVBEiwI.d.mts → index-aZHAWujT.d.mts} +1 -1
  60. package/dist/index.d.mts +7 -7
  61. package/dist/index.d.ts +7 -7
  62. package/dist/index.js +40 -5
  63. package/dist/index.js.map +1 -1
  64. package/dist/index.mjs +40 -5
  65. package/dist/index.mjs.map +1 -1
  66. package/dist/local-evaluator/evaluator.d.mts +2 -2
  67. package/dist/local-evaluator/evaluator.d.ts +2 -2
  68. package/dist/{nextjs--xR9zbSJ.d.ts → nextjs-DfXOd0Au.d.ts} +1 -1
  69. package/dist/{nextjs-xciaMpsZ.d.mts → nextjs-LTeoPqMH.d.mts} +1 -1
  70. package/dist/{sdk-CJYCLMI0.d.mts → sdk-DKhwVL9X.d.mts} +1 -1
  71. package/dist/{sdk-FP7xT9F8.d.ts → sdk-LmvyDVpL.d.ts} +1 -1
  72. package/dist/transport/index.d.mts +2 -2
  73. package/dist/transport/index.d.ts +2 -2
  74. package/dist/transport/index.js +22 -4
  75. package/dist/transport/index.js.map +1 -1
  76. package/dist/transport/index.mjs +22 -4
  77. package/dist/transport/index.mjs.map +1 -1
  78. package/dist/{types-Cj92yKeA.d.mts → types-C8HyQEaz.d.mts} +1 -1
  79. package/dist/{types-Cwrvo30g.d.mts → types-DrDIouvO.d.mts} +24 -2
  80. package/dist/{types-Cwrvo30g.d.ts → types-DrDIouvO.d.ts} +24 -2
  81. package/dist/{types-DOeL-dIw.d.ts → types-xofemo0G.d.ts} +1 -1
  82. package/dist/ui/index.d.mts +1 -1
  83. package/dist/ui/index.d.ts +1 -1
  84. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { a as AccessLevel, d as CounterpartyType, T as TokenGuidance } from './types-Cwrvo30g.mjs';
1
+ import { a as AccessLevel, d as CounterpartyType, T as TokenGuidance } from './types-DrDIouvO.mjs';
2
2
 
3
3
  /**
4
4
  * AstraSync Gateway - Types for gateway modes, local evaluation, and adapter interface.
@@ -444,9 +444,14 @@ interface VerificationRequest {
444
444
  resource?: string;
445
445
  /** Jurisdiction for the request */
446
446
  jurisdiction?: string;
447
- /** Transaction value (if applicable) */
447
+ /**
448
+ * Transaction value in MAJOR units (dollars, euros, native token units —
449
+ * NOT cents/minor units). Diverges from Stripe (minor units). UCP/ACP
450
+ * extractors auto-convert from cents (÷100). x402 uses per-token decimals.
451
+ * See `transport/transaction-value.ts` for per-protocol normalization.
452
+ */
448
453
  transactionValue?: number;
449
- /** Currency for transaction value */
454
+ /** ISO-4217 currency code for transactionValue (e.g. 'USD', 'AUD', 'ETH'). Falls back to 'USD' server-side when unset. */
450
455
  currency?: string;
451
456
  /** Whether this is a sub-agent request */
452
457
  isSubAgentRequest?: boolean;
@@ -557,6 +562,23 @@ interface ExpressMiddlewareOptions extends GatewayConfig {
557
562
  * DELETE→data.delete). Dashboard route mapping still outranks it.
558
563
  */
559
564
  extractAction?: (req: unknown) => string | undefined;
565
+ /**
566
+ * Optional extractor for the transaction value from the incoming request.
567
+ * Must return the value in MAJOR units (dollars, euros — NOT cents/minor
568
+ * units). This diverges from Stripe and most payment rails which use minor
569
+ * units. If your source is in minor units (cents), divide by 100 before
570
+ * returning.
571
+ *
572
+ * When configured, the extracted value and currency are forwarded to
573
+ * verify-access so PDLSS limit evaluation runs at middleware time.
574
+ *
575
+ * NOTE: this is opt-in upfront enforcement. `authorizeSettlement()` remains
576
+ * the REQUIRED fail-closed settlement gate at settlement time.
577
+ */
578
+ extractTransactionValue?: (req: unknown) => {
579
+ value: number;
580
+ currency: string;
581
+ } | undefined;
560
582
  /** Skip verification for certain paths */
561
583
  skipPaths?: string[];
562
584
  /** Custom response for denied requests */
@@ -444,9 +444,14 @@ interface VerificationRequest {
444
444
  resource?: string;
445
445
  /** Jurisdiction for the request */
446
446
  jurisdiction?: string;
447
- /** Transaction value (if applicable) */
447
+ /**
448
+ * Transaction value in MAJOR units (dollars, euros, native token units —
449
+ * NOT cents/minor units). Diverges from Stripe (minor units). UCP/ACP
450
+ * extractors auto-convert from cents (÷100). x402 uses per-token decimals.
451
+ * See `transport/transaction-value.ts` for per-protocol normalization.
452
+ */
448
453
  transactionValue?: number;
449
- /** Currency for transaction value */
454
+ /** ISO-4217 currency code for transactionValue (e.g. 'USD', 'AUD', 'ETH'). Falls back to 'USD' server-side when unset. */
450
455
  currency?: string;
451
456
  /** Whether this is a sub-agent request */
452
457
  isSubAgentRequest?: boolean;
@@ -557,6 +562,23 @@ interface ExpressMiddlewareOptions extends GatewayConfig {
557
562
  * DELETE→data.delete). Dashboard route mapping still outranks it.
558
563
  */
559
564
  extractAction?: (req: unknown) => string | undefined;
565
+ /**
566
+ * Optional extractor for the transaction value from the incoming request.
567
+ * Must return the value in MAJOR units (dollars, euros — NOT cents/minor
568
+ * units). This diverges from Stripe and most payment rails which use minor
569
+ * units. If your source is in minor units (cents), divide by 100 before
570
+ * returning.
571
+ *
572
+ * When configured, the extracted value and currency are forwarded to
573
+ * verify-access so PDLSS limit evaluation runs at middleware time.
574
+ *
575
+ * NOTE: this is opt-in upfront enforcement. `authorizeSettlement()` remains
576
+ * the REQUIRED fail-closed settlement gate at settlement time.
577
+ */
578
+ extractTransactionValue?: (req: unknown) => {
579
+ value: number;
580
+ currency: string;
581
+ } | undefined;
560
582
  /** Skip verification for certain paths */
561
583
  skipPaths?: string[];
562
584
  /** Custom response for denied requests */
@@ -1,4 +1,4 @@
1
- import { a as AccessLevel, d as CounterpartyType, T as TokenGuidance } from './types-Cwrvo30g.js';
1
+ import { a as AccessLevel, d as CounterpartyType, T as TokenGuidance } from './types-DrDIouvO.js';
2
2
 
3
3
  /**
4
4
  * AstraSync Gateway - Types for gateway modes, local evaluation, and adapter interface.
@@ -1,4 +1,4 @@
1
- import { C as CommerceShieldProps, l as VerificationResult, b as AgentCredentials, f as GuidanceInfo, k as TrustLevel } from '../types-Cwrvo30g.mjs';
1
+ import { C as CommerceShieldProps, l as VerificationResult, b as AgentCredentials, f as GuidanceInfo, k as TrustLevel } from '../types-DrDIouvO.mjs';
2
2
 
3
3
  /**
4
4
  * AstraSync Commerce Shield Component
@@ -1,4 +1,4 @@
1
- import { C as CommerceShieldProps, l as VerificationResult, b as AgentCredentials, f as GuidanceInfo, k as TrustLevel } from '../types-Cwrvo30g.js';
1
+ import { C as CommerceShieldProps, l as VerificationResult, b as AgentCredentials, f as GuidanceInfo, k as TrustLevel } from '../types-DrDIouvO.js';
2
2
 
3
3
  /**
4
4
  * AstraSync Commerce Shield Component
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrasyncai/verification-gateway",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "AstraSync KYA Platform SDK — counterparty verification gateway (verify incoming requests) + agent registration (register AI agents with the KYA backend).",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",