103.0.0 • Published 1 month ago

@streamr/trackerless-network v103.0.0

Weekly downloads
-
License
STREAMR NETWORK O...
Repository
github
Last release
1 month ago

Trackerless Network

A P2P topic publish-subscribe network.

The Trackerless Network package is a reimplementation of the old (Corea-Brubeck) network package. The package is reimplemented to use the network and transport stacks of the proto-rpc and DHT packages. The main change to the network is that the d-regular graph stream topologies are now generated using a decentralized algorithm based on peer discovery from the DHT.

Running a node

Running a network node requires a DhtNode from the @streamr/dht to use as control layer. For more details on how to configure the DHT node go here The control layer node is configured as follows:

const networkNode = new NetworkNode({
    // Give all control layer DHT configs here.
    layer0: {

    },
    // Content layer specific configurations:
    networkNode: {

    }
})
await networkNode.start()

Publishing messages

const streamPartId = StreamPartIDUtils.parse('test#0')
const message = new StreamMessage({
    messageId: new MessageID(
        StreamPartIDUtils.getStreamID(streamPartId),
        StreamPartIDUtils.getStreamPartition(streamPartId),
        666,
        0,
        '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' as EthereumAddress,
        'msgChainId'
    ),
    prevMsgRef: new MessageRef(665, 0),
    content: utf8ToBinary(JSON.stringify({
        hello: 'world'
    })),
    contentType: ContentType.JSON,
    messageType: StreamMessageType.MESSAGE,
    encryptionType: EncryptionType.NONE,
    signatureType: SignatureType.ECDSA_SECP256K1_EVM,
    signature: hexToBinary('0x1234')
})
await networkNode.broadcast(streamMessage)

Subscribing to messages

const streamPartId = StreamPartIDUtils.parse('test#0')
networkNode.addMessageListener((msg) => {
    console.log(msg)
})
await networkNode.join(streamPartId)
102.1.1

2 months ago

103.0.0-rc.20

1 month ago

103.0.0-rc.17

2 months ago

103.0.0-rc.18

2 months ago

103.0.0-rc.15

2 months ago

103.0.0-rc.16

2 months ago

103.0.0-rc.13

2 months ago

103.0.0-rc.14

2 months ago

103.0.0-rc.11

2 months ago

103.0.0-rc.12

2 months ago

103.0.0-rc.19

1 month ago

103.0.0

1 month ago

103.0.0-rc.1

3 months ago

103.0.0-rc.3

3 months ago

103.0.0-rc.2

3 months ago

103.0.0-rc.5

3 months ago

103.0.0-rc.9

3 months ago

103.0.0-rc.8

3 months ago

103.0.0-rc.0

4 months ago

102.2.0-rc.1

4 months ago

102.2.0-rc.2

4 months ago

102.2.0-rc.3

4 months ago

102.2.0-rc.0

5 months ago

102.1.0

5 months ago

102.0.0-beta.2

6 months ago

102.0.0-beta.3

6 months ago

102.0.0-beta.1

6 months ago

102.0.0

6 months ago

102.0.0-beta.0

9 months ago

101.1.2

10 months ago

101.1.1

11 months ago

101.1.0

11 months ago

101.1.1-beta.0

11 months ago

101.1.1-beta.1

11 months ago

101.0.0-beta.0

1 year ago

101.0.1

1 year ago

101.0.0-beta.1

1 year ago

101.0.0

1 year ago

101.0.0-beta.2

1 year ago

101.0.0-beta.3

1 year ago

101.0.0-beta.4

1 year ago

101.0.2-beta.0

11 months ago

100.2.5-beta.0

1 year ago

100.2.5-beta.1

1 year ago

100.2.4

1 year ago

100.2.4-beta.0

1 year ago

100.2.3

1 year ago

100.2.2

1 year ago

100.2.1

1 year ago

100.2.0

1 year ago

100.1.2

1 year ago

100.1.1

1 year ago

100.1.0

1 year ago

100.0.0

1 year ago

100.0.0-rc.1

1 year ago

100.0.0-rc.0

1 year ago

0.0.1-tatum.8

2 years ago

0.0.1-tatum.7

2 years ago

0.0.1-tatum.6

2 years ago

0.0.1-tatum.5

2 years ago

0.0.1-tatum.4

2 years ago

0.0.1-tatum.3

2 years ago

0.0.1-tatum.2

2 years ago

0.0.1-tatum.1

2 years ago

0.0.1-tatum.0

2 years ago