Documentation ¶
Index ¶
- Constants
- type Beacon
- func (b *Beacon) AddLocation(loc location.Location)
- func (b Beacon) EncodeLocationListTlvs() []byte
- func (b Beacon) EncodeTlvs() []byte
- func (b Beacon) GetSharedSeed() SharedSeed
- func (b Beacon) Locations() []location.Location
- func (b Beacon) ToBech32Str() string
- func (b Beacon) ToObject() map[string]interface{}
- type SharedSeed
- func (s SharedSeed) DeriveAes256Key() []byte
- func (s SharedSeed) DeriveRendezvousId() []byte
- func (s SharedSeed) DoubleSha256(inputBytes []byte) []byte
- func (s SharedSeed) EncodedTLV() []byte
- func (s SharedSeed) Equal(seed SharedSeed) bool
- func (s SharedSeed) GetBytes() []byte
- func (s SharedSeed) Hash() uint64
- func (s SharedSeed) Hex() string
- func (s SharedSeed) Sha256(inputBytes []byte) string
- func (s SharedSeed) TLV() tlv.Record
- func (s SharedSeed) ToString() string
Constants ¶
View Source
const MoneysocketHrp = "moneysocket"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Beacon ¶
type Beacon struct {
// contains filtered or unexported fields
}
func DecodeFromBech32Str ¶
func DecodeTlvs ¶
func NewBeaconFromSeed ¶
func NewBeaconFromSeed(seed SharedSeed) Beacon
func (*Beacon) AddLocation ¶
apppend a location to the beacon
func (Beacon) EncodeLocationListTlvs ¶
encode a list of locations as tlvs
func (Beacon) GetSharedSeed ¶
func (b Beacon) GetSharedSeed() SharedSeed
fetch the shared seed from the beacon
func (Beacon) ToBech32Str ¶
type SharedSeed ¶
type SharedSeed struct {
// contains filtered or unexported fields
}
func BytesToSharedSeed ¶
func BytesToSharedSeed(rawBytes []byte) (seed SharedSeed, err error)
create a shared seed from a byte slice
func HexToSharedSeed ¶
func HexToSharedSeed(rawHex string) (seed SharedSeed, err error)
create a shared seed from a hex
func (SharedSeed) DeriveAes256Key ¶
func (s SharedSeed) DeriveAes256Key() []byte
returns a derived aes256 key wrapper around DoubleSha256
func (SharedSeed) DeriveRendezvousId ¶
func (s SharedSeed) DeriveRendezvousId() []byte
create a double sha256 of the derived aes 256 key (itself a double sha-256)
func (SharedSeed) DoubleSha256 ¶
func (s SharedSeed) DoubleSha256(inputBytes []byte) []byte
TODO: find out why these are part of this struct double sha 256
func (SharedSeed) EncodedTLV ¶
func (s SharedSeed) EncodedTLV() []byte
encode the static record into a
func (SharedSeed) Equal ¶
func (s SharedSeed) Equal(seed SharedSeed) bool
check if two seeds are equal
func (SharedSeed) Sha256 ¶
func (s SharedSeed) Sha256(inputBytes []byte) string
TODO: find out why these are part of this struct sha256 the seed bytes, format as string
Directories ¶
Path | Synopsis |
---|---|
in a seperate package because this is used by beacon/locations and beacon/root this should probably be moved to internal if moneysocket (socket) is ever moved to its own package
|
in a seperate package because this is used by beacon/locations and beacon/root this should probably be moved to internal if moneysocket (socket) is ever moved to its own package |
Click to show internal directories.
Click to hide internal directories.