polkascan / substrate-interface-api

Substrate Interface API Application
https://documenter.getpostman.com/view/9969999/SWT5iLXH?version=latest
GNU General Public License v3.0
4 stars 13 forks source link

keypair_create #14

Open caetanix opened 3 years ago

caetanix commented 3 years ago

when i run some rpc calls give this error... this an example

{ "jsonrpc": "2.0", "method": "keypair_create", "params": [12], "id": 1 }

{ "error": { "code": -999, "message": "Not enough parameters provided" }, "id": 1 }

arjanz commented 3 years ago

There is another parameter required, specifying the crypto type (1 = SR25519 (default), 2 = ED25519)

So the body would be something like:

{"jsonrpc":"2.0","method":"keypair_create","params":[12,1],"id":6}

For use-case examples I would recommend the example GUI: https://github.com/polkascan/substrate-interface-gui/

Or the repos that contains all the elements: https://github.com/polkascan/substrate-interface