1.7.81 • Published 2 months ago

@relaycorp/relaynet-pohttp v1.7.81

Weekly downloads
175
License
MIT
Repository
github
Last release
2 months ago

Node.js PoHTTP binding implementation

This is the client-side Node.js implementation of the Relaynet Parcel Delivery over HTTP (PoHTTP) binding.

Since PoHTTP establishes an external Parcel Delivery Connection (PDC), this library is only relevant to developers implementing a gateway (like Relaycorp's) or a public endpoint.

Install

This library requires Node.js v10 or newer, and can be installed as follows:

npm install @relaycorp/relaynet-pohttp

Use

As the client-side implementation of an external PDC, the only operation supported by this library is the delivery of parcels.

relaynet-pohttp-js is meant to be used with the core library. For example, this is how a relay would deliver a parcel to the public endpoint rne+https://ping.relaycorp.tech:

import { deliverParcel } from '@relaycorp/relaynet-pohttp';

async function main() {
  // `parcelSerialized` is the ArrayBuffer representation of the parcel as a RAMF message
  const parcelSerialized = await yourFunctionToRetrieveTheParcel();

  await deliverParcel('ping.relaycorp.tech', parcelSerialized);
}

By default, a timeout of 3 seconds will be used and up to 3 consecutive redirects would be followed. deliverParcel() takes an optional options argument to customize these and other options.

TypeScript type declarations are included with this library.

Use in integration or functional tests

Per the Relaynet specs, bindings like PoHTTP must be used over TLS, but this validation can be turned off in test suites that send requests to a mock HTTP server by passing the options useTls=false to deliverParcel().

1.7.81

2 months ago

1.7.80

2 months ago

1.7.79

3 months ago

1.7.78

4 months ago

1.7.77

4 months ago

1.7.75

4 months ago

1.7.76

4 months ago

1.7.73

4 months ago

1.7.74

4 months ago

1.7.72

5 months ago

1.7.60

10 months ago

1.7.61

10 months ago

1.7.62

9 months ago

1.7.63

8 months ago

1.7.64

7 months ago

1.7.65

7 months ago

1.7.66

7 months ago

1.7.67

6 months ago

1.7.68

6 months ago

1.7.69

6 months ago

1.7.70

6 months ago

1.7.71

6 months ago

1.7.55

12 months ago

1.7.56

12 months ago

1.7.57

12 months ago

1.7.58

11 months ago

1.7.59

11 months ago

1.7.54

2 years ago

1.7.50

2 years ago

1.7.51

2 years ago

1.7.52

2 years ago

1.7.53

2 years ago

1.7.37

2 years ago

1.7.38

2 years ago

1.7.39

2 years ago

1.7.40

2 years ago

1.7.41

2 years ago

1.7.42

2 years ago

1.7.43

2 years ago

1.7.44

2 years ago

1.7.45

2 years ago

1.7.46

2 years ago

1.7.47

2 years ago

1.7.48

2 years ago

1.7.49

2 years ago

1.7.35

2 years ago

1.7.36

2 years ago

1.7.27

2 years ago

1.7.28

2 years ago

1.7.29

2 years ago

1.7.30

2 years ago

1.7.31

2 years ago

1.7.32

2 years ago

1.7.33

2 years ago

1.7.34

2 years ago

1.7.26

2 years ago

1.7.14

2 years ago

1.7.15

2 years ago

1.7.16

2 years ago

1.7.17

2 years ago

1.7.18

2 years ago

1.7.19

2 years ago

1.7.20

2 years ago

1.7.21

2 years ago

1.7.22

2 years ago

1.7.23

2 years ago

1.7.24

2 years ago

1.7.25

2 years ago

1.7.10

2 years ago

1.7.11

2 years ago

1.7.12

2 years ago

1.7.13

2 years ago

1.7.9

2 years ago

1.7.8

2 years ago

1.7.7

3 years ago

1.7.6

3 years ago

1.7.5

3 years ago

1.7.3

3 years ago

1.7.2

3 years ago

1.7.1

3 years ago

1.7.4

3 years ago

1.7.0

3 years ago

1.6.2

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago