mirror of
https://github.com/status-im/status-go.git
synced 2025-02-12 06:47:47 +00:00
14 lines
321 B
Go
14 lines
321 B
Go
package whisperutils
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/crypto"
|
|
whisper "github.com/status-im/whisper/whisperv6"
|
|
)
|
|
|
|
var discoveryTopic = "contact-discovery"
|
|
var DiscoveryTopicBytes = ToTopic(discoveryTopic)
|
|
|
|
func ToTopic(s string) whisper.TopicType {
|
|
return whisper.BytesToTopic(crypto.Keccak256([]byte(s)))
|
|
}
|