Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# xconn-typescript
A TypeScript WAMP client library built for both browser and Node.js environments.
# xconn
A JavaScript WAMP client library built for both browser and Node.js environments.

## Installation

To install `xconn-typescript`, add the following in your `package.json` file:
To install `xconn`, add the following in your `package.json` file:

### Install from github

```typescript
```javascript
"dependencies": {
"xconn": "github:xconnio/xconn-ts#13fbafb2c8e1e30a1cf13803fd207f5705270e24"
"xconn": "github:xconnio/xconn-js#13fbafb2c8e1e30a1cf13803fd207f5705270e24"
}
```

## Client

Creating a client:

```typescript
```javascript
import {connectAnonymous} from "xconn";


Expand All @@ -31,7 +31,7 @@ operations:

### Subscribe to a topic

```typescript
```javascript
import {Event, Session} from "xconn";


Expand All @@ -46,7 +46,7 @@ async function exampleSubscribe(session: Session) {

### Publish to a topic

```typescript
```javascript
import {Session} from "xconn";


Expand All @@ -57,7 +57,7 @@ async function examplePublish(session: Session) {

### Register a procedure

```typescript
```javascript
import {Session, Invocation, Result} from "xconn";


Expand All @@ -73,7 +73,7 @@ async function echoHandler(session: Session) {

### Call a procedure

```typescript
```javascript
import {Session} from "xconn";


Expand All @@ -88,19 +88,19 @@ Authentication is straightforward.

### Ticket Auth

```typescript
```javascript
const session = await connectTicket("ws://localhost:8080/ws", "realm1", "authid", "ticket");
```

### Challenge Response Auth

```typescript
```javascript
const session = await connectCRA("ws://localhost:8080/ws", "realm1", "authid", "secret");
```

### Cryptosign Auth

```typescript
```javascript
const session = await connectCryptosign("ws://localhost:8080/ws", "realm1", "authid", "150085398329d255ad69e82bf47ced397bcec5b8fbeecd28a80edbbd85b49081");
```

Expand Down