@upshiftfinance/config 0.0.0-stage → 0.1.2

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,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserTransfersSchema = exports.UserActivitySchema = exports.ActivityRankingSchema = exports.VaultActivitySchema = exports.ActivitySummarySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const Address = zod_1.z.string();
6
+ exports.ActivitySummarySchema = zod_1.z
7
+ .object({
8
+ eventCount: zod_1.z.number().int(),
9
+ depositCount: zod_1.z.number().int(),
10
+ depositVolume: zod_1.z.number(),
11
+ withdrawRequestCount: zod_1.z.number().int(),
12
+ withdrawProcessedCount: zod_1.z.number().int(),
13
+ withdrawVolume: zod_1.z.number(),
14
+ netFlow: zod_1.z.number(),
15
+ uniqueActors: zod_1.z.number().int(),
16
+ firstTs: zod_1.z.number().nullable(),
17
+ lastTs: zod_1.z.number().nullable(),
18
+ })
19
+ .passthrough();
20
+ exports.VaultActivitySchema = zod_1.z
21
+ .object({
22
+ address: Address,
23
+ chainId: zod_1.z.number().int().optional(),
24
+ sinceTs: zod_1.z.number().nullable().optional(),
25
+ untilTs: zod_1.z.number().nullable().optional(),
26
+ summary: exports.ActivitySummarySchema,
27
+ items: zod_1.z.array(zod_1.z.unknown()).default([]),
28
+ })
29
+ .passthrough();
30
+ exports.ActivityRankingSchema = zod_1.z
31
+ .object({
32
+ chainId: zod_1.z.number().int().nullable().optional(),
33
+ sinceTs: zod_1.z.number().nullable().optional(),
34
+ untilTs: zod_1.z.number().nullable().optional(),
35
+ metric: zod_1.z.string(),
36
+ vaultsScanned: zod_1.z.number().int(),
37
+ vaultsErrored: zod_1.z.number().int(),
38
+ ranked: zod_1.z
39
+ .array(zod_1.z
40
+ .object({
41
+ address: Address,
42
+ symbol: zod_1.z.string().optional(),
43
+ name: zod_1.z.string().optional(),
44
+ chainId: zod_1.z.number().int().optional(),
45
+ summary: exports.ActivitySummarySchema,
46
+ })
47
+ .passthrough())
48
+ .default([]),
49
+ })
50
+ .passthrough();
51
+ exports.UserActivitySchema = zod_1.z
52
+ .object({
53
+ user: Address,
54
+ chainId: zod_1.z.number().int().optional(),
55
+ vault: Address.optional(),
56
+ items: zod_1.z.array(zod_1.z.unknown()).default([]),
57
+ })
58
+ .passthrough();
59
+ exports.UserTransfersSchema = zod_1.z
60
+ .object({
61
+ user: Address,
62
+ chainId: zod_1.z.number().int().optional(),
63
+ vault: Address.optional(),
64
+ transfers: zod_1.z.array(zod_1.z.unknown()).default([]),
65
+ })
66
+ .passthrough();
67
+ //# sourceMappingURL=activity.js.map
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ export declare const CuratorVaultSubaccountsSchema: z.ZodObject<{
3
+ vault_address: z.ZodString;
4
+ count: z.ZodNumber;
5
+ subaccounts: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
6
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
7
+ vault_address: z.ZodString;
8
+ count: z.ZodNumber;
9
+ subaccounts: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
10
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
11
+ vault_address: z.ZodString;
12
+ count: z.ZodNumber;
13
+ subaccounts: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
14
+ }, z.ZodTypeAny, "passthrough">>;
15
+ export type CuratorVaultSubaccounts = z.infer<typeof CuratorVaultSubaccountsSchema>;
16
+ export declare const CuratorVaultWhitelistSchema: z.ZodObject<{
17
+ vault_address: z.ZodString;
18
+ count: z.ZodNumber;
19
+ whitelist: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
20
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
21
+ vault_address: z.ZodString;
22
+ count: z.ZodNumber;
23
+ whitelist: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
24
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
25
+ vault_address: z.ZodString;
26
+ count: z.ZodNumber;
27
+ whitelist: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
28
+ }, z.ZodTypeAny, "passthrough">>;
29
+ export type CuratorVaultWhitelist = z.infer<typeof CuratorVaultWhitelistSchema>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CuratorVaultWhitelistSchema = exports.CuratorVaultSubaccountsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.CuratorVaultSubaccountsSchema = zod_1.z
6
+ .object({
7
+ vault_address: zod_1.z.string(),
8
+ count: zod_1.z.number(),
9
+ subaccounts: zod_1.z.array(zod_1.z.unknown()).default([]),
10
+ })
11
+ .passthrough();
12
+ exports.CuratorVaultWhitelistSchema = zod_1.z
13
+ .object({
14
+ vault_address: zod_1.z.string(),
15
+ count: zod_1.z.number(),
16
+ whitelist: zod_1.z.array(zod_1.z.unknown()).default([]),
17
+ })
18
+ .passthrough();
19
+ //# sourceMappingURL=curator.js.map
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const DashboardLoansSchema: z.ZodObject<{
3
+ count: z.ZodNumber;
4
+ loans: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
5
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
6
+ count: z.ZodNumber;
7
+ loans: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
8
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9
+ count: z.ZodNumber;
10
+ loans: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
11
+ }, z.ZodTypeAny, "passthrough">>;
12
+ export type DashboardLoans = z.infer<typeof DashboardLoansSchema>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DashboardLoansSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.DashboardLoansSchema = zod_1.z
6
+ .object({
7
+ count: zod_1.z.number(),
8
+ loans: zod_1.z.array(zod_1.z.unknown()).default([]),
9
+ })
10
+ .passthrough();
11
+ //# sourceMappingURL=dashboard.js.map