Skip to main content

Polywrap vs. JavaScript SDKs

tip

Polywrap is a substantial improvement over JavaScript SDKs and produces a seamless and intuitive Web3 protocol integration experience for blockchain developers.

The table below highlights the contrasts between JavaScript SDKs and Polywrap wrappers as it concerns compatibility & maintainability, ease of use, bundle size, and upgrades & patches.

CategoryPolywrapperJavaScript SDK
Compatibility & MaintainabilityWrappers run in any environment, meaning you just need to program your SDK once -- saving you time.JS-based SDKs require JS-based apps in order to run, thereby disincentivizing developers from building apps in other languages. Supporting new app "types" requires writing and maintaining a new SDK.
Easy of UseDevelopers interact with Polywrap through simple GraphQL, making them as easy to use as Web2 APIs like Twitter's.Developers must learn how to instantiate classes, and call into the various methods and functions the JS SDK provides.
SecurityWrappers run within individual sandboxes, ensuring your integrations are isolated from your application. Users are safer with Polywrap.JavaScript SDKs, and any other type of traditional SDK, execute unbounded within your application's memory. This means that the SDK, and all of its dependencies, have direct access to the user's data within your applications. This has lead to many hacks in the past, leaving users vulnerable and with a large loss of funds.
Bundle SizeWrappers do not affect your app's bundle size, since wrappers are downloaded at runtime from a decentralized endpoint like IPFS.JavaScript SDKs are installed using npm, and embedded into your app's bundle, increasing the overall size of the application.
Upgrades & PatchesSince wrappers are resolved at runtime, this allows for optional automatic updates, in the event the app is querying an updatable URI (such as an "ENS" domain).Since JS SDKs are bundled into applications, when new patches or features are released, the application must be rebuilt with the latest version. If breaking backend (smart contract) upgrades are performed, this would render the application broken until you rebuild with the latest SDK.