Skip to content

v2.4.0

Choose a tag to compare

@ryanio ryanio released this 09 Sep 00:25
· 12 commits to main since this release

What's Changed

Picks up @opensea/wallet-adapters@1.0.0 and @opensea/sdk@12.4.1.

PrivySvmAdapter and the Solana types are re-exported from the package root, and createWalletFromEnv({ chainType: "svm" }) selects a Solana wallet. With no argument it still returns the EVM one, so existing callers are unchanged.

swaps execute builds to/data/chainId transactions, so it needs an EVM wallet. Passing a Solana one now fails with a message naming the reason, before any quote request, rather than partway through on a missing method:

Error: wallet "privy-svm" signs for svm; swap execution requires an EVM wallet

SwapsAPI.execute keeps taking WalletAdapter rather than narrowing to EvmWalletAdapter, because createWalletFromEnv() returns the union and narrowing the parameter would have stopped execute(opts, createWalletFromEnv()) from compiling. It checks at its own boundary instead, so a JavaScript consumer of this package gets the same clear error a TypeScript one does.

The auth command signs EIP-712 and rejects a Solana wallet the same way.

Nothing breaks.

Full Changelog: v2.3.0...v2.4.0