OverviewFilesCommitsIssuesDocsReleasesPeers

hyperswarm-peer / test / phase3_vectors.json

125 lines · json ref:
{
  "namespaces": {
    "NS_ANNOUNCE": "36386adddf9f6fd60db83a6f42fc159d1146aa8644037664230aaa1f0179d497",
    "NS_UNANNOUNCE": "ded293cd93fb395e756ecf5fff426529e72c36eacc22e5ed944d9099a2561e32",
    "NS_MUTABLE_PUT": "668e823edd5ce7f5338d68bf1161f4a3c28ce437ee2ab49efd30d99366039b1e",
    "NS_PEER_HANDSHAKE": "14d6d4b49214ab1033ed204976caa258bae9e1e8543b9ad1fd996a910b0c4e3a",
    "NS_PEER_HOLEPUNCH": "f1191cd5e67b10b54a507033280ed1ff0e12278268d5679c8f93d417210d168b"
  },
  "noisePayload": [
    {
      "description": "basic (no optional fields)",
      "bytes": 4,
      "hex": "01000000",
      "error": 0,
      "firewall": 0
    },
    {
      "description": "with addresses4 and firewall=CONSISTENT",
      "bytes": 17,
      "hex": "01020002027f0000010028c0a801019210",
      "firewall": 2,
      "addresses4": [
        {
          "host": "127.0.0.1",
          "port": 10240
        },
        {
          "host": "192.168.1.1",
          "port": 4242
        }
      ]
    },
    {
      "description": "with addresses4 + UDX info",
      "bytes": 15,
      "hex": "010a0001010a000001393001000764",
      "firewall": 1,
      "udx_id": 7,
      "udx_seq": 100
    },
    {
      "description": "with UDX + secretStream",
      "bytes": 9,
      "hex": "011800010101010001"
    }
  ],
  "handshakeMessage": [
    {
      "description": "mode=1 with relay address",
      "bytes": 41,
      "hex": "020120aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5863035649c2",
      "mode": 1,
      "noise_hex": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "relay": {
        "host": "88.99.3.86",
        "port": 49737
      }
    },
    {
      "description": "mode=0 with peer + relay addresses",
      "bytes": 96,
      "hex": "030051bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0a00000139305863035649c2",
      "mode": 0
    }
  ],
  "holepunchPayload": [
    {
      "description": "punching, round=1, firewall=CONSISTENT",
      "bytes": 4,
      "hex": "02000201",
      "firewall": 2,
      "round": 1,
      "punching": true
    },
    {
      "description": "with addresses, remoteAddress, tokens",
      "bytes": 87,
      "hex": "3e000103020a0000013930c0a8010192105863035649c2ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
    }
  ],
  "peerRecord": [
    {
      "description": "no relay addresses",
      "bytes": 33,
      "hex": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f00",
      "pk_hex": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"
    },
    {
      "description": "with 2 relay addresses",
      "bytes": 45,
      "hex": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff025863035649c28e5d5a7149c2"
    }
  ],
  "announceMessage": [
    {
      "description": "peer + signature, no refresh",
      "bytes": 98,
      "hex": "05000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f00000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f"
    },
    {
      "description": "peer + refresh + signature with relay",
      "bytes": 136,
      "hex": "07aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa015863035649c2bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
    }
  ],
  "securePayload": [
    {
      "description": "deterministic nonce encrypt",
      "key_hex": "4242424242424242424242424242424242424242424242424242424242424242",
      "plaintext_hex": "686f6c6570756e63682d746573742d7061796c6f6164",
      "nonce_hex": "000102030405060708090a0b0c0d0e0f1011121314151617",
      "encrypted_hex": "000102030405060708090a0b0c0d0e0f1011121314151617130ad1bffa34ebf527ed76e57b63d67a0d41b99a15fc8b7782bf0826741252b4a04bb664baf5",
      "encrypted_bytes": 62
    }
  ],
  "noiseIK": {
    "initiator_pk": "03a107bff3ce10be1d70dd18e74bc09967e4d6309ba50d5f1ddc8664125531b8",
    "initiator_sk": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f03a107bff3ce10be1d70dd18e74bc09967e4d6309ba50d5f1ddc8664125531b8",
    "responder_pk": "29acbae141bccaf0b22e1a94d34d0bc7361e526d0bfe12c89794bc9322966dd7",
    "responder_sk": "202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f29acbae141bccaf0b22e1a94d34d0bc7361e526d0bfe12c89794bc9322966dd7",
    "ns_peer_handshake": "14d6d4b49214ab1033ed204976caa258bae9e1e8543b9ad1fd996a910b0c4e3a",
    "ns_peer_holepunch": "f1191cd5e67b10b54a507033280ed1ff0e12278268d5679c8f93d417210d168b"
  }
}