@biconomy/sdk
Version:
SDK for Biconomy integration with support for account abstraction, smart accounts, ERC-4337.
20 lines • 689 B
JavaScript
/**
* Converts various validator types into a standardized validator format.
* Currently handles MinimalValidator implementations, but can be extended for other types.
*
* @param validator - The validator to convert
* @param address - Optional address to use for the validator
* @returns A Promise resolving to a MinimalValidator
*
* @throws {Error} When address is required but not provided
*/
export async function toValidator({ validator, address }) {
if (!validator.address && !address) {
throw new Error("Address is required");
}
return {
...validator,
address: address || validator.address
};
}
//# sourceMappingURL=toValidator.js.map