@xmtp/node-sdk 6.2.0-dev.999b077 → 6.2.0-dev.9f72722

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,6 +8,26 @@ To keep up with the latest SDK developments, see the [Issues tab](https://githu
8
8
 
9
9
  To learn how to use the XMTP client SDK for Node, see [Get started with the XMTP Node SDK](https://docs.xmtp.org/sdks/node).
10
10
 
11
+ ## Backend configuration
12
+
13
+ Pass `backendUrl` to `Client.create` or `Client.build`. The URL must include
14
+ `http://` or `https://`. There is no default backend URL.
15
+
16
+ ```typescript
17
+ const client = await Client.create(signer, {
18
+ backendUrl: "http://127.0.0.1:5050",
19
+ env: "local",
20
+ appVersion: "my-app/1.0.0",
21
+ });
22
+ ```
23
+
24
+ `env` is an optional string. It only sets the label in the default database file
25
+ name, `xmtp-<env>-<inboxId>.db3`. If omitted, the label is `default`.
26
+ The API-client cache key is `<backendUrl>|<appVersion>`.
27
+ Use `createBackend({ backendUrl, env, appVersion })` to build a backend for static
28
+ client methods. The `topic` getters return the backend topic bytes as hex.
29
+ File archives use `createArchive`, `importArchive`, and `archiveMetadata`.
30
+
11
31
  ## Requirements
12
32
 
13
33
  - Node.js 20+
@@ -15,19 +35,19 @@ To learn how to use the XMTP client SDK for Node, see [Get started with the XMTP
15
35
 
16
36
  ## Install
17
37
 
18
- **NPM**
38
+ ### NPM
19
39
 
20
40
  ```bash
21
41
  npm install @xmtp/node-sdk
22
42
  ```
23
43
 
24
- **PNPM**
44
+ ### PNPM
25
45
 
26
46
  ```bash
27
47
  pnpm install @xmtp/node-sdk
28
48
  ```
29
49
 
30
- **Yarn**
50
+ ### Yarn
31
51
 
32
52
  ```bash
33
53
  yarn add @xmtp/node-sdk
@@ -35,7 +55,7 @@ yarn add @xmtp/node-sdk
35
55
 
36
56
  ## Developing
37
57
 
38
- Run `yarn dev` to build the SDK and watch for changes, which will trigger a rebuild.
58
+ For repository development, run `just install` once, then run `just js build`.
39
59
 
40
60
  ## Testing
41
61
 
@@ -43,10 +63,9 @@ For testing setup instructions, see our [testing guidelines](https://github.com/
43
63
 
44
64
  ### Useful commands
45
65
 
46
- - `yarn build`: Builds the SDK
47
- - `yarn clean`: Removes `node_modules`, `dist`, and `.turbo` folders
48
- - `yarn test`: Runs all tests
49
- - `yarn typecheck`: Runs `tsc`
66
+ - `just js build`: Builds the SDKs.
67
+ - `just js test`: Runs all SDK tests.
68
+ - `just js check`: Runs TypeScript checks.
50
69
 
51
70
  ## Breaking revisions
52
71