Interface BatchSigner
- All Known Implementing Classes:
ImmutableBatchSigner
@Immutable
@Beta
public interface BatchSigner
Represents a signer in the
BatchSigners array of a Batch transaction. A BatchSigner can either sign
directly with a public key and signature or use multi-signing with a nested Signers array.
This class will be marked Beta until the featureBatch amendment is enabled on mainnet.
Its API is subject to change.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaccount()The account address of the signer.static ImmutableBatchSigner.Builderbuilder()Construct a builder for this class.default BatchSignerValidates that the BatchSigner has either direct signing fields or multi-sig signers, but not both.default List<SignerWrapper> signers()The array of signers for multi-signing (sorted).The public key used to create the signature.default booleanThe signature for the transaction.
-
Method Details
-
builder
Construct a builder for this class.- Returns:
- An
ImmutableBatchSigner.Builder.
-
account
Address account()The account address of the signer. This must match either the outer transaction's Account or one of the inner transaction accounts.- Returns:
- An
Address.
-
transactionSignature
The signature for the transaction. Present for direct signing.- Returns:
- An optionally-present
Signature.
-
signingPublicKey
The public key used to create the signature. Present for direct signing.- Returns:
- An optionally-present
PublicKey.
-
sortedSigners
@Default default boolean sortedSigners() -
signers
The array of signers for multi-signing (sorted). Present when using multi-sig instead of direct signing.Note: When building a BatchSigner, you can provide signers in any order, and they will be automatically sorted by account address for serialization and signing via the
checkAndNormalize()function.- Returns:
- A
ListofSignerWrappers in the order they were added.
-
checkAndNormalize
Validates that the BatchSigner has either direct signing fields or multi-sig signers, but not both.
-