@tempoxyz/mercator 0.0.356 → 0.0.387
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 +14 -4
- package/dist/client-selection.d.ts +11 -0
- package/dist/client-selection.js +50 -0
- package/dist/client-selection.js.map +1 -0
- package/dist/clients.d.ts +27 -1
- package/dist/clients.js +196 -219
- package/dist/clients.js.map +1 -1
- package/dist/globe.d.ts +2 -0
- package/dist/globe.js +13 -2
- package/dist/globe.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +88 -10
- package/dist/index.js.map +1 -1
- package/dist/plugin-bundle/skills/mercator/SKILL.md +5 -3
- package/dist/prompt-input.d.ts +2 -0
- package/dist/prompt-input.js +22 -0
- package/dist/prompt-input.js.map +1 -1
- package/dist/setup-progress.d.ts +2 -0
- package/dist/setup-progress.js +15 -2
- package/dist/setup-progress.js.map +1 -1
- package/dist/setup-telemetry.d.ts +45 -0
- package/dist/setup-telemetry.js +115 -0
- package/dist/setup-telemetry.js.map +1 -0
- package/dist/wallet.d.ts +2 -2
- package/dist/wallet.js +2 -2
- package/package.json +2 -1
package/dist/prompt-input.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createReadStream, openSync } from 'node:fs';
|
|
2
|
+
import { ReadStream } from 'node:tty';
|
|
2
3
|
/** Opens an independent terminal input stream for Bun's interactive prompts. */
|
|
3
4
|
export function openPromptInput() {
|
|
4
5
|
if (!process.stdin.isTTY)
|
|
@@ -13,4 +14,25 @@ export function openPromptInput() {
|
|
|
13
14
|
return { close: () => undefined, input: process.stdin };
|
|
14
15
|
}
|
|
15
16
|
}
|
|
17
|
+
/** Opens a raw-capable terminal stream for keypress-driven prompts. */
|
|
18
|
+
export function openKeypressInput() {
|
|
19
|
+
if (process.stdin.isTTY)
|
|
20
|
+
return { close: () => undefined, input: process.stdin };
|
|
21
|
+
try {
|
|
22
|
+
const terminalPath = process.platform === 'win32' ? 'CONIN$' : '/dev/tty';
|
|
23
|
+
const fd = openSync(terminalPath, 'r');
|
|
24
|
+
const input = new ReadStream(fd);
|
|
25
|
+
return {
|
|
26
|
+
close: () => {
|
|
27
|
+
if (input.isRaw)
|
|
28
|
+
input.setRawMode(false);
|
|
29
|
+
input.destroy();
|
|
30
|
+
},
|
|
31
|
+
input,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
16
38
|
//# sourceMappingURL=prompt-input.js.map
|
package/dist/prompt-input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-input.js","sourceRoot":"","sources":["../src/prompt-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"prompt-input.js","sourceRoot":"","sources":["../src/prompt-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAOrC,gFAAgF;AAChF,MAAM,UAAU,eAAe;IAC9B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK;QAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAA;IAEjF,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAA;QACzE,MAAM,EAAE,GAAG,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAC,CAAA;QACtC,MAAM,KAAK,GAAG,gBAAgB,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAA;QACrE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAA;IAC/C,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAA;IACxD,CAAC;AACF,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,iBAAiB;IAChC,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK;QAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAA;IAEhF,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAA;QACzE,MAAM,EAAE,GAAG,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAC,CAAA;QACtC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAA;QAChC,OAAO;YACN,KAAK,EAAE,GAAG,EAAE;gBACX,IAAI,KAAK,CAAC,KAAK;oBAAE,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;gBACxC,KAAK,CAAC,OAAO,EAAE,CAAA;YAChB,CAAC;YACD,KAAK;SACL,CAAA;IACF,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,SAAS,CAAA;IACjB,CAAC;AACF,CAAC"}
|
package/dist/setup-progress.d.ts
CHANGED
|
@@ -3,7 +3,9 @@ import { type GlobeAnimation } from './globe.js';
|
|
|
3
3
|
export type SetupProgress = {
|
|
4
4
|
readonly color?: boolean;
|
|
5
5
|
readonly globe: GlobeAnimation;
|
|
6
|
+
readonly preparePrompt?: () => Promise<void>;
|
|
6
7
|
readonly report: (message: string) => void;
|
|
8
|
+
readonly resumeAfterPrompt?: () => void;
|
|
7
9
|
readonly stop: () => Promise<void>;
|
|
8
10
|
};
|
|
9
11
|
/** Starts one globe and writes setup progress beneath it without disrupting redraws. */
|
package/dist/setup-progress.js
CHANGED
|
@@ -5,9 +5,19 @@ export function startSetupProgress(output, options) {
|
|
|
5
5
|
const color = options.color ?? false;
|
|
6
6
|
const globe = startMercatorGlobe(output, { animate: options.animate, color });
|
|
7
7
|
let hasProgressLine = false;
|
|
8
|
+
const clearTransientLine = () => {
|
|
9
|
+
if (options.transient && hasProgressLine) {
|
|
10
|
+
output.write('\r\u001B[2K');
|
|
11
|
+
hasProgressLine = false;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
8
14
|
return {
|
|
9
15
|
color,
|
|
10
16
|
globe,
|
|
17
|
+
preparePrompt: async () => {
|
|
18
|
+
globe.pause?.();
|
|
19
|
+
clearTransientLine();
|
|
20
|
+
},
|
|
11
21
|
report: (message) => {
|
|
12
22
|
if (options.transient) {
|
|
13
23
|
output.write(`${hasProgressLine ? '\r\u001B[2K' : ''}${styleText('→', 'cyan', color)} ${styleText(message, 'dim', color)}`);
|
|
@@ -17,10 +27,13 @@ export function startSetupProgress(output, options) {
|
|
|
17
27
|
output.write(`${styleText('→', 'cyan', color)} ${message}\n`);
|
|
18
28
|
globe.addLinesBelow(1);
|
|
19
29
|
},
|
|
30
|
+
resumeAfterPrompt: () => {
|
|
31
|
+
globe.addLinesBelow(1);
|
|
32
|
+
globe.resume?.();
|
|
33
|
+
},
|
|
20
34
|
stop: async () => {
|
|
21
35
|
await globe.stop();
|
|
22
|
-
|
|
23
|
-
output.write('\r\u001B[2K');
|
|
36
|
+
clearTransientLine();
|
|
24
37
|
},
|
|
25
38
|
};
|
|
26
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-progress.js","sourceRoot":"","sources":["../src/setup-progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACpE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,M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G,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,OAAO,IAAI,CAAC,CAAA;YAC7D,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;QACvB,CAAC;QACD,iBAAiB,EAAE,GAAG,EAAE;YACvB,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;YACtB,KAAK,CAAC,MAAM,EAAE,EAAE,CAAA;QACjB,CAAC;QACD,IAAI,EAAE,KAAK,IAAI,EAAE;YAChB,MAAM,KAAK,CAAC,IAAI,EAAE,CAAA;YAClB,kBAAkB,EAAE,CAAA;QACrB,CAAC;KACD,CAAA;AACF,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,0BAA0B,CACzC,UAAwC,EAAE;IAE1C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;QAAE,OAAO,SAAS,CAAA;IAC3C,MAAM,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;IAC1D,OAAO,kBAAkB,CAAC,OAAO,CAAC,MAAM,EAAE;QACzC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,MAAM;QACpE,KAAK;QACL,SAAS,EAAE,IAAI;KACf,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ClientId } from './clients.js';
|
|
2
|
+
/** Closed setup event names accepted by the Mercator telemetry gateway. */
|
|
3
|
+
export declare const SetupTelemetryEvent: {
|
|
4
|
+
readonly ClientConfigured: "mercator.cli_client_configured";
|
|
5
|
+
readonly ClientDetected: "mercator.cli_client_detected";
|
|
6
|
+
readonly ReadinessChecked: "mercator.cli_readiness_checked";
|
|
7
|
+
readonly SetupFinished: "mercator.cli_setup_finished";
|
|
8
|
+
readonly SetupStarted: "mercator.cli_setup_started";
|
|
9
|
+
};
|
|
10
|
+
/** One setup event name. */
|
|
11
|
+
export type SetupTelemetryEvent = (typeof SetupTelemetryEvent)[keyof typeof SetupTelemetryEvent];
|
|
12
|
+
/** Closed outcomes shared by setup and per-client events. */
|
|
13
|
+
type SetupTelemetryOutcome = 'already_configured' | 'cancelled' | 'configured' | 'conflict' | 'detected' | 'failed' | 'partial' | 'planned' | 'ready' | 'reconfigured' | 'skipped' | 'started' | 'succeeded';
|
|
14
|
+
/** Safe failure categories that never include raw exception content. */
|
|
15
|
+
export type SetupFailureCategory = 'network' | 'timeout' | 'validation' | 'unknown';
|
|
16
|
+
/** One anonymous, bounded CLI setup fact. */
|
|
17
|
+
export type SetupTelemetryRecord = {
|
|
18
|
+
readonly client?: ClientId;
|
|
19
|
+
readonly event: SetupTelemetryEvent;
|
|
20
|
+
readonly failureCategory?: SetupFailureCategory;
|
|
21
|
+
readonly outcome: SetupTelemetryOutcome;
|
|
22
|
+
};
|
|
23
|
+
/** Best-effort recorder owned by one setup invocation. */
|
|
24
|
+
export type SetupTelemetry = {
|
|
25
|
+
/** Queues bounded facts without performing I/O. */
|
|
26
|
+
record: (...events: readonly SetupTelemetryRecord[]) => void;
|
|
27
|
+
/** Sends and clears queued facts without failing setup. */
|
|
28
|
+
flush: () => Promise<void>;
|
|
29
|
+
};
|
|
30
|
+
type SetupTelemetryOptions = {
|
|
31
|
+
readonly cliVersion: string;
|
|
32
|
+
readonly dryRun: boolean;
|
|
33
|
+
readonly enabled: boolean;
|
|
34
|
+
readonly environment?: NodeJS.ProcessEnv;
|
|
35
|
+
readonly fetchTelemetry?: typeof fetch;
|
|
36
|
+
readonly interactive: boolean;
|
|
37
|
+
readonly now?: () => number;
|
|
38
|
+
readonly randomUUID?: () => string;
|
|
39
|
+
readonly selectionMode: 'automatic' | 'explicit';
|
|
40
|
+
};
|
|
41
|
+
/** Creates an anonymous setup recorder with process-local correlation only. */
|
|
42
|
+
export declare function createSetupTelemetry(options: SetupTelemetryOptions): SetupTelemetry;
|
|
43
|
+
/** Maps an unexpected setup failure to a finite analytics category. */
|
|
44
|
+
export declare function setupFailureCategory(error: unknown): SetupFailureCategory;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { basename } from 'node:path';
|
|
2
|
+
/** Anonymous gateway endpoint that accepts bounded CLI setup events. */
|
|
3
|
+
const CLI_TELEMETRY_URL = 'https://mercator.tempo.xyz/v1/telemetry/cli';
|
|
4
|
+
/** Maximum time setup may wait for one best-effort telemetry delivery. */
|
|
5
|
+
const TELEMETRY_TIMEOUT_MS = 1_000;
|
|
6
|
+
/** Closed setup event names accepted by the Mercator telemetry gateway. */
|
|
7
|
+
export const SetupTelemetryEvent = {
|
|
8
|
+
ClientConfigured: 'mercator.cli_client_configured',
|
|
9
|
+
ClientDetected: 'mercator.cli_client_detected',
|
|
10
|
+
ReadinessChecked: 'mercator.cli_readiness_checked',
|
|
11
|
+
SetupFinished: 'mercator.cli_setup_finished',
|
|
12
|
+
SetupStarted: 'mercator.cli_setup_started',
|
|
13
|
+
};
|
|
14
|
+
/** Creates an anonymous setup recorder with process-local correlation only. */
|
|
15
|
+
export function createSetupTelemetry(options) {
|
|
16
|
+
const environment = options.environment ?? process.env;
|
|
17
|
+
const enabled = options.enabled && telemetryEnabled(environment);
|
|
18
|
+
const now = options.now ?? Date.now;
|
|
19
|
+
const startedAt = now();
|
|
20
|
+
const runId = options.randomUUID ? options.randomUUID() : crypto.randomUUID();
|
|
21
|
+
let events = [];
|
|
22
|
+
return {
|
|
23
|
+
record(...records) {
|
|
24
|
+
if (!enabled)
|
|
25
|
+
return;
|
|
26
|
+
const elapsed_ms = boundedElapsed(now() - startedAt);
|
|
27
|
+
events.push(...records.map((event) => ({ ...event, elapsed_ms })));
|
|
28
|
+
},
|
|
29
|
+
async flush() {
|
|
30
|
+
if (!enabled || events.length === 0)
|
|
31
|
+
return;
|
|
32
|
+
const batch = events;
|
|
33
|
+
events = [];
|
|
34
|
+
try {
|
|
35
|
+
const response = await (options.fetchTelemetry ?? fetch)(CLI_TELEMETRY_URL, {
|
|
36
|
+
body: JSON.stringify({
|
|
37
|
+
architecture: telemetryArchitecture(process.arch),
|
|
38
|
+
cli_version: options.cliVersion,
|
|
39
|
+
distribution: telemetryDistribution(environment, process.execPath),
|
|
40
|
+
dry_run: options.dryRun,
|
|
41
|
+
events: batch.map(({ failureCategory, ...event }) => ({
|
|
42
|
+
...event,
|
|
43
|
+
...(failureCategory ? { failure_category: failureCategory } : {}),
|
|
44
|
+
})),
|
|
45
|
+
interactive: options.interactive,
|
|
46
|
+
platform: telemetryPlatform(process.platform),
|
|
47
|
+
run_id: runId,
|
|
48
|
+
selection_mode: options.selectionMode,
|
|
49
|
+
}),
|
|
50
|
+
headers: { 'content-type': 'application/json' },
|
|
51
|
+
method: 'POST',
|
|
52
|
+
signal: AbortSignal.timeout(TELEMETRY_TIMEOUT_MS),
|
|
53
|
+
});
|
|
54
|
+
await response.body?.cancel();
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
// Analytics must never change setup behavior or output.
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/** Maps an unexpected setup failure to a finite analytics category. */
|
|
63
|
+
export function setupFailureCategory(error) {
|
|
64
|
+
if (error instanceof Error) {
|
|
65
|
+
if (error.name === 'AbortError' || error.name === 'TimeoutError')
|
|
66
|
+
return 'timeout';
|
|
67
|
+
if (error instanceof TypeError)
|
|
68
|
+
return 'network';
|
|
69
|
+
if (error.message.startsWith('--'))
|
|
70
|
+
return 'validation';
|
|
71
|
+
}
|
|
72
|
+
return 'unknown';
|
|
73
|
+
}
|
|
74
|
+
function telemetryEnabled(environment) {
|
|
75
|
+
if (environment.NODE_ENV === 'test' || enabledToggle(environment.CI))
|
|
76
|
+
return false;
|
|
77
|
+
if (environment.DO_NOT_TRACK === '1')
|
|
78
|
+
return false;
|
|
79
|
+
return !disabledToggle(environment.MERCATOR_TELEMETRY);
|
|
80
|
+
}
|
|
81
|
+
function telemetryPlatform(platform) {
|
|
82
|
+
if (platform === 'darwin')
|
|
83
|
+
return 'macos';
|
|
84
|
+
if (platform === 'win32')
|
|
85
|
+
return 'windows';
|
|
86
|
+
if (platform === 'linux')
|
|
87
|
+
return 'linux';
|
|
88
|
+
return 'other';
|
|
89
|
+
}
|
|
90
|
+
function telemetryArchitecture(architecture) {
|
|
91
|
+
if (architecture === 'arm64' || architecture === 'x64')
|
|
92
|
+
return architecture;
|
|
93
|
+
return 'other';
|
|
94
|
+
}
|
|
95
|
+
function telemetryDistribution(environment, executablePath) {
|
|
96
|
+
if (environment.MERCATOR_INSTALL_CHANNEL === 'standalone')
|
|
97
|
+
return 'standalone';
|
|
98
|
+
if (executablePath.includes('/nix/store/'))
|
|
99
|
+
return 'nix';
|
|
100
|
+
if (basename(executablePath).toLowerCase().startsWith('mercator'))
|
|
101
|
+
return 'standalone';
|
|
102
|
+
if (basename(executablePath).toLowerCase().startsWith('node'))
|
|
103
|
+
return 'node';
|
|
104
|
+
return 'unknown';
|
|
105
|
+
}
|
|
106
|
+
function boundedElapsed(value) {
|
|
107
|
+
return Math.min(Math.max(Math.round(value), 0), 3_600_000);
|
|
108
|
+
}
|
|
109
|
+
function enabledToggle(value) {
|
|
110
|
+
return (value !== undefined && !['', '0', 'false', 'no', 'off'].includes(value.toLowerCase()));
|
|
111
|
+
}
|
|
112
|
+
function disabledToggle(value) {
|
|
113
|
+
return value !== undefined && ['0', 'false', 'no', 'off'].includes(value.toLowerCase());
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=setup-telemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-telemetry.js","sourceRoot":"","sources":["../src/setup-telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAGpC,wEAAwE;AACxE,MAAM,iBAAiB,GAAG,6CAA6C,CAAA;AACvE,0EAA0E;AAC1E,MAAM,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AE,CAAC,UAAU,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAA;IAC5E,OAAO,SAAS,CAAA;AACjB,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACpC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;AAC3D,CAAC;AAED,SAAS,aAAa,CAAC,KAAyB;IAC/C,OAAO,CACN,KAAK,KAAK,SAAS,IAAI,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CACrF,CAAA;AACF,CAAC;AAED,SAAS,cAAc,CAAC,KAAyB;IAChD,OAAO,KAAK,KAAK,SAAS,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAA;AACxF,CAAC"}
|
package/dist/wallet.d.ts
CHANGED
|
@@ -156,8 +156,8 @@ export declare function paymentAccessKey(provider: PaymentAuthorizationProvider,
|
|
|
156
156
|
* Orders charge-only offers by the currencies the active wallet can fund.
|
|
157
157
|
*
|
|
158
158
|
* MACH is preferred when held directly. Stablecoin offers come next when the
|
|
159
|
-
* wallet holds USDC.e or enough pathUSD for Accounts auto-swap.
|
|
160
|
-
*
|
|
159
|
+
* wallet holds USDC.e or enough pathUSD for Accounts auto-swap. Other payment
|
|
160
|
+
* methods retain the server's original order.
|
|
161
161
|
*/
|
|
162
162
|
export declare function orderChargeCandidates<candidate extends PaymentChallengeCandidate>(candidates: readonly candidate[], balances: WalletBalances): readonly candidate[];
|
|
163
163
|
export declare function openFundingPage(address: Address, overrides?: Partial<FundingPageDependencies>): Promise<FundingPageResult>;
|
package/dist/wallet.js
CHANGED
|
@@ -300,8 +300,8 @@ function coversPaymentTokens(limits) {
|
|
|
300
300
|
* Orders charge-only offers by the currencies the active wallet can fund.
|
|
301
301
|
*
|
|
302
302
|
* MACH is preferred when held directly. Stablecoin offers come next when the
|
|
303
|
-
* wallet holds USDC.e or enough pathUSD for Accounts auto-swap.
|
|
304
|
-
*
|
|
303
|
+
* wallet holds USDC.e or enough pathUSD for Accounts auto-swap. Other payment
|
|
304
|
+
* methods retain the server's original order.
|
|
305
305
|
*/
|
|
306
306
|
export function orderChargeCandidates(candidates, balances) {
|
|
307
307
|
if (candidates.length === 0 ||
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tempoxyz/mercator",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.387",
|
|
4
4
|
"description": "Connect agent clients to the Mercator remote MCP server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"vitest": "4.1.10"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
+
"@inquirer/checkbox": "5.2.1",
|
|
55
56
|
"accounts": "0.18.3",
|
|
56
57
|
"incur": "0.5.1",
|
|
57
58
|
"jsonc-parser": "3.3.1",
|