AuthorizationBatch class
Utility class for creating and managing batch authorizations.
Constructors
- AuthorizationBatch()
- Creates an empty authorization batch.
-
AuthorizationBatch.forContracts({required int chainId, required List<
String> contractAddresses, required BigInt startingNonce}) -
Creates a batch authorization for multiple contracts.
factory
-
AuthorizationBatch.fromRlpList(List<
List> rlpList) -
Creates a batch from RLP list.
factory
-
AuthorizationBatch.revocations({required int chainId, required List<
BigInt> nonces}) -
Creates a batch with revocation authorizations.
factory
Properties
- areAllSigned → bool
-
Checks if all authorizations are signed.
no setter
-
Gets the list of authorizations in this batch.
no setter
-
delegations
→ List<
Authorization> -
Gets only the non-revocation authorizations.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasRevocations → bool
-
Checks if any authorization is a revocation.
no setter
- isEmpty → bool
-
Checks if the batch is empty.
no setter
- isNotEmpty → bool
-
Checks if the batch is not empty.
no setter
- length → int
-
Gets the number of authorizations in this batch.
no setter
-
revocations
→ List<
Authorization> -
Gets only the revocation authorizations.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(
Authorization authorization) → void - Adds an authorization to the batch.
-
addAll(
Iterable< Authorization> authorizations) → void - Adds multiple authorizations to the batch.
-
clear(
) → void - Clears all authorizations from the batch.
-
copy(
) → AuthorizationBatch - Creates a copy of this batch.
-
estimateGasCost(
) → BigInt - Gets the total gas cost estimate for this batch.
-
filterByChainId(
int chainId) → AuthorizationBatch - Filters authorizations by chain ID.
-
getChainIds(
) → Set< int> - Gets all unique chain IDs in this batch.
-
getContractAddresses(
) → Set< String> - Gets all unique contract addresses in this batch.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
Authorization authorization) → bool - Removes an authorization from the batch.
-
removeAt(
int index) → Authorization - Removes an authorization at the specified index.
-
signAll(
Signer signer) → Future< AuthorizationBatch> - Signs all authorizations in the batch with the given signer.
-
signAllWithPrivateKey(
Uint8List privateKey) → AuthorizationBatch - Signs all authorizations in the batch with a private key.
-
toRlpList(
) → List< List> - Converts the batch to a list suitable for RLP encoding.
-
toString(
) → String -
A string representation of this object.
override
-
validateFormat(
) → bool - Validates that all authorizations in the batch are properly formatted.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited