Skip to content

Commit

Permalink
update changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
oveddan committed Nov 29, 2023
1 parent aec07e5 commit 9025ddf
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .changeset/rare-wolves-cheat.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
`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.

0 comments on commit 9025ddf

Please sign in to comment.