Installation
Installation
npm install @mocanetwork/airkit
Bundling
This module is distributed in 3 formats
esm
builddist/airkit.esm.js
is es6 formatcommonjs
builddist/airkit.cjs.js
in es5 formatumd
builddist/airkit.umd.min.js
In ES5 format without polyfilling corejs minified
By default, the appropriate format is used for your specified use case. A different format can be used (if you know what you're doing) by referencing the correct file.
Dynamic Import
If not already, the node buffer and process libraries need to be polyfilled.
Install node-polyfill-webpack-plugin:
npm install --save-dev node-polyfill-webpack-plugin
Update your webpack config as follows
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
module.exports = {
webpack: {
plugins: [
new NodePolyfillPlugin({
additionalAliases: [
"buffer",
"crypto",
"assert",
"http",
"https",
"os",
"url",
"zlib",
"stream",
"_stream_duplex",
"_stream_passthrough",
"_stream_readable",
"_stream_writable",
"_stream_transform",
"process",
],
}),
],
},
};
Let's get you started with integrating the AIR account
Refer to this GitHub Repo to understand the functionalities of the AIR Account SDK and setup the project locally.
Last updated