diff --git a/.changeset/rare-wolves-cheat.md b/.changeset/rare-wolves-cheat.md index c5962aa39..2ec9409a2 100644 --- a/.changeset/rare-wolves-cheat.md +++ b/.changeset/rare-wolves-cheat.md @@ -2,4 +2,11 @@ "@zoralabs/protocol-sdk": patch --- -support parsing and recovering signature from premint config version 2 +sdk now supports creating and signing premints for v2 of Premint Config: + +* `preminter.isValidSignature` now takes either v1 or v2 of a premint config, along with the premint config version. Underneath the hood, it changes how it works by recovering the signer client-side, then calling an rpc method to check if the signer is authorized to create premings +* new function `preminter.supportsPremintVersion` which checks if a given token contract supports a given premint config version +* new function `preminter.recoverCreatorFromCreatorAttribution` which recovers the creator address from a `CreatorAttribution` event +* `preminter.premintTypedDataDefinition` now takes a premint config version, and returns the correct typed data definition for that version + +* premint client methods now work with both v1 and v2 of the premint config, and takes an additional premint config version parameter \ No newline at end of file