Skip to content

Add Empty PublicKey #683

@sappenin

Description

@sappenin

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions