- Install Node.js, suggested
version@20.11.1 - Yarn
v4, installation instruction here - Install
metacraftCLI vianpm i -g metacraft-cli, suggestedversion@0.0.87+
- Run
yarn devormetacraftto launch development server
- Run
yarn deploy --stage [development | production | staging]to deploy under AWS, as a Serverless stack
- Enable EsLint on your Code Editor/IDE, enable format-on-save to keep your code always in the right format
- Use
send-rewardto command sending reward, see following endpoint/shape as reference:
curl --location 'https://71rvypwwrc.execute-api.ap-south-1.amazonaws.com/send-reward' \
--header 'Content-Type: application/json' \
--data '{
"walletAddress": "C8CAdCM27ad3W1XGW8CAbjJXoieesK1ggN8GQyAfn2vb",
"amount": "1000",
"resource": {
"time": 4321,
"banwhich": 1234
}
}'notes: resource field is absolutely optional, feel free to propose any shape that best fit Quickom interface.
- use
estimate-feeto estimate fee for the transaction before actually calling it, have the same param/args assend-reward:
curl --location 'https://71rvypwwrc.execute-api.ap-south-1.amazonaws.com/estimate-fee' \
--header 'Content-Type: application/json' \
--data '{
"walletAddress": "C8CAdCM27ad3W1XGW8CAbjJXoieesK1ggN8GQyAfn2vb",
"amount": "2.5"
}'- Use
keypairto get/generate Solana keypair, this would not store anything on the Relay, see following endpoint/shape as reference:
curl --location 'https://71rvypwwrc.execute-api.ap-south-1.amazonaws.com/keypair'