Getavalanchepeerinfo

getavalanchepeerinfo

Returns data about each connected avalanche peer as a json array of objects.

Result:
[                                     (json array)
  {                                   (json object)
    "peerid" : n,                     (numeric) The peer id
    "proof" : "hex",                  (string) The avalanche proof used by this peer
    "sequence" : n,                   (numeric) The proof's sequence
    "expiration" : xxx,               (numeric) The proof's expiration timestamp
    "master" : "hex",                 (string) The proof's master public key
    "stakes" : [                      (json array)
      {                               (json object)
        "txid" : "hex",               (string)
        "vout" : n,                   (numeric)
        "amount" : n,                 (numeric) The amount in this UTXO
        "height" : n,                 (numeric) The height at which this UTXO was mined
        "iscoinbase" : true|false,    (boolean) Indicate wether the UTXO is a coinbase
        "pubkey" : "hex"              (string)
      },
      ...
    ],
    "nodes" : [                       (json array)
      n,                              (numeric) Node id, as returned by getpeerinfo
      ...
    ]
  },
  ...
]

Examples:
> bitcoin-cli getavalanchepeerinfo 
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getavalanchepeerinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/