This endpoint emulates a token trading account. You can check balances, send tokens, and receive tokens.
To check the balance of an address, use the following curl command:
curl "https://jamiedubs-glifbux.web.val.run/balance?address=user1"
To send tokens, use the following curl command:
curl -X POST https://jamiedubs-glifbux.web.val.run/send \
-H "Content-Type: application/json" \
-d '{
"from": "user1",
"to": "user2",
"amount": 5
}'
To list all active accounts and their balances, use the following curl command:
curl "https://jamiedubs-glifbux.web.val.run/accounts"
Requires Chairman Authorization
To mint new tokens, use the following curl command:
curl -X POST https://jamiedubs-glifbux.web.val.run/mint \
-H "Content-Type: application/json" \
-H "Authorization: Bearer CHAIRMAN_PASSWORD" \
-d '{
"address": "user2",
"amount": 1000
}'
View source: Val Town