Skip to content

PowerPod/PowerPod-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 

Repository files navigation

ppd-api

New a function

supabase functions new function-name

Running Egde Functions Locally

cd your-project/supabase
supabase start # start the supabase stack
supabase functions serve # start the Functions watcher

Testing Invoking Edge Functions locally

curl --request POST 'http://localhost:54321/functions/v1/hello-world' \
  --header 'Authorization: Bearer SUPABASE_ANON_KEY' \
  --header 'Content-Type: application/json' \
  --data '{ "name":"Functions" }'

Get nonce for signature

curl --request POST 'http://localhost:54321/functions/v1/get-nonce' \
  --header 'Authorization: Bearer SUPABASE_ANON_KEY' \
  --header 'Content-Type: application/json' \
  --data '{ "publicAddress":"0x7...d64A" }'

Binding Device

curl --request POST 'http://localhost:54321/functions/v1/divice-binding' \
  --header 'Authorization: Bearer SUPABASE_ANON_KEY' \
  --header 'Content-Type: application/json' \
  --data '{ "publicAddress":"0x7...d64A", "message":"", "signature":"", "publisherName":"" }'

Deploy to production

supabase login
supabase functions deploy hello-world

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published