mirror of
https://github.com/logos-messaging/enr-decoder.git
synced 2026-01-02 12:53:08 +00:00
chore: format output
This commit is contained in:
parent
d4e04162f7
commit
61e4a40bea
@ -16,16 +16,16 @@ Sample Usage
|
|||||||
Decoded ENR:
|
Decoded ENR:
|
||||||
seq: 1718856360688
|
seq: 1718856360688
|
||||||
signature: 0x1f25d715762005aff7bbf629404f1514183a2e02aaefbc458420d522a08cd361182c7d80187f152548b0acf79c3536b15eef2d96a79e1694de95e95fe3df5ab7
|
signature: 0x1f25d715762005aff7bbf629404f1514183a2e02aaefbc458420d522a08cd361182c7d80187f152548b0acf79c3536b15eef2d96a79e1694de95e95fe3df5ab7
|
||||||
PeerID: 16Uiu2HAm3cGgUdycLBx3zeKiJnVaLWVgPwcJYM8LSgiJh7fyiPYU
|
peer-id: 16Uiu2HAm3cGgUdycLBx3zeKiJnVaLWVgPwcJYM8LSgiJh7fyiPYU
|
||||||
ipv4: 192.168.1.9
|
ipv4: 192.168.1.9
|
||||||
tcp: 56114
|
tcp: 56114
|
||||||
clusterID: 16
|
cluster-id: 16
|
||||||
shards: [64 32]
|
shards: [64 32]
|
||||||
Wakuv2 Protocols Supported:
|
Wakuv2 Protocols Supported:
|
||||||
/vac/waku/relay/2.0.0
|
/vac/waku/relay/2.0.0
|
||||||
/vac/waku/filter-subscribe/2.0.0-beta1
|
/vac/waku/filter-subscribe/2.0.0-beta1
|
||||||
/vac/waku/lightpush/2.0.0-beta1
|
/vac/waku/lightpush/2.0.0-beta1
|
||||||
Multiaddresses:
|
multiaddresses:
|
||||||
/ip4/192.168.1.9/tcp/56114/p2p/16Uiu2HAm3cGgUdycLBx3zeKiJnVaLWVgPwcJYM8LSgiJh7fyiPYU
|
/ip4/192.168.1.9/tcp/56114/p2p/16Uiu2HAm3cGgUdycLBx3zeKiJnVaLWVgPwcJYM8LSgiJh7fyiPYU
|
||||||
/dns4/boot-01.do-ams3.shards.test.status.im/tcp/30303/p2p/16Uiu2HAmAR24Mbb6VuzoyUiGx42UenDkshENVDj4qnmmbabLvo31/p2p-circuit/p2p/16Uiu2HAm3cGgUdycLBx3zeKiJnVaLWVgPwcJYM8LSgiJh7fyiPYU```
|
/dns4/boot-01.do-ams3.shards.test.status.im/tcp/30303/p2p/16Uiu2HAmAR24Mbb6VuzoyUiGx42UenDkshENVDj4qnmmbabLvo31/p2p-circuit/p2p/16Uiu2HAm3cGgUdycLBx3zeKiJnVaLWVgPwcJYM8LSgiJh7fyiPYU```
|
||||||
|
|
||||||
|
|||||||
10
main.go
10
main.go
@ -33,8 +33,8 @@ func main() {
|
|||||||
|
|
||||||
fmt.Println("seq:", node.Record().Seq())
|
fmt.Println("seq:", node.Record().Seq())
|
||||||
fmt.Println("signature:", "0x"+hex.EncodeToString(node.Record().Signature()))
|
fmt.Println("signature:", "0x"+hex.EncodeToString(node.Record().Signature()))
|
||||||
fmt.Println("PeerID: ", peerID)
|
fmt.Println("peer-id: ", peerID)
|
||||||
ip, err := GetValue(node.Record(), "ip")
|
ip, err := GetValue(node.Record(), "ip-addr")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
} else {
|
} else {
|
||||||
@ -52,7 +52,7 @@ func main() {
|
|||||||
panic(err)
|
panic(err)
|
||||||
} else {
|
} else {
|
||||||
if len(port) > 0 {
|
if len(port) > 0 {
|
||||||
fmt.Println("tcp:", binary.BigEndian.Uint16(port))
|
fmt.Println("tcp-port:", binary.BigEndian.Uint16(port))
|
||||||
} else {
|
} else {
|
||||||
fmt.Println("ipv4: field has no value")
|
fmt.Println("ipv4: field has no value")
|
||||||
}
|
}
|
||||||
@ -62,11 +62,11 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
fmt.Println("clusterID: ", shards.ClusterID)
|
fmt.Println("cluster-id: ", shards.ClusterID)
|
||||||
fmt.Println("shards: ", shards.ShardIDs)
|
fmt.Println("shards: ", shards.ShardIDs)
|
||||||
DecodeWaku2ENRField(node.Record())
|
DecodeWaku2ENRField(node.Record())
|
||||||
|
|
||||||
fmt.Println("Multiaddresses:")
|
fmt.Println("multiaddresses:")
|
||||||
for _, maddr := range multiaddrs {
|
for _, maddr := range multiaddrs {
|
||||||
fmt.Println(maddr)
|
fmt.Println(maddr)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user