@nktkas/hyperliquid 0.24.2 → 0.25.0-beta.1
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 +197 -117
- package/esm/mod.d.ts +11 -11
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +1 -1
- package/esm/src/clients/exchange.d.ts +29 -18
- package/esm/src/clients/exchange.d.ts.map +1 -1
- package/esm/src/clients/exchange.js +50 -48
- package/esm/src/clients/info.d.ts +79 -75
- package/esm/src/clients/info.d.ts.map +1 -1
- package/esm/src/clients/info.js +294 -163
- package/esm/src/clients/multiSign.d.ts +11 -7
- package/esm/src/clients/multiSign.d.ts.map +1 -1
- package/esm/src/clients/subscription.d.ts +105 -32
- package/esm/src/clients/subscription.d.ts.map +1 -1
- package/esm/src/clients/subscription.js +114 -33
- package/esm/src/{base.d.ts → errors.d.ts} +1 -1
- package/esm/src/errors.d.ts.map +1 -0
- package/esm/src/schemas/_base.d.ts +10 -0
- package/esm/src/schemas/_base.d.ts.map +1 -0
- package/esm/src/schemas/_base.js +12 -0
- package/esm/src/schemas/exchange/requests.d.ts +8953 -0
- package/esm/src/schemas/exchange/requests.d.ts.map +1 -0
- package/esm/src/schemas/exchange/requests.js +1413 -0
- package/esm/src/schemas/exchange/responses.d.ts +567 -0
- package/esm/src/schemas/exchange/responses.d.ts.map +1 -0
- package/esm/src/schemas/exchange/responses.js +243 -0
- package/esm/src/schemas/explorer/requests.d.ts +44 -0
- package/esm/src/schemas/explorer/requests.d.ts.map +1 -0
- package/esm/src/schemas/explorer/requests.js +32 -0
- package/esm/src/schemas/explorer/responses.d.ts +360 -0
- package/esm/src/schemas/explorer/responses.d.ts.map +1 -0
- package/esm/src/schemas/explorer/responses.js +56 -0
- package/esm/src/schemas/info/accounts.d.ts +2159 -0
- package/esm/src/schemas/info/accounts.d.ts.map +1 -0
- package/esm/src/schemas/info/accounts.js +622 -0
- package/esm/src/schemas/info/assets.d.ts +945 -0
- package/esm/src/schemas/info/assets.d.ts.map +1 -0
- package/esm/src/schemas/info/assets.js +265 -0
- package/esm/src/schemas/info/markets.d.ts +138 -0
- package/esm/src/schemas/info/markets.d.ts.map +1 -0
- package/esm/src/schemas/info/markets.js +58 -0
- package/esm/src/schemas/info/orders.d.ts +957 -0
- package/esm/src/schemas/info/orders.d.ts.map +1 -0
- package/esm/src/schemas/info/orders.js +297 -0
- package/esm/src/schemas/info/requests.d.ts +882 -0
- package/esm/src/schemas/info/requests.d.ts.map +1 -0
- package/esm/src/schemas/info/requests.js +655 -0
- package/esm/src/schemas/info/validators.d.ts +305 -0
- package/esm/src/schemas/info/validators.d.ts.map +1 -0
- package/esm/src/schemas/info/validators.js +112 -0
- package/esm/src/schemas/info/vaults.d.ts +447 -0
- package/esm/src/schemas/info/vaults.d.ts.map +1 -0
- package/esm/src/schemas/info/vaults.js +110 -0
- package/esm/src/schemas/mod.d.ts +100 -0
- package/esm/src/schemas/mod.d.ts.map +1 -0
- package/esm/src/schemas/mod.js +113 -0
- package/esm/src/schemas/subscriptions/requests.d.ts +332 -0
- package/esm/src/schemas/subscriptions/requests.d.ts.map +1 -0
- package/esm/src/schemas/subscriptions/requests.js +258 -0
- package/esm/src/schemas/subscriptions/responses.d.ts +3643 -0
- package/esm/src/schemas/subscriptions/responses.d.ts.map +1 -0
- package/esm/src/schemas/subscriptions/responses.js +233 -0
- package/esm/src/signing/mod.d.ts +109 -29
- package/esm/src/signing/mod.d.ts.map +1 -1
- package/esm/src/signing/mod.js +135 -29
- package/esm/src/transports/base.d.ts +2 -2
- package/esm/src/transports/base.d.ts.map +1 -1
- package/esm/src/transports/base.js +2 -2
- package/esm/src/transports/http/http_transport.d.ts +2 -1
- package/esm/src/transports/http/http_transport.d.ts.map +1 -1
- package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts +1 -1
- package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
- package/esm/src/transports/websocket/websocket_transport.d.ts +2 -1
- package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
- package/package.json +6 -5
- package/script/mod.d.ts +11 -11
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +1 -1
- package/script/src/clients/exchange.d.ts +29 -18
- package/script/src/clients/exchange.d.ts.map +1 -1
- package/script/src/clients/exchange.js +56 -54
- package/script/src/clients/info.d.ts +79 -75
- package/script/src/clients/info.d.ts.map +1 -1
- package/script/src/clients/info.js +294 -163
- package/script/src/clients/multiSign.d.ts +11 -7
- package/script/src/clients/multiSign.d.ts.map +1 -1
- package/script/src/clients/subscription.d.ts +105 -32
- package/script/src/clients/subscription.d.ts.map +1 -1
- package/script/src/clients/subscription.js +114 -33
- package/script/src/{base.d.ts → errors.d.ts} +1 -1
- package/script/src/errors.d.ts.map +1 -0
- package/script/src/schemas/_base.d.ts +10 -0
- package/script/src/schemas/_base.d.ts.map +1 -0
- package/script/src/schemas/_base.js +48 -0
- package/script/src/schemas/exchange/requests.d.ts +8953 -0
- package/script/src/schemas/exchange/requests.d.ts.map +1 -0
- package/script/src/schemas/exchange/requests.js +1449 -0
- package/script/src/schemas/exchange/responses.d.ts +567 -0
- package/script/src/schemas/exchange/responses.d.ts.map +1 -0
- package/script/src/schemas/exchange/responses.js +279 -0
- package/script/src/schemas/explorer/requests.d.ts +44 -0
- package/script/src/schemas/explorer/requests.d.ts.map +1 -0
- package/script/src/schemas/explorer/requests.js +68 -0
- package/script/src/schemas/explorer/responses.d.ts +360 -0
- package/script/src/schemas/explorer/responses.d.ts.map +1 -0
- package/script/src/schemas/explorer/responses.js +92 -0
- package/script/src/schemas/info/accounts.d.ts +2159 -0
- package/script/src/schemas/info/accounts.d.ts.map +1 -0
- package/script/src/schemas/info/accounts.js +658 -0
- package/script/src/schemas/info/assets.d.ts +945 -0
- package/script/src/schemas/info/assets.d.ts.map +1 -0
- package/script/src/schemas/info/assets.js +301 -0
- package/script/src/schemas/info/markets.d.ts +138 -0
- package/script/src/schemas/info/markets.d.ts.map +1 -0
- package/script/src/schemas/info/markets.js +94 -0
- package/script/src/schemas/info/orders.d.ts +957 -0
- package/script/src/schemas/info/orders.d.ts.map +1 -0
- package/script/src/schemas/info/orders.js +333 -0
- package/script/src/schemas/info/requests.d.ts +882 -0
- package/script/src/schemas/info/requests.d.ts.map +1 -0
- package/script/src/schemas/info/requests.js +692 -0
- package/script/src/schemas/info/validators.d.ts +305 -0
- package/script/src/schemas/info/validators.d.ts.map +1 -0
- package/script/src/schemas/info/validators.js +148 -0
- package/script/src/schemas/info/vaults.d.ts +447 -0
- package/script/src/schemas/info/vaults.d.ts.map +1 -0
- package/script/src/schemas/info/vaults.js +146 -0
- package/script/src/schemas/mod.d.ts +100 -0
- package/script/src/schemas/mod.d.ts.map +1 -0
- package/script/src/schemas/mod.js +154 -0
- package/script/src/schemas/subscriptions/requests.d.ts +332 -0
- package/script/src/schemas/subscriptions/requests.d.ts.map +1 -0
- package/script/src/schemas/subscriptions/requests.js +294 -0
- package/script/src/schemas/subscriptions/responses.d.ts +3643 -0
- package/script/src/schemas/subscriptions/responses.d.ts.map +1 -0
- package/script/src/schemas/subscriptions/responses.js +269 -0
- package/script/src/signing/mod.d.ts +109 -29
- package/script/src/signing/mod.d.ts.map +1 -1
- package/script/src/signing/mod.js +137 -33
- package/script/src/transports/base.d.ts +2 -2
- package/script/src/transports/base.d.ts.map +1 -1
- package/script/src/transports/base.js +3 -3
- package/script/src/transports/http/http_transport.d.ts +2 -1
- package/script/src/transports/http/http_transport.d.ts.map +1 -1
- package/script/src/transports/websocket/_hyperliquid_event_target.d.ts +1 -1
- package/script/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
- package/script/src/transports/websocket/websocket_transport.d.ts +2 -1
- package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
- package/esm/src/base.d.ts.map +0 -1
- package/esm/src/signing/_sorter.d.ts +0 -127
- package/esm/src/signing/_sorter.d.ts.map +0 -1
- package/esm/src/signing/_sorter.js +0 -693
- package/esm/src/types/exchange/requests.d.ts +0 -1345
- package/esm/src/types/exchange/requests.d.ts.map +0 -1
- package/esm/src/types/exchange/requests.js +0 -1
- package/esm/src/types/exchange/responses.d.ts +0 -233
- package/esm/src/types/exchange/responses.d.ts.map +0 -1
- package/esm/src/types/exchange/responses.js +0 -1
- package/esm/src/types/explorer/requests.d.ts +0 -32
- package/esm/src/types/explorer/requests.d.ts.map +0 -1
- package/esm/src/types/explorer/requests.js +0 -1
- package/esm/src/types/explorer/responses.d.ts +0 -58
- package/esm/src/types/explorer/responses.d.ts.map +0 -1
- package/esm/src/types/explorer/responses.js +0 -1
- package/esm/src/types/info/accounts.d.ts +0 -864
- package/esm/src/types/info/accounts.d.ts.map +0 -1
- package/esm/src/types/info/accounts.js +0 -1
- package/esm/src/types/info/assets.d.ts +0 -354
- package/esm/src/types/info/assets.d.ts.map +0 -1
- package/esm/src/types/info/assets.js +0 -1
- package/esm/src/types/info/markets.d.ts +0 -79
- package/esm/src/types/info/markets.d.ts.map +0 -1
- package/esm/src/types/info/markets.js +0 -1
- package/esm/src/types/info/orders.d.ts +0 -266
- package/esm/src/types/info/orders.d.ts.map +0 -1
- package/esm/src/types/info/orders.js +0 -1
- package/esm/src/types/info/requests.d.ts +0 -634
- package/esm/src/types/info/requests.d.ts.map +0 -1
- package/esm/src/types/info/requests.js +0 -1
- package/esm/src/types/info/validators.d.ts +0 -147
- package/esm/src/types/info/validators.d.ts.map +0 -1
- package/esm/src/types/info/validators.js +0 -1
- package/esm/src/types/info/vaults.d.ts +0 -119
- package/esm/src/types/info/vaults.d.ts.map +0 -1
- package/esm/src/types/info/vaults.js +0 -1
- package/esm/src/types/mod.d.ts +0 -38
- package/esm/src/types/mod.d.ts.map +0 -1
- package/esm/src/types/mod.js +0 -24
- package/esm/src/types/subscriptions/requests.d.ts +0 -143
- package/esm/src/types/subscriptions/requests.d.ts.map +0 -1
- package/esm/src/types/subscriptions/requests.js +0 -1
- package/esm/src/types/subscriptions/responses.d.ts +0 -213
- package/esm/src/types/subscriptions/responses.d.ts.map +0 -1
- package/esm/src/types/subscriptions/responses.js +0 -1
- package/script/src/base.d.ts.map +0 -1
- package/script/src/signing/_sorter.d.ts +0 -127
- package/script/src/signing/_sorter.d.ts.map +0 -1
- package/script/src/signing/_sorter.js +0 -696
- package/script/src/types/exchange/requests.d.ts +0 -1345
- package/script/src/types/exchange/requests.d.ts.map +0 -1
- package/script/src/types/exchange/requests.js +0 -2
- package/script/src/types/exchange/responses.d.ts +0 -233
- package/script/src/types/exchange/responses.d.ts.map +0 -1
- package/script/src/types/exchange/responses.js +0 -2
- package/script/src/types/explorer/requests.d.ts +0 -32
- package/script/src/types/explorer/requests.d.ts.map +0 -1
- package/script/src/types/explorer/requests.js +0 -2
- package/script/src/types/explorer/responses.d.ts +0 -58
- package/script/src/types/explorer/responses.d.ts.map +0 -1
- package/script/src/types/explorer/responses.js +0 -2
- package/script/src/types/info/accounts.d.ts +0 -864
- package/script/src/types/info/accounts.d.ts.map +0 -1
- package/script/src/types/info/accounts.js +0 -2
- package/script/src/types/info/assets.d.ts +0 -354
- package/script/src/types/info/assets.d.ts.map +0 -1
- package/script/src/types/info/assets.js +0 -2
- package/script/src/types/info/markets.d.ts +0 -79
- package/script/src/types/info/markets.d.ts.map +0 -1
- package/script/src/types/info/markets.js +0 -2
- package/script/src/types/info/orders.d.ts +0 -266
- package/script/src/types/info/orders.d.ts.map +0 -1
- package/script/src/types/info/orders.js +0 -2
- package/script/src/types/info/requests.d.ts +0 -634
- package/script/src/types/info/requests.d.ts.map +0 -1
- package/script/src/types/info/requests.js +0 -2
- package/script/src/types/info/validators.d.ts +0 -147
- package/script/src/types/info/validators.d.ts.map +0 -1
- package/script/src/types/info/validators.js +0 -2
- package/script/src/types/info/vaults.d.ts +0 -119
- package/script/src/types/info/vaults.d.ts.map +0 -1
- package/script/src/types/info/vaults.js +0 -2
- package/script/src/types/mod.d.ts +0 -38
- package/script/src/types/mod.d.ts.map +0 -1
- package/script/src/types/mod.js +0 -25
- package/script/src/types/subscriptions/requests.d.ts +0 -143
- package/script/src/types/subscriptions/requests.d.ts.map +0 -1
- package/script/src/types/subscriptions/requests.js +0 -2
- package/script/src/types/subscriptions/responses.d.ts +0 -213
- package/script/src/types/subscriptions/responses.d.ts.map +0 -1
- package/script/src/types/subscriptions/responses.js +0 -2
- /package/esm/src/{base.js → errors.js} +0 -0
- /package/script/src/{base.js → errors.js} +0 -0
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
/** Vault relationship configuration. */
|
|
3
|
+
export declare const VaultRelationship: v.SchemaWithPipe<readonly [v.UnionSchema<[v.StrictObjectSchema<{
|
|
4
|
+
/** Relationship type. */
|
|
5
|
+
readonly type: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"normal", undefined>, v.LiteralSchema<"child", undefined>], undefined>, v.DescriptionAction<"normal" | "child", "Relationship type.">]>;
|
|
6
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
7
|
+
/** Relationship type. */
|
|
8
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"parent", undefined>, v.DescriptionAction<"parent", "Relationship type.">]>;
|
|
9
|
+
/** Child vault information. */
|
|
10
|
+
readonly data: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
11
|
+
/** Child vault addresses. */
|
|
12
|
+
readonly childAddresses: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, undefined>, v.DescriptionAction<`0x${string}`[], "Child vault addresses.">]>;
|
|
13
|
+
}, undefined>, v.DescriptionAction<{
|
|
14
|
+
childAddresses: `0x${string}`[];
|
|
15
|
+
}, "Child vault information.">]>;
|
|
16
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
17
|
+
type: "normal" | "child";
|
|
18
|
+
} | {
|
|
19
|
+
type: "parent";
|
|
20
|
+
data: {
|
|
21
|
+
childAddresses: `0x${string}`[];
|
|
22
|
+
};
|
|
23
|
+
}, "Vault relationship configuration.">]>;
|
|
24
|
+
export type VaultRelationship = v.InferOutput<typeof VaultRelationship>;
|
|
25
|
+
/** Vault follower state. */
|
|
26
|
+
export declare const VaultFollowerState: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
27
|
+
/** Follower address. */
|
|
28
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Follower address.">]>;
|
|
29
|
+
/** Follower vault equity. */
|
|
30
|
+
readonly vaultEquity: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Follower vault equity.">]>;
|
|
31
|
+
/** Current profit and loss. */
|
|
32
|
+
readonly pnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Current profit and loss.">]>;
|
|
33
|
+
/** All-time profit and loss. */
|
|
34
|
+
readonly allTimePnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "All-time profit and loss.">]>;
|
|
35
|
+
/** Subscription duration in days. */
|
|
36
|
+
readonly daysFollowing: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Subscription duration in days.">]>;
|
|
37
|
+
/** Vault entry timestamp. */
|
|
38
|
+
readonly vaultEntryTime: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Vault entry timestamp.">]>;
|
|
39
|
+
/** Timestamp when funds become unlocked. */
|
|
40
|
+
readonly lockupUntil: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when funds become unlocked.">]>;
|
|
41
|
+
}, undefined>, v.DescriptionAction<{
|
|
42
|
+
user: `0x${string}`;
|
|
43
|
+
vaultEquity: string;
|
|
44
|
+
pnl: string;
|
|
45
|
+
allTimePnl: string;
|
|
46
|
+
daysFollowing: number;
|
|
47
|
+
vaultEntryTime: number;
|
|
48
|
+
lockupUntil: number;
|
|
49
|
+
}, "Vault follower state.">]>;
|
|
50
|
+
export type VaultFollowerState = v.InferOutput<typeof VaultFollowerState>;
|
|
51
|
+
/** Details about a vault. */
|
|
52
|
+
export declare const VaultDetails: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
53
|
+
/** Vault name. */
|
|
54
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Vault name.">]>;
|
|
55
|
+
/** Vault address. */
|
|
56
|
+
readonly vaultAddress: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Vault address.">]>;
|
|
57
|
+
/** Leader address. */
|
|
58
|
+
readonly leader: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Leader address.">]>;
|
|
59
|
+
/** Vault description. */
|
|
60
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Vault description.">]>;
|
|
61
|
+
/** Vault portfolio metrics grouped by time periods. */
|
|
62
|
+
readonly portfolio: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictTupleSchema<[v.StrictTupleSchema<[v.LiteralSchema<"day", undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
63
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
64
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
65
|
+
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
66
|
+
}, undefined>, v.DescriptionAction<{
|
|
67
|
+
accountValueHistory: [number, string][];
|
|
68
|
+
pnlHistory: [number, string][];
|
|
69
|
+
vlm: string;
|
|
70
|
+
}, "Portfolio metrics snapshot.">]>], undefined>, v.StrictTupleSchema<[v.LiteralSchema<"week", undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
71
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
72
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
73
|
+
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
74
|
+
}, undefined>, v.DescriptionAction<{
|
|
75
|
+
accountValueHistory: [number, string][];
|
|
76
|
+
pnlHistory: [number, string][];
|
|
77
|
+
vlm: string;
|
|
78
|
+
}, "Portfolio metrics snapshot.">]>], undefined>, v.StrictTupleSchema<[v.LiteralSchema<"month", undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
79
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
80
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
81
|
+
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
82
|
+
}, undefined>, v.DescriptionAction<{
|
|
83
|
+
accountValueHistory: [number, string][];
|
|
84
|
+
pnlHistory: [number, string][];
|
|
85
|
+
vlm: string;
|
|
86
|
+
}, "Portfolio metrics snapshot.">]>], undefined>, v.StrictTupleSchema<[v.LiteralSchema<"allTime", undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
87
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
88
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
89
|
+
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
90
|
+
}, undefined>, v.DescriptionAction<{
|
|
91
|
+
accountValueHistory: [number, string][];
|
|
92
|
+
pnlHistory: [number, string][];
|
|
93
|
+
vlm: string;
|
|
94
|
+
}, "Portfolio metrics snapshot.">]>], undefined>, v.StrictTupleSchema<[v.LiteralSchema<"perpDay", undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
95
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
96
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
97
|
+
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
98
|
+
}, undefined>, v.DescriptionAction<{
|
|
99
|
+
accountValueHistory: [number, string][];
|
|
100
|
+
pnlHistory: [number, string][];
|
|
101
|
+
vlm: string;
|
|
102
|
+
}, "Portfolio metrics snapshot.">]>], undefined>, v.StrictTupleSchema<[v.LiteralSchema<"perpWeek", undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
103
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
104
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
105
|
+
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
106
|
+
}, undefined>, v.DescriptionAction<{
|
|
107
|
+
accountValueHistory: [number, string][];
|
|
108
|
+
pnlHistory: [number, string][];
|
|
109
|
+
vlm: string;
|
|
110
|
+
}, "Portfolio metrics snapshot.">]>], undefined>, v.StrictTupleSchema<[v.LiteralSchema<"perpMonth", undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
111
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
112
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
113
|
+
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
114
|
+
}, undefined>, v.DescriptionAction<{
|
|
115
|
+
accountValueHistory: [number, string][];
|
|
116
|
+
pnlHistory: [number, string][];
|
|
117
|
+
vlm: string;
|
|
118
|
+
}, "Portfolio metrics snapshot.">]>], undefined>, v.StrictTupleSchema<[v.LiteralSchema<"perpAllTime", undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
119
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
120
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictTupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
121
|
+
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
122
|
+
}, undefined>, v.DescriptionAction<{
|
|
123
|
+
accountValueHistory: [number, string][];
|
|
124
|
+
pnlHistory: [number, string][];
|
|
125
|
+
vlm: string;
|
|
126
|
+
}, "Portfolio metrics snapshot.">]>], undefined>], undefined>, v.DescriptionAction<[["day", {
|
|
127
|
+
accountValueHistory: [number, string][];
|
|
128
|
+
pnlHistory: [number, string][];
|
|
129
|
+
vlm: string;
|
|
130
|
+
}], ["week", {
|
|
131
|
+
accountValueHistory: [number, string][];
|
|
132
|
+
pnlHistory: [number, string][];
|
|
133
|
+
vlm: string;
|
|
134
|
+
}], ["month", {
|
|
135
|
+
accountValueHistory: [number, string][];
|
|
136
|
+
pnlHistory: [number, string][];
|
|
137
|
+
vlm: string;
|
|
138
|
+
}], ["allTime", {
|
|
139
|
+
accountValueHistory: [number, string][];
|
|
140
|
+
pnlHistory: [number, string][];
|
|
141
|
+
vlm: string;
|
|
142
|
+
}], ["perpDay", {
|
|
143
|
+
accountValueHistory: [number, string][];
|
|
144
|
+
pnlHistory: [number, string][];
|
|
145
|
+
vlm: string;
|
|
146
|
+
}], ["perpWeek", {
|
|
147
|
+
accountValueHistory: [number, string][];
|
|
148
|
+
pnlHistory: [number, string][];
|
|
149
|
+
vlm: string;
|
|
150
|
+
}], ["perpMonth", {
|
|
151
|
+
accountValueHistory: [number, string][];
|
|
152
|
+
pnlHistory: [number, string][];
|
|
153
|
+
vlm: string;
|
|
154
|
+
}], ["perpAllTime", {
|
|
155
|
+
accountValueHistory: [number, string][];
|
|
156
|
+
pnlHistory: [number, string][];
|
|
157
|
+
vlm: string;
|
|
158
|
+
}]], "Portfolio metrics grouped by time periods.">]>, v.DescriptionAction<[["day", {
|
|
159
|
+
accountValueHistory: [number, string][];
|
|
160
|
+
pnlHistory: [number, string][];
|
|
161
|
+
vlm: string;
|
|
162
|
+
}], ["week", {
|
|
163
|
+
accountValueHistory: [number, string][];
|
|
164
|
+
pnlHistory: [number, string][];
|
|
165
|
+
vlm: string;
|
|
166
|
+
}], ["month", {
|
|
167
|
+
accountValueHistory: [number, string][];
|
|
168
|
+
pnlHistory: [number, string][];
|
|
169
|
+
vlm: string;
|
|
170
|
+
}], ["allTime", {
|
|
171
|
+
accountValueHistory: [number, string][];
|
|
172
|
+
pnlHistory: [number, string][];
|
|
173
|
+
vlm: string;
|
|
174
|
+
}], ["perpDay", {
|
|
175
|
+
accountValueHistory: [number, string][];
|
|
176
|
+
pnlHistory: [number, string][];
|
|
177
|
+
vlm: string;
|
|
178
|
+
}], ["perpWeek", {
|
|
179
|
+
accountValueHistory: [number, string][];
|
|
180
|
+
pnlHistory: [number, string][];
|
|
181
|
+
vlm: string;
|
|
182
|
+
}], ["perpMonth", {
|
|
183
|
+
accountValueHistory: [number, string][];
|
|
184
|
+
pnlHistory: [number, string][];
|
|
185
|
+
vlm: string;
|
|
186
|
+
}], ["perpAllTime", {
|
|
187
|
+
accountValueHistory: [number, string][];
|
|
188
|
+
pnlHistory: [number, string][];
|
|
189
|
+
vlm: string;
|
|
190
|
+
}]], "Vault portfolio metrics grouped by time periods.">]>;
|
|
191
|
+
/** Annual percentage rate. */
|
|
192
|
+
readonly apr: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "Annual percentage rate.">]>;
|
|
193
|
+
/** Current user follower state */
|
|
194
|
+
readonly followerState: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
195
|
+
/** Follower address. */
|
|
196
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Follower address.">]>;
|
|
197
|
+
/** Follower vault equity. */
|
|
198
|
+
readonly vaultEquity: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Follower vault equity.">]>;
|
|
199
|
+
/** Current profit and loss. */
|
|
200
|
+
readonly pnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Current profit and loss.">]>;
|
|
201
|
+
/** All-time profit and loss. */
|
|
202
|
+
readonly allTimePnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "All-time profit and loss.">]>;
|
|
203
|
+
/** Subscription duration in days. */
|
|
204
|
+
readonly daysFollowing: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Subscription duration in days.">]>;
|
|
205
|
+
/** Vault entry timestamp. */
|
|
206
|
+
readonly vaultEntryTime: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Vault entry timestamp.">]>;
|
|
207
|
+
/** Timestamp when funds become unlocked. */
|
|
208
|
+
readonly lockupUntil: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when funds become unlocked.">]>;
|
|
209
|
+
}, undefined>, v.DescriptionAction<{
|
|
210
|
+
user: `0x${string}`;
|
|
211
|
+
vaultEquity: string;
|
|
212
|
+
pnl: string;
|
|
213
|
+
allTimePnl: string;
|
|
214
|
+
daysFollowing: number;
|
|
215
|
+
vaultEntryTime: number;
|
|
216
|
+
lockupUntil: number;
|
|
217
|
+
}, "Vault follower state.">]>, undefined>, v.DescriptionAction<{
|
|
218
|
+
user: `0x${string}`;
|
|
219
|
+
vaultEquity: string;
|
|
220
|
+
pnl: string;
|
|
221
|
+
allTimePnl: string;
|
|
222
|
+
daysFollowing: number;
|
|
223
|
+
vaultEntryTime: number;
|
|
224
|
+
lockupUntil: number;
|
|
225
|
+
} | null, "Current user follower state">]>;
|
|
226
|
+
/** Ownership percentage held by leader. */
|
|
227
|
+
readonly leaderFraction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "Ownership percentage held by leader.">]>;
|
|
228
|
+
/** Leader commission percentage. */
|
|
229
|
+
readonly leaderCommission: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "Leader commission percentage.">]>;
|
|
230
|
+
/** Vault followers list. */
|
|
231
|
+
readonly followers: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
232
|
+
/** Follower address or Leader. */
|
|
233
|
+
readonly user: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.LiteralSchema<"Leader", undefined>], undefined>, v.DescriptionAction<`0x${string}` | "Leader", "Follower address or Leader.">]>;
|
|
234
|
+
readonly vaultEquity: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Follower vault equity.">]>;
|
|
235
|
+
readonly pnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Current profit and loss.">]>;
|
|
236
|
+
readonly allTimePnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "All-time profit and loss.">]>;
|
|
237
|
+
readonly daysFollowing: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Subscription duration in days.">]>;
|
|
238
|
+
readonly vaultEntryTime: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Vault entry timestamp.">]>;
|
|
239
|
+
readonly lockupUntil: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when funds become unlocked.">]>;
|
|
240
|
+
}, undefined>, undefined>, v.DescriptionAction<{
|
|
241
|
+
user: `0x${string}` | "Leader";
|
|
242
|
+
vaultEquity: string;
|
|
243
|
+
pnl: string;
|
|
244
|
+
allTimePnl: string;
|
|
245
|
+
daysFollowing: number;
|
|
246
|
+
vaultEntryTime: number;
|
|
247
|
+
lockupUntil: number;
|
|
248
|
+
}[], "Vault followers list.">]>;
|
|
249
|
+
/** Maximum distributable amount. */
|
|
250
|
+
readonly maxDistributable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "Maximum distributable amount.">]>;
|
|
251
|
+
/** Maximum withdrawable amount. */
|
|
252
|
+
readonly maxWithdrawable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "Maximum withdrawable amount.">]>;
|
|
253
|
+
/** Vault closure status. */
|
|
254
|
+
readonly isClosed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Vault closure status.">]>;
|
|
255
|
+
/** Vault relationship type. */
|
|
256
|
+
readonly relationship: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StrictObjectSchema<{
|
|
257
|
+
/** Relationship type. */
|
|
258
|
+
readonly type: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"normal", undefined>, v.LiteralSchema<"child", undefined>], undefined>, v.DescriptionAction<"normal" | "child", "Relationship type.">]>;
|
|
259
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
260
|
+
/** Relationship type. */
|
|
261
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"parent", undefined>, v.DescriptionAction<"parent", "Relationship type.">]>;
|
|
262
|
+
/** Child vault information. */
|
|
263
|
+
readonly data: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
264
|
+
/** Child vault addresses. */
|
|
265
|
+
readonly childAddresses: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, undefined>, v.DescriptionAction<`0x${string}`[], "Child vault addresses.">]>;
|
|
266
|
+
}, undefined>, v.DescriptionAction<{
|
|
267
|
+
childAddresses: `0x${string}`[];
|
|
268
|
+
}, "Child vault information.">]>;
|
|
269
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
270
|
+
type: "normal" | "child";
|
|
271
|
+
} | {
|
|
272
|
+
type: "parent";
|
|
273
|
+
data: {
|
|
274
|
+
childAddresses: `0x${string}`[];
|
|
275
|
+
};
|
|
276
|
+
}, "Vault relationship configuration.">]>, v.DescriptionAction<{
|
|
277
|
+
type: "normal" | "child";
|
|
278
|
+
} | {
|
|
279
|
+
type: "parent";
|
|
280
|
+
data: {
|
|
281
|
+
childAddresses: `0x${string}`[];
|
|
282
|
+
};
|
|
283
|
+
}, "Vault relationship type.">]>;
|
|
284
|
+
/** Deposit permission status. */
|
|
285
|
+
readonly allowDeposits: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Deposit permission status.">]>;
|
|
286
|
+
/** Position closure policy on withdrawal. */
|
|
287
|
+
readonly alwaysCloseOnWithdraw: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Position closure policy on withdrawal.">]>;
|
|
288
|
+
}, undefined>, v.DescriptionAction<{
|
|
289
|
+
name: string;
|
|
290
|
+
vaultAddress: `0x${string}`;
|
|
291
|
+
leader: `0x${string}`;
|
|
292
|
+
description: string;
|
|
293
|
+
portfolio: [["day", {
|
|
294
|
+
accountValueHistory: [number, string][];
|
|
295
|
+
pnlHistory: [number, string][];
|
|
296
|
+
vlm: string;
|
|
297
|
+
}], ["week", {
|
|
298
|
+
accountValueHistory: [number, string][];
|
|
299
|
+
pnlHistory: [number, string][];
|
|
300
|
+
vlm: string;
|
|
301
|
+
}], ["month", {
|
|
302
|
+
accountValueHistory: [number, string][];
|
|
303
|
+
pnlHistory: [number, string][];
|
|
304
|
+
vlm: string;
|
|
305
|
+
}], ["allTime", {
|
|
306
|
+
accountValueHistory: [number, string][];
|
|
307
|
+
pnlHistory: [number, string][];
|
|
308
|
+
vlm: string;
|
|
309
|
+
}], ["perpDay", {
|
|
310
|
+
accountValueHistory: [number, string][];
|
|
311
|
+
pnlHistory: [number, string][];
|
|
312
|
+
vlm: string;
|
|
313
|
+
}], ["perpWeek", {
|
|
314
|
+
accountValueHistory: [number, string][];
|
|
315
|
+
pnlHistory: [number, string][];
|
|
316
|
+
vlm: string;
|
|
317
|
+
}], ["perpMonth", {
|
|
318
|
+
accountValueHistory: [number, string][];
|
|
319
|
+
pnlHistory: [number, string][];
|
|
320
|
+
vlm: string;
|
|
321
|
+
}], ["perpAllTime", {
|
|
322
|
+
accountValueHistory: [number, string][];
|
|
323
|
+
pnlHistory: [number, string][];
|
|
324
|
+
vlm: string;
|
|
325
|
+
}]];
|
|
326
|
+
apr: number;
|
|
327
|
+
followerState: {
|
|
328
|
+
user: `0x${string}`;
|
|
329
|
+
vaultEquity: string;
|
|
330
|
+
pnl: string;
|
|
331
|
+
allTimePnl: string;
|
|
332
|
+
daysFollowing: number;
|
|
333
|
+
vaultEntryTime: number;
|
|
334
|
+
lockupUntil: number;
|
|
335
|
+
} | null;
|
|
336
|
+
leaderFraction: number;
|
|
337
|
+
leaderCommission: number;
|
|
338
|
+
followers: {
|
|
339
|
+
user: `0x${string}` | "Leader";
|
|
340
|
+
vaultEquity: string;
|
|
341
|
+
pnl: string;
|
|
342
|
+
allTimePnl: string;
|
|
343
|
+
daysFollowing: number;
|
|
344
|
+
vaultEntryTime: number;
|
|
345
|
+
lockupUntil: number;
|
|
346
|
+
}[];
|
|
347
|
+
maxDistributable: number;
|
|
348
|
+
maxWithdrawable: number;
|
|
349
|
+
isClosed: boolean;
|
|
350
|
+
relationship: {
|
|
351
|
+
type: "normal" | "child";
|
|
352
|
+
} | {
|
|
353
|
+
type: "parent";
|
|
354
|
+
data: {
|
|
355
|
+
childAddresses: `0x${string}`[];
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
allowDeposits: boolean;
|
|
359
|
+
alwaysCloseOnWithdraw: boolean;
|
|
360
|
+
}, "Details about a vault.">]>;
|
|
361
|
+
export type VaultDetails = v.InferOutput<typeof VaultDetails>;
|
|
362
|
+
/** User vault equity details. */
|
|
363
|
+
export declare const VaultEquity: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
364
|
+
/** Vault address. */
|
|
365
|
+
readonly vaultAddress: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Vault address.">]>;
|
|
366
|
+
/** User deposited equity. */
|
|
367
|
+
readonly equity: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "User deposited equity.">]>;
|
|
368
|
+
/** Timestamp when the user can withdraw their equity. */
|
|
369
|
+
readonly lockedUntilTimestamp: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when the user can withdraw their equity.">]>;
|
|
370
|
+
}, undefined>, v.DescriptionAction<{
|
|
371
|
+
vaultAddress: `0x${string}`;
|
|
372
|
+
equity: string;
|
|
373
|
+
lockedUntilTimestamp: number;
|
|
374
|
+
}, "User vault equity details.">]>;
|
|
375
|
+
export type VaultEquity = v.InferOutput<typeof VaultEquity>;
|
|
376
|
+
/** Summary of a vault. */
|
|
377
|
+
export declare const VaultSummary: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
378
|
+
/** Vault name. */
|
|
379
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Vault name.">]>;
|
|
380
|
+
/** Vault address. */
|
|
381
|
+
readonly vaultAddress: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Vault address.">]>;
|
|
382
|
+
/** Leader address. */
|
|
383
|
+
readonly leader: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Leader address.">]>;
|
|
384
|
+
/** Total value locked. */
|
|
385
|
+
readonly tvl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total value locked.">]>;
|
|
386
|
+
/** Vault closure status. */
|
|
387
|
+
readonly isClosed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Vault closure status.">]>;
|
|
388
|
+
/** Vault relationship type. */
|
|
389
|
+
readonly relationship: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StrictObjectSchema<{
|
|
390
|
+
/** Relationship type. */
|
|
391
|
+
readonly type: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"normal", undefined>, v.LiteralSchema<"child", undefined>], undefined>, v.DescriptionAction<"normal" | "child", "Relationship type.">]>;
|
|
392
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
393
|
+
/** Relationship type. */
|
|
394
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"parent", undefined>, v.DescriptionAction<"parent", "Relationship type.">]>;
|
|
395
|
+
/** Child vault information. */
|
|
396
|
+
readonly data: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
397
|
+
/** Child vault addresses. */
|
|
398
|
+
readonly childAddresses: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, undefined>, v.DescriptionAction<`0x${string}`[], "Child vault addresses.">]>;
|
|
399
|
+
}, undefined>, v.DescriptionAction<{
|
|
400
|
+
childAddresses: `0x${string}`[];
|
|
401
|
+
}, "Child vault information.">]>;
|
|
402
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
403
|
+
type: "normal" | "child";
|
|
404
|
+
} | {
|
|
405
|
+
type: "parent";
|
|
406
|
+
data: {
|
|
407
|
+
childAddresses: `0x${string}`[];
|
|
408
|
+
};
|
|
409
|
+
}, "Vault relationship configuration.">]>, v.DescriptionAction<{
|
|
410
|
+
type: "normal" | "child";
|
|
411
|
+
} | {
|
|
412
|
+
type: "parent";
|
|
413
|
+
data: {
|
|
414
|
+
childAddresses: `0x${string}`[];
|
|
415
|
+
};
|
|
416
|
+
}, "Vault relationship type.">]>;
|
|
417
|
+
/** Creation timestamp. */
|
|
418
|
+
readonly createTimeMillis: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Creation timestamp.">]>;
|
|
419
|
+
}, undefined>, v.DescriptionAction<{
|
|
420
|
+
name: string;
|
|
421
|
+
vaultAddress: `0x${string}`;
|
|
422
|
+
leader: `0x${string}`;
|
|
423
|
+
tvl: string;
|
|
424
|
+
isClosed: boolean;
|
|
425
|
+
relationship: {
|
|
426
|
+
type: "normal" | "child";
|
|
427
|
+
} | {
|
|
428
|
+
type: "parent";
|
|
429
|
+
data: {
|
|
430
|
+
childAddresses: `0x${string}`[];
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
createTimeMillis: number;
|
|
434
|
+
}, "Summary of a vault.">]>;
|
|
435
|
+
export type VaultSummary = v.InferOutput<typeof VaultSummary>;
|
|
436
|
+
/** Vault that a user is leading. */
|
|
437
|
+
export declare const VaultLeading: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
438
|
+
/** Vault address. */
|
|
439
|
+
readonly address: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Vault address.">]>;
|
|
440
|
+
/** Vault name. */
|
|
441
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Vault name.">]>;
|
|
442
|
+
}, undefined>, v.DescriptionAction<{
|
|
443
|
+
address: `0x${string}`;
|
|
444
|
+
name: string;
|
|
445
|
+
}, "Vault that a user is leading.">]>;
|
|
446
|
+
export type VaultLeading = v.InferOutput<typeof VaultLeading>;
|
|
447
|
+
//# sourceMappingURL=vaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vaults.d.ts","sourceRoot":"","sources":["../../../../src/src/schemas/info/vaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAI7B,wCAAwC;AACxC,eAAO,MAAM,iBAAiB;IAGlB,yBAAyB;;;IAOzB,yBAAyB;;IAKzB,+BAA+B;;QAGvB,6BAA6B;;;;;;;;;;;;yCAWhD,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAExE,4BAA4B;AAC5B,eAAO,MAAM,kBAAkB;IAEvB,wBAAwB;;IAKxB,6BAA6B;;IAK7B,+BAA+B;;IAK/B,gCAAgC;;IAKhC,qCAAqC;;IAKrC,6BAA6B;;IAK7B,4CAA4C;;;;;;;;;;6BAOnD,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE1E,6BAA6B;AAC7B,eAAO,MAAM,YAAY;IAEjB,kBAAkB;;IAKlB,qBAAqB;;IAKrB,sBAAsB;;IAKtB,yBAAyB;;IAKzB,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKvD,8BAA8B;;IAK9B,kCAAkC;;QAzElC,wBAAwB;;QAKxB,6BAA6B;;QAK7B,+BAA+B;;QAK/B,gCAAgC;;QAKhC,qCAAqC;;QAKrC,6BAA6B;;QAK7B,4CAA4C;;;;;;;;;;;;;;;;;;;IAgD5C,2CAA2C;;IAK3C,oCAAoC;;IAKpC,4BAA4B;;QAMZ,kCAAkC;;;;;;;;;;;;;;;;;IAUlD,oCAAoC;;IAKpC,mCAAmC;;IAKnC,4BAA4B;;IAK5B,+BAA+B;;QAvJ3B,yBAAyB;;;QAOzB,yBAAyB;;QAKzB,+BAA+B;;YAGvB,6BAA6B;;;;;;;;;;;;;;;;;;;;IA6IzC,iCAAiC;;IAKjC,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAOpD,CAAC;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,YAAY,CAAC,CAAC;AAE9D,iCAAiC;AACjC,eAAO,MAAM,WAAW;IAEhB,qBAAqB;;IAKrB,6BAA6B;;IAK7B,yDAAyD;;;;;;kCAOhE,CAAC;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,WAAW,CAAC,CAAC;AAE5D,0BAA0B;AAC1B,eAAO,MAAM,YAAY;IAEjB,kBAAkB;;IAKlB,qBAAqB;;IAKrB,sBAAsB;;IAKtB,0BAA0B;;IAK1B,4BAA4B;;IAK5B,+BAA+B;;QA9N3B,yBAAyB;;;QAOzB,yBAAyB;;QAKzB,+BAA+B;;YAGvB,6BAA6B;;;;;;;;;;;;;;;;;;;;IAoNzC,0BAA0B;;;;;;;;;;;;;;;;;2BAOjC,CAAC;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,YAAY,CAAC,CAAC;AAE9D,oCAAoC;AACpC,eAAO,MAAM,YAAY;IAEjB,qBAAqB;;IAKrB,kBAAkB;;;;;qCAOzB,CAAC;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.VaultLeading = exports.VaultSummary = exports.VaultEquity = exports.VaultDetails = exports.VaultFollowerState = exports.VaultRelationship = void 0;
|
|
37
|
+
const v = __importStar(require("valibot"));
|
|
38
|
+
const _base_js_1 = require("../_base.js");
|
|
39
|
+
const accounts_js_1 = require("./accounts.js");
|
|
40
|
+
/** Vault relationship configuration. */
|
|
41
|
+
exports.VaultRelationship = v.pipe(v.union([
|
|
42
|
+
v.strictObject({
|
|
43
|
+
/** Relationship type. */
|
|
44
|
+
type: v.pipe(v.union([v.literal("normal"), v.literal("child")]), v.description("Relationship type.")),
|
|
45
|
+
}),
|
|
46
|
+
v.strictObject({
|
|
47
|
+
/** Relationship type. */
|
|
48
|
+
type: v.pipe(v.literal("parent"), v.description("Relationship type.")),
|
|
49
|
+
/** Child vault information. */
|
|
50
|
+
data: v.pipe(v.strictObject({
|
|
51
|
+
/** Child vault addresses. */
|
|
52
|
+
childAddresses: v.pipe(v.array(v.pipe(_base_js_1.Hex, v.length(42))), v.description("Child vault addresses.")),
|
|
53
|
+
}), v.description("Child vault information.")),
|
|
54
|
+
}),
|
|
55
|
+
]), v.description("Vault relationship configuration."));
|
|
56
|
+
/** Vault follower state. */
|
|
57
|
+
exports.VaultFollowerState = v.pipe(v.strictObject({
|
|
58
|
+
/** Follower address. */
|
|
59
|
+
user: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Follower address.")),
|
|
60
|
+
/** Follower vault equity. */
|
|
61
|
+
vaultEquity: v.pipe(_base_js_1.UnsignedDecimal, v.description("Follower vault equity.")),
|
|
62
|
+
/** Current profit and loss. */
|
|
63
|
+
pnl: v.pipe(_base_js_1.SignedDecimal, v.description("Current profit and loss.")),
|
|
64
|
+
/** All-time profit and loss. */
|
|
65
|
+
allTimePnl: v.pipe(_base_js_1.SignedDecimal, v.description("All-time profit and loss.")),
|
|
66
|
+
/** Subscription duration in days. */
|
|
67
|
+
daysFollowing: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Subscription duration in days.")),
|
|
68
|
+
/** Vault entry timestamp. */
|
|
69
|
+
vaultEntryTime: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Vault entry timestamp.")),
|
|
70
|
+
/** Timestamp when funds become unlocked. */
|
|
71
|
+
lockupUntil: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Timestamp when funds become unlocked.")),
|
|
72
|
+
}), v.description("Vault follower state."));
|
|
73
|
+
/** Details about a vault. */
|
|
74
|
+
exports.VaultDetails = v.pipe(v.strictObject({
|
|
75
|
+
/** Vault name. */
|
|
76
|
+
name: v.pipe(v.string(), v.description("Vault name.")),
|
|
77
|
+
/** Vault address. */
|
|
78
|
+
vaultAddress: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Vault address.")),
|
|
79
|
+
/** Leader address. */
|
|
80
|
+
leader: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Leader address.")),
|
|
81
|
+
/** Vault description. */
|
|
82
|
+
description: v.pipe(v.string(), v.description("Vault description.")),
|
|
83
|
+
/** Vault portfolio metrics grouped by time periods. */
|
|
84
|
+
portfolio: v.pipe(accounts_js_1.PortfolioPeriods, v.description("Vault portfolio metrics grouped by time periods.")),
|
|
85
|
+
/** Annual percentage rate. */
|
|
86
|
+
apr: v.pipe(v.number(), v.description("Annual percentage rate.")),
|
|
87
|
+
/** Current user follower state */
|
|
88
|
+
followerState: v.pipe(v.nullable(exports.VaultFollowerState), v.description("Current user follower state")),
|
|
89
|
+
/** Ownership percentage held by leader. */
|
|
90
|
+
leaderFraction: v.pipe(v.number(), v.description("Ownership percentage held by leader.")),
|
|
91
|
+
/** Leader commission percentage. */
|
|
92
|
+
leaderCommission: v.pipe(v.number(), v.description("Leader commission percentage.")),
|
|
93
|
+
/** Vault followers list. */
|
|
94
|
+
followers: v.pipe(v.array(v.strictObject({
|
|
95
|
+
...v.omit(v.strictObject(exports.VaultFollowerState.entries), ["user"]).entries,
|
|
96
|
+
...v.strictObject({
|
|
97
|
+
/** Follower address or Leader. */
|
|
98
|
+
user: v.pipe(v.union([v.pipe(_base_js_1.Hex, v.length(42)), v.literal("Leader")]), v.description("Follower address or Leader.")),
|
|
99
|
+
}).entries,
|
|
100
|
+
})), v.description("Vault followers list.")),
|
|
101
|
+
/** Maximum distributable amount. */
|
|
102
|
+
maxDistributable: v.pipe(v.number(), v.description("Maximum distributable amount.")),
|
|
103
|
+
/** Maximum withdrawable amount. */
|
|
104
|
+
maxWithdrawable: v.pipe(v.number(), v.description("Maximum withdrawable amount.")),
|
|
105
|
+
/** Vault closure status. */
|
|
106
|
+
isClosed: v.pipe(v.boolean(), v.description("Vault closure status.")),
|
|
107
|
+
/** Vault relationship type. */
|
|
108
|
+
relationship: v.pipe(exports.VaultRelationship, v.description("Vault relationship type.")),
|
|
109
|
+
/** Deposit permission status. */
|
|
110
|
+
allowDeposits: v.pipe(v.boolean(), v.description("Deposit permission status.")),
|
|
111
|
+
/** Position closure policy on withdrawal. */
|
|
112
|
+
alwaysCloseOnWithdraw: v.pipe(v.boolean(), v.description("Position closure policy on withdrawal.")),
|
|
113
|
+
}), v.description("Details about a vault."));
|
|
114
|
+
/** User vault equity details. */
|
|
115
|
+
exports.VaultEquity = v.pipe(v.strictObject({
|
|
116
|
+
/** Vault address. */
|
|
117
|
+
vaultAddress: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Vault address.")),
|
|
118
|
+
/** User deposited equity. */
|
|
119
|
+
equity: v.pipe(_base_js_1.UnsignedDecimal, v.description("User deposited equity.")),
|
|
120
|
+
/** Timestamp when the user can withdraw their equity. */
|
|
121
|
+
lockedUntilTimestamp: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Timestamp when the user can withdraw their equity.")),
|
|
122
|
+
}), v.description("User vault equity details."));
|
|
123
|
+
/** Summary of a vault. */
|
|
124
|
+
exports.VaultSummary = v.pipe(v.strictObject({
|
|
125
|
+
/** Vault name. */
|
|
126
|
+
name: v.pipe(v.string(), v.description("Vault name.")),
|
|
127
|
+
/** Vault address. */
|
|
128
|
+
vaultAddress: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Vault address.")),
|
|
129
|
+
/** Leader address. */
|
|
130
|
+
leader: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Leader address.")),
|
|
131
|
+
/** Total value locked. */
|
|
132
|
+
tvl: v.pipe(_base_js_1.UnsignedDecimal, v.description("Total value locked.")),
|
|
133
|
+
/** Vault closure status. */
|
|
134
|
+
isClosed: v.pipe(v.boolean(), v.description("Vault closure status.")),
|
|
135
|
+
/** Vault relationship type. */
|
|
136
|
+
relationship: v.pipe(exports.VaultRelationship, v.description("Vault relationship type.")),
|
|
137
|
+
/** Creation timestamp. */
|
|
138
|
+
createTimeMillis: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Creation timestamp.")),
|
|
139
|
+
}), v.description("Summary of a vault."));
|
|
140
|
+
/** Vault that a user is leading. */
|
|
141
|
+
exports.VaultLeading = v.pipe(v.strictObject({
|
|
142
|
+
/** Vault address. */
|
|
143
|
+
address: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Vault address.")),
|
|
144
|
+
/** Vault name. */
|
|
145
|
+
name: v.pipe(v.string(), v.description("Vault name.")),
|
|
146
|
+
}), v.description("Vault that a user is leading."));
|