The **SUI Loyalty Platform SDK** is a SDK designed to integrate a loyalty platform with the SUI blockchain using Move smart contracts. The SDK provides a modular framework to facilitate user sign-up, loyalty program configuration, token management, custom
npm install moj-loyalty-cli
sui-sdk/
├── src/
│ ├── auth/
│ ├── clients/
│ ├── modules/
│ ├── utils/
│ ├── index.js
│ ├── constants.js
│ └── package.json
└── tests/
└── README.md
`
$3
`sh
npm run build
npm publish
`
Usage
Import the SDK and use the package in the script
`sh
npm install loyalty-sdk-test
`
Authorize by setting API Key
`js
const sdk = new AuthManager('chain-network');
sdk.setApiKey('API Key');
`
Authorize and create the JWT Token
`js
const sdk = new AuthManager('chain-network');
sdk.generateJWT('wallet-address','signature','chain','message',sdk);
`
Setting JWT Token Key
`js
const sdk = new AuthManager('chain-network');
sdk.setJWT('JWT Token');
`
Initiating the claim
`js
let claim = new ClaimModule();
let response = await claim.initiateClaim('mission-id','user-unique-address',sdk);
`
Fetching the claim status
`js
let admin = new AdminModule();
let response = await admin.getClaimStatus('tenant-slug','mission-id','user-unique-address','claim-id',sdk);
`
Get All the Missions
`js
let admin = new AdminModule();
let response = await admin.getMissions('tenant-slug',sdk);
`
Get All the Rewards
`js
let admin = new AdminModule();
let response = await admin.getRewards('tenant-slug',sdk);
``