From 0f761e0a1e50aa7e181602e1c77ad994c671468f Mon Sep 17 00:00:00 2001 From: Jennifer Hasegawa <5481259+jhaaaa@users.noreply.github.com> Date: Tue, 15 Aug 2023 12:40:02 -0700 Subject: [PATCH 1/6] docs: test typedoc output --- packages/react-sdk/docs/.nojekyll | 1 + packages/react-sdk/docs/assets/highlight.css | 120 ++ packages/react-sdk/docs/assets/main.js | 58 + packages/react-sdk/docs/assets/search.js | 1 + packages/react-sdk/docs/assets/style.css | 1367 +++++++++++++++++ .../react-sdk/docs/classes/Ciphertext.html | 203 +++ packages/react-sdk/docs/classes/Client.html | 652 ++++++++ .../docs/classes/CompositeCodec.html | 229 +++ .../react-sdk/docs/classes/ContentTypeId.html | 234 +++ .../react-sdk/docs/classes/Conversations.html | 335 ++++ .../docs/classes/DecodedMessage.html | 326 ++++ .../docs/classes/EncryptedPersistence.html | 268 ++++ .../docs/classes/InMemoryKeystore.html | 453 ++++++ .../classes/KeyGeneratorKeystoreProvider.html | 184 +++ .../docs/classes/LocalStoragePersistence.html | 206 +++ .../react-sdk/docs/classes/MessageV1.html | 359 +++++ .../react-sdk/docs/classes/MessageV2.html | 285 ++++ .../docs/classes/NetworkKeystoreProvider.html | 184 +++ .../docs/classes/PrefixedPersistence.html | 221 +++ .../react-sdk/docs/classes/PrivateKey.html | 337 ++++ .../react-sdk/docs/classes/PublicKey.html | 360 +++++ .../docs/classes/PublicKeyBundle.html | 236 +++ .../docs/classes/SealedInvitation.html | 250 +++ .../react-sdk/docs/classes/Signature.html | 256 +++ .../docs/classes/SignedPublicKey.html | 398 +++++ .../docs/classes/SignedPublicKeyBundle.html | 271 ++++ .../docs/classes/StaticKeystoreProvider.html | 181 +++ packages/react-sdk/docs/classes/Stream.html | 332 ++++ .../react-sdk/docs/classes/TextCodec.html | 206 +++ .../docs/classes/TypingNotificationCodec.html | 206 +++ .../docs/functions/XMTPProvider.html | 138 ++ .../docs/functions/buildContentTopic.html | 133 ++ .../functions/buildDirectMessageTopic.html | 135 ++ .../functions/buildDirectMessageTopicV2.html | 133 ++ .../docs/functions/buildUserContactTopic.html | 133 ++ .../docs/functions/buildUserIntroTopic.html | 133 ++ .../docs/functions/buildUserInviteTopic.html | 133 ++ .../functions/buildUserPrivateStoreTopic.html | 133 ++ .../react-sdk/docs/functions/dateToNs.html | 133 ++ .../docs/functions/decodeContactBundle.html | 133 ++ .../docs/functions/decodeContent.html | 135 ++ .../react-sdk/docs/functions/decrypt.html | 137 ++ .../react-sdk/docs/functions/encrypt.html | 137 ++ .../docs/functions/fromNanoString.html | 133 ++ .../docs/functions/isValidAddress.html | 136 ++ .../docs/functions/mapPaginatedStream.html | 140 ++ .../react-sdk/docs/functions/nsToDate.html | 133 ++ .../docs/functions/toNanoString.html | 133 ++ .../docs/functions/useCachedMessages.html | 158 ++ .../docs/functions/useCanMessage.html | 197 +++ .../react-sdk/docs/functions/useClient.html | 168 ++ .../docs/functions/useConversations.html | 144 ++ .../react-sdk/docs/functions/useMessages.html | 157 ++ .../docs/functions/useSendMessage.html | 163 ++ .../docs/functions/useStartConversation.html | 163 ++ .../docs/functions/useStreamAllMessages.html | 167 ++ .../functions/useStreamConversations.html | 167 ++ .../docs/functions/useStreamMessages.html | 168 ++ packages/react-sdk/docs/index.html | 321 ++++ .../docs/interfaces/CodecRegistry.html | 156 ++ .../docs/interfaces/ContentCodec.html | 198 +++ .../docs/interfaces/Conversation.html | 350 +++++ .../docs/interfaces/EncodedContent.html | 181 +++ .../react-sdk/docs/interfaces/Keystore.html | 347 +++++ .../docs/interfaces/KeystoreProvider.html | 171 +++ .../docs/interfaces/Persistence.html | 178 +++ .../react-sdk/docs/interfaces/Signer.html | 166 ++ packages/react-sdk/docs/modules.html | 219 +++ .../react-sdk/docs/types/ClientOptions.html | 128 ++ packages/react-sdk/docs/types/Composite.html | 136 ++ .../react-sdk/docs/types/ContentOptions.html | 138 ++ .../docs/types/InvitationContext.html | 134 ++ .../react-sdk/docs/types/KeyStoreOptions.html | 145 ++ .../react-sdk/docs/types/LegacyOptions.html | 129 ++ .../docs/types/ListMessagesOptions.html | 137 ++ .../types/ListMessagesPaginatedOptions.html | 135 ++ packages/react-sdk/docs/types/Message.html | 124 ++ .../react-sdk/docs/types/NetworkOptions.html | 165 ++ .../docs/types/PrivateKeyBundle.html | 124 ++ .../react-sdk/docs/types/SendOptions.html | 137 ++ packages/react-sdk/docs/types/TopicData.html | 124 ++ .../docs/types/TypingNotification.html | 133 ++ .../react-sdk/docs/variables/ApiUrls.html | 133 ++ .../react-sdk/docs/variables/Compression.html | 124 ++ .../docs/variables/ContentTypeComposite.html | 124 ++ .../docs/variables/ContentTypeFallback.html | 124 ++ .../docs/variables/ContentTypeText.html | 124 ++ .../ContentTypeTypingNotification.html | 124 ++ .../docs/variables/SortDirection.html | 124 ++ .../react-sdk/docs/variables/messagesDb.html | 124 ++ 90 files changed, 17969 insertions(+) create mode 100644 packages/react-sdk/docs/.nojekyll create mode 100644 packages/react-sdk/docs/assets/highlight.css create mode 100644 packages/react-sdk/docs/assets/main.js create mode 100644 packages/react-sdk/docs/assets/search.js create mode 100644 packages/react-sdk/docs/assets/style.css create mode 100644 packages/react-sdk/docs/classes/Ciphertext.html create mode 100644 packages/react-sdk/docs/classes/Client.html create mode 100644 packages/react-sdk/docs/classes/CompositeCodec.html create mode 100644 packages/react-sdk/docs/classes/ContentTypeId.html create mode 100644 packages/react-sdk/docs/classes/Conversations.html create mode 100644 packages/react-sdk/docs/classes/DecodedMessage.html create mode 100644 packages/react-sdk/docs/classes/EncryptedPersistence.html create mode 100644 packages/react-sdk/docs/classes/InMemoryKeystore.html create mode 100644 packages/react-sdk/docs/classes/KeyGeneratorKeystoreProvider.html create mode 100644 packages/react-sdk/docs/classes/LocalStoragePersistence.html create mode 100644 packages/react-sdk/docs/classes/MessageV1.html create mode 100644 packages/react-sdk/docs/classes/MessageV2.html create mode 100644 packages/react-sdk/docs/classes/NetworkKeystoreProvider.html create mode 100644 packages/react-sdk/docs/classes/PrefixedPersistence.html create mode 100644 packages/react-sdk/docs/classes/PrivateKey.html create mode 100644 packages/react-sdk/docs/classes/PublicKey.html create mode 100644 packages/react-sdk/docs/classes/PublicKeyBundle.html create mode 100644 packages/react-sdk/docs/classes/SealedInvitation.html create mode 100644 packages/react-sdk/docs/classes/Signature.html create mode 100644 packages/react-sdk/docs/classes/SignedPublicKey.html create mode 100644 packages/react-sdk/docs/classes/SignedPublicKeyBundle.html create mode 100644 packages/react-sdk/docs/classes/StaticKeystoreProvider.html create mode 100644 packages/react-sdk/docs/classes/Stream.html create mode 100644 packages/react-sdk/docs/classes/TextCodec.html create mode 100644 packages/react-sdk/docs/classes/TypingNotificationCodec.html create mode 100644 packages/react-sdk/docs/functions/XMTPProvider.html create mode 100644 packages/react-sdk/docs/functions/buildContentTopic.html create mode 100644 packages/react-sdk/docs/functions/buildDirectMessageTopic.html create mode 100644 packages/react-sdk/docs/functions/buildDirectMessageTopicV2.html create mode 100644 packages/react-sdk/docs/functions/buildUserContactTopic.html create mode 100644 packages/react-sdk/docs/functions/buildUserIntroTopic.html create mode 100644 packages/react-sdk/docs/functions/buildUserInviteTopic.html create mode 100644 packages/react-sdk/docs/functions/buildUserPrivateStoreTopic.html create mode 100644 packages/react-sdk/docs/functions/dateToNs.html create mode 100644 packages/react-sdk/docs/functions/decodeContactBundle.html create mode 100644 packages/react-sdk/docs/functions/decodeContent.html create mode 100644 packages/react-sdk/docs/functions/decrypt.html create mode 100644 packages/react-sdk/docs/functions/encrypt.html create mode 100644 packages/react-sdk/docs/functions/fromNanoString.html create mode 100644 packages/react-sdk/docs/functions/isValidAddress.html create mode 100644 packages/react-sdk/docs/functions/mapPaginatedStream.html create mode 100644 packages/react-sdk/docs/functions/nsToDate.html create mode 100644 packages/react-sdk/docs/functions/toNanoString.html create mode 100644 packages/react-sdk/docs/functions/useCachedMessages.html create mode 100644 packages/react-sdk/docs/functions/useCanMessage.html create mode 100644 packages/react-sdk/docs/functions/useClient.html create mode 100644 packages/react-sdk/docs/functions/useConversations.html create mode 100644 packages/react-sdk/docs/functions/useMessages.html create mode 100644 packages/react-sdk/docs/functions/useSendMessage.html create mode 100644 packages/react-sdk/docs/functions/useStartConversation.html create mode 100644 packages/react-sdk/docs/functions/useStreamAllMessages.html create mode 100644 packages/react-sdk/docs/functions/useStreamConversations.html create mode 100644 packages/react-sdk/docs/functions/useStreamMessages.html create mode 100644 packages/react-sdk/docs/index.html create mode 100644 packages/react-sdk/docs/interfaces/CodecRegistry.html create mode 100644 packages/react-sdk/docs/interfaces/ContentCodec.html create mode 100644 packages/react-sdk/docs/interfaces/Conversation.html create mode 100644 packages/react-sdk/docs/interfaces/EncodedContent.html create mode 100644 packages/react-sdk/docs/interfaces/Keystore.html create mode 100644 packages/react-sdk/docs/interfaces/KeystoreProvider.html create mode 100644 packages/react-sdk/docs/interfaces/Persistence.html create mode 100644 packages/react-sdk/docs/interfaces/Signer.html create mode 100644 packages/react-sdk/docs/modules.html create mode 100644 packages/react-sdk/docs/types/ClientOptions.html create mode 100644 packages/react-sdk/docs/types/Composite.html create mode 100644 packages/react-sdk/docs/types/ContentOptions.html create mode 100644 packages/react-sdk/docs/types/InvitationContext.html create mode 100644 packages/react-sdk/docs/types/KeyStoreOptions.html create mode 100644 packages/react-sdk/docs/types/LegacyOptions.html create mode 100644 packages/react-sdk/docs/types/ListMessagesOptions.html create mode 100644 packages/react-sdk/docs/types/ListMessagesPaginatedOptions.html create mode 100644 packages/react-sdk/docs/types/Message.html create mode 100644 packages/react-sdk/docs/types/NetworkOptions.html create mode 100644 packages/react-sdk/docs/types/PrivateKeyBundle.html create mode 100644 packages/react-sdk/docs/types/SendOptions.html create mode 100644 packages/react-sdk/docs/types/TopicData.html create mode 100644 packages/react-sdk/docs/types/TypingNotification.html create mode 100644 packages/react-sdk/docs/variables/ApiUrls.html create mode 100644 packages/react-sdk/docs/variables/Compression.html create mode 100644 packages/react-sdk/docs/variables/ContentTypeComposite.html create mode 100644 packages/react-sdk/docs/variables/ContentTypeFallback.html create mode 100644 packages/react-sdk/docs/variables/ContentTypeText.html create mode 100644 packages/react-sdk/docs/variables/ContentTypeTypingNotification.html create mode 100644 packages/react-sdk/docs/variables/SortDirection.html create mode 100644 packages/react-sdk/docs/variables/messagesDb.html diff --git a/packages/react-sdk/docs/.nojekyll b/packages/react-sdk/docs/.nojekyll new file mode 100644 index 00000000..e2ac6616 --- /dev/null +++ b/packages/react-sdk/docs/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/packages/react-sdk/docs/assets/highlight.css b/packages/react-sdk/docs/assets/highlight.css new file mode 100644 index 00000000..d6ca428f --- /dev/null +++ b/packages/react-sdk/docs/assets/highlight.css @@ -0,0 +1,120 @@ +:root { + --light-hl-0: #008000; + --dark-hl-0: #6A9955; + --light-hl-1: #795E26; + --dark-hl-1: #DCDCAA; + --light-hl-2: #000000; + --dark-hl-2: #D4D4D4; + --light-hl-3: #A31515; + --dark-hl-3: #CE9178; + --light-hl-4: #AF00DB; + --dark-hl-4: #C586C0; + --light-hl-5: #001080; + --dark-hl-5: #9CDCFE; + --light-hl-6: #267F99; + --dark-hl-6: #4EC9B0; + --light-hl-7: #800000; + --dark-hl-7: #808080; + --light-hl-8: #0000FF; + --dark-hl-8: #569CD6; + --light-hl-9: #0070C1; + --dark-hl-9: #4FC1FF; + --light-hl-10: #800000; + --dark-hl-10: #569CD6; + --light-hl-11: #E50000; + --dark-hl-11: #9CDCFE; + --light-hl-12: #000000FF; + --dark-hl-12: #D4D4D4; + --light-hl-13: #098658; + --dark-hl-13: #B5CEA8; + --light-code-background: #FFFFFF; + --dark-code-background: #1E1E1E; +} + +@media (prefers-color-scheme: light) { :root { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --hl-12: var(--light-hl-12); + --hl-13: var(--light-hl-13); + --code-background: var(--light-code-background); +} } + +@media (prefers-color-scheme: dark) { :root { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --hl-12: var(--dark-hl-12); + --hl-13: var(--dark-hl-13); + --code-background: var(--dark-code-background); +} } + +:root[data-theme='light'] { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --hl-12: var(--light-hl-12); + --hl-13: var(--light-hl-13); + --code-background: var(--light-code-background); +} + +:root[data-theme='dark'] { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --hl-12: var(--dark-hl-12); + --hl-13: var(--dark-hl-13); + --code-background: var(--dark-code-background); +} + +.hl-0 { color: var(--hl-0); } +.hl-1 { color: var(--hl-1); } +.hl-2 { color: var(--hl-2); } +.hl-3 { color: var(--hl-3); } +.hl-4 { color: var(--hl-4); } +.hl-5 { color: var(--hl-5); } +.hl-6 { color: var(--hl-6); } +.hl-7 { color: var(--hl-7); } +.hl-8 { color: var(--hl-8); } +.hl-9 { color: var(--hl-9); } +.hl-10 { color: var(--hl-10); } +.hl-11 { color: var(--hl-11); } +.hl-12 { color: var(--hl-12); } +.hl-13 { color: var(--hl-13); } +pre, code { background: var(--code-background); } diff --git a/packages/react-sdk/docs/assets/main.js b/packages/react-sdk/docs/assets/main.js new file mode 100644 index 00000000..4c8fa615 --- /dev/null +++ b/packages/react-sdk/docs/assets/main.js @@ -0,0 +1,58 @@ +"use strict"; +"use strict";(()=>{var Se=Object.create;var re=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Te=Object.getOwnPropertyNames;var ke=Object.getPrototypeOf,Qe=Object.prototype.hasOwnProperty;var Pe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ie=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Te(e))!Qe.call(t,i)&&i!==r&&re(t,i,{get:()=>e[i],enumerable:!(n=we(e,i))||n.enumerable});return t};var Ce=(t,e,r)=>(r=t!=null?Se(ke(t)):{},Ie(e||!t||!t.__esModule?re(r,"default",{value:t,enumerable:!0}):r,t));var ae=Pe((se,oe)=>{(function(){var t=function(e){var r=new t.Builder;return r.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),r.searchPipeline.add(t.stemmer),e.call(r,r),r.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(r){e.console&&console.warn&&console.warn(r)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var r=Object.create(null),n=Object.keys(e),i=0;i0){var d=t.utils.clone(r)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(n.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,r){r in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+r),e.label=r,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var r=e.label&&e.label in this.registeredFunctions;r||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var r=new t.Pipeline;return e.forEach(function(n){var i=t.Pipeline.registeredFunctions[n];if(i)r.add(i);else throw new Error("Cannot load unregistered function: "+n)}),r},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(r){t.Pipeline.warnIfFunctionNotRegistered(r),this._stack.push(r)},this)},t.Pipeline.prototype.after=function(e,r){t.Pipeline.warnIfFunctionNotRegistered(r);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");n=n+1,this._stack.splice(n,0,r)},t.Pipeline.prototype.before=function(e,r){t.Pipeline.warnIfFunctionNotRegistered(r);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");this._stack.splice(n,0,r)},t.Pipeline.prototype.remove=function(e){var r=this._stack.indexOf(e);r!=-1&&this._stack.splice(r,1)},t.Pipeline.prototype.run=function(e){for(var r=this._stack.length,n=0;n1&&(oe&&(n=s),o!=e);)i=n-r,s=r+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(r+=n[u+1]*i[d+1],u+=2,d+=2);return r},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),r=1,n=0;r0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),y;m in s.node.edges?y=s.node.edges[m]:(y=new t.TokenSet,s.node.edges[m]=y),s.str.length==1&&(y.final=!0),i.push({node:y,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return n},t.TokenSet.fromString=function(e){for(var r=new t.TokenSet,n=r,i=0,s=e.length;i=e;r--){var n=this.uncheckedNodes[r],i=n.child.toString();i in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[i]:(n.child._str=i,this.minimizedNodes[i]=n.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(r){var n=new t.QueryParser(e,r);n.parse()})},t.Index.prototype.query=function(e){for(var r=new t.Query(this.fields),n=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,r){var n=e[this._ref],i=Object.keys(this._fields);this._documents[n]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,r;do e=this.next(),r=e.charCodeAt(0);while(r>47&&r<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var r=e.next();if(r==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(r.charCodeAt(0)==92){e.escapeCharacter();continue}if(r==":")return t.QueryLexer.lexField;if(r=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(r=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(r=="+"&&e.width()===1||r=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(r.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,r){this.lexer=new t.QueryLexer(e),this.query=r,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var r=e.peekLexeme();if(r!=null)switch(r.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(n+=" with value '"+r.str+"'"),new t.QueryParseError(n,r.start,r.end)}},t.QueryParser.parsePresence=function(e){var r=e.consumeLexeme();if(r!=null){switch(r.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+r.str+"'";throw new t.QueryParseError(n,r.start,r.end)}var i=e.peekLexeme();if(i==null){var n="expecting term or field, found nothing";throw new t.QueryParseError(n,r.start,r.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(n,i.start,i.end)}}},t.QueryParser.parseField=function(e){var r=e.consumeLexeme();if(r!=null){if(e.query.allFields.indexOf(r.str)==-1){var n=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+r.str+"', possible fields: "+n;throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.fields=[r.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,r.start,r.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var r=e.consumeLexeme();if(r!=null){e.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(n==null){e.nextClause();return}switch(n.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new t.QueryParseError(i,n.start,n.end)}}},t.QueryParser.parseEditDistance=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.editDistance=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="boost must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.boost=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,r){typeof define=="function"&&define.amd?define(r):typeof se=="object"?oe.exports=r():e.lunr=r()}(this,function(){return t})})()});var ne=[];function G(t,e){ne.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){ne.forEach(r=>{e.querySelectorAll(r.selector).forEach(n=>{n.dataset.hasInstance||(new r.constructor({el:n,app:this}),n.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),r=e?.parentElement;for(;r&&!r.classList.contains(".tsd-navigation");)r instanceof HTMLDetailsElement&&(r.open=!0),r=r.parentElement;if(e){let n=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=n}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let r=e.parentElement;for(;r&&r.tagName!=="SECTION";)r=r.parentElement;if(r&&r.offsetParent==null){this.alwaysVisibleMember=r,r.classList.add("always-visible");let n=document.createElement("p");n.classList.add("warning"),n.textContent="This member is normally hidden due to your filter settings.",r.prepend(n)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let r;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(r),r=setTimeout(()=>{e.classList.remove("visible"),r=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let r;return()=>{clearTimeout(r),r=setTimeout(()=>t(),e)}};var ce=Ce(ae());function de(){let t=document.getElementById("tsd-search");if(!t)return;let e=document.getElementById("tsd-search-script");t.classList.add("loading"),e&&(e.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),e.addEventListener("load",()=>{t.classList.remove("loading"),t.classList.add("ready")}),window.searchData&&t.classList.remove("loading"));let r=document.querySelector("#tsd-search input"),n=document.querySelector("#tsd-search .results");if(!r||!n)throw new Error("The input field or the result list wrapper was not found");let i=!1;n.addEventListener("mousedown",()=>i=!0),n.addEventListener("mouseup",()=>{i=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{i||(i=!1,t.classList.remove("has-focus"))});let s={base:t.dataset.base+"/"};Oe(t,n,r,s)}function Oe(t,e,r,n){r.addEventListener("input",ie(()=>{Re(t,e,r,n)},200));let i=!1;r.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Fe(e,r):s.key=="Escape"?r.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),r.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!r.matches(":focus")&&s.key==="/"&&(r.focus(),s.preventDefault())})}function _e(t,e){t.index||window.searchData&&(e.classList.remove("loading"),e.classList.add("ready"),t.data=window.searchData,t.index=ce.Index.load(window.searchData.index))}function Re(t,e,r,n){if(_e(n,t),!n.index||!n.data)return;e.textContent="";let i=r.value.trim(),s=i?n.index.search(`*${i}*`):[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o${le(l.parent,i)}.${u}`);let d=document.createElement("li");d.classList.value=l.classes??"";let m=document.createElement("a");m.href=n.base+l.url,m.innerHTML=u,d.append(m),e.appendChild(d)}}function ue(t,e){let r=t.querySelector(".current");if(!r)r=t.querySelector(e==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let n=r;if(e===1)do n=n.nextElementSibling??void 0;while(n instanceof HTMLElement&&n.offsetParent==null);else do n=n.previousElementSibling??void 0;while(n instanceof HTMLElement&&n.offsetParent==null);n&&(r.classList.remove("current"),n.classList.add("current"))}}function Fe(t,e){let r=t.querySelector(".current");if(r||(r=t.querySelector("li:first-child")),r){let n=r.querySelector("a");n&&(window.location.href=n.href),e.blur()}}function le(t,e){if(e==="")return t;let r=t.toLocaleLowerCase(),n=e.toLocaleLowerCase(),i=[],s=0,o=r.indexOf(n);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+n.length))}`),s=o+n.length,o=r.indexOf(n,s);return i.push(K(t.substring(s))),i.join("")}var Me={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Me[e])}var P=class{constructor(e){this.el=e.el,this.app=e.app}};var M="mousedown",fe="mousemove",N="mouseup",J={x:0,y:0},he=!1,ee=!1,De=!1,D=!1,pe=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(pe?"is-mobile":"not-mobile");pe&&"ontouchstart"in document.documentElement&&(De=!0,M="touchstart",fe="touchmove",N="touchend");document.addEventListener(M,t=>{ee=!0,D=!1;let e=M=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(fe,t=>{if(ee&&!D){let e=M=="touchstart"?t.targetTouches[0]:t,r=J.x-(e.pageX||0),n=J.y-(e.pageY||0);D=Math.sqrt(r*r+n*n)>10}});document.addEventListener(N,()=>{ee=!1});document.addEventListener("click",t=>{he&&(t.preventDefault(),t.stopImmediatePropagation(),he=!1)});var X=class extends P{constructor(r){super(r);this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(M,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,n=>this.onDocumentPointerUp(n))}setActive(r){if(this.active==r)return;this.active=r,document.documentElement.classList.toggle("has-"+this.className,r),this.el.classList.toggle("active",r);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(r){D||(this.setActive(!0),r.preventDefault())}onDocumentPointerDown(r){if(this.active){if(r.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(r){if(!D&&this.active&&r.target.closest(".col-sidebar")){let n=r.target.closest("a");if(n){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substring(0,i.indexOf("#"))),n.href.substring(0,i.length)==i&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var me=document.head.appendChild(document.createElement("style"));me.dataset.for="filters";var Y=class extends P{constructor(r){super(r);this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),me.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`}fromLocalStorage(){let r=Q.getItem(this.key);return r?r==="true":this.el.checked}setLocalStorage(r){Q.setItem(this.key,r.toString()),this.value=r,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let n=Array.from(r.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);r.style.display=n?"none":"block"})}};var Z=class extends P{constructor(r){super(r);this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update()),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ve(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}de();G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var ge=document.getElementById("tsd-theme");ge&&ve(ge);var Ae=new U;Object.defineProperty(window,"app",{value:Ae});document.querySelectorAll("summary a").forEach(t=>{t.addEventListener("click",()=>{location.assign(t.href)})});})(); +/*! Bundled license information: + +lunr/lunr.js: + (** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + *) + (*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + *) + (*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + *) +*/ diff --git a/packages/react-sdk/docs/assets/search.js b/packages/react-sdk/docs/assets/search.js new file mode 100644 index 00000000..061287db --- /dev/null +++ b/packages/react-sdk/docs/assets/search.js @@ -0,0 +1 @@ +window.searchData = JSON.parse("{\"rows\":[{\"kind\":64,\"name\":\"XMTPProvider\",\"url\":\"functions/XMTPProvider.html\",\"classes\":\"\"},{\"kind\":64,\"name\":\"isValidAddress\",\"url\":\"functions/isValidAddress.html\",\"classes\":\"\"},{\"kind\":32,\"name\":\"messagesDb\",\"url\":\"variables/messagesDb.html\",\"classes\":\"\"},{\"kind\":64,\"name\":\"useCanMessage\",\"url\":\"functions/useCanMessage.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useCanMessage.html#useCanMessage.__type\",\"classes\":\"\",\"parent\":\"useCanMessage.useCanMessage\"},{\"kind\":1024,\"name\":\"error\",\"url\":\"functions/useCanMessage.html#useCanMessage.__type.error\",\"classes\":\"\",\"parent\":\"useCanMessage.useCanMessage.__type\"},{\"kind\":1024,\"name\":\"isLoading\",\"url\":\"functions/useCanMessage.html#useCanMessage.__type.isLoading\",\"classes\":\"\",\"parent\":\"useCanMessage.useCanMessage.__type\"},{\"kind\":1024,\"name\":\"canMessage\",\"url\":\"functions/useCanMessage.html#useCanMessage.__type.canMessage\",\"classes\":\"\",\"parent\":\"useCanMessage.useCanMessage.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useCanMessage.html#useCanMessage.__type.canMessage.__type-1\",\"classes\":\"\",\"parent\":\"useCanMessage.useCanMessage.__type.canMessage\"},{\"kind\":1024,\"name\":\"canMessageStatic\",\"url\":\"functions/useCanMessage.html#useCanMessage.__type.canMessageStatic\",\"classes\":\"\",\"parent\":\"useCanMessage.useCanMessage.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useCanMessage.html#useCanMessage.__type.canMessageStatic.__type-3\",\"classes\":\"\",\"parent\":\"useCanMessage.useCanMessage.__type.canMessageStatic\"},{\"kind\":64,\"name\":\"useConversations\",\"url\":\"functions/useConversations.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useConversations.html#useConversations.__type\",\"classes\":\"\",\"parent\":\"useConversations.useConversations\"},{\"kind\":1024,\"name\":\"conversations\",\"url\":\"functions/useConversations.html#useConversations.__type.conversations\",\"classes\":\"\",\"parent\":\"useConversations.useConversations.__type\"},{\"kind\":1024,\"name\":\"error\",\"url\":\"functions/useConversations.html#useConversations.__type.error\",\"classes\":\"\",\"parent\":\"useConversations.useConversations.__type\"},{\"kind\":1024,\"name\":\"isLoading\",\"url\":\"functions/useConversations.html#useConversations.__type.isLoading\",\"classes\":\"\",\"parent\":\"useConversations.useConversations.__type\"},{\"kind\":64,\"name\":\"useClient\",\"url\":\"functions/useClient.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useClient.html#useClient.__type\",\"classes\":\"\",\"parent\":\"useClient.useClient\"},{\"kind\":1024,\"name\":\"client\",\"url\":\"functions/useClient.html#useClient.__type.client\",\"classes\":\"\",\"parent\":\"useClient.useClient.__type\"},{\"kind\":1024,\"name\":\"disconnect\",\"url\":\"functions/useClient.html#useClient.__type.disconnect\",\"classes\":\"\",\"parent\":\"useClient.useClient.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useClient.html#useClient.__type.disconnect.__type-1\",\"classes\":\"\",\"parent\":\"useClient.useClient.__type.disconnect\"},{\"kind\":1024,\"name\":\"error\",\"url\":\"functions/useClient.html#useClient.__type.error\",\"classes\":\"\",\"parent\":\"useClient.useClient.__type\"},{\"kind\":1024,\"name\":\"initialize\",\"url\":\"functions/useClient.html#useClient.__type.initialize\",\"classes\":\"\",\"parent\":\"useClient.useClient.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useClient.html#useClient.__type.initialize.__type-3\",\"classes\":\"\",\"parent\":\"useClient.useClient.__type.initialize\"},{\"kind\":1024,\"name\":\"isLoading\",\"url\":\"functions/useClient.html#useClient.__type.isLoading\",\"classes\":\"\",\"parent\":\"useClient.useClient.__type\"},{\"kind\":1024,\"name\":\"signer\",\"url\":\"functions/useClient.html#useClient.__type.signer\",\"classes\":\"\",\"parent\":\"useClient.useClient.__type\"},{\"kind\":64,\"name\":\"useCachedMessages\",\"url\":\"functions/useCachedMessages.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useCachedMessages.html#useCachedMessages.__type\",\"classes\":\"\",\"parent\":\"useCachedMessages.useCachedMessages\"},{\"kind\":1024,\"name\":\"error\",\"url\":\"functions/useCachedMessages.html#useCachedMessages.__type.error\",\"classes\":\"\",\"parent\":\"useCachedMessages.useCachedMessages.__type\"},{\"kind\":1024,\"name\":\"hasMore\",\"url\":\"functions/useCachedMessages.html#useCachedMessages.__type.hasMore\",\"classes\":\"\",\"parent\":\"useCachedMessages.useCachedMessages.__type\"},{\"kind\":1024,\"name\":\"isLoading\",\"url\":\"functions/useCachedMessages.html#useCachedMessages.__type.isLoading\",\"classes\":\"\",\"parent\":\"useCachedMessages.useCachedMessages.__type\"},{\"kind\":1024,\"name\":\"messages\",\"url\":\"functions/useCachedMessages.html#useCachedMessages.__type.messages\",\"classes\":\"\",\"parent\":\"useCachedMessages.useCachedMessages.__type\"},{\"kind\":1024,\"name\":\"next\",\"url\":\"functions/useCachedMessages.html#useCachedMessages.__type.next\",\"classes\":\"\",\"parent\":\"useCachedMessages.useCachedMessages.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useCachedMessages.html#useCachedMessages.__type.next.__type-1\",\"classes\":\"\",\"parent\":\"useCachedMessages.useCachedMessages.__type.next\"},{\"kind\":64,\"name\":\"useMessages\",\"url\":\"functions/useMessages.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useMessages.html#useMessages.__type\",\"classes\":\"\",\"parent\":\"useMessages.useMessages\"},{\"kind\":1024,\"name\":\"error\",\"url\":\"functions/useMessages.html#useMessages.__type.error\",\"classes\":\"\",\"parent\":\"useMessages.useMessages.__type\"},{\"kind\":1024,\"name\":\"hasMore\",\"url\":\"functions/useMessages.html#useMessages.__type.hasMore\",\"classes\":\"\",\"parent\":\"useMessages.useMessages.__type\"},{\"kind\":1024,\"name\":\"isLoading\",\"url\":\"functions/useMessages.html#useMessages.__type.isLoading\",\"classes\":\"\",\"parent\":\"useMessages.useMessages.__type\"},{\"kind\":1024,\"name\":\"messages\",\"url\":\"functions/useMessages.html#useMessages.__type.messages\",\"classes\":\"\",\"parent\":\"useMessages.useMessages.__type\"},{\"kind\":1024,\"name\":\"next\",\"url\":\"functions/useMessages.html#useMessages.__type.next\",\"classes\":\"\",\"parent\":\"useMessages.useMessages.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useMessages.html#useMessages.__type.next.__type-1\",\"classes\":\"\",\"parent\":\"useMessages.useMessages.__type.next\"},{\"kind\":64,\"name\":\"useSendMessage\",\"url\":\"functions/useSendMessage.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useSendMessage.html#useSendMessage.__type\",\"classes\":\"\",\"parent\":\"useSendMessage.useSendMessage\"},{\"kind\":1024,\"name\":\"error\",\"url\":\"functions/useSendMessage.html#useSendMessage.__type.error\",\"classes\":\"\",\"parent\":\"useSendMessage.useSendMessage.__type\"},{\"kind\":1024,\"name\":\"isLoading\",\"url\":\"functions/useSendMessage.html#useSendMessage.__type.isLoading\",\"classes\":\"\",\"parent\":\"useSendMessage.useSendMessage.__type\"},{\"kind\":1024,\"name\":\"sendMessage\",\"url\":\"functions/useSendMessage.html#useSendMessage.__type.sendMessage\",\"classes\":\"\",\"parent\":\"useSendMessage.useSendMessage.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useSendMessage.html#useSendMessage.__type.sendMessage.__type-1\",\"classes\":\"\",\"parent\":\"useSendMessage.useSendMessage.__type.sendMessage\"},{\"kind\":64,\"name\":\"useStartConversation\",\"url\":\"functions/useStartConversation.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useStartConversation.html#useStartConversation.__type\",\"classes\":\"\",\"parent\":\"useStartConversation.useStartConversation\"},{\"kind\":1024,\"name\":\"error\",\"url\":\"functions/useStartConversation.html#useStartConversation.__type.error\",\"classes\":\"\",\"parent\":\"useStartConversation.useStartConversation.__type\"},{\"kind\":1024,\"name\":\"isLoading\",\"url\":\"functions/useStartConversation.html#useStartConversation.__type.isLoading\",\"classes\":\"\",\"parent\":\"useStartConversation.useStartConversation.__type\"},{\"kind\":1024,\"name\":\"startConversation\",\"url\":\"functions/useStartConversation.html#useStartConversation.__type.startConversation\",\"classes\":\"\",\"parent\":\"useStartConversation.useStartConversation.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useStartConversation.html#useStartConversation.__type.startConversation.__type-1\",\"classes\":\"\",\"parent\":\"useStartConversation.useStartConversation.__type.startConversation\"},{\"kind\":64,\"name\":\"useStreamAllMessages\",\"url\":\"functions/useStreamAllMessages.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useStreamAllMessages.html#useStreamAllMessages.__type\",\"classes\":\"\",\"parent\":\"useStreamAllMessages.useStreamAllMessages\"},{\"kind\":1024,\"name\":\"error\",\"url\":\"functions/useStreamAllMessages.html#useStreamAllMessages.__type.error\",\"classes\":\"\",\"parent\":\"useStreamAllMessages.useStreamAllMessages.__type\"},{\"kind\":64,\"name\":\"useStreamConversations\",\"url\":\"functions/useStreamConversations.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useStreamConversations.html#useStreamConversations.__type\",\"classes\":\"\",\"parent\":\"useStreamConversations.useStreamConversations\"},{\"kind\":1024,\"name\":\"error\",\"url\":\"functions/useStreamConversations.html#useStreamConversations.__type.error\",\"classes\":\"\",\"parent\":\"useStreamConversations.useStreamConversations.__type\"},{\"kind\":64,\"name\":\"useStreamMessages\",\"url\":\"functions/useStreamMessages.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/useStreamMessages.html#useStreamMessages.__type\",\"classes\":\"\",\"parent\":\"useStreamMessages.useStreamMessages\"},{\"kind\":1024,\"name\":\"error\",\"url\":\"functions/useStreamMessages.html#useStreamMessages.__type.error\",\"classes\":\"\",\"parent\":\"useStreamMessages.useStreamMessages.__type\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,37.534]],[\"comment/0\",[]],[\"name/1\",[1,37.534]],[\"comment/1\",[]],[\"name/2\",[2,37.534]],[\"comment/2\",[]],[\"name/3\",[3,37.534]],[\"comment/3\",[]],[\"name/4\",[4,12.411]],[\"comment/4\",[]],[\"name/5\",[5,18.075]],[\"comment/5\",[]],[\"name/6\",[6,21.44]],[\"comment/6\",[]],[\"name/7\",[7,37.534]],[\"comment/7\",[]],[\"name/8\",[4,12.411]],[\"comment/8\",[]],[\"name/9\",[8,37.534]],[\"comment/9\",[]],[\"name/10\",[4,12.411]],[\"comment/10\",[]],[\"name/11\",[9,37.534]],[\"comment/11\",[]],[\"name/12\",[4,12.411]],[\"comment/12\",[]],[\"name/13\",[10,37.534]],[\"comment/13\",[]],[\"name/14\",[5,18.075]],[\"comment/14\",[]],[\"name/15\",[6,21.44]],[\"comment/15\",[]],[\"name/16\",[11,37.534]],[\"comment/16\",[]],[\"name/17\",[4,12.411]],[\"comment/17\",[]],[\"name/18\",[12,37.534]],[\"comment/18\",[]],[\"name/19\",[13,37.534]],[\"comment/19\",[]],[\"name/20\",[4,12.411]],[\"comment/20\",[]],[\"name/21\",[5,18.075]],[\"comment/21\",[]],[\"name/22\",[14,37.534]],[\"comment/22\",[]],[\"name/23\",[4,12.411]],[\"comment/23\",[]],[\"name/24\",[6,21.44]],[\"comment/24\",[]],[\"name/25\",[15,37.534]],[\"comment/25\",[]],[\"name/26\",[16,37.534]],[\"comment/26\",[]],[\"name/27\",[4,12.411]],[\"comment/27\",[]],[\"name/28\",[5,18.075]],[\"comment/28\",[]],[\"name/29\",[17,32.426]],[\"comment/29\",[]],[\"name/30\",[6,21.44]],[\"comment/30\",[]],[\"name/31\",[18,32.426]],[\"comment/31\",[]],[\"name/32\",[19,32.426]],[\"comment/32\",[]],[\"name/33\",[4,12.411]],[\"comment/33\",[]],[\"name/34\",[20,37.534]],[\"comment/34\",[]],[\"name/35\",[4,12.411]],[\"comment/35\",[]],[\"name/36\",[5,18.075]],[\"comment/36\",[]],[\"name/37\",[17,32.426]],[\"comment/37\",[]],[\"name/38\",[6,21.44]],[\"comment/38\",[]],[\"name/39\",[18,32.426]],[\"comment/39\",[]],[\"name/40\",[19,32.426]],[\"comment/40\",[]],[\"name/41\",[4,12.411]],[\"comment/41\",[]],[\"name/42\",[21,37.534]],[\"comment/42\",[]],[\"name/43\",[4,12.411]],[\"comment/43\",[]],[\"name/44\",[5,18.075]],[\"comment/44\",[]],[\"name/45\",[6,21.44]],[\"comment/45\",[]],[\"name/46\",[22,37.534]],[\"comment/46\",[]],[\"name/47\",[4,12.411]],[\"comment/47\",[]],[\"name/48\",[23,37.534]],[\"comment/48\",[]],[\"name/49\",[4,12.411]],[\"comment/49\",[]],[\"name/50\",[5,18.075]],[\"comment/50\",[]],[\"name/51\",[6,21.44]],[\"comment/51\",[]],[\"name/52\",[24,37.534]],[\"comment/52\",[]],[\"name/53\",[4,12.411]],[\"comment/53\",[]],[\"name/54\",[25,37.534]],[\"comment/54\",[]],[\"name/55\",[4,12.411]],[\"comment/55\",[]],[\"name/56\",[5,18.075]],[\"comment/56\",[]],[\"name/57\",[26,37.534]],[\"comment/57\",[]],[\"name/58\",[4,12.411]],[\"comment/58\",[]],[\"name/59\",[5,18.075]],[\"comment/59\",[]],[\"name/60\",[27,37.534]],[\"comment/60\",[]],[\"name/61\",[4,12.411]],[\"comment/61\",[]],[\"name/62\",[5,18.075]],[\"comment/62\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":4,\"name\":{\"4\":{},\"8\":{},\"10\":{},\"12\":{},\"17\":{},\"20\":{},\"23\":{},\"27\":{},\"33\":{},\"35\":{},\"41\":{},\"43\":{},\"47\":{},\"49\":{},\"53\":{},\"55\":{},\"58\":{},\"61\":{}},\"comment\":{}}],[\"canmessage\",{\"_index\":7,\"name\":{\"7\":{}},\"comment\":{}}],[\"canmessagestatic\",{\"_index\":8,\"name\":{\"9\":{}},\"comment\":{}}],[\"client\",{\"_index\":12,\"name\":{\"18\":{}},\"comment\":{}}],[\"conversations\",{\"_index\":10,\"name\":{\"13\":{}},\"comment\":{}}],[\"disconnect\",{\"_index\":13,\"name\":{\"19\":{}},\"comment\":{}}],[\"error\",{\"_index\":5,\"name\":{\"5\":{},\"14\":{},\"21\":{},\"28\":{},\"36\":{},\"44\":{},\"50\":{},\"56\":{},\"59\":{},\"62\":{}},\"comment\":{}}],[\"hasmore\",{\"_index\":17,\"name\":{\"29\":{},\"37\":{}},\"comment\":{}}],[\"initialize\",{\"_index\":14,\"name\":{\"22\":{}},\"comment\":{}}],[\"isloading\",{\"_index\":6,\"name\":{\"6\":{},\"15\":{},\"24\":{},\"30\":{},\"38\":{},\"45\":{},\"51\":{}},\"comment\":{}}],[\"isvalidaddress\",{\"_index\":1,\"name\":{\"1\":{}},\"comment\":{}}],[\"messages\",{\"_index\":18,\"name\":{\"31\":{},\"39\":{}},\"comment\":{}}],[\"messagesdb\",{\"_index\":2,\"name\":{\"2\":{}},\"comment\":{}}],[\"next\",{\"_index\":19,\"name\":{\"32\":{},\"40\":{}},\"comment\":{}}],[\"sendmessage\",{\"_index\":22,\"name\":{\"46\":{}},\"comment\":{}}],[\"signer\",{\"_index\":15,\"name\":{\"25\":{}},\"comment\":{}}],[\"startconversation\",{\"_index\":24,\"name\":{\"52\":{}},\"comment\":{}}],[\"usecachedmessages\",{\"_index\":16,\"name\":{\"26\":{}},\"comment\":{}}],[\"usecanmessage\",{\"_index\":3,\"name\":{\"3\":{}},\"comment\":{}}],[\"useclient\",{\"_index\":11,\"name\":{\"16\":{}},\"comment\":{}}],[\"useconversations\",{\"_index\":9,\"name\":{\"11\":{}},\"comment\":{}}],[\"usemessages\",{\"_index\":20,\"name\":{\"34\":{}},\"comment\":{}}],[\"usesendmessage\",{\"_index\":21,\"name\":{\"42\":{}},\"comment\":{}}],[\"usestartconversation\",{\"_index\":23,\"name\":{\"48\":{}},\"comment\":{}}],[\"usestreamallmessages\",{\"_index\":25,\"name\":{\"54\":{}},\"comment\":{}}],[\"usestreamconversations\",{\"_index\":26,\"name\":{\"57\":{}},\"comment\":{}}],[\"usestreammessages\",{\"_index\":27,\"name\":{\"60\":{}},\"comment\":{}}],[\"xmtpprovider\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file diff --git a/packages/react-sdk/docs/assets/style.css b/packages/react-sdk/docs/assets/style.css new file mode 100644 index 00000000..18b4f8fe --- /dev/null +++ b/packages/react-sdk/docs/assets/style.css @@ -0,0 +1,1367 @@ +:root { + /* Light */ + --light-color-background: #f2f4f8; + --light-color-background-secondary: #eff0f1; + --light-color-warning-text: #222; + --light-color-background-warning: #e6e600; + --light-color-icon-background: var(--light-color-background); + --light-color-accent: #c5c7c9; + --light-color-active-menu-item: var(--light-color-accent); + --light-color-text: #222; + --light-color-text-aside: #6e6e6e; + --light-color-link: #1f70c2; + + --light-color-ts-project: #b111c9; + --light-color-ts-module: var(--light-color-ts-project); + --light-color-ts-namespace: var(--light-color-ts-project); + --light-color-ts-enum: #7e6f15; + --light-color-ts-enum-member: var(--light-color-ts-enum); + --light-color-ts-variable: #4760ec; + --light-color-ts-function: #572be7; + --light-color-ts-class: #1f70c2; + --light-color-ts-interface: #108024; + --light-color-ts-constructor: var(--light-color-ts-class); + --light-color-ts-property: var(--light-color-ts-variable); + --light-color-ts-method: var(--light-color-ts-function); + --light-color-ts-call-signature: var(--light-color-ts-method); + --light-color-ts-index-signature: var(--light-color-ts-property); + --light-color-ts-constructor-signature: var(--light-color-ts-constructor); + --light-color-ts-parameter: var(--light-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --light-color-ts-type-parameter: var(--light-color-ts-type-alias); + --light-color-ts-accessor: var(--light-color-ts-property); + --light-color-ts-get-signature: var(--light-color-ts-accessor); + --light-color-ts-set-signature: var(--light-color-ts-accessor); + /* object literal not included as it is not used and will be removed in 0.25 */ + --light-color-ts-type-alias: #d51270; + /* reference not included as links will be colored with the kind that it points to */ + + --light-external-icon: url("data:image/svg+xml;utf8,"); + --light-color-scheme: light; + + /* Dark */ + --dark-color-background: #2b2e33; + --dark-color-background-secondary: #1e2024; + --dark-color-background-warning: #bebe00; + --dark-color-warning-text: #222; + --dark-color-icon-background: var(--dark-color-background-secondary); + --dark-color-accent: #9096a2; + --dark-color-active-menu-item: #5d5d6a; + --dark-color-text: #f5f5f5; + --dark-color-text-aside: #dddddd; + --dark-color-link: #00aff4; + + --dark-color-ts-project: #e358ff; + --dark-color-ts-module: var(--dark-color-ts-project); + --dark-color-ts-namespace: var(--dark-color-ts-project); + --dark-color-ts-enum: #f4d93e; + --dark-color-ts-enum-member: var(--dark-color-ts-enum); + --dark-color-ts-variable: #798dff; + --dark-color-ts-function: #a280ff; + --dark-color-ts-class: #8ac4ff; + --dark-color-ts-interface: #6cff87; + --dark-color-ts-constructor: var(--dark-color-ts-class); + --dark-color-ts-property: var(--dark-color-ts-variable); + --dark-color-ts-method: var(--dark-color-ts-function); + --dark-color-ts-call-signature: var(--dark-color-ts-method); + --dark-color-ts-index-signature: var(--dark-color-ts-property); + --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); + --dark-color-ts-parameter: var(--dark-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --dark-color-ts-type-parameter: var(--dark-color-ts-type-alias); + --dark-color-ts-accessor: var(--dark-color-ts-property); + --dark-color-ts-get-signature: var(--dark-color-ts-accessor); + --dark-color-ts-set-signature: var(--dark-color-ts-accessor); + /* object literal not included as it is not used and will be removed in 0.25 */ + --dark-color-ts-type-alias: #ff6492; + /* reference not included as links will be colored with the kind that it points to */ + + --dark-external-icon: url("data:image/svg+xml;utf8,"); + --dark-color-scheme: dark; +} + +@media (prefers-color-scheme: light) { + :root { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); + } +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); + } +} + +html { + color-scheme: var(--color-scheme); +} + +body { + margin: 0; +} + +:root[data-theme="light"] { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); +} + +:root[data-theme="dark"] { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); +} + +.always-visible, +.always-visible .tsd-signatures { + display: inherit !important; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: 1.2; +} + +h1 > a, +h2 > a, +h3 > a, +h4 > a, +h5 > a, +h6 > a { + text-decoration: none; + color: var(--color-text); +} + +h1 { + font-size: 1.875rem; + margin: 0.67rem 0; +} + +h2 { + font-size: 1.5rem; + margin: 0.83rem 0; +} + +h3 { + font-size: 1.25rem; + margin: 1rem 0; +} + +h4 { + font-size: 1.05rem; + margin: 1.33rem 0; +} + +h5 { + font-size: 1rem; + margin: 1.5rem 0; +} + +h6 { + font-size: 0.875rem; + margin: 2.33rem 0; +} + +.uppercase { + text-transform: uppercase; +} + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +.container { + max-width: 1700px; + padding: 0 2rem; +} + +/* Footer */ +.tsd-generator { + border-top: 1px solid var(--color-accent); + padding-top: 1rem; + padding-bottom: 1rem; + max-height: 3.5rem; +} + +.tsd-generator > p { + margin-top: 0; + margin-bottom: 0; + padding: 0 1rem; +} + +.container-main { + margin: 0 auto; + /* toolbar, footer, margin */ + min-height: calc(100vh - 41px - 56px - 4rem); +} + +@keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes fade-out { + from { + opacity: 1; + visibility: visible; + } + to { + opacity: 0; + } +} +@keyframes fade-in-delayed { + 0% { + opacity: 0; + } + 33% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fade-out-delayed { + 0% { + opacity: 1; + visibility: visible; + } + 66% { + opacity: 0; + } + 100% { + opacity: 0; + } +} +@keyframes pop-in-from-right { + from { + transform: translate(100%, 0); + } + to { + transform: translate(0, 0); + } +} +@keyframes pop-out-to-right { + from { + transform: translate(0, 0); + visibility: visible; + } + to { + transform: translate(100%, 0); + } +} +body { + background: var(--color-background); + font-family: "Segoe UI", sans-serif; + font-size: 16px; + color: var(--color-text); +} + +a { + color: var(--color-link); + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +a.external[target="_blank"] { + background-image: var(--external-icon); + background-position: top 3px right; + background-repeat: no-repeat; + padding-right: 13px; +} + +code, +pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 0.875rem; + border-radius: 0.8em; +} + +pre { + position: relative; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + padding: 10px; + border: 1px solid var(--color-accent); +} +pre code { + padding: 0; + font-size: 100%; +} +pre > button { + position: absolute; + top: 10px; + right: 10px; + opacity: 0; + transition: opacity 0.1s; + box-sizing: border-box; +} +pre:hover > button, +pre > button.visible { + opacity: 1; +} + +blockquote { + margin: 1em 0; + padding-left: 1em; + border-left: 4px solid gray; +} + +.tsd-typography { + line-height: 1.333em; +} +.tsd-typography ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; +} +.tsd-typography h4, +.tsd-typography .tsd-index-panel h3, +.tsd-index-panel .tsd-typography h3, +.tsd-typography h5, +.tsd-typography h6 { + font-size: 1em; + margin: 0; +} +.tsd-typography h5, +.tsd-typography h6 { + font-weight: normal; +} +.tsd-typography p, +.tsd-typography ul, +.tsd-typography ol { + margin: 1em 0; +} + +.tsd-breadcrumb { + margin: 0; + padding: 0; + color: var(--color-text-aside); +} +.tsd-breadcrumb a { + color: var(--color-text-aside); + text-decoration: none; +} +.tsd-breadcrumb a:hover { + text-decoration: underline; +} +.tsd-breadcrumb li { + display: inline; +} +.tsd-breadcrumb li:after { + content: " / "; +} + +.tsd-comment-tags { + display: flex; + flex-direction: column; +} +dl.tsd-comment-tag-group { + display: flex; + align-items: center; + overflow: hidden; + margin: 0.5em 0; +} +dl.tsd-comment-tag-group dt { + display: flex; + margin-right: 0.5em; + font-size: 0.875em; + font-weight: normal; +} +dl.tsd-comment-tag-group dd { + margin: 0; +} +code.tsd-tag { + padding: 0.25em 0.4em; + border: 0.1em solid var(--color-accent); + margin-right: 0.25em; + font-size: 70%; +} +h1 code.tsd-tag:first-of-type { + margin-left: 0.25em; +} + +dl.tsd-comment-tag-group dd:before, +dl.tsd-comment-tag-group dd:after { + content: " "; +} +dl.tsd-comment-tag-group dd pre, +dl.tsd-comment-tag-group dd:after { + clear: both; +} +dl.tsd-comment-tag-group p { + margin: 0; +} + +.tsd-panel.tsd-comment .lead { + font-size: 1.1em; + line-height: 1.333em; + margin-bottom: 2em; +} +.tsd-panel.tsd-comment .lead:last-child { + margin-bottom: 0; +} + +.tsd-filter-visibility h4 { + font-size: 1rem; + padding-top: 0.75rem; + padding-bottom: 0.5rem; + margin: 0; +} +.tsd-filter-item:not(:last-child) { + margin-bottom: 0.5rem; +} +.tsd-filter-input { + display: flex; + width: fit-content; + width: -moz-fit-content; + align-items: center; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + cursor: pointer; +} +.tsd-filter-input input[type="checkbox"] { + cursor: pointer; + position: absolute; + width: 1.5em; + height: 1.5em; + opacity: 0; +} +.tsd-filter-input input[type="checkbox"]:disabled { + pointer-events: none; +} +.tsd-filter-input svg { + cursor: pointer; + width: 1.5em; + height: 1.5em; + margin-right: 0.5em; + border-radius: 0.33em; + /* Leaving this at full opacity breaks event listeners on Firefox. + Don't remove unless you know what you're doing. */ + opacity: 0.99; +} +.tsd-filter-input input[type="checkbox"]:focus + svg { + transform: scale(0.95); +} +.tsd-filter-input input[type="checkbox"]:focus:not(:focus-visible) + svg { + transform: scale(1); +} +.tsd-checkbox-background { + fill: var(--color-accent); +} +input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { + stroke: var(--color-text); +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { + fill: var(--color-background); + stroke: var(--color-accent); + stroke-width: 0.25rem; +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { + stroke: var(--color-accent); +} + +.tsd-theme-toggle { + padding-top: 0.75rem; +} +.tsd-theme-toggle > h4 { + display: inline; + vertical-align: middle; + margin-right: 0.75rem; +} + +.tsd-hierarchy { + list-style: square; + margin: 0; +} +.tsd-hierarchy .target { + font-weight: bold; +} + +.tsd-panel-group.tsd-index-group { + margin-bottom: 0; +} +.tsd-index-panel .tsd-index-list { + list-style: none; + line-height: 1.333em; + margin: 0; + padding: 0.25rem 0 0 0; + overflow: hidden; + display: grid; + grid-template-columns: repeat(3, 1fr); + column-gap: 1rem; + grid-template-rows: auto; +} +@media (max-width: 1024px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(2, 1fr); + } +} +@media (max-width: 768px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(1, 1fr); + } +} +.tsd-index-panel .tsd-index-list li { + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; +} + +.tsd-flag { + display: inline-block; + padding: 0.25em 0.4em; + border-radius: 4px; + color: var(--color-comment-tag-text); + background-color: var(--color-comment-tag); + text-indent: 0; + font-size: 75%; + line-height: 1; + font-weight: normal; +} + +.tsd-anchor { + position: relative; + top: -100px; +} + +.tsd-member { + position: relative; +} +.tsd-member .tsd-anchor + h3 { + display: flex; + align-items: center; + margin-top: 0; + margin-bottom: 0; + border-bottom: none; +} + +.tsd-navigation.settings { + margin: 1rem 0; +} +.tsd-navigation > a, +.tsd-navigation .tsd-accordion-summary { + width: calc(100% - 0.5rem); +} +.tsd-navigation a, +.tsd-navigation summary > span, +.tsd-page-navigation a { + display: inline-flex; + align-items: center; + padding: 0.25rem; + color: var(--color-text); + text-decoration: none; + box-sizing: border-box; +} +.tsd-navigation a.current, +.tsd-page-navigation a.current { + background: var(--color-active-menu-item); +} +.tsd-navigation a:hover, +.tsd-page-navigation a:hover { + text-decoration: underline; +} +.tsd-navigation ul, +.tsd-page-navigation ul { + margin-top: 0; + margin-bottom: 0; + padding: 0; + list-style: none; +} +.tsd-navigation li, +.tsd-page-navigation li { + padding: 0; + max-width: 100%; +} +.tsd-nested-navigation { + margin-left: 3rem; +} +.tsd-nested-navigation > li > details { + margin-left: -1.5rem; +} +.tsd-small-nested-navigation { + margin-left: 1.5rem; +} +.tsd-small-nested-navigation > li > details { + margin-left: -1.5rem; +} + +.tsd-nested-navigation > li > a, +.tsd-nested-navigation > li > span { + width: calc(100% - 1.75rem - 0.5rem); +} + +.tsd-page-navigation ul { + padding-left: 1.75rem; +} + +#tsd-sidebar-links a { + margin-top: 0; + margin-bottom: 0.5rem; + line-height: 1.25rem; +} +#tsd-sidebar-links a:last-of-type { + margin-bottom: 0; +} + +a.tsd-index-link { + padding: 0.25rem 0 !important; + font-size: 1rem; + line-height: 1.25rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} +.tsd-accordion-summary { + list-style-type: none; /* hide marker on non-safari */ + outline: none; /* broken on safari, so just hide it */ +} +.tsd-accordion-summary::-webkit-details-marker { + display: none; /* hide marker on safari */ +} +.tsd-accordion-summary, +.tsd-accordion-summary a { + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + + cursor: pointer; +} +.tsd-accordion-summary a { + width: calc(100% - 1.5rem); +} +.tsd-accordion-summary > * { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; +} +.tsd-index-accordion .tsd-accordion-summary > svg { + margin-left: 0.25rem; +} +.tsd-index-content > :not(:first-child) { + margin-top: 0.75rem; +} +.tsd-index-heading { + margin-top: 1.5rem; + margin-bottom: 0.75rem; +} + +.tsd-kind-icon { + margin-right: 0.5rem; + width: 1.25rem; + height: 1.25rem; + min-width: 1.25rem; + min-height: 1.25rem; +} +.tsd-kind-icon path { + transform-origin: center; + transform: scale(1.1); +} +.tsd-signature > .tsd-kind-icon { + margin-right: 0.8rem; +} + +.tsd-panel { + margin-bottom: 2.5rem; +} +.tsd-panel.tsd-member { + margin-bottom: 4rem; +} +.tsd-panel:empty { + display: none; +} +.tsd-panel > h1, +.tsd-panel > h2, +.tsd-panel > h3 { + margin: 1.5rem -1.5rem 0.75rem -1.5rem; + padding: 0 1.5rem 0.75rem 1.5rem; +} +.tsd-panel > h1.tsd-before-signature, +.tsd-panel > h2.tsd-before-signature, +.tsd-panel > h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: none; +} + +.tsd-panel-group { + margin: 4rem 0; +} +.tsd-panel-group.tsd-index-group { + margin: 2rem 0; +} +.tsd-panel-group.tsd-index-group details { + margin: 2rem 0; +} + +#tsd-search { + transition: background-color 0.2s; +} +#tsd-search .title { + position: relative; + z-index: 2; +} +#tsd-search .field { + position: absolute; + left: 0; + top: 0; + right: 2.5rem; + height: 100%; +} +#tsd-search .field input { + box-sizing: border-box; + position: relative; + top: -50px; + z-index: 1; + width: 100%; + padding: 0 10px; + opacity: 0; + outline: 0; + border: 0; + background: transparent; + color: var(--color-text); +} +#tsd-search .field label { + position: absolute; + overflow: hidden; + right: -40px; +} +#tsd-search .field input, +#tsd-search .title, +#tsd-toolbar-links a { + transition: opacity 0.2s; +} +#tsd-search .results { + position: absolute; + visibility: hidden; + top: 40px; + width: 100%; + margin: 0; + padding: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); +} +#tsd-search .results li { + padding: 0 10px; + background-color: var(--color-background); +} +#tsd-search .results li:nth-child(even) { + background-color: var(--color-background-secondary); +} +#tsd-search .results li.state { + display: none; +} +#tsd-search .results li.current, +#tsd-search .results li:hover { + background-color: var(--color-accent); +} +#tsd-search .results a { + display: block; +} +#tsd-search .results a:before { + top: 10px; +} +#tsd-search .results span.parent { + color: var(--color-text-aside); + font-weight: normal; +} +#tsd-search.has-focus { + background-color: var(--color-accent); +} +#tsd-search.has-focus .field input { + top: 0; + opacity: 1; +} +#tsd-search.has-focus .title, +#tsd-search.has-focus #tsd-toolbar-links a { + z-index: 0; + opacity: 0; +} +#tsd-search.has-focus .results { + visibility: visible; +} +#tsd-search.loading .results li.state.loading { + display: block; +} +#tsd-search.failure .results li.state.failure { + display: block; +} + +#tsd-toolbar-links { + position: absolute; + top: 0; + right: 2rem; + height: 100%; + display: flex; + align-items: center; + justify-content: flex-end; +} +#tsd-toolbar-links a { + margin-left: 1.5rem; +} +#tsd-toolbar-links a:hover { + text-decoration: underline; +} + +.tsd-signature { + margin: 0 0 1rem 0; + padding: 1rem 0.5rem; + border: 1px solid var(--color-accent); + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 14px; + overflow-x: auto; +} + +.tsd-signature-symbol { + color: var(--color-text-aside); + font-weight: normal; +} + +.tsd-signature-type { + font-style: italic; + font-weight: normal; +} + +.tsd-signatures { + padding: 0; + margin: 0 0 1em 0; + list-style-type: none; +} +.tsd-signatures .tsd-signature { + margin: 0; + border-color: var(--color-accent); + border-width: 1px 0; + transition: background-color 0.1s; +} +.tsd-description .tsd-signatures .tsd-signature { + border-width: 1px; +} + +ul.tsd-parameter-list, +ul.tsd-type-parameter-list { + list-style: square; + margin: 0; + padding-left: 20px; +} +ul.tsd-parameter-list > li.tsd-parameter-signature, +ul.tsd-type-parameter-list > li.tsd-parameter-signature { + list-style: none; + margin-left: -20px; +} +ul.tsd-parameter-list h5, +ul.tsd-type-parameter-list h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; +} +.tsd-sources { + margin-top: 1rem; + font-size: 0.875em; +} +.tsd-sources a { + color: var(--color-text-aside); + text-decoration: underline; +} +.tsd-sources ul { + list-style: none; + padding: 0; +} + +.tsd-page-toolbar { + position: sticky; + z-index: 1; + top: 0; + left: 0; + width: 100%; + color: var(--color-text); + background: var(--color-background-secondary); + border-bottom: 1px var(--color-accent) solid; + transition: transform 0.3s ease-in-out; +} +.tsd-page-toolbar a { + color: var(--color-text); + text-decoration: none; +} +.tsd-page-toolbar a.title { + font-weight: bold; +} +.tsd-page-toolbar a.title:hover { + text-decoration: underline; +} +.tsd-page-toolbar .tsd-toolbar-contents { + display: flex; + justify-content: space-between; + height: 2.5rem; + margin: 0 auto; +} +.tsd-page-toolbar .table-cell { + position: relative; + white-space: nowrap; + line-height: 40px; +} +.tsd-page-toolbar .table-cell:first-child { + width: 100%; +} +.tsd-page-toolbar .tsd-toolbar-icon { + box-sizing: border-box; + line-height: 0; + padding: 12px 0; +} + +.tsd-widget { + display: inline-block; + overflow: hidden; + opacity: 0.8; + height: 40px; + transition: opacity 0.1s, background-color 0.2s; + vertical-align: bottom; + cursor: pointer; +} +.tsd-widget:hover { + opacity: 0.9; +} +.tsd-widget.active { + opacity: 1; + background-color: var(--color-accent); +} +.tsd-widget.no-caption { + width: 40px; +} +.tsd-widget.no-caption:before { + margin: 0; +} + +.tsd-widget.options, +.tsd-widget.menu { + display: none; +} +input[type="checkbox"] + .tsd-widget:before { + background-position: -120px 0; +} +input[type="checkbox"]:checked + .tsd-widget:before { + background-position: -160px 0; +} + +img { + max-width: 100%; +} + +.tsd-anchor-icon { + display: inline-flex; + align-items: center; + margin-left: 0.5rem; + vertical-align: middle; + color: var(--color-text); +} + +.tsd-anchor-icon svg { + width: 1em; + height: 1em; + visibility: hidden; +} + +.tsd-anchor-link:hover > .tsd-anchor-icon svg { + visibility: visible; +} + +.deprecated { + text-decoration: line-through; +} + +.warning { + padding: 1rem; + color: var(--color-warning-text); + background: var(--color-background-warning); +} + +.tsd-kind-project { + color: var(--color-ts-project); +} +.tsd-kind-module { + color: var(--color-ts-module); +} +.tsd-kind-namespace { + color: var(--color-ts-namespace); +} +.tsd-kind-enum { + color: var(--color-ts-enum); +} +.tsd-kind-enum-member { + color: var(--color-ts-enum-member); +} +.tsd-kind-variable { + color: var(--color-ts-variable); +} +.tsd-kind-function { + color: var(--color-ts-function); +} +.tsd-kind-class { + color: var(--color-ts-class); +} +.tsd-kind-interface { + color: var(--color-ts-interface); +} +.tsd-kind-constructor { + color: var(--color-ts-constructor); +} +.tsd-kind-property { + color: var(--color-ts-property); +} +.tsd-kind-method { + color: var(--color-ts-method); +} +.tsd-kind-call-signature { + color: var(--color-ts-call-signature); +} +.tsd-kind-index-signature { + color: var(--color-ts-index-signature); +} +.tsd-kind-constructor-signature { + color: var(--color-ts-constructor-signature); +} +.tsd-kind-parameter { + color: var(--color-ts-parameter); +} +.tsd-kind-type-literal { + color: var(--color-ts-type-literal); +} +.tsd-kind-type-parameter { + color: var(--color-ts-type-parameter); +} +.tsd-kind-accessor { + color: var(--color-ts-accessor); +} +.tsd-kind-get-signature { + color: var(--color-ts-get-signature); +} +.tsd-kind-set-signature { + color: var(--color-ts-set-signature); +} +.tsd-kind-type-alias { + color: var(--color-ts-type-alias); +} + +/* if we have a kind icon, don't color the text by kind */ +.tsd-kind-icon ~ span { + color: var(--color-text); +} + +* { + scrollbar-width: thin; + scrollbar-color: var(--color-accent) var(--color-icon-background); +} + +*::-webkit-scrollbar { + width: 0.75rem; +} + +*::-webkit-scrollbar-track { + background: var(--color-icon-background); +} + +*::-webkit-scrollbar-thumb { + background-color: var(--color-accent); + border-radius: 999rem; + border: 0.25rem solid var(--color-icon-background); +} + +/* mobile */ +@media (max-width: 769px) { + .tsd-widget.options, + .tsd-widget.menu { + display: inline-block; + } + + .container-main { + display: flex; + } + html .col-content { + float: none; + max-width: 100%; + width: 100%; + } + html .col-sidebar { + position: fixed !important; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + padding: 1.5rem 1.5rem 0 0; + width: 75vw; + visibility: hidden; + background-color: var(--color-background); + transform: translate(100%, 0); + } + html .col-sidebar > *:last-child { + padding-bottom: 20px; + } + html .overlay { + content: ""; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; + } + + .to-has-menu .overlay { + animation: fade-in 0.4s; + } + + .to-has-menu .col-sidebar { + animation: pop-in-from-right 0.4s; + } + + .from-has-menu .overlay { + animation: fade-out 0.4s; + } + + .from-has-menu .col-sidebar { + animation: pop-out-to-right 0.4s; + } + + .has-menu body { + overflow: hidden; + } + .has-menu .overlay { + visibility: visible; + } + .has-menu .col-sidebar { + visibility: visible; + transform: translate(0, 0); + display: flex; + flex-direction: column; + gap: 1.5rem; + max-height: 100vh; + padding: 1rem 2rem; + } + .has-menu .tsd-navigation { + max-height: 100%; + } +} + +/* one sidebar */ +@media (min-width: 770px) { + .container-main { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + grid-template-areas: "sidebar content"; + margin: 2rem auto; + } + + .col-sidebar { + grid-area: sidebar; + } + .col-content { + grid-area: content; + padding: 0 1rem; + } +} +@media (min-width: 770px) and (max-width: 1399px) { + .col-sidebar { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + padding-top: 1rem; + } + .site-menu { + margin-top: 1rem; + } +} + +/* two sidebars */ +@media (min-width: 1200px) { + .container-main { + grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); + grid-template-areas: "sidebar content toc"; + } + + .col-sidebar { + display: contents; + } + + .page-menu { + grid-area: toc; + padding-left: 1rem; + } + .site-menu { + grid-area: sidebar; + } + + .site-menu { + margin-top: 1rem 0; + } + + .page-menu, + .site-menu { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + } +} diff --git a/packages/react-sdk/docs/classes/Ciphertext.html b/packages/react-sdk/docs/classes/Ciphertext.html new file mode 100644 index 00000000..853b6cc2 --- /dev/null +++ b/packages/react-sdk/docs/classes/Ciphertext.html @@ -0,0 +1,203 @@ +Ciphertext | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class Ciphertext

+
+

Hierarchy

+
    +
  • Ciphertext
+
+

Implements

+
    +
  • Ciphertext
+
+
+
+ +
+
+

Constructors

+
+
+

Properties

+
+
+

Methods

+
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      obj: Ciphertext
    +

    Returns Ciphertext

+
+

Properties

+
+ +
aes256GcmHkdfSha256: undefined | Ciphertext_Aes256gcmHkdfsha256
+
+

Methods

+
+ +
    + +
  • +

    Returns Uint8Array

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      bytes: Uint8Array
    +

    Returns Ciphertext

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/Client.html b/packages/react-sdk/docs/classes/Client.html new file mode 100644 index 00000000..204bbe00 --- /dev/null +++ b/packages/react-sdk/docs/classes/Client.html @@ -0,0 +1,652 @@ +Client | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class Client

+
+

Client class initiates connection to the XMTP network. +Should be created with await Client.create(options)

+
+
+
+

Hierarchy

+
    +
  • Client
+
+
+
+ +
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns Client

+
+

Properties

+
+ +
_backupClient: any
+
+ +
_codecs: any
+
+ +
_conversations: any
+
+ +
_maxContentSize: any
+
+ +
address: string
+
+ +
apiClient: ApiClient
+
+ +
contacts: Set<string>
+
+ +
ensureUserContactPublished: any
+
+ +
init: any
+
+ +
keystore: Keystore
+
+ +
knownPublicKeyBundles: any
+
+ +
publicKeyBundle: PublicKeyBundle
+
+ +
validateEnvelope: any
+
+ +
setupBackupClient: any
+
+

Accessors

+
+ +
    +
  • get backupType(): BackupType
  • +
  • +

    Returns BackupType

+
+ +
+
+ +
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      peerAddress: string
    +

    Returns Promise<boolean>

  • + +
  • +
    +

    Parameters

    +
      +
    • +
      peerAddress: string[]
    +

    Returns Promise<boolean[]>

+
+ +
    + +
  • +

    Returns Promise<void>

+
+ +
    + +
  • +

    Find a matching codec for a given ContentTypeId from the +client's codec registry

    +
    +
    +

    Parameters

    +
    +

    Returns undefined | ContentCodec<any>

    +
+
+ +
    + +
  • +

    Convert arbitrary content into a serialized EncodedContent instance +with the given options

    +
    +
    +

    Parameters

    +
    +

    Returns Promise<Uint8Array>

    +
+
+ +
    + +
  • +

    Used to force getUserContact fetch contact from the network.

    +
    +
    +

    Parameters

    +
      +
    • +
      peerAddress: string
    +

    Returns void

    +
+
+ +
    + +
  • +

    Returns the cached PublicKeyBundle if one is known for the given address or fetches +one from the network

    +

    This throws if either the address is invalid or the contact is not published. +See also [#canMessage].

    +
    +
    +

    Parameters

    +
      +
    • +
      peerAddress: string
    +

    Returns Promise<undefined | PublicKeyBundle | SignedPublicKeyBundle>

    +
+
+ +
+
+ +
    + +
  • +

    List stored messages from the specified topic.

    +

    A specified mapper function will be applied to each envelope. +If the mapper function throws an error during processing, the +envelope will be discarded.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      Out

    +
    +

    Parameters

    +
    +

    Returns Promise<Out[]>

    +
+
+ +
    + +
  • +

    List messages on a given set of content topics, yielding one page at a time

    +
    +
    +

    Type Parameters

    +
      +
    • +

      Out

    +
    +

    Parameters

    +
    +

    Returns AsyncGenerator<Out[], any, unknown>

    +
+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns Promise<Envelope[]>

+
+ +
    + +
  • +

    Low level method for publishing envelopes to the XMTP network with +no pre-processing or encryption applied.

    +

    Primarily used internally

    +
    +
    +

    Parameters

    +
      +
    • +
      envelopes: PublishParams[]
      +

      PublishParams[]

      +
      +
    +

    Returns Promise<void>

    +
+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      Optional legacy: boolean
    +

    Returns Promise<void>

+
+ +
    + +
  • +

    Register a codec to be automatically used for encoding/decoding +messages of the given Content Type

    +
    +
    +

    Parameters

    +
    +

    Returns void

    +
+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns Promise<boolean>

  • + +
  • +
    +

    Parameters

    +
    +

    Returns Promise<boolean[]>

+
+ +
    + +
  • +

    Create and start a client associated with given wallet.

    +
    +
    +

    Parameters

    +
    +

    Returns Promise<Client>

    +
+
+ +
    + +
  • +

    Export the XMTP PrivateKeyBundle from the SDK as a Uint8Array.

    +

    This bundle can then be provided as privateKeyOverride in a +subsequent call to Client.create(...)

    +

    Be very careful with these keys, as they can be used to +impersonate a user on the XMTP network and read the user's +messages.

    +
    +
    +

    Parameters

    +
    +

    Returns Promise<Uint8Array>

    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/CompositeCodec.html b/packages/react-sdk/docs/classes/CompositeCodec.html new file mode 100644 index 00000000..fca3f983 --- /dev/null +++ b/packages/react-sdk/docs/classes/CompositeCodec.html @@ -0,0 +1,229 @@ +CompositeCodec | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class CompositeCodec

+
+

Hierarchy

+
    +
  • CompositeCodec
+
+

Implements

+
+
+
+
+ +
+
+

Constructors

+
+
+

Properties

+
+
+

Accessors

+
+
+

Methods

+
+
+

Constructors

+
+ +
+
+

Properties

+
+ +
fromProto: any
+
+ +
toProto: any
+
+

Accessors

+
+ +
+
+

Methods

+
+ +
+
+ +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/ContentTypeId.html b/packages/react-sdk/docs/classes/ContentTypeId.html new file mode 100644 index 00000000..bbc8583a --- /dev/null +++ b/packages/react-sdk/docs/classes/ContentTypeId.html @@ -0,0 +1,234 @@ +ContentTypeId | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class ContentTypeId

+
+

Hierarchy

+
    +
  • ContentTypeId
+
+
+
+ +
+
+

Constructors

+
+
+

Properties

+
+
+

Methods

+
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      obj: ContentTypeId
    +

    Returns ContentTypeId

+
+

Properties

+
+ +
authorityId: string
+
+ +
typeId: string
+
+ +
versionMajor: number
+
+ +
versionMinor: number
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns boolean

+
+ +
    + +
  • +

    Returns string

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      contentTypeString: string
    +

    Returns ContentTypeId

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/Conversations.html b/packages/react-sdk/docs/classes/Conversations.html new file mode 100644 index 00000000..55a7aa8f --- /dev/null +++ b/packages/react-sdk/docs/classes/Conversations.html @@ -0,0 +1,335 @@ +Conversations | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class Conversations

+
+

Conversations allows you to view ongoing 1:1 messaging sessions with another wallet

+
+
+
+

Hierarchy

+
    +
  • Conversations
+
+
+
+ +
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns Conversations

+
+

Properties

+
+ +
client: any
+
+ +
conversationReferenceToV2: any
+
+ +
createV2Convo: any
+
+ +
decodeInvites: any
+
+ +
getIntroductionPeers: any
+
+ +
getPeerAddress: any
+
+ +
getV2ConversationsFromKeystore: any
+
+ +
listV1Conversations: any
+
+ +
listV2Conversations: any
+

List all V2 conversations

+
+
+
+ +
saveInviteResponseToConversation: any
+
+ +
v1Cache: any
+
+ +
v2Mutex: any
+
+

Methods

+
+ +
    + +
  • +

    List all conversations with the current wallet found in the network.

    +
    +

    Returns Promise<Conversation[]>

    +
+
+ +
    + +
  • +

    Creates a new conversation for the given address. Will throw an error if the peer is not found in the XMTP network

    +
    +
    +

    Parameters

    +
    +

    Returns Promise<Conversation>

    +
+
+ +
    + +
  • +

    Returns a stream of any newly created conversations. +Will dedupe to not return the same conversation twice in the same stream. +Does not dedupe any other previously seen conversations

    +
    +

    Returns Promise<Stream<Conversation>>

    +
+
+ +
    + +
  • +

    Streams messages from all conversations.

    +

    When a new conversation is initiated with the client's address, this function will automatically register it and add it to the list of conversations to watch. +Callers should be aware the first messages in a newly created conversation are picked up on a best effort basis and there are other potential race conditions which may cause some newly created conversations to be missed.

    +
    +

    Returns Promise<AsyncGenerator<DecodedMessage, any, unknown>>

    +
+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      Optional startTime: Date
    +

    Returns Promise<ConversationV2[]>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/DecodedMessage.html b/packages/react-sdk/docs/classes/DecodedMessage.html new file mode 100644 index 00000000..03f6970c --- /dev/null +++ b/packages/react-sdk/docs/classes/DecodedMessage.html @@ -0,0 +1,326 @@ +DecodedMessage | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class DecodedMessage

+
+

Hierarchy

+
    +
  • DecodedMessage
+
+
+
+ +
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns DecodedMessage

+
+

Properties

+
+ +
content: any
+
+ +
contentBytes: Uint8Array
+
+ +
contentTopic: string
+
+ +
contentType: ContentTypeId
+
+ +
conversation: Conversation
+
+ +
error?: Error
+
+ +
id: string
+
+ +
messageVersion: "v1" | "v2"
+
+ +
recipientAddress?: string
+
+ +
senderAddress: string
+
+ +
sent: Date
+
+

Methods

+
+ +
    + +
  • +

    Returns Uint8Array

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      data: Uint8Array
    • +
    • +
      client: Client
    +

    Returns Promise<DecodedMessage>

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      message: MessageV1
    • +
    • +
      content: any
    • +
    • +
      contentType: ContentTypeId
    • +
    • +
      contentBytes: Uint8Array
    • +
    • +
      contentTopic: string
    • +
    • +
      conversation: Conversation
    • +
    • +
      Optional error: Error
    +

    Returns DecodedMessage

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      message: MessageV2
    • +
    • +
      content: any
    • +
    • +
      contentType: ContentTypeId
    • +
    • +
      contentTopic: string
    • +
    • +
      contentBytes: Uint8Array
    • +
    • +
      conversation: Conversation
    • +
    • +
      senderAddress: string
    • +
    • +
      Optional error: Error
    +

    Returns DecodedMessage

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/EncryptedPersistence.html b/packages/react-sdk/docs/classes/EncryptedPersistence.html new file mode 100644 index 00000000..f1ac35c2 --- /dev/null +++ b/packages/react-sdk/docs/classes/EncryptedPersistence.html @@ -0,0 +1,268 @@ +EncryptedPersistence | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class EncryptedPersistence

+
+

EncryptedPersistence is a Persistence implementation that uses ECIES to encrypt all values +ECIES encryption protects against unauthorized reads, but not unauthorized writes. +A third party with access to the underlying store could write malicious data using the public key of the owner

+
+
+
+

Hierarchy

+
    +
  • EncryptedPersistence
+
+

Implements

+
+
+
+
+ +
+
+

Constructors

+
+ +
+
+

Properties

+
+ +
decrypt: any
+
+ +
deserializeEcies: any
+
+ +
encrypt: any
+
+ +
persistence: any
+
+ +
privateKey: any
+
+ +
privateKeyBytes: any
+
+ +
publicKey: any
+
+ +
serializeEcies: any
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      key: string
    +

    Returns Promise<null | Uint8Array>

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      key: string
    • +
    • +
      value: Uint8Array
    +

    Returns Promise<void>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/InMemoryKeystore.html b/packages/react-sdk/docs/classes/InMemoryKeystore.html new file mode 100644 index 00000000..5c757025 --- /dev/null +++ b/packages/react-sdk/docs/classes/InMemoryKeystore.html @@ -0,0 +1,453 @@ +InMemoryKeystore | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class InMemoryKeystore

+
+

A Keystore is responsible for holding the user's XMTP private keys and using them to encrypt/decrypt/sign messages. +Keystores are instantiated using a KeystoreProvider

+
+
+
+

Hierarchy

+
    +
  • InMemoryKeystore
+
+

Implements

+
+
+
+
+ +
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      keys: PrivateKeyBundleV1
    • +
    • +
      inviteStore: InviteStore
    +

    Returns InMemoryKeystore

+
+

Properties

+
+ +
accountAddress: any
+
+ +
authenticator: any
+
+ +
inviteStore: any
+
+ +
v1Keys: any
+
+ +
v2Keys: any
+
+

Methods

+
+ +
    + +
  • +

    Create an XMTP auth token to be used as a header on XMTP API requests

    +
    +
    +

    Parameters

    +
      +
    • +
      __namedParameters: CreateAuthTokenRequest
    +

    Returns Promise<Token>

    +
+
+ +
    + +
  • +

    Create a sealed/encrypted invite and store the Topic keys in the Keystore for later use. +The returned invite payload must be sent to the network for the other party to be able to communicate.

    +
    +
    +

    Parameters

    +
      +
    • +
      req: CreateInviteRequest
    +

    Returns Promise<CreateInviteResponse>

    +
+
+ +
    + +
  • +

    Decrypt a batch of V1 messages

    +
    +
    +

    Parameters

    +
      +
    • +
      req: DecryptV1Request
    +

    Returns Promise<DecryptResponse>

    +
+
+ +
    + +
  • +

    Decrypt a batch of V2 messages

    +
    +
    +

    Parameters

    +
      +
    • +
      req: DecryptV2Request
    +

    Returns Promise<DecryptResponse>

    +
+
+ +
    + +
  • +

    Encrypt a batch of V1 messages

    +
    +
    +

    Parameters

    +
      +
    • +
      req: EncryptV1Request
    +

    Returns Promise<EncryptResponse>

    +
+
+ +
    + +
  • +

    Encrypt a batch of V2 messages

    +
    +
    +

    Parameters

    +
      +
    • +
      req: EncryptV2Request
    +

    Returns Promise<EncryptResponse>

    +
+
+ +
    + +
  • +

    Get the account address of the wallet used to create the Keystore

    +
    +

    Returns Promise<string>

    +
+
+ +
    + +
  • +

    Export the private keys. May throw an error if the keystore implementation does not allow this operation

    +
    +

    Returns Promise<PrivateKeyBundleV1>

    +
+
+ +
+
+ +
    + +
  • +

    Get a list of V2 conversations

    +
    +

    Returns Promise<ConversationReference[]>

    +
+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      topic: string
    +

    Returns undefined | WithoutUndefined<TopicMap_TopicData>

+
+ +
    + +
  • +

    Take a batch of invite messages and store the TopicKeys for later use in decrypting messages

    +
    +
    +

    Parameters

    +
      +
    • +
      req: SaveInvitesRequest
    +

    Returns Promise<SaveInvitesResponse>

    +
+
+ +
    + +
  • +

    Sign the provided digest with either the IdentityKey or a specified PreKey

    +
    +
    +

    Parameters

    +
      +
    • +
      req: SignDigestRequest
    +

    Returns Promise<Signature>

    +
+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      keys: PrivateKeyBundleV1
    • +
    • +
      Optional persistence: Persistence
    +

    Returns Promise<InMemoryKeystore>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/KeyGeneratorKeystoreProvider.html b/packages/react-sdk/docs/classes/KeyGeneratorKeystoreProvider.html new file mode 100644 index 00000000..cef81c1f --- /dev/null +++ b/packages/react-sdk/docs/classes/KeyGeneratorKeystoreProvider.html @@ -0,0 +1,184 @@ +KeyGeneratorKeystoreProvider | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class KeyGeneratorKeystoreProvider

+
+

KeyGeneratorKeystoreProvider will create a new XMTP PrivateKeyBundle and persist it to the network +This provider should always be specified last in the list of keystoreProviders on client creation, +as it will overwrite any XMTP identities already on the network

+
+
+
+

Hierarchy

+
    +
  • KeyGeneratorKeystoreProvider
+
+

Implements

+
+
+
+
+ +
+
+

Constructors

+
+
+

Methods

+
+
+

Constructors

+
+ +
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      opts: KeystoreProviderOptions
    • +
    • +
      apiClient: ApiClient
    • +
    • +
      Optional wallet: Signer
    +

    Returns Promise<Keystore>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/LocalStoragePersistence.html b/packages/react-sdk/docs/classes/LocalStoragePersistence.html new file mode 100644 index 00000000..56ae107b --- /dev/null +++ b/packages/react-sdk/docs/classes/LocalStoragePersistence.html @@ -0,0 +1,206 @@ +LocalStoragePersistence | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class LocalStoragePersistence

+
+

Hierarchy

+
    +
  • LocalStoragePersistence
+
+

Implements

+
+
+
+
+ +
+
+

Constructors

+
+
+

Properties

+
+
+

Methods

+
+
+

Constructors

+
+ +
+
+

Properties

+
+ +
storage: Storage
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      key: string
    +

    Returns Promise<null | Uint8Array>

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      key: string
    • +
    • +
      value: Uint8Array
    +

    Returns Promise<void>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/MessageV1.html b/packages/react-sdk/docs/classes/MessageV1.html new file mode 100644 index 00000000..7eaa6215 --- /dev/null +++ b/packages/react-sdk/docs/classes/MessageV1.html @@ -0,0 +1,359 @@ +MessageV1 | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class MessageV1

+
+

Hierarchy

+
    +
  • MessageBase +
      +
    • MessageV1
+
+

Implements

+
    +
  • MessageV1
+
+
+
+ +
+
+

Constructors

+
+
+

Properties

+
+
+

Accessors

+
+
+

Methods

+
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      id: string
    • +
    • +
      bytes: Uint8Array
    • +
    • +
      obj: Message
    • +
    • +
      header: MessageHeaderV1
    • +
    • +
      senderAddress: undefined | string
    +

    Returns MessageV1

+
+

Properties

+
+ +
ciphertext: Ciphertext
+
+ +
contentType?: ContentTypeId
+
+ +
conversation: undefined
+
+ +
error?: Error
+
+ +
header: MessageHeaderV1
+
+ +
headerBytes: Uint8Array
+
+ +
id: string
+

Identifier that is deterministically derived from the bytes of the message +header and ciphertext, where all those bytes are authenticated. This can +be used in determining uniqueness of messages.

+
+
+
+ +
senderAddress: undefined | string
+
+

Accessors

+
+ +
    +
  • get recipientAddress(): undefined | string
  • +
  • +

    Returns undefined | string

+
+ +
    +
  • get sent(): Date
  • +
  • +

    Returns Date

+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns Promise<Uint8Array>

+
+ +
    + +
  • +

    Returns Uint8Array

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      obj: Message
    • +
    • +
      header: MessageHeaderV1
    • +
    • +
      bytes: Uint8Array
    +

    Returns Promise<MessageV1>

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns Promise<MessageV1>

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      bytes: Uint8Array
    +

    Returns Promise<MessageV1>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/MessageV2.html b/packages/react-sdk/docs/classes/MessageV2.html new file mode 100644 index 00000000..ea4aa32c --- /dev/null +++ b/packages/react-sdk/docs/classes/MessageV2.html @@ -0,0 +1,285 @@ +MessageV2 | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class MessageV2

+
+

Hierarchy

+
    +
  • MessageBase +
      +
    • MessageV2
+
+

Implements

+
    +
  • MessageV2
+
+
+
+ +
+
+

Constructors

+
+
+

Properties

+
+
+

Accessors

+
+
+

Methods

+
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      id: string
    • +
    • +
      bytes: Uint8Array
    • +
    • +
      obj: Message
    • +
    • +
      header: MessageHeaderV2
    +

    Returns MessageV2

+
+

Properties

+
+ +
ciphertext: Ciphertext
+
+ +
contentType?: ContentTypeId
+
+ +
error?: Error
+
+ +
header: any
+
+ +
headerBytes: Uint8Array
+
+ +
id: string
+

Identifier that is deterministically derived from the bytes of the message +header and ciphertext, where all those bytes are authenticated. This can +be used in determining uniqueness of messages.

+
+
+
+ +
senderAddress: undefined | string
+
+

Accessors

+
+ +
    +
  • get sent(): Date
  • +
  • +

    Returns Date

+
+

Methods

+
+ +
    + +
  • +

    Returns Uint8Array

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      obj: Message
    • +
    • +
      header: MessageHeaderV2
    • +
    • +
      bytes: Uint8Array
    +

    Returns Promise<MessageV2>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/NetworkKeystoreProvider.html b/packages/react-sdk/docs/classes/NetworkKeystoreProvider.html new file mode 100644 index 00000000..d31e1111 --- /dev/null +++ b/packages/react-sdk/docs/classes/NetworkKeystoreProvider.html @@ -0,0 +1,184 @@ +NetworkKeystoreProvider | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class NetworkKeystoreProvider

+
+

NetworkKeystoreProvider will look on the XMTP network for an EncryptedPrivateKeyBundle +on the user's private storage topic. If found, will decrypt the bundle using a wallet +signature and instantiate a Keystore instance using the decrypted value.

+
+
+
+

Hierarchy

+
    +
  • NetworkKeystoreProvider
+
+

Implements

+
+
+
+
+ +
+
+

Constructors

+
+
+

Methods

+
+
+

Constructors

+
+ +
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      opts: KeystoreProviderOptions
    • +
    • +
      apiClient: ApiClient
    • +
    • +
      Optional wallet: Signer
    +

    Returns Promise<Keystore>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/PrefixedPersistence.html b/packages/react-sdk/docs/classes/PrefixedPersistence.html new file mode 100644 index 00000000..26af8e97 --- /dev/null +++ b/packages/react-sdk/docs/classes/PrefixedPersistence.html @@ -0,0 +1,221 @@ +PrefixedPersistence | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class PrefixedPersistence

+
+

Hierarchy

+
    +
  • PrefixedPersistence
+
+
+
+ +
+
+

Constructors

+
+
+

Properties

+
+
+

Methods

+
+
+

Constructors

+
+ +
+
+

Properties

+
+ +
buildKey: any
+
+ +
persistence: Persistence
+
+ +
prefix: string
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      key: string
    +

    Returns Promise<null | Uint8Array>

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      key: string
    • +
    • +
      value: Uint8Array
    +

    Returns Promise<void>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/PrivateKey.html b/packages/react-sdk/docs/classes/PrivateKey.html new file mode 100644 index 00000000..38cea32b --- /dev/null +++ b/packages/react-sdk/docs/classes/PrivateKey.html @@ -0,0 +1,337 @@ +PrivateKey | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class PrivateKey

+
+

Hierarchy

+
    +
  • PrivateKey
+
+

Implements

+
    +
  • PrivateKey
+
+
+
+ +
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      obj: PrivateKey
    +

    Returns PrivateKey

+
+

Properties

+
+ +
publicKey: PublicKey
+
+ +
secp256k1: secp256k1
+
+ +
timestamp: Long
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns Promise<Uint8Array>

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      plain: Uint8Array
    • +
    • +
      peer: PublicKey
    • +
    • +
      Optional additionalData: Uint8Array
    +

    Returns Promise<Ciphertext>

+
+ +
    + +
  • +

    Returns undefined | Date

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns boolean

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns Uint8Array

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      digest: Uint8Array
    +

    Returns Promise<Signature>

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns Promise<PublicKey>

+
+ +
    + +
  • +

    Returns Uint8Array

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      bytes: Uint8Array
    +

    Returns PrivateKey

+
+ +
    + +
  • +

    Returns PrivateKey

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/PublicKey.html b/packages/react-sdk/docs/classes/PublicKey.html new file mode 100644 index 00000000..6843ad92 --- /dev/null +++ b/packages/react-sdk/docs/classes/PublicKey.html @@ -0,0 +1,360 @@ +PublicKey | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class PublicKey

+
+

Hierarchy

+
    +
  • UnsignedPublicKey +
      +
    • PublicKey
+
+

Implements

+
    +
  • PublicKey
+
+
+
+ +
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      obj: PublicKey
    +

    Returns PublicKey

+
+

Properties

+
+ +
createdNs: Long
+
+ +
secp256k1Uncompressed: secp256k1Uncompressed
+
+ +
signature?: Signature
+
+

Accessors

+
+ +
    +
  • get timestamp(): Long
  • +
  • +

    Returns Long

+
+

Methods

+
+ +
    + +
  • +

    Returns Uint8Array

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns boolean

+
+ +
    + +
  • +

    Returns undefined | Date

+
+ +
    + +
  • +

    Returns string

+
+ +
    + +
  • +

    Returns boolean

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns Promise<void>

+
+ +
    + +
  • +

    Returns Uint8Array

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      signature: Signature
    • +
    • +
      digest: Uint8Array
    +

    Returns boolean

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns Promise<boolean>

+
+ +
    + +
  • +

    Returns string

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      bytes: Uint8Array
    +

    Returns PublicKey

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/PublicKeyBundle.html b/packages/react-sdk/docs/classes/PublicKeyBundle.html new file mode 100644 index 00000000..a10985aa --- /dev/null +++ b/packages/react-sdk/docs/classes/PublicKeyBundle.html @@ -0,0 +1,236 @@ +PublicKeyBundle | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class PublicKeyBundle

+
+

Hierarchy

+
    +
  • PublicKeyBundle
+
+

Implements

+
    +
  • PublicKeyBundle
+
+
+
+ +
+
+

Constructors

+
+
+

Properties

+
+
+

Methods

+
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      bundle: PublicKeyBundle
    +

    Returns PublicKeyBundle

+
+

Properties

+
+ +
identityKey: PublicKey
+
+ +
preKey: PublicKey
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns boolean

+
+ +
    + +
  • +

    Returns Uint8Array

+
+ +
    + +
  • +

    Returns string

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      bytes: Uint8Array
    +

    Returns PublicKeyBundle

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/SealedInvitation.html b/packages/react-sdk/docs/classes/SealedInvitation.html new file mode 100644 index 00000000..3cd66f12 --- /dev/null +++ b/packages/react-sdk/docs/classes/SealedInvitation.html @@ -0,0 +1,250 @@ +SealedInvitation | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class SealedInvitation

+
+

Wrapper class for SealedInvitationV1 and any future iterations of SealedInvitation

+
+
+
+

Hierarchy

+
    +
  • SealedInvitation
+
+

Implements

+
    +
  • SealedInvitation
+
+
+
+ +
+
+

Constructors

+
+
+

Properties

+
v1 +
+
+

Methods

+
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      __namedParameters: SealedInvitation
    +

    Returns SealedInvitation

+
+

Properties

+
+ +
v1: undefined | SealedInvitationV1
+
+

Methods

+
+ +
    + +
  • +

    Returns Uint8Array

+
+ +
    + +
  • +

    Create a SealedInvitation with a SealedInvitationV1 payload +Will encrypt all contents and validate inputs

    +
    +
    +

    Parameters

    +
      +
    • +
      __namedParameters: {
          created: Date;
          invitation: InvitationV1;
          recipient: SignedPublicKeyBundle;
          sender: PrivateKeyBundleV2;
      }
      +
        +
      • +
        created: Date
      • +
      • +
        invitation: InvitationV1
      • +
      • +
        recipient: SignedPublicKeyBundle
      • +
      • +
        sender: PrivateKeyBundleV2
    +

    Returns Promise<SealedInvitation>

    +
+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      bytes: Uint8Array
    +

    Returns SealedInvitation

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      env: Envelope
    +

    Returns Promise<SealedInvitation>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/Signature.html b/packages/react-sdk/docs/classes/Signature.html new file mode 100644 index 00000000..5177d976 --- /dev/null +++ b/packages/react-sdk/docs/classes/Signature.html @@ -0,0 +1,256 @@ +Signature | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class Signature

+
+

Hierarchy

+
    +
  • Signature
+
+

Implements

+
    +
  • Signature
+
+
+
+ +
+
+

Constructors

+
+
+

Properties

+
+
+

Methods

+
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      obj: Partial<Signature>
    +

    Returns Signature

+
+

Properties

+
+ +
ecdsaCompact: undefined | ECDSACompactWithRecovery
+
+ +
walletEcdsaCompact: undefined | ECDSACompactWithRecovery
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns boolean

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      digest: Uint8Array
    +

    Returns undefined | PublicKey

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns Promise<undefined | UnsignedPublicKey>

+
+ +
    + +
  • +

    Returns Uint8Array

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      bytes: Uint8Array
    +

    Returns Signature

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/SignedPublicKey.html b/packages/react-sdk/docs/classes/SignedPublicKey.html new file mode 100644 index 00000000..792c07bd --- /dev/null +++ b/packages/react-sdk/docs/classes/SignedPublicKey.html @@ -0,0 +1,398 @@ +SignedPublicKey | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class SignedPublicKey

+
+

Hierarchy

+
    +
  • UnsignedPublicKey +
      +
    • SignedPublicKey
+
+

Implements

+
    +
  • SignedPublicKey
+
+
+
+ +
+
+

Constructors

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      obj: SignedPublicKey
    +

    Returns SignedPublicKey

+
+

Properties

+
+ +
createdNs: Long
+
+ +
keyBytes: Uint8Array
+
+ +
secp256k1Uncompressed: secp256k1Uncompressed
+
+ +
signature: Signature
+
+

Accessors

+
+ +
    +
  • get timestamp(): Long
  • +
  • +

    Returns Long

+
+ +
    +
  • get unsignedKey(): UnsignedPublicKey
  • +
  • +

    Returns UnsignedPublicKey

+
+

Methods

+
+ +
    + +
  • +

    Returns Uint8Array

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns boolean

+
+ +
    + +
  • +

    Returns undefined | Date

+
+ +
    + +
  • +

    Returns string

+
+ +
    + +
  • +

    Returns boolean

+
+ +
    + +
  • +

    Returns Promise<undefined | UnsignedPublicKey>

+
+ +
    + +
  • +

    Returns Uint8Array

+
+ +
    + +
  • +

    Returns PublicKey

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      signature: Signature
    • +
    • +
      digest: Uint8Array
    +

    Returns boolean

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns Promise<boolean>

+
+ +
    + +
  • +

    Returns Promise<string>

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      bytes: Uint8Array
    +

    Returns SignedPublicKey

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      legacyKey: PublicKey
    • +
    • +
      Optional signedByWallet: boolean
    +

    Returns SignedPublicKey

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/SignedPublicKeyBundle.html b/packages/react-sdk/docs/classes/SignedPublicKeyBundle.html new file mode 100644 index 00000000..47954147 --- /dev/null +++ b/packages/react-sdk/docs/classes/SignedPublicKeyBundle.html @@ -0,0 +1,271 @@ +SignedPublicKeyBundle | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class SignedPublicKeyBundle

+
+

Hierarchy

+
    +
  • SignedPublicKeyBundle
+
+

Implements

+
    +
  • SignedPublicKeyBundle
+
+
+
+ +
+
+

Constructors

+
+ +
+
+

Properties

+
+ +
identityKey: SignedPublicKey
+
+ +
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns boolean

+
+ +
    + +
  • +

    Returns boolean

+
+ +
    + +
  • +

    Returns Uint8Array

+
+ +
+
+ +
    + +
  • +

    Returns Promise<string>

+
+ +
+
+ +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/StaticKeystoreProvider.html b/packages/react-sdk/docs/classes/StaticKeystoreProvider.html new file mode 100644 index 00000000..11b2647b --- /dev/null +++ b/packages/react-sdk/docs/classes/StaticKeystoreProvider.html @@ -0,0 +1,181 @@ +StaticKeystoreProvider | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class StaticKeystoreProvider

+
+

StaticKeystoreProvider will look for a privateKeyOverride in the provided options, +and bootstrap a Keystore using those options if provided.

+

If no privateKeyOverride is supplied will throw a KeystoreProviderUnavailableError causing +the client to continue iterating through the KeystoreProviders list.

+
+
+
+

Hierarchy

+
    +
  • StaticKeystoreProvider
+
+

Implements

+
+
+
+
+ +
+
+

Constructors

+
+
+

Methods

+
+
+

Constructors

+
+ +
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      opts: KeystoreProviderOptions
    +

    Returns Promise<Keystore>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/Stream.html b/packages/react-sdk/docs/classes/Stream.html new file mode 100644 index 00000000..13085321 --- /dev/null +++ b/packages/react-sdk/docs/classes/Stream.html @@ -0,0 +1,332 @@ +Stream | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class Stream<T>

+
+

Stream implements an Asynchronous Iterable over messages received from a topic. +As such can be used with constructs like for-await-of, yield*, array destructing, etc.

+
+
+
+

Type Parameters

+
    +
  • +

    T

+
+

Hierarchy

+
    +
  • Stream
+
+
+
+ +
+
+

Constructors

+
+ +
    + +
  • +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      client: Client
    • +
    • +
      topics: string[]
    • +
    • +
      decoder: MessageDecoder<T>
    • +
    • +
      Optional contentTopicUpdater: ContentTopicUpdater<T>
    +

    Returns Stream<T>

+
+

Properties

+
+ +
callback: undefined | ((env) => Promise<void>)
+
+

Type declaration

+
    +
  • +
      +
    • (env): Promise<void>
    • +
    • +
      +

      Parameters

      +
        +
      • +
        env: Envelope
      +

      Returns Promise<void>

+
+ +
client: Client
+
+ +
messages: T[]
+
+ +
newMessageCallback: any
+
+ +
resolvers: ((value) => void)[]
+
+

Type declaration

+
    +
  • +
      +
    • (value): void
    • +
    • +
      +

      Parameters

      +
        +
      • +
        value: IteratorResult<T, any>
      +

      Returns void

+
+ +
resubscribeToTopics: any
+
+ +
start: any
+
+ +
topics: string[]
+
+ +
unsubscribeFn?: UnsubscribeFn
+
+

Methods

+
+ +
    + +
  • +

    Returns AsyncIterableIterator<T>

+
+ +
    + +
  • +

    Returns Promise<IteratorResult<T, any>>

+
+ +
    + +
  • +

    Returns Promise<IteratorResult<T, any>>

+
+ +
    + +
  • +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      client: Client
    • +
    • +
      topics: string[]
    • +
    • +
      decoder: MessageDecoder<T>
    • +
    • +
      Optional contentTopicUpdater: ContentTopicUpdater<T>
    +

    Returns Promise<Stream<T>>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/TextCodec.html b/packages/react-sdk/docs/classes/TextCodec.html new file mode 100644 index 00000000..438d36dd --- /dev/null +++ b/packages/react-sdk/docs/classes/TextCodec.html @@ -0,0 +1,206 @@ +TextCodec | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class TextCodec

+
+

Hierarchy

+
    +
  • TextCodec
+
+

Implements

+
+
+
+
+ +
+
+

Constructors

+
+
+

Accessors

+
+
+

Methods

+
+
+

Constructors

+
+ +
+
+

Accessors

+
+ +
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns string

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      content: string
    +

    Returns EncodedContent<Record<string, string>>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/classes/TypingNotificationCodec.html b/packages/react-sdk/docs/classes/TypingNotificationCodec.html new file mode 100644 index 00000000..5da97c15 --- /dev/null +++ b/packages/react-sdk/docs/classes/TypingNotificationCodec.html @@ -0,0 +1,206 @@ +TypingNotificationCodec | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Class TypingNotificationCodec

+
+

Hierarchy

+
    +
  • TypingNotificationCodec
+
+

Implements

+
+
+
+
+ +
+
+

Constructors

+
+
+

Accessors

+
+
+

Methods

+
+
+

Constructors

+
+ +
+
+

Accessors

+
+ +
+
+

Methods

+
+ +
+
+ +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/XMTPProvider.html b/packages/react-sdk/docs/functions/XMTPProvider.html new file mode 100644 index 00000000..cd408411 --- /dev/null +++ b/packages/react-sdk/docs/functions/XMTPProvider.html @@ -0,0 +1,138 @@ +XMTPProvider | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function XMTPProvider

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      props: {
          children?: ReactNode;
      }
      +
        +
      • +
        Optional children?: ReactNode
    • +
    • +
      Optional context: any
    +

    Returns ReactNode

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/buildContentTopic.html b/packages/react-sdk/docs/functions/buildContentTopic.html new file mode 100644 index 00000000..33794ae7 --- /dev/null +++ b/packages/react-sdk/docs/functions/buildContentTopic.html @@ -0,0 +1,133 @@ +buildContentTopic | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function buildContentTopic

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      name: string
    +

    Returns string

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/buildDirectMessageTopic.html b/packages/react-sdk/docs/functions/buildDirectMessageTopic.html new file mode 100644 index 00000000..6090e5c1 --- /dev/null +++ b/packages/react-sdk/docs/functions/buildDirectMessageTopic.html @@ -0,0 +1,135 @@ +buildDirectMessageTopic | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function buildDirectMessageTopic

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      sender: string
    • +
    • +
      recipient: string
    +

    Returns string

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/buildDirectMessageTopicV2.html b/packages/react-sdk/docs/functions/buildDirectMessageTopicV2.html new file mode 100644 index 00000000..a10a5712 --- /dev/null +++ b/packages/react-sdk/docs/functions/buildDirectMessageTopicV2.html @@ -0,0 +1,133 @@ +buildDirectMessageTopicV2 | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function buildDirectMessageTopicV2

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      randomString: string
    +

    Returns string

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/buildUserContactTopic.html b/packages/react-sdk/docs/functions/buildUserContactTopic.html new file mode 100644 index 00000000..b7183dbb --- /dev/null +++ b/packages/react-sdk/docs/functions/buildUserContactTopic.html @@ -0,0 +1,133 @@ +buildUserContactTopic | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function buildUserContactTopic

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      walletAddr: string
    +

    Returns string

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/buildUserIntroTopic.html b/packages/react-sdk/docs/functions/buildUserIntroTopic.html new file mode 100644 index 00000000..2e0264eb --- /dev/null +++ b/packages/react-sdk/docs/functions/buildUserIntroTopic.html @@ -0,0 +1,133 @@ +buildUserIntroTopic | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function buildUserIntroTopic

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      walletAddr: string
    +

    Returns string

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/buildUserInviteTopic.html b/packages/react-sdk/docs/functions/buildUserInviteTopic.html new file mode 100644 index 00000000..5c850a61 --- /dev/null +++ b/packages/react-sdk/docs/functions/buildUserInviteTopic.html @@ -0,0 +1,133 @@ +buildUserInviteTopic | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function buildUserInviteTopic

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      walletAddr: string
    +

    Returns string

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/buildUserPrivateStoreTopic.html b/packages/react-sdk/docs/functions/buildUserPrivateStoreTopic.html new file mode 100644 index 00000000..d29795cc --- /dev/null +++ b/packages/react-sdk/docs/functions/buildUserPrivateStoreTopic.html @@ -0,0 +1,133 @@ +buildUserPrivateStoreTopic | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function buildUserPrivateStoreTopic

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      addrPrefixedKey: string
    +

    Returns string

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/dateToNs.html b/packages/react-sdk/docs/functions/dateToNs.html new file mode 100644 index 00000000..5a368a37 --- /dev/null +++ b/packages/react-sdk/docs/functions/dateToNs.html @@ -0,0 +1,133 @@ +dateToNs | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function dateToNs

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      date: Date
    +

    Returns Long

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/decodeContactBundle.html b/packages/react-sdk/docs/functions/decodeContactBundle.html new file mode 100644 index 00000000..0b24f003 --- /dev/null +++ b/packages/react-sdk/docs/functions/decodeContactBundle.html @@ -0,0 +1,133 @@ +decodeContactBundle | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function decodeContactBundle

+
+
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/decodeContent.html b/packages/react-sdk/docs/functions/decodeContent.html new file mode 100644 index 00000000..c257afe3 --- /dev/null +++ b/packages/react-sdk/docs/functions/decodeContent.html @@ -0,0 +1,135 @@ +decodeContent | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function decodeContent

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      contentBytes: Uint8Array
    • +
    • +
      client: Client
    +

    Returns Promise<{
        content: any;
        contentType: ContentTypeId;
        error: Error | undefined;
    }>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/decrypt.html b/packages/react-sdk/docs/functions/decrypt.html new file mode 100644 index 00000000..53719404 --- /dev/null +++ b/packages/react-sdk/docs/functions/decrypt.html @@ -0,0 +1,137 @@ +decrypt | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function decrypt

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      encrypted: Ciphertext | Ciphertext
    • +
    • +
      secret: Uint8Array
    • +
    • +
      Optional additionalData: Uint8Array
    +

    Returns Promise<Uint8Array>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/encrypt.html b/packages/react-sdk/docs/functions/encrypt.html new file mode 100644 index 00000000..cbe9c0ee --- /dev/null +++ b/packages/react-sdk/docs/functions/encrypt.html @@ -0,0 +1,137 @@ +encrypt | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function encrypt

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      plain: Uint8Array
    • +
    • +
      secret: Uint8Array
    • +
    • +
      Optional additionalData: Uint8Array
    +

    Returns Promise<Ciphertext>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/fromNanoString.html b/packages/react-sdk/docs/functions/fromNanoString.html new file mode 100644 index 00000000..4e28544a --- /dev/null +++ b/packages/react-sdk/docs/functions/fromNanoString.html @@ -0,0 +1,133 @@ +fromNanoString | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function fromNanoString

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      s: undefined | string
    +

    Returns undefined | Date

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/isValidAddress.html b/packages/react-sdk/docs/functions/isValidAddress.html new file mode 100644 index 00000000..16777fb6 --- /dev/null +++ b/packages/react-sdk/docs/functions/isValidAddress.html @@ -0,0 +1,136 @@ +isValidAddress | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function isValidAddress

+
+
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/mapPaginatedStream.html b/packages/react-sdk/docs/functions/mapPaginatedStream.html new file mode 100644 index 00000000..003ec621 --- /dev/null +++ b/packages/react-sdk/docs/functions/mapPaginatedStream.html @@ -0,0 +1,140 @@ +mapPaginatedStream | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function mapPaginatedStream

+
+
    + +
  • +
    +

    Type Parameters

    +
      +
    • +

      Out

    +
    +

    Parameters

    +
      +
    • +
      gen: AsyncGenerator<Envelope[], any, unknown>
    • +
    • +
      mapper: EnvelopeMapper<Out>
    +

    Returns AsyncGenerator<Out[]>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/nsToDate.html b/packages/react-sdk/docs/functions/nsToDate.html new file mode 100644 index 00000000..9a2730f9 --- /dev/null +++ b/packages/react-sdk/docs/functions/nsToDate.html @@ -0,0 +1,133 @@ +nsToDate | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function nsToDate

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      ns: Long
    +

    Returns Date

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/toNanoString.html b/packages/react-sdk/docs/functions/toNanoString.html new file mode 100644 index 00000000..3218b43a --- /dev/null +++ b/packages/react-sdk/docs/functions/toNanoString.html @@ -0,0 +1,133 @@ +toNanoString | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function toNanoString

+
+
    + +
  • +
    +

    Parameters

    +
      +
    • +
      d: undefined | Date
    +

    Returns undefined | string

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/useCachedMessages.html b/packages/react-sdk/docs/functions/useCachedMessages.html new file mode 100644 index 00000000..9c09698b --- /dev/null +++ b/packages/react-sdk/docs/functions/useCachedMessages.html @@ -0,0 +1,158 @@ +useCachedMessages | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function useCachedMessages

+
+
    + +
  • +

    This hook fetches a list of all messages within a conversation on mount, +backed by a cache stored in IndexedDB. Like the useMessages hook, it also +exposes loading and error states and whether or not there are more messages +based on the options passed.

    +
    +
    +

    Parameters

    +
      +
    • +
      Optional conversation: Conversation
    • +
    • +
      Optional options: UseCachedMessagesOptions
    +

    Returns {
        error: unknown;
        hasMore: boolean;
        isLoading: boolean;
        messages: DecodedMessage[];
        next: (() => Promise<void>);
    }

    +
      +
    • +
      error: unknown
    • +
    • +
      hasMore: boolean
    • +
    • +
      isLoading: boolean
    • +
    • +
      messages: DecodedMessage[]
    • +
    • +
      next: (() => Promise<void>)
      +
        +
      • +
          +
        • (): Promise<void>
        • +
        • +

          Returns Promise<void>

    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/useCanMessage.html b/packages/react-sdk/docs/functions/useCanMessage.html new file mode 100644 index 00000000..92da3d49 --- /dev/null +++ b/packages/react-sdk/docs/functions/useCanMessage.html @@ -0,0 +1,197 @@ +useCanMessage | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function useCanMessage

+
+
    + +
  • +

    This hook exposes both the client and static instances of the canMessage +method.

    +
    +
    +

    Parameters

    +
      +
    • +
      Optional onError: ((error) => void)
      +
        +
      • +
          +
        • (error): void
        • +
        • +

          Callback function to execute when an error occurs

          +
          +
          +

          Parameters

          +
            +
          • +
            error: unknown
          +

          Returns void

          +
    +

    Returns {
        canMessage: (<T>(peerAddress) => Promise<CanMessageReturns<T>>);
        canMessageStatic: (<T>(peerAddress, options?) => Promise<CanMessageReturns<T>>);
        error: unknown;
        isLoading: boolean;
    }

    +
      +
    • +
      canMessage: (<T>(peerAddress) => Promise<CanMessageReturns<T>>)
      +
        +
      • +
          +
        • <T>(peerAddress): Promise<CanMessageReturns<T>>
        • +
        • +

          Check if a wallet address is on the XMTP network

          +
          +
          +

          Type Parameters

          +
            +
          • +

            T extends string | string[]

          +
          +

          Parameters

          +
            +
          • +
            peerAddress: T
          +

          Returns Promise<CanMessageReturns<T>>

          +
    • +
    • +
      canMessageStatic: (<T>(peerAddress, options?) => Promise<CanMessageReturns<T>>)
      +
        +
      • +
          +
        • <T>(peerAddress, options?): Promise<CanMessageReturns<T>>
        • +
        • +
          +

          Type Parameters

          +
            +
          • +

            T extends string | string[]

          +
          +

          Parameters

          +
          +

          Returns Promise<CanMessageReturns<T>>

    • +
    • +
      error: unknown
    • +
    • +
      isLoading: boolean
    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/useClient.html b/packages/react-sdk/docs/functions/useClient.html new file mode 100644 index 00000000..e1f0094a --- /dev/null +++ b/packages/react-sdk/docs/functions/useClient.html @@ -0,0 +1,168 @@ +useClient | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function useClient

+
+
    + +
  • +

    This hook allows you to initialize, disconnect, and access the XMTP client +instance. It also exposes the error and loading states of the client.

    +
    +

    Returns {
        client: undefined | Client;
        disconnect: (() => void);
        error: unknown;
        initialize: ((arg0) => Promise<undefined | Client>);
        isLoading: boolean;
        signer: undefined | Signer;
    }

    +
      +
    • +
      client: undefined | Client
    • +
    • +
      disconnect: (() => void)
      +
        +
      • +
          +
        • (): void
        • +
        • +

          Disconnect the XMTP client

          +
          +

          Returns void

          +
    • +
    • +
      error: unknown
    • +
    • +
      initialize: ((arg0) => Promise<undefined | Client>)
      +
        +
      • +
          +
        • (arg0): Promise<undefined | Client>
        • +
        • +

          Initialize the XMTP client

          +
          +
          +

          Parameters

          +
            +
          • +
            arg0: InitClientArgs
          +

          Returns Promise<undefined | Client>

          +
    • +
    • +
      isLoading: boolean
    • +
    • +
      signer: undefined | Signer
    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/useConversations.html b/packages/react-sdk/docs/functions/useConversations.html new file mode 100644 index 00000000..8168f572 --- /dev/null +++ b/packages/react-sdk/docs/functions/useConversations.html @@ -0,0 +1,144 @@ +useConversations | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function useConversations

+
+
    + +
  • +

    This hook fetches all conversations with the current wallet on mount. +It also exposes error and loading states.

    +
    +
    +

    Parameters

    +
      +
    • +
      Optional options: UseConversationsOptions
    +

    Returns {
        conversations: Conversation[];
        error: unknown;
        isLoading: boolean;
    }

    +
      +
    • +
      conversations: Conversation[]
    • +
    • +
      error: unknown
    • +
    • +
      isLoading: boolean
    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/useMessages.html b/packages/react-sdk/docs/functions/useMessages.html new file mode 100644 index 00000000..b79c8b80 --- /dev/null +++ b/packages/react-sdk/docs/functions/useMessages.html @@ -0,0 +1,157 @@ +useMessages | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function useMessages

+
+
    + +
  • +

    This hook fetches a list of all messages within a conversation on mount. It +also exposes loading and error states and whether or not there are more +messages based on the options passed.

    +
    +
    +

    Parameters

    +
      +
    • +
      Optional conversation: Conversation
    • +
    • +
      Optional options: UseMessagesOptions
    +

    Returns {
        error: unknown;
        hasMore: boolean;
        isLoading: boolean;
        messages: DecodedMessage[];
        next: (() => Promise<DecodedMessage[]>);
    }

    + +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/useSendMessage.html b/packages/react-sdk/docs/functions/useSendMessage.html new file mode 100644 index 00000000..11ad1414 --- /dev/null +++ b/packages/react-sdk/docs/functions/useSendMessage.html @@ -0,0 +1,163 @@ +useSendMessage | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function useSendMessage

+
+
    + +
  • +

    This hook sends a new message into a conversation.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T = string

    +
    +

    Parameters

    +
      +
    • +
      conversation: Conversation
    • +
    • +
      Optional options: UseSendMessageOptions
    +

    Returns {
        error: unknown;
        isLoading: boolean;
        sendMessage: ((message, optionsOverride?) => Promise<void>);
    }

    +
      +
    • +
      error: unknown
    • +
    • +
      isLoading: boolean
    • +
    • +
      sendMessage: ((message, optionsOverride?) => Promise<void>)
      +
        +
      • +
          +
        • (message, optionsOverride?): Promise<void>
        • +
        • +
          +

          Parameters

          +
            +
          • +
            message: T
          • +
          • +
            Optional optionsOverride: SendOptions
          +

          Returns Promise<void>

    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/useStartConversation.html b/packages/react-sdk/docs/functions/useStartConversation.html new file mode 100644 index 00000000..de40a208 --- /dev/null +++ b/packages/react-sdk/docs/functions/useStartConversation.html @@ -0,0 +1,163 @@ +useStartConversation | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function useStartConversation

+
+
    + +
  • +

    This hook starts a new conversation and sends an initial message to it.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T = string

    +
    +

    Parameters

    +
      +
    • +
      Optional options: UseStartConversation
    +

    Returns {
        error: unknown;
        isLoading: boolean;
        startConversation: ((peerAddress, message, sendOptions?) => Promise<undefined | Conversation>);
    }

    +
      +
    • +
      error: unknown
    • +
    • +
      isLoading: boolean
    • +
    • +
      startConversation: ((peerAddress, message, sendOptions?) => Promise<undefined | Conversation>)
      +
        +
      • +
          +
        • (peerAddress, message, sendOptions?): Promise<undefined | Conversation>
        • +
        • +
          +

          Parameters

          +
            +
          • +
            peerAddress: string
          • +
          • +
            message: T
          • +
          • +
            Optional sendOptions: SendOptions
          +

          Returns Promise<undefined | Conversation>

    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/useStreamAllMessages.html b/packages/react-sdk/docs/functions/useStreamAllMessages.html new file mode 100644 index 00000000..e83af41e --- /dev/null +++ b/packages/react-sdk/docs/functions/useStreamAllMessages.html @@ -0,0 +1,167 @@ +useStreamAllMessages | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function useStreamAllMessages

+
+
    + +
  • +

    This hook streams new messages from all conversations on mount and exposes +an error state.

    +
    +
    +

    Parameters

    +
      +
    • +
      onMessage: ((message) => void)
      +
        +
      • +
          +
        • (message): void
        • +
        • +
          +

          Parameters

          +
          +

          Returns void

    • +
    • +
      Optional onError: ((error) => void)
      +
        +
      • +
          +
        • (error): void
        • +
        • +

          Callback function to execute when an error occurs

          +
          +
          +

          Parameters

          +
            +
          • +
            error: unknown
          +

          Returns void

          +
    +

    Returns {
        error: unknown;
    }

    +
      +
    • +
      error: unknown
    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/useStreamConversations.html b/packages/react-sdk/docs/functions/useStreamConversations.html new file mode 100644 index 00000000..e6044d92 --- /dev/null +++ b/packages/react-sdk/docs/functions/useStreamConversations.html @@ -0,0 +1,167 @@ +useStreamConversations | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function useStreamConversations

+
+
    + +
  • +

    This hook listens for new conversations in real-time and calls the passed +callback when a new conversation is created. It also exposes an error state.

    +
    +
    +

    Parameters

    +
      +
    • +
      onConversation: ((conversation) => void)
      +
        +
      • +
          +
        • (conversation): void
        • +
        • +
          +

          Parameters

          +
          +

          Returns void

    • +
    • +
      Optional onError: ((error) => void)
      +
        +
      • +
          +
        • (error): void
        • +
        • +

          Callback function to execute when an error occurs

          +
          +
          +

          Parameters

          +
            +
          • +
            error: unknown
          +

          Returns void

          +
    +

    Returns {
        error: unknown;
    }

    +
      +
    • +
      error: unknown
    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/functions/useStreamMessages.html b/packages/react-sdk/docs/functions/useStreamMessages.html new file mode 100644 index 00000000..37f239b4 --- /dev/null +++ b/packages/react-sdk/docs/functions/useStreamMessages.html @@ -0,0 +1,168 @@ +useStreamMessages | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Function useStreamMessages

+
+
    + +
  • +

    This hook streams new conversation messages on mount and exposes an error state.

    +
    +
    +

    Parameters

    +
      +
    • +
      conversation: Conversation
    • +
    • +
      onMessage: ((message) => void)
      +
        +
      • +
          +
        • (message): void
        • +
        • +
          +

          Parameters

          +
          +

          Returns void

    • +
    • +
      Optional onError: ((error) => void)
      +
        +
      • +
          +
        • (error): void
        • +
        • +

          Callback function to execute when an error occurs

          +
          +
          +

          Parameters

          +
            +
          • +
            error: unknown
          +

          Returns void

          +
    +

    Returns {
        error: unknown;
    }

    +
      +
    • +
      error: unknown
    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/index.html b/packages/react-sdk/docs/index.html new file mode 100644 index 00000000..eddfab61 --- /dev/null +++ b/packages/react-sdk/docs/index.html @@ -0,0 +1,321 @@ +@xmtp/react-sdk
+
+ +
+
+
+
+

@xmtp/react-sdk

+

React XMTP client SDK

Status

+

This package provides the XMTP client SDK for React.

+

This SDK is in beta status and ready for you to start building with.

+

However, we do not recommend using beta software in production apps. Software in this status may change based on feedback.

+

To keep up with the latest SDK developments, see the Issues tab in this repo.

+

To learn more about XMTP and get answers to frequently asked questions, see the XMTP documentation.

+

x-red-sm

+

What's inside?

Hooks

These hooks are mostly bindings to the xmtp-js SDK that expose the underlying data in a React way.

+

Requirements

    +
  • Node 18+
  • +
  • React 16.14+
  • +
+

Install

# npm
npm install @xmtp/react-sdk@preview

# pnpm
pnpm install @xmtp/react-sdk@preview

# yarn
yarn add @xmtp/react-sdk@preview +
+

Create React App

Requires the Buffer polyfill. See below.

+

If you see a lot of warnings related to source maps, see this issue to learn more.

+

Vite

Requires the Buffer polyfill. See below.

+

Buffer polyfill

The Node Buffer API must be polyfilled in some cases. To do so, add the buffer dependency to your project and then polyfill it in your entry file.

+

Example

+
import { Buffer } from "buffer";

window.Buffer = window.Buffer ?? Buffer; +
+

Usage

Add the provider

To use the provided hooks, you must wrap your app with an XMTPProvider. This gives the hooks access to the XMTP client.

+

Example

+
createRoot(document.getElementById("root") as HTMLElement).render(
<StrictMode>
<XMTPProvider>
<App />
</XMTPProvider>
</StrictMode>,
); +
+

Create a client

The useClient hook allows you to initialize, disconnect, and access the XMTP client instance. It also exposes the error and loading states of the client.

+

The hook requires passing in a connected wallet that implements the Signer interface.

+

To learn more about this process, see Create a client in the xmtp-js SDK docs.

+

Type

+
import { Client } from "@xmtp/react-sdk";

type InitClientArgs = {
keys?: Uint8Array;
options?: Partial<ClientOptions>;
signer?: Signer | null;
};

const useClient: () => {
client: Client | undefined;
disconnect: () => void;
error: unknown;
initialize: (args?: InitClientArgs) => Promise<void>;
isLoading: boolean;
}; +
+

Example

+
export const CreateClient: React.FC<{ signer: Signer }> = ({ signer }) => {
const { client, error, isLoading, initialize } = useClient();

const handleConnect = useCallback(async () => {
await initialize({ signer });
}, [initialize]);

if (error) {
return "An error occurred while initializing the client";
}

if (isLoading) {
return "Awaiting signatures...";
}

if (!client) {
return (
<button type="button" onClick={handleConnect}>
Connect to XMTP
</button>
);
}

return "Connected to XMTP";
}; +
+

Configure the client

To learn more about client configuration options, see Configure the client in the xmtp-js SDK docs.

+

Create a client with private keys

Manually handling private keys is not recommended unless a use case requires it.

+

To learn more, see Manually handle private key storage in the xmtp-js SDK docs.

+

Example

+
import { Client, useClient } from "@xmtp/react-sdk";
import type { Signer } from "@xmtp/react-sdk";

export const CreateClientWithKeys: React.FC<{ signer: Signer }> = ({ signer }) => {
const { initialize } = useClient();

// initialize client on mount
useEffect(() => {
const init = async () => {
// get the keys using a valid Signer
const keys = await Client.getKeys(signer);
// create a client using keys returned from getKeys
await initialize({ keys, signer });
};
void init();
}, []);

return (
...
);
}; +
+

List existing conversations

The useConversations hook fetches all conversations with the current wallet on mount. It also exposes error and loading states.

+

Type

+
import type { Conversation } from "@xmtp/react-sdk";

const useConversations: () => {
conversations: Conversation[];
error: unknown;
isLoading: boolean;
}; +
+

Example

+
export const ListConversations: React.FC = () => {
const { conversations, error, isLoading } = useConversations();

if (error) {
return "An error occurred while loading conversations";
}

if (isLoading) {
return "Loading conversations...";
}

return (
...
);
}; +
+

To learn more, see List existing conversations in the xmtp-js SDK docs.

+

Listen for new conversations

The useStreamConversations hook listens for new conversations in real-time and calls the passed callback when a new conversation is created. It also exposes an error state.

+

Type

+
import type { Conversation } from "@xmtp/react-sdk";

const useStreamConversations: (
onConversation: (conversation: Conversation) => void,
) => {
error: unknown;
}; +
+

Example

+
import { useCallback, useState } from "react";
import { useStreamConversations } from "@xmtp/react-sdk";
import type { Conversation } from "@xmtp/react-sdk";

export const NewConversations: React.FC = () => {
// track streamed conversations
const [streamedConversations, setStreamedConversations] = useState<
Conversation[]
>([]);

// callback to handle incoming conversations
const onConversation = useCallback(
(conversation: Conversation) => {
setStreamedConversations((prev) => [...prev, conversation]);
},
[],
);
const { error } = useStreamConversations(onConversation);

if (error) {
return "An error occurred while streaming conversations";
}

return (
...
);
}; +
+

To learn more, see Listen for new conversations in the xmtp-js SDK docs.

+

Start a new conversation

The useStartConversation hook starts a new conversation and sends an initial message to it.

+

Type

+
import type {
Conversation,
InvitationContext,
SendOptions,
} from "@xmtp/react-sdk";

const useStartConversation: <T = string>(
options?: InvitationContext,
) => (
peerAddress: string,
message: T,
sendOptions?: SendOptions,
) => Promise<Conversation | undefined>; +
+

Example

+
import { isValidAddress, useStartConversation } from "@xmtp/react-sdk";
import { useCallback, useState } from "react";

export const StartConversation: React.FC = () => {
const [peerAddress, setPeerAddress] = useState("");
const [message, setMessage] = useState("");
const [isLoading, setIsLoading] = useState(false);

const startConversation = useStartConversation();

const handleAddressChange = useCallback(
(e: ChangeEvent<HTMLInputElement>) => {
setPeerAddress(e.target.value);
},
[],
);

const handleMessageChange = useCallback(
(e: ChangeEvent<HTMLInputElement>) => {
setMessage(e.target.value);
},
[],
);

const handleStartConversation = useCallback(
async (e: React.FormEvent) => {
e.preventDefault();
if (peerAddress && message) {
setIsLoading(true);
const conversation = await startConversation(peerAddress, message);
setIsLoading(false);
}
},
[message, peerAddress, startConversation],
);

return (
<form onSubmit={handleStartConversation}>
<input
name="addressInput"
type="text"
onChange={handleAddressChange}
disabled={isLoading}
/>
<input
name="messageInput"
type="text"
onChange={handleMessageChange}
disabled={isLoading || !isValidAddress(peerAddress)}
/>
</form>
);
}; +
+

Send messages

The useSendMessage hook sends a new message into a conversation.

+

Type

+
import type { Conversation, SendOptions } from "@xmtp/react-sdk";

const useSendMessage: <T = string>(
conversation: Conversation,
options?: SendOptions,
) => (message: T, optionsOverride?: SendOptions) => Promise<void>; +
+

Example

+
import { useSendMessage } from "@xmtp/react-sdk";
import type { Conversation } from "@xmtp/react-sdk";
import { useCallback, useState } from "react";

export const SendMessage: React.FC<{ conversation: Conversation }> = ({
conversation,
}) => {
const [peerAddress, setPeerAddress] = useState("");
const [message, setMessage] = useState("");
const [isSending, setIsSending] = useState(false);
const sendMessage = useSendMessage(conversation);

const handleAddressChange = useCallback(
(e: ChangeEvent<HTMLInputElement>) => {
setPeerAddress(e.target.value);
},
[],
);

const handleMessageChange = useCallback(
(e: ChangeEvent<HTMLInputElement>) => {
setMessage(e.target.value);
},
[],
);

const handleSendMessage = useCallback(
async (e: React.FormEvent) => {
e.preventDefault();
if (peerAddress && isValidAddress(peerAddress) && message) {
setIsLoading(true);
await sendMessage(message);
setIsLoading(false);
}
},
[message, peerAddress, sendMessage],
);

return (
<form onSubmit={handleSendMessage}>
<input
name="addressInput"
type="text"
onChange={handleAddressChange}
disabled={isSending}
/>
<input
name="messageInput"
type="text"
onChange={handleMessageChange}
disabled={isSending}
/>
</form>
);
}; +
+

To learn more, see Send messages in the xmtp-js SDK docs.

+

List messages in a conversation

The useMessages hook fetches a list of all messages within a conversation on mount. It also exposes loading and error states and whether there are more messages based on the options passed.

+

Type

+
import type {
Conversation,
DecodedMessage,
ListMessagesOptions,
} from "@xmtp/react-sdk";

export type UseMessagesOptions = ListMessagesOptions & {
/**
* Callback function to execute when new messages are fetched
*/
onMessages?: (
messages: DecodedMessage[],
options: ListMessagesOptions,
) => void;
};

const useMessages: (
conversation?: Conversation,
options?: UseMessagesOptions,
) => {
error: unknown;
hasMore: boolean;
isLoading: boolean;
messages: DecodedMessage[];
next: () => Promise<DecodedMessage[]>;
}; +
+

Example

+
import { useMessages } from "@xmtp/react-sdk";
import type { Conversation, DecodedMessage } from "@xmtp/react-sdk";

export const Messages: React.FC<{
conversation: Conversation;
}> = ({ conversation }) => {
const { error, messages, isLoading } = useMessages(conversation);

if (error) {
return "An error occurred while loading messages";
}

if (isLoading) {
return "Loading messages...";
}

return (
...
);
}; +
+

Page through messages

If a conversation has a lot of messages, it's more performant to page through them rather than fetching them all at once. This can be accomplished by using the limit option to limit the number of messages to fetch at a time.

+

Example

+
import { useMessages } from "@xmtp/react-sdk";
import type { Conversation, DecodedMessage } from "@xmtp/react-sdk";

export const PagedMessages: React.FC<{
conversation: Conversation;
}> = ({ conversation }) => {
const { error, isLoading, messages, next } = useMessages(
conversation,
options: {
limit: 20,
},
);

const handleClick = useCallback(() => {
// fetch next page of messages
next();
}, [next]);

if (error) {
return "An error occurred while loading messages";
}

if (isLoading) {
return "Loading messages...";
}

return (
<>
...
<button type="button" onClick={handleClick}>
Load more messages
</button>
</>
);
}; +
+

Listen for new messages in a conversation

The useStreamMessages hook streams new conversation messages on mount and exposes an error state.

+

Type

+
import type { Conversation, DecodedMessage } from "@xmtp/react-sdk";

const useStreamMessages: (
conversation: Conversation,
onMessage: (message: DecodedMessage) => void,
) => {
error: unknown;
}; +
+

Example

+
import { useStreamMessages } from "@xmtp/react-sdk";
import type { Conversation, DecodedMessage } from "@xmtp/react-sdk";
import { useCallback, useEffect, useState } from "react";

export const StreamMessages: React.FC<{
conversation: Conversation;
}> = ({
conversation,
}) => {
// track streamed messages
const [streamedMessages, setStreamedMessages] = useState<DecodedMessage[]>(
[],
);

// callback to handle incoming messages
const onMessage = useCallback(
(message: DecodedMessage) => {
setStreamedMessages((prev) => [...prev, message]);
},
[streamedMessages],
);

useStreamMessages(conversation, onMessage);

useEffect(() => {
setStreamedMessages([]);
}, [conversation]);

return (
...
);
}; +
+

To learn more, see Listen for new messages in a conversation in the xmtp-js SDK docs.

+

Listen for new messages in all conversations

The useStreamAllMessages hook streams new messages from all conversations on mount and exposes an error state.

+

Type

+
import type { DecodedMessage } from "@xmtp/react-sdk";

const useStreamAllMessages: (onMessage: (message: DecodedMessage) => void) => {
error: unknown;
}; +
+

Example

+
import { useStreamAllMessages } from "@xmtp/react-sdk";
import type { DecodedMessage } from "@xmtp/react-sdk";
import { useCallback, useState } from "react";

export const StreamAllMessages: React.FC = () => {
// track streamed messages
const [streamedMessages, setStreamedMessages] = useState<DecodedMessage[]>(
[],
);

// callback to handle incoming messages
const onMessage = useCallback(
(message: DecodedMessage) => {
setStreamedMessages((prev) => [...prev, message]);
},
[streamedMessages],
);

useStreamAllMessages(onMessage);

return (
...
);
}; +
+

To learn more, see Listen for new messages in all conversations in the xmtp-js SDK docs.

+

Check if an address is on the network

The useCanMessage hook exposes both the client and static instances of the canMessage method. To check if a blockchain address is registered on the network before instantiating a client instance, use the canMessageStatic export.

+

Type

+
type NetworkOptions = {
env: "local" | "dev" | "production";
apiUrl: string | undefined;
appVersion?: string;
};

const useCanMessage: () => {
canMessage: {
(peerAddress: string): Promise<boolean>;
(peerAddress: string[]): Promise<boolean[]>;
};
canMessageStatic: {
(peerAddress: string, opts?: Partial<NetworkOptions>): Promise<boolean>;
(peerAddress: string[], opts?: Partial<NetworkOptions>): Promise<boolean[]>;
};
}; +
+

Example

+
import { useCanMessage } from "@xmtp/react-sdk";

export const CanMessage: React.FC = () => {
const [peerAddress, setPeerAddress] = useState("");
const [isOnNetwork, setIsOnNetwork] = useState(false);
const [isLoading, setIsLoading] = useState(false);

const { canMessage } = useCanMessage();

const handleAddressChange = useCallback((e: React.KeyboardEvent<HTMLInputElement>) => {
setPeerAddress(e.target.value);
}, []);

const handleCheckAddress = useCallback(async (e: FormEvent) => {
e.preventDefault();
if (isValidAddress(peerAddress)) {
setIsLoading(true);
setIsOnNetwork(await canMessage(peerAddress));
setIsLoading(false);
} else {
setIsOnNetwork(false);
}
};
void checkAddress();
}, [peerAddress]);

return (
<form onSubmit={handleCheckAddress}>
<input
name="addressInput"
type="text"
onChange={handleAddressChange}
disabled={isLoading}
/>
</form>
);
}; +
+

Developing

Run yarn dev to build the SDK and watch for changes, which will trigger a rebuild.

+

Useful commands

    +
  • yarn build: Builds the SDK
  • +
  • yarn clean: Removes node_modules, lib, and .turbo folders
  • +
  • yarn dev: Builds the SDK and watches for changes, which will trigger a rebuild
  • +
  • yarn format: Runs prettier format and write changes
  • +
  • yarn format:check: Runs prettier format check
  • +
  • yarn lint: Runs ESLint
  • +
  • yarn test: Runs all unit tests
  • +
  • yarn typecheck: Runs tsc
  • +
+

🏗 Breaking revisions

Because this SDK is in active development, you should expect breaking revisions that might require you to adopt the latest SDK release to enable your app to continue working as expected.

+

XMTP communicates about breaking revisions in the XMTP Discord community, providing as much advance notice as possible. Additionally, breaking revisions in a release are described on the Releases page.

+

Deprecation

Older versions of the SDK will eventually be deprecated, which means:

+
    +
  1. The network will not support and eventually actively reject connections from clients using deprecated versions.
  2. +
  3. Bugs will not be fixed in deprecated versions.
  4. +
+

The following table provides the deprecation schedule.

+ + + + + + + + + + + + + + + +
AnnouncedEffectiveMinimum VersionRationale
There are no deprecations scheduled for this SDK at this time.
+

Bug reports, feature requests, and PRs are welcome in accordance with these contribution guidelines.

+

XMTP production and dev network environments

XMTP provides both production and dev network environments to support the development phases of your project.

+

The production and dev networks are completely separate and not interchangeable. +For example, for a given blockchain account, its XMTP identity on dev network is completely distinct from its XMTP identity on the production network, as are the messages associated with these identities. In addition, XMTP identities and messages created on the dev network can't be accessed from or moved to the production network, and vice versa.

+
+

Important:
When you create a client, it connects to the XMTP dev environment by default. To learn how to use the env parameter to set your client's network environment, see Configure the client.

+
+

The env parameter accepts one of three valid values: dev, production, or local. Here are some best practices for when to use each environment:

+
    +
  • dev: Use to have a client communicate with the dev network. As a best practice, set env to dev while developing and testing your app. Follow this best practice to isolate test messages to dev inboxes.

    +
  • +
  • production: Use to have a client communicate with the production network. As a best practice, set env to production when your app is serving real users. Follow this best practice to isolate messages between real-world users to production inboxes.

    +
  • +
  • local: Use to have a client communicate with an XMTP node you are running locally. For example, an XMTP node developer can set env to local to generate client traffic to test a node running locally.

    +
  • +
+

The production network is configured to store messages indefinitely. XMTP may occasionally delete messages and keys from the dev network, and will provide advance notice in the XMTP Discord community.

+
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/interfaces/CodecRegistry.html b/packages/react-sdk/docs/interfaces/CodecRegistry.html new file mode 100644 index 00000000..8d408857 --- /dev/null +++ b/packages/react-sdk/docs/interfaces/CodecRegistry.html @@ -0,0 +1,156 @@ +CodecRegistry | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Interface CodecRegistry

+
+

Hierarchy

+
    +
  • CodecRegistry
+
+
+
+ +
+
+

Methods

+
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns undefined | ContentCodec<any>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/interfaces/ContentCodec.html b/packages/react-sdk/docs/interfaces/ContentCodec.html new file mode 100644 index 00000000..95d91c31 --- /dev/null +++ b/packages/react-sdk/docs/interfaces/ContentCodec.html @@ -0,0 +1,198 @@ +ContentCodec | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Interface ContentCodec<T>

+
+

Type Parameters

+
    +
  • +

    T

+
+

Hierarchy

+
    +
  • ContentCodec
+
+

Implemented by

+
+
+
+
+ +
+
+

Properties

+
+
+

Methods

+
+
+

Properties

+
+ +
contentType: ContentTypeId
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns T

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns EncodedContent<Record<string, string>>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/interfaces/Conversation.html b/packages/react-sdk/docs/interfaces/Conversation.html new file mode 100644 index 00000000..64eb6fd4 --- /dev/null +++ b/packages/react-sdk/docs/interfaces/Conversation.html @@ -0,0 +1,350 @@ +Conversation | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Interface Conversation

+
+

Conversation represents either a V1 or V2 conversation with a common set of methods.

+
+
+
+

Hierarchy

+
    +
  • Conversation
+
+
+
+ +
+
+

Properties

+
+ +
clientAddress: string
+

The wallet address connected to the client

+
+
+
+ + +

Optional field containing the conversationId and metadata for V2 conversations. +Will always be undefined on V1 conversations

+
+
+
+ +
createdAt: Date
+

Timestamp the conversation was created at

+
+
+
+ +
ephemeralTopic: string
+

A unique identifier for ephemeral envelopes for a conversation.

+
+
+
+ +
peerAddress: string
+

The wallet address of the other party in the conversation

+
+
+
+ +
topic: string
+

A unique identifier for a conversation. Each conversation is stored on the network on one topic

+
+
+
+

Methods

+
+ +
    + +
  • +

    Takes a XMTP envelope as input and will decrypt and decode it +returning a DecodedMessage instance.

    +
    +
    +

    Parameters

    +
      +
    • +
      env: Envelope
    +

    Returns Promise<DecodedMessage>

    +
+
+ +
    + +
  • +

    Retrieve messages in this conversation. Default to returning all messages.

    +

    If only a subset is required, results can be narrowed by specifying a start/end +timestamp.

    +
    // Get all messages in the past 24 hours
    const messages = await conversation.messages({
    startTime: new Date(+new Date() - 86_400)
    }) +
    +
    +
    +

    Parameters

    +
    +

    Returns Promise<DecodedMessage[]>

    +
+
+ +
+
+ +
    + +
  • +

    Return a PreparedMessage that has contains the message ID +of the message that will be sent.

    +
    +
    +

    Parameters

    +
    +

    Returns Promise<PreparedMessage>

    +
+
+ +
    + +
  • +

    Send a message into the conversation

    +

    Example

    await conversation.send('Hello world') // returns a `DecodedMessage` instance
    +
    +
    +
    +

    Parameters

    +
    +

    Returns Promise<DecodedMessage>

    +
+
+ +
    + +
  • +

    Return a Stream of new ephemeral messages from this conversation's +ephemeral topic.

    +

    Stream instances are async generators and can be used in +for await statements.

    +
    for await (const message of await conversation.streamEphemeral()) {
    console.log(message.content)
    } +
    +
    +

    Returns Promise<Stream<DecodedMessage>>

    +
+
+ +
    + +
  • +

    Return a Stream of new messages in this conversation.

    +

    Stream instances are async generators and can be used in +for await statements.

    +
    for await (const message of await conversation.stream()) {
    console.log(message.content)
    } +
    +
    +

    Returns Promise<Stream<DecodedMessage>>

    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/interfaces/EncodedContent.html b/packages/react-sdk/docs/interfaces/EncodedContent.html new file mode 100644 index 00000000..cb8d00ba --- /dev/null +++ b/packages/react-sdk/docs/interfaces/EncodedContent.html @@ -0,0 +1,181 @@ +EncodedContent | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Interface EncodedContent<Parameters>

+
+

Type Parameters

+
    +
  • +

    Parameters = Record<string, string>

+
+

Hierarchy

+
    +
  • EncodedContent
+
+
+
+ +
+
+

Properties

+
+ +
compression?: number
+
+ +
content: Uint8Array
+
+ +
fallback?: string
+
+ +
parameters: Parameters
+
+ +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/interfaces/Keystore.html b/packages/react-sdk/docs/interfaces/Keystore.html new file mode 100644 index 00000000..234175cf --- /dev/null +++ b/packages/react-sdk/docs/interfaces/Keystore.html @@ -0,0 +1,347 @@ +Keystore | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Interface Keystore

+
+

A Keystore is responsible for holding the user's XMTP private keys and using them to encrypt/decrypt/sign messages. +Keystores are instantiated using a KeystoreProvider

+
+
+
+

Hierarchy

+
    +
  • Keystore
+
+

Implemented by

+
+
+
+
+ +
+
+

Methods

+
+ +
    + +
  • +

    Create an XMTP auth token to be used as a header on XMTP API requests

    +
    +
    +

    Parameters

    +
      +
    • +
      req: CreateAuthTokenRequest
    +

    Returns Promise<Token>

    +
+
+ +
    + +
  • +

    Create a sealed/encrypted invite and store the Topic keys in the Keystore for later use. +The returned invite payload must be sent to the network for the other party to be able to communicate.

    +
    +
    +

    Parameters

    +
      +
    • +
      req: CreateInviteRequest
    +

    Returns Promise<CreateInviteResponse>

    +
+
+ +
    + +
  • +

    Decrypt a batch of V1 messages

    +
    +
    +

    Parameters

    +
      +
    • +
      req: DecryptV1Request
    +

    Returns Promise<DecryptResponse>

    +
+
+ +
    + +
  • +

    Decrypt a batch of V2 messages

    +
    +
    +

    Parameters

    +
      +
    • +
      req: DecryptV2Request
    +

    Returns Promise<DecryptResponse>

    +
+
+ +
    + +
  • +

    Encrypt a batch of V1 messages

    +
    +
    +

    Parameters

    +
      +
    • +
      req: EncryptV1Request
    +

    Returns Promise<EncryptResponse>

    +
+
+ +
    + +
  • +

    Encrypt a batch of V2 messages

    +
    +
    +

    Parameters

    +
      +
    • +
      req: EncryptV2Request
    +

    Returns Promise<EncryptResponse>

    +
+
+ +
    + +
  • +

    Get the account address of the wallet used to create the Keystore

    +
    +

    Returns Promise<string>

    +
+
+ +
    + +
  • +

    Export the private keys. May throw an error if the keystore implementation does not allow this operation

    +
    +

    Returns Promise<PrivateKeyBundleV1>

    +
+
+ +
    + +
  • +

    Get the PublicKeyBundle associated with the Keystore's private keys

    +
    +

    Returns Promise<PublicKeyBundle>

    +
+
+ +
    + +
  • +

    Get a list of V2 conversations

    +
    +

    Returns Promise<ConversationReference[]>

    +
+
+ +
    + +
  • +

    Take a batch of invite messages and store the TopicKeys for later use in decrypting messages

    +
    +
    +

    Parameters

    +
      +
    • +
      req: SaveInvitesRequest
    +

    Returns Promise<SaveInvitesResponse>

    +
+
+ +
    + +
  • +

    Sign the provided digest with either the IdentityKey or a specified PreKey

    +
    +
    +

    Parameters

    +
      +
    • +
      req: SignDigestRequest
    +

    Returns Promise<Signature>

    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/interfaces/KeystoreProvider.html b/packages/react-sdk/docs/interfaces/KeystoreProvider.html new file mode 100644 index 00000000..4611fd5f --- /dev/null +++ b/packages/react-sdk/docs/interfaces/KeystoreProvider.html @@ -0,0 +1,171 @@ +KeystoreProvider | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Interface KeystoreProvider

+
+

A Keystore Provider is responsible for either creating a Keystore instance or throwing a KeystoreUnavailableError +It is typically used once on application startup to bootstrap the Keystore and load/decrypt the user's private keys

+
+
+
+

Hierarchy

+
    +
  • KeystoreProvider
+
+

Implemented by

+
+
+
+
+ +
+
+

Methods

+
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      opts: KeystoreProviderOptions
    • +
    • +
      apiClient: ApiClient
    • +
    • +
      Optional wallet: Signer
    +

    Returns Promise<Keystore>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/interfaces/Persistence.html b/packages/react-sdk/docs/interfaces/Persistence.html new file mode 100644 index 00000000..0ea6033a --- /dev/null +++ b/packages/react-sdk/docs/interfaces/Persistence.html @@ -0,0 +1,178 @@ +Persistence | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Interface Persistence

+
+

Hierarchy

+
    +
  • Persistence
+
+

Implemented by

+
+
+
+
+ +
+
+

Methods

+
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      key: string
    +

    Returns Promise<null | Uint8Array>

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      key: string
    • +
    • +
      value: Uint8Array
    +

    Returns Promise<void>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/interfaces/Signer.html b/packages/react-sdk/docs/interfaces/Signer.html new file mode 100644 index 00000000..53c14967 --- /dev/null +++ b/packages/react-sdk/docs/interfaces/Signer.html @@ -0,0 +1,166 @@ +Signer | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Interface Signer

+
+

Hierarchy

+
    +
  • Signer
+
+
+
+ +
+
+

Methods

+
+
+

Methods

+
+ +
    + +
  • +

    Returns Promise<string>

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      message: string | ArrayLike<number>
    +

    Returns Promise<string>

+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/modules.html b/packages/react-sdk/docs/modules.html new file mode 100644 index 00000000..12ac04b0 --- /dev/null +++ b/packages/react-sdk/docs/modules.html @@ -0,0 +1,219 @@ +@xmtp/react-sdk
+
+ +
+
+
+
+

@xmtp/react-sdk

+
+
+

Index

+
+

Classes

+
+
+

Interfaces

+
+
+

Type Aliases

+
+
+

Variables

+
+
+

Functions

+
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/types/ClientOptions.html b/packages/react-sdk/docs/types/ClientOptions.html new file mode 100644 index 00000000..a8d15944 --- /dev/null +++ b/packages/react-sdk/docs/types/ClientOptions.html @@ -0,0 +1,128 @@ +ClientOptions | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Type alias ClientOptions

+
ClientOptions: Flatten<NetworkOptions & KeyStoreOptions & ContentOptions & LegacyOptions & PreEventCallbackOptions>
+

Aggregate type for client options. Optional properties are used when the default value is calculated on invocation, and are computed +as needed by each function. All other defaults are specified in defaultOptions.

+
+
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/types/Composite.html b/packages/react-sdk/docs/types/Composite.html new file mode 100644 index 00000000..d1016a59 --- /dev/null +++ b/packages/react-sdk/docs/types/Composite.html @@ -0,0 +1,136 @@ +Composite | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Type alias Composite

+
Composite: {
    content: any;
    type: ContentTypeId;
} | {
    parts: Composite[];
}
+
+

Type declaration

+
+
+

Type declaration

+
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/types/ContentOptions.html b/packages/react-sdk/docs/types/ContentOptions.html new file mode 100644 index 00000000..c9779a53 --- /dev/null +++ b/packages/react-sdk/docs/types/ContentOptions.html @@ -0,0 +1,138 @@ +ContentOptions | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Type alias ContentOptions

+
ContentOptions: {
    codecs: ContentCodec<any>[];
    maxContentSize: number;
}
+
+

Type declaration

+
    +
  • +
    codecs: ContentCodec<any>[]
    +

    Allow configuring codecs for additional content types

    +
    +
  • +
  • +
    maxContentSize: number
    +

    Set the maximum content size in bytes that is allowed by the Client. +Currently only checked when decompressing compressed content.

    +
    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/types/InvitationContext.html b/packages/react-sdk/docs/types/InvitationContext.html new file mode 100644 index 00000000..611b5372 --- /dev/null +++ b/packages/react-sdk/docs/types/InvitationContext.html @@ -0,0 +1,134 @@ +InvitationContext | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Type alias InvitationContext

+
InvitationContext: {
    conversationId: string;
    metadata: {
        [k: string]: string;
    };
}
+
+

Type declaration

+
    +
  • +
    conversationId: string
  • +
  • +
    metadata: {
        [k: string]: string;
    }
    +
      +
    • +
      [k: string]: string
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/types/KeyStoreOptions.html b/packages/react-sdk/docs/types/KeyStoreOptions.html new file mode 100644 index 00000000..a6ef1a8b --- /dev/null +++ b/packages/react-sdk/docs/types/KeyStoreOptions.html @@ -0,0 +1,145 @@ +KeyStoreOptions | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Type alias KeyStoreOptions

+
KeyStoreOptions: {
    keystoreProviders: KeystoreProvider[];
    persistConversations: boolean;
    privateKeyOverride?: Uint8Array;
}
+
+

Type declaration

+
    +
  • +
    keystoreProviders: KeystoreProvider[]
    +

    Provide an array of KeystoreProviders. +The client will attempt to use each one in sequence until one successfully +returns a Keystore instance

    +
    +
  • +
  • +
    persistConversations: boolean
    +

    Enable the Keystore to persist conversations in the provided storage interface

    +
    +
  • +
  • +
    Optional privateKeyOverride?: Uint8Array
    +

    Provide a XMTP PrivateKeyBundle encoded as a Uint8Array. +A bundle can be retried using Client.getKeys(...)

    +
    +
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/types/LegacyOptions.html b/packages/react-sdk/docs/types/LegacyOptions.html new file mode 100644 index 00000000..d51c8092 --- /dev/null +++ b/packages/react-sdk/docs/types/LegacyOptions.html @@ -0,0 +1,129 @@ +LegacyOptions | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Type alias LegacyOptions

+
LegacyOptions: {
    publishLegacyContact?: boolean;
}
+
+

Type declaration

+
    +
  • +
    Optional publishLegacyContact?: boolean
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/types/ListMessagesOptions.html b/packages/react-sdk/docs/types/ListMessagesOptions.html new file mode 100644 index 00000000..8e8bb785 --- /dev/null +++ b/packages/react-sdk/docs/types/ListMessagesOptions.html @@ -0,0 +1,137 @@ +ListMessagesOptions | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Type alias ListMessagesOptions

+
ListMessagesOptions: {
    checkAddresses?: boolean;
    direction?: messageApi.SortDirection;
    endTime?: Date;
    limit?: number;
    startTime?: Date;
}
+
+

Type declaration

+
    +
  • +
    Optional checkAddresses?: boolean
  • +
  • +
    Optional direction?: messageApi.SortDirection
  • +
  • +
    Optional endTime?: Date
  • +
  • +
    Optional limit?: number
  • +
  • +
    Optional startTime?: Date
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/types/ListMessagesPaginatedOptions.html b/packages/react-sdk/docs/types/ListMessagesPaginatedOptions.html new file mode 100644 index 00000000..e1e47d2d --- /dev/null +++ b/packages/react-sdk/docs/types/ListMessagesPaginatedOptions.html @@ -0,0 +1,135 @@ +ListMessagesPaginatedOptions | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Type alias ListMessagesPaginatedOptions

+
ListMessagesPaginatedOptions: {
    direction?: messageApi.SortDirection;
    endTime?: Date;
    pageSize?: number;
    startTime?: Date;
}
+
+

Type declaration

+
    +
  • +
    Optional direction?: messageApi.SortDirection
  • +
  • +
    Optional endTime?: Date
  • +
  • +
    Optional pageSize?: number
  • +
  • +
    Optional startTime?: Date
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/types/Message.html b/packages/react-sdk/docs/types/Message.html new file mode 100644 index 00000000..0b325106 --- /dev/null +++ b/packages/react-sdk/docs/types/Message.html @@ -0,0 +1,124 @@ +Message | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Type alias Message

+
Message: MessageV1 | MessageV2
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/types/NetworkOptions.html b/packages/react-sdk/docs/types/NetworkOptions.html new file mode 100644 index 00000000..e4099a68 --- /dev/null +++ b/packages/react-sdk/docs/types/NetworkOptions.html @@ -0,0 +1,165 @@ +NetworkOptions | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Type alias NetworkOptions

+
NetworkOptions: {
    apiUrl: string | undefined;
    appVersion?: string;
    env: XmtpEnv;
    skipContactPublishing: boolean;
}
+

Network startup options

+
+
+

Type declaration

+
    +
  • +
    apiUrl: string | undefined
    +

    apiUrl can be used to override the env flag and connect to a +specific endpoint

    +
    +
  • +
  • +
    Optional appVersion?: string
    +

    identifier that's included with API requests.

    +

    For example, you can use the following format: +appVersion: APP_NAME + '/' + APP_VERSION. +Setting this value provides telemetry that shows which apps are +using the XMTP client SDK. This information can help XMTP developers +provide app support, especially around communicating important +SDK updates, including deprecations and required upgrades.

    +
    +
  • +
  • +
    env: XmtpEnv
    +

    Specify which XMTP environment to connect to. (default: dev)

    +
    +
  • +
  • +
    skipContactPublishing: boolean
    +

    Skip publishing the user's contact bundle as part of Client startup.

    +

    This flag should be used with caution, as we rely on contact publishing to +let other users know your public key and periodically run migrations on +this data with new SDK versions.

    +

    Your application should have this flag set to false at least some of the +time.

    +

    The most common use-case for setting this to true is cases where the Client +instance is very short-lived. For example, spinning up a Client to decrypt +a push notification.

    +
    +
+
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/types/PrivateKeyBundle.html b/packages/react-sdk/docs/types/PrivateKeyBundle.html new file mode 100644 index 00000000..34477396 --- /dev/null +++ b/packages/react-sdk/docs/types/PrivateKeyBundle.html @@ -0,0 +1,124 @@ +PrivateKeyBundle | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Type alias PrivateKeyBundle

+
PrivateKeyBundle: PrivateKeyBundleV1 | PrivateKeyBundleV2
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/types/SendOptions.html b/packages/react-sdk/docs/types/SendOptions.html new file mode 100644 index 00000000..2282503d --- /dev/null +++ b/packages/react-sdk/docs/types/SendOptions.html @@ -0,0 +1,137 @@ +SendOptions | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Type alias SendOptions

+
SendOptions: {
    compression?: content.Compression;
    contentFallback?: string;
    contentType?: ContentTypeId;
    ephemeral?: boolean;
    timestamp?: Date;
}
+
+

Type declaration

+
    +
  • +
    Optional compression?: content.Compression
  • +
  • +
    Optional contentFallback?: string
  • +
  • +
    Optional contentType?: ContentTypeId
  • +
  • +
    Optional ephemeral?: boolean
  • +
  • +
    Optional timestamp?: Date
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/types/TopicData.html b/packages/react-sdk/docs/types/TopicData.html new file mode 100644 index 00000000..805610bb --- /dev/null +++ b/packages/react-sdk/docs/types/TopicData.html @@ -0,0 +1,124 @@ +TopicData | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Type alias TopicData

+
TopicData: WithoutUndefined<keystore.TopicMap_TopicData>
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/types/TypingNotification.html b/packages/react-sdk/docs/types/TypingNotification.html new file mode 100644 index 00000000..52280202 --- /dev/null +++ b/packages/react-sdk/docs/types/TypingNotification.html @@ -0,0 +1,133 @@ +TypingNotification | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Type alias TypingNotification

+
TypingNotification: {
    isFinished: boolean;
    timestamp: Date;
    typerAddress: string;
}
+
+

Type declaration

+
    +
  • +
    isFinished: boolean
  • +
  • +
    timestamp: Date
  • +
  • +
    typerAddress: string
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/variables/ApiUrls.html b/packages/react-sdk/docs/variables/ApiUrls.html new file mode 100644 index 00000000..b3f82ff8 --- /dev/null +++ b/packages/react-sdk/docs/variables/ApiUrls.html @@ -0,0 +1,133 @@ +ApiUrls | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Variable ApiUrlsConst

+
ApiUrls: {
    dev: "https://dev.xmtp.network";
    local: "http://localhost:5555";
    production: "https://production.xmtp.network";
}
+
+

Type declaration

+
    +
  • +
    Readonly dev: "https://dev.xmtp.network"
  • +
  • +
    Readonly local: "http://localhost:5555"
  • +
  • +
    Readonly production: "https://production.xmtp.network"
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/variables/Compression.html b/packages/react-sdk/docs/variables/Compression.html new file mode 100644 index 00000000..36520cb6 --- /dev/null +++ b/packages/react-sdk/docs/variables/Compression.html @@ -0,0 +1,124 @@ +Compression | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Variable CompressionConst

+
Compression: typeof content.Compression
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/variables/ContentTypeComposite.html b/packages/react-sdk/docs/variables/ContentTypeComposite.html new file mode 100644 index 00000000..7bbf6e8e --- /dev/null +++ b/packages/react-sdk/docs/variables/ContentTypeComposite.html @@ -0,0 +1,124 @@ +ContentTypeComposite | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Variable ContentTypeCompositeConst

+
ContentTypeComposite: ContentTypeId
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/variables/ContentTypeFallback.html b/packages/react-sdk/docs/variables/ContentTypeFallback.html new file mode 100644 index 00000000..70b7b51c --- /dev/null +++ b/packages/react-sdk/docs/variables/ContentTypeFallback.html @@ -0,0 +1,124 @@ +ContentTypeFallback | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Variable ContentTypeFallbackConst

+
ContentTypeFallback: ContentTypeId
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/variables/ContentTypeText.html b/packages/react-sdk/docs/variables/ContentTypeText.html new file mode 100644 index 00000000..a83a2f96 --- /dev/null +++ b/packages/react-sdk/docs/variables/ContentTypeText.html @@ -0,0 +1,124 @@ +ContentTypeText | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Variable ContentTypeTextConst

+
ContentTypeText: ContentTypeId
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/variables/ContentTypeTypingNotification.html b/packages/react-sdk/docs/variables/ContentTypeTypingNotification.html new file mode 100644 index 00000000..01575170 --- /dev/null +++ b/packages/react-sdk/docs/variables/ContentTypeTypingNotification.html @@ -0,0 +1,124 @@ +ContentTypeTypingNotification | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Variable ContentTypeTypingNotificationConst

+
ContentTypeTypingNotification: ContentTypeId
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/variables/SortDirection.html b/packages/react-sdk/docs/variables/SortDirection.html new file mode 100644 index 00000000..96f7e2ac --- /dev/null +++ b/packages/react-sdk/docs/variables/SortDirection.html @@ -0,0 +1,124 @@ +SortDirection | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Variable SortDirectionConst

+
SortDirection: typeof messageApi.SortDirection
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/react-sdk/docs/variables/messagesDb.html b/packages/react-sdk/docs/variables/messagesDb.html new file mode 100644 index 00000000..28c08ba4 --- /dev/null +++ b/packages/react-sdk/docs/variables/messagesDb.html @@ -0,0 +1,124 @@ +messagesDb | @xmtp/react-sdk
+
+ +
+
+
+
+ +

Variable messagesDb

+
messagesDb: MessagesDB
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file From 73fbca4114e51382d2e77f6710d6d44650f8f7c4 Mon Sep 17 00:00:00 2001 From: Jennifer Hasegawa <5481259+jhaaaa@users.noreply.github.com> Date: Tue, 15 Aug 2023 14:51:27 -0700 Subject: [PATCH 2/6] docs: still testing --- packages/react-sdk/docs/functions/isValidAddress.html | 2 +- packages/react-sdk/docs/functions/useCachedMessages.html | 2 +- packages/react-sdk/docs/functions/useCanMessage.html | 2 +- packages/react-sdk/docs/functions/useClient.html | 2 +- packages/react-sdk/docs/functions/useConversations.html | 2 +- packages/react-sdk/docs/functions/useMessages.html | 2 +- packages/react-sdk/docs/functions/useSendMessage.html | 2 +- packages/react-sdk/docs/functions/useStartConversation.html | 2 +- packages/react-sdk/docs/functions/useStreamAllMessages.html | 2 +- packages/react-sdk/docs/functions/useStreamConversations.html | 2 +- packages/react-sdk/docs/functions/useStreamMessages.html | 2 +- packages/react-sdk/docs/variables/messagesDb.html | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/react-sdk/docs/functions/isValidAddress.html b/packages/react-sdk/docs/functions/isValidAddress.html index 16777fb6..9ecb7a52 100644 --- a/packages/react-sdk/docs/functions/isValidAddress.html +++ b/packages/react-sdk/docs/functions/isValidAddress.html @@ -29,7 +29,7 @@
address: Returns boolean
+
  • Defined in packages/react-sdk/src/helpers/isValidAddress.ts:4
  • +
  • Defined in packages/react-sdk/src/helpers/messagesDb.ts:50