Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

mallendeo/nas-giveaway-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nas-giveaway-server

Install

$ git clone https://github.com/mallendeo/nas-giveaway-server
$ yarn # or npm i

# create config directory
$ mkdir -p ~/.nas-giveaway
$ touch  ~/.nas-giveaway/config.json

Config file example:

{
  "contractAddr": {
    "mainnet": "n1LXsq2imeWFSq7ZSpoT1JgrRoKpMHP8stz",
    "testnet": "n1LXsq2imeWFSq7ZSpoT1JgrRoKpMHP8stz"
  },
  "passphrase": "some password"
}

Copy your encrypted wallet file to the config directory

Example:

$ cp ~/Downloads/n1LXsq2imeWFSq7ZSpoT1JgrRoKpMHP8stz.json ~/.nas-giveaway

Run the server:

$ PORT=3002 yarn dev # live-reload fastify server

Usage

Claim

# curl -X POST http://localhost:3002/claim/{{your_address}}
$ curl -X POST http://localhost:3002/testnet/claim/n1LXsq2imeWFSq7ZSpoT1JgrRoKpMHP8stz
$ curl -X POST http://localhost:3002/mainnet/claim/n1LXsq2imeWFSq7ZSpoT1JgrRoKpMHP8stz

License

MIT

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published