@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.
- package/README.md +3 -13
- package/codeSamples_typescript.yaml +0 -18
- package/dist/commonjs/models/components/index.d.ts +0 -6
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +0 -6
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/errors/index.d.ts +0 -1
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +0 -1
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +0 -1
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +0 -1
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +0 -3
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +0 -4
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +0 -6
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +0 -6
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/errors/index.d.ts +0 -1
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +0 -1
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +0 -1
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +0 -1
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/sdk.d.ts +0 -3
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +0 -4
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/openapi_prepped_for_speakeasy.json +0 -539
- package/package.json +1 -1
- package/src/models/components/index.ts +0 -6
- package/src/models/errors/index.ts +0 -1
- package/src/models/operations/index.ts +0 -1
- package/src/sdk/sdk.ts +0 -6
- package/dist/commonjs/funcs/onrampOnrampCreate.d.ts +0 -38
- package/dist/commonjs/funcs/onrampOnrampCreate.d.ts.map +0 -1
- package/dist/commonjs/funcs/onrampOnrampCreate.js +0 -139
- package/dist/commonjs/funcs/onrampOnrampCreate.js.map +0 -1
- package/dist/commonjs/funcs/onrampOnrampQuote.d.ts +0 -27
- package/dist/commonjs/funcs/onrampOnrampQuote.d.ts.map +0 -1
- package/dist/commonjs/funcs/onrampOnrampQuote.js +0 -128
- package/dist/commonjs/funcs/onrampOnrampQuote.js.map +0 -1
- package/dist/commonjs/funcs/onrampOnrampStatus.d.ts +0 -31
- package/dist/commonjs/funcs/onrampOnrampStatus.d.ts.map +0 -1
- package/dist/commonjs/funcs/onrampOnrampStatus.js +0 -135
- package/dist/commonjs/funcs/onrampOnrampStatus.js.map +0 -1
- package/dist/commonjs/models/components/onrampcreate.d.ts +0 -59
- package/dist/commonjs/models/components/onrampcreate.d.ts.map +0 -1
- package/dist/commonjs/models/components/onrampcreate.js +0 -75
- package/dist/commonjs/models/components/onrampcreate.js.map +0 -1
- package/dist/commonjs/models/components/onrampcreaterequest.d.ts +0 -40
- package/dist/commonjs/models/components/onrampcreaterequest.d.ts.map +0 -1
- package/dist/commonjs/models/components/onrampcreaterequest.js +0 -60
- package/dist/commonjs/models/components/onrampcreaterequest.js.map +0 -1
- package/dist/commonjs/models/components/onrampfees.d.ts +0 -29
- package/dist/commonjs/models/components/onrampfees.d.ts.map +0 -1
- package/dist/commonjs/models/components/onrampfees.js +0 -59
- package/dist/commonjs/models/components/onrampfees.js.map +0 -1
- package/dist/commonjs/models/components/onrampquote.d.ts +0 -58
- package/dist/commonjs/models/components/onrampquote.d.ts.map +0 -1
- package/dist/commonjs/models/components/onrampquote.js +0 -73
- package/dist/commonjs/models/components/onrampquote.js.map +0 -1
- package/dist/commonjs/models/components/onrampquoterequest.d.ts +0 -34
- package/dist/commonjs/models/components/onrampquoterequest.d.ts.map +0 -1
- package/dist/commonjs/models/components/onrampquoterequest.js +0 -58
- package/dist/commonjs/models/components/onrampquoterequest.js.map +0 -1
- package/dist/commonjs/models/components/onrampstatus.d.ts +0 -57
- package/dist/commonjs/models/components/onrampstatus.d.ts.map +0 -1
- package/dist/commonjs/models/components/onrampstatus.js +0 -75
- package/dist/commonjs/models/components/onrampstatus.js.map +0 -1
- package/dist/commonjs/models/errors/onramperrorresponse.d.ts +0 -44
- package/dist/commonjs/models/errors/onramperrorresponse.d.ts.map +0 -1
- package/dist/commonjs/models/errors/onramperrorresponse.js +0 -75
- package/dist/commonjs/models/errors/onramperrorresponse.js.map +0 -1
- package/dist/commonjs/models/operations/v2onrampstatus.d.ts +0 -15
- package/dist/commonjs/models/operations/v2onrampstatus.d.ts.map +0 -1
- package/dist/commonjs/models/operations/v2onrampstatus.js +0 -54
- package/dist/commonjs/models/operations/v2onrampstatus.js.map +0 -1
- package/dist/commonjs/sdk/onramp.d.ts +0 -68
- package/dist/commonjs/sdk/onramp.d.ts.map +0 -1
- package/dist/commonjs/sdk/onramp.js +0 -83
- package/dist/commonjs/sdk/onramp.js.map +0 -1
- package/dist/esm/funcs/onrampOnrampCreate.d.ts +0 -38
- package/dist/esm/funcs/onrampOnrampCreate.d.ts.map +0 -1
- package/dist/esm/funcs/onrampOnrampCreate.js +0 -103
- package/dist/esm/funcs/onrampOnrampCreate.js.map +0 -1
- package/dist/esm/funcs/onrampOnrampQuote.d.ts +0 -27
- package/dist/esm/funcs/onrampOnrampQuote.d.ts.map +0 -1
- package/dist/esm/funcs/onrampOnrampQuote.js +0 -92
- package/dist/esm/funcs/onrampOnrampQuote.js.map +0 -1
- package/dist/esm/funcs/onrampOnrampStatus.d.ts +0 -31
- package/dist/esm/funcs/onrampOnrampStatus.d.ts.map +0 -1
- package/dist/esm/funcs/onrampOnrampStatus.js +0 -99
- package/dist/esm/funcs/onrampOnrampStatus.js.map +0 -1
- package/dist/esm/models/components/onrampcreate.d.ts +0 -59
- package/dist/esm/models/components/onrampcreate.d.ts.map +0 -1
- package/dist/esm/models/components/onrampcreate.js +0 -38
- package/dist/esm/models/components/onrampcreate.js.map +0 -1
- package/dist/esm/models/components/onrampcreaterequest.d.ts +0 -40
- package/dist/esm/models/components/onrampcreaterequest.d.ts.map +0 -1
- package/dist/esm/models/components/onrampcreaterequest.js +0 -23
- package/dist/esm/models/components/onrampcreaterequest.js.map +0 -1
- package/dist/esm/models/components/onrampfees.d.ts +0 -29
- package/dist/esm/models/components/onrampfees.d.ts.map +0 -1
- package/dist/esm/models/components/onrampfees.js +0 -22
- package/dist/esm/models/components/onrampfees.js.map +0 -1
- package/dist/esm/models/components/onrampquote.d.ts +0 -58
- package/dist/esm/models/components/onrampquote.d.ts.map +0 -1
- package/dist/esm/models/components/onrampquote.js +0 -36
- package/dist/esm/models/components/onrampquote.js.map +0 -1
- package/dist/esm/models/components/onrampquoterequest.d.ts +0 -34
- package/dist/esm/models/components/onrampquoterequest.d.ts.map +0 -1
- package/dist/esm/models/components/onrampquoterequest.js +0 -21
- package/dist/esm/models/components/onrampquoterequest.js.map +0 -1
- package/dist/esm/models/components/onrampstatus.d.ts +0 -57
- package/dist/esm/models/components/onrampstatus.d.ts.map +0 -1
- package/dist/esm/models/components/onrampstatus.js +0 -38
- package/dist/esm/models/components/onrampstatus.js.map +0 -1
- package/dist/esm/models/errors/onramperrorresponse.d.ts +0 -44
- package/dist/esm/models/errors/onramperrorresponse.d.ts.map +0 -1
- package/dist/esm/models/errors/onramperrorresponse.js +0 -38
- package/dist/esm/models/errors/onramperrorresponse.js.map +0 -1
- package/dist/esm/models/operations/v2onrampstatus.d.ts +0 -15
- package/dist/esm/models/operations/v2onrampstatus.d.ts.map +0 -1
- package/dist/esm/models/operations/v2onrampstatus.js +0 -17
- package/dist/esm/models/operations/v2onrampstatus.js.map +0 -1
- package/dist/esm/sdk/onramp.d.ts +0 -68
- package/dist/esm/sdk/onramp.d.ts.map +0 -1
- package/dist/esm/sdk/onramp.js +0 -79
- package/dist/esm/sdk/onramp.js.map +0 -1
- package/docs/models/components/onrampcreate.md +0 -43
- package/docs/models/components/onrampcreaterequest.md +0 -29
- package/docs/models/components/onrampcreatestatus.md +0 -17
- package/docs/models/components/onrampfees.md +0 -26
- package/docs/models/components/onrampquote.md +0 -36
- package/docs/models/components/onrampquoterequest.md +0 -27
- package/docs/models/components/onrampstatus.md +0 -28
- package/docs/models/components/onrampstatusstatus.md +0 -17
- package/docs/models/errors/onramperrorresponse.md +0 -21
- package/docs/models/operations/v2onrampstatusrequest.md +0 -17
- package/docs/sdks/onramp/README.md +0 -283
- package/src/funcs/onrampOnrampCreate.ts +0 -192
- package/src/funcs/onrampOnrampQuote.ts +0 -181
- package/src/funcs/onrampOnrampStatus.ts +0 -189
- package/src/models/components/onrampcreate.ts +0 -97
- package/src/models/components/onrampcreaterequest.ts +0 -70
- package/src/models/components/onrampfees.ts +0 -59
- package/src/models/components/onrampquote.ts +0 -101
- package/src/models/components/onrampquoterequest.ts +0 -62
- package/src/models/components/onrampstatus.ts +0 -96
- package/src/models/errors/onramperrorresponse.ts +0 -75
- package/src/models/operations/v2onrampstatus.ts +0 -39
- package/src/sdk/onramp.ts +0 -105
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
/**
|
|
3
|
-
* Create a fiat on-ramp payment delivering USDC on Ethereum.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
*
|
|
7
|
-
* Carries the same fields as the quote (a quote is implicit — we do not
|
|
8
|
-
* persist a quote handle). ``quote_id`` is optional and only echoed upstream
|
|
9
|
-
* if Halliday's ``/payments/confirm`` requires a previously-issued quote
|
|
10
|
-
* handle; omit it to confirm against a fresh quote.
|
|
11
|
-
*/
|
|
12
|
-
export type OnrampCreateRequest = {
|
|
13
|
-
/**
|
|
14
|
-
* Amount of fiat to spend, as a decimal string (e.g. `100`).
|
|
15
|
-
*/
|
|
16
|
-
fiatAmount: string;
|
|
17
|
-
/**
|
|
18
|
-
* ISO-4217 fiat currency code. Defaults to `USD`.
|
|
19
|
-
*/
|
|
20
|
-
fiatCurrency?: string | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* The wallet that will receive the USDC on Ethereum. Funds are delivered here directly — Compass never holds them.
|
|
23
|
-
*/
|
|
24
|
-
destinationAddress: string;
|
|
25
|
-
/**
|
|
26
|
-
* Optional Halliday quote handle to confirm against. Omit to confirm against a fresh quote derived from the amount and currency.
|
|
27
|
-
*/
|
|
28
|
-
quoteId?: string | null | undefined;
|
|
29
|
-
};
|
|
30
|
-
/** @internal */
|
|
31
|
-
export type OnrampCreateRequest$Outbound = {
|
|
32
|
-
fiat_amount: string;
|
|
33
|
-
fiat_currency?: string | undefined;
|
|
34
|
-
destination_address: string;
|
|
35
|
-
quote_id?: string | null | undefined;
|
|
36
|
-
};
|
|
37
|
-
/** @internal */
|
|
38
|
-
export declare const OnrampCreateRequest$outboundSchema: z.ZodType<OnrampCreateRequest$Outbound, z.ZodTypeDef, OnrampCreateRequest>;
|
|
39
|
-
export declare function onrampCreateRequestToJSON(onrampCreateRequest: OnrampCreateRequest): string;
|
|
40
|
-
//# sourceMappingURL=onrampcreaterequest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onrampcreaterequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/onrampcreaterequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,4BAA4B,GAAG;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,EAAE,CAAC,CAAC,OAAO,CACxD,4BAA4B,EAC5B,CAAC,CAAC,UAAU,EACZ,mBAAmB,CAanB,CAAC;AAEH,wBAAgB,yBAAyB,CACvC,mBAAmB,EAAE,mBAAmB,GACvC,MAAM,CAIR"}
|
|
@@ -1,60 +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.OnrampCreateRequest$outboundSchema = void 0;
|
|
40
|
-
exports.onrampCreateRequestToJSON = onrampCreateRequestToJSON;
|
|
41
|
-
const z = __importStar(require("zod/v3"));
|
|
42
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
43
|
-
/** @internal */
|
|
44
|
-
exports.OnrampCreateRequest$outboundSchema = z.object({
|
|
45
|
-
fiatAmount: z.string(),
|
|
46
|
-
fiatCurrency: z.string().optional(),
|
|
47
|
-
destinationAddress: z.string(),
|
|
48
|
-
quoteId: z.nullable(z.string()).optional(),
|
|
49
|
-
}).transform((v) => {
|
|
50
|
-
return (0, primitives_js_1.remap)(v, {
|
|
51
|
-
fiatAmount: "fiat_amount",
|
|
52
|
-
fiatCurrency: "fiat_currency",
|
|
53
|
-
destinationAddress: "destination_address",
|
|
54
|
-
quoteId: "quote_id",
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
function onrampCreateRequestToJSON(onrampCreateRequest) {
|
|
58
|
-
return JSON.stringify(exports.OnrampCreateRequest$outboundSchema.parse(onrampCreateRequest));
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=onrampcreaterequest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onrampcreaterequest.js","sourceRoot":"","sources":["../../../../src/models/components/onrampcreaterequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DH,8DAMC;AAjED,0CAA4B;AAC5B,2DAA0D;AAuC1D,gBAAgB;AACH,QAAA,kCAAkC,GAI3C,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC9B,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;QACzB,YAAY,EAAE,eAAe;QAC7B,kBAAkB,EAAE,qBAAqB;QACzC,OAAO,EAAE,UAAU;KACpB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,yBAAyB,CACvC,mBAAwC;IAExC,OAAO,IAAI,CAAC,SAAS,CACnB,0CAAkC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAC9D,CAAC;AACJ,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
/**
|
|
5
|
-
* Fee breakdown for an on-ramp quote.
|
|
6
|
-
*
|
|
7
|
-
* @remarks
|
|
8
|
-
*
|
|
9
|
-
* ``business_fees`` is a fixed ``"0"`` for now — monetization is a single
|
|
10
|
-
* future lever and is intentionally not charged.
|
|
11
|
-
*/
|
|
12
|
-
export type OnrampFees = {
|
|
13
|
-
/**
|
|
14
|
-
* Fee charged by the on-ramp provider, in fiat.
|
|
15
|
-
*/
|
|
16
|
-
providerFee: string;
|
|
17
|
-
/**
|
|
18
|
-
* Estimated network/gas fee, in fiat.
|
|
19
|
-
*/
|
|
20
|
-
networkFee: string;
|
|
21
|
-
/**
|
|
22
|
-
* Compass business fee, in fiat. Always `0` for now.
|
|
23
|
-
*/
|
|
24
|
-
businessFees?: string | undefined;
|
|
25
|
-
};
|
|
26
|
-
/** @internal */
|
|
27
|
-
export declare const OnrampFees$inboundSchema: z.ZodType<OnrampFees, z.ZodTypeDef, unknown>;
|
|
28
|
-
export declare function onrampFeesFromJSON(jsonString: string): SafeParseResult<OnrampFees, SDKValidationError>;
|
|
29
|
-
//# sourceMappingURL=onrampfees.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onrampfees.d.ts","sourceRoot":"","sources":["../../../../src/models/components/onrampfees.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,OAAO,CAC9C,UAAU,EACV,CAAC,CAAC,UAAU,EACZ,OAAO,CAWP,CAAC;AAEH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAMjD"}
|
|
@@ -1,59 +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.OnrampFees$inboundSchema = void 0;
|
|
40
|
-
exports.onrampFeesFromJSON = onrampFeesFromJSON;
|
|
41
|
-
const z = __importStar(require("zod/v3"));
|
|
42
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
43
|
-
const schemas_js_1 = require("../../lib/schemas.js");
|
|
44
|
-
/** @internal */
|
|
45
|
-
exports.OnrampFees$inboundSchema = z.object({
|
|
46
|
-
provider_fee: z.string(),
|
|
47
|
-
network_fee: z.string(),
|
|
48
|
-
business_fees: z.string().optional(),
|
|
49
|
-
}).transform((v) => {
|
|
50
|
-
return (0, primitives_js_1.remap)(v, {
|
|
51
|
-
"provider_fee": "providerFee",
|
|
52
|
-
"network_fee": "networkFee",
|
|
53
|
-
"business_fees": "businessFees",
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
function onrampFeesFromJSON(jsonString) {
|
|
57
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.OnrampFees$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OnrampFees' from JSON`);
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=onrampfees.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onrampfees.js","sourceRoot":"","sources":["../../../../src/models/components/onrampfees.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDH,gDAQC;AAtDD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AA2BjD,gBAAgB;AACH,QAAA,wBAAwB,GAIjC,CAAC,CAAC,MAAM,CAAC;IACX,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,cAAc,EAAE,aAAa;QAC7B,aAAa,EAAE,YAAY;QAC3B,eAAe,EAAE,cAAc;KAChC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,kBAAkB,CAChC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gCAAwB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpD,wCAAwC,CACzC,CAAC;AACJ,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
import { OnrampFees } from "./onrampfees.js";
|
|
5
|
-
/**
|
|
6
|
-
* An indicative fiat -> USDC-on-Ethereum quote.
|
|
7
|
-
*/
|
|
8
|
-
export type OnrampQuote = {
|
|
9
|
-
/**
|
|
10
|
-
* Fiat amount to spend.
|
|
11
|
-
*/
|
|
12
|
-
fiatAmount: string;
|
|
13
|
-
/**
|
|
14
|
-
* ISO-4217 fiat currency code.
|
|
15
|
-
*/
|
|
16
|
-
fiatCurrency: string;
|
|
17
|
-
/**
|
|
18
|
-
* Estimated USDC delivered, human-readable (6-decimal token).
|
|
19
|
-
*/
|
|
20
|
-
outputAmount: string;
|
|
21
|
-
/**
|
|
22
|
-
* Delivered asset. Always USDC for this on-ramp.
|
|
23
|
-
*/
|
|
24
|
-
outputAsset?: "USDC" | undefined;
|
|
25
|
-
/**
|
|
26
|
-
* Delivery chain. Always Ethereum for this on-ramp.
|
|
27
|
-
*/
|
|
28
|
-
outputChain?: "ethereum" | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* USDC received per unit of fiat.
|
|
31
|
-
*/
|
|
32
|
-
exchangeRate: string;
|
|
33
|
-
/**
|
|
34
|
-
* Fee breakdown for an on-ramp quote.
|
|
35
|
-
*
|
|
36
|
-
* @remarks
|
|
37
|
-
*
|
|
38
|
-
* ``business_fees`` is a fixed ``"0"`` for now — monetization is a single
|
|
39
|
-
* future lever and is intentionally not charged.
|
|
40
|
-
*/
|
|
41
|
-
fees: OnrampFees;
|
|
42
|
-
/**
|
|
43
|
-
* Minimum fiat amount accepted, if advertised by the provider.
|
|
44
|
-
*/
|
|
45
|
-
minAmount?: string | null | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* Maximum fiat amount accepted, if advertised by the provider.
|
|
48
|
-
*/
|
|
49
|
-
maxAmount?: string | null | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* ISO-8601 timestamp after which this quote is stale, if any.
|
|
52
|
-
*/
|
|
53
|
-
expiresAt?: string | null | undefined;
|
|
54
|
-
};
|
|
55
|
-
/** @internal */
|
|
56
|
-
export declare const OnrampQuote$inboundSchema: z.ZodType<OnrampQuote, z.ZodTypeDef, unknown>;
|
|
57
|
-
export declare function onrampQuoteFromJSON(jsonString: string): SafeParseResult<OnrampQuote, SDKValidationError>;
|
|
58
|
-
//# sourceMappingURL=onrampquote.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onrampquote.d.ts","sourceRoot":"","sources":["../../../../src/models/components/onrampquote.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,UAAU,EAA4B,MAAM,iBAAiB,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACrC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,IAAI,EAAE,UAAU,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACvC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,OAAO,CAC/C,WAAW,EACX,CAAC,CAAC,UAAU,EACZ,OAAO,CAwBP,CAAC;AAEH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAMlD"}
|
|
@@ -1,73 +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.OnrampQuote$inboundSchema = void 0;
|
|
40
|
-
exports.onrampQuoteFromJSON = onrampQuoteFromJSON;
|
|
41
|
-
const z = __importStar(require("zod/v3"));
|
|
42
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
43
|
-
const schemas_js_1 = require("../../lib/schemas.js");
|
|
44
|
-
const onrampfees_js_1 = require("./onrampfees.js");
|
|
45
|
-
/** @internal */
|
|
46
|
-
exports.OnrampQuote$inboundSchema = z.object({
|
|
47
|
-
fiat_amount: z.string(),
|
|
48
|
-
fiat_currency: z.string(),
|
|
49
|
-
output_amount: z.string(),
|
|
50
|
-
output_asset: z.literal("USDC").optional(),
|
|
51
|
-
output_chain: z.literal("ethereum").optional(),
|
|
52
|
-
exchange_rate: z.string(),
|
|
53
|
-
fees: onrampfees_js_1.OnrampFees$inboundSchema,
|
|
54
|
-
min_amount: z.nullable(z.string()).optional(),
|
|
55
|
-
max_amount: z.nullable(z.string()).optional(),
|
|
56
|
-
expires_at: z.nullable(z.string()).optional(),
|
|
57
|
-
}).transform((v) => {
|
|
58
|
-
return (0, primitives_js_1.remap)(v, {
|
|
59
|
-
"fiat_amount": "fiatAmount",
|
|
60
|
-
"fiat_currency": "fiatCurrency",
|
|
61
|
-
"output_amount": "outputAmount",
|
|
62
|
-
"output_asset": "outputAsset",
|
|
63
|
-
"output_chain": "outputChain",
|
|
64
|
-
"exchange_rate": "exchangeRate",
|
|
65
|
-
"min_amount": "minAmount",
|
|
66
|
-
"max_amount": "maxAmount",
|
|
67
|
-
"expires_at": "expiresAt",
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
function onrampQuoteFromJSON(jsonString) {
|
|
71
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.OnrampQuote$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OnrampQuote' from JSON`);
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=onrampquote.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onrampquote.js","sourceRoot":"","sources":["../../../../src/models/components/onrampquote.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FH,kDAQC;AAhGD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAGjD,mDAAuE;AAqDvE,gBAAgB;AACH,QAAA,yBAAyB,GAIlC,CAAC,CAAC,MAAM,CAAC;IACX,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;IAC1C,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE;IAC9C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,IAAI,EAAE,wCAAwB;IAC9B,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7C,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7C,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,aAAa,EAAE,YAAY;QAC3B,eAAe,EAAE,cAAc;QAC/B,eAAe,EAAE,cAAc;QAC/B,cAAc,EAAE,aAAa;QAC7B,cAAc,EAAE,aAAa;QAC7B,eAAe,EAAE,cAAc;QAC/B,YAAY,EAAE,WAAW;QACzB,YAAY,EAAE,WAAW;QACzB,YAAY,EAAE,WAAW;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,mBAAmB,CACjC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,iCAAyB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACrD,yCAAyC,CAC1C,CAAC;AACJ,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
/**
|
|
3
|
-
* An indicative fiat -> USDC-on-Ethereum quote request.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
*
|
|
7
|
-
* The output asset and chain are fixed to USDC on Ethereum and are not
|
|
8
|
-
* user-supplied — this product group delivers only USDC to the user's own
|
|
9
|
-
* wallet (non-custodial).
|
|
10
|
-
*/
|
|
11
|
-
export type OnrampQuoteRequest = {
|
|
12
|
-
/**
|
|
13
|
-
* Amount of fiat to spend, as a decimal string (e.g. `100`).
|
|
14
|
-
*/
|
|
15
|
-
fiatAmount: string;
|
|
16
|
-
/**
|
|
17
|
-
* ISO-4217 fiat currency code. Defaults to `USD`.
|
|
18
|
-
*/
|
|
19
|
-
fiatCurrency?: string | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* The wallet that will receive the USDC on Ethereum. Funds are delivered here directly — Compass never holds them.
|
|
22
|
-
*/
|
|
23
|
-
destinationAddress: string;
|
|
24
|
-
};
|
|
25
|
-
/** @internal */
|
|
26
|
-
export type OnrampQuoteRequest$Outbound = {
|
|
27
|
-
fiat_amount: string;
|
|
28
|
-
fiat_currency?: string | undefined;
|
|
29
|
-
destination_address: string;
|
|
30
|
-
};
|
|
31
|
-
/** @internal */
|
|
32
|
-
export declare const OnrampQuoteRequest$outboundSchema: z.ZodType<OnrampQuoteRequest$Outbound, z.ZodTypeDef, OnrampQuoteRequest>;
|
|
33
|
-
export declare function onrampQuoteRequestToJSON(onrampQuoteRequest: OnrampQuoteRequest): string;
|
|
34
|
-
//# sourceMappingURL=onrampquoterequest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onrampquoterequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/onrampquoterequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CAWlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR"}
|
|
@@ -1,58 +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.OnrampQuoteRequest$outboundSchema = void 0;
|
|
40
|
-
exports.onrampQuoteRequestToJSON = onrampQuoteRequestToJSON;
|
|
41
|
-
const z = __importStar(require("zod/v3"));
|
|
42
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
43
|
-
/** @internal */
|
|
44
|
-
exports.OnrampQuoteRequest$outboundSchema = z.object({
|
|
45
|
-
fiatAmount: z.string(),
|
|
46
|
-
fiatCurrency: z.string().optional(),
|
|
47
|
-
destinationAddress: z.string(),
|
|
48
|
-
}).transform((v) => {
|
|
49
|
-
return (0, primitives_js_1.remap)(v, {
|
|
50
|
-
fiatAmount: "fiat_amount",
|
|
51
|
-
fiatCurrency: "fiat_currency",
|
|
52
|
-
destinationAddress: "destination_address",
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
function onrampQuoteRequestToJSON(onrampQuoteRequest) {
|
|
56
|
-
return JSON.stringify(exports.OnrampQuoteRequest$outboundSchema.parse(onrampQuoteRequest));
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=onrampquoterequest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onrampquoterequest.js","sourceRoot":"","sources":["../../../../src/models/components/onrampquoterequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDH,4DAMC;AAzDD,0CAA4B;AAC5B,2DAA0D;AAiC1D,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;CAC/B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;QACzB,YAAY,EAAE,eAAe;QAC7B,kBAAkB,EAAE,qBAAqB;KAC1C,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,yCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
3
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
4
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
-
/**
|
|
6
|
-
* Lifecycle state: `pending` (awaiting card payment), `processing` (payment received, bridging/swapping to USDC), `delivered` (USDC received in the destination wallet), or `failed`.
|
|
7
|
-
*/
|
|
8
|
-
export declare const OnrampStatusStatus: {
|
|
9
|
-
readonly Pending: "pending";
|
|
10
|
-
readonly Processing: "processing";
|
|
11
|
-
readonly Delivered: "delivered";
|
|
12
|
-
readonly Failed: "failed";
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Lifecycle state: `pending` (awaiting card payment), `processing` (payment received, bridging/swapping to USDC), `delivered` (USDC received in the destination wallet), or `failed`.
|
|
16
|
-
*/
|
|
17
|
-
export type OnrampStatusStatus = ClosedEnum<typeof OnrampStatusStatus>;
|
|
18
|
-
/**
|
|
19
|
-
* Current state of a fiat on-ramp payment.
|
|
20
|
-
*
|
|
21
|
-
* @remarks
|
|
22
|
-
*
|
|
23
|
-
* Re-read on demand from Halliday (the system of record) — Compass holds no
|
|
24
|
-
* state of its own.
|
|
25
|
-
*/
|
|
26
|
-
export type OnrampStatus = {
|
|
27
|
-
/**
|
|
28
|
-
* Halliday's payment id, echoed straight through.
|
|
29
|
-
*/
|
|
30
|
-
paymentId: string;
|
|
31
|
-
/**
|
|
32
|
-
* Lifecycle state: `pending` (awaiting card payment), `processing` (payment received, bridging/swapping to USDC), `delivered` (USDC received in the destination wallet), or `failed`.
|
|
33
|
-
*/
|
|
34
|
-
status: OnrampStatusStatus;
|
|
35
|
-
/**
|
|
36
|
-
* USDC delivered so far, human-readable. Set once delivered.
|
|
37
|
-
*/
|
|
38
|
-
outputAmountDelivered?: string | null | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* Ethereum tx hash of the USDC delivery, once available.
|
|
41
|
-
*/
|
|
42
|
-
deliveryTxHash?: string | null | undefined;
|
|
43
|
-
/**
|
|
44
|
-
* The wallet the USDC is delivered to.
|
|
45
|
-
*/
|
|
46
|
-
destinationAddress?: string | null | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* ISO-8601 timestamp of the last status change, if provided.
|
|
49
|
-
*/
|
|
50
|
-
updatedAt?: string | null | undefined;
|
|
51
|
-
};
|
|
52
|
-
/** @internal */
|
|
53
|
-
export declare const OnrampStatusStatus$inboundSchema: z.ZodNativeEnum<typeof OnrampStatusStatus>;
|
|
54
|
-
/** @internal */
|
|
55
|
-
export declare const OnrampStatus$inboundSchema: z.ZodType<OnrampStatus, z.ZodTypeDef, unknown>;
|
|
56
|
-
export declare function onrampStatusFromJSON(jsonString: string): SafeParseResult<OnrampStatus, SDKValidationError>;
|
|
57
|
-
//# sourceMappingURL=onrampstatus.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onrampstatus.d.ts","sourceRoot":"","sources":["../../../../src/models/components/onrampstatus.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;CAKrB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,kBAAkB,CAAC;IAC3B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClD;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACvC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,aAAa,CAC5D,OAAO,kBAAkB,CACS,CAAC;AAErC,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAChD,YAAY,EACZ,CAAC,CAAC,UAAU,EACZ,OAAO,CAgBP,CAAC;AAEH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAMnD"}
|
|
@@ -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.OnrampStatus$inboundSchema = exports.OnrampStatusStatus$inboundSchema = exports.OnrampStatusStatus = void 0;
|
|
40
|
-
exports.onrampStatusFromJSON = onrampStatusFromJSON;
|
|
41
|
-
const z = __importStar(require("zod/v3"));
|
|
42
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
43
|
-
const schemas_js_1 = require("../../lib/schemas.js");
|
|
44
|
-
/**
|
|
45
|
-
* Lifecycle state: `pending` (awaiting card payment), `processing` (payment received, bridging/swapping to USDC), `delivered` (USDC received in the destination wallet), or `failed`.
|
|
46
|
-
*/
|
|
47
|
-
exports.OnrampStatusStatus = {
|
|
48
|
-
Pending: "pending",
|
|
49
|
-
Processing: "processing",
|
|
50
|
-
Delivered: "delivered",
|
|
51
|
-
Failed: "failed",
|
|
52
|
-
};
|
|
53
|
-
/** @internal */
|
|
54
|
-
exports.OnrampStatusStatus$inboundSchema = z.nativeEnum(exports.OnrampStatusStatus);
|
|
55
|
-
/** @internal */
|
|
56
|
-
exports.OnrampStatus$inboundSchema = z.object({
|
|
57
|
-
payment_id: z.string(),
|
|
58
|
-
status: exports.OnrampStatusStatus$inboundSchema,
|
|
59
|
-
output_amount_delivered: z.nullable(z.string()).optional(),
|
|
60
|
-
delivery_tx_hash: z.nullable(z.string()).optional(),
|
|
61
|
-
destination_address: z.nullable(z.string()).optional(),
|
|
62
|
-
updated_at: z.nullable(z.string()).optional(),
|
|
63
|
-
}).transform((v) => {
|
|
64
|
-
return (0, primitives_js_1.remap)(v, {
|
|
65
|
-
"payment_id": "paymentId",
|
|
66
|
-
"output_amount_delivered": "outputAmountDelivered",
|
|
67
|
-
"delivery_tx_hash": "deliveryTxHash",
|
|
68
|
-
"destination_address": "destinationAddress",
|
|
69
|
-
"updated_at": "updatedAt",
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
function onrampStatusFromJSON(jsonString) {
|
|
73
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.OnrampStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OnrampStatus' from JSON`);
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=onrampstatus.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onrampstatus.js","sourceRoot":"","sources":["../../../../src/models/components/onrampstatus.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFH,oDAQC;AA3FD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAKjD;;GAEG;AACU,QAAA,kBAAkB,GAAG;IAChC,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;CACR,CAAC;AAyCX,gBAAgB;AACH,QAAA,gCAAgC,GAEzC,CAAC,CAAC,UAAU,CAAC,0BAAkB,CAAC,CAAC;AAErC,gBAAgB;AACH,QAAA,0BAA0B,GAInC,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAE,wCAAgC;IACxC,uBAAuB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC1D,gBAAgB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACnD,mBAAmB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtD,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,YAAY,EAAE,WAAW;QACzB,yBAAyB,EAAE,uBAAuB;QAClD,kBAAkB,EAAE,gBAAgB;QACpC,qBAAqB,EAAE,oBAAoB;QAC3C,YAAY,EAAE,WAAW;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,oBAAoB,CAClC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,kCAA0B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtD,0CAA0C,CAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { CompassAPISDKError } from "./compassapisdkerror.js";
|
|
3
|
-
/**
|
|
4
|
-
* Standard error envelope returned by every non-2xx on-ramp response.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
*
|
|
8
|
-
* Surfaced in OpenAPI ``responses`` declarations so SDK consumers can decode
|
|
9
|
-
* failures uniformly without inspecting per-status-code shapes.
|
|
10
|
-
*/
|
|
11
|
-
export type OnrampErrorResponseData = {
|
|
12
|
-
/**
|
|
13
|
-
* Short human-readable error label (e.g. `Payment not found.`, `On-ramp provider unavailable`, `Identity verification required`).
|
|
14
|
-
*/
|
|
15
|
-
error: string;
|
|
16
|
-
/**
|
|
17
|
-
* Human-readable explanation.
|
|
18
|
-
*/
|
|
19
|
-
message: string;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Standard error envelope returned by every non-2xx on-ramp response.
|
|
23
|
-
*
|
|
24
|
-
* @remarks
|
|
25
|
-
*
|
|
26
|
-
* Surfaced in OpenAPI ``responses`` declarations so SDK consumers can decode
|
|
27
|
-
* failures uniformly without inspecting per-status-code shapes.
|
|
28
|
-
*/
|
|
29
|
-
export declare class OnrampErrorResponse extends CompassAPISDKError {
|
|
30
|
-
/**
|
|
31
|
-
* Short human-readable error label (e.g. `Payment not found.`, `On-ramp provider unavailable`, `Identity verification required`).
|
|
32
|
-
*/
|
|
33
|
-
error: string;
|
|
34
|
-
/** The original data that was passed to this error instance. */
|
|
35
|
-
data$: OnrampErrorResponseData;
|
|
36
|
-
constructor(err: OnrampErrorResponseData, httpMeta: {
|
|
37
|
-
response: Response;
|
|
38
|
-
request: Request;
|
|
39
|
-
body: string;
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/** @internal */
|
|
43
|
-
export declare const OnrampErrorResponse$inboundSchema: z.ZodType<OnrampErrorResponse, z.ZodTypeDef, unknown>;
|
|
44
|
-
//# sourceMappingURL=onramperrorresponse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onramperrorresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/errors/onramperrorresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;;;;;;GAOG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,kBAAkB;IACzD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd,gEAAgE;IAChE,KAAK,EAAE,uBAAuB,CAAC;gBAG7B,GAAG,EAAE,uBAAuB,EAC5B,QAAQ,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;CASnE;AAED,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,mBAAmB,EACnB,CAAC,CAAC,UAAU,EACZ,OAAO,CAcL,CAAC"}
|