@fun-xyz/fiat-contract 0.22.2 → 0.24.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 +83 -44
- package/dist/chunk-5UEPWL7B.mjs +11 -0
- package/dist/{chunk-5GRPYE2U.mjs → chunk-CRNKRIKR.mjs} +1 -1
- package/dist/{chunk-DTHUNDA7.mjs → chunk-IPOPANXS.mjs} +2 -2
- package/dist/chunk-T5JAYOWY.mjs +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +241 -64
- package/dist/index.mjs +238 -65
- package/dist/providers/moonpay.d.ts +107 -109
- package/dist/providers/moonpay.js +1 -1
- package/dist/providers/moonpay.mjs +1 -1
- package/dist/providers/moonpay.schemas.d.ts +22 -5
- package/dist/routing.d.ts +168 -0
- package/dist/routing.js +31 -0
- package/dist/routing.mjs +7 -0
- package/dist/schemas.d.ts +9 -1
- package/dist/table.js +1 -1
- package/dist/table.mjs +1 -1
- package/dist/terms.d.ts +2 -2
- package/dist/terms.mjs +1 -1
- package/dist/types.d.ts +16 -1
- package/package.json +11 -1
- package/routing.d.ts +1 -0
- package/routing.js +2 -0
- package/dist/chunk-3HCZ6JBJ.mjs +0 -9
package/dist/types.d.ts
CHANGED
|
@@ -715,7 +715,7 @@ export type FiatStepResponse = (FiatStepResponseBase & {
|
|
|
715
715
|
/** Optional future payment artifact; never one of this response's currently active transitions. */
|
|
716
716
|
preparedPayment?: PreparedPayment;
|
|
717
717
|
/**
|
|
718
|
-
* The provider runs its own flow from here (`POST /fiat/
|
|
718
|
+
* The provider runs its own flow from here (`POST /fiat/next`). Present
|
|
719
719
|
* only on a `QUOTE`, when the request's `handoffs` named this provider; the response then
|
|
720
720
|
* carries no transitions.
|
|
721
721
|
*/
|
|
@@ -723,5 +723,20 @@ export type FiatStepResponse = (FiatStepResponseBase & {
|
|
|
723
723
|
provider: FiatProvider;
|
|
724
724
|
};
|
|
725
725
|
});
|
|
726
|
+
/** The geo endpoint's response, sent on every `/next` request. `alpha2` is ISO 3166-1 alpha-2. */
|
|
727
|
+
export type FiatGeo = {
|
|
728
|
+
alpha2: string;
|
|
729
|
+
region?: string;
|
|
730
|
+
ip?: string;
|
|
731
|
+
};
|
|
732
|
+
/**
|
|
733
|
+
* The body of every `POST /fiat/next`: `provider`, `geo`, and the provider's own request, which
|
|
734
|
+
* names its `action`. Each provider defines its actions and their fields (`./moonpay`).
|
|
735
|
+
*/
|
|
736
|
+
export type FiatNextRequest = {
|
|
737
|
+
provider: FiatProvider;
|
|
738
|
+
action: string;
|
|
739
|
+
geo: FiatGeo;
|
|
740
|
+
} & Record<string, unknown>;
|
|
726
741
|
export {};
|
|
727
742
|
//# sourceMappingURL=types.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fun-xyz/fiat-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.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/terms.mjs",
|
|
39
39
|
"require": "./dist/terms.js"
|
|
40
40
|
},
|
|
41
|
+
"./routing": {
|
|
42
|
+
"types": "./dist/routing.d.ts",
|
|
43
|
+
"import": "./dist/routing.mjs",
|
|
44
|
+
"require": "./dist/routing.js"
|
|
45
|
+
},
|
|
41
46
|
"./package.json": "./package.json"
|
|
42
47
|
},
|
|
43
48
|
"files": [
|
|
@@ -50,6 +55,8 @@
|
|
|
50
55
|
"moonpay.d.ts",
|
|
51
56
|
"terms.js",
|
|
52
57
|
"terms.d.ts",
|
|
58
|
+
"routing.js",
|
|
59
|
+
"routing.d.ts",
|
|
53
60
|
"README.md",
|
|
54
61
|
"!dist/**/*.map"
|
|
55
62
|
],
|
|
@@ -95,6 +102,9 @@
|
|
|
95
102
|
],
|
|
96
103
|
"terms": [
|
|
97
104
|
"./dist/terms.d.ts"
|
|
105
|
+
],
|
|
106
|
+
"routing": [
|
|
107
|
+
"./dist/routing.d.ts"
|
|
98
108
|
]
|
|
99
109
|
}
|
|
100
110
|
}
|
package/routing.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/routing';
|
package/routing.js
ADDED