@civic/gateway-notifications
v0.1.0
Published
Client SDK and program for registering and fetching Gateway notifications on Solana
Downloads
10
Maintainers
Keywords
Readme
Gateway Notification
An Anchor program, typescript client, and cli tool to create short-lived notifications of gateway-related events.
Quick Start
yarn global add @civic/gateway-notifications
# get all notifications for the gatbGF9DvLAw3kWyn1EmH5Nh1Sqp8sTukF7yaQpSc71 network on mainnet-beta
gw-notifications fetch -n gatbGF9DvLAw3kWyn1EmH5Nh1Sqp8sTukF7yaQpSc71 -c mainnet-beta
CLI
To run via the cli, first install @identity.com/solana-gatekeeper-lib.
# Issue a new token on devnet using the dev civic gatekeeper key
gateway issue -c devnet -g G1y4BUXnbSMsdcXbCTMEdRWW9Th9tU9WfAmgbPDX7rRG.json <OWNER>
# Immediately revoke the token
gateway revoke -c devnet -g G1y4BUXnbSMsdcXbCTMEdRWW9Th9tU9WfAmgbPDX7rRG.json <GATEWAY_TOKEN>
# Publish a notification using the notification CLI tool.
WALLET=G1y4BUXnbSMsdcXbCTMEdRWW9Th9tU9WfAmgbPDX7rRG.json ./bin/run notify -g <GATEWAY_TOKEN>
Program
This program uses Anchor. To follow the below steps, install the anchor cli either via Cargo or NPM.
Build the program:
yarn build
Run the tests:
yarn test