Delete Scheduled Transaction
Summary:
Step 1: Imports and Environment Setup
const {
ScheduleDeleteTransaction,
Client,
PrivateKey
} = require("@hashgraph/sdk");
require('dotenv').config({ path: 'Scheduled_TX/.env' });Step 2: Environment Variables Retrieval and Validation
const myAccountId = process.env.MY_ACCOUNT_ID;
const myPrivateKey = PrivateKey.fromString(process.env.MY_PRIVATE_KEY);
const scheduleId = process.env.SCHEDULE_ID;
if (myAccountId == null ||
myPrivateKey == null ) {
throw new Error("Environment variables myAccountId and myPrivateKey must be present");
}Step 3: Client Setup
Step 4: Main Function
Step 5: Execution:
Last updated