Submit Signature
Summary:
Step 1: Imports and Environment Setup
const {
ScheduleSignTransaction,
Client,
PrivateKey,
ScheduleInfoQuery
} = 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 otherAccountId = process.env.OTHER_ACCOUNT_ID;
const otherPrivateKey = PrivateKey.fromString(process.env.OTHER_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