visionclaw 0.1.220-dev.fix-linux-rdp-openbox.1 → 0.1.220-dev.fix-linux-rdp-openbox.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 (51) hide show
  1. package/dist/agent/engines/claude/session.d.ts.map +1 -1
  2. package/dist/agent/engines/claude/session.js +1 -0
  3. package/dist/agent/engines/claude/session.js.map +1 -1
  4. package/dist/agent/engines/pi/tools.d.ts +2 -0
  5. package/dist/agent/engines/pi/tools.d.ts.map +1 -1
  6. package/dist/agent/engines/pi/tools.js +3 -0
  7. package/dist/agent/engines/pi/tools.js.map +1 -1
  8. package/dist/agent/engines/pi-coding/session.d.ts.map +1 -1
  9. package/dist/agent/engines/pi-coding/session.js +1 -0
  10. package/dist/agent/engines/pi-coding/session.js.map +1 -1
  11. package/dist/agent/engines/pi-coding/tools.d.ts +1 -0
  12. package/dist/agent/engines/pi-coding/tools.d.ts.map +1 -1
  13. package/dist/agent/engines/pi-coding/tools.js.map +1 -1
  14. package/dist/agent/runtime-surface.js +2 -2
  15. package/dist/agent/runtime-surface.js.map +1 -1
  16. package/dist/builtin-skills/rethinka-fund/SKILL.md +120 -5
  17. package/dist/builtin-skills/rethinka-fund/core-contract.md +25 -23
  18. package/dist/channels/rethinka-fund.d.ts +6 -2
  19. package/dist/channels/rethinka-fund.d.ts.map +1 -1
  20. package/dist/channels/rethinka-fund.js +125 -14
  21. package/dist/channels/rethinka-fund.js.map +1 -1
  22. package/dist/rethinka-fund/hyperliquid-signing.d.ts +56 -0
  23. package/dist/rethinka-fund/hyperliquid-signing.d.ts.map +1 -0
  24. package/dist/rethinka-fund/hyperliquid-signing.js +159 -0
  25. package/dist/rethinka-fund/hyperliquid-signing.js.map +1 -0
  26. package/dist/rethinka-fund/hyperliquid-trading.d.ts +131 -0
  27. package/dist/rethinka-fund/hyperliquid-trading.d.ts.map +1 -0
  28. package/dist/rethinka-fund/hyperliquid-trading.js +516 -0
  29. package/dist/rethinka-fund/hyperliquid-trading.js.map +1 -0
  30. package/dist/rethinka-fund/polymarket-trading.d.ts +125 -0
  31. package/dist/rethinka-fund/polymarket-trading.d.ts.map +1 -0
  32. package/dist/rethinka-fund/polymarket-trading.js +374 -0
  33. package/dist/rethinka-fund/polymarket-trading.js.map +1 -0
  34. package/dist/rethinka-fund/trading-common.d.ts +82 -0
  35. package/dist/rethinka-fund/trading-common.d.ts.map +1 -0
  36. package/dist/rethinka-fund/trading-common.js +87 -0
  37. package/dist/rethinka-fund/trading-common.js.map +1 -0
  38. package/dist/service/systemd.d.ts +0 -10
  39. package/dist/service/systemd.d.ts.map +1 -1
  40. package/dist/service/systemd.js +2 -49
  41. package/dist/service/systemd.js.map +1 -1
  42. package/dist/tools/index.d.ts +5 -0
  43. package/dist/tools/index.d.ts.map +1 -1
  44. package/dist/tools/index.js +2 -0
  45. package/dist/tools/index.js.map +1 -1
  46. package/dist/tools/rethinka-fund-trading.d.ts +75 -0
  47. package/dist/tools/rethinka-fund-trading.d.ts.map +1 -0
  48. package/dist/tools/rethinka-fund-trading.js +60 -0
  49. package/dist/tools/rethinka-fund-trading.js.map +1 -0
  50. package/dist-agent/bundle.cjs +2 -2
  51. package/package.json +3 -1
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Signing of Hyperliquid exchange ("L1") actions.
3
+ *
4
+ * A port of the official Python SDK's `sign_l1_action`
5
+ * (hyperliquid-python-sdk, hyperliquid/utils/signing.py), checked against
6
+ * that SDK's own test vectors in tests/unit/rethinka-fund/hyperliquid-signing.test.ts.
7
+ * There is no official TypeScript SDK, and this path moves money, so it is
8
+ * kept small and dependency-free apart from `ox` for the curve and hashing.
9
+ *
10
+ * The scheme: msgpack the action (key order matters), append the nonce, a
11
+ * vault marker and optionally an expiry, keccak the lot, and sign that hash
12
+ * as the `connectionId` of an EIP-712 "Agent" message.
13
+ */
14
+ export type ActionValue = string | number | boolean | null | ActionValue[] | {
15
+ [key: string]: ActionValue;
16
+ };
17
+ export interface L1Signature {
18
+ r: `0x${string}`;
19
+ s: `0x${string}`;
20
+ v: number;
21
+ }
22
+ /**
23
+ * msgpack, as Python's `msgpack.packb` writes it, for the values an action
24
+ * holds: maps (in insertion order), arrays, strings, integers, booleans and
25
+ * null. A float is refused: prices and sizes travel as strings.
26
+ */
27
+ export declare function msgpack(value: ActionValue): Uint8Array;
28
+ export interface L1SignInput {
29
+ action: ActionValue;
30
+ /** Milliseconds; also the replay protection. */
31
+ nonce: number;
32
+ /** Set only when trading for a vault or sub-account. */
33
+ vaultAddress?: string | null;
34
+ /** Milliseconds after which the exchange refuses the action. */
35
+ expiresAfter?: number | null;
36
+ }
37
+ /** The bytes whose keccak hash is signed: SDK `action_hash`, before hashing. */
38
+ export declare function actionHashInput(input: L1SignInput): Uint8Array;
39
+ export interface L1Signer {
40
+ /** The signer's own address, lowercase. */
41
+ address: `0x${string}`;
42
+ connectionId(input: L1SignInput): `0x${string}`;
43
+ sign(input: L1SignInput): L1Signature;
44
+ }
45
+ /**
46
+ * A signer for one private key. `mainnet` picks the phantom agent's source:
47
+ * "a" on mainnet, "b" on testnet; a signature for one is void on the other.
48
+ */
49
+ export declare function createL1Signer(privateKey: string, mainnet?: boolean): Promise<L1Signer>;
50
+ /**
51
+ * A price or size as the exchange wants it on the wire: plain decimal, at
52
+ * most 8 places, no trailing zeros, no exponent. Throws when the number has
53
+ * more precision than that, instead of silently changing an order.
54
+ */
55
+ export declare function floatToWire(x: number): string;
56
+ //# sourceMappingURL=hyperliquid-signing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hyperliquid-signing.d.ts","sourceRoot":"","sources":["../../src/rethinka-fund/hyperliquid-signing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,WAAW,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;CAAE,CAAC;AAE5G,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IACjB,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;CACX;AAsBD;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU,CAoCtD;AAUD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU,CAM9D;AAeD,MAAM,WAAW,QAAQ;IACvB,2CAA2C;IAC3C,OAAO,EAAE,KAAK,MAAM,EAAE,CAAC;IACvB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,KAAK,MAAM,EAAE,CAAC;IAChD,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC;CACvC;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,UAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAuB1F;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAM7C"}
@@ -0,0 +1,159 @@
1
+ /**
2
+ * Signing of Hyperliquid exchange ("L1") actions.
3
+ *
4
+ * A port of the official Python SDK's `sign_l1_action`
5
+ * (hyperliquid-python-sdk, hyperliquid/utils/signing.py), checked against
6
+ * that SDK's own test vectors in tests/unit/rethinka-fund/hyperliquid-signing.test.ts.
7
+ * There is no official TypeScript SDK, and this path moves money, so it is
8
+ * kept small and dependency-free apart from `ox` for the curve and hashing.
9
+ *
10
+ * The scheme: msgpack the action (key order matters), append the nonce, a
11
+ * vault marker and optionally an expiry, keccak the lot, and sign that hash
12
+ * as the `connectionId` of an EIP-712 "Agent" message.
13
+ */
14
+ function concat(parts) {
15
+ const out = new Uint8Array(parts.reduce((n, p) => n + p.length, 0));
16
+ let offset = 0;
17
+ for (const part of parts) {
18
+ out.set(part, offset);
19
+ offset += part.length;
20
+ }
21
+ return out;
22
+ }
23
+ function uintBytes(value, length) {
24
+ const out = new Uint8Array(length);
25
+ let rest = value;
26
+ for (let i = length - 1; i >= 0; i--) {
27
+ out[i] = Number(rest & 0xffn);
28
+ rest >>= 8n;
29
+ }
30
+ return out;
31
+ }
32
+ /**
33
+ * msgpack, as Python's `msgpack.packb` writes it, for the values an action
34
+ * holds: maps (in insertion order), arrays, strings, integers, booleans and
35
+ * null. A float is refused: prices and sizes travel as strings.
36
+ */
37
+ export function msgpack(value) {
38
+ if (value === null)
39
+ return Uint8Array.of(0xc0);
40
+ if (typeof value === "boolean")
41
+ return Uint8Array.of(value ? 0xc3 : 0xc2);
42
+ if (typeof value === "number") {
43
+ if (!Number.isSafeInteger(value))
44
+ throw new Error(`msgpack: ${value} is not a safe integer`);
45
+ if (value >= 0) {
46
+ if (value < 0x80)
47
+ return Uint8Array.of(value);
48
+ if (value < 0x100)
49
+ return Uint8Array.of(0xcc, value);
50
+ if (value < 0x10000)
51
+ return concat([Uint8Array.of(0xcd), uintBytes(BigInt(value), 2)]);
52
+ if (value < 0x100000000)
53
+ return concat([Uint8Array.of(0xce), uintBytes(BigInt(value), 4)]);
54
+ return concat([Uint8Array.of(0xcf), uintBytes(BigInt(value), 8)]);
55
+ }
56
+ if (value >= -32)
57
+ return Uint8Array.of(0x100 + value);
58
+ if (value >= -0x80)
59
+ return Uint8Array.of(0xd0, 0x100 + value);
60
+ if (value >= -0x8000)
61
+ return concat([Uint8Array.of(0xd1), uintBytes(BigInt.asUintN(16, BigInt(value)), 2)]);
62
+ if (value >= -0x80000000)
63
+ return concat([Uint8Array.of(0xd2), uintBytes(BigInt.asUintN(32, BigInt(value)), 4)]);
64
+ return concat([Uint8Array.of(0xd3), uintBytes(BigInt.asUintN(64, BigInt(value)), 8)]);
65
+ }
66
+ if (typeof value === "string") {
67
+ const bytes = new TextEncoder().encode(value);
68
+ const n = bytes.length;
69
+ const head = n < 32 ? Uint8Array.of(0xa0 | n)
70
+ : n < 0x100 ? Uint8Array.of(0xd9, n)
71
+ : n < 0x10000 ? concat([Uint8Array.of(0xda), uintBytes(BigInt(n), 2)])
72
+ : concat([Uint8Array.of(0xdb), uintBytes(BigInt(n), 4)]);
73
+ return concat([head, bytes]);
74
+ }
75
+ if (Array.isArray(value)) {
76
+ const n = value.length;
77
+ const head = n < 16 ? Uint8Array.of(0x90 | n) : n < 0x10000 ? concat([Uint8Array.of(0xdc), uintBytes(BigInt(n), 2)]) : concat([Uint8Array.of(0xdd), uintBytes(BigInt(n), 4)]);
78
+ return concat([head, ...value.map(msgpack)]);
79
+ }
80
+ const entries = Object.entries(value);
81
+ const n = entries.length;
82
+ const head = n < 16 ? Uint8Array.of(0x80 | n) : n < 0x10000 ? concat([Uint8Array.of(0xde), uintBytes(BigInt(n), 2)]) : concat([Uint8Array.of(0xdf), uintBytes(BigInt(n), 4)]);
83
+ return concat([head, ...entries.flatMap(([key, item]) => [msgpack(key), msgpack(item)])]);
84
+ }
85
+ function hexBytes(hex) {
86
+ const clean = hex.startsWith("0x") ? hex.slice(2) : hex;
87
+ if (clean.length % 2 !== 0 || !/^[0-9a-fA-F]*$/.test(clean))
88
+ throw new Error("not a hex string");
89
+ const out = new Uint8Array(clean.length / 2);
90
+ for (let i = 0; i < out.length; i++)
91
+ out[i] = parseInt(clean.slice(i * 2, i * 2 + 2), 16);
92
+ return out;
93
+ }
94
+ /** The bytes whose keccak hash is signed: SDK `action_hash`, before hashing. */
95
+ export function actionHashInput(input) {
96
+ const parts = [msgpack(input.action), uintBytes(BigInt(input.nonce), 8)];
97
+ if (input.vaultAddress)
98
+ parts.push(Uint8Array.of(0x01), hexBytes(input.vaultAddress));
99
+ else
100
+ parts.push(Uint8Array.of(0x00));
101
+ if (input.expiresAfter !== null && input.expiresAfter !== undefined)
102
+ parts.push(Uint8Array.of(0x00), uintBytes(BigInt(input.expiresAfter), 8));
103
+ return concat(parts);
104
+ }
105
+ const L1_TYPES = {
106
+ EIP712Domain: [
107
+ { name: "name", type: "string" },
108
+ { name: "version", type: "string" },
109
+ { name: "chainId", type: "uint256" },
110
+ { name: "verifyingContract", type: "address" },
111
+ ],
112
+ Agent: [
113
+ { name: "source", type: "string" },
114
+ { name: "connectionId", type: "bytes32" },
115
+ ],
116
+ };
117
+ /**
118
+ * A signer for one private key. `mainnet` picks the phantom agent's source:
119
+ * "a" on mainnet, "b" on testnet; a signature for one is void on the other.
120
+ */
121
+ export async function createL1Signer(privateKey, mainnet = true) {
122
+ const { Address, Hash, Hex, Secp256k1, TypedData } = await import("ox");
123
+ const key = privateKey;
124
+ const address = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey: key })).toLowerCase();
125
+ const connectionId = (input) => Hex.fromBytes(Hash.keccak256(actionHashInput(input)));
126
+ return {
127
+ address,
128
+ connectionId,
129
+ sign: (input) => {
130
+ const payload = TypedData.getSignPayload({
131
+ domain: { name: "Exchange", version: "1", chainId: 1337n, verifyingContract: "0x0000000000000000000000000000000000000000" },
132
+ types: L1_TYPES,
133
+ primaryType: "Agent",
134
+ message: { source: mainnet ? "a" : "b", connectionId: connectionId(input) },
135
+ });
136
+ const signature = Secp256k1.sign({ payload, privateKey: key });
137
+ return {
138
+ r: `0x${signature.r.toString(16).padStart(64, "0")}`,
139
+ s: `0x${signature.s.toString(16).padStart(64, "0")}`,
140
+ v: 27 + signature.yParity,
141
+ };
142
+ },
143
+ };
144
+ }
145
+ /**
146
+ * A price or size as the exchange wants it on the wire: plain decimal, at
147
+ * most 8 places, no trailing zeros, no exponent. Throws when the number has
148
+ * more precision than that, instead of silently changing an order.
149
+ */
150
+ export function floatToWire(x) {
151
+ if (!Number.isFinite(x))
152
+ throw new Error(`not a finite number: ${x}`);
153
+ const rounded = x.toFixed(8);
154
+ if (Math.abs(Number(rounded) - x) >= 1e-12)
155
+ throw new Error(`${x} has more than 8 decimal places`);
156
+ const trimmed = rounded.includes(".") ? rounded.replace(/0+$/, "").replace(/\.$/, "") : rounded;
157
+ return trimmed === "-0" ? "0" : trimmed;
158
+ }
159
+ //# sourceMappingURL=hyperliquid-signing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hyperliquid-signing.js","sourceRoot":"","sources":["../../src/rethinka-fund/hyperliquid-signing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAUH,SAAS,MAAM,CAAC,KAAmB;IACjC,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IACpE,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACtB,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC;IACxB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,SAAS,CAAC,KAAa,EAAE,MAAc;IAC9C,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACnC,IAAI,IAAI,GAAG,KAAK,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;QAC9B,IAAI,KAAK,EAAE,CAAC;IACd,CAAC;IACD,OAAO,GAAG,CAAC;A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BACpD,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE;gBACpD,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,OAAO;aAC1B,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,CAAS;IACnC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAAC;IACtE,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC7B,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;IACnG,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAChG,OAAO,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,131 @@
1
+ /**
2
+ * Hyperliquid order placement for the Rethinka Fund agent.
3
+ *
4
+ * Deterministic code that ships with the agent, on the same pattern as the
5
+ * Polymarket tool (./polymarket-trading.ts): the model names a decision, and
6
+ * everything that matters is taken from that decision or checked against it.
7
+ *
8
+ * 1. The decision is read from the Rethinka Fund server, which says whether
9
+ * an order may be placed under it now. No decision, no order.
10
+ * 2. Instrument, side and reduce-only come from the decision. The price may
11
+ * not be worse than its limit, and the order must fit in what is left of
12
+ * its size.
13
+ * 3. For an order that can open or add to a perp position, the mandate's
14
+ * instrument switches and leverage cap are checked against the account's
15
+ * current leverage for that coin.
16
+ * 4. The order is recorded on the server, then signed on this host with the
17
+ * key from a local settings file and sent straight to Hyperliquid. There
18
+ * is no relay in between: the exchange is reachable from the agent's
19
+ * host, and a relay would hold no key and stop nothing.
20
+ * 5. The outcome is reported back. Every order carries a client order id
21
+ * and a short expiry, so when the answer is lost the tool asks the
22
+ * exchange what became of it instead of guessing.
23
+ *
24
+ * The settings file is written by the owner on this host, not through chat.
25
+ */
26
+ import { z } from "zod";
27
+ import { type FetchLike, type FundAccess, type KeyFileRead, type TradingResult } from "./trading-common.js";
28
+ export declare const HYPERLIQUID_SETTINGS_FILE = "rethinka-fund-hyperliquid.json";
29
+ export declare const HyperliquidSettingsSchema: z.ZodObject<{
30
+ privateKey: z.ZodString;
31
+ account: z.ZodString;
32
+ }, z.core.$strict>;
33
+ export type HyperliquidSettings = z.infer<typeof HyperliquidSettingsSchema>;
34
+ export declare function hyperliquidSettingsPath(): string;
35
+ export declare function readHyperliquidSettings(file?: string): KeyFileRead<HyperliquidSettings>;
36
+ export interface HyperliquidDeps extends FundAccess {
37
+ settingsFile?: string;
38
+ /** Network access to Hyperliquid; tests replace it. */
39
+ http?: FetchLike;
40
+ now?: () => number;
41
+ sleep?: (ms: number) => Promise<void>;
42
+ newId?: () => string;
43
+ }
44
+ type Json = Record<string, unknown>;
45
+ export interface HyperliquidAsset {
46
+ /** The number orders name the instrument by. */
47
+ asset: number;
48
+ /** The name info requests and open orders use: the coin for a perp, the pair name ("PURR/USDC", "@107") for spot. */
49
+ coin: string;
50
+ kind: "perp" | "spot";
51
+ szDecimals: number;
52
+ /** Perps only. */
53
+ maxLeverage: number | null;
54
+ }
55
+ /**
56
+ * A price the exchange accepts: at most 5 significant figures and at most
57
+ * (6 for perps, 8 for spot) minus szDecimals decimal places; whole numbers
58
+ * always pass. Rounded toward the cheaper side for the order, so the result
59
+ * is never worse than the price asked for: down for a buy, up for a sell.
60
+ */
61
+ export declare function roundPrice(price: number, asset: Pick<HyperliquidAsset, "kind" | "szDecimals">, isBuy: boolean): number;
62
+ /** A size the exchange accepts: szDecimals places, rounded down so an order is never larger than asked. */
63
+ export declare function roundSize(size: number, szDecimals: number): number;
64
+ export type ExchangeReply =
65
+ /** The exchange answered and its answer was read. */
66
+ {
67
+ answered: true;
68
+ body: Json;
69
+ }
70
+ /** No readable answer: the action may or may not have been applied. */
71
+ | {
72
+ answered: false;
73
+ why: string;
74
+ };
75
+ export type OrderKind = "limit" | "market" | "stop_loss" | "take_profit";
76
+ export interface HyperliquidOrderInput {
77
+ decisionId: number;
78
+ /** In units of the base asset (coins), not USD. */
79
+ size: number;
80
+ kind: OrderKind;
81
+ /** The limit price. Left out, the decision's own limit price is used. */
82
+ price?: number;
83
+ /** For a limit order: rest until cancelled, immediate-or-cancel, or add-liquidity-only. */
84
+ timeInForce?: "Gtc" | "Ioc" | "Alo";
85
+ /** For stop_loss and take_profit: the price that triggers the order. */
86
+ triggerPrice?: number;
87
+ /** For stop_loss and take_profit: fill at market once triggered (default), or rest as a limit order. */
88
+ triggerIsMarket?: boolean;
89
+ }
90
+ interface Outcome {
91
+ status: "submitted" | "rejected" | "unknown";
92
+ detail: string;
93
+ orderId: string | null;
94
+ /** Coins filled at once, when the exchange said. */
95
+ filled?: {
96
+ size: string;
97
+ averagePrice: string;
98
+ };
99
+ }
100
+ /** What the exchange's reply to an order action says became of the one order in it. */
101
+ export declare function readOrderReply(body: Json): Outcome | null;
102
+ /** What `orderStatus` says about an order looked up by its client order id. */
103
+ export declare function readOrderStatus(data: unknown): Outcome | "not_found" | null;
104
+ /**
105
+ * Place one order under a recorded decision. Never throws: every outcome is a
106
+ * result the model can read, with the reason when nothing was placed.
107
+ */
108
+ export declare function placeHyperliquidOrder(input: HyperliquidOrderInput, deps: HyperliquidDeps): Promise<TradingResult>;
109
+ export declare function cancelHyperliquidOrder(input: {
110
+ symbol: string;
111
+ orderId: number;
112
+ }, deps: HyperliquidDeps): Promise<TradingResult>;
113
+ export declare function listHyperliquidOpenOrders(deps: HyperliquidDeps): Promise<TradingResult>;
114
+ /** Look one order up by the exchange's order id or by the client order id a placement returned. */
115
+ export declare function getHyperliquidOrderStatus(input: {
116
+ order: string;
117
+ }, deps: HyperliquidDeps): Promise<TradingResult>;
118
+ /**
119
+ * Set the account's leverage for one perp, within the mandate's cap. Raising
120
+ * leverage is a risk decision the owner bounded in the mandate; without a cap
121
+ * there, the tool does not guess one.
122
+ */
123
+ export declare function setHyperliquidLeverage(input: {
124
+ symbol: string;
125
+ leverage: number;
126
+ cross: boolean;
127
+ }, deps: HyperliquidDeps): Promise<TradingResult>;
128
+ /** Tests only: forget the instrument list, signers and nonces. */
129
+ export declare function resetHyperliquidForTest(): void;
130
+ export {};
131
+ //# sourceMappingURL=hyperliquid-trading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hyperliquid-trading.d.ts","sourceRoot":"","sources":["../../src/rethinka-fund/hyperliquid-trading.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAA+D,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzK,eAAO,MAAM,yBAAyB,mCAAmC,CAAC;AAM1E,eAAO,MAAM,yBAAyB;;;kBAK3B,CAAC;AAEZ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,GAAE,MAAkC,GAAG,WAAW,CAAC,mBAAmB,CAAC,CAElH;AAED,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,u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