We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d22e7ee commit ea269c7Copy full SHA for ea269c7
contrib/seeds/generate-seeds.py
@@ -16,6 +16,7 @@
16
<ip>:<port>
17
[<ipv6>]:<port>
18
<onion>.onion:<port>
19
+ <i2p>.b32.i2p:<port>
20
21
The output will be two data structures with the peers in binary format:
22
@@ -52,6 +53,12 @@ def name_to_bip155(addr):
52
53
return (BIP155Network.TORV3, vchAddr[:32])
54
else:
55
raise ValueError('Invalid onion %s' % vchAddr)
56
+ elif addr.endswith('.b32.i2p'):
57
+ vchAddr = b32decode(addr[0:-8] + '====', True)
58
+ if len(vchAddr) == 32:
59
+ return (BIP155Network.I2P, vchAddr)
60
+ else:
61
+ raise ValueError(f'Invalid I2P {vchAddr}')
62
elif '.' in addr: # IPv4
63
return (BIP155Network.IPV4, bytes((int(x) for x in addr.split('.'))))
64
elif ':' in addr: # IPv6
0 commit comments