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

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