@fun-xyz/fiat-contract 0.52.0 → 0.53.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
@@ -8,3 +8,9 @@ The backend requires explicit client selection and its own enablement switch. A
8
8
  Send `provider: "MOONPAY_GUEST"` on every next request, with no `path` or customer credentials.
9
9
  After a guest refusal with `REQUOTE`, omit `MOONPAY_GUEST` from the next selection so `MOONPAY` remains available.
10
10
  The separate `./moonpay-guest` entry exports its wire types; schemas are exported from the root.
11
+
12
+ ## MoonPay connect preparation
13
+
14
+ Regular MoonPay's `connect` next action may carry an optional nonempty, unclaimed `orderId`. A client may use it to prepare a hidden, inert payment surface beside the connection check. This is not authorization to pay: wait for an accepted `order` response before revealing the surface. For that first order, the client may retain its prepared id even if the response carries a different id. Without the field, retain the existing behavior and wait for `order` before creating the payment surface.
15
+
16
+ Publish this additive contract before backend emission and update backend/frontend dependency pins. Older strict contract schemas reject the field; optionality preserves acceptance of older backend responses, not compatibility with old strict validators receiving the new field.
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.52.0";
2
+ var version = "0.53.0";
3
3
 
4
4
  // src/table.ts
5
5
  var TABLE_VERSION = version;
package/dist/index.js CHANGED
@@ -1491,7 +1491,7 @@ var $stepResponse = import_zod.z.union([$providerBoundStepResponse, $funAuthStep
1491
1491
  var FiatStepResponseSchema = $stepResponse;
1492
1492
 
1493
1493
  // package.json
1494
- var version = "0.52.0";
1494
+ var version = "0.53.0";
1495
1495
 
1496
1496
  // src/table.ts
1497
1497
  var TABLE_VERSION = version;
@@ -3585,7 +3585,8 @@ var $connectNextAction = obj2({
3585
3585
  next: import_zod2.z.literal("connect"),
3586
3586
  sessionToken: $nonEmpty,
3587
3587
  quoteInput: $quoteInput,
3588
- resetConnection: import_zod2.z.literal(true).optional()
3588
+ resetConnection: import_zod2.z.literal(true).optional(),
3589
+ orderId: $nonEmpty.optional()
3589
3590
  });
3590
3591
  var $phoneNextAction = obj2({ next: import_zod2.z.literal("phone"), error: import_zod2.z.literal("CODE_EXPIRED").nullable() });
3591
3592
  var $phoneCodeNextAction = obj2({
package/dist/index.mjs CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  tableEntry,
17
17
  unofferedEndpoints,
18
18
  unreachableStates
19
- } from "./chunk-JDI4TWPZ.mjs";
19
+ } from "./chunk-QXPR2MW6.mjs";
20
20
  import {
21
21
  MOONPAY_ENDPOINTS
22
22
  } from "./chunk-TIEGTTFY.mjs";
@@ -2673,7 +2673,8 @@ var $connectNextAction = obj2({
2673
2673
  next: z2.literal("connect"),
2674
2674
  sessionToken: $nonEmpty,
2675
2675
  quoteInput: $quoteInput,
2676
- resetConnection: z2.literal(true).optional()
2676
+ resetConnection: z2.literal(true).optional(),
2677
+ orderId: $nonEmpty.optional()
2677
2678
  });
2678
2679
  var $phoneNextAction = obj2({ next: z2.literal("phone"), error: z2.literal("CODE_EXPIRED").nullable() });
2679
2680
  var $phoneCodeNextAction = obj2({
@@ -108,13 +108,16 @@ export type MoonPaySessionRequest = {
108
108
  /**
109
109
  * Run MoonPay's connection check with `sessionToken`, the token `session` minted; it asks for an OTP
110
110
  * only if the hidden check fails. `resetConnection`: the device's connection is another buyer's, so
111
- * reset it first.
111
+ * reset it first. Optional `orderId` is unclaimed and lets the client prepare an inert payment surface
112
+ * while connecting. It does not authorize payment. After accepting an `order` response, the client
113
+ * may retain this prepared id for its first order even if the response carries a different id.
112
114
  */
113
115
  export type MoonPayConnectNextAction = {
114
116
  next: 'connect';
115
117
  sessionToken: string;
116
118
  quoteInput: MoonPayQuoteInput;
117
119
  resetConnection?: true;
120
+ orderId?: string;
118
121
  };
119
122
  export type MoonPayConnectRequest = {
120
123
  action: 'connect';
package/dist/table.js CHANGED
@@ -37,7 +37,7 @@ __export(table_exports, {
37
37
  module.exports = __toCommonJS(table_exports);
38
38
 
39
39
  // package.json
40
- var version = "0.52.0";
40
+ var version = "0.53.0";
41
41
 
42
42
  // src/table.ts
43
43
  var TABLE_VERSION = version;
package/dist/table.mjs CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  tableEntry,
13
13
  unofferedEndpoints,
14
14
  unreachableStates
15
- } from "./chunk-JDI4TWPZ.mjs";
15
+ } from "./chunk-QXPR2MW6.mjs";
16
16
  export {
17
17
  DOCUMENTED_ENDPOINTS,
18
18
  FUN_AUTH_ERROR_CODES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fun-xyz/fiat-contract",
3
- "version": "0.52.0",
3
+ "version": "0.53.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": {