@ton-agent-kit/plugin-token 1.0.0 → 1.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ton-agent-kit/plugin-token",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Token operations plugin for TON Agent Kit — TON transfers, Jetton operations",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { Address, toNano, fromNano, internal } from "@ton/core";
3
- import { defineAction, type TransactionResult, explorerUrl, sendTransaction, toFriendlyAddress } from "@ton-agent-kit/core";
3
+ import { defineAction, type TransactionResult, sendTransaction, toFriendlyAddress } from "@ton-agent-kit/core";
4
4
 
5
5
  export const transferTonAction = defineAction<
6
6
  { to: string; amount: string; comment?: string },
@@ -46,12 +46,14 @@ export const transferTonAction = defineAction<
46
46
  }),
47
47
  ]);
48
48
 
49
+ const friendlyAddress = toFriendlyAddress(agent.wallet.address, agent.network);
50
+
49
51
  return {
50
52
  txHash: "pending",
51
53
  status: "sent",
52
54
  to: params.to,
53
55
  friendlyTo: toFriendlyAddress(toAddress, agent.network),
54
- explorerUrl: explorerUrl("pending", agent.network),
56
+ explorerUrl: `https://${agent.network === 'testnet' ? 'testnet.' : ''}tonviewer.com/${friendlyAddress}`,
55
57
  fee: "~0.005 TON",
56
58
  };
57
59
  },