Skip to content

karma-coin/cloud-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloud-functions

Karma Coin Firebase Cloud functions

Deploying

cd functions
yarn deploy

Testing

Running on production

curl -m 70 -X POST https://processpaymenttransaction-4325ps3n6q-uc.a.run.app \
-H "Authorization: bearer $(gcloud auth print-identity-token)" \
-H "Content-Type: application/json" \
-d '{
  "toId": "ca74yv91rFGVdkdRcwrSlMGlTLEXp84qyqbcvOLx7SQ=",
  "amount": "1 Karma Coin",
  "txId": "0x12345"
}'

Running with the local emulator

Run the firebase cloud functions emualtor

firebase emulators:start
curl -m 70 -X POST http://127.0.0.1:5001/karmacoin-83d45/us-central1/processPaymentTransaction \
-H "Authorization: bearer $(gcloud auth print-identity-token)" \
-H "Content-Type: application/json" \
-d '{
  "toId": "ca74yv91rFGVdkdRcwrSlMGlTLEXp84qyqbcvOLx7SQ=",
  "amount": "1 Karma Coin",
  "txId": "0x123012"
}'

About

Karma Coin Firebase Cloud functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published