Zilliqa / dev-portal-old

Documentation for Zilliqa developer
https://dev.zilliqa.com
GNU General Public License v3.0
16 stars 36 forks source link

new bech32 address in the api #103

Open Mrostgaard opened 4 years ago

Mrostgaard commented 4 years ago

When running this query: https://api.zilliqa.com/ Request:

{
    "id": "1",
    "jsonrpc": "2.0",
    "method": "GetBalance",
    "params": ["zil1rmhufazn2w09aeejkj0tg7fty6xz7wggup2tsh"]
}

It returns this response:

{
    "error": {
        "code": -8,
        "data": null,
        "message": "Address size not appropriate"
    },
    "id": "1",
    "jsonrpc": "2.0"
}

Is this not the correct way to use the api? Even using the address from the documentation returns an error

bb111189 commented 4 years ago

when interacting with the blockchain via json rpc query, it is all in base16. Only SDK and above uses bech32

Mrostgaard commented 4 years ago

@bb111189 Thanks. So how do I use a bech32 address to communicate with json rpc, is that not possible? Is there some way to convert bech32 to base16?