From c9c9fc8e6fd1590959f329d352c78fafa4b1589d Mon Sep 17 00:00:00 2001 From: Dan Oved Date: Wed, 29 Nov 2023 14:15:25 -0800 Subject: [PATCH] update changeset --- .changeset/rare-wolves-cheat.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.changeset/rare-wolves-cheat.md b/.changeset/rare-wolves-cheat.md index 824881640..bc81fd7bd 100644 --- a/.changeset/rare-wolves-cheat.md +++ b/.changeset/rare-wolves-cheat.md @@ -4,15 +4,14 @@ ### Changes to `preminter` +lower level `preminter.ts` now supports premint v2 by defining v2 typed data defintions. + * `isValidSignature` now takes either v1 or v2 of a premint config, along with the premint config version. and both recovers the signer address and validates if the signer can create a premint on the given contract. +* new function `premintTypedDataDefinition` which takes a premint config version and returns the signable typed data definition for that version +* new function `recoverCreatorFromCreatorAttribution` which recovers the creator address from a `CreatorAttribution` event +* new function `supportsPremintVersion` which checks if a given token contract supports a given premint config version +* new function `tryRecoverPremintSigner` which takes a premint config version and a premint signature, and tries to recover the signer address from the signature. If the signature is invalid, it returns undefined. ### Changes to PremintClient -sdk now supports creating and signing premints for v2 of Premint Config: - -* `preminter.isValidSignature` -* 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 +`PremintClient` creation, updating, and deletion now take both premint config v1 and v2, but currently rejects them until the backend api supports creating v2 premints.