@fun-xyz/fiat-contract 0.18.0 → 0.19.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 CHANGED
@@ -100,7 +100,8 @@ A provider can run its own flow instead of the shared step machine. `POST /fiat/
100
100
  and prices. When the request's `handoffs` lists the winning provider, the response carries
101
101
  `handoff: { provider }` and no transitions, and the client calls that provider's routes under
102
102
  `POST /fiat/providers/{provider}/…`. The schema refuses a handoff to a provider other than the
103
- response's own, and a handoff that still offers transitions.
103
+ response's own, and a handoff that still offers transitions. When the provider records terms,
104
+ `handoff.termsAcceptance.version` names the revision; the client echoes it in `start`.
104
105
 
105
106
  MoonPay is the first (`./moonpay`). Its routes are `start`, `intent`, `kyc`, and `complete`, in
106
107
  `MOONPAY_ENDPOINTS`. Only `intent` decides: it answers with a `MoonPayStanding` (`READY`, `KYC`,
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.18.0";
2
+ var version = "0.19.0";
3
3
 
4
4
  // src/table.ts
5
5
  var TABLE_VERSION = version;
@@ -514,4 +514,4 @@ export {
514
514
  tableEntry,
515
515
  isTerminal
516
516
  };
517
- //# sourceMappingURL=chunk-7KI7DJZ2.mjs.map
517
+ //# sourceMappingURL=chunk-G3GKLFI2.mjs.map
package/dist/index.js CHANGED
@@ -970,7 +970,7 @@ var $providerBoundStepResponse = obj({
970
970
  provider: $provider,
971
971
  transitions: import_zod.z.array($transition),
972
972
  preparedPayment: $preparedPayment.optional(),
973
- handoff: obj({ provider: $provider }).optional(),
973
+ handoff: obj({ provider: $provider, termsAcceptance: obj({ version: import_zod.z.string().min(1) }).optional() }).optional(),
974
974
  routingSessionRef: import_zod.z.string().optional(),
975
975
  providerAuthToken: obj({
976
976
  clientSecret: import_zod.z.string(),
@@ -1024,7 +1024,7 @@ var $stepResponse = import_zod.z.union([$providerBoundStepResponse, $blockedStep
1024
1024
  var FiatStepResponseSchema = $stepResponse;
1025
1025
 
1026
1026
  // package.json
1027
- var version = "0.18.0";
1027
+ var version = "0.19.0";
1028
1028
 
1029
1029
  // src/table.ts
1030
1030
  var TABLE_VERSION = version;
package/dist/index.mjs CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  tableEntry,
13
13
  unofferedEndpoints,
14
14
  unreachableStates
15
- } from "./chunk-7KI7DJZ2.mjs";
15
+ } from "./chunk-G3GKLFI2.mjs";
16
16
  import {
17
17
  MOONPAY_ENDPOINTS
18
18
  } from "./chunk-YWKS7MMT.mjs";
@@ -856,7 +856,7 @@ var $providerBoundStepResponse = obj({
856
856
  provider: $provider,
857
857
  transitions: z.array($transition),
858
858
  preparedPayment: $preparedPayment.optional(),
859
- handoff: obj({ provider: $provider }).optional(),
859
+ handoff: obj({ provider: $provider, termsAcceptance: obj({ version: z.string().min(1) }).optional() }).optional(),
860
860
  routingSessionRef: z.string().optional(),
861
861
  providerAuthToken: obj({
862
862
  clientSecret: z.string(),
package/dist/table.js CHANGED
@@ -36,7 +36,7 @@ __export(table_exports, {
36
36
  module.exports = __toCommonJS(table_exports);
37
37
 
38
38
  // package.json
39
- var version = "0.18.0";
39
+ var version = "0.19.0";
40
40
 
41
41
  // src/table.ts
42
42
  var TABLE_VERSION = version;
package/dist/table.mjs CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  tableEntry,
12
12
  unofferedEndpoints,
13
13
  unreachableStates
14
- } from "./chunk-7KI7DJZ2.mjs";
14
+ } from "./chunk-G3GKLFI2.mjs";
15
15
  export {
16
16
  DOCUMENTED_ENDPOINTS,
17
17
  STATE_KEYS,
package/dist/types.d.ts CHANGED
@@ -720,6 +720,10 @@ export type FiatStepResponse = (FiatStepResponseBase & {
720
720
  */
721
721
  handoff?: {
722
722
  provider: FiatProvider;
723
+ /** The terms revision the provider's `start` records; echo it in `termsAcceptance.version`. */
724
+ termsAcceptance?: {
725
+ version: string;
726
+ };
723
727
  };
724
728
  });
725
729
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fun-xyz/fiat-contract",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "Published conformance contract for Fun's headless fiat onramp: FlowState/Transition types, zod schemas, the transition table as data, recorded fixtures, assertion helpers.",
5
5
  "license": "MIT",
6
6
  "repository": {