This project contains all the serverless functions consumed by the BitPazaar project.
Run all unit tests:
npx mocha
Invoke Function Locally:
serverless invoke local --stage mainnet -f functionName
serverless invoke local --stage mainnet -f generateBitPazaarAccessKey --data '{ "queryStringParameters": {"name":"Namethon"}}'
serverless invoke local --stage mainnet -f getNftsByOwner --data '{ "queryStringParameters": {"address":"address"}, "headers": {"Authorization": "Bearer jwt"}}'
serverless invoke local --stage mainnet -f getNftMetadata --data '{ "queryStringParameters": {"contractAddress": "address", "tokenId": id}, "headers": {"Authorization": "Bearer jwt"}}'
serverless invoke local --stage mainnet -f searchForCollections --data '{ "queryStringParameters": {"searchStr": "search_string"}, "headers": {"Authorization": "Bearer jwt"}}'
serverless invoke local --stage mainnet -f getNftRarity --data '{ "queryStringParameters": {"contractAddress": "address", "tokenId": id}, "headers": {"Authorization": "Bearer jwt"}}'
serverless invoke local --stage mainnet -f getCollectionRarityAttributes --data '{ "queryStringParameters": {"contractAddress": "address"}, "headers": {"Authorization": "Bearer jwt"}}'
serverless invoke local --stage mainnet -f getCollectionNfts --data '{ "queryStringParameters": {"contractAddress": "address", "pageKey": "page_key"}, "headers": {"Authorization": "Bearer jwt"}}'
Invoke Function on AWS:
serverless invoke -f functionName
Deploy function to aws:
serverless deploy serverless deploy --stage mainnet