import { createClient, getNetworkConfig } from "ault-sdk-ts";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount("0x...");
const client = await createClient({
network: getNetworkConfig("ault_10904-1"),
signer: account,
});
const licenses = await client.license.getOwnedBy(client.address);
const epoch = await client.miner.getCurrentEpoch();
const tx = await client.delegateMining({
licenseIds: [1, 2, 3],
operator: "0xOperator...",
});
console.log(tx.txHash, tx.success);