paritytech / capi

[WIP] A framework for crafting interactions with Substrate chains
https://docs.capi.dev
Apache License 2.0
105 stars 10 forks source link

rework node compatibility message #1163

Open tjjfvi opened 1 year ago

tjjfvi commented 1 year ago

See #1162

Should be changed to:

Note: The minimum supported Node version is 20.3.1. We prioritize browser support, and thus we require the Web Crypto API to be accessible from globalThis.crypto. Node versions 18 and below only expose this api from require("node:crypto").webcrypto.

If you need to use Capi with a lower version of Node, you can shim globalThis.crypto:

globalThis.crypto = require("node:crypto").webcrypto

Should be updated in both the README and docs.capi.dev