@compass-labs/api-sdk 2.2.70-rc.0 → 2.2.70
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 +13 -3
- package/codeSamples_typescript.yaml +18 -0
- package/dist/commonjs/funcs/onrampOnrampCreate.d.ts +38 -0
- package/dist/commonjs/funcs/onrampOnrampCreate.d.ts.map +1 -0
- package/dist/commonjs/funcs/onrampOnrampCreate.js +139 -0
- package/dist/commonjs/funcs/onrampOnrampCreate.js.map +1 -0
- package/dist/commonjs/funcs/onrampOnrampQuote.d.ts +27 -0
- package/dist/commonjs/funcs/onrampOnrampQuote.d.ts.map +1 -0
- package/dist/commonjs/funcs/onrampOnrampQuote.js +128 -0
- package/dist/commonjs/funcs/onrampOnrampQuote.js.map +1 -0
- package/dist/commonjs/funcs/onrampOnrampStatus.d.ts +31 -0
- package/dist/commonjs/funcs/onrampOnrampStatus.d.ts.map +1 -0
- package/dist/commonjs/funcs/onrampOnrampStatus.js +135 -0
- package/dist/commonjs/funcs/onrampOnrampStatus.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/index.d.ts +6 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +6 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/onrampcreate.d.ts +59 -0
- package/dist/commonjs/models/components/onrampcreate.d.ts.map +1 -0
- package/dist/commonjs/models/components/onrampcreate.js +75 -0
- package/dist/commonjs/models/components/onrampcreate.js.map +1 -0
- package/dist/commonjs/models/components/onrampcreaterequest.d.ts +40 -0
- package/dist/commonjs/models/components/onrampcreaterequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/onrampcreaterequest.js +60 -0
- package/dist/commonjs/models/components/onrampcreaterequest.js.map +1 -0
- package/dist/commonjs/models/components/onrampfees.d.ts +29 -0
- package/dist/commonjs/models/components/onrampfees.d.ts.map +1 -0
- package/dist/commonjs/models/components/onrampfees.js +59 -0
- package/dist/commonjs/models/components/onrampfees.js.map +1 -0
- package/dist/commonjs/models/components/onrampquote.d.ts +58 -0
- package/dist/commonjs/models/components/onrampquote.d.ts.map +1 -0
- package/dist/commonjs/models/components/onrampquote.js +73 -0
- package/dist/commonjs/models/components/onrampquote.js.map +1 -0
- package/dist/commonjs/models/components/onrampquoterequest.d.ts +34 -0
- package/dist/commonjs/models/components/onrampquoterequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/onrampquoterequest.js +58 -0
- package/dist/commonjs/models/components/onrampquoterequest.js.map +1 -0
- package/dist/commonjs/models/components/onrampstatus.d.ts +57 -0
- package/dist/commonjs/models/components/onrampstatus.d.ts.map +1 -0
- package/dist/commonjs/models/components/onrampstatus.js +75 -0
- package/dist/commonjs/models/components/onrampstatus.js.map +1 -0
- package/dist/commonjs/models/components/orderstatus.d.ts +4 -4
- package/dist/commonjs/models/components/orderstatus.d.ts.map +1 -1
- package/dist/commonjs/models/components/orderstatus.js +4 -5
- package/dist/commonjs/models/components/orderstatus.js.map +1 -1
- package/dist/commonjs/models/errors/index.d.ts +1 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +1 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/errors/onramperrorresponse.d.ts +44 -0
- package/dist/commonjs/models/errors/onramperrorresponse.d.ts.map +1 -0
- package/dist/commonjs/models/errors/onramperrorresponse.js +75 -0
- package/dist/commonjs/models/errors/onramperrorresponse.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/v2onrampstatus.d.ts +15 -0
- package/dist/commonjs/models/operations/v2onrampstatus.d.ts.map +1 -0
- package/dist/commonjs/models/operations/v2onrampstatus.js +54 -0
- package/dist/commonjs/models/operations/v2onrampstatus.js.map +1 -0
- package/dist/commonjs/sdk/onramp.d.ts +68 -0
- package/dist/commonjs/sdk/onramp.d.ts.map +1 -0
- package/dist/commonjs/sdk/onramp.js +83 -0
- package/dist/commonjs/sdk/onramp.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/onrampOnrampCreate.d.ts +38 -0
- package/dist/esm/funcs/onrampOnrampCreate.d.ts.map +1 -0
- package/dist/esm/funcs/onrampOnrampCreate.js +103 -0
- package/dist/esm/funcs/onrampOnrampCreate.js.map +1 -0
- package/dist/esm/funcs/onrampOnrampQuote.d.ts +27 -0
- package/dist/esm/funcs/onrampOnrampQuote.d.ts.map +1 -0
- package/dist/esm/funcs/onrampOnrampQuote.js +92 -0
- package/dist/esm/funcs/onrampOnrampQuote.js.map +1 -0
- package/dist/esm/funcs/onrampOnrampStatus.d.ts +31 -0
- package/dist/esm/funcs/onrampOnrampStatus.d.ts.map +1 -0
- package/dist/esm/funcs/onrampOnrampStatus.js +99 -0
- package/dist/esm/funcs/onrampOnrampStatus.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/index.d.ts +6 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +6 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/onrampcreate.d.ts +59 -0
- package/dist/esm/models/components/onrampcreate.d.ts.map +1 -0
- package/dist/esm/models/components/onrampcreate.js +38 -0
- package/dist/esm/models/components/onrampcreate.js.map +1 -0
- package/dist/esm/models/components/onrampcreaterequest.d.ts +40 -0
- package/dist/esm/models/components/onrampcreaterequest.d.ts.map +1 -0
- package/dist/esm/models/components/onrampcreaterequest.js +23 -0
- package/dist/esm/models/components/onrampcreaterequest.js.map +1 -0
- package/dist/esm/models/components/onrampfees.d.ts +29 -0
- package/dist/esm/models/components/onrampfees.d.ts.map +1 -0
- package/dist/esm/models/components/onrampfees.js +22 -0
- package/dist/esm/models/components/onrampfees.js.map +1 -0
- package/dist/esm/models/components/onrampquote.d.ts +58 -0
- package/dist/esm/models/components/onrampquote.d.ts.map +1 -0
- package/dist/esm/models/components/onrampquote.js +36 -0
- package/dist/esm/models/components/onrampquote.js.map +1 -0
- package/dist/esm/models/components/onrampquoterequest.d.ts +34 -0
- package/dist/esm/models/components/onrampquoterequest.d.ts.map +1 -0
- package/dist/esm/models/components/onrampquoterequest.js +21 -0
- package/dist/esm/models/components/onrampquoterequest.js.map +1 -0
- package/dist/esm/models/components/onrampstatus.d.ts +57 -0
- package/dist/esm/models/components/onrampstatus.d.ts.map +1 -0
- package/dist/esm/models/components/onrampstatus.js +38 -0
- package/dist/esm/models/components/onrampstatus.js.map +1 -0
- package/dist/esm/models/components/orderstatus.d.ts +4 -4
- package/dist/esm/models/components/orderstatus.d.ts.map +1 -1
- package/dist/esm/models/components/orderstatus.js +3 -4
- package/dist/esm/models/components/orderstatus.js.map +1 -1
- package/dist/esm/models/errors/index.d.ts +1 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +1 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/errors/onramperrorresponse.d.ts +44 -0
- package/dist/esm/models/errors/onramperrorresponse.d.ts.map +1 -0
- package/dist/esm/models/errors/onramperrorresponse.js +38 -0
- package/dist/esm/models/errors/onramperrorresponse.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/v2onrampstatus.d.ts +15 -0
- package/dist/esm/models/operations/v2onrampstatus.d.ts.map +1 -0
- package/dist/esm/models/operations/v2onrampstatus.js +17 -0
- package/dist/esm/models/operations/v2onrampstatus.js.map +1 -0
- package/dist/esm/sdk/onramp.d.ts +68 -0
- package/dist/esm/sdk/onramp.d.ts.map +1 -0
- package/dist/esm/sdk/onramp.js +79 -0
- package/dist/esm/sdk/onramp.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/docs/models/components/onrampcreate.md +43 -0
- package/docs/models/components/onrampcreaterequest.md +29 -0
- package/docs/models/components/onrampcreatestatus.md +17 -0
- package/docs/models/components/onrampfees.md +26 -0
- package/docs/models/components/onrampquote.md +36 -0
- package/docs/models/components/onrampquoterequest.md +27 -0
- package/docs/models/components/onrampstatus.md +28 -0
- package/docs/models/components/onrampstatusstatus.md +17 -0
- package/docs/models/components/orderstatus.md +1 -1
- package/docs/models/components/{status.md → orderstatusstatus.md} +3 -3
- package/docs/models/errors/onramperrorresponse.md +21 -0
- package/docs/models/operations/v2onrampstatusrequest.md +17 -0
- package/docs/sdks/onramp/README.md +283 -0
- package/openapi_prepped_for_speakeasy.json +539 -0
- package/package.json +1 -1
- package/src/funcs/onrampOnrampCreate.ts +192 -0
- package/src/funcs/onrampOnrampQuote.ts +181 -0
- package/src/funcs/onrampOnrampStatus.ts +189 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/index.ts +6 -0
- package/src/models/components/onrampcreate.ts +97 -0
- package/src/models/components/onrampcreaterequest.ts +70 -0
- package/src/models/components/onrampfees.ts +59 -0
- package/src/models/components/onrampquote.ts +101 -0
- package/src/models/components/onrampquoterequest.ts +62 -0
- package/src/models/components/onrampstatus.ts +96 -0
- package/src/models/components/orderstatus.ts +7 -6
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/onramperrorresponse.ts +75 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/v2onrampstatus.ts +39 -0
- package/src/sdk/onramp.ts +105 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Create a fiat on-ramp payment delivering USDC on Ethereum.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
*
|
|
13
|
+
* Carries the same fields as the quote (a quote is implicit — we do not
|
|
14
|
+
* persist a quote handle). ``quote_id`` is optional and only echoed upstream
|
|
15
|
+
* if Halliday's ``/payments/confirm`` requires a previously-issued quote
|
|
16
|
+
* handle; omit it to confirm against a fresh quote.
|
|
17
|
+
*/
|
|
18
|
+
export type OnrampCreateRequest = {
|
|
19
|
+
/**
|
|
20
|
+
* Amount of fiat to spend, as a decimal string (e.g. `100`).
|
|
21
|
+
*/
|
|
22
|
+
fiatAmount: string;
|
|
23
|
+
/**
|
|
24
|
+
* ISO-4217 fiat currency code. Defaults to `USD`.
|
|
25
|
+
*/
|
|
26
|
+
fiatCurrency?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* The wallet that will receive the USDC on Ethereum. Funds are delivered here directly — Compass never holds them.
|
|
29
|
+
*/
|
|
30
|
+
destinationAddress: string;
|
|
31
|
+
/**
|
|
32
|
+
* Optional Halliday quote handle to confirm against. Omit to confirm against a fresh quote derived from the amount and currency.
|
|
33
|
+
*/
|
|
34
|
+
quoteId?: string | null | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type OnrampCreateRequest$Outbound = {
|
|
39
|
+
fiat_amount: string;
|
|
40
|
+
fiat_currency?: string | undefined;
|
|
41
|
+
destination_address: string;
|
|
42
|
+
quote_id?: string | null | undefined;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const OnrampCreateRequest$outboundSchema: z.ZodType<
|
|
47
|
+
OnrampCreateRequest$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
OnrampCreateRequest
|
|
50
|
+
> = z.object({
|
|
51
|
+
fiatAmount: z.string(),
|
|
52
|
+
fiatCurrency: z.string().optional(),
|
|
53
|
+
destinationAddress: z.string(),
|
|
54
|
+
quoteId: z.nullable(z.string()).optional(),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
fiatAmount: "fiat_amount",
|
|
58
|
+
fiatCurrency: "fiat_currency",
|
|
59
|
+
destinationAddress: "destination_address",
|
|
60
|
+
quoteId: "quote_id",
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export function onrampCreateRequestToJSON(
|
|
65
|
+
onrampCreateRequest: OnrampCreateRequest,
|
|
66
|
+
): string {
|
|
67
|
+
return JSON.stringify(
|
|
68
|
+
OnrampCreateRequest$outboundSchema.parse(onrampCreateRequest),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Fee breakdown for an on-ramp quote.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
*
|
|
16
|
+
* ``business_fees`` is a fixed ``"0"`` for now — monetization is a single
|
|
17
|
+
* future lever and is intentionally not charged.
|
|
18
|
+
*/
|
|
19
|
+
export type OnrampFees = {
|
|
20
|
+
/**
|
|
21
|
+
* Fee charged by the on-ramp provider, in fiat.
|
|
22
|
+
*/
|
|
23
|
+
providerFee: string;
|
|
24
|
+
/**
|
|
25
|
+
* Estimated network/gas fee, in fiat.
|
|
26
|
+
*/
|
|
27
|
+
networkFee: string;
|
|
28
|
+
/**
|
|
29
|
+
* Compass business fee, in fiat. Always `0` for now.
|
|
30
|
+
*/
|
|
31
|
+
businessFees?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const OnrampFees$inboundSchema: z.ZodType<
|
|
36
|
+
OnrampFees,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.object({
|
|
40
|
+
provider_fee: z.string(),
|
|
41
|
+
network_fee: z.string(),
|
|
42
|
+
business_fees: z.string().optional(),
|
|
43
|
+
}).transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
"provider_fee": "providerFee",
|
|
46
|
+
"network_fee": "networkFee",
|
|
47
|
+
"business_fees": "businessFees",
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export function onrampFeesFromJSON(
|
|
52
|
+
jsonString: string,
|
|
53
|
+
): SafeParseResult<OnrampFees, SDKValidationError> {
|
|
54
|
+
return safeParse(
|
|
55
|
+
jsonString,
|
|
56
|
+
(x) => OnrampFees$inboundSchema.parse(JSON.parse(x)),
|
|
57
|
+
`Failed to parse 'OnrampFees' from JSON`,
|
|
58
|
+
);
|
|
59
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import { OnrampFees, OnrampFees$inboundSchema } from "./onrampfees.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* An indicative fiat -> USDC-on-Ethereum quote.
|
|
14
|
+
*/
|
|
15
|
+
export type OnrampQuote = {
|
|
16
|
+
/**
|
|
17
|
+
* Fiat amount to spend.
|
|
18
|
+
*/
|
|
19
|
+
fiatAmount: string;
|
|
20
|
+
/**
|
|
21
|
+
* ISO-4217 fiat currency code.
|
|
22
|
+
*/
|
|
23
|
+
fiatCurrency: string;
|
|
24
|
+
/**
|
|
25
|
+
* Estimated USDC delivered, human-readable (6-decimal token).
|
|
26
|
+
*/
|
|
27
|
+
outputAmount: string;
|
|
28
|
+
/**
|
|
29
|
+
* Delivered asset. Always USDC for this on-ramp.
|
|
30
|
+
*/
|
|
31
|
+
outputAsset?: "USDC" | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Delivery chain. Always Ethereum for this on-ramp.
|
|
34
|
+
*/
|
|
35
|
+
outputChain?: "ethereum" | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* USDC received per unit of fiat.
|
|
38
|
+
*/
|
|
39
|
+
exchangeRate: string;
|
|
40
|
+
/**
|
|
41
|
+
* Fee breakdown for an on-ramp quote.
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
*
|
|
45
|
+
* ``business_fees`` is a fixed ``"0"`` for now — monetization is a single
|
|
46
|
+
* future lever and is intentionally not charged.
|
|
47
|
+
*/
|
|
48
|
+
fees: OnrampFees;
|
|
49
|
+
/**
|
|
50
|
+
* Minimum fiat amount accepted, if advertised by the provider.
|
|
51
|
+
*/
|
|
52
|
+
minAmount?: string | null | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Maximum fiat amount accepted, if advertised by the provider.
|
|
55
|
+
*/
|
|
56
|
+
maxAmount?: string | null | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* ISO-8601 timestamp after which this quote is stale, if any.
|
|
59
|
+
*/
|
|
60
|
+
expiresAt?: string | null | undefined;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const OnrampQuote$inboundSchema: z.ZodType<
|
|
65
|
+
OnrampQuote,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
unknown
|
|
68
|
+
> = z.object({
|
|
69
|
+
fiat_amount: z.string(),
|
|
70
|
+
fiat_currency: z.string(),
|
|
71
|
+
output_amount: z.string(),
|
|
72
|
+
output_asset: z.literal("USDC").optional(),
|
|
73
|
+
output_chain: z.literal("ethereum").optional(),
|
|
74
|
+
exchange_rate: z.string(),
|
|
75
|
+
fees: OnrampFees$inboundSchema,
|
|
76
|
+
min_amount: z.nullable(z.string()).optional(),
|
|
77
|
+
max_amount: z.nullable(z.string()).optional(),
|
|
78
|
+
expires_at: z.nullable(z.string()).optional(),
|
|
79
|
+
}).transform((v) => {
|
|
80
|
+
return remap$(v, {
|
|
81
|
+
"fiat_amount": "fiatAmount",
|
|
82
|
+
"fiat_currency": "fiatCurrency",
|
|
83
|
+
"output_amount": "outputAmount",
|
|
84
|
+
"output_asset": "outputAsset",
|
|
85
|
+
"output_chain": "outputChain",
|
|
86
|
+
"exchange_rate": "exchangeRate",
|
|
87
|
+
"min_amount": "minAmount",
|
|
88
|
+
"max_amount": "maxAmount",
|
|
89
|
+
"expires_at": "expiresAt",
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export function onrampQuoteFromJSON(
|
|
94
|
+
jsonString: string,
|
|
95
|
+
): SafeParseResult<OnrampQuote, SDKValidationError> {
|
|
96
|
+
return safeParse(
|
|
97
|
+
jsonString,
|
|
98
|
+
(x) => OnrampQuote$inboundSchema.parse(JSON.parse(x)),
|
|
99
|
+
`Failed to parse 'OnrampQuote' from JSON`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* An indicative fiat -> USDC-on-Ethereum quote request.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
*
|
|
13
|
+
* The output asset and chain are fixed to USDC on Ethereum and are not
|
|
14
|
+
* user-supplied — this product group delivers only USDC to the user's own
|
|
15
|
+
* wallet (non-custodial).
|
|
16
|
+
*/
|
|
17
|
+
export type OnrampQuoteRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* Amount of fiat to spend, as a decimal string (e.g. `100`).
|
|
20
|
+
*/
|
|
21
|
+
fiatAmount: string;
|
|
22
|
+
/**
|
|
23
|
+
* ISO-4217 fiat currency code. Defaults to `USD`.
|
|
24
|
+
*/
|
|
25
|
+
fiatCurrency?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The wallet that will receive the USDC on Ethereum. Funds are delivered here directly — Compass never holds them.
|
|
28
|
+
*/
|
|
29
|
+
destinationAddress: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type OnrampQuoteRequest$Outbound = {
|
|
34
|
+
fiat_amount: string;
|
|
35
|
+
fiat_currency?: string | undefined;
|
|
36
|
+
destination_address: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const OnrampQuoteRequest$outboundSchema: z.ZodType<
|
|
41
|
+
OnrampQuoteRequest$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
OnrampQuoteRequest
|
|
44
|
+
> = z.object({
|
|
45
|
+
fiatAmount: z.string(),
|
|
46
|
+
fiatCurrency: z.string().optional(),
|
|
47
|
+
destinationAddress: z.string(),
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
fiatAmount: "fiat_amount",
|
|
51
|
+
fiatCurrency: "fiat_currency",
|
|
52
|
+
destinationAddress: "destination_address",
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export function onrampQuoteRequestToJSON(
|
|
57
|
+
onrampQuoteRequest: OnrampQuoteRequest,
|
|
58
|
+
): string {
|
|
59
|
+
return JSON.stringify(
|
|
60
|
+
OnrampQuoteRequest$outboundSchema.parse(onrampQuoteRequest),
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Lifecycle state: `pending` (awaiting card payment), `processing` (payment received, bridging/swapping to USDC), `delivered` (USDC received in the destination wallet), or `failed`.
|
|
14
|
+
*/
|
|
15
|
+
export const OnrampStatusStatus = {
|
|
16
|
+
Pending: "pending",
|
|
17
|
+
Processing: "processing",
|
|
18
|
+
Delivered: "delivered",
|
|
19
|
+
Failed: "failed",
|
|
20
|
+
} as const;
|
|
21
|
+
/**
|
|
22
|
+
* Lifecycle state: `pending` (awaiting card payment), `processing` (payment received, bridging/swapping to USDC), `delivered` (USDC received in the destination wallet), or `failed`.
|
|
23
|
+
*/
|
|
24
|
+
export type OnrampStatusStatus = ClosedEnum<typeof OnrampStatusStatus>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Current state of a fiat on-ramp payment.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
*
|
|
31
|
+
* Re-read on demand from Halliday (the system of record) — Compass holds no
|
|
32
|
+
* state of its own.
|
|
33
|
+
*/
|
|
34
|
+
export type OnrampStatus = {
|
|
35
|
+
/**
|
|
36
|
+
* Halliday's payment id, echoed straight through.
|
|
37
|
+
*/
|
|
38
|
+
paymentId: string;
|
|
39
|
+
/**
|
|
40
|
+
* Lifecycle state: `pending` (awaiting card payment), `processing` (payment received, bridging/swapping to USDC), `delivered` (USDC received in the destination wallet), or `failed`.
|
|
41
|
+
*/
|
|
42
|
+
status: OnrampStatusStatus;
|
|
43
|
+
/**
|
|
44
|
+
* USDC delivered so far, human-readable. Set once delivered.
|
|
45
|
+
*/
|
|
46
|
+
outputAmountDelivered?: string | null | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Ethereum tx hash of the USDC delivery, once available.
|
|
49
|
+
*/
|
|
50
|
+
deliveryTxHash?: string | null | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* The wallet the USDC is delivered to.
|
|
53
|
+
*/
|
|
54
|
+
destinationAddress?: string | null | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* ISO-8601 timestamp of the last status change, if provided.
|
|
57
|
+
*/
|
|
58
|
+
updatedAt?: string | null | undefined;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const OnrampStatusStatus$inboundSchema: z.ZodNativeEnum<
|
|
63
|
+
typeof OnrampStatusStatus
|
|
64
|
+
> = z.nativeEnum(OnrampStatusStatus);
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const OnrampStatus$inboundSchema: z.ZodType<
|
|
68
|
+
OnrampStatus,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
unknown
|
|
71
|
+
> = z.object({
|
|
72
|
+
payment_id: z.string(),
|
|
73
|
+
status: OnrampStatusStatus$inboundSchema,
|
|
74
|
+
output_amount_delivered: z.nullable(z.string()).optional(),
|
|
75
|
+
delivery_tx_hash: z.nullable(z.string()).optional(),
|
|
76
|
+
destination_address: z.nullable(z.string()).optional(),
|
|
77
|
+
updated_at: z.nullable(z.string()).optional(),
|
|
78
|
+
}).transform((v) => {
|
|
79
|
+
return remap$(v, {
|
|
80
|
+
"payment_id": "paymentId",
|
|
81
|
+
"output_amount_delivered": "outputAmountDelivered",
|
|
82
|
+
"delivery_tx_hash": "deliveryTxHash",
|
|
83
|
+
"destination_address": "destinationAddress",
|
|
84
|
+
"updated_at": "updatedAt",
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export function onrampStatusFromJSON(
|
|
89
|
+
jsonString: string,
|
|
90
|
+
): SafeParseResult<OnrampStatus, SDKValidationError> {
|
|
91
|
+
return safeParse(
|
|
92
|
+
jsonString,
|
|
93
|
+
(x) => OnrampStatus$inboundSchema.parse(JSON.parse(x)),
|
|
94
|
+
`Failed to parse 'OnrampStatus' from JSON`,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
@@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
/**
|
|
13
13
|
* Order lifecycle state. One of `pending`, `filled`, `expired`, or `cancelled`. Upstream protocol states beyond these four (e.g. `partially-filled`, `refunded`) are mapped onto this set.
|
|
14
14
|
*/
|
|
15
|
-
export const
|
|
15
|
+
export const OrderStatusStatus = {
|
|
16
16
|
Pending: "pending",
|
|
17
17
|
Filled: "filled",
|
|
18
18
|
Expired: "expired",
|
|
@@ -21,7 +21,7 @@ export const Status = {
|
|
|
21
21
|
/**
|
|
22
22
|
* Order lifecycle state. One of `pending`, `filled`, `expired`, or `cancelled`. Upstream protocol states beyond these four (e.g. `partially-filled`, `refunded`) are mapped onto this set.
|
|
23
23
|
*/
|
|
24
|
-
export type
|
|
24
|
+
export type OrderStatusStatus = ClosedEnum<typeof OrderStatusStatus>;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Returned from `GET /order/{hash}` — current state of a relayed order.
|
|
@@ -34,7 +34,7 @@ export type OrderStatus = {
|
|
|
34
34
|
/**
|
|
35
35
|
* Order lifecycle state. One of `pending`, `filled`, `expired`, or `cancelled`. Upstream protocol states beyond these four (e.g. `partially-filled`, `refunded`) are mapped onto this set.
|
|
36
36
|
*/
|
|
37
|
-
status:
|
|
37
|
+
status: OrderStatusStatus;
|
|
38
38
|
/**
|
|
39
39
|
* Transaction hash of the most recent fill. Populated for fully filled orders and for partial fills while `status` is still `pending`.
|
|
40
40
|
*/
|
|
@@ -58,8 +58,9 @@ export type OrderStatus = {
|
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
/** @internal */
|
|
61
|
-
export const
|
|
62
|
-
|
|
61
|
+
export const OrderStatusStatus$inboundSchema: z.ZodNativeEnum<
|
|
62
|
+
typeof OrderStatusStatus
|
|
63
|
+
> = z.nativeEnum(OrderStatusStatus);
|
|
63
64
|
|
|
64
65
|
/** @internal */
|
|
65
66
|
export const OrderStatus$inboundSchema: z.ZodType<
|
|
@@ -68,7 +69,7 @@ export const OrderStatus$inboundSchema: z.ZodType<
|
|
|
68
69
|
unknown
|
|
69
70
|
> = z.object({
|
|
70
71
|
order_hash: z.string(),
|
|
71
|
-
status:
|
|
72
|
+
status: OrderStatusStatus$inboundSchema,
|
|
72
73
|
fill_tx_hash: z.nullable(z.string()).optional(),
|
|
73
74
|
fill_price_usd: z.nullable(z.string()).optional(),
|
|
74
75
|
filled_amount: z.nullable(z.string()).optional(),
|
|
@@ -7,6 +7,7 @@ export * from "./compassapisdkerror.js";
|
|
|
7
7
|
export * from "./httpclienterrors.js";
|
|
8
8
|
export * from "./httpvalidationerror.js";
|
|
9
9
|
export * from "./mintpreparenotfoundresponseerror.js";
|
|
10
|
+
export * from "./onramperrorresponse.js";
|
|
10
11
|
export * from "./responsevalidationerror.js";
|
|
11
12
|
export * from "./sdkvalidationerror.js";
|
|
12
13
|
export * from "./tokenizedassetserrorresponse.js";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { CompassAPISDKError } from "./compassapisdkerror.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Standard error envelope returned by every non-2xx on-ramp response.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
*
|
|
13
|
+
* Surfaced in OpenAPI ``responses`` declarations so SDK consumers can decode
|
|
14
|
+
* failures uniformly without inspecting per-status-code shapes.
|
|
15
|
+
*/
|
|
16
|
+
export type OnrampErrorResponseData = {
|
|
17
|
+
/**
|
|
18
|
+
* Short human-readable error label (e.g. `Payment not found.`, `On-ramp provider unavailable`, `Identity verification required`).
|
|
19
|
+
*/
|
|
20
|
+
error: string;
|
|
21
|
+
/**
|
|
22
|
+
* Human-readable explanation.
|
|
23
|
+
*/
|
|
24
|
+
message: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Standard error envelope returned by every non-2xx on-ramp response.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
*
|
|
32
|
+
* Surfaced in OpenAPI ``responses`` declarations so SDK consumers can decode
|
|
33
|
+
* failures uniformly without inspecting per-status-code shapes.
|
|
34
|
+
*/
|
|
35
|
+
export class OnrampErrorResponse extends CompassAPISDKError {
|
|
36
|
+
/**
|
|
37
|
+
* Short human-readable error label (e.g. `Payment not found.`, `On-ramp provider unavailable`, `Identity verification required`).
|
|
38
|
+
*/
|
|
39
|
+
error: string;
|
|
40
|
+
|
|
41
|
+
/** The original data that was passed to this error instance. */
|
|
42
|
+
data$: OnrampErrorResponseData;
|
|
43
|
+
|
|
44
|
+
constructor(
|
|
45
|
+
err: OnrampErrorResponseData,
|
|
46
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
47
|
+
) {
|
|
48
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
49
|
+
super(message, httpMeta);
|
|
50
|
+
this.data$ = err;
|
|
51
|
+
this.error = err.error;
|
|
52
|
+
|
|
53
|
+
this.name = "OnrampErrorResponse";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const OnrampErrorResponse$inboundSchema: z.ZodType<
|
|
59
|
+
OnrampErrorResponse,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
unknown
|
|
62
|
+
> = z.object({
|
|
63
|
+
error: z.string(),
|
|
64
|
+
message: z.string(),
|
|
65
|
+
request$: z.instanceof(Request),
|
|
66
|
+
response$: z.instanceof(Response),
|
|
67
|
+
body$: z.string(),
|
|
68
|
+
})
|
|
69
|
+
.transform((v) => {
|
|
70
|
+
return new OnrampErrorResponse(v, {
|
|
71
|
+
request: v.request$,
|
|
72
|
+
response: v.response$,
|
|
73
|
+
body: v.body$,
|
|
74
|
+
});
|
|
75
|
+
});
|
|
@@ -54,6 +54,7 @@ export * from "./v2globalmarketsperpsactivity.js";
|
|
|
54
54
|
export * from "./v2globalmarketsperpscandles.js";
|
|
55
55
|
export * from "./v2globalmarketsperpsopportunities.js";
|
|
56
56
|
export * from "./v2globalmarketsperpspositions.js";
|
|
57
|
+
export * from "./v2onrampstatus.js";
|
|
57
58
|
export * from "./v2tokenizedassetsbalances.js";
|
|
58
59
|
export * from "./v2tokenizedassetsmarkets.js";
|
|
59
60
|
export * from "./v2tokenizedassetsmarketssymbol.js";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
|
|
8
|
+
export type V2OnrampStatusRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* The `payment_id` returned by `POST /v2/onramp/create`.
|
|
11
|
+
*/
|
|
12
|
+
paymentId: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type V2OnrampStatusRequest$Outbound = {
|
|
17
|
+
payment_id: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const V2OnrampStatusRequest$outboundSchema: z.ZodType<
|
|
22
|
+
V2OnrampStatusRequest$Outbound,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
V2OnrampStatusRequest
|
|
25
|
+
> = z.object({
|
|
26
|
+
paymentId: z.string(),
|
|
27
|
+
}).transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
paymentId: "payment_id",
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export function v2OnrampStatusRequestToJSON(
|
|
34
|
+
v2OnrampStatusRequest: V2OnrampStatusRequest,
|
|
35
|
+
): string {
|
|
36
|
+
return JSON.stringify(
|
|
37
|
+
V2OnrampStatusRequest$outboundSchema.parse(v2OnrampStatusRequest),
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { onrampOnrampCreate } from "../funcs/onrampOnrampCreate.js";
|
|
6
|
+
import { onrampOnrampQuote } from "../funcs/onrampOnrampQuote.js";
|
|
7
|
+
import { onrampOnrampStatus } from "../funcs/onrampOnrampStatus.js";
|
|
8
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import * as components from "../models/components/index.js";
|
|
10
|
+
import * as operations from "../models/operations/index.js";
|
|
11
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
12
|
+
|
|
13
|
+
export class Onramp extends ClientSDK {
|
|
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
|
+
async onrampQuote(
|
|
30
|
+
request: components.OnrampQuoteRequest,
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): Promise<components.OnrampQuote> {
|
|
33
|
+
return unwrapAsync(onrampOnrampQuote(
|
|
34
|
+
this,
|
|
35
|
+
request,
|
|
36
|
+
options,
|
|
37
|
+
));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Create a fiat on-ramp payment + get the checkout link
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* Create a fiat on-ramp payment and return the browser-checkout handoff.
|
|
45
|
+
*
|
|
46
|
+
* A fiat card + identity-verification flow can only render in a browser, so
|
|
47
|
+
* this endpoint returns a **`checkout_url`** (a Compass-hosted page) together
|
|
48
|
+
* with `payment_id`, the one-time-wallet `deposit_address`, an initial
|
|
49
|
+
* `status`, and a `user_instructions` string.
|
|
50
|
+
*
|
|
51
|
+
* **How to drive this (CLI / MCP agent / UI):**
|
|
52
|
+
*
|
|
53
|
+
* 1. **Present `checkout_url` to the user and open it in a browser.** It
|
|
54
|
+
* renders the card payment + identity verification and delivers USDC on
|
|
55
|
+
* Ethereum to the destination wallet. (An MCP agent cannot open a browser
|
|
56
|
+
* itself — show the link and ask the user to open it.)
|
|
57
|
+
* 2. **Poll `GET /v2/onramp/status?payment_id=...`** until `status` becomes
|
|
58
|
+
* `delivered` (or `failed`). `pending` = awaiting payment, `processing` =
|
|
59
|
+
* payment received and bridging/swapping to USDC.
|
|
60
|
+
* 3. Once `delivered`, the USDC is in the user's own wallet — continue with
|
|
61
|
+
* the tokenized buy.
|
|
62
|
+
*
|
|
63
|
+
* Funds are never held by Compass: the `deposit_address` is a one-time wallet
|
|
64
|
+
* owned solely by the user's wallet.
|
|
65
|
+
*/
|
|
66
|
+
async onrampCreate(
|
|
67
|
+
request: components.OnrampCreateRequest,
|
|
68
|
+
options?: RequestOptions,
|
|
69
|
+
): Promise<components.OnrampCreate> {
|
|
70
|
+
return unwrapAsync(onrampOnrampCreate(
|
|
71
|
+
this,
|
|
72
|
+
request,
|
|
73
|
+
options,
|
|
74
|
+
));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Get the status of a fiat on-ramp payment
|
|
79
|
+
*
|
|
80
|
+
* @remarks
|
|
81
|
+
* Get the current status of a fiat on-ramp payment.
|
|
82
|
+
*
|
|
83
|
+
* Poll this after `create` until `status` is `delivered`. The `status` field
|
|
84
|
+
* is one of:
|
|
85
|
+
*
|
|
86
|
+
* - `pending` — awaiting the card payment in the hosted checkout.
|
|
87
|
+
* - `processing` — payment received; bridging/swapping the proceeds to USDC.
|
|
88
|
+
* - `delivered` — USDC has been delivered to the destination wallet
|
|
89
|
+
* (`delivery_tx_hash` and `output_amount_delivered` are populated).
|
|
90
|
+
* - `failed` — the payment failed, expired, or was refunded.
|
|
91
|
+
*
|
|
92
|
+
* State is re-read live from the on-ramp provider on every call — Compass
|
|
93
|
+
* stores nothing of its own.
|
|
94
|
+
*/
|
|
95
|
+
async onrampStatus(
|
|
96
|
+
request: operations.V2OnrampStatusRequest,
|
|
97
|
+
options?: RequestOptions,
|
|
98
|
+
): Promise<components.OnrampStatus> {
|
|
99
|
+
return unwrapAsync(onrampOnrampStatus(
|
|
100
|
+
this,
|
|
101
|
+
request,
|
|
102
|
+
options,
|
|
103
|
+
));
|
|
104
|
+
}
|
|
105
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { Ethena } from "./ethena.js";
|
|
|
13
13
|
import { GasSponsorship } from "./gassponsorship.js";
|
|
14
14
|
import { GlobalMarketsPerps } from "./globalmarketsperps.js";
|
|
15
15
|
import { Morpho } from "./morpho.js";
|
|
16
|
+
import { Onramp } from "./onramp.js";
|
|
16
17
|
import { Pendle } from "./pendle.js";
|
|
17
18
|
import { Sky } from "./sky.js";
|
|
18
19
|
import { SmartAccount } from "./smartaccount.js";
|
|
@@ -126,4 +127,9 @@ export class CompassApiSDK extends ClientSDK {
|
|
|
126
127
|
get tokenizedAssets(): TokenizedAssets {
|
|
127
128
|
return (this._tokenizedAssets ??= new TokenizedAssets(this._options));
|
|
128
129
|
}
|
|
130
|
+
|
|
131
|
+
private _onramp?: Onramp;
|
|
132
|
+
get onramp(): Onramp {
|
|
133
|
+
return (this._onramp ??= new Onramp(this._options));
|
|
134
|
+
}
|
|
129
135
|
}
|