@solana/web3.js-legacy-sham
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-experimental.a7c0b6a • Public • Published

npm npm-downloads semantic-release
code-style-prettier

@solana/web3.js-legacy-sham

This package is a drop-in replacement for a subset of the version 1.x @solana/web3.js interfaces. Its goal is to satisfy the legacy interfaces with as little code as possible.

If you depend on web3.js directly then you should not use this. Instead, migrate to version >=2 of @solana/web3.js.

On the other hand, if you depend on the legacy library transitively through a dependency that you don't control, you can use this sham to satisfy those libraries' dependency on the legacy web3.js interfaces with fewer bytes of JavaScript code.

Usage

  1. Install the library into your project
    npm install --save @solana/web3.js-legacy-sham
  2. Override your dependencies' dependency on the legacy library in your package.json. As an example, imagine that you wish to override the Metaplex token metadata library's dependency on the legacy web3.js.
    • Using pnpm overrides
      "pnpm": {
        "overrides": {
          "@metaplex-foundation/mpl-token-metadata>@solana/web3.js": "npm:@solana/web3.js-legacy-sham"
        }
      }
    • Using npm overrides
      "overrides": {
        "@metaplex-foundation/mpl-token-metadata": {
          "@solana/web3.js": "npm:@solana/web3.js-legacy-sham"
        }
      }
    • Using yarn resolutions
      "resolutions": {
        "@metaplex-foundation/mpl-token-metadata/@solana/web3.js": "npm:@solana/web3.js-legacy-sham"
      }

Readme

Keywords

Package Sidebar

Install

npm i @solana/web3.js-legacy-sham

Weekly Downloads

4

Version

1.0.0-experimental.a7c0b6a

License

MIT

Unpacked Size

334 kB

Total Files

24

Last publish

Collaborators

  • mcintyre94
  • 2501babe
  • lorisleiva
  • buffalojoec
  • ngundotra
  • _chido
  • steveluscher
  • seanyoung
  • tyera
  • joncinque
  • ryoqun
  • trent-solana
  • jordansexton