@@ -74,23 +74,19 @@ export class PolkadotAgentKit implements IPolkadotApi, IPolkadotAgentApi {
7474 * Get Native Transfer Tool
7575 * Creates a tool for transferring native tokens to an address
7676 *
77- * @param to - The recipient address as string
78- * @param amount - The amount to transfer as bigint
7977 * @returns DynamicStructuredTool for transferring native tokens
8078 *
8179 * @example
8280 * ```typescript
8381 * // Create a transfer tool
84- * const transferTool = agent.transferNativeTool(
85- * "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
86- * BigInt(1000000000000) // 1 DOT in planck
87- * );
82+ * const transferTool = agent.transferNativeTool();
8883 *
8984 * // Tool can be used with LangChain
90- * const result = await transferTool.call(\{
91- * address: to,
92- * amount: amount
93- * \});
85+ * const result = await transferTool.call({
86+ * amount: "1",
87+ * to: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
88+ * chain: "polkadot"
89+ * });
9490 * ```
9591 *
9692 * @throws \{Error\} If the transfer fails or parameters are invalid
@@ -99,9 +95,32 @@ export class PolkadotAgentKit implements IPolkadotApi, IPolkadotAgentApi {
9995 return this . agentApi . transferNativeTool ( this . getSigner ( ) )
10096 }
10197
98+ /**
99+ * Get XCM Transfer Native Tool
100+ * Creates a tool for transferring native tokens across chains using XCM (Cross-Consensus Messaging)
101+ *
102+ * @returns DynamicStructuredTool for cross-chain native token transfers
103+ *
104+ * @example
105+ * ```typescript
106+ * // Create an XCM transfer tool
107+ * const xcmTransferTool = agent.xcmTransferNativeTool();
108+ *
109+ * // Tool can be used with LangChain for cross-chain transfers
110+ * const result = await xcmTransferTool.call(\{
111+ * amount: "1",
112+ * to: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
113+ * sourceChain: "polkadot",
114+ * destChain: "polkadot_asset_hub"
115+ * \});
116+ * ```
117+ *
118+ * @throws \{Error\} If the XCM transfer fails or parameters are invalid
119+ */
102120 xcmTransferNativeTool ( ) : XcmTransferNativeAssetTool {
103121 return this . agentApi . xcmTransferNativeTool ( this . getSigner ( ) , this . getCurrentAddress ( ) )
104122 }
123+
105124 /**
106125 * Get Address
107126 *
0 commit comments