zano-mcp 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/README.md +195 -0
- package/dist/clients/daemon.d.ts +6 -0
- package/dist/clients/daemon.d.ts.map +1 -0
- package/dist/clients/daemon.js +30 -0
- package/dist/clients/daemon.js.map +1 -0
- package/dist/clients/trade.d.ts +8 -0
- package/dist/clients/trade.d.ts.map +1 -0
- package/dist/clients/trade.js +33 -0
- package/dist/clients/trade.js.map +1 -0
- package/dist/clients/wallet.d.ts +8 -0
- package/dist/clients/wallet.d.ts.map +1 -0
- package/dist/clients/wallet.js +45 -0
- package/dist/clients/wallet.js.map +1 -0
- package/dist/config.d.ts +30 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +42 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/logger.d.ts +9 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +28 -0
- package/dist/logger.js.map +1 -0
- package/dist/prompts/index.d.ts +4 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +54 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/resources/index.d.ts +4 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +60 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +22 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/assets/definitions.d.ts +127 -0
- package/dist/tools/assets/definitions.d.ts.map +1 -0
- package/dist/tools/assets/definitions.js +43 -0
- package/dist/tools/assets/definitions.js.map +1 -0
- package/dist/tools/assets/handlers.d.ts +21 -0
- package/dist/tools/assets/handlers.d.ts.map +1 -0
- package/dist/tools/assets/handlers.js +115 -0
- package/dist/tools/assets/handlers.js.map +1 -0
- package/dist/tools/daemon/definitions.d.ts +139 -0
- package/dist/tools/daemon/definitions.d.ts.map +1 -0
- package/dist/tools/daemon/definitions.js +55 -0
- package/dist/tools/daemon/definitions.js.map +1 -0
- package/dist/tools/daemon/handlers.d.ts +30 -0
- package/dist/tools/daemon/handlers.d.ts.map +1 -0
- package/dist/tools/daemon/handlers.js +274 -0
- package/dist/tools/daemon/handlers.js.map +1 -0
- package/dist/tools/register.d.ts +4 -0
- package/dist/tools/register.d.ts.map +1 -0
- package/dist/tools/register.js +93 -0
- package/dist/tools/register.js.map +1 -0
- package/dist/tools/swap/definitions.d.ts +103 -0
- package/dist/tools/swap/definitions.d.ts.map +1 -0
- package/dist/tools/swap/definitions.js +28 -0
- package/dist/tools/swap/definitions.js.map +1 -0
- package/dist/tools/swap/handlers.d.ts +17 -0
- package/dist/tools/swap/handlers.d.ts.map +1 -0
- package/dist/tools/swap/handlers.js +98 -0
- package/dist/tools/swap/handlers.js.map +1 -0
- package/dist/tools/trade/definitions.d.ts +137 -0
- package/dist/tools/trade/definitions.d.ts.map +1 -0
- package/dist/tools/trade/definitions.js +48 -0
- package/dist/tools/trade/definitions.js.map +1 -0
- package/dist/tools/trade/handlers.d.ts +23 -0
- package/dist/tools/trade/handlers.d.ts.map +1 -0
- package/dist/tools/trade/handlers.js +196 -0
- package/dist/tools/trade/handlers.js.map +1 -0
- package/dist/tools/wallet/definitions.d.ts +158 -0
- package/dist/tools/wallet/definitions.d.ts.map +1 -0
- package/dist/tools/wallet/definitions.js +73 -0
- package/dist/tools/wallet/definitions.js.map +1 -0
- package/dist/tools/wallet/handlers.d.ts +28 -0
- package/dist/tools/wallet/handlers.d.ts.map +1 -0
- package/dist/tools/wallet/handlers.js +214 -0
- package/dist/tools/wallet/handlers.js.map +1 -0
- package/dist/utils/constants.d.ts +25 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +19 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/formatting.d.ts +14 -0
- package/dist/utils/formatting.d.ts.map +1 -0
- package/dist/utils/formatting.js +68 -0
- package/dist/utils/formatting.js.map +1 -0
- package/package.json +43 -0
- package/src/clients/daemon.ts +41 -0
- package/src/clients/trade.ts +51 -0
- package/src/clients/wallet.ts +59 -0
- package/src/config.ts +56 -0
- package/src/index.ts +20 -0
- package/src/logger.ts +33 -0
- package/src/prompts/index.ts +80 -0
- package/src/resources/index.ts +73 -0
- package/src/server.ts +26 -0
- package/src/tools/assets/definitions.ts +58 -0
- package/src/tools/assets/handlers.ts +140 -0
- package/src/tools/daemon/definitions.ts +86 -0
- package/src/tools/daemon/handlers.ts +349 -0
- package/src/tools/register.ts +194 -0
- package/src/tools/swap/definitions.ts +36 -0
- package/src/tools/swap/handlers.ts +139 -0
- package/src/tools/trade/definitions.ts +67 -0
- package/src/tools/trade/handlers.ts +264 -0
- package/src/tools/wallet/definitions.ts +92 -0
- package/src/tools/wallet/handlers.ts +268 -0
- package/src/utils/constants.ts +24 -0
- package/src/utils/formatting.ts +78 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DaemonClient } from "../../clients/daemon.js";
|
|
2
|
+
import type { GetBlockByHeightInput, GetBlockByHashInput, GetBlockDetailsInput, GetTransactionInput, GetTransactionsInput, GetAssetInfoInput, GetAssetsListInput, ResolveAliasInput, GetAliasByAddressInput, SearchBlockchainInput, ValidateSignatureInput } from "./definitions.js";
|
|
3
|
+
export type ToolResult = {
|
|
4
|
+
content: Array<{
|
|
5
|
+
type: "text";
|
|
6
|
+
text: string;
|
|
7
|
+
}>;
|
|
8
|
+
};
|
|
9
|
+
export declare class DaemonHandlers {
|
|
10
|
+
private client;
|
|
11
|
+
constructor(client: DaemonClient);
|
|
12
|
+
getNetworkInfo(): Promise<ToolResult>;
|
|
13
|
+
getHeight(): Promise<ToolResult>;
|
|
14
|
+
getBlockByHeight(input: GetBlockByHeightInput): Promise<ToolResult>;
|
|
15
|
+
getBlockByHash(input: GetBlockByHashInput): Promise<ToolResult>;
|
|
16
|
+
getLastBlock(): Promise<ToolResult>;
|
|
17
|
+
getBlockDetails(input: GetBlockDetailsInput): Promise<ToolResult>;
|
|
18
|
+
getTransaction(input: GetTransactionInput): Promise<ToolResult>;
|
|
19
|
+
getTransactions(input: GetTransactionsInput): Promise<ToolResult>;
|
|
20
|
+
getPoolInfo(): Promise<ToolResult>;
|
|
21
|
+
getAssetInfo(input: GetAssetInfoInput): Promise<ToolResult>;
|
|
22
|
+
getAssetsList(input: GetAssetsListInput): Promise<ToolResult>;
|
|
23
|
+
resolveAlias(input: ResolveAliasInput): Promise<ToolResult>;
|
|
24
|
+
getAliasByAddress(input: GetAliasByAddressInput): Promise<ToolResult>;
|
|
25
|
+
searchBlockchain(input: SearchBlockchainInput): Promise<ToolResult>;
|
|
26
|
+
validateSignature(input: ValidateSignatureInput): Promise<ToolResult>;
|
|
27
|
+
private formatBlockHeader;
|
|
28
|
+
private formatTransaction;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/tools/daemon/handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAQvD,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD,CAAC;AAWF,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAe;gBAEjB,MAAM,EAAE,YAAY;IAI1B,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC;IA0BrC,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC;IAShC,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC;IAYnE,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;IAY/D,YAAY,IAAI,OAAO,CAAC,UAAU,CAAC;IAWnC,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;IAwBjE,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;IAa/D,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;IAmBjE,WAAW,IAAI,OAAO,CAAC,UAAU,CAAC;IAqBlC,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC;IAwB3D,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC;IAuB7D,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC;IAmB3D,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC;IAmBrE,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC;IAcnE,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC;IAoB3E,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,iBAAiB;CAwB1B"}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { formatZano, formatTimestamp, formatDifficulty, } from "../../utils/formatting.js";
|
|
2
|
+
function textResult(text) {
|
|
3
|
+
return { content: [{ type: "text", text }] };
|
|
4
|
+
}
|
|
5
|
+
function errorResult(error) {
|
|
6
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
7
|
+
return textResult(`Error: ${msg}`);
|
|
8
|
+
}
|
|
9
|
+
export class DaemonHandlers {
|
|
10
|
+
client;
|
|
11
|
+
constructor(client) {
|
|
12
|
+
this.client = client;
|
|
13
|
+
}
|
|
14
|
+
async getNetworkInfo() {
|
|
15
|
+
try {
|
|
16
|
+
const info = await this.client.call("getinfo");
|
|
17
|
+
const lines = [
|
|
18
|
+
`Zano Network Status`,
|
|
19
|
+
` Height: ${info.height}`,
|
|
20
|
+
` Network height: ${info.max_net_seen_height || "N/A"}`,
|
|
21
|
+
` Difficulty: ${info.difficulty}`,
|
|
22
|
+
` PoS difficulty: ${info.pos_difficulty}`,
|
|
23
|
+
` Hashrate: ${info.current_network_hashrate_350 || info.current_network_hashrate_50 || "N/A"}`,
|
|
24
|
+
` Connections: ${info.outgoing_connections_count} out / ${info.incoming_connections_count} in`,
|
|
25
|
+
` TX pool: ${info.tx_pool_size} transactions`,
|
|
26
|
+
` Alt blocks: ${info.alt_blocks_count}`,
|
|
27
|
+
` Block reward: ${formatZano(info.block_reward)}`,
|
|
28
|
+
` Grey peerlist: ${info.grey_peerlist_size}`,
|
|
29
|
+
` White peerlist: ${info.white_peerlist_size}`,
|
|
30
|
+
` Alias count: ${info.alias_count}`,
|
|
31
|
+
` Daemon network: ${info.testnet ? "testnet" : "mainnet"}`,
|
|
32
|
+
` Synchronized: ${Number(info.height) >= Number(info.max_net_seen_height || 0) ? "Yes" : "No"}`,
|
|
33
|
+
];
|
|
34
|
+
return textResult(lines.join("\n"));
|
|
35
|
+
}
|
|
36
|
+
catch (e) {
|
|
37
|
+
return errorResult(e);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
async getHeight() {
|
|
41
|
+
try {
|
|
42
|
+
const res = await this.client.call("getheight");
|
|
43
|
+
return textResult(`Current blockchain height: ${res.height}`);
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
return errorResult(e);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async getBlockByHeight(input) {
|
|
50
|
+
try {
|
|
51
|
+
const res = await this.client.call("getblockheaderbyheight", { height: input.height });
|
|
52
|
+
return textResult(this.formatBlockHeader(res.block_header));
|
|
53
|
+
}
|
|
54
|
+
catch (e) {
|
|
55
|
+
return errorResult(e);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async getBlockByHash(input) {
|
|
59
|
+
try {
|
|
60
|
+
const res = await this.client.call("getblockheaderbyhash", { hash: input.hash });
|
|
61
|
+
return textResult(this.formatBlockHeader(res.block_header));
|
|
62
|
+
}
|
|
63
|
+
catch (e) {
|
|
64
|
+
return errorResult(e);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async getLastBlock() {
|
|
68
|
+
try {
|
|
69
|
+
const res = await this.client.call("getlastblockheader");
|
|
70
|
+
return textResult(this.formatBlockHeader(res.block_header));
|
|
71
|
+
}
|
|
72
|
+
catch (e) {
|
|
73
|
+
return errorResult(e);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
async getBlockDetails(input) {
|
|
77
|
+
try {
|
|
78
|
+
const res = await this.client.call("get_main_block_details", { id: input.id });
|
|
79
|
+
const block = res.block_details || res;
|
|
80
|
+
const header = block;
|
|
81
|
+
const lines = [
|
|
82
|
+
this.formatBlockHeader(header),
|
|
83
|
+
` Miner address: ${header.miner_text_info || "N/A"}`,
|
|
84
|
+
` Transactions: ${Array.isArray(header.transactions_details) ? header.transactions_details.length : 0}`,
|
|
85
|
+
];
|
|
86
|
+
if (Array.isArray(header.transactions_details)) {
|
|
87
|
+
for (const tx of header.transactions_details) {
|
|
88
|
+
lines.push(` TX: ${tx.id} (fee: ${tx.fee ? formatZano(tx.fee) : "coinbase"})`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return textResult(lines.join("\n"));
|
|
92
|
+
}
|
|
93
|
+
catch (e) {
|
|
94
|
+
return errorResult(e);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async getTransaction(input) {
|
|
98
|
+
try {
|
|
99
|
+
const res = await this.client.call("get_tx_details", { tx_hash: input.tx_hash });
|
|
100
|
+
const tx = res.tx_info || res;
|
|
101
|
+
return textResult(this.formatTransaction(tx));
|
|
102
|
+
}
|
|
103
|
+
catch (e) {
|
|
104
|
+
return errorResult(e);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
async getTransactions(input) {
|
|
108
|
+
try {
|
|
109
|
+
const res = await this.client.call("gettransactions", { txs_hashes: input.tx_hashes });
|
|
110
|
+
const txs = (res.txs_as_json || res.txs || []);
|
|
111
|
+
if (txs.length === 0) {
|
|
112
|
+
return textResult("No transactions found for the provided hashes.");
|
|
113
|
+
}
|
|
114
|
+
const lines = txs.map((tx, i) => `[${i + 1}] ${typeof tx === "string" ? tx : JSON.stringify(tx, null, 2)}`);
|
|
115
|
+
return textResult(lines.join("\n\n"));
|
|
116
|
+
}
|
|
117
|
+
catch (e) {
|
|
118
|
+
return errorResult(e);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
async getPoolInfo() {
|
|
122
|
+
try {
|
|
123
|
+
const res = await this.client.call("get_pool_info");
|
|
124
|
+
const lines = [
|
|
125
|
+
`Transaction Pool`,
|
|
126
|
+
` Pool size: ${res.tx_count ?? "N/A"}`,
|
|
127
|
+
];
|
|
128
|
+
if (Array.isArray(res.transactions)) {
|
|
129
|
+
for (const tx of res.transactions) {
|
|
130
|
+
lines.push(` TX: ${tx.id} (size: ${tx.blob_size} bytes, fee: ${tx.fee ? formatZano(tx.fee) : "N/A"})`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (res.tx_count === 0 || (!res.transactions && !res.tx_count)) {
|
|
134
|
+
lines.push(" (empty pool)");
|
|
135
|
+
}
|
|
136
|
+
return textResult(lines.join("\n"));
|
|
137
|
+
}
|
|
138
|
+
catch (e) {
|
|
139
|
+
return errorResult(e);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
async getAssetInfo(input) {
|
|
143
|
+
try {
|
|
144
|
+
const res = await this.client.call("get_asset_info", { asset_id: input.asset_id });
|
|
145
|
+
const asset = res.asset_descriptor || res;
|
|
146
|
+
const lines = [
|
|
147
|
+
`Asset: ${asset.full_name || asset.ticker || "Unknown"}`,
|
|
148
|
+
` Ticker: ${asset.ticker || "N/A"}`,
|
|
149
|
+
` Asset ID: ${input.asset_id}`,
|
|
150
|
+
` Decimals: ${asset.decimal_point ?? 12}`,
|
|
151
|
+
` Total supply: ${asset.total_max_supply || asset.current_supply || "N/A"}`,
|
|
152
|
+
` Current supply: ${asset.current_supply || "N/A"}`,
|
|
153
|
+
` Owner: ${asset.owner || "N/A"}`,
|
|
154
|
+
` Meta info: ${asset.meta_info || "N/A"}`,
|
|
155
|
+
` Hidden supply: ${asset.hidden_supply ? "Yes" : "No"}`,
|
|
156
|
+
];
|
|
157
|
+
return textResult(lines.join("\n"));
|
|
158
|
+
}
|
|
159
|
+
catch (e) {
|
|
160
|
+
return errorResult(e);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
async getAssetsList(input) {
|
|
164
|
+
try {
|
|
165
|
+
const res = await this.client.call("get_assets_list", { offset: input.offset, count: input.count });
|
|
166
|
+
const assets = res.assets || [];
|
|
167
|
+
if (assets.length === 0) {
|
|
168
|
+
return textResult("No assets found.");
|
|
169
|
+
}
|
|
170
|
+
const lines = [`Registered Assets (offset: ${input.offset}, count: ${assets.length}):`];
|
|
171
|
+
for (const a of assets) {
|
|
172
|
+
const desc = (a.asset_descriptor || a);
|
|
173
|
+
lines.push(` ${desc.ticker || "?"} - ${desc.full_name || "Unknown"} (ID: ${a.asset_id?.slice(0, 16)}..., decimals: ${desc.decimal_point ?? 12})`);
|
|
174
|
+
}
|
|
175
|
+
return textResult(lines.join("\n"));
|
|
176
|
+
}
|
|
177
|
+
catch (e) {
|
|
178
|
+
return errorResult(e);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
async resolveAlias(input) {
|
|
182
|
+
try {
|
|
183
|
+
const res = await this.client.call("get_alias_details", { alias: input.alias });
|
|
184
|
+
const details = res.alias_details || res;
|
|
185
|
+
const lines = [
|
|
186
|
+
`Alias: @${input.alias}`,
|
|
187
|
+
` Address: ${details.address || "N/A"}`,
|
|
188
|
+
` Comment: ${details.comment || ""}`,
|
|
189
|
+
` Tracking key: ${details.tracking_key || "N/A"}`,
|
|
190
|
+
];
|
|
191
|
+
return textResult(lines.join("\n"));
|
|
192
|
+
}
|
|
193
|
+
catch (e) {
|
|
194
|
+
return errorResult(e);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
async getAliasByAddress(input) {
|
|
198
|
+
try {
|
|
199
|
+
const res = await this.client.call("get_alias_by_address", { address: input.address });
|
|
200
|
+
const list = res.alias_info_list;
|
|
201
|
+
if (!list || list.length === 0) {
|
|
202
|
+
return textResult(`No alias found for address ${input.address}`);
|
|
203
|
+
}
|
|
204
|
+
const alias = list[0];
|
|
205
|
+
return textResult(`Address: ${input.address}\nAlias: @${alias.alias}\nComment: ${alias.comment || ""}`);
|
|
206
|
+
}
|
|
207
|
+
catch (e) {
|
|
208
|
+
return errorResult(e);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
async searchBlockchain(input) {
|
|
212
|
+
try {
|
|
213
|
+
const res = await this.client.call("search_by_id", { id: input.id });
|
|
214
|
+
return textResult(`Search results for "${input.id}":\n${JSON.stringify(res, null, 2)}`);
|
|
215
|
+
}
|
|
216
|
+
catch (e) {
|
|
217
|
+
return errorResult(e);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
async validateSignature(input) {
|
|
221
|
+
try {
|
|
222
|
+
const res = await this.client.call("validate_signature", {
|
|
223
|
+
buff: input.buff,
|
|
224
|
+
address: input.address,
|
|
225
|
+
signature: input.signature,
|
|
226
|
+
});
|
|
227
|
+
return textResult(`Signature validation: ${res.valid ? "VALID" : "INVALID"}`);
|
|
228
|
+
}
|
|
229
|
+
catch (e) {
|
|
230
|
+
return errorResult(e);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
// --- Private helpers ---
|
|
234
|
+
formatBlockHeader(h) {
|
|
235
|
+
const lines = [
|
|
236
|
+
`Block ${h.height}`,
|
|
237
|
+
` Hash: ${h.hash || h.id}`,
|
|
238
|
+
` Previous hash: ${h.prev_hash || "N/A"}`,
|
|
239
|
+
` Timestamp: ${formatTimestamp(Number(h.timestamp || 0))}`,
|
|
240
|
+
` Difficulty: ${formatDifficulty(Number(h.difficulty || 0))}`,
|
|
241
|
+
` Reward: ${h.reward ? formatZano(h.reward) : "N/A"}`,
|
|
242
|
+
` Type: ${h.is_pos ? "PoS" : "PoW"}`,
|
|
243
|
+
` Depth: ${h.depth ?? "N/A"}`,
|
|
244
|
+
` Orphan: ${h.orphan_status ? "Yes" : "No"}`,
|
|
245
|
+
` TX count: ${h.num_txes ?? h.tx_count ?? "N/A"}`,
|
|
246
|
+
];
|
|
247
|
+
return lines.join("\n");
|
|
248
|
+
}
|
|
249
|
+
formatTransaction(tx) {
|
|
250
|
+
const lines = [
|
|
251
|
+
`Transaction ${tx.id || tx.tx_hash}`,
|
|
252
|
+
` Block: ${tx.keeper_block ?? "N/A"}`,
|
|
253
|
+
` Timestamp: ${formatTimestamp(Number(tx.timestamp || 0))}`,
|
|
254
|
+
` Fee: ${tx.fee ? formatZano(tx.fee) : "coinbase"}`,
|
|
255
|
+
` Size: ${tx.blob_size || tx.size || "N/A"} bytes`,
|
|
256
|
+
` Inputs: ${tx.ins_count ?? (Array.isArray(tx.ins) ? tx.ins.length : "N/A")}`,
|
|
257
|
+
` Outputs: ${tx.outs_count ?? (Array.isArray(tx.outs) ? tx.outs.length : "N/A")}`,
|
|
258
|
+
` Amount: ${tx.amount ? formatZano(tx.amount) : "N/A"}`,
|
|
259
|
+
` Confirmations: ${tx.confirmations ?? "N/A"}`,
|
|
260
|
+
];
|
|
261
|
+
if (tx.extra) {
|
|
262
|
+
const extra = tx.extra;
|
|
263
|
+
if (Array.isArray(extra)) {
|
|
264
|
+
for (const e of extra) {
|
|
265
|
+
if (e.type === "asset_descriptor_operation") {
|
|
266
|
+
lines.push(` Asset operation: ${JSON.stringify(e.asset_descriptor_operation || e)}`);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return lines.join("\n");
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
//# sourceMappingURL=handlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlers.js","sourceRoot":"","sources":["../../../src/tools/daemon/handlers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,GAGjB,MAAM,2BAA2B,CAAC;AAmBnC,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;AAC/C,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnE,OAAO,UAAU,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC;AACrC,CAAC;AAED,MAAM,OAAO,cAAc;IACjB,MAAM,CAAe;IAE7B,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAA0B,SAAS,CAAC,CAAC;YACxE,MAAM,KAAK,GAAG;gBACZ,qBAAqB;gBACrB,aAAa,IAAI,CAAC,MAAM,EAAE;gBAC1B,qBAAqB,IAAI,CAAC,mBAAmB,IAAI,KAAK,EAAE;gBACxD,iBAAiB,IAA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":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAgB3C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAiBxE"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { DaemonClient } from "../clients/daemon.js";
|
|
2
|
+
import { WalletClient } from "../clients/wallet.js";
|
|
3
|
+
import { TradeClient } from "../clients/trade.js";
|
|
4
|
+
import { DaemonHandlers } from "./daemon/handlers.js";
|
|
5
|
+
import { WalletHandlers } from "./wallet/handlers.js";
|
|
6
|
+
import { AssetHandlers } from "./assets/handlers.js";
|
|
7
|
+
import { SwapHandlers } from "./swap/handlers.js";
|
|
8
|
+
import { TradeHandlers } from "./trade/handlers.js";
|
|
9
|
+
import * as daemonDefs from "./daemon/definitions.js";
|
|
10
|
+
import * as walletDefs from "./wallet/definitions.js";
|
|
11
|
+
import * as assetDefs from "./assets/definitions.js";
|
|
12
|
+
import * as swapDefs from "./swap/definitions.js";
|
|
13
|
+
import * as tradeDefs from "./trade/definitions.js";
|
|
14
|
+
import { logger } from "../logger.js";
|
|
15
|
+
export function registerAllTools(server, config) {
|
|
16
|
+
const daemonClient = new DaemonClient(config.daemonUrl);
|
|
17
|
+
registerDaemonTools(server, daemonClient);
|
|
18
|
+
if (config.walletUrl) {
|
|
19
|
+
const walletClient = new WalletClient(config.walletUrl, config.walletAuth);
|
|
20
|
+
registerWalletTools(server, new WalletHandlers(walletClient, daemonClient));
|
|
21
|
+
registerAssetTools(server, new AssetHandlers(walletClient));
|
|
22
|
+
registerSwapTools(server, new SwapHandlers(walletClient));
|
|
23
|
+
logger.info("Wallet/Asset/Swap tools registered");
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
logger.info("No ZANO_WALLET_URL set - wallet/asset/swap tools disabled");
|
|
27
|
+
}
|
|
28
|
+
const tradeClient = new TradeClient(config.tradeUrl, config.tradeToken);
|
|
29
|
+
registerTradeTools(server, new TradeHandlers(tradeClient), !!config.tradeToken);
|
|
30
|
+
logger.info("Trade tools registered");
|
|
31
|
+
}
|
|
32
|
+
function registerDaemonTools(server, client) {
|
|
33
|
+
const h = new DaemonHandlers(client);
|
|
34
|
+
server.tool("get_network_info", "Get Zano network status including height, difficulty, hashrate, connections, version", daemonDefs.GetNetworkInfoShape, async () => h.getNetworkInfo());
|
|
35
|
+
server.tool("get_height", "Get current Zano blockchain height", daemonDefs.GetHeightShape, async () => h.getHeight());
|
|
36
|
+
server.tool("get_block_by_height", "Get block header at a specific height", daemonDefs.GetBlockByHeightShape, async (args) => h.getBlockByHeight(args));
|
|
37
|
+
server.tool("get_block_by_hash", "Get block header by its hash", daemonDefs.GetBlockByHashShape, async (args) => h.getBlockByHash(args));
|
|
38
|
+
server.tool("get_last_block", "Get the latest block header", daemonDefs.GetLastBlockShape, async () => h.getLastBlock());
|
|
39
|
+
server.tool("get_block_details", "Get full block details including transactions", daemonDefs.GetBlockDetailsShape, async (args) => h.getBlockDetails(args));
|
|
40
|
+
server.tool("get_transaction", "Get transaction details by hash", daemonDefs.GetTransactionShape, async (args) => h.getTransaction(args));
|
|
41
|
+
server.tool("get_transactions", "Batch lookup of multiple transactions by their hashes", daemonDefs.GetTransactionsShape, async (args) => h.getTransactions(args));
|
|
42
|
+
server.tool("get_pool_info", "Get mempool (transaction pool) status and pending transactions", daemonDefs.GetPoolInfoShape, async () => h.getPoolInfo());
|
|
43
|
+
server.tool("get_asset_info", "Get metadata for a registered asset by its ID", daemonDefs.GetAssetInfoShape, async (args) => h.getAssetInfo(args));
|
|
44
|
+
server.tool("get_assets_list", "List all registered assets on the Zano blockchain", daemonDefs.GetAssetsListShape, async (args) => h.getAssetsList(args));
|
|
45
|
+
server.tool("resolve_alias", "Resolve a Zano alias to its address", daemonDefs.ResolveAliasShape, async (args) => h.resolveAlias(args));
|
|
46
|
+
server.tool("get_alias_by_address", "Look up the alias for a Zano address", daemonDefs.GetAliasByAddressShape, async (args) => h.getAliasByAddress(args));
|
|
47
|
+
server.tool("search_blockchain", "Search the blockchain by hash, alias, or address", daemonDefs.SearchBlockchainShape, async (args) => h.searchBlockchain(args));
|
|
48
|
+
server.tool("validate_signature", "Verify a signed message against an address", daemonDefs.ValidateSignatureShape, async (args) => h.validateSignature(args));
|
|
49
|
+
logger.info("Daemon tools registered (15 tools)");
|
|
50
|
+
}
|
|
51
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
52
|
+
function registerWalletTools(server, h) {
|
|
53
|
+
server.tool("get_balance", "Get wallet balance for all assets", walletDefs.GetBalanceShape, async () => h.getBalance());
|
|
54
|
+
server.tool("get_address", "Get wallet public address", walletDefs.GetAddressShape, async () => h.getAddress());
|
|
55
|
+
server.tool("get_wallet_status", "Get wallet sync status and info", walletDefs.GetWalletStatusShape, async () => h.getWalletStatus());
|
|
56
|
+
server.tool("transfer", "Send ZANO or assets to an address. Amounts in human-readable units.", walletDefs.TransferShape, async (args) => h.transfer(args));
|
|
57
|
+
server.tool("get_recent_transactions", "Get recent wallet transactions", walletDefs.GetRecentTransactionsShape, async (args) => h.getRecentTransactions(args));
|
|
58
|
+
server.tool("search_transactions", "Search wallet transactions by criteria", walletDefs.SearchTransactionsShape, async (args) => h.searchTransactions(args));
|
|
59
|
+
server.tool("sign_message", "Sign arbitrary data with the wallet", walletDefs.SignMessageShape, async (args) => h.signMessage(args));
|
|
60
|
+
server.tool("save_wallet", "Persist wallet state to disk", walletDefs.SaveWalletShape, async () => h.saveWallet());
|
|
61
|
+
server.tool("make_integrated_address", "Create an integrated address with payment ID", walletDefs.MakeIntegratedAddressShape, async (args) => h.makeIntegratedAddress(args));
|
|
62
|
+
server.tool("split_integrated_address", "Decode an integrated address", walletDefs.SplitIntegratedAddressShape, async (args) => h.splitIntegratedAddress(args));
|
|
63
|
+
server.tool("get_mining_history", "Get PoS staking reward history", walletDefs.GetMiningHistoryShape, async (args) => h.getMiningHistory(args));
|
|
64
|
+
server.tool("sweep_below", "Consolidate small outputs below a threshold", walletDefs.SweepBelowShape, async (args) => h.sweepBelow(args));
|
|
65
|
+
}
|
|
66
|
+
function registerAssetTools(server, h) {
|
|
67
|
+
server.tool("deploy_asset", "Deploy a new asset on Zano", assetDefs.DeployAssetShape, async (args) => h.deployAsset(args));
|
|
68
|
+
server.tool("emit_asset", "Mint additional supply of an asset", assetDefs.EmitAssetShape, async (args) => h.emitAsset(args));
|
|
69
|
+
server.tool("burn_asset", "Burn tokens of an asset", assetDefs.BurnAssetShape, async (args) => h.burnAsset(args));
|
|
70
|
+
server.tool("update_asset", "Update asset metadata", assetDefs.UpdateAssetShape, async (args) => h.updateAsset(args));
|
|
71
|
+
server.tool("transfer_asset_ownership", "Transfer ownership of an asset", assetDefs.TransferAssetOwnershipShape, async (args) => h.transferAssetOwnership(args));
|
|
72
|
+
server.tool("whitelist_asset", "Add an asset to the wallet whitelist", assetDefs.WhitelistAssetShape, async (args) => h.whitelistAsset(args));
|
|
73
|
+
server.tool("remove_asset_from_whitelist", "Remove an asset from the wallet whitelist", assetDefs.RemoveAssetFromWhitelistShape, async (args) => h.removeAssetFromWhitelist(args));
|
|
74
|
+
}
|
|
75
|
+
function registerSwapTools(server, h) {
|
|
76
|
+
server.tool("create_swap_proposal", "Create an ionic swap proposal. Amounts in human-readable units.", swapDefs.CreateSwapProposalShape, async (args) => h.createSwapProposal(args));
|
|
77
|
+
server.tool("get_swap_info", "Get details of an ionic swap proposal", swapDefs.GetSwapInfoShape, async (args) => h.getSwapInfo(args));
|
|
78
|
+
server.tool("accept_swap", "Accept and execute an ionic swap proposal", swapDefs.AcceptSwapShape, async (args) => h.acceptSwap(args));
|
|
79
|
+
}
|
|
80
|
+
function registerTradeTools(server, h, hasAuth) {
|
|
81
|
+
server.tool("get_trading_pair", "Get trading pair info by ID", tradeDefs.GetTradingPairShape, async (args) => h.getTradingPair(args));
|
|
82
|
+
server.tool("get_order_book", "Get order book for a trading pair", tradeDefs.GetOrderBookShape, async (args) => h.getOrderBook(args));
|
|
83
|
+
if (hasAuth) {
|
|
84
|
+
server.tool("create_order", "Create a buy/sell order on the DEX", tradeDefs.CreateOrderShape, async (args) => h.createOrder(args));
|
|
85
|
+
server.tool("cancel_order", "Cancel an active order", tradeDefs.CancelOrderShape, async (args) => h.cancelOrder(args));
|
|
86
|
+
server.tool("get_my_orders", "Get your active orders for a pair", tradeDefs.GetMyOrdersShape, async (args) => h.getMyOrders(args));
|
|
87
|
+
server.tool("apply_order", "Apply to match with another order (initiator role)", tradeDefs.ApplyOrderShape, async (args) => h.applyOrder(args));
|
|
88
|
+
server.tool("confirm_trade", "Confirm a finalized trade transaction", tradeDefs.ConfirmTradeShape, async (args) => h.confirmTrade(args));
|
|
89
|
+
server.tool("get_active_trade", "Get active transaction by order IDs", tradeDefs.GetActiveTradeShape, async (args) => h.getActiveTrade(args));
|
|
90
|
+
server.tool("dex_authenticate", "Authenticate with the Zano Trade API", tradeDefs.DexAuthenticateShape, async (args) => h.dexAuthenticate(args));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=register.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/tools/register.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,C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AC,IAAI,CAAC,aAAa,EAAE,oDAAoD,EAAE,SAAS,CAAC,eAAe,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QACrJ,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,uCAAuC,EAAE,SAAS,CAAC,iBAAiB,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9I,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,qCAAqC,EAAE,SAAS,CAAC,mBAAmB,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;QACnJ,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,sCAAsC,EAAE,SAAS,CAAC,oBAAoB,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;IACxJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CreateSwapProposalShape: {
|
|
3
|
+
to_finalizer: z.ZodArray<z.ZodObject<{
|
|
4
|
+
asset_id: z.ZodString;
|
|
5
|
+
amount: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
asset_id: string;
|
|
8
|
+
amount: string;
|
|
9
|
+
}, {
|
|
10
|
+
asset_id: string;
|
|
11
|
+
amount: string;
|
|
12
|
+
}>, "many">;
|
|
13
|
+
to_initiator: z.ZodArray<z.ZodObject<{
|
|
14
|
+
asset_id: z.ZodString;
|
|
15
|
+
amount: z.ZodString;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
asset_id: string;
|
|
18
|
+
amount: string;
|
|
19
|
+
}, {
|
|
20
|
+
asset_id: string;
|
|
21
|
+
amount: string;
|
|
22
|
+
}>, "many">;
|
|
23
|
+
destination_address: z.ZodString;
|
|
24
|
+
mixins: z.ZodDefault<z.ZodNumber>;
|
|
25
|
+
fee: z.ZodOptional<z.ZodString>;
|
|
26
|
+
expiration_time: z.ZodDefault<z.ZodNumber>;
|
|
27
|
+
};
|
|
28
|
+
export declare const GetSwapInfoShape: {
|
|
29
|
+
hex_raw_proposal: z.ZodString;
|
|
30
|
+
};
|
|
31
|
+
export declare const AcceptSwapShape: {
|
|
32
|
+
hex_raw_proposal: z.ZodString;
|
|
33
|
+
};
|
|
34
|
+
export declare const CreateSwapProposalSchema: z.ZodObject<{
|
|
35
|
+
to_finalizer: z.ZodArray<z.ZodObject<{
|
|
36
|
+
asset_id: z.ZodString;
|
|
37
|
+
amount: z.ZodString;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
asset_id: string;
|
|
40
|
+
amount: string;
|
|
41
|
+
}, {
|
|
42
|
+
asset_id: string;
|
|
43
|
+
amount: string;
|
|
44
|
+
}>, "many">;
|
|
45
|
+
to_initiator: z.ZodArray<z.ZodObject<{
|
|
46
|
+
asset_id: z.ZodString;
|
|
47
|
+
amount: z.ZodString;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
asset_id: string;
|
|
50
|
+
amount: string;
|
|
51
|
+
}, {
|
|
52
|
+
asset_id: string;
|
|
53
|
+
amount: string;
|
|
54
|
+
}>, "many">;
|
|
55
|
+
destination_address: z.ZodString;
|
|
56
|
+
mixins: z.ZodDefault<z.ZodNumber>;
|
|
57
|
+
fee: z.ZodOptional<z.ZodString>;
|
|
58
|
+
expiration_time: z.ZodDefault<z.ZodNumber>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
to_finalizer: {
|
|
61
|
+
asset_id: string;
|
|
62
|
+
amount: string;
|
|
63
|
+
}[];
|
|
64
|
+
to_initiator: {
|
|
65
|
+
asset_id: string;
|
|
66
|
+
amount: string;
|
|
67
|
+
}[];
|
|
68
|
+
destination_address: string;
|
|
69
|
+
mixins: number;
|
|
70
|
+
expiration_time: number;
|
|
71
|
+
fee?: string | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
to_finalizer: {
|
|
74
|
+
asset_id: string;
|
|
75
|
+
amount: string;
|
|
76
|
+
}[];
|
|
77
|
+
to_initiator: {
|
|
78
|
+
asset_id: string;
|
|
79
|
+
amount: string;
|
|
80
|
+
}[];
|
|
81
|
+
destination_address: string;
|
|
82
|
+
fee?: string | undefined;
|
|
83
|
+
mixins?: number | undefined;
|
|
84
|
+
expiration_time?: number | undefined;
|
|
85
|
+
}>;
|
|
86
|
+
export declare const GetSwapInfoSchema: z.ZodObject<{
|
|
87
|
+
hex_raw_proposal: z.ZodString;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
hex_raw_proposal: string;
|
|
90
|
+
}, {
|
|
91
|
+
hex_raw_proposal: string;
|
|
92
|
+
}>;
|
|
93
|
+
export declare const AcceptSwapSchema: z.ZodObject<{
|
|
94
|
+
hex_raw_proposal: z.ZodString;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
hex_raw_proposal: string;
|
|
97
|
+
}, {
|
|
98
|
+
hex_raw_proposal: string;
|
|
99
|
+
}>;
|
|
100
|
+
export type CreateSwapProposalInput = z.infer<typeof CreateSwapProposalSchema>;
|
|
101
|
+
export type GetSwapInfoInput = z.infer<typeof GetSwapInfoSchema>;
|
|
102
|
+
export type AcceptSwapInput = z.infer<typeof AcceptSwapSchema>;
|
|
103
|
+
//# sourceMappingURL=definitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../../src/tools/swap/definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;CAWnC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;CAE5B,CAAC;AAEF,eAAO,MAAM,eAAe;;CAE3B,CAAC;AAGF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoC,CAAC;AAC1E,eAAO,MAAM,iBAAiB;;;;;;EAA6B,CAAC;AAC5D,eAAO,MAAM,gBAAgB;;;;;;EAA4B,CAAC;AAE1D,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC/E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const SwapAsset = z.object({
|
|
3
|
+
asset_id: z.string().describe("Asset ID"),
|
|
4
|
+
amount: z.string().describe("Amount in human-readable units"),
|
|
5
|
+
});
|
|
6
|
+
export const CreateSwapProposalShape = {
|
|
7
|
+
to_finalizer: z
|
|
8
|
+
.array(SwapAsset)
|
|
9
|
+
.describe("Assets to send TO the finalizer (what you give)"),
|
|
10
|
+
to_initiator: z
|
|
11
|
+
.array(SwapAsset)
|
|
12
|
+
.describe("Assets to receive FROM the finalizer (what you get)"),
|
|
13
|
+
destination_address: z.string().describe("Finalizer's Zano address"),
|
|
14
|
+
mixins: z.number().int().default(10).describe("Privacy parameter (default: 10)"),
|
|
15
|
+
fee: z.string().optional().describe("Fee in ZANO human units (default: 0.01)"),
|
|
16
|
+
expiration_time: z.number().int().default(0).describe("Expiration timestamp (0 = no expiry)"),
|
|
17
|
+
};
|
|
18
|
+
export const GetSwapInfoShape = {
|
|
19
|
+
hex_raw_proposal: z.string().describe("Hex-encoded swap proposal"),
|
|
20
|
+
};
|
|
21
|
+
export const AcceptSwapShape = {
|
|
22
|
+
hex_raw_proposal: z.string().describe("Hex-encoded swap proposal to accept"),
|
|
23
|
+
};
|
|
24
|
+
// Schemas and types
|
|
25
|
+
export const CreateSwapProposalSchema = z.object(CreateSwapProposalShape);
|
|
26
|
+
export const GetSwapInfoSchema = z.object(GetSwapInfoShape);
|
|
27
|
+
export const AcceptSwapSchema = z.object(AcceptSwapShape);
|
|
28
|
+
//# sourceMappingURL=definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../../src/tools/swap/definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IACzB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC;IACzC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;CAC9D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,YAAY,EAAE,CAAC;SACZ,KAAK,CAAC,SAAS,CAAC;SAChB,QAAQ,CAAC,iDAAiD,CAAC;IAC9D,YAAY,EAAE,CAAC;SACZ,KAAK,CAAC,SAAS,CAAC;SAChB,QAAQ,CAAC,qDAAqD,CAAC;IAClE,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IACpE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAChF,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IAC9E,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC;CAC9F,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;CACnE,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;CAC7E,CAAC;AAEF,oBAAoB;AACpB,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;AAC1E,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAC5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { WalletClient } from "../../clients/wallet.js";
|
|
2
|
+
import type { CreateSwapProposalInput, GetSwapInfoInput, AcceptSwapInput } from "./definitions.js";
|
|
3
|
+
type ToolResult = {
|
|
4
|
+
content: Array<{
|
|
5
|
+
type: "text";
|
|
6
|
+
text: string;
|
|
7
|
+
}>;
|
|
8
|
+
};
|
|
9
|
+
export declare class SwapHandlers {
|
|
10
|
+
private client;
|
|
11
|
+
constructor(client: WalletClient);
|
|
12
|
+
createSwapProposal(input: CreateSwapProposalInput): Promise<ToolResult>;
|
|
13
|
+
getSwapInfo(input: GetSwapInfoInput): Promise<ToolResult>;
|
|
14
|
+
acceptSwap(input: AcceptSwapInput): Promise<ToolResult>;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/tools/swap/handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAQvD,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAE1B,KAAK,UAAU,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC;AASrE,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAe;gBAEjB,MAAM,EAAE,YAAY;IAI1B,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC;IA2DvE,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC;IAoCzD,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC;CAa9D"}
|