Skip to content

new Bytes is unnecessary, simply use toHex() on the returned classes #229

@Cafe137

Description

@Cafe137

console.log('Overlay:', new Bytes(addresses.overlay.bytes).toHex())
console.log('Ethereum:', new Bytes(addresses.ethereum.bytes).toHex())
console.log('Public Key:', new Bytes(addresses.publicKey.bytes).toHex())
console.log('PSS Public Key:', new Bytes(addresses.pssPublicKey.bytes).toHex())

Bee-JS should return these fields properly typed:

export interface NodeAddresses {
  overlay: PeerAddress
  underlay: string[]
  ethereum: EthAddress
  publicKey: PublicKey
  pssPublicKey: PublicKey
}

The new Bytes(x).toHex() could be replaced with x.toHex() in all cases. Please let me know if that is not the case - that is a bug in Bee-JS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions