@mikejerred/points-sdk
v1.0.1
Published
Absinthe points client library
Downloads
5
Readme
Points SDK
A client SDK for interacting with the points REST API.
Installation
Install from npm:
npm install @mikejerred/points-sdk --save
Usage Example
import { createCampaign, createClient } from '@mikejerred/points-sdk';
const { apiKey, campaignId } = await createCampaign();
const client = createClient(apiKey, campaignId);
await client.distributePoints(
'event_name',
{ points: 1000, address: '0x24e5bec76fa3d750bfa97bdbf16b377f6b13af15' },
);
const points = await client.getPoints('0x24e5bec76fa3d750bfa97bdbf16b377f6b13af15');