Published on

How to fix polyfill issues in @solana/kit

Authors
  • Name
    Twitter

When working with the new @solana/kit package (which is the renamed 2.0 version of @solana/web3.js) the following error may occur: No key generation implementation could be found.

The issue usually is that you are working in an environment that does not support Ed25519 key manipulation natively. To resolve this you can install @solana/webcrypto-ed25519-polyfill and run it's install() function like so:

// Install crypto polyfill for Ed25519 key generation in Node.js
import { install } from '@solana/webcrypto-ed25519-polyfill';
install();