import { getStarknetAccount, isStarknetWalletAccount } from "@dynamic-labs-sdk/starknet";
import { getPrimaryWalletAccount } from "@dynamic-labs-sdk/client";
const walletAccount = getPrimaryWalletAccount();
if (walletAccount && isStarknetWalletAccount(walletAccount)) {
const { account } = await getStarknetAccount({ walletAccount });
// Use the account to interact with the Starknet blockchain
// For example, invoke a contract method:
const result = await account.execute({
contractAddress: "0x...",
entrypoint: "transfer",
calldata: ["0x...", "100"],
});
console.log("Transaction hash:", result.transaction_hash);
}