Hedera
Search…
Sign a scheduled transaction
A transaction that appends signatures to a schedule transaction. You will need to know the schedule ID to reference the schedule transaction to submit signatures to. A record will be generated for each ScheduleSign transaction that is successful and the schedule entity will subsequently update with the public keys that have signed the schedule transaction. To view the keys that have signed the schedule transaction, you can query the network for the schedule info. Once a schedule transaction receives the last required signature, the schedule transaction executes.
Transaction Signing Requirements
  • The key of the account paying for the transaction
Transaction Properties
Field
Description
Schedule ID
The ID of the schedule transaction to submit the signature for
Constructor
Description
new ScheduleSignTransaction()
Initializes the ScheduleSignTransaction object
1
new ScheduleSignTransaction()
Copied!

Methods

V2
Method
Type
Requirement
setScheduleId(<scheduleId>)
ScheduleId
Required
clearScheduleId(<scheduleId>)
ScheduleId
Optional
getScheduleId()
ScheduleId
Optional
Java
1
//Create the transaction
2
ScheduleSignTransaction transaction = new ScheduleSignTransaction()
3
.setScheduleId(scheduleId)
4
.freezeWith(client)
5
.sign(privateKeySigner1);
6
​
7
//Sign with the client operator key to pay for the transaction and submit to a Hedera network
8
TransactionResponse txResponse = transaction.execute(client);
9
​
10
//Get the receipt of the transaction
11
TransactionReceipt receipt = txResponse.getReceipt(client);
12
​
13
//Get the transaction status
14
Status transactionStatus = receipt.status;
15
System.out.println("The transaction consensus status is " +transactionStatus);
Copied!
JavaScript
1
//Create the transaction
2
const transaction = await new ScheduleSignTransaction()
3
.setScheduleId(scheduleId)
4
.freezeWith(client)
5
.sign(privateKeySigner1);
6
​
7
//Sign with the client operator key to pay for the transaction and submit to a Hedera network
8
const txResponse = await transaction.execute(client);
9
​
10
//Get the receipt of the transaction
11
const receipt = await txResponse.getReceipt(client);
12
​
13
//Get the transaction status
14
const transactionStatus = receipt.status;
15
console.log("The transaction consensus status is " +transactionStatus);
Copied!
Go
1
//Create the transaction and freeze the unsigned transaction
2
transaction, err := hedera.NewScheduleSignTransaction().
3
SetScheduleID(scheduleId).
4
FreezeWith(client)
5
​
6
if err != nil {
7
panic(err)
8
}
9
​
10
//Sign with one of the required signatures, sign with the client operator private key and submit the transaction to a Hedera network
11
txResponse, err := transaction.Sign(privateKeySigner1).Execute(client)
12
​
13
if err != nil {
14
panic(err)
15
}
16
​
17
//Request the receipt of the transaction
18
receipt, err := txResponse.GetReceipt(client)
19
​
20
if err != nil {
21
panic(err)
22
}
23
​
24
//Get the transaction consensus status
25
status:= *receipt.Status
26
​
27
fmt.Printf("The transaction consensus status is %v\n", status)
Copied!
Last modified 3mo ago
Copy link
Contents
Methods