torque-node 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Torque
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,79 @@
1
+ # torque-node
2
+
3
+ Unified **server-side** Torque Platform SDK — one install for Intelligence feeds, Assistant chat, and the capabilities manifest.
4
+
5
+ Uses the same business API key as Checkout (`sk_live_…`).
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ yarn add torque-node
11
+ ```
12
+
13
+ Pulls in `torque-intelligence`, `torque-assistant`, and `@torquefi/types` as dependencies.
14
+
15
+ ## Quick start
16
+
17
+ ```ts
18
+ import { createTorqueFromEnv } from 'torque-node'
19
+
20
+ const torque = createTorqueFromEnv()
21
+
22
+ const feed = await torque.intelligence.feed({
23
+ walletAddress: '0x…',
24
+ chainId: 8453,
25
+ includeBrief: true,
26
+ })
27
+
28
+ const reply = await torque.assistant.chat({
29
+ messages: [{ role: 'user', content: 'Summarize my portfolio' }],
30
+ context: { walletAddress: '0x…', chainId: 8453 },
31
+ })
32
+
33
+ const caps = await torque.capabilities()
34
+ torque.assertManifestCompatibility(caps.manifestVersion)
35
+ ```
36
+
37
+ ## Configuration
38
+
39
+ ```ts
40
+ import { createTorque } from 'torque-node'
41
+
42
+ const torque = createTorque({
43
+ apiKey: process.env.TORQUE_API_KEY!,
44
+ baseUrl: 'https://app.torque.fi',
45
+ intelligenceTimeout: 30_000,
46
+ assistantTimeout: 180_000,
47
+ cooldownRetries: 1,
48
+ })
49
+ ```
50
+
51
+ **Environment variables:** `TORQUE_API_KEY`, optional `TORQUE_BASE_URL`.
52
+
53
+ ## Subpath exports
54
+
55
+ Use standalone surfaces when you only need one product area:
56
+
57
+ ```ts
58
+ import { TorqueIntelligenceClient } from 'torque-node/intelligence'
59
+ import { createTorqueAssistant } from 'torque-node/assistant'
60
+ ```
61
+
62
+ ## Namespaces
63
+
64
+ | Namespace | Methods |
65
+ |-----------|---------|
66
+ | `torque.intelligence` | `feed`, `tradeAngles`, `happeningNow`, `getCapabilities`, `assertManifestCompatibility` |
67
+ | `torque.assistant` | `chat`, `chatStream` |
68
+ | `torque` | `capabilities()`, `assertManifestCompatibility()` |
69
+
70
+ Roadmap-friendly aliases (`feed`) map to the same HTTP routes as `torque-intelligence` (`getFeed`, etc.).
71
+
72
+ ## Docs
73
+
74
+ - [SDK roadmap](../../public/docs/developer/SDK_ROADMAP.md)
75
+ - [Torque API v1](../../public/docs/developer/TORQUE_API_V1.md)
76
+
77
+ ## License
78
+
79
+ MIT
@@ -0,0 +1,2 @@
1
+ export { TorqueAssistant, TorqueAssistantCreditsError, TorqueAssistantError, ASSISTANT_CREDITS_ERROR_CODE, createTorqueAssistant, createTorqueAssistantFromEnv, } from 'torque-assistant';
2
+ export type { AssistantChatContext, AssistantChatFunctionResult, AssistantChatMessage, AssistantChatPostBody, AssistantChatRequest, AssistantChatResponse, AssistantChatStreamEvent, AssistantChatStreamOptions, TorqueAssistantConfig, TorqueAssistantOptions, } from 'torque-assistant';
@@ -0,0 +1,2 @@
1
+ export { ASSISTANT_CREDITS_ERROR_CODE, TorqueAssistant, TorqueAssistantCreditsError, TorqueAssistantError, createTorqueAssistant, createTorqueAssistantFromEnv } from 'torque-assistant';
2
+ //# sourceMappingURL=assistant.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistant.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ var torqueAssistant = require('torque-assistant');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "ASSISTANT_CREDITS_ERROR_CODE", {
8
+ enumerable: true,
9
+ get: function () { return torqueAssistant.ASSISTANT_CREDITS_ERROR_CODE; }
10
+ });
11
+ Object.defineProperty(exports, "TorqueAssistant", {
12
+ enumerable: true,
13
+ get: function () { return torqueAssistant.TorqueAssistant; }
14
+ });
15
+ Object.defineProperty(exports, "TorqueAssistantCreditsError", {
16
+ enumerable: true,
17
+ get: function () { return torqueAssistant.TorqueAssistantCreditsError; }
18
+ });
19
+ Object.defineProperty(exports, "TorqueAssistantError", {
20
+ enumerable: true,
21
+ get: function () { return torqueAssistant.TorqueAssistantError; }
22
+ });
23
+ Object.defineProperty(exports, "createTorqueAssistant", {
24
+ enumerable: true,
25
+ get: function () { return torqueAssistant.createTorqueAssistant; }
26
+ });
27
+ Object.defineProperty(exports, "createTorqueAssistantFromEnv", {
28
+ enumerable: true,
29
+ get: function () { return torqueAssistant.createTorqueAssistantFromEnv; }
30
+ });
31
+ //# sourceMappingURL=assistant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistant.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,36 @@
1
+ import type { TorqueCapabilitiesProbe, TorquePlatformClientConfig } from '@torquefi/types/platform';
2
+ import { TorqueAssistant } from 'torque-assistant';
3
+ import { TorqueIntelligenceClient } from './intelligence';
4
+ export type TorqueNodeOptions = TorquePlatformClientConfig & {
5
+ /** Intelligence GET timeout in ms (default 30_000). */
6
+ intelligenceTimeout?: number;
7
+ /** Assistant POST timeout in ms (default 180_000). */
8
+ assistantTimeout?: number;
9
+ /** Retries after 429 COOLDOWN on Intelligence routes (default 1). */
10
+ cooldownRetries?: number;
11
+ };
12
+ export declare class TorqueNodeError extends Error {
13
+ code: string;
14
+ statusCode: number;
15
+ constructor(message: string, code: string, statusCode?: number);
16
+ }
17
+ /** Unified Torque Platform client for server integrators. */
18
+ export declare class Torque {
19
+ readonly intelligence: TorqueIntelligenceClient;
20
+ readonly assistant: TorqueAssistant;
21
+ constructor(config: TorqueNodeOptions);
22
+ /** GET /api/v1/capabilities — manifest probe. */
23
+ capabilities(): Promise<TorqueCapabilitiesProbe>;
24
+ /** Throws when the server manifest is older than the SDK Intelligence schema expectation. */
25
+ assertManifestCompatibility(manifestVersion: number): void;
26
+ }
27
+ export declare function createTorque(config: TorqueNodeOptions): Torque;
28
+ /**
29
+ * Reads TORQUE_API_KEY and optional TORQUE_BASE_URL from the environment.
30
+ */
31
+ export declare function createTorqueFromEnv(overrides?: Partial<TorqueNodeOptions>): Torque;
32
+ export { TorqueIntelligenceClient } from './intelligence';
33
+ export { TorqueNodeError as TorqueError };
34
+ export { TorqueIntelligenceError, } from 'torque-intelligence';
35
+ export { TorqueAssistantError, TorqueAssistantCreditsError, ASSISTANT_CREDITS_ERROR_CODE, } from 'torque-assistant';
36
+ export type { TorqueNodeOptions as TorqueConfig };
@@ -0,0 +1,66 @@
1
+ import { TorqueAssistant } from 'torque-assistant';
2
+ export { ASSISTANT_CREDITS_ERROR_CODE, TorqueAssistantCreditsError, TorqueAssistantError } from 'torque-assistant';
3
+ import { TorqueIntelligenceClient } from './intelligence.esm.js';
4
+ export { TorqueIntelligenceError } from 'torque-intelligence';
5
+
6
+ class TorqueNodeError extends Error {
7
+ constructor(message, code, statusCode = 400) {
8
+ super(message);
9
+ this.name = 'TorqueNodeError';
10
+ this.code = code;
11
+ this.statusCode = statusCode;
12
+ Object.setPrototypeOf(this, TorqueNodeError.prototype);
13
+ }
14
+ }
15
+ /** Unified Torque Platform client for server integrators. */
16
+ class Torque {
17
+ constructor(config) {
18
+ if (!config.apiKey?.trim()) {
19
+ throw new TorqueNodeError('API key is required', 'INVALID_CONFIG');
20
+ }
21
+ const baseUrl = (config.baseUrl || 'https://app.torque.fi').replace(/\/$/, '');
22
+ const apiKey = config.apiKey.trim();
23
+ this.intelligence = new TorqueIntelligenceClient({
24
+ apiKey,
25
+ baseUrl,
26
+ timeout: config.intelligenceTimeout ?? config.timeout ?? 30000,
27
+ cooldownRetries: config.cooldownRetries,
28
+ });
29
+ this.assistant = new TorqueAssistant({
30
+ apiKey,
31
+ baseUrl,
32
+ timeout: config.assistantTimeout ?? config.timeout ?? 180000,
33
+ });
34
+ }
35
+ /** GET /api/v1/capabilities — manifest probe. */
36
+ async capabilities() {
37
+ return this.intelligence.getCapabilities();
38
+ }
39
+ /** Throws when the server manifest is older than the SDK Intelligence schema expectation. */
40
+ assertManifestCompatibility(manifestVersion) {
41
+ this.intelligence.assertManifestCompatibility(manifestVersion);
42
+ }
43
+ }
44
+ function createTorque(config) {
45
+ return new Torque(config);
46
+ }
47
+ /**
48
+ * Reads TORQUE_API_KEY and optional TORQUE_BASE_URL from the environment.
49
+ */
50
+ function createTorqueFromEnv(overrides) {
51
+ const apiKey = process.env.TORQUE_API_KEY || overrides?.apiKey;
52
+ if (!apiKey) {
53
+ throw new TorqueNodeError('TORQUE_API_KEY environment variable is required', 'MISSING_ENV_VARS');
54
+ }
55
+ return new Torque({
56
+ apiKey,
57
+ baseUrl: process.env.TORQUE_BASE_URL || overrides?.baseUrl,
58
+ timeout: overrides?.timeout,
59
+ intelligenceTimeout: overrides?.intelligenceTimeout,
60
+ assistantTimeout: overrides?.assistantTimeout,
61
+ cooldownRetries: overrides?.cooldownRetries,
62
+ });
63
+ }
64
+
65
+ export { Torque, TorqueNodeError as TorqueError, TorqueIntelligenceClient, TorqueNodeError, createTorque, createTorqueFromEnv };
66
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../src/index.ts"],"sourcesContent":["import type { TorqueCapabilitiesProbe, TorquePlatformClientConfig } from '@torquefi/types/platform'\n\nimport { TorqueAssistant } from 'torque-assistant'\nimport { TorqueIntelligenceClient } from './intelligence'\n\nexport type TorqueNodeOptions = TorquePlatformClientConfig & {\n /** Intelligence GET timeout in ms (default 30_000). */\n intelligenceTimeout?: number\n /** Assistant POST timeout in ms (default 180_000). */\n assistantTimeout?: number\n /** Retries after 429 COOLDOWN on Intelligence routes (default 1). */\n cooldownRetries?: number\n}\n\nexport class TorqueNodeError extends Error {\n code: string\n statusCode: number\n\n constructor(message: string, code: string, statusCode = 400) {\n super(message)\n this.name = 'TorqueNodeError'\n this.code = code\n this.statusCode = statusCode\n Object.setPrototypeOf(this, TorqueNodeError.prototype)\n }\n}\n\n/** Unified Torque Platform client for server integrators. */\nexport class Torque {\n readonly intelligence: TorqueIntelligenceClient\n readonly assistant: TorqueAssistant\n\n constructor(config: TorqueNodeOptions) {\n if (!config.apiKey?.trim()) {\n throw new TorqueNodeError('API key is required', 'INVALID_CONFIG')\n }\n\n const baseUrl = (config.baseUrl || 'https://app.torque.fi').replace(/\\/$/, '')\n const apiKey = config.apiKey.trim()\n\n this.intelligence = new TorqueIntelligenceClient({\n apiKey,\n baseUrl,\n timeout: config.intelligenceTimeout ?? config.timeout ?? 30_000,\n cooldownRetries: config.cooldownRetries,\n })\n\n this.assistant = new TorqueAssistant({\n apiKey,\n baseUrl,\n timeout: config.assistantTimeout ?? config.timeout ?? 180_000,\n })\n }\n\n /** GET /api/v1/capabilities — manifest probe. */\n async capabilities(): Promise<TorqueCapabilitiesProbe> {\n return this.intelligence.getCapabilities()\n }\n\n /** Throws when the server manifest is older than the SDK Intelligence schema expectation. */\n assertManifestCompatibility(manifestVersion: number): void {\n this.intelligence.assertManifestCompatibility(manifestVersion)\n }\n}\n\nexport function createTorque(config: TorqueNodeOptions): Torque {\n return new Torque(config)\n}\n\n/**\n * Reads TORQUE_API_KEY and optional TORQUE_BASE_URL from the environment.\n */\nexport function createTorqueFromEnv(overrides?: Partial<TorqueNodeOptions>): Torque {\n const apiKey = process.env.TORQUE_API_KEY || overrides?.apiKey\n if (!apiKey) {\n throw new TorqueNodeError('TORQUE_API_KEY environment variable is required', 'MISSING_ENV_VARS')\n }\n\n return new Torque({\n apiKey,\n baseUrl: process.env.TORQUE_BASE_URL || overrides?.baseUrl,\n timeout: overrides?.timeout,\n intelligenceTimeout: overrides?.intelligenceTimeout,\n assistantTimeout: overrides?.assistantTimeout,\n cooldownRetries: overrides?.cooldownRetries,\n })\n}\n\nexport { TorqueIntelligenceClient } from './intelligence'\nexport { TorqueNodeError as TorqueError }\n\nexport {\n TorqueIntelligenceError,\n} from 'torque-intelligence'\n\nexport {\n TorqueAssistantError,\n TorqueAssistantCreditsError,\n ASSISTANT_CREDITS_ERROR_CODE,\n} from 'torque-assistant'\n\nexport type { TorqueNodeOptions as TorqueConfig }\n"],"names":[],"mappings":";;;;;AAcM,MAAO,eAAgB,SAAQ,KAAK,CAAA;AAIxC,IAAA,WAAA,CAAY,OAAe,EAAE,IAAY,EAAE,UAAU,GAAG,GAAG,EAAA;QACzD,KAAK,CAAC,OAAO,CAAC;AACd,QAAA,IAAI,CAAC,IAAI,GAAG,iBAAiB;AAC7B,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU;QAC5B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC;IACxD;AACD;AAED;MACa,MAAM,CAAA;AAIjB,IAAA,WAAA,CAAY,MAAyB,EAAA;QACnC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;AAC1B,YAAA,MAAM,IAAI,eAAe,CAAC,qBAAqB,EAAE,gBAAgB,CAAC;QACpE;AAEA,QAAA,MAAM,OAAO,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,uBAAuB,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;QAC9E,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;AAEnC,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,wBAAwB,CAAC;YAC/C,MAAM;YACN,OAAO;YACP,OAAO,EAAE,MAAM,CAAC,mBAAmB,IAAI,MAAM,CAAC,OAAO,IAAI,KAAM;YAC/D,eAAe,EAAE,MAAM,CAAC,eAAe;AACxC,SAAA,CAAC;AAEF,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,eAAe,CAAC;YACnC,MAAM;YACN,OAAO;YACP,OAAO,EAAE,MAAM,CAAC,gBAAgB,IAAI,MAAM,CAAC,OAAO,IAAI,MAAO;AAC9D,SAAA,CAAC;IACJ;;AAGA,IAAA,MAAM,YAAY,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE;IAC5C;;AAGA,IAAA,2BAA2B,CAAC,eAAuB,EAAA;AACjD,QAAA,IAAI,CAAC,YAAY,CAAC,2BAA2B,CAAC,eAAe,CAAC;IAChE;AACD;AAEK,SAAU,YAAY,CAAC,MAAyB,EAAA;AACpD,IAAA,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC;AAC3B;AAEA;;AAEG;AACG,SAAU,mBAAmB,CAAC,SAAsC,EAAA;IACxE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,SAAS,EAAE,MAAM;IAC9D,IAAI,CAAC,MAAM,EAAE;AACX,QAAA,MAAM,IAAI,eAAe,CAAC,iDAAiD,EAAE,kBAAkB,CAAC;IAClG;IAEA,OAAO,IAAI,MAAM,CAAC;QAChB,MAAM;QACN,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,SAAS,EAAE,OAAO;QAC1D,OAAO,EAAE,SAAS,EAAE,OAAO;QAC3B,mBAAmB,EAAE,SAAS,EAAE,mBAAmB;QACnD,gBAAgB,EAAE,SAAS,EAAE,gBAAgB;QAC7C,eAAe,EAAE,SAAS,EAAE,eAAe;AAC5C,KAAA,CAAC;AACJ;;;;"}
package/dist/index.js ADDED
@@ -0,0 +1,88 @@
1
+ 'use strict';
2
+
3
+ var torqueAssistant = require('torque-assistant');
4
+ var intelligence = require('./intelligence.js');
5
+ var torqueIntelligence = require('torque-intelligence');
6
+
7
+ class TorqueNodeError extends Error {
8
+ constructor(message, code, statusCode = 400) {
9
+ super(message);
10
+ this.name = 'TorqueNodeError';
11
+ this.code = code;
12
+ this.statusCode = statusCode;
13
+ Object.setPrototypeOf(this, TorqueNodeError.prototype);
14
+ }
15
+ }
16
+ /** Unified Torque Platform client for server integrators. */
17
+ class Torque {
18
+ constructor(config) {
19
+ if (!config.apiKey?.trim()) {
20
+ throw new TorqueNodeError('API key is required', 'INVALID_CONFIG');
21
+ }
22
+ const baseUrl = (config.baseUrl || 'https://app.torque.fi').replace(/\/$/, '');
23
+ const apiKey = config.apiKey.trim();
24
+ this.intelligence = new intelligence.TorqueIntelligenceClient({
25
+ apiKey,
26
+ baseUrl,
27
+ timeout: config.intelligenceTimeout ?? config.timeout ?? 30000,
28
+ cooldownRetries: config.cooldownRetries,
29
+ });
30
+ this.assistant = new torqueAssistant.TorqueAssistant({
31
+ apiKey,
32
+ baseUrl,
33
+ timeout: config.assistantTimeout ?? config.timeout ?? 180000,
34
+ });
35
+ }
36
+ /** GET /api/v1/capabilities — manifest probe. */
37
+ async capabilities() {
38
+ return this.intelligence.getCapabilities();
39
+ }
40
+ /** Throws when the server manifest is older than the SDK Intelligence schema expectation. */
41
+ assertManifestCompatibility(manifestVersion) {
42
+ this.intelligence.assertManifestCompatibility(manifestVersion);
43
+ }
44
+ }
45
+ function createTorque(config) {
46
+ return new Torque(config);
47
+ }
48
+ /**
49
+ * Reads TORQUE_API_KEY and optional TORQUE_BASE_URL from the environment.
50
+ */
51
+ function createTorqueFromEnv(overrides) {
52
+ const apiKey = process.env.TORQUE_API_KEY || overrides?.apiKey;
53
+ if (!apiKey) {
54
+ throw new TorqueNodeError('TORQUE_API_KEY environment variable is required', 'MISSING_ENV_VARS');
55
+ }
56
+ return new Torque({
57
+ apiKey,
58
+ baseUrl: process.env.TORQUE_BASE_URL || overrides?.baseUrl,
59
+ timeout: overrides?.timeout,
60
+ intelligenceTimeout: overrides?.intelligenceTimeout,
61
+ assistantTimeout: overrides?.assistantTimeout,
62
+ cooldownRetries: overrides?.cooldownRetries,
63
+ });
64
+ }
65
+
66
+ Object.defineProperty(exports, "ASSISTANT_CREDITS_ERROR_CODE", {
67
+ enumerable: true,
68
+ get: function () { return torqueAssistant.ASSISTANT_CREDITS_ERROR_CODE; }
69
+ });
70
+ Object.defineProperty(exports, "TorqueAssistantCreditsError", {
71
+ enumerable: true,
72
+ get: function () { return torqueAssistant.TorqueAssistantCreditsError; }
73
+ });
74
+ Object.defineProperty(exports, "TorqueAssistantError", {
75
+ enumerable: true,
76
+ get: function () { return torqueAssistant.TorqueAssistantError; }
77
+ });
78
+ exports.TorqueIntelligenceClient = intelligence.TorqueIntelligenceClient;
79
+ Object.defineProperty(exports, "TorqueIntelligenceError", {
80
+ enumerable: true,
81
+ get: function () { return torqueIntelligence.TorqueIntelligenceError; }
82
+ });
83
+ exports.Torque = Torque;
84
+ exports.TorqueError = TorqueNodeError;
85
+ exports.TorqueNodeError = TorqueNodeError;
86
+ exports.createTorque = createTorque;
87
+ exports.createTorqueFromEnv = createTorqueFromEnv;
88
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { TorqueCapabilitiesProbe, TorquePlatformClientConfig } from '@torquefi/types/platform'\n\nimport { TorqueAssistant } from 'torque-assistant'\nimport { TorqueIntelligenceClient } from './intelligence'\n\nexport type TorqueNodeOptions = TorquePlatformClientConfig & {\n /** Intelligence GET timeout in ms (default 30_000). */\n intelligenceTimeout?: number\n /** Assistant POST timeout in ms (default 180_000). */\n assistantTimeout?: number\n /** Retries after 429 COOLDOWN on Intelligence routes (default 1). */\n cooldownRetries?: number\n}\n\nexport class TorqueNodeError extends Error {\n code: string\n statusCode: number\n\n constructor(message: string, code: string, statusCode = 400) {\n super(message)\n this.name = 'TorqueNodeError'\n this.code = code\n this.statusCode = statusCode\n Object.setPrototypeOf(this, TorqueNodeError.prototype)\n }\n}\n\n/** Unified Torque Platform client for server integrators. */\nexport class Torque {\n readonly intelligence: TorqueIntelligenceClient\n readonly assistant: TorqueAssistant\n\n constructor(config: TorqueNodeOptions) {\n if (!config.apiKey?.trim()) {\n throw new TorqueNodeError('API key is required', 'INVALID_CONFIG')\n }\n\n const baseUrl = (config.baseUrl || 'https://app.torque.fi').replace(/\\/$/, '')\n const apiKey = config.apiKey.trim()\n\n this.intelligence = new TorqueIntelligenceClient({\n apiKey,\n baseUrl,\n timeout: config.intelligenceTimeout ?? config.timeout ?? 30_000,\n cooldownRetries: config.cooldownRetries,\n })\n\n this.assistant = new TorqueAssistant({\n apiKey,\n baseUrl,\n timeout: config.assistantTimeout ?? config.timeout ?? 180_000,\n })\n }\n\n /** GET /api/v1/capabilities — manifest probe. */\n async capabilities(): Promise<TorqueCapabilitiesProbe> {\n return this.intelligence.getCapabilities()\n }\n\n /** Throws when the server manifest is older than the SDK Intelligence schema expectation. */\n assertManifestCompatibility(manifestVersion: number): void {\n this.intelligence.assertManifestCompatibility(manifestVersion)\n }\n}\n\nexport function createTorque(config: TorqueNodeOptions): Torque {\n return new Torque(config)\n}\n\n/**\n * Reads TORQUE_API_KEY and optional TORQUE_BASE_URL from the environment.\n */\nexport function createTorqueFromEnv(overrides?: Partial<TorqueNodeOptions>): Torque {\n const apiKey = process.env.TORQUE_API_KEY || overrides?.apiKey\n if (!apiKey) {\n throw new TorqueNodeError('TORQUE_API_KEY environment variable is required', 'MISSING_ENV_VARS')\n }\n\n return new Torque({\n apiKey,\n baseUrl: process.env.TORQUE_BASE_URL || overrides?.baseUrl,\n timeout: overrides?.timeout,\n intelligenceTimeout: overrides?.intelligenceTimeout,\n assistantTimeout: overrides?.assistantTimeout,\n cooldownRetries: overrides?.cooldownRetries,\n })\n}\n\nexport { TorqueIntelligenceClient } from './intelligence'\nexport { TorqueNodeError as TorqueError }\n\nexport {\n TorqueIntelligenceError,\n} from 'torque-intelligence'\n\nexport {\n TorqueAssistantError,\n TorqueAssistantCreditsError,\n ASSISTANT_CREDITS_ERROR_CODE,\n} from 'torque-assistant'\n\nexport type { TorqueNodeOptions as TorqueConfig }\n"],"names":["TorqueIntelligenceClient","TorqueAssistant"],"mappings":";;;;;;AAcM,MAAO,eAAgB,SAAQ,KAAK,CAAA;AAIxC,IAAA,WAAA,CAAY,OAAe,EAAE,IAAY,EAAE,UAAU,GAAG,GAAG,EAAA;QACzD,KAAK,CAAC,OAAO,CAAC;AACd,QAAA,IAAI,CAAC,IAAI,GAAG,iBAAiB;AAC7B,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU;QAC5B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC;IACxD;AACD;AAED;MACa,MAAM,CAAA;AAIjB,IAAA,WAAA,CAAY,MAAyB,EAAA;QACnC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;AAC1B,YAAA,MAAM,IAAI,eAAe,CAAC,qBAAqB,EAAE,gBAAgB,CAAC;QACpE;AAEA,QAAA,MAAM,OAAO,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,uBAAuB,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;QAC9E,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;AAEnC,QAAA,IAAI,CAAC,YAAY,GAAG,IAAIA,qCAAwB,CAAC;YAC/C,MAAM;YACN,OAAO;YACP,OAAO,EAAE,MAAM,CAAC,mBAAmB,IAAI,MAAM,CAAC,OAAO,IAAI,KAAM;YAC/D,eAAe,EAAE,MAAM,CAAC,eAAe;AACxC,SAAA,CAAC;AAEF,QAAA,IAAI,CAAC,SAAS,GAAG,IAAIC,+BAAe,CAAC;YACnC,MAAM;YACN,OAAO;YACP,OAAO,EAAE,MAAM,CAAC,gBAAgB,IAAI,MAAM,CAAC,OAAO,IAAI,MAAO;AAC9D,SAAA,CAAC;IACJ;;AAGA,IAAA,MAAM,YAAY,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE;IAC5C;;AAGA,IAAA,2BAA2B,CAAC,eAAuB,EAAA;AACjD,QAAA,IAAI,CAAC,YAAY,CAAC,2BAA2B,CAAC,eAAe,CAAC;IAChE;AACD;AAEK,SAAU,YAAY,CAAC,MAAyB,EAAA;AACpD,IAAA,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC;AAC3B;AAEA;;AAEG;AACG,SAAU,mBAAmB,CAAC,SAAsC,EAAA;IACxE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,SAAS,EAAE,MAAM;IAC9D,IAAI,CAAC,MAAM,EAAE;AACX,QAAA,MAAM,IAAI,eAAe,CAAC,iDAAiD,EAAE,kBAAkB,CAAC;IAClG;IAEA,OAAO,IAAI,MAAM,CAAC;QAChB,MAAM;QACN,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,SAAS,EAAE,OAAO;QAC1D,OAAO,EAAE,SAAS,EAAE,OAAO;QAC3B,mBAAmB,EAAE,SAAS,EAAE,mBAAmB;QACnD,gBAAgB,EAAE,SAAS,EAAE,gBAAgB;QAC7C,eAAe,EAAE,SAAS,EAAE,eAAe;AAC5C,KAAA,CAAC;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,22 @@
1
+ import type { GetHappeningNowParams, GetIntelligenceFeedParams, GetTradeAnglesParams, HappeningNowResponseV1, IntelligenceFeedResponseV1, TradeAnglesResponseV1 } from '@torquefi/types/intelligence';
2
+ import type { TorqueCapabilitiesProbe } from '@torquefi/types/platform';
3
+ import { type TorqueIntelligenceOptions } from 'torque-intelligence';
4
+ /** Intelligence namespace with roadmap-friendly method names (`feed`, etc.). */
5
+ export declare class TorqueIntelligenceClient {
6
+ private readonly client;
7
+ constructor(options: TorqueIntelligenceOptions);
8
+ /** Primary feed. Alias for {@link getFeed}. */
9
+ feed(params?: GetIntelligenceFeedParams): Promise<IntelligenceFeedResponseV1>;
10
+ getFeed(params?: GetIntelligenceFeedParams): Promise<IntelligenceFeedResponseV1>;
11
+ /** Alias for {@link getTradeAngles}. */
12
+ tradeAngles(params?: GetTradeAnglesParams): Promise<TradeAnglesResponseV1>;
13
+ getTradeAngles(params?: GetTradeAnglesParams): Promise<TradeAnglesResponseV1>;
14
+ /** Alias for {@link getHappeningNow}. */
15
+ happeningNow(params?: GetHappeningNowParams): Promise<HappeningNowResponseV1>;
16
+ getHappeningNow(params?: GetHappeningNowParams): Promise<HappeningNowResponseV1>;
17
+ getCapabilities(): Promise<TorqueCapabilitiesProbe>;
18
+ assertManifestCompatibility(manifestVersion: number): void;
19
+ }
20
+ export { TorqueIntelligence, TorqueIntelligenceError, createTorqueIntelligence, createTorqueIntelligenceFromEnv, } from 'torque-intelligence';
21
+ export type { GetHappeningNowParams, GetIntelligenceFeedParams, GetTradeAnglesParams, HappeningNowResponseV1, IntelligenceFeedResponseV1, IntelligenceItemV1, TradeAnglesResponseV1, } from 'torque-intelligence';
22
+ export type { TorqueIntelligenceOptions, TorqueIntelligenceConfig } from 'torque-intelligence';
@@ -0,0 +1,39 @@
1
+ import { TorqueIntelligence } from 'torque-intelligence';
2
+ export { TorqueIntelligence, TorqueIntelligenceError, createTorqueIntelligence, createTorqueIntelligenceFromEnv } from 'torque-intelligence';
3
+
4
+ /** Intelligence namespace with roadmap-friendly method names (`feed`, etc.). */
5
+ class TorqueIntelligenceClient {
6
+ constructor(options) {
7
+ this.client = new TorqueIntelligence(options);
8
+ }
9
+ /** Primary feed. Alias for {@link getFeed}. */
10
+ feed(params) {
11
+ return this.client.getFeed(params);
12
+ }
13
+ getFeed(params) {
14
+ return this.client.getFeed(params);
15
+ }
16
+ /** Alias for {@link getTradeAngles}. */
17
+ tradeAngles(params) {
18
+ return this.client.getTradeAngles(params);
19
+ }
20
+ getTradeAngles(params) {
21
+ return this.client.getTradeAngles(params);
22
+ }
23
+ /** Alias for {@link getHappeningNow}. */
24
+ happeningNow(params) {
25
+ return this.client.getHappeningNow(params);
26
+ }
27
+ getHappeningNow(params) {
28
+ return this.client.getHappeningNow(params);
29
+ }
30
+ getCapabilities() {
31
+ return this.client.getCapabilities();
32
+ }
33
+ assertManifestCompatibility(manifestVersion) {
34
+ this.client.assertManifestCompatibility(manifestVersion);
35
+ }
36
+ }
37
+
38
+ export { TorqueIntelligenceClient };
39
+ //# sourceMappingURL=intelligence.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intelligence.esm.js","sources":["../src/intelligence.ts"],"sourcesContent":["import type {\n GetHappeningNowParams,\n GetIntelligenceFeedParams,\n GetTradeAnglesParams,\n HappeningNowResponseV1,\n IntelligenceFeedResponseV1,\n TradeAnglesResponseV1,\n} from '@torquefi/types/intelligence'\nimport type { TorqueCapabilitiesProbe } from '@torquefi/types/platform'\nimport {\n TorqueIntelligence,\n type TorqueIntelligenceOptions,\n} from 'torque-intelligence'\n\n/** Intelligence namespace with roadmap-friendly method names (`feed`, etc.). */\nexport class TorqueIntelligenceClient {\n private readonly client: TorqueIntelligence\n\n constructor(options: TorqueIntelligenceOptions) {\n this.client = new TorqueIntelligence(options)\n }\n\n /** Primary feed. Alias for {@link getFeed}. */\n feed(params?: GetIntelligenceFeedParams): Promise<IntelligenceFeedResponseV1> {\n return this.client.getFeed(params)\n }\n\n getFeed(params?: GetIntelligenceFeedParams): Promise<IntelligenceFeedResponseV1> {\n return this.client.getFeed(params)\n }\n\n /** Alias for {@link getTradeAngles}. */\n tradeAngles(params?: GetTradeAnglesParams): Promise<TradeAnglesResponseV1> {\n return this.client.getTradeAngles(params)\n }\n\n getTradeAngles(params?: GetTradeAnglesParams): Promise<TradeAnglesResponseV1> {\n return this.client.getTradeAngles(params)\n }\n\n /** Alias for {@link getHappeningNow}. */\n happeningNow(params?: GetHappeningNowParams): Promise<HappeningNowResponseV1> {\n return this.client.getHappeningNow(params)\n }\n\n getHappeningNow(params?: GetHappeningNowParams): Promise<HappeningNowResponseV1> {\n return this.client.getHappeningNow(params)\n }\n\n getCapabilities(): Promise<TorqueCapabilitiesProbe> {\n return this.client.getCapabilities()\n }\n\n assertManifestCompatibility(manifestVersion: number): void {\n this.client.assertManifestCompatibility(manifestVersion)\n }\n}\n\nexport {\n TorqueIntelligence,\n TorqueIntelligenceError,\n createTorqueIntelligence,\n createTorqueIntelligenceFromEnv,\n} from 'torque-intelligence'\n\nexport type {\n GetHappeningNowParams,\n GetIntelligenceFeedParams,\n GetTradeAnglesParams,\n HappeningNowResponseV1,\n IntelligenceFeedResponseV1,\n IntelligenceItemV1,\n TradeAnglesResponseV1,\n} from 'torque-intelligence'\n\nexport type { TorqueIntelligenceOptions, TorqueIntelligenceConfig } from 'torque-intelligence'\n"],"names":[],"mappings":";;;AAcA;MACa,wBAAwB,CAAA;AAGnC,IAAA,WAAA,CAAY,OAAkC,EAAA;QAC5C,IAAI,CAAC,MAAM,GAAG,IAAI,kBAAkB,CAAC,OAAO,CAAC;IAC/C;;AAGA,IAAA,IAAI,CAAC,MAAkC,EAAA;QACrC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;IACpC;AAEA,IAAA,OAAO,CAAC,MAAkC,EAAA;QACxC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;IACpC;;AAGA,IAAA,WAAW,CAAC,MAA6B,EAAA;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC;IAC3C;AAEA,IAAA,cAAc,CAAC,MAA6B,EAAA;QAC1C,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC;IAC3C;;AAGA,IAAA,YAAY,CAAC,MAA8B,EAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC;IAC5C;AAEA,IAAA,eAAe,CAAC,MAA8B,EAAA;QAC5C,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC;IAC5C;IAEA,eAAe,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE;IACtC;AAEA,IAAA,2BAA2B,CAAC,eAAuB,EAAA;AACjD,QAAA,IAAI,CAAC,MAAM,CAAC,2BAA2B,CAAC,eAAe,CAAC;IAC1D;AACD;;;;"}
@@ -0,0 +1,56 @@
1
+ 'use strict';
2
+
3
+ var torqueIntelligence = require('torque-intelligence');
4
+
5
+ /** Intelligence namespace with roadmap-friendly method names (`feed`, etc.). */
6
+ class TorqueIntelligenceClient {
7
+ constructor(options) {
8
+ this.client = new torqueIntelligence.TorqueIntelligence(options);
9
+ }
10
+ /** Primary feed. Alias for {@link getFeed}. */
11
+ feed(params) {
12
+ return this.client.getFeed(params);
13
+ }
14
+ getFeed(params) {
15
+ return this.client.getFeed(params);
16
+ }
17
+ /** Alias for {@link getTradeAngles}. */
18
+ tradeAngles(params) {
19
+ return this.client.getTradeAngles(params);
20
+ }
21
+ getTradeAngles(params) {
22
+ return this.client.getTradeAngles(params);
23
+ }
24
+ /** Alias for {@link getHappeningNow}. */
25
+ happeningNow(params) {
26
+ return this.client.getHappeningNow(params);
27
+ }
28
+ getHappeningNow(params) {
29
+ return this.client.getHappeningNow(params);
30
+ }
31
+ getCapabilities() {
32
+ return this.client.getCapabilities();
33
+ }
34
+ assertManifestCompatibility(manifestVersion) {
35
+ this.client.assertManifestCompatibility(manifestVersion);
36
+ }
37
+ }
38
+
39
+ Object.defineProperty(exports, "TorqueIntelligence", {
40
+ enumerable: true,
41
+ get: function () { return torqueIntelligence.TorqueIntelligence; }
42
+ });
43
+ Object.defineProperty(exports, "TorqueIntelligenceError", {
44
+ enumerable: true,
45
+ get: function () { return torqueIntelligence.TorqueIntelligenceError; }
46
+ });
47
+ Object.defineProperty(exports, "createTorqueIntelligence", {
48
+ enumerable: true,
49
+ get: function () { return torqueIntelligence.createTorqueIntelligence; }
50
+ });
51
+ Object.defineProperty(exports, "createTorqueIntelligenceFromEnv", {
52
+ enumerable: true,
53
+ get: function () { return torqueIntelligence.createTorqueIntelligenceFromEnv; }
54
+ });
55
+ exports.TorqueIntelligenceClient = TorqueIntelligenceClient;
56
+ //# sourceMappingURL=intelligence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intelligence.js","sources":["../src/intelligence.ts"],"sourcesContent":["import type {\n GetHappeningNowParams,\n GetIntelligenceFeedParams,\n GetTradeAnglesParams,\n HappeningNowResponseV1,\n IntelligenceFeedResponseV1,\n TradeAnglesResponseV1,\n} from '@torquefi/types/intelligence'\nimport type { TorqueCapabilitiesProbe } from '@torquefi/types/platform'\nimport {\n TorqueIntelligence,\n type TorqueIntelligenceOptions,\n} from 'torque-intelligence'\n\n/** Intelligence namespace with roadmap-friendly method names (`feed`, etc.). */\nexport class TorqueIntelligenceClient {\n private readonly client: TorqueIntelligence\n\n constructor(options: TorqueIntelligenceOptions) {\n this.client = new TorqueIntelligence(options)\n }\n\n /** Primary feed. Alias for {@link getFeed}. */\n feed(params?: GetIntelligenceFeedParams): Promise<IntelligenceFeedResponseV1> {\n return this.client.getFeed(params)\n }\n\n getFeed(params?: GetIntelligenceFeedParams): Promise<IntelligenceFeedResponseV1> {\n return this.client.getFeed(params)\n }\n\n /** Alias for {@link getTradeAngles}. */\n tradeAngles(params?: GetTradeAnglesParams): Promise<TradeAnglesResponseV1> {\n return this.client.getTradeAngles(params)\n }\n\n getTradeAngles(params?: GetTradeAnglesParams): Promise<TradeAnglesResponseV1> {\n return this.client.getTradeAngles(params)\n }\n\n /** Alias for {@link getHappeningNow}. */\n happeningNow(params?: GetHappeningNowParams): Promise<HappeningNowResponseV1> {\n return this.client.getHappeningNow(params)\n }\n\n getHappeningNow(params?: GetHappeningNowParams): Promise<HappeningNowResponseV1> {\n return this.client.getHappeningNow(params)\n }\n\n getCapabilities(): Promise<TorqueCapabilitiesProbe> {\n return this.client.getCapabilities()\n }\n\n assertManifestCompatibility(manifestVersion: number): void {\n this.client.assertManifestCompatibility(manifestVersion)\n }\n}\n\nexport {\n TorqueIntelligence,\n TorqueIntelligenceError,\n createTorqueIntelligence,\n createTorqueIntelligenceFromEnv,\n} from 'torque-intelligence'\n\nexport type {\n GetHappeningNowParams,\n GetIntelligenceFeedParams,\n GetTradeAnglesParams,\n HappeningNowResponseV1,\n IntelligenceFeedResponseV1,\n IntelligenceItemV1,\n TradeAnglesResponseV1,\n} from 'torque-intelligence'\n\nexport type { TorqueIntelligenceOptions, TorqueIntelligenceConfig } from 'torque-intelligence'\n"],"names":["TorqueIntelligence"],"mappings":";;;;AAcA;MACa,wBAAwB,CAAA;AAGnC,IAAA,WAAA,CAAY,OAAkC,EAAA;QAC5C,IAAI,CAAC,MAAM,GAAG,IAAIA,qCAAkB,CAAC,OAAO,CAAC;IAC/C;;AAGA,IAAA,IAAI,CAAC,MAAkC,EAAA;QACrC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;IACpC;AAEA,IAAA,OAAO,CAAC,MAAkC,EAAA;QACxC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;IACpC;;AAGA,IAAA,WAAW,CAAC,MAA6B,EAAA;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC;IAC3C;AAEA,IAAA,cAAc,CAAC,MAA6B,EAAA;QAC1C,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC;IAC3C;;AAGA,IAAA,YAAY,CAAC,MAA8B,EAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC;IAC5C;AAEA,IAAA,eAAe,CAAC,MAA8B,EAAA;QAC5C,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC;IAC5C;IAEA,eAAe,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE;IACtC;AAEA,IAAA,2BAA2B,CAAC,eAAuB,EAAA;AACjD,QAAA,IAAI,CAAC,MAAM,CAAC,2BAA2B,CAAC,eAAe,CAAC;IAC1D;AACD;;;;;;;;;;;;;;;;;;;;"}
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "torque-node",
3
+ "version": "0.1.0",
4
+ "description": "Unified Torque Platform SDK for server integrators — Intelligence, Assistant, and capabilities",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.esm.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.esm.js",
11
+ "require": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ },
14
+ "./intelligence": {
15
+ "import": "./dist/intelligence.esm.js",
16
+ "require": "./dist/intelligence.js",
17
+ "types": "./dist/intelligence.d.ts"
18
+ },
19
+ "./assistant": {
20
+ "import": "./dist/assistant.esm.js",
21
+ "require": "./dist/assistant.js",
22
+ "types": "./dist/assistant.d.ts"
23
+ },
24
+ "./package.json": "./package.json"
25
+ },
26
+ "files": [
27
+ "dist",
28
+ "README.md",
29
+ "LICENSE"
30
+ ],
31
+ "scripts": {
32
+ "build": "rollup -c",
33
+ "dev": "rollup -c -w",
34
+ "clean": "rimraf dist",
35
+ "prepublishOnly": "yarn clean && yarn build"
36
+ },
37
+ "keywords": [
38
+ "torque",
39
+ "platform",
40
+ "intelligence",
41
+ "assistant",
42
+ "api",
43
+ "typescript",
44
+ "sdk",
45
+ "node"
46
+ ],
47
+ "author": "Torque <hello@torque.fi>",
48
+ "license": "MIT",
49
+ "homepage": "https://torque.fi",
50
+ "repository": {
51
+ "type": "git",
52
+ "url": "git+https://github.com/torque-fi/torque_webapp.git",
53
+ "directory": "packages/torque-node"
54
+ },
55
+ "dependencies": {
56
+ "@torquefi/types": "^0.1.0",
57
+ "torque-assistant": "^0.1.0",
58
+ "torque-intelligence": "^0.1.0"
59
+ },
60
+ "devDependencies": {
61
+ "@rollup/plugin-typescript": "^12.1.4",
62
+ "@types/node": "^20.0.0",
63
+ "rimraf": "^5.0.0",
64
+ "rollup": "^4.0.0",
65
+ "typescript": "^5.0.0"
66
+ },
67
+ "engines": {
68
+ "node": ">=16.0.0"
69
+ }
70
+ }