Skip to content

Commit

Permalink
Merge pull request #143 from xmtp/message-grpc-client-integration
Browse files Browse the repository at this point in the history
Message grpc client integration
  • Loading branch information
neekolas authored Aug 18, 2022
2 parents 0640593 + 0d54188 commit 9543414
Show file tree
Hide file tree
Showing 39 changed files with 907 additions and 3,646 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci
- name: Release
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.9
16.16.0
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Jest Tests",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/.bin/jest",
"--no-cache",
"--runInBand",
"--env=node",
"--forceExit"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
}
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,14 @@ const xmtp = await Client.create(wallet)

The client's network connection and key storage method can be configured with these optional parameters of `Client.create`:

| Parameter | Default | Description |
| --------------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| env | `dev` | Connect to the specified XMTP network environment. Valid values also include `production`. For important details about working with these environments, see [XMTP `production` and `dev` network environments](#xmtp-production-and-dev-network-environments). |
| waitForPeersTimeoutMs | `10000` | Wait this long for an initial peer connection. |
| keyStoreType | `networkTopicStoreV1` | Persist the wallet's key bundle to the network, or optionally to `localStorage`. |
| codecs | `[TextCodec]` | Add codecs to support additional content types. |
| maxContentSize | `100M` | Maximum message content size in bytes. |
| Parameter | Default | Description |
| -------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| env | `dev` | Connect to the specified XMTP network environment. Valid values also include `production` and `local`. For important details about working with these environments, see [XMTP `production` and `dev` network environments](#xmtp-production-and-dev-network-environments). |
| apiUrl | `undefined` | Manually specify an API URL to use. If specified, value of `env` will be ignored. |
| |
| keyStoreType | `networkTopicStoreV1` | Persist the wallet's key bundle to the network, or optionally to `localStorage`. |
| codecs | `[TextCodec]` | Add codecs to support additional content types. |
| maxContentSize | `100M` | Maximum message content size in bytes. |

### Conversations

Expand Down
2 changes: 2 additions & 0 deletions dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ services:
- --filter
- --ws-port=9001
- --wait-for-db=30s
- --api.authn.enable
ports:
- 9001:9001
- 5555:5555
depends_on:
- db
db:
Expand Down
4 changes: 4 additions & 0 deletions jest.jsdom.env.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ module.exports = class JsdomTestEnvironment extends Environment {
const { TextDecoder } = require('util')
this.global.TextDecoder = TextDecoder
}
if (typeof this.global.setImmediate === 'undefined') {
this.global.setImmediate = setImmediate
this.global.clearImmediate = clearImmediate
}
if (typeof this.global.crypto === 'undefined') {
this.global.crypto = require('crypto').webcrypto
}
Expand Down
Loading

0 comments on commit 9543414

Please sign in to comment.