/ src / tests / samples.py
samples.py
  1  """Various sample data"""
  2  
  3  from binascii import unhexlify
  4  
  5  # hello, page 1 of the Specification
  6  sample_hash_data = b'hello'
  7  sample_double_sha512 = unhexlify(
  8      '0592a10584ffabf96539f3d780d776828c67da1ab5b169e9e8aed838aaecc9ed36d49ff14'
  9      '23c55f019e050c66c6324f53588be88894fef4dcffdb74b98e2b200')
 10  
 11  sample_bm160 = unhexlify('79a324faeebcbf9849f310545ed531556882487e')
 12  
 13  # 500 identical peers:
 14  # 1626611891, 1, 1, 127.0.0.1, 8444
 15  sample_addr_data = unhexlify(
 16      'fd01f4' + (
 17          '0000000060f420b30000000'
 18          '1000000000000000100000000000000000000ffff7f00000120fc'
 19      ) * 500
 20  )
 21  
 22  # These keys are from addresses test script
 23  sample_pubsigningkey = unhexlify(
 24      '044a367f049ec16cb6b6118eb734a9962d10b8db59c890cd08f210c43ff08bdf09'
 25      'd16f502ca26cd0713f38988a1237f1fc8fa07b15653c996dc4013af6d15505ce')
 26  sample_pubencryptionkey = unhexlify(
 27      '044597d59177fc1d89555d38915f581b5ff2286b39d022ca0283d2bdd5c36be5d3'
 28      'ce7b9b97792327851a562752e4b79475d1f51f5a71352482b241227f45ed36a9')
 29  sample_privsigningkey = \
 30      b'93d0b61371a54b53df143b954035d612f8efa8a3ed1cf842c2186bfd8f876665'
 31  sample_privencryptionkey = \
 32      b'4b0b73a54e19b059dc274ab69df095fe699f43b17397bca26fdf40f4d7400a3a'
 33  
 34  sample_ripe = b'003cd097eb7f35c87b5dc8b4538c22cb55312a9f'
 35  # stream: 1, version: 2
 36  sample_address = 'BM-onkVu1KKL2UaUss5Upg9vXmqd3esTmV79'
 37  
 38  sample_factor = \
 39      66858749573256452658262553961707680376751171096153613379801854825275240965733
 40  # G * sample_factor
 41  sample_point = (
 42      33567437183004486938355437500683826356288335339807546987348409590129959362313,
 43      94730058721143827257669456336351159718085716196507891067256111928318063085006
 44  )
 45  
 46  sample_seed = b'TIGER, tiger, burning bright. In the forests of the night'
 47  # RIPE hash on step 22 with signing key nonce 42
 48  sample_deterministic_ripe = b'00cfb69416ae76f68a81c459de4e13460c7d17eb'
 49  # Deterministic addresses with stream 1 and versions 3, 4
 50  sample_deterministic_addr3 = 'BM-2DBPTgeSawWYZceFD69AbDT5q4iUWtj1ZN'
 51  sample_deterministic_addr4 = 'BM-2cWzSnwjJ7yRP3nLEWUV5LisTZyREWSzUK'
 52  sample_daddr3_512 = 18875720106589866286514488037355423395410802084648916523381
 53  sample_daddr4_512 = 25152821841976547050350277460563089811513157529113201589004
 54  
 55  sample_statusbar_msg = 'new status bar message'
 56  sample_inbox_msg_ids = [
 57      '27e644765a3e4b2e973ee7ccf958ea20', '51fc5531-3989-4d69-bbb5-68d64b756f5b',
 58      '2c975c515f8b414db5eea60ba57ba455', 'bc1f2d8a-681c-4cc0-9a12-6067c7e1ac24']
 59  # second address in sample_subscription_addresses is
 60  # for the announcement broadcast, but is it matter?
 61  sample_subscription_addresses = [
 62      'BM-2cWQLCBGorT9pUGkYSuGGVr9LzE4mRnQaq',
 63      'BM-GtovgYdgs7qXPkoYaRgrLFuFKz1SFpsw']
 64  sample_subscription_name = 'test sub'
 65  
 66  
 67  sample_object_expires = 1712271487
 68  # from minode import structure
 69  # obj = structure.Object(
 70  #     b'\x00' * 8, sample_object_expires, 42, 1, 2, b'HELLO')
 71  # .. do pow and obj.to_bytes()
 72  sample_object_data = unhexlify(
 73      '00000000001be7fc00000000660f307f0000002a010248454c4c4f')
 74  
 75  sample_msg = unhexlify(
 76      '0592a10584ffabf96539f3d780d776828c67da1ab5b169e9e8aed838aaecc9ed36d49ff'
 77      '1423c55f019e050c66c6324f53588be88894fef4dcffdb74b98e2b200')
 78  sample_sig = unhexlify(
 79      '304402202302475351db6b822de15d922e29397541f10d8a19780ba2ca4a920b1035f075'
 80      '02205e5bba40d5f07a24c23a89ba5f01a3828371dfbb685dd5375fa1c29095fd232b')
 81  sample_sig_sha1 = unhexlify(
 82      '30460221008ad234687d1bdc259932e28ea6ee091b88b0900d8134902aa8c2fd7f016b96e'
 83      'd022100dafb94e28322c2fa88878f9dcbf0c2d33270466ab3bbffaec3dca0a2d1ef9354')
 84  
 85  # [chan] bitmessage
 86  sample_wif_privsigningkey = unhexlify(
 87      b'a2e8b841a531c1c558ee0680c396789c7a2ea3ac4795ae3f000caf9fe367d144')
 88  sample_wif_privencryptionkey = unhexlify(
 89      b'114ec0e2dca24a826a0eed064b0405b0ac148abc3b1d52729697f4d7b873fdc6')
 90  sample_privsigningkey_wif = \
 91      b'5K42shDERM5g7Kbi3JT5vsAWpXMqRhWZpX835M2pdSoqQQpJMYm'
 92  sample_privencryptionkey_wif = \
 93      b'5HwugVWm31gnxtoYcvcK7oywH2ezYTh6Y4tzRxsndAeMi6NHqpA'
 94  
 95  
 96  # PoW
 97  
 98  sample_pow_target = 54227212183
 99  sample_pow_initial_hash = unhexlify(
100      '3758f55b5a8d902fd3597e4ce6a2d3f23daff735f65d9698c270987f4e67ad590'
101      'b93f3ffeba0ef2fd08a8dc2f87b68ae5a0dc819ab57f22ad2c4c9c8618a43b3'
102  )