sigint-os 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -0
- package/dist/index.cjs +23461 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +23444 -0
- package/package.json +32 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export interface Signal {
|
|
2
|
+
direction: "up" | "down";
|
|
3
|
+
confidence: number;
|
|
4
|
+
currentPrice: number;
|
|
5
|
+
resolveAt: number;
|
|
6
|
+
reasoning: string;
|
|
7
|
+
tradeHash: string | null;
|
|
8
|
+
onchainContext: {
|
|
9
|
+
fundingRate: number;
|
|
10
|
+
liquidationBias: "long-heavy" | "short-heavy" | "balanced";
|
|
11
|
+
dexCexVolumeRatio: number;
|
|
12
|
+
};
|
|
13
|
+
trackRecord: {
|
|
14
|
+
correct: number;
|
|
15
|
+
total: number;
|
|
16
|
+
tradePnl: number;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface SigintOptions {
|
|
20
|
+
/** Hex private key (0x...) of a wallet with USDC on Base */
|
|
21
|
+
privateKey: string;
|
|
22
|
+
/** Override signal endpoint (defaults to live SIGINT agent) */
|
|
23
|
+
endpoint?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get an ETH direction signal from the SIGINT agent.
|
|
27
|
+
* Automatically pays $0.05–$0.20 USDC via x402.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const signal = await getEthSignal({ privateKey: process.env.WALLET_KEY })
|
|
31
|
+
* console.log(signal.direction) // "up" | "down"
|
|
32
|
+
* console.log(signal.tradeHash) // agent's on-chain trade, verified before response
|
|
33
|
+
*/
|
|
34
|
+
export declare function getEthSignal(options: SigintOptions): Promise<Signal>;
|
|
35
|
+
/**
|
|
36
|
+
* Reusable client for repeated signal calls.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* const sigint = new SigintClient({ privateKey: process.env.WALLET_KEY })
|
|
40
|
+
* const signal = await sigint.getSignal()
|
|
41
|
+
*/
|
|
42
|
+
export declare class SigintClient {
|
|
43
|
+
private pinion;
|
|
44
|
+
private endpoint;
|
|
45
|
+
constructor(options: SigintOptions);
|
|
46
|
+
getSignal(): Promise<Signal>;
|
|
47
|
+
}
|