@upshiftfinance/config 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +52 -2
  3. package/lib/config.d.ts +44 -0
  4. package/lib/config.js +80 -0
  5. package/lib/env.d.ts +3 -0
  6. package/lib/env.js +34 -0
  7. package/lib/errors.d.ts +6 -0
  8. package/lib/errors.js +15 -0
  9. package/lib/index.d.ts +11 -0
  10. package/lib/index.js +51 -0
  11. package/lib/keystore.d.ts +37 -0
  12. package/lib/keystore.js +179 -0
  13. package/lib/paths.d.ts +6 -0
  14. package/lib/paths.js +34 -0
  15. package/lib/precedence.d.ts +11 -0
  16. package/lib/precedence.js +70 -0
  17. package/lib/profile.d.ts +26 -0
  18. package/lib/profile.js +65 -0
  19. package/lib/schemas/activity.d.ts +569 -0
  20. package/lib/schemas/activity.js +67 -0
  21. package/lib/schemas/curator.d.ts +29 -0
  22. package/lib/schemas/curator.js +19 -0
  23. package/lib/schemas/dashboard.d.ts +12 -0
  24. package/lib/schemas/dashboard.js +11 -0
  25. package/lib/schemas/data.d.ts +629 -0
  26. package/lib/schemas/data.js +116 -0
  27. package/lib/schemas/envelope.d.ts +155 -0
  28. package/lib/schemas/envelope.js +34 -0
  29. package/lib/schemas/governance.d.ts +58 -0
  30. package/lib/schemas/governance.js +31 -0
  31. package/lib/schemas/index.d.ts +15 -0
  32. package/lib/schemas/index.js +32 -0
  33. package/lib/schemas/layerzero.d.ts +26 -0
  34. package/lib/schemas/layerzero.js +19 -0
  35. package/lib/schemas/meta.d.ts +115 -0
  36. package/lib/schemas/meta.js +34 -0
  37. package/lib/schemas/otc.d.ts +23 -0
  38. package/lib/schemas/otc.js +17 -0
  39. package/lib/schemas/reads.d.ts +79 -0
  40. package/lib/schemas/reads.js +46 -0
  41. package/lib/schemas/risk.d.ts +46 -0
  42. package/lib/schemas/risk.js +27 -0
  43. package/lib/schemas/subaccounts.d.ts +112 -0
  44. package/lib/schemas/subaccounts.js +64 -0
  45. package/lib/schemas/triage.d.ts +21 -0
  46. package/lib/schemas/triage.js +14 -0
  47. package/lib/schemas/user.d.ts +133 -0
  48. package/lib/schemas/user.js +48 -0
  49. package/lib/schemas/vault.d.ts +274 -0
  50. package/lib/schemas/vault.js +112 -0
  51. package/lib/sdk.d.ts +14 -0
  52. package/lib/sdk.js +114 -0
  53. package/lib/session.d.ts +8 -0
  54. package/lib/session.js +76 -0
  55. package/lib/vaults.d.ts +8 -0
  56. package/lib/vaults.js +44 -0
  57. package/package.json +52 -3
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OpsRedemptionsSchema = exports.OpsHealthSchema = exports.OpsCheckSchema = exports.PendingRedemptionsSchema = exports.PnlLatestSchema = exports.VaultPnlHistorySchema = exports.PnlSnapshotSchema = exports.PointsLeaderboardSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const Address = zod_1.z
6
+ .string()
7
+ .regex(/^(0x[0-9a-fA-F]{40}|0x[0-9a-fA-F]{64}|[1-9A-HJ-NP-Za-km-z]{32,44}|[GC][A-Z2-7]{55})$/);
8
+ const BigNumeric = zod_1.z.union([zod_1.z.string(), zod_1.z.number()]);
9
+ exports.PointsLeaderboardSchema = zod_1.z
10
+ .object({
11
+ page: zod_1.z.number().int(),
12
+ perPage: zod_1.z.number().int(),
13
+ totalItems: zod_1.z.number().int(),
14
+ totalPages: zod_1.z.number().int(),
15
+ items: zod_1.z
16
+ .array(zod_1.z
17
+ .object({
18
+ rank: zod_1.z.number().int(),
19
+ userAddress: zod_1.z.string(),
20
+ totalPoints: zod_1.z.number().optional(),
21
+ streakDays: zod_1.z.number().int().optional(),
22
+ })
23
+ .passthrough())
24
+ .default([]),
25
+ })
26
+ .passthrough();
27
+ exports.PnlSnapshotSchema = zod_1.z
28
+ .object({
29
+ timestamp: zod_1.z.string(),
30
+ vaultName: zod_1.z.string(),
31
+ vaultAddress: zod_1.z.string(),
32
+ strategistName: zod_1.z.string().nullable().optional(),
33
+ referenceAsset: zod_1.z.string(),
34
+ assetPrice: zod_1.z.number().optional(),
35
+ tvlOnVault: zod_1.z.number().optional(),
36
+ unrealizedPnl: zod_1.z.number(),
37
+ unrealizedPnlInAsset: zod_1.z.number(),
38
+ })
39
+ .passthrough();
40
+ exports.VaultPnlHistorySchema = zod_1.z
41
+ .object({
42
+ address: Address,
43
+ chainId: zod_1.z.number().int().optional(),
44
+ snapshots: zod_1.z.array(exports.PnlSnapshotSchema).default([]),
45
+ })
46
+ .passthrough();
47
+ exports.PnlLatestSchema = zod_1.z
48
+ .object({
49
+ snapshots: zod_1.z.array(exports.PnlSnapshotSchema).default([]),
50
+ })
51
+ .passthrough();
52
+ exports.PendingRedemptionsSchema = zod_1.z
53
+ .object({
54
+ address: Address,
55
+ chainId: zod_1.z.number().int().optional(),
56
+ vault: zod_1.z
57
+ .object({ address: zod_1.z.string(), chainId: zod_1.z.number().int() })
58
+ .passthrough(),
59
+ asset: zod_1.z
60
+ .object({
61
+ address: zod_1.z.string(),
62
+ symbol: zod_1.z.string().nullable().optional(),
63
+ decimals: zod_1.z.number().int().nullable().optional(),
64
+ })
65
+ .passthrough(),
66
+ liquidity: zod_1.z.object({ available: zod_1.z.number() }).passthrough(),
67
+ summary: zod_1.z
68
+ .object({
69
+ totalPending: zod_1.z.number(),
70
+ pendingCount: zod_1.z.number().int(),
71
+ isLiquiditySufficient: zod_1.z.boolean(),
72
+ isOverdue: zod_1.z.boolean(),
73
+ shortfall: zod_1.z.number().nullable().optional(),
74
+ nextRedemptionDate: zod_1.z.string().nullable().optional(),
75
+ })
76
+ .passthrough(),
77
+ redemptionsByDate: zod_1.z
78
+ .array(zod_1.z
79
+ .object({
80
+ date: zod_1.z.string(),
81
+ assets: zod_1.z.number(),
82
+ daysUntilDue: zod_1.z.number().int(),
83
+ isOverdue: zod_1.z.boolean(),
84
+ })
85
+ .passthrough())
86
+ .default([]),
87
+ })
88
+ .passthrough();
89
+ exports.OpsCheckSchema = zod_1.z
90
+ .object({
91
+ kind: zod_1.z.enum(['rpc', 'vault_summary', 'redemptions']),
92
+ target: zod_1.z.string(),
93
+ ok: zod_1.z.boolean(),
94
+ detail: zod_1.z.string().optional(),
95
+ latencyMs: zod_1.z.number().optional(),
96
+ })
97
+ .passthrough();
98
+ exports.OpsHealthSchema = zod_1.z
99
+ .object({
100
+ checks: zod_1.z.array(exports.OpsCheckSchema).default([]),
101
+ anomalies: zod_1.z.number().int(),
102
+ })
103
+ .passthrough();
104
+ exports.OpsRedemptionsSchema = zod_1.z
105
+ .object({
106
+ address: Address,
107
+ chainId: zod_1.z.number().int().optional(),
108
+ pendingCount: zod_1.z.number().int(),
109
+ totalPending: BigNumeric,
110
+ isLiquiditySufficient: zod_1.z.boolean(),
111
+ isOverdue: zod_1.z.boolean(),
112
+ flags: zod_1.z.array(zod_1.z.string()).default([]),
113
+ anomalies: zod_1.z.number().int(),
114
+ })
115
+ .passthrough();
116
+ //# sourceMappingURL=data.js.map
@@ -0,0 +1,155 @@
1
+ import { z } from 'zod';
2
+ export declare const ResultMetaSchema: z.ZodObject<{
3
+ chainId: z.ZodOptional<z.ZodNumber>;
4
+ durationMs: z.ZodOptional<z.ZodNumber>;
5
+ generatedAt: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ chainId?: number;
8
+ durationMs?: number;
9
+ generatedAt?: string;
10
+ }, {
11
+ chainId?: number;
12
+ durationMs?: number;
13
+ generatedAt?: string;
14
+ }>;
15
+ export type ResultMeta = z.infer<typeof ResultMetaSchema>;
16
+ export declare const ResultErrorSchema: z.ZodObject<{
17
+ code: z.ZodString;
18
+ message: z.ZodString;
19
+ remediation: z.ZodOptional<z.ZodString>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ code?: string;
22
+ message?: string;
23
+ remediation?: string;
24
+ }, {
25
+ code?: string;
26
+ message?: string;
27
+ remediation?: string;
28
+ }>;
29
+ export type ResultError = z.infer<typeof ResultErrorSchema>;
30
+ export declare function envelope<T extends z.ZodTypeAny>(data: T): z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{
31
+ schemaVersion: z.ZodLiteral<1>;
32
+ command: z.ZodString;
33
+ ok: z.ZodLiteral<true>;
34
+ data: T;
35
+ meta: z.ZodObject<{
36
+ chainId: z.ZodOptional<z.ZodNumber>;
37
+ durationMs: z.ZodOptional<z.ZodNumber>;
38
+ generatedAt: z.ZodString;
39
+ }, "strip", z.ZodTypeAny, {
40
+ chainId?: number;
41
+ durationMs?: number;
42
+ generatedAt?: string;
43
+ }, {
44
+ chainId?: number;
45
+ durationMs?: number;
46
+ generatedAt?: string;
47
+ }>;
48
+ }, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
49
+ schemaVersion: z.ZodLiteral<1>;
50
+ command: z.ZodString;
51
+ ok: z.ZodLiteral<true>;
52
+ data: T;
53
+ meta: z.ZodObject<{
54
+ chainId: z.ZodOptional<z.ZodNumber>;
55
+ durationMs: z.ZodOptional<z.ZodNumber>;
56
+ generatedAt: z.ZodString;
57
+ }, "strip", z.ZodTypeAny, {
58
+ chainId?: number;
59
+ durationMs?: number;
60
+ generatedAt?: string;
61
+ }, {
62
+ chainId?: number;
63
+ durationMs?: number;
64
+ generatedAt?: string;
65
+ }>;
66
+ }>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
67
+ schemaVersion: z.ZodLiteral<1>;
68
+ command: z.ZodString;
69
+ ok: z.ZodLiteral<true>;
70
+ data: T;
71
+ meta: z.ZodObject<{
72
+ chainId: z.ZodOptional<z.ZodNumber>;
73
+ durationMs: z.ZodOptional<z.ZodNumber>;
74
+ generatedAt: z.ZodString;
75
+ }, "strip", z.ZodTypeAny, {
76
+ chainId?: number;
77
+ durationMs?: number;
78
+ generatedAt?: string;
79
+ }, {
80
+ chainId?: number;
81
+ durationMs?: number;
82
+ generatedAt?: string;
83
+ }>;
84
+ }> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>, z.ZodObject<{
85
+ schemaVersion: z.ZodLiteral<1>;
86
+ command: z.ZodString;
87
+ ok: z.ZodLiteral<false>;
88
+ error: z.ZodObject<{
89
+ code: z.ZodString;
90
+ message: z.ZodString;
91
+ remediation: z.ZodOptional<z.ZodString>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ code?: string;
94
+ message?: string;
95
+ remediation?: string;
96
+ }, {
97
+ code?: string;
98
+ message?: string;
99
+ remediation?: string;
100
+ }>;
101
+ meta: z.ZodObject<{
102
+ chainId: z.ZodOptional<z.ZodNumber>;
103
+ durationMs: z.ZodOptional<z.ZodNumber>;
104
+ generatedAt: z.ZodString;
105
+ }, "strip", z.ZodTypeAny, {
106
+ chainId?: number;
107
+ durationMs?: number;
108
+ generatedAt?: string;
109
+ }, {
110
+ chainId?: number;
111
+ durationMs?: number;
112
+ generatedAt?: string;
113
+ }>;
114
+ }, "strip", z.ZodTypeAny, {
115
+ schemaVersion?: 1;
116
+ ok?: false;
117
+ command?: string;
118
+ meta?: {
119
+ chainId?: number;
120
+ durationMs?: number;
121
+ generatedAt?: string;
122
+ };
123
+ error?: {
124
+ code?: string;
125
+ message?: string;
126
+ remediation?: string;
127
+ };
128
+ }, {
129
+ schemaVersion?: 1;
130
+ ok?: false;
131
+ command?: string;
132
+ meta?: {
133
+ chainId?: number;
134
+ durationMs?: number;
135
+ generatedAt?: string;
136
+ };
137
+ error?: {
138
+ code?: string;
139
+ message?: string;
140
+ remediation?: string;
141
+ };
142
+ }>]>;
143
+ export type Envelope<TData> = {
144
+ schemaVersion: 1;
145
+ command: string;
146
+ ok: true;
147
+ data: TData;
148
+ meta: ResultMeta;
149
+ } | {
150
+ schemaVersion: 1;
151
+ command: string;
152
+ ok: false;
153
+ error: ResultError;
154
+ meta: ResultMeta;
155
+ };
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResultErrorSchema = exports.ResultMetaSchema = void 0;
4
+ exports.envelope = envelope;
5
+ const zod_1 = require("zod");
6
+ exports.ResultMetaSchema = zod_1.z.object({
7
+ chainId: zod_1.z.number().int().optional(),
8
+ durationMs: zod_1.z.number().nonnegative().optional(),
9
+ generatedAt: zod_1.z.string().datetime(),
10
+ });
11
+ exports.ResultErrorSchema = zod_1.z.object({
12
+ code: zod_1.z.string(),
13
+ message: zod_1.z.string(),
14
+ remediation: zod_1.z.string().optional(),
15
+ });
16
+ function envelope(data) {
17
+ return zod_1.z.discriminatedUnion('ok', [
18
+ zod_1.z.object({
19
+ schemaVersion: zod_1.z.literal(1),
20
+ command: zod_1.z.string(),
21
+ ok: zod_1.z.literal(true),
22
+ data,
23
+ meta: exports.ResultMetaSchema,
24
+ }),
25
+ zod_1.z.object({
26
+ schemaVersion: zod_1.z.literal(1),
27
+ command: zod_1.z.string(),
28
+ ok: zod_1.z.literal(false),
29
+ error: exports.ResultErrorSchema,
30
+ meta: exports.ResultMetaSchema,
31
+ }),
32
+ ]);
33
+ }
34
+ //# sourceMappingURL=envelope.js.map
@@ -0,0 +1,58 @@
1
+ import { z } from 'zod';
2
+ export declare const TimelockRequestsSchema: z.ZodObject<{
3
+ vault_address: z.ZodString;
4
+ chain_id: z.ZodNumber;
5
+ count: z.ZodNumber;
6
+ timelock_requests: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
7
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
8
+ vault_address: z.ZodString;
9
+ chain_id: z.ZodNumber;
10
+ count: z.ZodNumber;
11
+ timelock_requests: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
12
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
13
+ vault_address: z.ZodString;
14
+ chain_id: z.ZodNumber;
15
+ count: z.ZodNumber;
16
+ timelock_requests: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
17
+ }, z.ZodTypeAny, "passthrough">>;
18
+ export type TimelockRequests = z.infer<typeof TimelockRequestsSchema>;
19
+ export declare const VaultPerformanceFeesSchema: z.ZodObject<{
20
+ vault_address: z.ZodString;
21
+ last_water_mark: z.ZodNumber;
22
+ is_in_drawdown: z.ZodBoolean;
23
+ total_perf_fees_asset: z.ZodNumber;
24
+ annualized_fees_pct: z.ZodNumber;
25
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
26
+ vault_address: z.ZodString;
27
+ last_water_mark: z.ZodNumber;
28
+ is_in_drawdown: z.ZodBoolean;
29
+ total_perf_fees_asset: z.ZodNumber;
30
+ annualized_fees_pct: z.ZodNumber;
31
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
32
+ vault_address: z.ZodString;
33
+ last_water_mark: z.ZodNumber;
34
+ is_in_drawdown: z.ZodBoolean;
35
+ total_perf_fees_asset: z.ZodNumber;
36
+ annualized_fees_pct: z.ZodNumber;
37
+ }, z.ZodTypeAny, "passthrough">>;
38
+ export type VaultPerformanceFees = z.infer<typeof VaultPerformanceFeesSchema>;
39
+ export declare const VaultOracleClassificationSchema: z.ZodObject<{
40
+ vault_address: z.ZodString;
41
+ chain_id: z.ZodNumber;
42
+ methodology: z.ZodString;
43
+ rows: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
44
+ warnings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
45
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
46
+ vault_address: z.ZodString;
47
+ chain_id: z.ZodNumber;
48
+ methodology: z.ZodString;
49
+ rows: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
50
+ warnings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
51
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
52
+ vault_address: z.ZodString;
53
+ chain_id: z.ZodNumber;
54
+ methodology: z.ZodString;
55
+ rows: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
56
+ warnings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
57
+ }, z.ZodTypeAny, "passthrough">>;
58
+ export type VaultOracleClassification = z.infer<typeof VaultOracleClassificationSchema>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VaultOracleClassificationSchema = exports.VaultPerformanceFeesSchema = exports.TimelockRequestsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.TimelockRequestsSchema = zod_1.z
6
+ .object({
7
+ vault_address: zod_1.z.string(),
8
+ chain_id: zod_1.z.number(),
9
+ count: zod_1.z.number(),
10
+ timelock_requests: zod_1.z.array(zod_1.z.unknown()).default([]),
11
+ })
12
+ .passthrough();
13
+ exports.VaultPerformanceFeesSchema = zod_1.z
14
+ .object({
15
+ vault_address: zod_1.z.string(),
16
+ last_water_mark: zod_1.z.number(),
17
+ is_in_drawdown: zod_1.z.boolean(),
18
+ total_perf_fees_asset: zod_1.z.number(),
19
+ annualized_fees_pct: zod_1.z.number(),
20
+ })
21
+ .passthrough();
22
+ exports.VaultOracleClassificationSchema = zod_1.z
23
+ .object({
24
+ vault_address: zod_1.z.string(),
25
+ chain_id: zod_1.z.number(),
26
+ methodology: zod_1.z.string(),
27
+ rows: zod_1.z.array(zod_1.z.unknown()).default([]),
28
+ warnings: zod_1.z.array(zod_1.z.string()).default([]),
29
+ })
30
+ .passthrough();
31
+ //# sourceMappingURL=governance.js.map
@@ -0,0 +1,15 @@
1
+ export * from './envelope';
2
+ export * from './vault';
3
+ export * from './user';
4
+ export * from './meta';
5
+ export * from './data';
6
+ export * from './activity';
7
+ export * from './reads';
8
+ export * from './subaccounts';
9
+ export * from './layerzero';
10
+ export * from './dashboard';
11
+ export * from './risk';
12
+ export * from './triage';
13
+ export * from './otc';
14
+ export * from './curator';
15
+ export * from './governance';
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./envelope"), exports);
18
+ __exportStar(require("./vault"), exports);
19
+ __exportStar(require("./user"), exports);
20
+ __exportStar(require("./meta"), exports);
21
+ __exportStar(require("./data"), exports);
22
+ __exportStar(require("./activity"), exports);
23
+ __exportStar(require("./reads"), exports);
24
+ __exportStar(require("./subaccounts"), exports);
25
+ __exportStar(require("./layerzero"), exports);
26
+ __exportStar(require("./dashboard"), exports);
27
+ __exportStar(require("./risk"), exports);
28
+ __exportStar(require("./triage"), exports);
29
+ __exportStar(require("./otc"), exports);
30
+ __exportStar(require("./curator"), exports);
31
+ __exportStar(require("./governance"), exports);
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ export declare const LayerZeroDepositsSchema: z.ZodObject<{
3
+ receiptToken: z.ZodString;
4
+ wallet: z.ZodOptional<z.ZodString>;
5
+ deposits: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
6
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
7
+ receiptToken: z.ZodString;
8
+ wallet: z.ZodOptional<z.ZodString>;
9
+ deposits: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
10
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
11
+ receiptToken: z.ZodString;
12
+ wallet: z.ZodOptional<z.ZodString>;
13
+ deposits: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
14
+ }, z.ZodTypeAny, "passthrough">>;
15
+ export type LayerZeroDeposits = z.infer<typeof LayerZeroDepositsSchema>;
16
+ export declare const LayerZeroRedeemsSchema: z.ZodObject<{
17
+ wallet: z.ZodOptional<z.ZodString>;
18
+ redeems: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
19
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
20
+ wallet: z.ZodOptional<z.ZodString>;
21
+ redeems: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
22
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
23
+ wallet: z.ZodOptional<z.ZodString>;
24
+ redeems: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
25
+ }, z.ZodTypeAny, "passthrough">>;
26
+ export type LayerZeroRedeems = z.infer<typeof LayerZeroRedeemsSchema>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LayerZeroRedeemsSchema = exports.LayerZeroDepositsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const Address = zod_1.z.string();
6
+ exports.LayerZeroDepositsSchema = zod_1.z
7
+ .object({
8
+ receiptToken: zod_1.z.string(),
9
+ wallet: Address.optional(),
10
+ deposits: zod_1.z.array(zod_1.z.unknown()).default([]),
11
+ })
12
+ .passthrough();
13
+ exports.LayerZeroRedeemsSchema = zod_1.z
14
+ .object({
15
+ wallet: Address.optional(),
16
+ redeems: zod_1.z.array(zod_1.z.unknown()).default([]),
17
+ })
18
+ .passthrough();
19
+ //# sourceMappingURL=layerzero.js.map
@@ -0,0 +1,115 @@
1
+ import { z } from 'zod';
2
+ export declare const ChainListSchema: z.ZodObject<{
3
+ chains: z.ZodArray<z.ZodObject<{
4
+ chainId: z.ZodNumber;
5
+ name: z.ZodString;
6
+ explorer: z.ZodOptional<z.ZodString>;
7
+ hasRpc: z.ZodBoolean;
8
+ }, "strip", z.ZodTypeAny, {
9
+ name?: string;
10
+ chainId?: number;
11
+ explorer?: string;
12
+ hasRpc?: boolean;
13
+ }, {
14
+ name?: string;
15
+ chainId?: number;
16
+ explorer?: string;
17
+ hasRpc?: boolean;
18
+ }>, "many">;
19
+ }, "strip", z.ZodTypeAny, {
20
+ chains?: {
21
+ name?: string;
22
+ chainId?: number;
23
+ explorer?: string;
24
+ hasRpc?: boolean;
25
+ }[];
26
+ }, {
27
+ chains?: {
28
+ name?: string;
29
+ chainId?: number;
30
+ explorer?: string;
31
+ hasRpc?: boolean;
32
+ }[];
33
+ }>;
34
+ export type ChainList = z.infer<typeof ChainListSchema>;
35
+ export declare const RpcTestSchema: z.ZodObject<{
36
+ results: z.ZodArray<z.ZodObject<{
37
+ chainId: z.ZodNumber;
38
+ url: z.ZodOptional<z.ZodString>;
39
+ ok: z.ZodBoolean;
40
+ latencyMs: z.ZodOptional<z.ZodNumber>;
41
+ error: z.ZodOptional<z.ZodString>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ url?: string;
44
+ chainId?: number;
45
+ ok?: boolean;
46
+ error?: string;
47
+ latencyMs?: number;
48
+ }, {
49
+ url?: string;
50
+ chainId?: number;
51
+ ok?: boolean;
52
+ error?: string;
53
+ latencyMs?: number;
54
+ }>, "many">;
55
+ }, "strip", z.ZodTypeAny, {
56
+ results?: {
57
+ url?: string;
58
+ chainId?: number;
59
+ ok?: boolean;
60
+ error?: string;
61
+ latencyMs?: number;
62
+ }[];
63
+ }, {
64
+ results?: {
65
+ url?: string;
66
+ chainId?: number;
67
+ ok?: boolean;
68
+ error?: string;
69
+ latencyMs?: number;
70
+ }[];
71
+ }>;
72
+ export type RpcTest = z.infer<typeof RpcTestSchema>;
73
+ export declare const WhoamiSchema: z.ZodObject<{
74
+ profile: z.ZodString;
75
+ defaultChainId: z.ZodNumber;
76
+ configDir: z.ZodString;
77
+ cliVersion: z.ZodOptional<z.ZodString>;
78
+ sdkVersion: z.ZodOptional<z.ZodString>;
79
+ apiKey: z.ZodObject<{
80
+ present: z.ZodBoolean;
81
+ source: z.ZodEnum<["env", "session", "flag", "none"]>;
82
+ sessionExpiresAt: z.ZodOptional<z.ZodString>;
83
+ }, "strip", z.ZodTypeAny, {
84
+ present?: boolean;
85
+ source?: "flag" | "env" | "session" | "none";
86
+ sessionExpiresAt?: string;
87
+ }, {
88
+ present?: boolean;
89
+ source?: "flag" | "env" | "session" | "none";
90
+ sessionExpiresAt?: string;
91
+ }>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ defaultChainId?: number;
94
+ apiKey?: {
95
+ present?: boolean;
96
+ source?: "flag" | "env" | "session" | "none";
97
+ sessionExpiresAt?: string;
98
+ };
99
+ profile?: string;
100
+ configDir?: string;
101
+ cliVersion?: string;
102
+ sdkVersion?: string;
103
+ }, {
104
+ defaultChainId?: number;
105
+ apiKey?: {
106
+ present?: boolean;
107
+ source?: "flag" | "env" | "session" | "none";
108
+ sessionExpiresAt?: string;
109
+ };
110
+ profile?: string;
111
+ configDir?: string;
112
+ cliVersion?: string;
113
+ sdkVersion?: string;
114
+ }>;
115
+ export type Whoami = z.infer<typeof WhoamiSchema>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WhoamiSchema = exports.RpcTestSchema = exports.ChainListSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.ChainListSchema = zod_1.z.object({
6
+ chains: zod_1.z.array(zod_1.z.object({
7
+ chainId: zod_1.z.number().int(),
8
+ name: zod_1.z.string(),
9
+ explorer: zod_1.z.string().url().optional(),
10
+ hasRpc: zod_1.z.boolean(),
11
+ })),
12
+ });
13
+ exports.RpcTestSchema = zod_1.z.object({
14
+ results: zod_1.z.array(zod_1.z.object({
15
+ chainId: zod_1.z.number().int(),
16
+ url: zod_1.z.string().url().optional(),
17
+ ok: zod_1.z.boolean(),
18
+ latencyMs: zod_1.z.number().nonnegative().optional(),
19
+ error: zod_1.z.string().optional(),
20
+ })),
21
+ });
22
+ exports.WhoamiSchema = zod_1.z.object({
23
+ profile: zod_1.z.string(),
24
+ defaultChainId: zod_1.z.number().int(),
25
+ configDir: zod_1.z.string(),
26
+ cliVersion: zod_1.z.string().optional(),
27
+ sdkVersion: zod_1.z.string().optional(),
28
+ apiKey: zod_1.z.object({
29
+ present: zod_1.z.boolean(),
30
+ source: zod_1.z.enum(['env', 'session', 'flag', 'none']),
31
+ sessionExpiresAt: zod_1.z.string().datetime().optional(),
32
+ }),
33
+ });
34
+ //# sourceMappingURL=meta.js.map
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ export declare const OtcPositionsSchema: z.ZodObject<{
3
+ count: z.ZodNumber;
4
+ positions: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
5
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
6
+ count: z.ZodNumber;
7
+ positions: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
8
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9
+ count: z.ZodNumber;
10
+ positions: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
11
+ }, z.ZodTypeAny, "passthrough">>;
12
+ export type OtcPositions = z.infer<typeof OtcPositionsSchema>;
13
+ export declare const OtcMarginRequirementsSchema: z.ZodObject<{
14
+ count: z.ZodNumber;
15
+ margin_requirements: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
16
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
17
+ count: z.ZodNumber;
18
+ margin_requirements: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
19
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
20
+ count: z.ZodNumber;
21
+ margin_requirements: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
22
+ }, z.ZodTypeAny, "passthrough">>;
23
+ export type OtcMarginRequirements = z.infer<typeof OtcMarginRequirementsSchema>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OtcMarginRequirementsSchema = exports.OtcPositionsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.OtcPositionsSchema = zod_1.z
6
+ .object({
7
+ count: zod_1.z.number(),
8
+ positions: zod_1.z.array(zod_1.z.unknown()).default([]),
9
+ })
10
+ .passthrough();
11
+ exports.OtcMarginRequirementsSchema = zod_1.z
12
+ .object({
13
+ count: zod_1.z.number(),
14
+ margin_requirements: zod_1.z.array(zod_1.z.unknown()).default([]),
15
+ })
16
+ .passthrough();
17
+ //# sourceMappingURL=otc.js.map