-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revamp docs left nav #33
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
6809ae2
to
8169d89
Compare
8169d89
to
141b3fc
Compare
c49977c
to
17dd3e1
Compare
@@ -750,7 +840,21 @@ let client = try await Client.create(account: account, options: clientOptions) | |||
<th>Parameter</th> | |||
<th>Default</th> | |||
<th>Description</th> | |||
<th></th> | |||
</tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the following options be added for RN?
dbDirectory = "mydbdir", // Optional: specify database directory
dbEncryptionKey = ByteArray(32) // Optional: 32-byte array for database
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dbEncryptionKey is not optional if you use V3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But should be added to RN for sure.
docs/pages/dms/client.mdx
Outdated
|
||
For more information about wallet signature requests, see [Account signatures](/protocol/signatures). | ||
|
||
Clients created by XMTP v3 SDKs also support XMTP v2 messages. At a high-level, XMTP v3 is used to support group chat and XMTP v2 is used to support 1:1 chat. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can also support xmtp v2 messages if the wallet is an EOA.
docs/pages/dms/client.mdx
Outdated
|
||
[Use client configuration options](#configure-the-client) to change parameters of a client's network connection. | ||
Regardless of whether your app provides group chat, set the `enableV3` client option to `true` to benefit from other aspects of the upgraded XMTP v3 protocol. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note you will not loose v2 functionality by doing this.
docs/pages/dms/client.mdx
Outdated
const xmtp = await Client.create(signer, { env: "dev" }); | ||
const xmtp = await Client.create(signer, { | ||
env: "production", | ||
enableV3: true, // Enable group chat support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not support v3 at the moment so probably shouldnt add here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nplasterer Ah, thank you for this - I took it too far! I thought the guidance to have everyone enableV3 meant that at least the flag was available in all SDKs and everyone should set this value. But what we mean is that all apps built with Kotlin, Swift, RN, and Node should set enableV3 to true. GOT IT - thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the code comment is incorrect 😭. So sorry... I promise I know that group chat is not available for web yet.
docs/pages/dms/client.mdx
Outdated
env: "production", | ||
enableV3: true, // Enable group chat support | ||
dbDirectory: "mydbdir", // Optional: specify database directory | ||
dbEncryptionKey: new Uint8Array(32), // Optional: 32-byte array for database encryption |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dbEncryptionKey: new Uint8Array(32), // Optional: 32-byte array for database encryption | |
dbEncryptionKey: new Uint8Array(32), // Required 32-byte array for database encryption if enableV3 is true |
docs/pages/dms/client.mdx
Outdated
<tr> | ||
<td>dbEncryptionKey</td> | ||
<td>null</td> | ||
<td>Optional. If not provided, a key is created and stored for you.</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now Required. We don't create or store keys anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could link to the recommended key storage in kotlin https://developer.android.com/privacy-and-security/keystore
docs/pages/dms/client.mdx
Outdated
<tr> | ||
<td>dbEncryptionKey</td> | ||
<td>null</td> | ||
<td>Optional. If not provided, the database remains unencrypted.</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required here as well. https://developer.apple.com/documentation/security/protecting-keys-with-the-secure-enclave
@@ -750,7 +840,21 @@ let client = try await Client.create(account: account, options: clientOptions) | |||
<th>Parameter</th> | |||
<th>Default</th> | |||
<th>Description</th> | |||
<th></th> | |||
</tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But should be added to RN for sure.
b21d634
to
67a83a7
Compare
Co-authored-by: Naomi Plasterer <[email protected]>
Co-authored-by: Naomi Plasterer <[email protected]>
Co-authored-by: Naomi Plasterer <[email protected]>
762884c
to
42a14ef
Compare
42a14ef
to
f38ff69
Compare
Preview: https://docs-xmtp-org-git-revamp-doc-nav-ephemerahq.vercel.app/
Create redirect
https://docs.xmtp.org/dms/client to https://docs.xmtp.org/client/create-client
To do: