@fun-xyz/fiat-contract 0.47.0 → 0.49.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/{chunk-JMJ45E27.mjs → chunk-6NZFTT7Q.mjs} +1 -1
- package/dist/chunk-KLAXY6H7.mjs +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +311 -43
- package/dist/index.mjs +312 -46
- package/dist/providers/coinbase.d.ts +6 -1
- package/dist/providers/stripe.d.ts +283 -0
- package/dist/providers/stripe.js +28 -0
- package/dist/providers/stripe.mjs +6 -0
- package/dist/providers/stripe.schemas.d.ts +44 -0
- package/dist/table.js +1 -1
- package/dist/table.mjs +1 -1
- package/package.json +11 -1
- package/stripe.d.ts +1 -0
- package/stripe.js +2 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Stripe flow on `POST /fiat/next`.
|
|
3
|
+
*
|
|
4
|
+
* A response names the next action in `next`; the client's request names it in `action`. `observe` answers the
|
|
5
|
+
* current next action. `wait` and `verifyIdentity` have no request: send `observe` after them. `orderPending` is
|
|
6
|
+
* answered by `order`. Identity, the verified email and the deposit wallet come from the verified partner assertion,
|
|
7
|
+
* never from a request body.
|
|
8
|
+
*
|
|
9
|
+
* A retry sends the same request and gets the current response. A fault is a 4xx/5xx whose body is
|
|
10
|
+
* `StripeErrorBody`; anything the buyer can act on is a 200.
|
|
11
|
+
*
|
|
12
|
+
* Zero runtime dependencies, so production React Native code can import it. The zod schemas are in
|
|
13
|
+
* `./stripe.schemas`, exported from the package root only.
|
|
14
|
+
*/
|
|
15
|
+
import type { FiatTermsRequest, TermsDocument } from '../terms';
|
|
16
|
+
import type { FeeLine, FiatAmount, FiatGeo, FiatStepResponse, FormField, KycFieldId } from '../types';
|
|
17
|
+
export declare const STRIPE_ENDPOINTS: {
|
|
18
|
+
readonly next: "POST /fiat/next";
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* The checkout terms, sent on every request. No routing quote: the backend mints the order id on `placeOrder`. After
|
|
22
|
+
* `placeOrder`, `checkout` and `order` read the order as it was placed and ignore this copy, and a `placeOrder`
|
|
23
|
+
* retried under the same `orderId` places nothing new.
|
|
24
|
+
*/
|
|
25
|
+
export interface StripeCheckout {
|
|
26
|
+
/** Stripe serves USD only. */
|
|
27
|
+
amount: FiatAmount & {
|
|
28
|
+
currency: 'USD';
|
|
29
|
+
};
|
|
30
|
+
/** The asset and its network, as the routing table or `/fiat/quote` named them. */
|
|
31
|
+
destination: {
|
|
32
|
+
asset: string;
|
|
33
|
+
network: string;
|
|
34
|
+
};
|
|
35
|
+
paymentMethod: 'apple_pay';
|
|
36
|
+
}
|
|
37
|
+
export type StripeRequestContext = {
|
|
38
|
+
checkout: StripeCheckout;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* The last id a `placeOrder` answer minted, on every step request once the client holds one: a step-up after
|
|
42
|
+
* `placeOrder`, and a reopened app, reach that order instead of minting another.
|
|
43
|
+
*/
|
|
44
|
+
export type StripeHeldOrder = {
|
|
45
|
+
orderId?: string;
|
|
46
|
+
};
|
|
47
|
+
/** No next action of its own: the answer is the current next action. Writes nothing. */
|
|
48
|
+
export type StripeObserveRequest = {
|
|
49
|
+
action: 'observe';
|
|
50
|
+
} & StripeHeldOrder;
|
|
51
|
+
/** Fun's KYC consent, before the first `kyc` round, if the buyer has not accepted it. */
|
|
52
|
+
export type StripeConsentNextAction = {
|
|
53
|
+
next: 'consent';
|
|
54
|
+
documents: TermsDocument[];
|
|
55
|
+
};
|
|
56
|
+
/** The `POST /fiat/terms` items, recorded under the same rules. */
|
|
57
|
+
export type StripeConsentRequest = {
|
|
58
|
+
action: 'consent';
|
|
59
|
+
acceptances: FiatTermsRequest['acceptances'];
|
|
60
|
+
} & StripeHeldOrder;
|
|
61
|
+
/** Send `session`. The backend asks Stripe for a Link sign-in for the assertion's verified email. */
|
|
62
|
+
export type StripeSessionNextAction = {
|
|
63
|
+
next: 'session';
|
|
64
|
+
};
|
|
65
|
+
export type StripeSessionRequest = {
|
|
66
|
+
action: 'session';
|
|
67
|
+
} & StripeHeldOrder;
|
|
68
|
+
/** Run the SDK's `authorize(linkAuthIntentId)` before `expiresAt` (ISO-8601), then send `authorize` with its outcome. */
|
|
69
|
+
export type StripeAuthorizeNextAction = {
|
|
70
|
+
next: 'authorize';
|
|
71
|
+
linkAuthIntentId: string;
|
|
72
|
+
expiresAt: string;
|
|
73
|
+
};
|
|
74
|
+
/** The SDK's outcome. `Consented` carries the customer the SDK names; the other outcomes carry none. */
|
|
75
|
+
export type StripeAuthorizeRequest = ({
|
|
76
|
+
action: 'authorize';
|
|
77
|
+
linkAuthIntentId: string;
|
|
78
|
+
outcome: 'Consented';
|
|
79
|
+
customerId: string;
|
|
80
|
+
} | {
|
|
81
|
+
action: 'authorize';
|
|
82
|
+
linkAuthIntentId: string;
|
|
83
|
+
outcome: 'Denied' | 'Cancelled';
|
|
84
|
+
}) & StripeHeldOrder;
|
|
85
|
+
/** Signs the device in to Link without a code. Give `clientSecret` to the SDK before `expiresAt` (ISO-8601). */
|
|
86
|
+
export type StripeLinkAuthToken = {
|
|
87
|
+
clientSecret: string;
|
|
88
|
+
expiresAt: string;
|
|
89
|
+
};
|
|
90
|
+
/** A reason on one field of a `kyc` next action. `fieldId` names a field in that next action. */
|
|
91
|
+
export interface StripeFieldError {
|
|
92
|
+
fieldId: string;
|
|
93
|
+
message: string;
|
|
94
|
+
}
|
|
95
|
+
/** Why a re-ask asks again. Treat an unknown code like `null`: adding a code is a minor contract change. */
|
|
96
|
+
export type StripeReaskReason = 'REJECTED';
|
|
97
|
+
/** Fields of the `kyc` form the buyer gave before that Stripe asks for again. `requirements` is never empty. */
|
|
98
|
+
export type StripeReask = {
|
|
99
|
+
requirements: KycFieldId[];
|
|
100
|
+
reason: StripeReaskReason | null;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Show the shared form, prefilled with `heldValues`. `ACCOUNT`: call `registerLinkUser` with the values and
|
|
104
|
+
* `verifiedEmail`. `IDENTITY`: sign in with `linkAuthToken`, then call `attachKycInfo` with the values. Then send `kyc`
|
|
105
|
+
* with `correctionRound`, which names this form: how many `l1` forms Stripe was handed before it. `linkAuthToken` is
|
|
106
|
+
* `null` when the backend could not mint one: the device pushes under the Link session `authorize` left it.
|
|
107
|
+
*/
|
|
108
|
+
export type StripeKycNextAction = {
|
|
109
|
+
next: 'kyc';
|
|
110
|
+
round: 'ACCOUNT' | 'IDENTITY';
|
|
111
|
+
tier: 'l0' | 'l1';
|
|
112
|
+
correctionRound: number;
|
|
113
|
+
fields: FormField[];
|
|
114
|
+
heldValues: Partial<Record<KycFieldId, string>>;
|
|
115
|
+
verifiedEmail: string | null;
|
|
116
|
+
linkAuthToken: StripeLinkAuthToken | null;
|
|
117
|
+
fieldErrors?: StripeFieldError[];
|
|
118
|
+
reask: StripeReask | null;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* `values` is keyed by the ids of the next action's fields: the values the device gave Stripe. `correctionRound` is the
|
|
122
|
+
* next action's, unchanged. A form that is no longer current writes nothing and answers the current next action, so a
|
|
123
|
+
* resent form counts once.
|
|
124
|
+
*/
|
|
125
|
+
export type StripeKycRequest = {
|
|
126
|
+
action: 'kyc';
|
|
127
|
+
correctionRound: number;
|
|
128
|
+
values: Partial<Record<KycFieldId, string>>;
|
|
129
|
+
} & StripeHeldOrder;
|
|
130
|
+
/** Sign in with `linkAuthToken`, run the SDK's `verifyIdentity`, then send `observe`. */
|
|
131
|
+
export type StripeVerifyIdentityNextAction = {
|
|
132
|
+
next: 'verifyIdentity';
|
|
133
|
+
linkAuthToken: StripeLinkAuthToken | null;
|
|
134
|
+
};
|
|
135
|
+
/** Stripe is reviewing, or a sign-in is settling. No request of its own: send `observe` after the delay. */
|
|
136
|
+
export type StripeWaitNextAction = {
|
|
137
|
+
next: 'wait';
|
|
138
|
+
retryAfterMs: number;
|
|
139
|
+
};
|
|
140
|
+
/** The order's price: the checkout's amount, with Stripe's own fees and delivered amount for it. */
|
|
141
|
+
export interface StripePrice {
|
|
142
|
+
total: FiatAmount;
|
|
143
|
+
fees: FeeLine[];
|
|
144
|
+
cryptoAmount: string;
|
|
145
|
+
}
|
|
146
|
+
/** What the Apple Pay sheet shows and where Stripe delivers. `amount` is the charge, the checkout's own string. */
|
|
147
|
+
export interface StripePaySheet {
|
|
148
|
+
destinationCurrency: string;
|
|
149
|
+
destinationNetwork: string;
|
|
150
|
+
walletAddress: string;
|
|
151
|
+
merchantCountryCode: 'US';
|
|
152
|
+
currencyCode: 'USD';
|
|
153
|
+
amount: string;
|
|
154
|
+
label: string;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Show `price` and the Apple Pay button. The tap signs in with `linkAuthToken`, runs `registerWalletAddress`,
|
|
158
|
+
* `collectPaymentMethod` and `createCryptoPaymentToken` with `paySheet`, then sends `placeOrder`. `orderId` is minted for
|
|
159
|
+
* this answer: send it back on `placeOrder`, and on every `checkout` and `order` after it.
|
|
160
|
+
*/
|
|
161
|
+
export type StripePlaceOrderNextAction = {
|
|
162
|
+
next: 'placeOrder';
|
|
163
|
+
orderId: string;
|
|
164
|
+
price: StripePrice;
|
|
165
|
+
paySheet: StripePaySheet;
|
|
166
|
+
linkAuthToken: StripeLinkAuthToken | null;
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Creates the Stripe session under `orderId` with the payment token and answers `pay`. A retry with the same `orderId`
|
|
170
|
+
* places nothing new. `cryptoPaymentToken` is named so request logs redact it.
|
|
171
|
+
*/
|
|
172
|
+
export type StripePlaceOrderRequest = {
|
|
173
|
+
action: 'placeOrder';
|
|
174
|
+
orderId: string;
|
|
175
|
+
cryptoPaymentToken: string;
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* Sign in with `linkAuthToken`, then run the SDK's `performCheckout(sessionId)`. Inside its callback send `checkout`;
|
|
179
|
+
* after it resolves, send `order`.
|
|
180
|
+
*/
|
|
181
|
+
export type StripePayNextAction = {
|
|
182
|
+
next: 'pay';
|
|
183
|
+
orderId: string;
|
|
184
|
+
sessionId: string;
|
|
185
|
+
linkAuthToken: StripeLinkAuthToken | null;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* Sent from inside `performCheckout`'s callback, which supplies no id. Create a fresh `callbackId` per invocation and
|
|
189
|
+
* reuse it only for transport retries of that invocation.
|
|
190
|
+
*/
|
|
191
|
+
export type StripeCheckoutRequest = {
|
|
192
|
+
action: 'checkout';
|
|
193
|
+
orderId: string;
|
|
194
|
+
callbackId: string;
|
|
195
|
+
};
|
|
196
|
+
/** Return `clientSecret` to the SDK's callback. It is a credential: never stored, never logged. */
|
|
197
|
+
export type StripeCheckoutSecretNextAction = {
|
|
198
|
+
next: 'checkoutSecret';
|
|
199
|
+
clientSecret: string;
|
|
200
|
+
};
|
|
201
|
+
/** Reads Stripe and moves the order `orderId` forward. */
|
|
202
|
+
export type StripeOrderRequest = {
|
|
203
|
+
action: 'order';
|
|
204
|
+
orderId: string;
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* The order exists and is not terminal. `order` is its current body, or `null` before the order is recorded.
|
|
208
|
+
* Do not open a payment sheet. After `retryAfterMs`, send `order`.
|
|
209
|
+
*/
|
|
210
|
+
export type StripeOrderPendingNextAction = {
|
|
211
|
+
next: 'orderPending';
|
|
212
|
+
orderId: string;
|
|
213
|
+
retryAfterMs: number;
|
|
214
|
+
order: FiatStepResponse | null;
|
|
215
|
+
};
|
|
216
|
+
export type StripeRequest = StripeRequestContext & (StripeObserveRequest | StripeConsentRequest | StripeSessionRequest | StripeAuthorizeRequest | StripeKycRequest | StripePlaceOrderRequest | StripeCheckoutRequest | StripeOrderRequest);
|
|
217
|
+
/** Every `action` a Stripe request names. `wait` and `verifyIdentity` are next actions the client answers with `observe`. */
|
|
218
|
+
export type StripeAction = StripeRequest['action'];
|
|
219
|
+
/** The wire body. The orchestrator reads `provider` and `geo`; Stripe's action schemas read the rest. */
|
|
220
|
+
export type StripeNextRequest = {
|
|
221
|
+
provider: 'STRIPE';
|
|
222
|
+
geo: FiatGeo;
|
|
223
|
+
} & StripeRequest;
|
|
224
|
+
/** Every next action but `checkoutSecret`, which only `checkout` answers. */
|
|
225
|
+
export type StripeNextAction = StripeConsentNextAction | StripeSessionNextAction | StripeAuthorizeNextAction | StripeKycNextAction | StripeVerifyIdentityNextAction | StripeWaitNextAction | StripePlaceOrderNextAction | StripePayNextAction | StripeOrderPendingNextAction;
|
|
226
|
+
/** The order is terminal. `order` is its body, which the shared order screen renders. */
|
|
227
|
+
export type StripeDone = {
|
|
228
|
+
next: 'done';
|
|
229
|
+
order: FiatStepResponse;
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* Read `recovery`, never derive it from the reason. `REQUOTE` goes back to routing; `NONE` ends the flow.
|
|
233
|
+
* `LIMITS_EXCEEDED` carries the cap that refused as `maxAmount` when that cap is an amount.
|
|
234
|
+
*/
|
|
235
|
+
export type StripeStepRefusal = 'NOT_ELIGIBLE' | 'KYC_REJECTED' | 'FINAL_REJECTION' | 'TOTAL_MISMATCH';
|
|
236
|
+
export type StripeRefused = {
|
|
237
|
+
next: 'refused';
|
|
238
|
+
reason: StripeStepRefusal;
|
|
239
|
+
recovery: 'REQUOTE' | 'NONE';
|
|
240
|
+
} | {
|
|
241
|
+
next: 'refused';
|
|
242
|
+
reason: 'LIMITS_EXCEEDED';
|
|
243
|
+
recovery: 'REQUOTE';
|
|
244
|
+
maxAmount: FiatAmount | null;
|
|
245
|
+
};
|
|
246
|
+
/** Every action but `checkout` and `order`. An open order answers `orderPending` and a terminal one `done`. */
|
|
247
|
+
export type StripeStepResponse = StripeNextAction | StripeDone | StripeRefused;
|
|
248
|
+
/** The secret, or the current step when none can be given: return `null` to the SDK's callback and act on the step. */
|
|
249
|
+
export type StripeCheckoutResponse = StripeCheckoutSecretNextAction | StripeStepResponse;
|
|
250
|
+
/** `order` never refuses: it runs after the buyer may have paid. */
|
|
251
|
+
export type StripeOrderResponse = StripeDone | StripeOrderPendingNextAction;
|
|
252
|
+
/** Every answer Stripe's `/fiat/next` gives. */
|
|
253
|
+
export type StripeResponse = StripeCheckoutResponse | StripeOrderResponse;
|
|
254
|
+
export type StripeResponseFor = {
|
|
255
|
+
observe: StripeStepResponse;
|
|
256
|
+
consent: StripeStepResponse;
|
|
257
|
+
session: StripeStepResponse;
|
|
258
|
+
authorize: StripeStepResponse;
|
|
259
|
+
kyc: StripeStepResponse;
|
|
260
|
+
placeOrder: StripeStepResponse;
|
|
261
|
+
checkout: StripeCheckoutResponse;
|
|
262
|
+
order: StripeOrderResponse;
|
|
263
|
+
};
|
|
264
|
+
/** `RETRY` sends the same request again. `REQUOTE` goes back to routing. `NONE` ends the flow. */
|
|
265
|
+
export type StripeRecovery = 'RETRY' | 'REQUOTE' | 'NONE';
|
|
266
|
+
/**
|
|
267
|
+
* `SESSION_BUDGET_SPENT`: the per-login sign-in budget `session` spends (429). `RATE_LIMITED`: the action's request
|
|
268
|
+
* budget (429). `PROVIDER_UNAVAILABLE`: Stripe is down (503). `KYC_PROVIDER_UNAVAILABLE`: the KYC provider is down
|
|
269
|
+
* (503). `SERVICE_UNAVAILABLE`: one of Fun's own stores is down (503). `INVALID_REQUEST`: a bad body (400).
|
|
270
|
+
*/
|
|
271
|
+
export type StripeFaultReason = 'SESSION_BUDGET_SPENT' | 'RATE_LIMITED' | 'PROVIDER_UNAVAILABLE' | 'KYC_PROVIDER_UNAVAILABLE' | 'SERVICE_UNAVAILABLE' | 'INVALID_REQUEST';
|
|
272
|
+
/** The fields a Stripe fault adds to the shared error body. */
|
|
273
|
+
export interface StripeFault {
|
|
274
|
+
reason: StripeFaultReason;
|
|
275
|
+
recovery: StripeRecovery;
|
|
276
|
+
}
|
|
277
|
+
/** The route's 4xx/5xx body: the shared error body plus `StripeFault`. A 429 adds `retryAfterSeconds`. */
|
|
278
|
+
export type StripeErrorBody = StripeFault & {
|
|
279
|
+
errorCode: string;
|
|
280
|
+
errorMsg: string;
|
|
281
|
+
reqId?: string;
|
|
282
|
+
retryAfterSeconds?: number;
|
|
283
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/providers/stripe.ts
|
|
21
|
+
var stripe_exports = {};
|
|
22
|
+
__export(stripe_exports, {
|
|
23
|
+
STRIPE_ENDPOINTS: () => STRIPE_ENDPOINTS
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(stripe_exports);
|
|
26
|
+
var STRIPE_ENDPOINTS = {
|
|
27
|
+
next: "POST /fiat/next"
|
|
28
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* zod schemas for the Stripe flow on `POST /fiat/next`. Test-time and backend-boundary only:
|
|
3
|
+
* exported from the package root, never from `./stripe`, so the production entry stays free of zod.
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import type { StripeAuthorizeNextAction, StripeAuthorizeRequest, StripeCheckout, StripeCheckoutRequest, StripeCheckoutResponse, StripeCheckoutSecretNextAction, StripeConsentNextAction, StripeConsentRequest, StripeDone, StripeErrorBody, StripeFault, StripeKycNextAction, StripeKycRequest, StripeLinkAuthToken, StripeNextAction, StripeNextRequest, StripeObserveRequest, StripeOrderPendingNextAction, StripeOrderRequest, StripeOrderResponse, StripePayNextAction, StripePaySheet, StripePlaceOrderNextAction, StripePlaceOrderRequest, StripePrice, StripeReask, StripeRefused, StripeRequest, StripeRequestContext, StripeResponseFor, StripeSessionNextAction, StripeSessionRequest, StripeStepResponse, StripeVerifyIdentityNextAction, StripeWaitNextAction } from './stripe';
|
|
7
|
+
export declare const StripeCheckoutSchema: z.ZodType<StripeCheckout>;
|
|
8
|
+
export declare const StripeRequestContextSchema: z.ZodType<StripeRequestContext>;
|
|
9
|
+
export declare const StripeObserveRequestSchema: z.ZodType<StripeRequestContext & StripeObserveRequest>;
|
|
10
|
+
export declare const StripeConsentRequestSchema: z.ZodType<StripeRequestContext & StripeConsentRequest>;
|
|
11
|
+
export declare const StripeSessionRequestSchema: z.ZodType<StripeRequestContext & StripeSessionRequest>;
|
|
12
|
+
export declare const StripeAuthorizeRequestSchema: z.ZodType<StripeRequestContext & StripeAuthorizeRequest>;
|
|
13
|
+
export declare const StripeKycRequestSchema: z.ZodType<StripeRequestContext & StripeKycRequest>;
|
|
14
|
+
export declare const StripePlaceOrderRequestSchema: z.ZodType<StripeRequestContext & StripePlaceOrderRequest>;
|
|
15
|
+
export declare const StripeCheckoutRequestSchema: z.ZodType<StripeRequestContext & StripeCheckoutRequest>;
|
|
16
|
+
export declare const StripeOrderRequestSchema: z.ZodType<StripeRequestContext & StripeOrderRequest>;
|
|
17
|
+
export declare const StripeRequestSchema: z.ZodType<StripeRequest>;
|
|
18
|
+
export declare const StripeNextRequestSchema: z.ZodType<StripeNextRequest>;
|
|
19
|
+
export declare const StripePriceSchema: z.ZodType<StripePrice>;
|
|
20
|
+
export declare const StripePaySheetSchema: z.ZodType<StripePaySheet>;
|
|
21
|
+
export declare const StripeLinkAuthTokenSchema: z.ZodType<StripeLinkAuthToken>;
|
|
22
|
+
export declare const StripeReaskSchema: z.ZodType<StripeReask>;
|
|
23
|
+
export declare const StripeConsentNextActionSchema: z.ZodType<StripeConsentNextAction>;
|
|
24
|
+
export declare const StripeSessionNextActionSchema: z.ZodType<StripeSessionNextAction>;
|
|
25
|
+
export declare const StripeAuthorizeNextActionSchema: z.ZodType<StripeAuthorizeNextAction>;
|
|
26
|
+
export declare const StripeKycNextActionSchema: z.ZodType<StripeKycNextAction>;
|
|
27
|
+
export declare const StripeVerifyIdentityNextActionSchema: z.ZodType<StripeVerifyIdentityNextAction>;
|
|
28
|
+
export declare const StripeWaitNextActionSchema: z.ZodType<StripeWaitNextAction>;
|
|
29
|
+
export declare const StripePlaceOrderNextActionSchema: z.ZodType<StripePlaceOrderNextAction>;
|
|
30
|
+
export declare const StripePayNextActionSchema: z.ZodType<StripePayNextAction>;
|
|
31
|
+
export declare const StripeCheckoutSecretNextActionSchema: z.ZodType<StripeCheckoutSecretNextAction>;
|
|
32
|
+
export declare const StripeOrderPendingNextActionSchema: z.ZodType<StripeOrderPendingNextAction>;
|
|
33
|
+
export declare const StripeNextActionSchema: z.ZodType<StripeNextAction>;
|
|
34
|
+
export declare const StripeDoneSchema: z.ZodType<StripeDone>;
|
|
35
|
+
export declare const StripeRefusedSchema: z.ZodType<StripeRefused>;
|
|
36
|
+
export declare const StripeStepResponseSchema: z.ZodType<StripeStepResponse>;
|
|
37
|
+
export declare const StripeCheckoutResponseSchema: z.ZodType<StripeCheckoutResponse>;
|
|
38
|
+
export declare const StripeOrderResponseSchema: z.ZodType<StripeOrderResponse>;
|
|
39
|
+
/** The response schema for each request action, as `StripeResponseFor` types it. */
|
|
40
|
+
export declare const StripeResponseSchemaFor: {
|
|
41
|
+
readonly [A in keyof StripeResponseFor]: z.ZodType<StripeResponseFor[A]>;
|
|
42
|
+
};
|
|
43
|
+
export declare const StripeFaultSchema: z.ZodType<StripeFault>;
|
|
44
|
+
export declare const StripeErrorBodySchema: z.ZodType<StripeErrorBody>;
|
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.49.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": {
|
|
@@ -38,6 +38,11 @@
|
|
|
38
38
|
"import": "./dist/providers/coinbase.mjs",
|
|
39
39
|
"require": "./dist/providers/coinbase.js"
|
|
40
40
|
},
|
|
41
|
+
"./stripe": {
|
|
42
|
+
"types": "./dist/providers/stripe.d.ts",
|
|
43
|
+
"import": "./dist/providers/stripe.mjs",
|
|
44
|
+
"require": "./dist/providers/stripe.js"
|
|
45
|
+
},
|
|
41
46
|
"./terms": {
|
|
42
47
|
"types": "./dist/terms.d.ts",
|
|
43
48
|
"import": "./dist/terms.mjs",
|
|
@@ -65,6 +70,8 @@
|
|
|
65
70
|
"moonpay.d.ts",
|
|
66
71
|
"coinbase.js",
|
|
67
72
|
"coinbase.d.ts",
|
|
73
|
+
"stripe.js",
|
|
74
|
+
"stripe.d.ts",
|
|
68
75
|
"terms.js",
|
|
69
76
|
"terms.d.ts",
|
|
70
77
|
"routing.js",
|
|
@@ -113,6 +120,9 @@
|
|
|
113
120
|
"coinbase": [
|
|
114
121
|
"./dist/providers/coinbase.d.ts"
|
|
115
122
|
],
|
|
123
|
+
"stripe": [
|
|
124
|
+
"./dist/providers/stripe.d.ts"
|
|
125
|
+
],
|
|
116
126
|
"terms": [
|
|
117
127
|
"./dist/terms.d.ts"
|
|
118
128
|
],
|
package/stripe.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/providers/stripe';
|
package/stripe.js
ADDED