azimuth-cli icon indicating copy to clipboard operation
azimuth-cli copied to clipboard

Breaking roller changes

Open pkova opened this issue 2 years ago • 0 comments

There have been breaking roller rpc changes since the development of azimuth-cli started. When trying to spawn L2 planets with azimuth-cli, I ran into this problem:

curl --location --request POST 'https://roller.urbit.org/v1/roller' --header 'Content-Type: application/json' --data-raw '{
    "jsonrpc": "2.0",
    "method": "getNonce",
    "params": {
        "from": "~lapdeg"
    },
    "id": "1234"
}'
{"id":"1234","error":{"code":-32700,"message":"Failed to parse"},"jsonrpc":"2.0"}

The properly formed getNonce call is this nowadays:

curl --location --request POST 'https://roller.urbit.org/v1/roller' --header 'Content-Type: application/json' --data-raw '{
    "jsonrpc": "2.0",
    "method": "getNonce",
    "params": {
        "from": {"ship": "~lapdeg", "proxy": "spawn"}
    },
    "id": "1234"
}'
{"id":"1234","jsonrpc":"2.0","result":4253}

You could use the roller client (npm, github) instead of raw json rpc calls to fix this.

pkova avatar Jun 17 '22 17:06 pkova