Install @grabjs/superapp-sdk with your package manager of choice.
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.
Always pin to a specific version (e.g., @x.y.z) — omitting the version always fetches the latest release, which may contain breaking changes.
<script src="https://cdn.jsdelivr.net/npm/@grabjs/superapp-sdk@x.y.z/dist/index.js"></script>
<script>
const { ContainerModule, ScopeModule, isSuccess, isError } = window.SuperAppSDK;
</script>