Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update mintNft API using proper format #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johnedvard
Copy link

@johnedvard johnedvard commented Feb 9, 2022

Summary

  • Update mintNft API using proper format
  • Update mint_nft example in README

I came across this StackOverflow question, and started debugging. It looks like the current /mint_nft-API doesn't add receiver_id to the functionCall, and is using the incorrect name and format for metadata. This PR addresses this. I hope this PR can be helpful. The current way of calling functionCall is deprecated, but this small change will hopefully make the current /mint_nft example work.

I ran the server and tested the API using curl command:

curl --header "Content-Type: application/json" -d '{"token_id": "example_id", "token_metadata": {"media":"https://ipfs.io/ipfs/Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu"},"account_id": "example.testnet","private_key": "somePrivateKey","contract": "example.testnet"}' -X POST http://localhost:3000/mint_nft

Update mint_nft example in README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant