@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 +6 -0
- package/dist/{chunk-JDI4TWPZ.mjs → chunk-QXPR2MW6.mjs} +1 -1
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/dist/providers/moonpay.d.ts +4 -1
- package/dist/table.js +1 -1
- package/dist/table.mjs +1 -1
- package/package.json +1 -1
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.
|
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.
|
|
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-
|
|
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
package/dist/table.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fun-xyz/fiat-contract",
|
|
3
|
-
"version": "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": {
|