-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Per this comment, it would be nice to be able to construct an empty PublicKey so that if a user specifies this in an inner transaction (or potentially in a multisig transactions), the builder for PublicKey won't throw when PublicKey.builder().build() is called.
The comment in that issue focuses on using an empty PublicKey when constructing Payment transactions to be used as an inner transaction in a Batch transaction. However, this issue is likely more generally applicable to any Batch inner transaction where the SigningPublicKey should be an empty string.
Ordinarily, when constructing transactions like this, the SigningPublicKey should simply be omitted in the builder, as can be seen in the Batch ITs here. This works because the Transaction super-class has an Immutables @Default method that sets the SigningPublicKey to an empty string when not specified in a builder.
That said, It would be nice to be able to specify an empty PublicKey, as described in the comment. At the least, the builder should not throw when constructed with default values.