npm install @grabjs/superapp-sdk
yarn add @grabjs/superapp-sdk
Import only the modules you need:
import { ContainerModule, ScopeModule } from '@grabjs/superapp-sdk';
Type guards and response types are also available as named exports:
import { isSuccess, isError } from '@grabjs/superapp-sdk';
If you are not using a bundler, load the SDK from a CDN and access it via the SuperAppSDK global:
<script src="https://cdn.jsdelivr.net/npm/@grabjs/superapp-sdk/dist/index.js"></script>
<script>
const { ContainerModule, ScopeModule, isSuccess, isError } = window.SuperAppSDK;
</script>