@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/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/providers/{provider}/intent`). Present
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.22.2",
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
@@ -0,0 +1,2 @@
1
+ // Compat stub — see table.js. Metro before RN 0.79 resolves `@fun-xyz/fiat-contract/routing` by path.
2
+ module.exports = require('./dist/routing.js');
@@ -1,9 +0,0 @@
1
- // src/providers/moonpay.ts
2
- var MOONPAY_ENDPOINTS = {
3
- intent: "POST /fiat/providers/moonpay/intent"
4
- };
5
-
6
- export {
7
- MOONPAY_ENDPOINTS
8
- };
9
- //# sourceMappingURL=chunk-3HCZ6JBJ.mjs.map