undoDelegation static method
Creates a revocation that undoes a previous delegation.
This creates a revocation authorization that uses the same nonce as the original delegation, effectively canceling it.
Implementation
static Authorization undoDelegation({
required Authorization originalDelegation,
}) {
if (originalDelegation.isRevocation) {
throw ArgumentError('Cannot undo a revocation authorization');
}
return createRevocation(
chainId: originalDelegation.chainId,
nonce: originalDelegation.nonce,
);
}