Skip to content

Conversation

@Ximik
Copy link
Member

@Ximik Ximik commented Feb 11, 2025

One can use

curl -X POST http://127.0.0.1:7224 -H "Content-Type: application/json" -d '{
    "jsonrpc":"2.0",
    "method":"getblockmeta",
    "params":["00000000003a037a98a512ca38147af1d3a21d858596d24f83d65fbf2f6d5131"],
    "id":1
}'

or

curl -X POST http://127.0.0.1:7224 -H "Content-Type: application/json" -d '{
    "jsonrpc":"2.0",
    "method":"getblockmeta",
    "params":[55879],
    "id":1
}'

Both calls will return the same result

{
  "jsonrpc": "2.0",
  "result": {
    "hash": "00000000003a037a98a512ca38147af1d3a21d858596d24f83d65fbf2f6d5131",
    "height": 55879,
    "tx_meta": [
      {
        "txid": "394ebef5203c4306c3f7a6d1a5c2058bac130deb24c1d7725094b31d1ff54ea4",
        "spends": [
          {
            "n": 0
          }
        ],
        "creates": [
          {
            "n": 0,
            "value": 662,
            "script_pubkey": "512065a7b5051fe33239e6ddb0d69e809a74d1702fde541bdf3431c6994b72317f33"
          }
        ],
        "updates": []
      },
      {
        "txid": "f811529d79c9fc808c240a1b5087ba19610c4177a01ffa8047c3cc143cf3eb1a",
        "spends": [
          {
            "n": 0
          },
          {
            "n": 1
          },
          {
            "n": 2
          },
          {
            "n": 3
          }
        ],
        "creates": [
          {
            "n": 1,
            "name": "@bitcoin",
            "covenant": {
              "type": "transfer",
              "expire_height": 108439,
              "data": "68656c6c6f20776f726c64"
            },
            "value": 666,
            "script_pubkey": "5120611454515f9fe8c656f80c51de229dc5d9cba9a05d00486b43a1e9033ef6393b"
          }
        ],
        "updates": []
      }
    ]
  },
  "id": 1
}

Copy link
Member

@buffrr buffrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, also please limit code changes to the thing being added/updated. Avoid formatting changes/or at least have them in a separate commit.

@Ximik Ximik force-pushed the block_by_height branch from 3f0740f to 94bcc11 Compare March 4, 2025 12:04
@Ximik Ximik requested a review from buffrr March 4, 2025 18:17
Copy link
Member

@buffrr buffrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks

@buffrr buffrr merged commit d8f23f4 into spacesprotocol:main Mar 4, 2025
1 check passed
@Ximik Ximik deleted the block_by_height branch April 21, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants