Protocol Related Methods

hmy_isLastBlock

Is block epoch last block

Method: POST

https://one.nownodes.io

Example body (raw)

{
    "jsonrpc":"2.0",
    "method":"hmy_isLastBlock",
    "params":["10"],
    "id":1
}

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "error": {
        "code": -32602,
        "message": "invalid argument 0: json: cannot unmarshal string into Go value of type uint64"
    }
}

hmy_epochLastBlock

Epoch last block

Method: POST

https://one.nownodes.io

Example body (raw)

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

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "error": {
        "code": -32602,
        "message": "missing value for required argument 0"
    }
}

hmy_latestHeader

Method: POST

https://one.nownodes.io

Example body (raw)

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

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0xa4f247f668a6b7b97779603ae2af238269cb5641f43e8dc1d0c03a41a1139a04",
        "blockNumber": 56995612,
        "crossLinks": [
            {
                "block-number": 59771642,
                "epoch-number": 1912,
                "hash": "0xddbad2ca683540a0a0d13e0c0119b2014f107b544ca8fde47b22d3b1cc800a2b",
                "shard-id": 1,
                "signature": "cdb63d63d4d4f051edc23231b7c45e1550dc66a1ff4c855638ece1bec5db4899e781ad40c2cb293eec3d5862c87add155851211f0a04ceb036a12576a466110552902be67a0b6c38b2e844b143e238231c589590b46cb3de0adc09f4f6d2e197",
                "signature-bitmap": "ffffffffffffffffff03f0ffffffffffffffffffffffffffff3f",
                "view-id": 59777141
            }
        ],
        "epoch": 1912,
        "lastCommitBitmap": "ffffffffffffffffffffffffffffffffffffffffffffffff03",
        "lastCommitSig": "88098da8cc05e56985f646ad531aae0a48c0bf4f56a19a562e71af77de7ebbf3a9d83b5a78161f1e274176fe8a78ec0c7a5ae63afc4a36d89489aee68e1d17ca9b8b33f0bc109f2fcd1b98e004d858e6d090217a6060f061b7eab97ed618ba0a",
        "leader": "one1gh043zc95e6mtutwy5a2zhvsxv7lnlklkj42ux",
        "shardID": 0,
        "timestamp": "2024-05-02 17:22:44 +0000 UTC",
        "unixtime": 1714670564,
        "viewID": 57001972,
        "vrf": "b72a10d1337af461249c74c5aa581de957599f16c9f86acc6eaae6c0bb78ed8c",
        "vrfProof": "330d97d34dc63f6992d6a287d18ce0497a33753457b3714f458ee745aa779865c66a99fdc242d5c88f7ff33d71b66a0d6a1ec02793bac4cf7c6dc6af18be17cc4791d90e2ff70221b2a1dd41043b09c0bea216061509ec249b78c24a0b8f1b91"
    }
}

hmy_getShardingStructure

Returns the current shard of the node and lists API and WebSocket endpoints for each shard.

Method: POST

https://one.nownodes.io

Example body (raw)

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

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
        {
            "current": true,
            "http": "https://api.s0.t.hmny.io",
            "shardID": 0,
            "ws": "wss://ws.s0.t.hmny.io"
        },
        {
            "current": false,
            "http": "https://api.s1.t.hmny.io",
            "shardID": 1,
            "ws": "wss://ws.s1.t.hmny.io"
        }
    ]
}

hmy_blockNumber

Get number of the most recent block.

Method: POST

https://one.nownodes.io

Example body (raw)

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

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": 56995722
}

hmy_syncing

Tests whether or not the node is syncing.

Method: POST

https://one.nownodes.io

Example body (raw)

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

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": false
}

hmy_gasPrice

Returns the current gas price.

Method: POST

https://one.nownodes.io

Example body (raw)

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

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": 100000000000
}

net_peerCount

Gets the number of peers on the network.

Method: POST

https://one.nownodes.io

Example body (raw)

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

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x833"
}

hmy_getEpoch

hmy_getEpoch returns current epoch of shard

Method: POST

https://one.nownodes.io

Example body (raw)

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

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x778"
}

hmy_getLeader

hmy_getLeader returns one address of current shard leader node

Method: POST

https://one.nownodes.io

Example body (raw)

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

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "one1gh043zc95e6mtutwy5a2zhvsxv7lnlklkj42ux"
}

Last updated