These methods allow you to build a transaction that requires further processing before it is submitted to a Hedera network. After you freeze the transaction you can use .sign(privateKey) to sign the transaction with multiple keys or convert the transaction to bytes for further processing.
//Create an unsigned transaction AccountCreateTransaction transaction =newAccountCreateTransaction().setKey(newPublicKey).setInitialBalance(Hbar.fromTinybars(1000));//Freeze the transaction for signing//The transaction cannot be modified after this pointAccountCreateTransaction freezeTransaction =transaction.freezeWith(client);System.out.println(freezeTransaction);//v2.0.0
//Create an unsigned transaction const transaction =newAccountCreateTransaction().setKey(newPublicKey).setInitialBalance(Hbar.fromTinybars(1000));//Freeze the transaction for signing//The transaction cannot be modified after this pointconst freezeTransaction =transaction.freezeWith(client);console.log(freezeTransaction);//v2.0.5
//Create an unsigned transaction transaction := hedera.NewAccountCreateTransaction().SetKey(newKey.PublicKey()).SetInitialBalance(hedera.NewHbar(1000))//Freeze the transaction for signing//The transaction cannot be modified after this pointfreezeTransaction, err := transaction.FreezeWith(client)if err !=nil {panic(err)}println(freezeTransaction.String())//v2.0.0
Freeze this transaction from further modification to prepare for signing or serialization. You will need to set the node account ID (setNodeAccountId()) and transaction ID (setTransactionId()).
freezeWith(<client>)
Client
Freeze this transaction from further modification to prepare for signing or serialization. Will use the 'Client', if available, to generate a default Transaction ID and select 1/3 nodes to prepare this transaction for.
freezeWithSigner(<signer>)
Freeze the transaction with a local wallet. Local wallet available in Hedera JavaScript SDK only. >=v2.11.0