@trustwallet/cli 0.15.0 → 0.17.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/dist/automation-runner.d.ts +38 -0
- package/dist/automation-runner.d.ts.map +1 -0
- package/dist/commands/compete.d.ts +3 -0
- package/dist/commands/compete.d.ts.map +1 -0
- package/dist/commands/erc8004.d.ts +3 -0
- package/dist/commands/erc8004.d.ts.map +1 -0
- package/dist/commands/erc8183.d.ts +3 -0
- package/dist/commands/erc8183.d.ts.map +1 -0
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/swap.d.ts.map +1 -1
- package/dist/commands/transfer.d.ts.map +1 -1
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/x402.d.ts.map +1 -1
- package/dist/index.js +4353 -1821
- package/dist/setup/harnesses/codex.d.ts.map +1 -1
- package/dist/setup/harnesses/json-base.d.ts.map +1 -1
- package/dist/setup/harnesses/types.d.ts +4 -1
- package/dist/setup/harnesses/types.d.ts.map +1 -1
- package/dist/setup/phase-harnesses.d.ts +2 -1
- package/dist/setup/phase-harnesses.d.ts.map +1 -1
- package/package.json +13 -13
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type TwakHttpClient } from '@twak/core';
|
|
2
|
+
import { type SwapClient } from '@twak/swap';
|
|
3
|
+
import type { AutomationStore } from '@twak/storage';
|
|
4
|
+
import type { BlockchainClient, WalletContext } from '@twak/wallet-core';
|
|
5
|
+
/** Parse a duration string (`30s`, `5m`, `1h`, `1d`, or plain seconds) to seconds. */
|
|
6
|
+
export declare function parseInterval(value: string): number | null;
|
|
7
|
+
export type LogLevel = 'info' | 'warn' | 'error';
|
|
8
|
+
export interface AutomationRunnerDeps {
|
|
9
|
+
automationStore: AutomationStore;
|
|
10
|
+
walletContext: WalletContext;
|
|
11
|
+
swapClient: SwapClient;
|
|
12
|
+
/** HTTP client used to batch-fetch spot prices for limit orders. */
|
|
13
|
+
client: TwakHttpClient;
|
|
14
|
+
blockchainClient?: BlockchainClient;
|
|
15
|
+
/** Receives meaningful events only (executions, deactivations, failures); idle ticks log nothing. */
|
|
16
|
+
log?: (level: LogLevel, message: string) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface TickResult {
|
|
19
|
+
executed: Array<{
|
|
20
|
+
id: string;
|
|
21
|
+
type: 'dca' | 'limit';
|
|
22
|
+
txHash?: string;
|
|
23
|
+
}>;
|
|
24
|
+
skipped: number;
|
|
25
|
+
errors: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Evaluate all active automations once and execute those whose conditions are
|
|
29
|
+
* met. Designed to be called on an interval by both `twak watch` and the
|
|
30
|
+
* `twak serve` background watcher.
|
|
31
|
+
*
|
|
32
|
+
* Automations run unattended, so they only fire against the local agent wallet
|
|
33
|
+
* (`walletContext.state === 'local'`). In WalletConnect mode each swap needs
|
|
34
|
+
* interactive device approval, which a background loop can't obtain — so the
|
|
35
|
+
* whole tick is skipped until a local wallet is active.
|
|
36
|
+
*/
|
|
37
|
+
export declare function runAutomationsTick(deps: AutomationRunnerDeps): Promise<TickResult>;
|
|
38
|
+
//# sourceMappingURL=automation-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"automation-runner.d.ts","sourceRoot":"","sources":["../src/automation-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEzE,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAU1D;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEjD,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,eAAe,CAAC;IACjC,aAAa,EAAE,aAAa,CAAC;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,oEAAoE;IACpE,MAAM,EAAE,cAAc,CAAC;IACvB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,qGAAqG;IACrG,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAClD;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAMD;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,CAiKxF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compete.d.ts","sourceRoot":"","sources":["../../src/commands/compete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA+H7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"erc8004.d.ts","sourceRoot":"","sources":["../../src/commands/erc8004.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkBpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsM7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"erc8183.d.ts","sourceRoot":"","sources":["../../src/commands/erc8183.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwBpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsjB7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmCpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAkM3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swap.d.ts","sourceRoot":"","sources":["../../src/commands/swap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"swap.d.ts","sourceRoot":"","sources":["../../src/commands/swap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAwQ1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../src/commands/transfer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../src/commands/transfer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBpC;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,KAAK,CAiCrD;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0J9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/commands/watch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/commands/watch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+BpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA6X3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x402.d.ts","sourceRoot":"","sources":["../../src/commands/x402.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"x402.d.ts","sourceRoot":"","sources":["../../src/commands/x402.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoKpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8L1D"}
|