You are viewing a single comment's thread from:

RE: Making a Decentralized Game on Hive - Tic Tac Toe - Part 1

in HiveDevs2 years ago

That's not related to JS. The Hive API node wants a call in that format. Check APIs on devportal
Parameters are sent in an array. Here, we have to put another array inside that array because API accepts a list of accounts not a single account.

The above code is equivalent to this curl:

curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_accounts", "params":[["username"]], "id":1}' https://api.hive.blog