@compass-labs/api-sdk 2.2.104 → 2.2.105-rc.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.
Files changed (159) hide show
  1. package/README.md +3 -13
  2. package/codeSamples_typescript.yaml +0 -18
  3. package/dist/commonjs/models/components/index.d.ts +0 -6
  4. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  5. package/dist/commonjs/models/components/index.js +0 -6
  6. package/dist/commonjs/models/components/index.js.map +1 -1
  7. package/dist/commonjs/models/errors/index.d.ts +0 -1
  8. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  9. package/dist/commonjs/models/errors/index.js +0 -1
  10. package/dist/commonjs/models/errors/index.js.map +1 -1
  11. package/dist/commonjs/models/operations/index.d.ts +0 -1
  12. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  13. package/dist/commonjs/models/operations/index.js +0 -1
  14. package/dist/commonjs/models/operations/index.js.map +1 -1
  15. package/dist/commonjs/sdk/sdk.d.ts +0 -3
  16. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  17. package/dist/commonjs/sdk/sdk.js +0 -4
  18. package/dist/commonjs/sdk/sdk.js.map +1 -1
  19. package/dist/esm/models/components/index.d.ts +0 -6
  20. package/dist/esm/models/components/index.d.ts.map +1 -1
  21. package/dist/esm/models/components/index.js +0 -6
  22. package/dist/esm/models/components/index.js.map +1 -1
  23. package/dist/esm/models/errors/index.d.ts +0 -1
  24. package/dist/esm/models/errors/index.d.ts.map +1 -1
  25. package/dist/esm/models/errors/index.js +0 -1
  26. package/dist/esm/models/errors/index.js.map +1 -1
  27. package/dist/esm/models/operations/index.d.ts +0 -1
  28. package/dist/esm/models/operations/index.d.ts.map +1 -1
  29. package/dist/esm/models/operations/index.js +0 -1
  30. package/dist/esm/models/operations/index.js.map +1 -1
  31. package/dist/esm/sdk/sdk.d.ts +0 -3
  32. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  33. package/dist/esm/sdk/sdk.js +0 -4
  34. package/dist/esm/sdk/sdk.js.map +1 -1
  35. package/openapi_prepped_for_speakeasy.json +0 -539
  36. package/package.json +1 -1
  37. package/src/models/components/index.ts +0 -6
  38. package/src/models/errors/index.ts +0 -1
  39. package/src/models/operations/index.ts +0 -1
  40. package/src/sdk/sdk.ts +0 -6
  41. package/dist/commonjs/funcs/onrampOnrampCreate.d.ts +0 -38
  42. package/dist/commonjs/funcs/onrampOnrampCreate.d.ts.map +0 -1
  43. package/dist/commonjs/funcs/onrampOnrampCreate.js +0 -139
  44. package/dist/commonjs/funcs/onrampOnrampCreate.js.map +0 -1
  45. package/dist/commonjs/funcs/onrampOnrampQuote.d.ts +0 -27
  46. package/dist/commonjs/funcs/onrampOnrampQuote.d.ts.map +0 -1
  47. package/dist/commonjs/funcs/onrampOnrampQuote.js +0 -128
  48. package/dist/commonjs/funcs/onrampOnrampQuote.js.map +0 -1
  49. package/dist/commonjs/funcs/onrampOnrampStatus.d.ts +0 -31
  50. package/dist/commonjs/funcs/onrampOnrampStatus.d.ts.map +0 -1
  51. package/dist/commonjs/funcs/onrampOnrampStatus.js +0 -135
  52. package/dist/commonjs/funcs/onrampOnrampStatus.js.map +0 -1
  53. package/dist/commonjs/models/components/onrampcreate.d.ts +0 -59
  54. package/dist/commonjs/models/components/onrampcreate.d.ts.map +0 -1
  55. package/dist/commonjs/models/components/onrampcreate.js +0 -75
  56. package/dist/commonjs/models/components/onrampcreate.js.map +0 -1
  57. package/dist/commonjs/models/components/onrampcreaterequest.d.ts +0 -40
  58. package/dist/commonjs/models/components/onrampcreaterequest.d.ts.map +0 -1
  59. package/dist/commonjs/models/components/onrampcreaterequest.js +0 -60
  60. package/dist/commonjs/models/components/onrampcreaterequest.js.map +0 -1
  61. package/dist/commonjs/models/components/onrampfees.d.ts +0 -29
  62. package/dist/commonjs/models/components/onrampfees.d.ts.map +0 -1
  63. package/dist/commonjs/models/components/onrampfees.js +0 -59
  64. package/dist/commonjs/models/components/onrampfees.js.map +0 -1
  65. package/dist/commonjs/models/components/onrampquote.d.ts +0 -58
  66. package/dist/commonjs/models/components/onrampquote.d.ts.map +0 -1
  67. package/dist/commonjs/models/components/onrampquote.js +0 -73
  68. package/dist/commonjs/models/components/onrampquote.js.map +0 -1
  69. package/dist/commonjs/models/components/onrampquoterequest.d.ts +0 -34
  70. package/dist/commonjs/models/components/onrampquoterequest.d.ts.map +0 -1
  71. package/dist/commonjs/models/components/onrampquoterequest.js +0 -58
  72. package/dist/commonjs/models/components/onrampquoterequest.js.map +0 -1
  73. package/dist/commonjs/models/components/onrampstatus.d.ts +0 -57
  74. package/dist/commonjs/models/components/onrampstatus.d.ts.map +0 -1
  75. package/dist/commonjs/models/components/onrampstatus.js +0 -75
  76. package/dist/commonjs/models/components/onrampstatus.js.map +0 -1
  77. package/dist/commonjs/models/errors/onramperrorresponse.d.ts +0 -44
  78. package/dist/commonjs/models/errors/onramperrorresponse.d.ts.map +0 -1
  79. package/dist/commonjs/models/errors/onramperrorresponse.js +0 -75
  80. package/dist/commonjs/models/errors/onramperrorresponse.js.map +0 -1
  81. package/dist/commonjs/models/operations/v2onrampstatus.d.ts +0 -15
  82. package/dist/commonjs/models/operations/v2onrampstatus.d.ts.map +0 -1
  83. package/dist/commonjs/models/operations/v2onrampstatus.js +0 -54
  84. package/dist/commonjs/models/operations/v2onrampstatus.js.map +0 -1
  85. package/dist/commonjs/sdk/onramp.d.ts +0 -68
  86. package/dist/commonjs/sdk/onramp.d.ts.map +0 -1
  87. package/dist/commonjs/sdk/onramp.js +0 -83
  88. package/dist/commonjs/sdk/onramp.js.map +0 -1
  89. package/dist/esm/funcs/onrampOnrampCreate.d.ts +0 -38
  90. package/dist/esm/funcs/onrampOnrampCreate.d.ts.map +0 -1
  91. package/dist/esm/funcs/onrampOnrampCreate.js +0 -103
  92. package/dist/esm/funcs/onrampOnrampCreate.js.map +0 -1
  93. package/dist/esm/funcs/onrampOnrampQuote.d.ts +0 -27
  94. package/dist/esm/funcs/onrampOnrampQuote.d.ts.map +0 -1
  95. package/dist/esm/funcs/onrampOnrampQuote.js +0 -92
  96. package/dist/esm/funcs/onrampOnrampQuote.js.map +0 -1
  97. package/dist/esm/funcs/onrampOnrampStatus.d.ts +0 -31
  98. package/dist/esm/funcs/onrampOnrampStatus.d.ts.map +0 -1
  99. package/dist/esm/funcs/onrampOnrampStatus.js +0 -99
  100. package/dist/esm/funcs/onrampOnrampStatus.js.map +0 -1
  101. package/dist/esm/models/components/onrampcreate.d.ts +0 -59
  102. package/dist/esm/models/components/onrampcreate.d.ts.map +0 -1
  103. package/dist/esm/models/components/onrampcreate.js +0 -38
  104. package/dist/esm/models/components/onrampcreate.js.map +0 -1
  105. package/dist/esm/models/components/onrampcreaterequest.d.ts +0 -40
  106. package/dist/esm/models/components/onrampcreaterequest.d.ts.map +0 -1
  107. package/dist/esm/models/components/onrampcreaterequest.js +0 -23
  108. package/dist/esm/models/components/onrampcreaterequest.js.map +0 -1
  109. package/dist/esm/models/components/onrampfees.d.ts +0 -29
  110. package/dist/esm/models/components/onrampfees.d.ts.map +0 -1
  111. package/dist/esm/models/components/onrampfees.js +0 -22
  112. package/dist/esm/models/components/onrampfees.js.map +0 -1
  113. package/dist/esm/models/components/onrampquote.d.ts +0 -58
  114. package/dist/esm/models/components/onrampquote.d.ts.map +0 -1
  115. package/dist/esm/models/components/onrampquote.js +0 -36
  116. package/dist/esm/models/components/onrampquote.js.map +0 -1
  117. package/dist/esm/models/components/onrampquoterequest.d.ts +0 -34
  118. package/dist/esm/models/components/onrampquoterequest.d.ts.map +0 -1
  119. package/dist/esm/models/components/onrampquoterequest.js +0 -21
  120. package/dist/esm/models/components/onrampquoterequest.js.map +0 -1
  121. package/dist/esm/models/components/onrampstatus.d.ts +0 -57
  122. package/dist/esm/models/components/onrampstatus.d.ts.map +0 -1
  123. package/dist/esm/models/components/onrampstatus.js +0 -38
  124. package/dist/esm/models/components/onrampstatus.js.map +0 -1
  125. package/dist/esm/models/errors/onramperrorresponse.d.ts +0 -44
  126. package/dist/esm/models/errors/onramperrorresponse.d.ts.map +0 -1
  127. package/dist/esm/models/errors/onramperrorresponse.js +0 -38
  128. package/dist/esm/models/errors/onramperrorresponse.js.map +0 -1
  129. package/dist/esm/models/operations/v2onrampstatus.d.ts +0 -15
  130. package/dist/esm/models/operations/v2onrampstatus.d.ts.map +0 -1
  131. package/dist/esm/models/operations/v2onrampstatus.js +0 -17
  132. package/dist/esm/models/operations/v2onrampstatus.js.map +0 -1
  133. package/dist/esm/sdk/onramp.d.ts +0 -68
  134. package/dist/esm/sdk/onramp.d.ts.map +0 -1
  135. package/dist/esm/sdk/onramp.js +0 -79
  136. package/dist/esm/sdk/onramp.js.map +0 -1
  137. package/docs/models/components/onrampcreate.md +0 -43
  138. package/docs/models/components/onrampcreaterequest.md +0 -29
  139. package/docs/models/components/onrampcreatestatus.md +0 -17
  140. package/docs/models/components/onrampfees.md +0 -26
  141. package/docs/models/components/onrampquote.md +0 -36
  142. package/docs/models/components/onrampquoterequest.md +0 -27
  143. package/docs/models/components/onrampstatus.md +0 -28
  144. package/docs/models/components/onrampstatusstatus.md +0 -17
  145. package/docs/models/errors/onramperrorresponse.md +0 -21
  146. package/docs/models/operations/v2onrampstatusrequest.md +0 -17
  147. package/docs/sdks/onramp/README.md +0 -283
  148. package/src/funcs/onrampOnrampCreate.ts +0 -192
  149. package/src/funcs/onrampOnrampQuote.ts +0 -181
  150. package/src/funcs/onrampOnrampStatus.ts +0 -189
  151. package/src/models/components/onrampcreate.ts +0 -97
  152. package/src/models/components/onrampcreaterequest.ts +0 -70
  153. package/src/models/components/onrampfees.ts +0 -59
  154. package/src/models/components/onrampquote.ts +0 -101
  155. package/src/models/components/onrampquoterequest.ts +0 -62
  156. package/src/models/components/onrampstatus.ts +0 -96
  157. package/src/models/errors/onramperrorresponse.ts +0 -75
  158. package/src/models/operations/v2onrampstatus.ts +0 -39
  159. package/src/sdk/onramp.ts +0 -105
@@ -1,75 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.OnrampErrorResponse$inboundSchema = exports.OnrampErrorResponse = void 0;
40
- const z = __importStar(require("zod/v3"));
41
- const compassapisdkerror_js_1 = require("./compassapisdkerror.js");
42
- /**
43
- * Standard error envelope returned by every non-2xx on-ramp response.
44
- *
45
- * @remarks
46
- *
47
- * Surfaced in OpenAPI ``responses`` declarations so SDK consumers can decode
48
- * failures uniformly without inspecting per-status-code shapes.
49
- */
50
- class OnrampErrorResponse extends compassapisdkerror_js_1.CompassAPISDKError {
51
- constructor(err, httpMeta) {
52
- const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
53
- super(message, httpMeta);
54
- this.data$ = err;
55
- this.error = err.error;
56
- this.name = "OnrampErrorResponse";
57
- }
58
- }
59
- exports.OnrampErrorResponse = OnrampErrorResponse;
60
- /** @internal */
61
- exports.OnrampErrorResponse$inboundSchema = z.object({
62
- error: z.string(),
63
- message: z.string(),
64
- request$: z.instanceof(Request),
65
- response$: z.instanceof(Response),
66
- body$: z.string(),
67
- })
68
- .transform((v) => {
69
- return new OnrampErrorResponse(v, {
70
- request: v.request$,
71
- response: v.response$,
72
- body: v.body$,
73
- });
74
- });
75
- //# sourceMappingURL=onramperrorresponse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"onramperrorresponse.js","sourceRoot":"","sources":["../../../../src/models/errors/onramperrorresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0CAA4B;AAC5B,mEAA6D;AAqB7D;;;;;;;GAOG;AACH,MAAa,mBAAoB,SAAQ,0CAAkB;IASzD,YACE,GAA4B,EAC5B,QAAgE;QAEhE,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,IAAI,uBAAuB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;QAC5E,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QAEvB,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AApBD,kDAoBC;AAED,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC;IAC/B,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC;IACjC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC;KACC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACf,OAAO,IAAI,mBAAmB,CAAC,CAAC,EAAE;QAChC,OAAO,EAAE,CAAC,CAAC,QAAQ;QACnB,QAAQ,EAAE,CAAC,CAAC,SAAS;QACrB,IAAI,EAAE,CAAC,CAAC,KAAK;KACd,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- import * as z from "zod/v3";
2
- export type V2OnrampStatusRequest = {
3
- /**
4
- * The `payment_id` returned by `POST /v2/onramp/create`.
5
- */
6
- paymentId: string;
7
- };
8
- /** @internal */
9
- export type V2OnrampStatusRequest$Outbound = {
10
- payment_id: string;
11
- };
12
- /** @internal */
13
- export declare const V2OnrampStatusRequest$outboundSchema: z.ZodType<V2OnrampStatusRequest$Outbound, z.ZodTypeDef, V2OnrampStatusRequest>;
14
- export declare function v2OnrampStatusRequestToJSON(v2OnrampStatusRequest: V2OnrampStatusRequest): string;
15
- //# sourceMappingURL=v2onrampstatus.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"v2onrampstatus.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/v2onrampstatus.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,8BAA8B,GAAG;IAC3C,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,8BAA8B,EAC9B,CAAC,CAAC,UAAU,EACZ,qBAAqB,CAOrB,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,qBAAqB,EAAE,qBAAqB,GAC3C,MAAM,CAIR"}
@@ -1,54 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.V2OnrampStatusRequest$outboundSchema = void 0;
40
- exports.v2OnrampStatusRequestToJSON = v2OnrampStatusRequestToJSON;
41
- const z = __importStar(require("zod/v3"));
42
- const primitives_js_1 = require("../../lib/primitives.js");
43
- /** @internal */
44
- exports.V2OnrampStatusRequest$outboundSchema = z.object({
45
- paymentId: z.string(),
46
- }).transform((v) => {
47
- return (0, primitives_js_1.remap)(v, {
48
- paymentId: "payment_id",
49
- });
50
- });
51
- function v2OnrampStatusRequestToJSON(v2OnrampStatusRequest) {
52
- return JSON.stringify(exports.V2OnrampStatusRequest$outboundSchema.parse(v2OnrampStatusRequest));
53
- }
54
- //# sourceMappingURL=v2onrampstatus.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"v2onrampstatus.js","sourceRoot":"","sources":["../../../../src/models/operations/v2onrampstatus.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BH,kEAMC;AAlCD,0CAA4B;AAC5B,2DAA0D;AAc1D,gBAAgB;AACH,QAAA,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,SAAS,EAAE,YAAY;KACxB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,2BAA2B,CACzC,qBAA4C;IAE5C,OAAO,IAAI,CAAC,SAAS,CACnB,4CAAoC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAClE,CAAC;AACJ,CAAC"}
@@ -1,68 +0,0 @@
1
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
- import * as components from "../models/components/index.js";
3
- import * as operations from "../models/operations/index.js";
4
- export declare class Onramp extends ClientSDK {
5
- /**
6
- * Get a fiat on-ramp quote (card -> USDC on Ethereum)
7
- *
8
- * @remarks
9
- * Get an indicative quote for buying USDC on Ethereum with a card.
10
- *
11
- * Returns the estimated USDC the user will receive for a given fiat amount,
12
- * the exchange rate, fee breakdown (`business_fees` is `0`), and the provider
13
- * min/max limits. The output is always **USDC on Ethereum** delivered to the
14
- * `destination_address` — this is a non-custodial on-ramp, so Compass never
15
- * holds the funds.
16
- *
17
- * This quote is indicative and may expire (`expires_at`). To actually start a
18
- * payment, call `POST /v2/onramp/create`.
19
- */
20
- onrampQuote(request: components.OnrampQuoteRequest, options?: RequestOptions): Promise<components.OnrampQuote>;
21
- /**
22
- * Create a fiat on-ramp payment + get the checkout link
23
- *
24
- * @remarks
25
- * Create a fiat on-ramp payment and return the browser-checkout handoff.
26
- *
27
- * A fiat card + identity-verification flow can only render in a browser, so
28
- * this endpoint returns a **`checkout_url`** (a Compass-hosted page) together
29
- * with `payment_id`, the one-time-wallet `deposit_address`, an initial
30
- * `status`, and a `user_instructions` string.
31
- *
32
- * **How to drive this (CLI / MCP agent / UI):**
33
- *
34
- * 1. **Present `checkout_url` to the user and open it in a browser.** It
35
- * renders the card payment + identity verification and delivers USDC on
36
- * Ethereum to the destination wallet. (An MCP agent cannot open a browser
37
- * itself — show the link and ask the user to open it.)
38
- * 2. **Poll `GET /v2/onramp/status?payment_id=...`** until `status` becomes
39
- * `delivered` (or `failed`). `pending` = awaiting payment, `processing` =
40
- * payment received and bridging/swapping to USDC.
41
- * 3. Once `delivered`, the USDC is in the user's own wallet — continue with
42
- * the tokenized buy.
43
- *
44
- * Funds are never held by Compass: the `deposit_address` is a one-time wallet
45
- * owned solely by the user's wallet.
46
- */
47
- onrampCreate(request: components.OnrampCreateRequest, options?: RequestOptions): Promise<components.OnrampCreate>;
48
- /**
49
- * Get the status of a fiat on-ramp payment
50
- *
51
- * @remarks
52
- * Get the current status of a fiat on-ramp payment.
53
- *
54
- * Poll this after `create` until `status` is `delivered`. The `status` field
55
- * is one of:
56
- *
57
- * - `pending` — awaiting the card payment in the hosted checkout.
58
- * - `processing` — payment received; bridging/swapping the proceeds to USDC.
59
- * - `delivered` — USDC has been delivered to the destination wallet
60
- * (`delivery_tx_hash` and `output_amount_delivered` are populated).
61
- * - `failed` — the payment failed, expired, or was refunded.
62
- *
63
- * State is re-read live from the on-ramp provider on every call — Compass
64
- * stores nothing of its own.
65
- */
66
- onrampStatus(request: operations.V2OnrampStatusRequest, options?: RequestOptions): Promise<components.OnrampStatus>;
67
- }
68
- //# sourceMappingURL=onramp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"onramp.d.ts","sourceRoot":"","sources":["../../../src/sdk/onramp.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,MAAO,SAAQ,SAAS;IACnC;;;;;;;;;;;;;;OAcG;IACG,WAAW,CACf,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC;IAQlC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACG,YAAY,CAChB,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC;IAQnC;;;;;;;;;;;;;;;;;OAiBG;IACG,YAAY,CAChB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC;CAOpC"}
@@ -1,83 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Onramp = void 0;
7
- const onrampOnrampCreate_js_1 = require("../funcs/onrampOnrampCreate.js");
8
- const onrampOnrampQuote_js_1 = require("../funcs/onrampOnrampQuote.js");
9
- const onrampOnrampStatus_js_1 = require("../funcs/onrampOnrampStatus.js");
10
- const sdks_js_1 = require("../lib/sdks.js");
11
- const fp_js_1 = require("../types/fp.js");
12
- class Onramp extends sdks_js_1.ClientSDK {
13
- /**
14
- * Get a fiat on-ramp quote (card -> USDC on Ethereum)
15
- *
16
- * @remarks
17
- * Get an indicative quote for buying USDC on Ethereum with a card.
18
- *
19
- * Returns the estimated USDC the user will receive for a given fiat amount,
20
- * the exchange rate, fee breakdown (`business_fees` is `0`), and the provider
21
- * min/max limits. The output is always **USDC on Ethereum** delivered to the
22
- * `destination_address` — this is a non-custodial on-ramp, so Compass never
23
- * holds the funds.
24
- *
25
- * This quote is indicative and may expire (`expires_at`). To actually start a
26
- * payment, call `POST /v2/onramp/create`.
27
- */
28
- async onrampQuote(request, options) {
29
- return (0, fp_js_1.unwrapAsync)((0, onrampOnrampQuote_js_1.onrampOnrampQuote)(this, request, options));
30
- }
31
- /**
32
- * Create a fiat on-ramp payment + get the checkout link
33
- *
34
- * @remarks
35
- * Create a fiat on-ramp payment and return the browser-checkout handoff.
36
- *
37
- * A fiat card + identity-verification flow can only render in a browser, so
38
- * this endpoint returns a **`checkout_url`** (a Compass-hosted page) together
39
- * with `payment_id`, the one-time-wallet `deposit_address`, an initial
40
- * `status`, and a `user_instructions` string.
41
- *
42
- * **How to drive this (CLI / MCP agent / UI):**
43
- *
44
- * 1. **Present `checkout_url` to the user and open it in a browser.** It
45
- * renders the card payment + identity verification and delivers USDC on
46
- * Ethereum to the destination wallet. (An MCP agent cannot open a browser
47
- * itself — show the link and ask the user to open it.)
48
- * 2. **Poll `GET /v2/onramp/status?payment_id=...`** until `status` becomes
49
- * `delivered` (or `failed`). `pending` = awaiting payment, `processing` =
50
- * payment received and bridging/swapping to USDC.
51
- * 3. Once `delivered`, the USDC is in the user's own wallet — continue with
52
- * the tokenized buy.
53
- *
54
- * Funds are never held by Compass: the `deposit_address` is a one-time wallet
55
- * owned solely by the user's wallet.
56
- */
57
- async onrampCreate(request, options) {
58
- return (0, fp_js_1.unwrapAsync)((0, onrampOnrampCreate_js_1.onrampOnrampCreate)(this, request, options));
59
- }
60
- /**
61
- * Get the status of a fiat on-ramp payment
62
- *
63
- * @remarks
64
- * Get the current status of a fiat on-ramp payment.
65
- *
66
- * Poll this after `create` until `status` is `delivered`. The `status` field
67
- * is one of:
68
- *
69
- * - `pending` — awaiting the card payment in the hosted checkout.
70
- * - `processing` — payment received; bridging/swapping the proceeds to USDC.
71
- * - `delivered` — USDC has been delivered to the destination wallet
72
- * (`delivery_tx_hash` and `output_amount_delivered` are populated).
73
- * - `failed` — the payment failed, expired, or was refunded.
74
- *
75
- * State is re-read live from the on-ramp provider on every call — Compass
76
- * stores nothing of its own.
77
- */
78
- async onrampStatus(request, options) {
79
- return (0, fp_js_1.unwrapAsync)((0, onrampOnrampStatus_js_1.onrampOnrampStatus)(this, request, options));
80
- }
81
- }
82
- exports.Onramp = Onramp;
83
- //# sourceMappingURL=onramp.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"onramp.js","sourceRoot":"","sources":["../../../src/sdk/onramp.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0EAAoE;AACpE,wEAAkE;AAClE,0EAAoE;AACpE,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,MAAO,SAAQ,mBAAS;IACnC;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,WAAW,CACf,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wCAAiB,EAClC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,KAAK,CAAC,YAAY,CAChB,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0CAAkB,EACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,YAAY,CAChB,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0CAAkB,EACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA5FD,wBA4FC"}
@@ -1,38 +0,0 @@
1
- import { CompassApiSDKCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import * as components from "../models/components/index.js";
4
- import { CompassAPISDKError } from "../models/errors/compassapisdkerror.js";
5
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
6
- import * as errors from "../models/errors/index.js";
7
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
8
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
9
- import { APIPromise } from "../types/async.js";
10
- import { Result } from "../types/fp.js";
11
- /**
12
- * Create a fiat on-ramp payment + get the checkout link
13
- *
14
- * @remarks
15
- * Create a fiat on-ramp payment and return the browser-checkout handoff.
16
- *
17
- * A fiat card + identity-verification flow can only render in a browser, so
18
- * this endpoint returns a **`checkout_url`** (a Compass-hosted page) together
19
- * with `payment_id`, the one-time-wallet `deposit_address`, an initial
20
- * `status`, and a `user_instructions` string.
21
- *
22
- * **How to drive this (CLI / MCP agent / UI):**
23
- *
24
- * 1. **Present `checkout_url` to the user and open it in a browser.** It
25
- * renders the card payment + identity verification and delivers USDC on
26
- * Ethereum to the destination wallet. (An MCP agent cannot open a browser
27
- * itself — show the link and ask the user to open it.)
28
- * 2. **Poll `GET /v2/onramp/status?payment_id=...`** until `status` becomes
29
- * `delivered` (or `failed`). `pending` = awaiting payment, `processing` =
30
- * payment received and bridging/swapping to USDC.
31
- * 3. Once `delivered`, the USDC is in the user's own wallet — continue with
32
- * the tokenized buy.
33
- *
34
- * Funds are never held by Compass: the `deposit_address` is a one-time wallet
35
- * owned solely by the user's wallet.
36
- */
37
- export declare function onrampOnrampCreate(client: CompassApiSDKCore, request: components.OnrampCreateRequest, options?: RequestOptions): APIPromise<Result<components.OnrampCreate, errors.OnrampErrorResponse | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
38
- //# sourceMappingURL=onrampOnrampCreate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"onrampOnrampCreate.d.ts","sourceRoot":"","sources":["../../../src/funcs/onrampOnrampCreate.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,YAAY,EACrB,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -1,103 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import { encodeJSON } from "../lib/encodings.js";
5
- import { matchStatusCode } from "../lib/http.js";
6
- import * as M from "../lib/matchers.js";
7
- import { compactMap } from "../lib/primitives.js";
8
- import { safeParse } from "../lib/schemas.js";
9
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
10
- import { pathToFunc } from "../lib/url.js";
11
- import * as components from "../models/components/index.js";
12
- import * as errors from "../models/errors/index.js";
13
- import { APIPromise } from "../types/async.js";
14
- /**
15
- * Create a fiat on-ramp payment + get the checkout link
16
- *
17
- * @remarks
18
- * Create a fiat on-ramp payment and return the browser-checkout handoff.
19
- *
20
- * A fiat card + identity-verification flow can only render in a browser, so
21
- * this endpoint returns a **`checkout_url`** (a Compass-hosted page) together
22
- * with `payment_id`, the one-time-wallet `deposit_address`, an initial
23
- * `status`, and a `user_instructions` string.
24
- *
25
- * **How to drive this (CLI / MCP agent / UI):**
26
- *
27
- * 1. **Present `checkout_url` to the user and open it in a browser.** It
28
- * renders the card payment + identity verification and delivers USDC on
29
- * Ethereum to the destination wallet. (An MCP agent cannot open a browser
30
- * itself — show the link and ask the user to open it.)
31
- * 2. **Poll `GET /v2/onramp/status?payment_id=...`** until `status` becomes
32
- * `delivered` (or `failed`). `pending` = awaiting payment, `processing` =
33
- * payment received and bridging/swapping to USDC.
34
- * 3. Once `delivered`, the USDC is in the user's own wallet — continue with
35
- * the tokenized buy.
36
- *
37
- * Funds are never held by Compass: the `deposit_address` is a one-time wallet
38
- * owned solely by the user's wallet.
39
- */
40
- export function onrampOnrampCreate(client, request, options) {
41
- return new APIPromise($do(client, request, options));
42
- }
43
- async function $do(client, request, options) {
44
- const parsed = safeParse(request, (value) => components.OnrampCreateRequest$outboundSchema.parse(value), "Input validation failed");
45
- if (!parsed.ok) {
46
- return [parsed, { status: "invalid" }];
47
- }
48
- const payload = parsed.value;
49
- const body = encodeJSON("body", payload, { explode: true });
50
- const path = pathToFunc("/v2/onramp/create")();
51
- const headers = new Headers(compactMap({
52
- "Content-Type": "application/json",
53
- Accept: "application/json",
54
- }));
55
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
56
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
57
- const requestSecurity = resolveGlobalSecurity(securityInput);
58
- const context = {
59
- options: client._options,
60
- baseURL: options?.serverURL ?? client._baseURL ?? "",
61
- operationID: "v2_onramp_create",
62
- oAuth2Scopes: null,
63
- resolvedSecurity: requestSecurity,
64
- securitySource: client._options.apiKeyAuth,
65
- retryConfig: options?.retries
66
- || client._options.retryConfig
67
- || { strategy: "none" },
68
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
69
- };
70
- const requestRes = client._createRequest(context, {
71
- security: requestSecurity,
72
- method: "POST",
73
- baseURL: options?.serverURL,
74
- path: path,
75
- headers: headers,
76
- body: body,
77
- userAgent: client._options.userAgent,
78
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
79
- }, options);
80
- if (!requestRes.ok) {
81
- return [requestRes, { status: "invalid" }];
82
- }
83
- const req = requestRes.value;
84
- const doResult = await client._do(req, {
85
- context,
86
- isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
87
- retryConfig: context.retryConfig,
88
- retryCodes: context.retryCodes,
89
- });
90
- if (!doResult.ok) {
91
- return [doResult, { status: "request-error", request: req }];
92
- }
93
- const response = doResult.value;
94
- const responseFields = {
95
- HttpMeta: { Response: response, Request: req },
96
- };
97
- const [result] = await M.match(M.json(200, components.OnrampCreate$inboundSchema), M.jsonErr([400, 402, 410, 422], errors.OnrampErrorResponse$inboundSchema), M.jsonErr(502, errors.OnrampErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
98
- if (!result.ok) {
99
- return [result, { status: "complete", request: req, response }];
100
- }
101
- return [result, { status: "complete", request: req, response }];
102
- }
103
- //# sourceMappingURL=onrampOnrampCreate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"onrampOnrampCreate.js","sourceRoot":"","sources":["../../../src/funcs/onrampOnrampCreate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,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G,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -1,27 +0,0 @@
1
- import { CompassApiSDKCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import * as components from "../models/components/index.js";
4
- import { CompassAPISDKError } from "../models/errors/compassapisdkerror.js";
5
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
6
- import * as errors from "../models/errors/index.js";
7
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
8
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
9
- import { APIPromise } from "../types/async.js";
10
- import { Result } from "../types/fp.js";
11
- /**
12
- * Get a fiat on-ramp quote (card -> USDC on Ethereum)
13
- *
14
- * @remarks
15
- * Get an indicative quote for buying USDC on Ethereum with a card.
16
- *
17
- * Returns the estimated USDC the user will receive for a given fiat amount,
18
- * the exchange rate, fee breakdown (`business_fees` is `0`), and the provider
19
- * min/max limits. The output is always **USDC on Ethereum** delivered to the
20
- * `destination_address` — this is a non-custodial on-ramp, so Compass never
21
- * holds the funds.
22
- *
23
- * This quote is indicative and may expire (`expires_at`). To actually start a
24
- * payment, call `POST /v2/onramp/create`.
25
- */
26
- export declare function onrampOnrampQuote(client: CompassApiSDKCore, request: components.OnrampQuoteRequest, options?: RequestOptions): APIPromise<Result<components.OnrampQuote, errors.OnrampErrorResponse | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
27
- //# sourceMappingURL=onrampOnrampQuote.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"onrampOnrampQuote.d.ts","sourceRoot":"","sources":["../../../src/funcs/onrampOnrampQuote.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,WAAW,EACpB,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -1,92 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import { encodeJSON } from "../lib/encodings.js";
5
- import { matchStatusCode } from "../lib/http.js";
6
- import * as M from "../lib/matchers.js";
7
- import { compactMap } from "../lib/primitives.js";
8
- import { safeParse } from "../lib/schemas.js";
9
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
10
- import { pathToFunc } from "../lib/url.js";
11
- import * as components from "../models/components/index.js";
12
- import * as errors from "../models/errors/index.js";
13
- import { APIPromise } from "../types/async.js";
14
- /**
15
- * Get a fiat on-ramp quote (card -> USDC on Ethereum)
16
- *
17
- * @remarks
18
- * Get an indicative quote for buying USDC on Ethereum with a card.
19
- *
20
- * Returns the estimated USDC the user will receive for a given fiat amount,
21
- * the exchange rate, fee breakdown (`business_fees` is `0`), and the provider
22
- * min/max limits. The output is always **USDC on Ethereum** delivered to the
23
- * `destination_address` — this is a non-custodial on-ramp, so Compass never
24
- * holds the funds.
25
- *
26
- * This quote is indicative and may expire (`expires_at`). To actually start a
27
- * payment, call `POST /v2/onramp/create`.
28
- */
29
- export function onrampOnrampQuote(client, request, options) {
30
- return new APIPromise($do(client, request, options));
31
- }
32
- async function $do(client, request, options) {
33
- const parsed = safeParse(request, (value) => components.OnrampQuoteRequest$outboundSchema.parse(value), "Input validation failed");
34
- if (!parsed.ok) {
35
- return [parsed, { status: "invalid" }];
36
- }
37
- const payload = parsed.value;
38
- const body = encodeJSON("body", payload, { explode: true });
39
- const path = pathToFunc("/v2/onramp/quote")();
40
- const headers = new Headers(compactMap({
41
- "Content-Type": "application/json",
42
- Accept: "application/json",
43
- }));
44
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
45
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
46
- const requestSecurity = resolveGlobalSecurity(securityInput);
47
- const context = {
48
- options: client._options,
49
- baseURL: options?.serverURL ?? client._baseURL ?? "",
50
- operationID: "v2_onramp_quote",
51
- oAuth2Scopes: null,
52
- resolvedSecurity: requestSecurity,
53
- securitySource: client._options.apiKeyAuth,
54
- retryConfig: options?.retries
55
- || client._options.retryConfig
56
- || { strategy: "none" },
57
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
58
- };
59
- const requestRes = client._createRequest(context, {
60
- security: requestSecurity,
61
- method: "POST",
62
- baseURL: options?.serverURL,
63
- path: path,
64
- headers: headers,
65
- body: body,
66
- userAgent: client._options.userAgent,
67
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
68
- }, options);
69
- if (!requestRes.ok) {
70
- return [requestRes, { status: "invalid" }];
71
- }
72
- const req = requestRes.value;
73
- const doResult = await client._do(req, {
74
- context,
75
- isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
76
- retryConfig: context.retryConfig,
77
- retryCodes: context.retryCodes,
78
- });
79
- if (!doResult.ok) {
80
- return [doResult, { status: "request-error", request: req }];
81
- }
82
- const response = doResult.value;
83
- const responseFields = {
84
- HttpMeta: { Response: response, Request: req },
85
- };
86
- const [result] = await M.match(M.json(200, components.OnrampQuote$inboundSchema), M.jsonErr([400, 422], errors.OnrampErrorResponse$inboundSchema), M.jsonErr(502, errors.OnrampErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
87
- if (!result.ok) {
88
- return [result, { status: "complete", request: req, response }];
89
- }
90
- return [result, { status: "complete", request: req, response }];
91
- }
92
- //# sourceMappingURL=onrampOnrampQuote.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"onrampOnrampQuote.js","sourceRoot":"","sources":["../../../src/funcs/onrampOnrampQuote.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB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,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -1,31 +0,0 @@
1
- import { CompassApiSDKCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import * as components from "../models/components/index.js";
4
- import { CompassAPISDKError } from "../models/errors/compassapisdkerror.js";
5
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
6
- import * as errors from "../models/errors/index.js";
7
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
8
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
9
- import * as operations from "../models/operations/index.js";
10
- import { APIPromise } from "../types/async.js";
11
- import { Result } from "../types/fp.js";
12
- /**
13
- * Get the status of a fiat on-ramp payment
14
- *
15
- * @remarks
16
- * Get the current status of a fiat on-ramp payment.
17
- *
18
- * Poll this after `create` until `status` is `delivered`. The `status` field
19
- * is one of:
20
- *
21
- * - `pending` — awaiting the card payment in the hosted checkout.
22
- * - `processing` — payment received; bridging/swapping the proceeds to USDC.
23
- * - `delivered` — USDC has been delivered to the destination wallet
24
- * (`delivery_tx_hash` and `output_amount_delivered` are populated).
25
- * - `failed` — the payment failed, expired, or was refunded.
26
- *
27
- * State is re-read live from the on-ramp provider on every call — Compass
28
- * stores nothing of its own.
29
- */
30
- export declare function onrampOnrampStatus(client: CompassApiSDKCore, request: operations.V2OnrampStatusRequest, options?: RequestOptions): APIPromise<Result<components.OnrampStatus, errors.OnrampErrorResponse | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
31
- //# sourceMappingURL=onrampOnrampStatus.d.ts.map