1.10.8 • Published 3 years ago

@agoric/captp v1.10.8

Weekly downloads
1,876
License
Apache-2.0
Repository
github
Last release
3 years ago

@agoric/captp

A minimal CapTP implementation leveraging Agoric's published modules.

Usage

NOTE: myconn below is not part of the CapTP library, it represents a connection object that you have created where makeCapTP is called on both sides of the connection, passing in the function to send a JSON-able object on the connection, and returning a dispatch function to receive a decoded JSON object from the connection.

import { E, makeCapTP } from '@agoric/captp';

// Create a message dispatcher and bootstrap.
// Messages on myconn are exchanged with JSON-able objects.
const { dispatch, getBootstrap, abort } = makeCapTP('myid', myconn.send, myBootstrap);
myconn.onReceive = obj => dispatch(obj);

// Get the remote's bootstrap object and call a remote method.
E(getBootstrap()).method(args).then(res => console.log('got res', res));

// Tear down the CapTP connection if it fails (e.g. connection is closed).
abort(Error('Connection aborted by user.'));
1.10.8

3 years ago

1.10.7

4 years ago

1.10.7-dev.1

4 years ago

1.10.7-dev.2

4 years ago

1.10.7-dev.0

4 years ago

1.10.6

4 years ago

1.10.5

4 years ago

1.10.4

4 years ago

1.10.3

4 years ago

1.10.2

4 years ago

1.10.1

4 years ago

1.10.0

4 years ago

1.9.0

4 years ago

1.8.0

4 years ago

1.7.20

4 years ago

1.7.19

4 years ago

1.7.17

4 years ago

1.7.16

4 years ago

1.7.14

4 years ago

1.7.15

4 years ago

1.7.13

4 years ago

1.7.11

4 years ago

1.7.12

4 years ago

1.7.10

4 years ago

1.7.9

4 years ago

1.7.8

4 years ago

1.7.7

4 years ago

1.7.6

4 years ago

1.7.5

4 years ago

1.7.5-dev.0

4 years ago

1.7.4

4 years ago

1.7.3

4 years ago

1.7.2-dev.0

4 years ago

1.7.2

4 years ago

1.7.1

4 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.2-dev.0

5 years ago

1.5.1

5 years ago

1.5.1-dev.2

5 years ago

1.5.1-dev.1

5 years ago

1.5.1-dev.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago