@compass-labs/api-sdk 0.5.64 → 0.5.66
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 +0 -2
- package/bin/mcp-server.js +113 -174
- package/bin/mcp-server.js.map +11 -13
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -3
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +2 -1
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -1
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/useroperation.d.ts +18 -0
- package/dist/commonjs/models/components/useroperation.d.ts.map +1 -1
- package/dist/commonjs/models/components/useroperation.js +26 -0
- package/dist/commonjs/models/components/useroperation.js.map +1 -1
- package/dist/commonjs/models/components/vaultdepositparams.d.ts +68 -0
- package/dist/commonjs/models/components/vaultdepositparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/vaultdepositparams.js +109 -0
- package/dist/commonjs/models/components/vaultdepositparams.js.map +1 -0
- package/dist/commonjs/models/components/vaultwithdrawparams.d.ts +44 -0
- package/dist/commonjs/models/components/vaultwithdrawparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/vaultwithdrawparams.js +86 -0
- package/dist/commonjs/models/components/vaultwithdrawparams.js.map +1 -0
- 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/universal.d.ts +0 -11
- package/dist/commonjs/sdk/universal.d.ts.map +1 -1
- package/dist/commonjs/sdk/universal.js +0 -14
- package/dist/commonjs/sdk/universal.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +1 -3
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +2 -1
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -1
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/useroperation.d.ts +18 -0
- package/dist/esm/models/components/useroperation.d.ts.map +1 -1
- package/dist/esm/models/components/useroperation.js +26 -0
- package/dist/esm/models/components/useroperation.js.map +1 -1
- package/dist/esm/models/components/vaultdepositparams.d.ts +68 -0
- package/dist/esm/models/components/vaultdepositparams.d.ts.map +1 -0
- package/dist/esm/models/components/vaultdepositparams.js +69 -0
- package/dist/esm/models/components/vaultdepositparams.js.map +1 -0
- package/dist/esm/models/components/vaultwithdrawparams.d.ts +44 -0
- package/dist/esm/models/components/vaultwithdrawparams.d.ts.map +1 -0
- package/dist/esm/models/components/vaultwithdrawparams.js +48 -0
- package/dist/esm/models/components/vaultwithdrawparams.js.map +1 -0
- 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/universal.d.ts +0 -11
- package/dist/esm/sdk/universal.d.ts.map +1 -1
- package/dist/esm/sdk/universal.js +0 -14
- package/dist/esm/sdk/universal.js.map +1 -1
- package/docs/sdks/universal/README.md +0 -75
- package/jsr.json +1 -1
- package/package.json +6 -6
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -3
- package/src/models/components/index.ts +2 -1
- package/src/models/components/useroperation.ts +60 -0
- package/src/models/components/vaultdepositparams.ts +151 -0
- package/src/models/components/vaultwithdrawparams.ts +98 -0
- package/src/models/operations/index.ts +0 -1
- package/src/sdk/universal.ts +0 -22
- package/dist/commonjs/funcs/universalVisualizePortfolio.d.ts +0 -23
- package/dist/commonjs/funcs/universalVisualizePortfolio.d.ts.map +0 -1
- package/dist/commonjs/funcs/universalVisualizePortfolio.js +0 -127
- package/dist/commonjs/funcs/universalVisualizePortfolio.js.map +0 -1
- package/dist/commonjs/mcp-server/tools/universalVisualizePortfolio.d.ts +0 -8
- package/dist/commonjs/mcp-server/tools/universalVisualizePortfolio.d.ts.map +0 -1
- package/dist/commonjs/mcp-server/tools/universalVisualizePortfolio.js +0 -68
- package/dist/commonjs/mcp-server/tools/universalVisualizePortfolio.js.map +0 -1
- package/dist/commonjs/models/components/image.d.ts +0 -32
- package/dist/commonjs/models/components/image.d.ts.map +0 -1
- package/dist/commonjs/models/components/image.js +0 -70
- package/dist/commonjs/models/components/image.js.map +0 -1
- package/dist/commonjs/models/operations/genericvisualizeportfolio.d.ts +0 -63
- package/dist/commonjs/models/operations/genericvisualizeportfolio.d.ts.map +0 -1
- package/dist/commonjs/models/operations/genericvisualizeportfolio.js +0 -91
- package/dist/commonjs/models/operations/genericvisualizeportfolio.js.map +0 -1
- package/dist/esm/funcs/universalVisualizePortfolio.d.ts +0 -23
- package/dist/esm/funcs/universalVisualizePortfolio.d.ts.map +0 -1
- package/dist/esm/funcs/universalVisualizePortfolio.js +0 -91
- package/dist/esm/funcs/universalVisualizePortfolio.js.map +0 -1
- package/dist/esm/mcp-server/tools/universalVisualizePortfolio.d.ts +0 -8
- package/dist/esm/mcp-server/tools/universalVisualizePortfolio.d.ts.map +0 -1
- package/dist/esm/mcp-server/tools/universalVisualizePortfolio.js +0 -32
- package/dist/esm/mcp-server/tools/universalVisualizePortfolio.js.map +0 -1
- package/dist/esm/models/components/image.d.ts +0 -32
- package/dist/esm/models/components/image.d.ts.map +0 -1
- package/dist/esm/models/components/image.js +0 -32
- package/dist/esm/models/components/image.js.map +0 -1
- package/dist/esm/models/operations/genericvisualizeportfolio.d.ts +0 -63
- package/dist/esm/models/operations/genericvisualizeportfolio.d.ts.map +0 -1
- package/dist/esm/models/operations/genericvisualizeportfolio.js +0 -53
- package/dist/esm/models/operations/genericvisualizeportfolio.js.map +0 -1
- package/src/funcs/universalVisualizePortfolio.ts +0 -180
- package/src/mcp-server/tools/universalVisualizePortfolio.ts +0 -41
- package/src/models/components/image.ts +0 -62
- package/src/models/operations/genericvisualizeportfolio.ts +0 -110
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import { encodeFormQuery } from "../lib/encodings.js";
|
|
5
|
-
import * as M from "../lib/matchers.js";
|
|
6
|
-
import { compactMap } from "../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../lib/schemas.js";
|
|
8
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
9
|
-
import { pathToFunc } from "../lib/url.js";
|
|
10
|
-
import * as components from "../models/components/index.js";
|
|
11
|
-
import * as errors from "../models/errors/index.js";
|
|
12
|
-
import * as operations from "../models/operations/index.js";
|
|
13
|
-
import { APIPromise } from "../types/async.js";
|
|
14
|
-
/**
|
|
15
|
-
* Visualize User Portfolio
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* Generate a visual representation of the token portfolio for a wallet address.
|
|
19
|
-
*
|
|
20
|
-
* The response is an SVG image of a pie chart depicting the relative distribution of
|
|
21
|
-
* tokens held, colored and labeled with token symbols, percentages and token values in
|
|
22
|
-
* USD.
|
|
23
|
-
*/
|
|
24
|
-
export function universalVisualizePortfolio(client, request, options) {
|
|
25
|
-
return new APIPromise($do(client, request, options));
|
|
26
|
-
}
|
|
27
|
-
async function $do(client, request, options) {
|
|
28
|
-
const parsed = safeParse(request, (value) => operations.GenericVisualizePortfolioRequest$outboundSchema.parse(value), "Input validation failed");
|
|
29
|
-
if (!parsed.ok) {
|
|
30
|
-
return [parsed, { status: "invalid" }];
|
|
31
|
-
}
|
|
32
|
-
const payload = parsed.value;
|
|
33
|
-
const body = null;
|
|
34
|
-
const path = pathToFunc("/v0/generic/visualize_portfolio/get")();
|
|
35
|
-
const query = encodeFormQuery({
|
|
36
|
-
"chain": payload.chain,
|
|
37
|
-
"user": payload.user,
|
|
38
|
-
});
|
|
39
|
-
const headers = new Headers(compactMap({
|
|
40
|
-
Accept: "application/json",
|
|
41
|
-
}));
|
|
42
|
-
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
43
|
-
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
44
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
45
|
-
const context = {
|
|
46
|
-
options: client._options,
|
|
47
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
48
|
-
operationID: "generic_visualize_portfolio",
|
|
49
|
-
oAuth2Scopes: [],
|
|
50
|
-
resolvedSecurity: requestSecurity,
|
|
51
|
-
securitySource: client._options.apiKeyAuth,
|
|
52
|
-
retryConfig: options?.retries
|
|
53
|
-
|| client._options.retryConfig
|
|
54
|
-
|| { strategy: "none" },
|
|
55
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
56
|
-
};
|
|
57
|
-
const requestRes = client._createRequest(context, {
|
|
58
|
-
security: requestSecurity,
|
|
59
|
-
method: "GET",
|
|
60
|
-
baseURL: options?.serverURL,
|
|
61
|
-
path: path,
|
|
62
|
-
headers: headers,
|
|
63
|
-
query: query,
|
|
64
|
-
body: body,
|
|
65
|
-
userAgent: client._options.userAgent,
|
|
66
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
67
|
-
}, options);
|
|
68
|
-
if (!requestRes.ok) {
|
|
69
|
-
return [requestRes, { status: "invalid" }];
|
|
70
|
-
}
|
|
71
|
-
const req = requestRes.value;
|
|
72
|
-
const doResult = await client._do(req, {
|
|
73
|
-
context,
|
|
74
|
-
errorCodes: ["422", "4XX", "5XX"],
|
|
75
|
-
retryConfig: context.retryConfig,
|
|
76
|
-
retryCodes: context.retryCodes,
|
|
77
|
-
});
|
|
78
|
-
if (!doResult.ok) {
|
|
79
|
-
return [doResult, { status: "request-error", request: req }];
|
|
80
|
-
}
|
|
81
|
-
const response = doResult.value;
|
|
82
|
-
const responseFields = {
|
|
83
|
-
HttpMeta: { Response: response, Request: req },
|
|
84
|
-
};
|
|
85
|
-
const [result] = await M.match(M.json(200, components.Image$inboundSchema), M.jsonErr(422, errors.HTTPValidationError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
86
|
-
if (!result.ok) {
|
|
87
|
-
return [result, { status: "complete", request: req, response }];
|
|
88
|
-
}
|
|
89
|
-
return [result, { status: "complete", request: req, response }];
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingURL=universalVisualizePortfolio.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"universalVisualizePortfolio.js","sourceRoot":"","sources":["../../../src/funcs/universalVisualizePortfolio.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,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,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAS5D,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAGpD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;;;;;G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/B,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAY5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,mBAAmB,CAAC,EAC3C,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,iCAAiC,CAAC,EACxD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,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,8 +0,0 @@
|
|
|
1
|
-
import * as operations from "../../models/operations/index.js";
|
|
2
|
-
import { ToolDefinition } from "../tools.js";
|
|
3
|
-
declare const args: {
|
|
4
|
-
request: import("zod").ZodType<operations.GenericVisualizePortfolioRequest, import("zod").ZodTypeDef, unknown>;
|
|
5
|
-
};
|
|
6
|
-
export declare const tool$universalVisualizePortfolio: ToolDefinition<typeof args>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=universalVisualizePortfolio.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"universalVisualizePortfolio.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/universalVisualizePortfolio.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,cAAc,CAAC,OAAO,IAAI,CA4BxE,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import { universalVisualizePortfolio } from "../../funcs/universalVisualizePortfolio.js";
|
|
5
|
-
import * as operations from "../../models/operations/index.js";
|
|
6
|
-
import { formatResult } from "../tools.js";
|
|
7
|
-
const args = {
|
|
8
|
-
request: operations.GenericVisualizePortfolioRequest$inboundSchema,
|
|
9
|
-
};
|
|
10
|
-
export const tool$universalVisualizePortfolio = {
|
|
11
|
-
name: "universal-visualize-portfolio",
|
|
12
|
-
description: `Visualize User Portfolio
|
|
13
|
-
|
|
14
|
-
Generate a visual representation of the token portfolio for a wallet address.
|
|
15
|
-
|
|
16
|
-
The response is an SVG image of a pie chart depicting the relative distribution of
|
|
17
|
-
tokens held, colored and labeled with token symbols, percentages and token values in
|
|
18
|
-
USD.`,
|
|
19
|
-
args,
|
|
20
|
-
tool: async (client, args, ctx) => {
|
|
21
|
-
const [result, apiCall] = await universalVisualizePortfolio(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
22
|
-
if (!result.ok) {
|
|
23
|
-
return {
|
|
24
|
-
content: [{ type: "text", text: result.error.message }],
|
|
25
|
-
isError: true,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
const value = result.value;
|
|
29
|
-
return formatResult(value, apiCall);
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=universalVisualizePortfolio.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"universalVisualizePortfolio.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/universalVisualizePortfolio.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,8CAA8C;CACnE,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAgC;IAC3E,IAAI,EAAE,+BAA+B;IACrC,WAAW,EAAE;;;;;;KAMV;IACH,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,2BAA2B,CACzD,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CACzC,CAAC,QAAQ,EAAE,CAAC;QAEb,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBACvD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAE3B,OAAO,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
export type Image = {
|
|
5
|
-
/**
|
|
6
|
-
* Base64 encoded SVG image
|
|
7
|
-
*/
|
|
8
|
-
image: string;
|
|
9
|
-
};
|
|
10
|
-
/** @internal */
|
|
11
|
-
export declare const Image$inboundSchema: z.ZodType<Image, z.ZodTypeDef, unknown>;
|
|
12
|
-
/** @internal */
|
|
13
|
-
export type Image$Outbound = {
|
|
14
|
-
image: string;
|
|
15
|
-
};
|
|
16
|
-
/** @internal */
|
|
17
|
-
export declare const Image$outboundSchema: z.ZodType<Image$Outbound, z.ZodTypeDef, Image>;
|
|
18
|
-
/**
|
|
19
|
-
* @internal
|
|
20
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
21
|
-
*/
|
|
22
|
-
export declare namespace Image$ {
|
|
23
|
-
/** @deprecated use `Image$inboundSchema` instead. */
|
|
24
|
-
const inboundSchema: z.ZodType<Image, z.ZodTypeDef, unknown>;
|
|
25
|
-
/** @deprecated use `Image$outboundSchema` instead. */
|
|
26
|
-
const outboundSchema: z.ZodType<Image$Outbound, z.ZodTypeDef, Image>;
|
|
27
|
-
/** @deprecated use `Image$Outbound` instead. */
|
|
28
|
-
type Outbound = Image$Outbound;
|
|
29
|
-
}
|
|
30
|
-
export declare function imageToJSON(image: Image): string;
|
|
31
|
-
export declare function imageFromJSON(jsonString: string): SafeParseResult<Image, SDKValidationError>;
|
|
32
|
-
//# sourceMappingURL=image.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../src/models/components/image.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAGpE,CAAC;AAEL,gBAAgB;AAChB,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAC1C,cAAc,EACd,CAAC,CAAC,UAAU,EACZ,KAAK,CAGL,CAAC;AAEH;;;GAGG;AACH,yBAAiB,MAAM,CAAC;IACtB,qDAAqD;IAC9C,MAAM,aAAa,yCAAsB,CAAC;IACjD,sDAAsD;IAC/C,MAAM,cAAc,gDAAuB,CAAC;IACnD,gDAAgD;IAChD,KAAY,QAAQ,GAAG,cAAc,CAAC;CACvC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAEhD;AAED,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAM5C"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod";
|
|
5
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
6
|
-
/** @internal */
|
|
7
|
-
export const Image$inboundSchema = z
|
|
8
|
-
.object({
|
|
9
|
-
image: z.string(),
|
|
10
|
-
});
|
|
11
|
-
/** @internal */
|
|
12
|
-
export const Image$outboundSchema = z.object({
|
|
13
|
-
image: z.string(),
|
|
14
|
-
});
|
|
15
|
-
/**
|
|
16
|
-
* @internal
|
|
17
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
18
|
-
*/
|
|
19
|
-
export var Image$;
|
|
20
|
-
(function (Image$) {
|
|
21
|
-
/** @deprecated use `Image$inboundSchema` instead. */
|
|
22
|
-
Image$.inboundSchema = Image$inboundSchema;
|
|
23
|
-
/** @deprecated use `Image$outboundSchema` instead. */
|
|
24
|
-
Image$.outboundSchema = Image$outboundSchema;
|
|
25
|
-
})(Image$ || (Image$ = {}));
|
|
26
|
-
export function imageToJSON(image) {
|
|
27
|
-
return JSON.stringify(Image$outboundSchema.parse(image));
|
|
28
|
-
}
|
|
29
|
-
export function imageFromJSON(jsonString) {
|
|
30
|
-
return safeParse(jsonString, (x) => Image$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Image' from JSON`);
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=image.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../../../src/models/components/image.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAWjD,gBAAgB;AAChB,MAAM,CAAC,MAAM,mBAAmB,GAA4C,CAAC;KAC1E,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAOL,gBAAgB;AAChB,MAAM,CAAC,MAAM,oBAAoB,GAI7B,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,MAAM,CAOtB;AAPD,WAAiB,MAAM;IACrB,qDAAqD;IACxC,oBAAa,GAAG,mBAAmB,CAAC;IACjD,sDAAsD;IACzC,qBAAc,GAAG,oBAAoB,CAAC;AAGrD,CAAC,EAPgB,MAAM,KAAN,MAAM,QAOtB;AAED,MAAM,UAAU,WAAW,CAAC,KAAY;IACtC,OAAO,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC/C,mCAAmC,CACpC,CAAC;AACJ,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
3
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
4
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
-
export declare const GenericVisualizePortfolioChain: {
|
|
6
|
-
readonly ArbitrumMainnet: "arbitrum:mainnet";
|
|
7
|
-
readonly BaseMainnet: "base:mainnet";
|
|
8
|
-
readonly EthereumMainnet: "ethereum:mainnet";
|
|
9
|
-
};
|
|
10
|
-
export type GenericVisualizePortfolioChain = ClosedEnum<typeof GenericVisualizePortfolioChain>;
|
|
11
|
-
export type GenericVisualizePortfolioRequest = {
|
|
12
|
-
chain?: GenericVisualizePortfolioChain | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* The user to get portfolio for.
|
|
15
|
-
*/
|
|
16
|
-
user?: string | undefined;
|
|
17
|
-
};
|
|
18
|
-
/** @internal */
|
|
19
|
-
export declare const GenericVisualizePortfolioChain$inboundSchema: z.ZodNativeEnum<typeof GenericVisualizePortfolioChain>;
|
|
20
|
-
/** @internal */
|
|
21
|
-
export declare const GenericVisualizePortfolioChain$outboundSchema: z.ZodNativeEnum<typeof GenericVisualizePortfolioChain>;
|
|
22
|
-
/**
|
|
23
|
-
* @internal
|
|
24
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
25
|
-
*/
|
|
26
|
-
export declare namespace GenericVisualizePortfolioChain$ {
|
|
27
|
-
/** @deprecated use `GenericVisualizePortfolioChain$inboundSchema` instead. */
|
|
28
|
-
const inboundSchema: z.ZodNativeEnum<{
|
|
29
|
-
readonly ArbitrumMainnet: "arbitrum:mainnet";
|
|
30
|
-
readonly BaseMainnet: "base:mainnet";
|
|
31
|
-
readonly EthereumMainnet: "ethereum:mainnet";
|
|
32
|
-
}>;
|
|
33
|
-
/** @deprecated use `GenericVisualizePortfolioChain$outboundSchema` instead. */
|
|
34
|
-
const outboundSchema: z.ZodNativeEnum<{
|
|
35
|
-
readonly ArbitrumMainnet: "arbitrum:mainnet";
|
|
36
|
-
readonly BaseMainnet: "base:mainnet";
|
|
37
|
-
readonly EthereumMainnet: "ethereum:mainnet";
|
|
38
|
-
}>;
|
|
39
|
-
}
|
|
40
|
-
/** @internal */
|
|
41
|
-
export declare const GenericVisualizePortfolioRequest$inboundSchema: z.ZodType<GenericVisualizePortfolioRequest, z.ZodTypeDef, unknown>;
|
|
42
|
-
/** @internal */
|
|
43
|
-
export type GenericVisualizePortfolioRequest$Outbound = {
|
|
44
|
-
chain: string;
|
|
45
|
-
user: string;
|
|
46
|
-
};
|
|
47
|
-
/** @internal */
|
|
48
|
-
export declare const GenericVisualizePortfolioRequest$outboundSchema: z.ZodType<GenericVisualizePortfolioRequest$Outbound, z.ZodTypeDef, GenericVisualizePortfolioRequest>;
|
|
49
|
-
/**
|
|
50
|
-
* @internal
|
|
51
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
|
-
*/
|
|
53
|
-
export declare namespace GenericVisualizePortfolioRequest$ {
|
|
54
|
-
/** @deprecated use `GenericVisualizePortfolioRequest$inboundSchema` instead. */
|
|
55
|
-
const inboundSchema: z.ZodType<GenericVisualizePortfolioRequest, z.ZodTypeDef, unknown>;
|
|
56
|
-
/** @deprecated use `GenericVisualizePortfolioRequest$outboundSchema` instead. */
|
|
57
|
-
const outboundSchema: z.ZodType<GenericVisualizePortfolioRequest$Outbound, z.ZodTypeDef, GenericVisualizePortfolioRequest>;
|
|
58
|
-
/** @deprecated use `GenericVisualizePortfolioRequest$Outbound` instead. */
|
|
59
|
-
type Outbound = GenericVisualizePortfolioRequest$Outbound;
|
|
60
|
-
}
|
|
61
|
-
export declare function genericVisualizePortfolioRequestToJSON(genericVisualizePortfolioRequest: GenericVisualizePortfolioRequest): string;
|
|
62
|
-
export declare function genericVisualizePortfolioRequestFromJSON(jsonString: string): SafeParseResult<GenericVisualizePortfolioRequest, SDKValidationError>;
|
|
63
|
-
//# sourceMappingURL=genericvisualizeportfolio.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"genericvisualizeportfolio.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/genericvisualizeportfolio.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,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,eAAO,MAAM,8BAA8B;;;;CAIjC,CAAC;AACX,MAAM,MAAM,8BAA8B,GAAG,UAAU,CACrD,OAAO,8BAA8B,CACtC,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,KAAK,CAAC,EAAE,8BAA8B,GAAG,SAAS,CAAC;IACnD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4CAA4C,EAAE,CAAC,CAAC,aAAa,CACxE,OAAO,8BAA8B,CACS,CAAC;AAEjD,gBAAgB;AAChB,eAAO,MAAM,6CAA6C,EAAE,CAAC,CAAC,aAAa,CACzE,OAAO,8BAA8B,CACS,CAAC;AAEjD;;;GAGG;AACH,yBAAiB,+BAA+B,CAAC;IAC/C,8EAA8E;IACvE,MAAM,aAAa;;;;MAA+C,CAAC;IAC1E,+EAA+E;IACxE,MAAM,cAAc;;;;MAAgD,CAAC;CAC7E;AAED,gBAAgB;AAChB,eAAO,MAAM,8CAA8C,EAAE,CAAC,CAAC,OAAO,CACpE,gCAAgC,EAChC,CAAC,CAAC,UAAU,EACZ,OAAO,CAMP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,yCAAyC,GAAG;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,+CAA+C,EAAE,CAAC,CAAC,OAAO,CACrE,yCAAyC,EACzC,CAAC,CAAC,UAAU,EACZ,gCAAgC,CAMhC,CAAC;AAEH;;;GAGG;AACH,yBAAiB,iCAAiC,CAAC;IACjD,gFAAgF;IACzE,MAAM,aAAa,oEAAiD,CAAC;IAC5E,iFAAiF;IAC1E,MAAM,cAAc,sGAAkD,CAAC;IAC9E,2EAA2E;IAC3E,KAAY,QAAQ,GAAG,yCAAyC,CAAC;CAClE;AAED,wBAAgB,sCAAsC,CACpD,gCAAgC,EAAE,gCAAgC,GACjE,MAAM,CAMR;AAED,wBAAgB,wCAAwC,CACtD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,gCAAgC,EAAE,kBAAkB,CAAC,CAMvE"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod";
|
|
5
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
6
|
-
export const GenericVisualizePortfolioChain = {
|
|
7
|
-
ArbitrumMainnet: "arbitrum:mainnet",
|
|
8
|
-
BaseMainnet: "base:mainnet",
|
|
9
|
-
EthereumMainnet: "ethereum:mainnet",
|
|
10
|
-
};
|
|
11
|
-
/** @internal */
|
|
12
|
-
export const GenericVisualizePortfolioChain$inboundSchema = z.nativeEnum(GenericVisualizePortfolioChain);
|
|
13
|
-
/** @internal */
|
|
14
|
-
export const GenericVisualizePortfolioChain$outboundSchema = GenericVisualizePortfolioChain$inboundSchema;
|
|
15
|
-
/**
|
|
16
|
-
* @internal
|
|
17
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
18
|
-
*/
|
|
19
|
-
export var GenericVisualizePortfolioChain$;
|
|
20
|
-
(function (GenericVisualizePortfolioChain$) {
|
|
21
|
-
/** @deprecated use `GenericVisualizePortfolioChain$inboundSchema` instead. */
|
|
22
|
-
GenericVisualizePortfolioChain$.inboundSchema = GenericVisualizePortfolioChain$inboundSchema;
|
|
23
|
-
/** @deprecated use `GenericVisualizePortfolioChain$outboundSchema` instead. */
|
|
24
|
-
GenericVisualizePortfolioChain$.outboundSchema = GenericVisualizePortfolioChain$outboundSchema;
|
|
25
|
-
})(GenericVisualizePortfolioChain$ || (GenericVisualizePortfolioChain$ = {}));
|
|
26
|
-
/** @internal */
|
|
27
|
-
export const GenericVisualizePortfolioRequest$inboundSchema = z.object({
|
|
28
|
-
chain: GenericVisualizePortfolioChain$inboundSchema.default("arbitrum:mainnet"),
|
|
29
|
-
user: z.string().default("0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"),
|
|
30
|
-
});
|
|
31
|
-
/** @internal */
|
|
32
|
-
export const GenericVisualizePortfolioRequest$outboundSchema = z.object({
|
|
33
|
-
chain: GenericVisualizePortfolioChain$outboundSchema.default("arbitrum:mainnet"),
|
|
34
|
-
user: z.string().default("0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"),
|
|
35
|
-
});
|
|
36
|
-
/**
|
|
37
|
-
* @internal
|
|
38
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
39
|
-
*/
|
|
40
|
-
export var GenericVisualizePortfolioRequest$;
|
|
41
|
-
(function (GenericVisualizePortfolioRequest$) {
|
|
42
|
-
/** @deprecated use `GenericVisualizePortfolioRequest$inboundSchema` instead. */
|
|
43
|
-
GenericVisualizePortfolioRequest$.inboundSchema = GenericVisualizePortfolioRequest$inboundSchema;
|
|
44
|
-
/** @deprecated use `GenericVisualizePortfolioRequest$outboundSchema` instead. */
|
|
45
|
-
GenericVisualizePortfolioRequest$.outboundSchema = GenericVisualizePortfolioRequest$outboundSchema;
|
|
46
|
-
})(GenericVisualizePortfolioRequest$ || (GenericVisualizePortfolioRequest$ = {}));
|
|
47
|
-
export function genericVisualizePortfolioRequestToJSON(genericVisualizePortfolioRequest) {
|
|
48
|
-
return JSON.stringify(GenericVisualizePortfolioRequest$outboundSchema.parse(genericVisualizePortfolioRequest));
|
|
49
|
-
}
|
|
50
|
-
export function genericVisualizePortfolioRequestFromJSON(jsonString) {
|
|
51
|
-
return safeParse(jsonString, (x) => GenericVisualizePortfolioRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GenericVisualizePortfolioRequest' from JSON`);
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=genericvisualizeportfolio.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"genericvisualizeportfolio.js","sourceRoot":"","sources":["../../../../src/models/operations/genericvisualizeportfolio.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAKjD,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,eAAe,EAAE,kBAAkB;IACnC,WAAW,EAAE,cAAc;IAC3B,eAAe,EAAE,kBAAkB;CAC3B,CAAC;AAaX,gBAAgB;AAChB,MAAM,CAAC,MAAM,4CAA4C,GAErD,CAAC,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC;AAEjD,gBAAgB;AAChB,MAAM,CAAC,MAAM,6CAA6C,GA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8D,CAC/D,CAAC;AACJ,CAAC"}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { CompassApiSDKCore } from "../core.js";
|
|
6
|
-
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { compactMap } from "../lib/primitives.js";
|
|
9
|
-
import { safeParse } from "../lib/schemas.js";
|
|
10
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import * as components from "../models/components/index.js";
|
|
14
|
-
import { CompassAPISDKError } from "../models/errors/compassapisdkerror.js";
|
|
15
|
-
import {
|
|
16
|
-
ConnectionError,
|
|
17
|
-
InvalidRequestError,
|
|
18
|
-
RequestAbortedError,
|
|
19
|
-
RequestTimeoutError,
|
|
20
|
-
UnexpectedClientError,
|
|
21
|
-
} from "../models/errors/httpclienterrors.js";
|
|
22
|
-
import * as errors from "../models/errors/index.js";
|
|
23
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
-
import * as operations from "../models/operations/index.js";
|
|
26
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
-
import { Result } from "../types/fp.js";
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Visualize User Portfolio
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Generate a visual representation of the token portfolio for a wallet address.
|
|
34
|
-
*
|
|
35
|
-
* The response is an SVG image of a pie chart depicting the relative distribution of
|
|
36
|
-
* tokens held, colored and labeled with token symbols, percentages and token values in
|
|
37
|
-
* USD.
|
|
38
|
-
*/
|
|
39
|
-
export function universalVisualizePortfolio(
|
|
40
|
-
client: CompassApiSDKCore,
|
|
41
|
-
request: operations.GenericVisualizePortfolioRequest,
|
|
42
|
-
options?: RequestOptions,
|
|
43
|
-
): APIPromise<
|
|
44
|
-
Result<
|
|
45
|
-
components.Image,
|
|
46
|
-
| errors.HTTPValidationError
|
|
47
|
-
| CompassAPISDKError
|
|
48
|
-
| ResponseValidationError
|
|
49
|
-
| ConnectionError
|
|
50
|
-
| RequestAbortedError
|
|
51
|
-
| RequestTimeoutError
|
|
52
|
-
| InvalidRequestError
|
|
53
|
-
| UnexpectedClientError
|
|
54
|
-
| SDKValidationError
|
|
55
|
-
>
|
|
56
|
-
> {
|
|
57
|
-
return new APIPromise($do(
|
|
58
|
-
client,
|
|
59
|
-
request,
|
|
60
|
-
options,
|
|
61
|
-
));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
async function $do(
|
|
65
|
-
client: CompassApiSDKCore,
|
|
66
|
-
request: operations.GenericVisualizePortfolioRequest,
|
|
67
|
-
options?: RequestOptions,
|
|
68
|
-
): Promise<
|
|
69
|
-
[
|
|
70
|
-
Result<
|
|
71
|
-
components.Image,
|
|
72
|
-
| errors.HTTPValidationError
|
|
73
|
-
| CompassAPISDKError
|
|
74
|
-
| ResponseValidationError
|
|
75
|
-
| ConnectionError
|
|
76
|
-
| RequestAbortedError
|
|
77
|
-
| RequestTimeoutError
|
|
78
|
-
| InvalidRequestError
|
|
79
|
-
| UnexpectedClientError
|
|
80
|
-
| SDKValidationError
|
|
81
|
-
>,
|
|
82
|
-
APICall,
|
|
83
|
-
]
|
|
84
|
-
> {
|
|
85
|
-
const parsed = safeParse(
|
|
86
|
-
request,
|
|
87
|
-
(value) =>
|
|
88
|
-
operations.GenericVisualizePortfolioRequest$outboundSchema.parse(value),
|
|
89
|
-
"Input validation failed",
|
|
90
|
-
);
|
|
91
|
-
if (!parsed.ok) {
|
|
92
|
-
return [parsed, { status: "invalid" }];
|
|
93
|
-
}
|
|
94
|
-
const payload = parsed.value;
|
|
95
|
-
const body = null;
|
|
96
|
-
|
|
97
|
-
const path = pathToFunc("/v0/generic/visualize_portfolio/get")();
|
|
98
|
-
|
|
99
|
-
const query = encodeFormQuery({
|
|
100
|
-
"chain": payload.chain,
|
|
101
|
-
"user": payload.user,
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
const headers = new Headers(compactMap({
|
|
105
|
-
Accept: "application/json",
|
|
106
|
-
}));
|
|
107
|
-
|
|
108
|
-
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
109
|
-
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
110
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
111
|
-
|
|
112
|
-
const context = {
|
|
113
|
-
options: client._options,
|
|
114
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
115
|
-
operationID: "generic_visualize_portfolio",
|
|
116
|
-
oAuth2Scopes: [],
|
|
117
|
-
|
|
118
|
-
resolvedSecurity: requestSecurity,
|
|
119
|
-
|
|
120
|
-
securitySource: client._options.apiKeyAuth,
|
|
121
|
-
retryConfig: options?.retries
|
|
122
|
-
|| client._options.retryConfig
|
|
123
|
-
|| { strategy: "none" },
|
|
124
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
const requestRes = client._createRequest(context, {
|
|
128
|
-
security: requestSecurity,
|
|
129
|
-
method: "GET",
|
|
130
|
-
baseURL: options?.serverURL,
|
|
131
|
-
path: path,
|
|
132
|
-
headers: headers,
|
|
133
|
-
query: query,
|
|
134
|
-
body: body,
|
|
135
|
-
userAgent: client._options.userAgent,
|
|
136
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
137
|
-
}, options);
|
|
138
|
-
if (!requestRes.ok) {
|
|
139
|
-
return [requestRes, { status: "invalid" }];
|
|
140
|
-
}
|
|
141
|
-
const req = requestRes.value;
|
|
142
|
-
|
|
143
|
-
const doResult = await client._do(req, {
|
|
144
|
-
context,
|
|
145
|
-
errorCodes: ["422", "4XX", "5XX"],
|
|
146
|
-
retryConfig: context.retryConfig,
|
|
147
|
-
retryCodes: context.retryCodes,
|
|
148
|
-
});
|
|
149
|
-
if (!doResult.ok) {
|
|
150
|
-
return [doResult, { status: "request-error", request: req }];
|
|
151
|
-
}
|
|
152
|
-
const response = doResult.value;
|
|
153
|
-
|
|
154
|
-
const responseFields = {
|
|
155
|
-
HttpMeta: { Response: response, Request: req },
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
const [result] = await M.match<
|
|
159
|
-
components.Image,
|
|
160
|
-
| errors.HTTPValidationError
|
|
161
|
-
| CompassAPISDKError
|
|
162
|
-
| ResponseValidationError
|
|
163
|
-
| ConnectionError
|
|
164
|
-
| RequestAbortedError
|
|
165
|
-
| RequestTimeoutError
|
|
166
|
-
| InvalidRequestError
|
|
167
|
-
| UnexpectedClientError
|
|
168
|
-
| SDKValidationError
|
|
169
|
-
>(
|
|
170
|
-
M.json(200, components.Image$inboundSchema),
|
|
171
|
-
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
172
|
-
M.fail("4XX"),
|
|
173
|
-
M.fail("5XX"),
|
|
174
|
-
)(response, req, { extraFields: responseFields });
|
|
175
|
-
if (!result.ok) {
|
|
176
|
-
return [result, { status: "complete", request: req, response }];
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return [result, { status: "complete", request: req, response }];
|
|
180
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { universalVisualizePortfolio } from "../../funcs/universalVisualizePortfolio.js";
|
|
6
|
-
import * as operations from "../../models/operations/index.js";
|
|
7
|
-
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
-
|
|
9
|
-
const args = {
|
|
10
|
-
request: operations.GenericVisualizePortfolioRequest$inboundSchema,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const tool$universalVisualizePortfolio: ToolDefinition<typeof args> = {
|
|
14
|
-
name: "universal-visualize-portfolio",
|
|
15
|
-
description: `Visualize User Portfolio
|
|
16
|
-
|
|
17
|
-
Generate a visual representation of the token portfolio for a wallet address.
|
|
18
|
-
|
|
19
|
-
The response is an SVG image of a pie chart depicting the relative distribution of
|
|
20
|
-
tokens held, colored and labeled with token symbols, percentages and token values in
|
|
21
|
-
USD.`,
|
|
22
|
-
args,
|
|
23
|
-
tool: async (client, args, ctx) => {
|
|
24
|
-
const [result, apiCall] = await universalVisualizePortfolio(
|
|
25
|
-
client,
|
|
26
|
-
args.request,
|
|
27
|
-
{ fetchOptions: { signal: ctx.signal } },
|
|
28
|
-
).$inspect();
|
|
29
|
-
|
|
30
|
-
if (!result.ok) {
|
|
31
|
-
return {
|
|
32
|
-
content: [{ type: "text", text: result.error.message }],
|
|
33
|
-
isError: true,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const value = result.value;
|
|
38
|
-
|
|
39
|
-
return formatResult(value, apiCall);
|
|
40
|
-
},
|
|
41
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
-
|
|
10
|
-
export type Image = {
|
|
11
|
-
/**
|
|
12
|
-
* Base64 encoded SVG image
|
|
13
|
-
*/
|
|
14
|
-
image: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/** @internal */
|
|
18
|
-
export const Image$inboundSchema: z.ZodType<Image, z.ZodTypeDef, unknown> = z
|
|
19
|
-
.object({
|
|
20
|
-
image: z.string(),
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
/** @internal */
|
|
24
|
-
export type Image$Outbound = {
|
|
25
|
-
image: string;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/** @internal */
|
|
29
|
-
export const Image$outboundSchema: z.ZodType<
|
|
30
|
-
Image$Outbound,
|
|
31
|
-
z.ZodTypeDef,
|
|
32
|
-
Image
|
|
33
|
-
> = z.object({
|
|
34
|
-
image: z.string(),
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @internal
|
|
39
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
40
|
-
*/
|
|
41
|
-
export namespace Image$ {
|
|
42
|
-
/** @deprecated use `Image$inboundSchema` instead. */
|
|
43
|
-
export const inboundSchema = Image$inboundSchema;
|
|
44
|
-
/** @deprecated use `Image$outboundSchema` instead. */
|
|
45
|
-
export const outboundSchema = Image$outboundSchema;
|
|
46
|
-
/** @deprecated use `Image$Outbound` instead. */
|
|
47
|
-
export type Outbound = Image$Outbound;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export function imageToJSON(image: Image): string {
|
|
51
|
-
return JSON.stringify(Image$outboundSchema.parse(image));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function imageFromJSON(
|
|
55
|
-
jsonString: string,
|
|
56
|
-
): SafeParseResult<Image, SDKValidationError> {
|
|
57
|
-
return safeParse(
|
|
58
|
-
jsonString,
|
|
59
|
-
(x) => Image$inboundSchema.parse(JSON.parse(x)),
|
|
60
|
-
`Failed to parse 'Image' from JSON`,
|
|
61
|
-
);
|
|
62
|
-
}
|