diff --git a/404.html b/404.html index 508a3997..668c9c50 100644 --- a/404.html +++ b/404.html @@ -14,13 +14,13 @@ - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - + + \ No newline at end of file diff --git a/assets/js/17dcfaae.9f87e87c.js b/assets/js/17dcfaae.3d3cedd5.js similarity index 96% rename from assets/js/17dcfaae.9f87e87c.js rename to assets/js/17dcfaae.3d3cedd5.js index 58d971d2..549bcee3 100644 --- a/assets/js/17dcfaae.9f87e87c.js +++ b/assets/js/17dcfaae.3d3cedd5.js @@ -1 +1 @@ -"use strict";(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[2914],{9771:function(e,t,a){a.r(t),a.d(t,{assets:function(){return p},contentTitle:function(){return s},default:function(){return c},frontMatter:function(){return i},metadata:function(){return m},toc:function(){return h}});var n=a(3117),o=a(102),l=(a(7294),a(4137)),r=["components"],i={slug:"gemwallet-looking-for-beta-testers",title:"GemWallet looking for beta testers",authors:"florianb",tags:["GemWallet","Release 2.0.0"]},s=void 0,m={permalink:"/blog/gemwallet-looking-for-beta-testers",editUrl:"https://github.com/GemWallet/gemwallet-website/blob/master/blog/2022-07-26-gemwallet-looking-for-beta-testers.mdx",source:"@site/blog/2022-07-26-gemwallet-looking-for-beta-testers.mdx",title:"GemWallet looking for beta testers",description:"GemWallet Beta - looking for beta testers",date:"2022-07-26T00:00:00.000Z",formattedDate:"July 26, 2022",tags:[{label:"GemWallet",permalink:"/blog/tags/gem-wallet"},{label:"Release 2.0.0",permalink:"/blog/tags/release-2-0-0"}],readingTime:3.135,hasTruncateMarker:!1,authors:[{name:"Florian Bouron",title:"Founder and Maintainer of GemWallet",url:"https://github.com/FlorianBouron",imageURL:"https://github.com/FlorianBouron.png",key:"florianb"}],frontMatter:{slug:"gemwallet-looking-for-beta-testers",title:"GemWallet looking for beta testers",authors:"florianb",tags:["GemWallet","Release 2.0.0"]},prevItem:{title:"Import XUMM wallets into GemWallet",permalink:"/blog/import-xumm-wallets-into-gemwallet"},nextItem:{title:"GemWallet awarded $75,000 by Ripple to speed up its development",permalink:"/blog/gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development"}},p={authorsImageUrls:[void 0]},h=[{value:"Introduction",id:"introduction",level:3},{value:"What's new?",id:"whats-new",level:3},{value:"How to install it?",id:"how-to-install-it",level:3},{value:"How to use it?",id:"how-to-use-it",level:3},{value:"How to give feedback?",id:"how-to-give-feedback",level:3},{value:"What's next?",id:"whats-next",level:3}],u={toc:h};function c(e){var t=e.components,i=(0,o.Z)(e,r);return(0,l.kt)("wrapper",(0,n.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,(0,l.kt)("img",{alt:"GemWallet Beta - looking for beta testers",src:a(1344).Z,width:"1366",height:"768"})),(0,l.kt)("h3",{id:"introduction"},"Introduction"),(0,l.kt)("p",null,"GemWallet has already presented its beta version in a previous article, but now are working hard on version 2.0.0."),(0,l.kt)("p",null,"You can find the last source code of version 2.0.0 on the ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/GemWallet/gemwallet-extension/tree/release/2.0.0"},"release/2.0.0 branch"),"."),(0,l.kt)("p",null,"In this article, I am going to explain to you what changes in this version and what is planned on the TODO list before going to the Chrome Store."),(0,l.kt)("h3",{id:"whats-new"},"What's new?"),(0,l.kt)("p",null,"\ud83c\udf31 Features:"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Refactor transaction payment API"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Make the payload simpler"),(0,l.kt)("li",{parentName:"ul"},"Return the hash of the transaction in case of a successful transaction"),(0,l.kt)("li",{parentName:"ul"},"Return an error in case of an unsuccessful transaction"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Inform the user when the password is wrong")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Allow the user to go to the previous page on import seed phrase or create a new wallet")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Inform users when they don't have enough funds in their wallet before executing a transaction"))),(0,l.kt)("p",null,"\ud83e\uddf0 Tech Improvements:"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"Replace constants by enum"),(0,l.kt)("li",{parentName:"ol"},"Properly catch errors"),(0,l.kt)("li",{parentName:"ol"},"Refactor onboardings"),(0,l.kt)("li",{parentName:"ol"},"Disconnect the WebSocket to the ledger before the extension closes"),(0,l.kt)("li",{parentName:"ol"},"Catch errors within Sentry")),(0,l.kt)("p",null,"And much more, you can check the ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/GemWallet/gemwallet-extension/pull/44"},"release 2.0.0 pull request")," to see the other improvements."),(0,l.kt)("h3",{id:"how-to-install-it"},"How to install it?"),(0,l.kt)("p",null,"To install the last beta version, it's pretty easy:"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Download it ",(0,l.kt)("a",{target:"_blank",href:a(3046).Z},"here"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Extract the zip file you have just downloaded")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Install it in your web browser:"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Chrome: At the top right, click on ",(0,l.kt)("img",{alt:"More",src:a(3888).Z,width:"24",height:"24"}),', "More tools" and then "Extensions".'),(0,l.kt)("li",{parentName:"ul"},"Brave: At the top right, click on ",(0,l.kt)("img",{alt:"More",src:a(3888).Z,width:"24",height:"24"}),', then "Extensions".'))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Activate the developer mode by switching on the slider")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},'Click on "Load unpacked" and select the folder of your extension.')),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Congrats \ud83c\udf89 you now have GemWallet installed."))),(0,l.kt)("p",null,"The video below is put at the right timestamp to show you how to install GemWallet within your web browser."),(0,l.kt)("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/GQFdgM6k60g?start=117",title:"GemWallet Beta Installation",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:!0}),(0,l.kt)("h3",{id:"how-to-use-it"},"How to use it?"),(0,l.kt)("p",null,"To use GemWallet, you need to use the GemWallet API described in the ",(0,l.kt)("a",{parentName:"p",href:"/docs/user-guide/introduction"},"documentation"),"."),(0,l.kt)("p",null,"Unfortunately, the documentation is not up to date as the package is still under development."),(0,l.kt)("p",null,"I am going to show you how to connect the version beta with the following code snippet:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isConnected, sendPayment } from "@gemwallet/api";\n\nexport function Checkout() {\n const handlePayment = () => {\n // We make sure that we are connected to the ledger with the isConnected API\n isConnected().then((isConnected) => {\n if (isConnected) {\n const transaction = {\n amount: "0.999999",\n destination: "rNvFCZXpDtGeQ3bSas15wGLN6N2stGmA9o",\n };\n // We send the payment to the extension which will forward it to the XRP Ledger\n sendPayment(transaction)\n .then((trHash) => {\n // If the transaction is a success, the promise returns a transaction hash\n console.log("Transaction Hash: ", trHash);\n })\n .catch((e) => {\n console.log("THE ERROR: ", e);\n });\n } else {\n console.log("You are not connected");\n }\n });\n };\n\n return (\n \n PAY\n \n );\n}\n')),(0,l.kt)("p",null,"In order to don't pollute the npm repository of GemWallet the beta is under the package: ",(0,l.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/@gemwallet-beta/api"},"@gemwallet-beta/api"),"."),(0,l.kt)("p",null,"The code above is extracted from this repository where you can have an example of implementation: ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/FlorianBouron/gemwallet-store-demo/tree/release/2.0.0"},"https://github.com/FlorianBouron/gemwallet-store-demo/tree/release/2.0.0")),(0,l.kt)("h3",{id:"how-to-give-feedback"},"How to give feedback?"),(0,l.kt)("p",null,"Giving us feedback has never been that easy, there are a few ways:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Contact us on ",(0,l.kt)("a",{parentName:"li",href:"https://twitter.com/gemwallet_app"},"Twitter")),(0,l.kt)("li",{parentName:"ul"},"Join the ",(0,l.kt)("a",{parentName:"li",href:"https://discord.gg/CnkP9KGHBe"},"Discord"))),(0,l.kt)("h3",{id:"whats-next"},"What's next?"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Improvements in explaining the reserved amount within the Ledger"),(0,l.kt)("li",{parentName:"ul"},"Enable GemWallet to be connected to the mainnet"),(0,l.kt)("li",{parentName:"ul"},"Answer to your feedback"),(0,l.kt)("li",{parentName:"ul"},"Create a Sign Method to allow authentication within web3 pages"),(0,l.kt)("li",{parentName:"ul"},"Make the 2.0.0 release"),(0,l.kt)("li",{parentName:"ul"},"And much more (Stay tuned for the next announcements, follow us on ",(0,l.kt)("a",{parentName:"li",href:"https://twitter.com/gemwallet_app"},"Twitter"),").")))}c.isMDXComponent=!0},3046:function(e,t,a){t.Z=a.p+"assets/files/gemwallet-beta-8f2860bee30fe2f6f6cd7b6b18f09f6e.zip"},1344:function(e,t,a){t.Z=a.p+"assets/images/GemWalletBeta-70440d6f296006462a2a3b541921b23e.png"},3888:function(e,t){t.Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAAKElEQVR4AWMYrqDUvfQ5ELoTrQGo+D8QPqeZBoSTqAVGQ2k0lIYpAAA/gTrh2+TtPAAAAABJRU5ErkJggg=="}}]); \ No newline at end of file +"use strict";(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[2914],{9771:function(e,t,a){a.r(t),a.d(t,{assets:function(){return p},contentTitle:function(){return s},default:function(){return c},frontMatter:function(){return i},metadata:function(){return m},toc:function(){return h}});var n=a(3117),o=a(102),l=(a(7294),a(4137)),r=["components"],i={slug:"gemwallet-looking-for-beta-testers",title:"GemWallet looking for beta testers",authors:"florianb",tags:["GemWallet","Release 2.0.0"]},s=void 0,m={permalink:"/blog/gemwallet-looking-for-beta-testers",editUrl:"https://github.com/GemWallet/gemwallet-website/blob/master/blog/2022-07-26-gemwallet-looking-for-beta-testers.mdx",source:"@site/blog/2022-07-26-gemwallet-looking-for-beta-testers.mdx",title:"GemWallet looking for beta testers",description:"GemWallet Beta - looking for beta testers",date:"2022-07-26T00:00:00.000Z",formattedDate:"July 26, 2022",tags:[{label:"GemWallet",permalink:"/blog/tags/gem-wallet"},{label:"Release 2.0.0",permalink:"/blog/tags/release-2-0-0"}],readingTime:3.135,hasTruncateMarker:!1,authors:[{name:"Florian Bouron",title:"Founder and Maintainer of GemWallet",url:"https://github.com/FlorianBouron",imageURL:"https://github.com/FlorianBouron.png",key:"florianb"}],frontMatter:{slug:"gemwallet-looking-for-beta-testers",title:"GemWallet looking for beta testers",authors:"florianb",tags:["GemWallet","Release 2.0.0"]},prevItem:{title:"Import XUMM wallets into GemWallet",permalink:"/blog/import-xumm-wallets-into-gemwallet"},nextItem:{title:"GemWallet awarded $75,000 by Ripple to speed up its development",permalink:"/blog/gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development"}},p={authorsImageUrls:[void 0]},h=[{value:"Introduction",id:"introduction",level:3},{value:"What's new?",id:"whats-new",level:3},{value:"How to install it?",id:"how-to-install-it",level:3},{value:"How to use it?",id:"how-to-use-it",level:3},{value:"How to give feedback?",id:"how-to-give-feedback",level:3},{value:"What's next?",id:"whats-next",level:3}],u={toc:h};function c(e){var t=e.components,i=(0,o.Z)(e,r);return(0,l.kt)("wrapper",(0,n.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,(0,l.kt)("img",{alt:"GemWallet Beta - looking for beta testers",src:a(5867).Z,width:"1366",height:"768"})),(0,l.kt)("h3",{id:"introduction"},"Introduction"),(0,l.kt)("p",null,"GemWallet has already presented its beta version in a previous article, but now are working hard on version 2.0.0."),(0,l.kt)("p",null,"You can find the last source code of version 2.0.0 on the ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/GemWallet/gemwallet-extension/tree/release/2.0.0"},"release/2.0.0 branch"),"."),(0,l.kt)("p",null,"In this article, I am going to explain to you what changes in this version and what is planned on the TODO list before going to the Chrome Store."),(0,l.kt)("h3",{id:"whats-new"},"What's new?"),(0,l.kt)("p",null,"\ud83c\udf31 Features:"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Refactor transaction payment API"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Make the payload simpler"),(0,l.kt)("li",{parentName:"ul"},"Return the hash of the transaction in case of a successful transaction"),(0,l.kt)("li",{parentName:"ul"},"Return an error in case of an unsuccessful transaction"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Inform the user when the password is wrong")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Allow the user to go to the previous page on import seed phrase or create a new wallet")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Inform users when they don't have enough funds in their wallet before executing a transaction"))),(0,l.kt)("p",null,"\ud83e\uddf0 Tech Improvements:"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"Replace constants by enum"),(0,l.kt)("li",{parentName:"ol"},"Properly catch errors"),(0,l.kt)("li",{parentName:"ol"},"Refactor onboardings"),(0,l.kt)("li",{parentName:"ol"},"Disconnect the WebSocket to the ledger before the extension closes"),(0,l.kt)("li",{parentName:"ol"},"Catch errors within Sentry")),(0,l.kt)("p",null,"And much more, you can check the ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/GemWallet/gemwallet-extension/pull/44"},"release 2.0.0 pull request")," to see the other improvements."),(0,l.kt)("h3",{id:"how-to-install-it"},"How to install it?"),(0,l.kt)("p",null,"To install the last beta version, it's pretty easy:"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Download it ",(0,l.kt)("a",{target:"_blank",href:a(3046).Z},"here"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Extract the zip file you have just downloaded")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Install it in your web browser:"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Chrome: At the top right, click on ",(0,l.kt)("img",{alt:"More",src:a(2459).Z,width:"24",height:"24"}),', "More tools" and then "Extensions".'),(0,l.kt)("li",{parentName:"ul"},"Brave: At the top right, click on ",(0,l.kt)("img",{alt:"More",src:a(2459).Z,width:"24",height:"24"}),', then "Extensions".'))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Activate the developer mode by switching on the slider")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},'Click on "Load unpacked" and select the folder of your extension.')),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Congrats \ud83c\udf89 you now have GemWallet installed."))),(0,l.kt)("p",null,"The video below is put at the right timestamp to show you how to install GemWallet within your web browser."),(0,l.kt)("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/GQFdgM6k60g?start=117",title:"GemWallet Beta Installation",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:!0}),(0,l.kt)("h3",{id:"how-to-use-it"},"How to use it?"),(0,l.kt)("p",null,"To use GemWallet, you need to use the GemWallet API described in the ",(0,l.kt)("a",{parentName:"p",href:"/docs/user-guide/introduction"},"documentation"),"."),(0,l.kt)("p",null,"Unfortunately, the documentation is not up to date as the package is still under development."),(0,l.kt)("p",null,"I am going to show you how to connect the version beta with the following code snippet:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isConnected, sendPayment } from "@gemwallet/api";\n\nexport function Checkout() {\n const handlePayment = () => {\n // We make sure that we are connected to the ledger with the isConnected API\n isConnected().then((isConnected) => {\n if (isConnected) {\n const transaction = {\n amount: "0.999999",\n destination: "rNvFCZXpDtGeQ3bSas15wGLN6N2stGmA9o",\n };\n // We send the payment to the extension which will forward it to the XRP Ledger\n sendPayment(transaction)\n .then((trHash) => {\n // If the transaction is a success, the promise returns a transaction hash\n console.log("Transaction Hash: ", trHash);\n })\n .catch((e) => {\n console.log("THE ERROR: ", e);\n });\n } else {\n console.log("You are not connected");\n }\n });\n };\n\n return (\n \n PAY\n \n );\n}\n')),(0,l.kt)("p",null,"In order to don't pollute the npm repository of GemWallet the beta is under the package: ",(0,l.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/@gemwallet-beta/api"},"@gemwallet-beta/api"),"."),(0,l.kt)("p",null,"The code above is extracted from this repository where you can have an example of implementation: ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/FlorianBouron/gemwallet-store-demo/tree/release/2.0.0"},"https://github.com/FlorianBouron/gemwallet-store-demo/tree/release/2.0.0")),(0,l.kt)("h3",{id:"how-to-give-feedback"},"How to give feedback?"),(0,l.kt)("p",null,"Giving us feedback has never been that easy, there are a few ways:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Contact us on ",(0,l.kt)("a",{parentName:"li",href:"https://twitter.com/gemwallet_app"},"Twitter")),(0,l.kt)("li",{parentName:"ul"},"Join the ",(0,l.kt)("a",{parentName:"li",href:"https://discord.gg/CnkP9KGHBe"},"Discord"))),(0,l.kt)("h3",{id:"whats-next"},"What's next?"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Improvements in explaining the reserved amount within the Ledger"),(0,l.kt)("li",{parentName:"ul"},"Enable GemWallet to be connected to the mainnet"),(0,l.kt)("li",{parentName:"ul"},"Answer to your feedback"),(0,l.kt)("li",{parentName:"ul"},"Create a Sign Method to allow authentication within web3 pages"),(0,l.kt)("li",{parentName:"ul"},"Make the 2.0.0 release"),(0,l.kt)("li",{parentName:"ul"},"And much more (Stay tuned for the next announcements, follow us on ",(0,l.kt)("a",{parentName:"li",href:"https://twitter.com/gemwallet_app"},"Twitter"),").")))}c.isMDXComponent=!0},3046:function(e,t,a){t.Z=a.p+"assets/files/gemwallet-beta-8f2860bee30fe2f6f6cd7b6b18f09f6e.zip"},5867:function(e,t,a){t.Z=a.p+"assets/images/GemWalletBeta-70440d6f296006462a2a3b541921b23e.png"},2459:function(e,t){t.Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAAKElEQVR4AWMYrqDUvfQ5ELoTrQGo+D8QPqeZBoSTqAVGQ2k0lIYpAAA/gTrh2+TtPAAAAABJRU5ErkJggg=="}}]); \ No newline at end of file diff --git a/assets/js/8fc7e548.19402ec7.js b/assets/js/1e05e779.552a1541.js similarity index 68% rename from assets/js/8fc7e548.19402ec7.js rename to assets/js/1e05e779.552a1541.js index 5d646e76..98a5b19d 100644 --- a/assets/js/8fc7e548.19402ec7.js +++ b/assets/js/1e05e779.552a1541.js @@ -1 +1 @@ -"use strict";(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[2387],{4469:function(e){e.exports=JSON.parse('{"name":"docusaurus-plugin-content-blog","id":"default"}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[8103],{4469:function(e){e.exports=JSON.parse('{"name":"docusaurus-plugin-content-blog","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/47b0b88f.3fb61dc3.js b/assets/js/47b0b88f.3fb61dc3.js deleted file mode 100644 index edeb9c1b..00000000 --- a/assets/js/47b0b88f.3fb61dc3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[1580],{9754:function(e,n,t){t.r(n),t.d(n,{assets:function(){return u},contentTitle:function(){return o},default:function(){return d},frontMatter:function(){return i},metadata:function(){return p},toc:function(){return m}});var a=t(3117),r=t(102),l=(t(7294),t(4137)),s=["components"],i={id:"gemwallet-api-reference",title:"Reference",description:"Provides the documentation on how to use GemWallet API."},o=void 0,p={unversionedId:"api/gemwallet-api-reference",id:"api/gemwallet-api-reference",title:"Reference",description:"Provides the documentation on how to use GemWallet API.",source:"@site/docs/api/reference.md",sourceDirName:"api",slug:"/api/gemwallet-api-reference",permalink:"/docs/next/api/gemwallet-api-reference",draft:!1,editUrl:"https://github.com/GemWallet/gemwallet-website/blob/master/docs/api/reference.md",tags:[],version:"current",frontMatter:{id:"gemwallet-api-reference",title:"Reference",description:"Provides the documentation on how to use GemWallet API."},sidebar:"docs",previous:{title:"Installation",permalink:"/docs/next/api/gemwallet-api-installation"},next:{title:"acceptNFTOffer",permalink:"/docs/next/playground/acceptNFTOffer"}},u={},m=[{value:"Methods",id:"methods",level:2},{value:"acceptNFTOffer",id:"acceptnftoffer",level:3},{value:"Request",id:"request",level:4},{value:"Response",id:"response",level:4},{value:"Error Handling",id:"error-handling",level:4},{value:"Examples",id:"examples",level:4},{value:"burnNFT",id:"burnnft",level:3},{value:"Request",id:"request-1",level:4},{value:"Response",id:"response-1",level:4},{value:"Error Handling",id:"error-handling-1",level:4},{value:"Examples",id:"examples-1",level:4},{value:"cancelNFTOffer",id:"cancelnftoffer",level:3},{value:"Request",id:"request-2",level:4},{value:"Response",id:"response-2",level:4},{value:"Error Handling",id:"error-handling-2",level:4},{value:"Examples",id:"examples-2",level:4},{value:"cancelOffer",id:"canceloffer",level:3},{value:"Request",id:"request-3",level:4},{value:"Response",id:"response-3",level:4},{value:"Error Handling",id:"error-handling-3",level:4},{value:"Examples",id:"examples-3",level:4},{value:"createNFTOffer",id:"createnftoffer",level:3},{value:"Request",id:"request-4",level:4},{value:"Response",id:"response-4",level:4},{value:"Error Handling",id:"error-handling-4",level:4},{value:"Examples",id:"examples-4",level:4},{value:"createOffer",id:"createoffer",level:3},{value:"Request",id:"request-5",level:4},{value:"Response",id:"response-5",level:4},{value:"Error Handling",id:"error-handling-5",level:4},{value:"Examples",id:"examples-5",level:4},{value:"getAddress",id:"getaddress",level:3},{value:"Request",id:"request-6",level:4},{value:"Response",id:"response-6",level:4},{value:"Error Handling",id:"error-handling-6",level:4},{value:"Examples",id:"examples-6",level:4},{value:"getNetwork",id:"getnetwork",level:3},{value:"Request",id:"request-7",level:4},{value:"Response",id:"response-7",level:4},{value:"Error Handling",id:"error-handling-7",level:4},{value:"Examples",id:"examples-7",level:4},{value:"getNFT",id:"getnft",level:3},{value:"Request",id:"request-8",level:4},{value:"Response",id:"response-8",level:4},{value:"Error Handling",id:"error-handling-8",level:4},{value:"Examples",id:"examples-8",level:4},{value:"getPublicKey",id:"getpublickey",level:3},{value:"Request",id:"request-9",level:4},{value:"Response",id:"response-9",level:4},{value:"Error Handling",id:"error-handling-9",level:4},{value:"Examples",id:"examples-9",level:4},{value:"isInstalled",id:"isinstalled",level:3},{value:"Request",id:"request-10",level:4},{value:"Response",id:"response-10",level:4},{value:"Examples",id:"examples-10",level:4},{value:"mintNFT",id:"mintnft",level:3},{value:"Request",id:"request-11",level:4},{value:"Response",id:"response-11",level:4},{value:"Error Handling",id:"error-handling-10",level:4},{value:"Examples",id:"examples-11",level:4},{value:"sendPayment",id:"sendpayment",level:3},{value:"Request",id:"request-12",level:4},{value:"Response",id:"response-12",level:4},{value:"Error Handling",id:"error-handling-11",level:4},{value:"Examples",id:"examples-12",level:4},{value:"setAccount",id:"setaccount",level:3},{value:"Request",id:"request-13",level:4},{value:"Response",id:"response-13",level:4},{value:"Error Handling",id:"error-handling-12",level:4},{value:"Examples",id:"examples-13",level:4},{value:"setTrustLine",id:"settrustline",level:3},{value:"Request",id:"request-14",level:4},{value:"Response",id:"response-14",level:4},{value:"Error Handling",id:"error-handling-13",level:4},{value:"Examples",id:"examples-14",level:4},{value:"signMessage",id:"signmessage",level:3},{value:"Request",id:"request-15",level:4},{value:"Response",id:"response-15",level:4},{value:"Error Handling",id:"error-handling-14",level:4},{value:"Examples",id:"examples-15",level:4},{value:"submitTransaction",id:"submittransaction",level:3},{value:"Request",id:"request-16",level:4},{value:"Response",id:"response-16",level:4},{value:"Error Handling",id:"error-handling-15",level:4},{value:"Examples",id:"examples-16",level:4},{value:"Other",id:"other",level:2},{value:"BaseTransactionRequest",id:"basetransactionrequest",level:3}],c={toc:m};function d(e){var n=e.components,t=(0,r.Z)(e,s);return(0,l.kt)("wrapper",(0,a.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"methods"},"Methods"),(0,l.kt)("h3",{id:"acceptnftoffer"},"acceptNFTOffer"),(0,l.kt)("p",null,"Accepts an existing offer for a Non-Fungible Token (NFT) through the extension."),(0,l.kt)("h4",{id:"request"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"AcceptNFTOfferRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenSellOffer"),": Identifies the NFTokenOffer that offers to sell the NFToken."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenBuyOffer"),": Identifies the NFTokenOffer that offers to buy the NFToken."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenBrokerFee"),":\nThis field is only valid in brokered mode, and specifies the amount that the broker keeps as part of their fee for bringing the two offers together; the remaining amount is sent to the seller of the NFToken being bought. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"If specified, the fee must be such that, before applying the transfer fee, the amount that the seller would receive is at least as much as the amount indicated in the sell offer."),(0,l.kt)("li",{parentName:"ul"},"Specified in one of the following formats:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"A ",(0,l.kt)("em",{parentName:"li"},"string")," representing the number of XRP to deliver, in drops."),(0,l.kt)("li",{parentName:"ul"},"An ",(0,l.kt)("em",{parentName:"li"},"object")," where 'value' is a string representing the number of the token to deliver."),(0,l.kt)("li",{parentName:"ul"},"More technical details about the amount formats can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),".")))))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface AcceptNFTOfferRequest extends BaseTransactionRequest {\n // Identifies the NFTokenOffer that offers to sell the NFToken.\n NFTokenSellOffer?: string;\n // Identifies the NFTokenOffer that offers to buy the NFToken.\n NFTokenBuyOffer?: string;\n // This field is only valid in brokered mode, and specifies the amount that the broker keeps as part of their fee for\n // bringing the two offers together; the remaining amount is sent to the seller of the NFToken being bought.\n // If specified, the fee must be such that, before applying the transfer fee, the amount that the seller would receive\n // is at least as much as the amount indicated in the sell offer.\n NFTokenBrokerFee?: Amount;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type Amount = {\n currency: string;\n issuer: string;\n value: string;\n} | string;\n")),(0,l.kt)("p",null,"More details about the amount format can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."),(0,l.kt)("h4",{id:"response"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { acceptNFTOffer } from "@gemwallet/api";\n\nconst payload = {\n NFTokenSellOffer: "Replace me!",\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\nacceptNFTOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, acceptNFTOffer } from "@gemwallet/api";\n\nfunction App() {\n const handleAcceptOffer = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n NFTokenSellOffer: "Replace me!",\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n acceptNFTOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"burnnft"},"burnNFT"),(0,l.kt)("p",null,"Burns a Non-Fungible Token (NFT) through the extension."),(0,l.kt)("h4",{id:"request-1"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"BurnNFTRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenID"),": The NFToken to be removed by this transaction."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"owner"),": The owner of the NFToken to burn. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Only used if that owner is different than the account sending this transaction."),(0,l.kt)("li",{parentName:"ul"},"The issuer or authorized minter can use this field to burn NFTs that have the lsfBurnable flag enabled.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface BurnNFTRequest extends BaseTransactionRequest {\n // The NFToken to be removed by this transaction.\n NFTokenID: string;\n // The owner of the NFToken to burn. Only used if that owner is different than the account sending this transaction.\n // The issuer or authorized minter can use this field to burn NFTs that have the lsfBurnable flag enabled.\n owner?: string;\n}\n")),(0,l.kt)("h4",{id:"response-1"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-1"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-1"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { burnNFT } from "@gemwallet/api";\n\nconst payload = {\n NFTokenID: "Replace me!",\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\nburnNFT(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, burnNFT } from "@gemwallet/api";\n\nfunction App() {\n const handleBurnNFT = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n NFTokenID: "Replace me!",\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n burnNFT(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"cancelnftoffer"},"cancelNFTOffer"),(0,l.kt)("p",null,"Cancels an existing offer for a Non-Fungible Token (NFT) through the extension."),(0,l.kt)("h4",{id:"request-2"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"CancelNFTOfferRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenOffers"),": An array of IDs of the NFTokenOffer objects to cancel. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Each entry must be a different object ID of an NFTokenOffer object; the transaction is invalid if the array contains duplicate entries.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface CancelNFTOfferRequest extends BaseTransactionRequest {\n // An array of IDs of the NFTokenOffer objects to cancel (not the IDs of NFToken objects, but the IDs of the\n // NFTokenOffer objects). Each entry must be a different object ID of an NFTokenOffer object; the transaction is\n // invalid if the array contains duplicate entries.\n NFTokenOffers: string[];\n}\n")),(0,l.kt)("h4",{id:"response-2"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-2"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-2"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { cancelNFTOffer } from "@gemwallet/api";\n\nconst payload = {\n NFTokenOffers: ["Replace me!"],\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\ncancelNFTOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, cancelNFTOffer } from "@gemwallet/api";\n\nfunction App() {\n const handleCancelNFTOffer = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n NFTokenOffers: ["Replace me!"],\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n cancelNFTOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"canceloffer"},"cancelOffer"),(0,l.kt)("p",null,"Cancels an existing offer through the extension."),(0,l.kt)("h4",{id:"request-3"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"CancelOfferRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"offerSequence"),": The sequence number (or Ticket number) of a previous OfferCreate transaction. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"If specified, cancel any offer object in the ledger that was created by that transaction. "),(0,l.kt)("li",{parentName:"ul"},"It is not considered an error if the offer specified does not exist.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface CancelOfferRequest extends BaseTransactionRequest {\n // The sequence number (or Ticket number) of a previous OfferCreate transaction. If specified, cancel any offer object\n // in the ledger that was created by that transaction. It is not considered an error if the offer specified does not\n // exist.\n offerSequence: number;\n}\n")),(0,l.kt)("h4",{id:"response-3"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-3"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-3"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { cancelOffer } from "@gemwallet/api";\n\nconst payload = {\n offerSequence: 0, // Replace me!\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\ncancelOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, cancelOffer } from "@gemwallet/api";\n\nfunction App() {\n const handleCancelOffer = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n offerSequence: 0, // Replace me!\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n cancelOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"createnftoffer"},"createNFTOffer"),(0,l.kt)("p",null,"Creates a new offer for a Non-Fungible Token (NFT) through the extension."),(0,l.kt)("h4",{id:"request-4"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"CreateNFTOfferRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenID"),": Identifies the NFTokenID of the NFToken object that the offer references."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"amount"),": Indicates the amount expected or offered for the Token.",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"The amount must be non-zero, except when this is a sell offer and the asset is XRP. This would indicate that the current owner of the token is giving it away free, either to anyone at all, or to the account identified by the Destination field."),(0,l.kt)("li",{parentName:"ul"},"Specified in one of the following formats:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"A ",(0,l.kt)("em",{parentName:"li"},"string")," representing the number of XRP to deliver, in drops."),(0,l.kt)("li",{parentName:"ul"},"An ",(0,l.kt)("em",{parentName:"li"},"object")," where 'value' is a string representing the number of the token to deliver."),(0,l.kt)("li",{parentName:"ul"},"More technical details about the amount formats can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."))))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"owner"),": Indicates the AccountID of the account that owns the corresponding NFToken. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"If the offer is to buy a token, this field must be present and it must be different than Account (since an offer to buy a token one already holds is meaningless). "),(0,l.kt)("li",{parentName:"ul"},"If the offer is to sell a token, this field must not be present, as the owner is, implicitly, the same as Account (since an offer to sell a token one doesn't already hold is meaningless)."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"expiration"),": Indicates the time after which the offer will no longer be valid. The value is the number of seconds since the Ripple Epoch."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"destination"),": If present, indicates that this offer may only be accepted by the specified account. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Attempts by other accounts to accept this offer MUST fail."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"flags"),": Flags to set on the transaction.")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface CreateNFTOfferRequest extends BaseTransactionRequest {\n // Identifies the NFTokenID of the NFToken object that the offer references.\n NFTokenID: string;\n // Indicates the amount expected or offered for the Token.\n // The amount must be non-zero, except when this is a sell offer and the asset is XRP. This would indicate that the\n // current owner of the token is giving it away free, either to anyone at all, or to the account identified by the\n // Destination field.\n amount: Amount;\n // Indicates the AccountID of the account that owns the corresponding NFToken.\n // If the offer is to buy a token, this field must be present and it must be different than Account (since an offer\n // to buy a token one already holds is meaningless).\n // If the offer is to sell a token, this field must not be present, as the owner is, implicitly, the same as Account\n // (since an offer to sell a token one doesn't already hold is meaningless).\n owner?: string;\n // Indicates the time after which the offer will no longer be valid. The value is the number of seconds since the\n // Ripple Epoch.\n expiration?: number;\n // If present, indicates that this offer may only be accepted by the specified account. Attempts by other accounts to\n // accept this offer MUST fail.\n destination?: string;\n flags?: CreateNFTOfferFlags;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type CreateNFTOfferFlags = {\n tfSellNFToken?: boolean;\n} | number;\n")),(0,l.kt)("p",null,"More details about the flags can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#flags-field"},"here"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type Amount = {\n currency: string;\n issuer: string;\n value: string;\n} | string;\n")),(0,l.kt)("p",null,"More details about the amount format can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."),(0,l.kt)("h4",{id:"response-4"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-4"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-4"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { createNFTOffer } from "@gemwallet/api";\n\nconst payload = {\n NFTokenID: "Replace me!",\n amount: 50000000, // 50 XRP\n fee: "199",\n flags: {\n tfSellNFToken: true // If enabled, indicates that the offer is a sell offer. Otherwise, it is a buy offer.\n },\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\ncreateNFTOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, createNFTOffer } from "@gemwallet/api";\n\nfunction App() {\n const handleCreateNFTOffer = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n NFTokenID: "Replace me!",\n amount: 50000000, // 50 XRP\n fee: "199",\n flags: {\n tfSellNFToken: true // If enabled, indicates that the offer is a sell offer. Otherwise, it is a buy offer.\n },\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n createNFTOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"createoffer"},"createOffer"),(0,l.kt)("p",null,"Creates a new offer through the extension."),(0,l.kt)("h4",{id:"request-5"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"CreateOfferRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"flags"),": Flags to set on the transaction."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"expiration"),": Time after which the Offer is no longer active, in seconds since the Ripple Epoch."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"offerSequence"),": An Offer to delete first, specified in the same way as OfferCancel."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"takerGets"),": The amount and type of currency being sold, in one of the following formats:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"A ",(0,l.kt)("em",{parentName:"li"},"string")," representing the number of XRP to deliver, in drops."),(0,l.kt)("li",{parentName:"ul"},"An ",(0,l.kt)("em",{parentName:"li"},"object")," where 'value' is a string representing the number of the token to deliver."),(0,l.kt)("li",{parentName:"ul"},"More technical details about the amount formats can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"takerPays"),": The amount and type of currency being bought, in one of the following formats:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"A ",(0,l.kt)("em",{parentName:"li"},"string")," representing the number of XRP to deliver, in drops."),(0,l.kt)("li",{parentName:"ul"},"An ",(0,l.kt)("em",{parentName:"li"},"object")," where 'value' is a string representing the number of the token to deliver."),(0,l.kt)("li",{parentName:"ul"},"More technical details about the amount formats can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),".")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface CreateOfferRequest extends BaseTransactionRequest {\n flags?: CreateOfferFlags;\n // Time after which the Offer is no longer active, in seconds since the Ripple Epoch.\n expiration?: number;\n // An Offer to delete first, specified in the same way as OfferCancel.\n offerSequence?: number;\n // The amount and type of currency being sold.\n takerGets: Amount;\n // The amount and type of currency being bought.\n takerPays: Amount;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type OfferCreateFlagsInterface = {\n tfPassive?: boolean;\n tfImmediateOrCancel?: boolean;\n tfFillOrKill?: boolean;\n tfSell?: boolean;\n} | number;\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type Amount = {\n currency: string;\n issuer: string;\n value: string;\n} | string;\n")),(0,l.kt)("p",null,"More details about the amount format can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."),(0,l.kt)("h4",{id:"response-5"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-5"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-5"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { createOffer } from "@gemwallet/api";\n\nconst payload = {\n takerGets: "10000000", // 10 XRP\n takerPays: {\n currency: "ETH",\n issuer: "rnm76Qgz4G9G4gZBJVuXVvkbt7gVD7szey",\n value: "0.1"\n },\n flags: {\n tfPassive: true\n },\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\ncreateOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, createOffer } from "@gemwallet/api";\n\nfunction App() {\n const handleCreateOffer = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n takerGets: "10000000", // 10 XRP\n takerPays: {\n currency: "ETH",\n issuer: "rnm76Qgz4G9G4gZBJVuXVvkbt7gVD7szey",\n value: "0.1"\n },\n flags: {\n tfPassive: true\n },\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n createOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"getaddress"},"getAddress"),(0,l.kt)("p",null,"Retrieves the wallet address associated with the extension."),(0,l.kt)("h4",{id:"request-6"},"Request"),(0,l.kt)("p",null,"This function does not require any parameters."),(0,l.kt)("h4",{id:"response-6"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address"),": The classic address of the wallet.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n address: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-6"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-6"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { getAddress } from "@gemwallet/api";\n\ngetAddress().then((response) => {\n console.log(response.result?.address);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, getAddress } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n getAddress().then((response) => {\n console.log(`Your address: ${response.result?.address}`);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"getnetwork"},"getNetwork"),(0,l.kt)("p",null,"Retrieves the network associated with the extension."),(0,l.kt)("h4",{id:"request-7"},"Request"),(0,l.kt)("p",null,"This function does not require any parameters."),(0,l.kt)("h4",{id:"response-7"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"network"),": The network name as a string.")))),(0,l.kt)("p",null,"Returns:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"Mainnet")," if the user is connected to the ",(0,l.kt)("inlineCode",{parentName:"li"},"main network"),"."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"Testnet")," if the user is connected to the ",(0,l.kt)("inlineCode",{parentName:"li"},"test network"),"."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"Devnet")," if the user is connected to the ",(0,l.kt)("inlineCode",{parentName:"li"},"developer network"),"."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"AMM-Devnet")," if the user is connected to the ",(0,l.kt)("inlineCode",{parentName:"li"},"AMM Devnet"),".")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n network: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-7"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-7"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { getNetwork } from "@gemwallet/api";\n\ngetNetwork().then((response) => {\n console.log(response.result?.network);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, getNetwork } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n getNetwork().then((response) => {\n console.log(`Your network: ${response.result?.network}`);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"getnft"},"getNFT"),(0,l.kt)("p",null,"Retrieves NFTs associated with the wallet."),(0,l.kt)("h4",{id:"request-8"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Optional")," - This function requires an optional payload parameter which has properties defined by ",(0,l.kt)("inlineCode",{parentName:"p"},"GetNFTRequest"),"."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"limit"),": The maximum number of NFTs to return."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"marker"),": A value from a previous paginated response. This is used to resume retrieving data where the previous response left off.")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface GetNFTRequest {\n // Limit the number of NFTokens to retrieve.\n limit?: number;\n // Value from a previous paginated response. Resume retrieving data where that response left off.\n marker?: unknown;\n}\n")),(0,l.kt)("h4",{id:"response-8"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"account_nfts"),": AccountNFToken[] - An array of NFTs associated with the wallet."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"marker"),": A value to be used as a marker in a subsequent request.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n account_nfts: AccountNFToken[];\n marker: unknown;\n}\n')),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface AccountNFToken {\n Flags: number;\n Issuer: string;\n NFTokenID: string;\n NFTokenTaxon: number;\n URI?: string;\n nft_serial: number;\n}\n")),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-8"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-8"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { getNFT } from "@gemwallet/api";\n\ngetNFT({ limit: 10 }).then((response) => {\n console.log(response.result?.account_nfts);\n});\n')),(0,l.kt)("p",null,"Here is an example of implementation:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, getNFT } from "@gemwallet/api";\n\nfunction App() {\n const handleNFTs = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n getNFT().then((result) => {\n console.log("Your NFTs: ", result.result?.account_nfts);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"getpublickey"},"getPublicKey"),(0,l.kt)("p",null,"Retrieves the public key associated with the wallet."),(0,l.kt)("h4",{id:"request-9"},"Request"),(0,l.kt)("p",null,"This function does not require any parameters."),(0,l.kt)("h4",{id:"response-9"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address"),": Classic address of the wallet."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"publicKey"),": Public key of the wallet.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n address: string;\n publicKey: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-9"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-9"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { getPublicKey } from "@gemwallet/api";\n\ngetPublicKey().then((response) => {\n console.log(`${response.result?.address} - ${response.result?.publicKey}`);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, getPublicKey } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n getPublicKey().then((response) => {\n console.log(\n `${response.result?.address} - ${response.result?.publicKey}`\n );\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"isinstalled"},"isInstalled"),(0,l.kt)("p",null,"Checks if the GemWallet extension is installed in the user's browser."),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"We definitely recommend that you check if the user has GemWallet installed before using any of the other methods available.")),(0,l.kt)("h4",{id:"request-10"},"Request"),(0,l.kt)("p",null,"This function does not require any parameters."),(0,l.kt)("h4",{id:"response-10"},"Response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},"result: {\n isInstalled: boolean;\n}\n")),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"isInstalled"),": ",(0,l.kt)("inlineCode",{parentName:"li"},"true")," if the user has GemWallet extension installed, ",(0,l.kt)("inlineCode",{parentName:"li"},"false")," otherwise.")),(0,l.kt)("h4",{id:"examples-10"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled } from "@gemwallet/api";\n\nisInstalled().then((response) => {\n console.log(response.result.isInstalled);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (!response.result.isInstalled) {\n console.log("GemWallet is not installed");\n } else {\n console.log("GemWallet is installed");\n }\n });\n };\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"mintnft"},"mintNFT"),(0,l.kt)("p",null,"Mints a new Non-Fungible Token (NFT) through the extension."),(0,l.kt)("h4",{id:"request-11"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"MintNFTRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"flags"),": Flags to be set on the transaction."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"issuer"),": Indicates the issuer of the token. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Should only be specified if the account executing the transaction is not the Issuer of the token, e.g. when minting on behalf of another account."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenTaxon"),": Indicates the taxon associated with this token. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"The taxon is generally a value chosen by the minter of the token and a given taxon may be used for multiple tokens. "),(0,l.kt)("li",{parentName:"ul"},"The implementation reserves taxon identifiers greater than or equal to 2147483648 (0x80000000). "),(0,l.kt)("li",{parentName:"ul"},"If you have no use for this field, set it to 0."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"transferFee"),": Specifies the fee charged by the issuer for secondary sales of the Token, if such sales are allowed. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Valid values for this field are between 0 and 50000 inclusive, allowing transfer rates between 0.000% and 50.000% in increments of 0.001%. "),(0,l.kt)("li",{parentName:"ul"},"This field must NOT be present if the tfTransferable flag is not set."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"URI"),": URI that points to the data and/or metadata associated with the NFT. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},'This field need not be an HTTP or HTTPS URL; it could be an IPFS URI, a magnet link, immediate data encoded as an RFC2379 "data" URL, or even an opaque issuer-specific encoding. '),(0,l.kt)("li",{parentName:"ul"},"The URI is NOT checked for validity, but the field is limited to a maximum length of 256 bytes. "),(0,l.kt)("li",{parentName:"ul"},"This field must be hex-encoded.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},'interface MintNFTRequest extends BaseTransactionRequest {\n flags?: MintNFTFlags;\n // Indicates the issuer of the token.\n // Should only be specified if the account executing the transaction is not the Issuer of the token, e.g. when minting on behalf of another account.\n issuer?: string;\n // Indicates the taxon associated with this token. The taxon is generally a value chosen by the minter of the token\n // and a given taxon may be used for multiple tokens. The implementation reserves taxon identifiers greater than or\n // equal to 2147483648 (0x80000000). If you have no use for this field, set it to 0.\n NFTokenTaxon: number;\n // Specifies the fee charged by the issuer for secondary sales of the Token, if such sales are allowed. Valid values\n // for this field are between 0 and 50000 inclusive, allowing transfer rates between 0.000% and 50.000% in increments\n // of 0.001%. This field must NOT be present if the tfTransferable flag is not set.\n transferFee?: number;\n // URI that points to the data and/or metadata associated with the NFT. This field need not be an HTTP or HTTPS URL;\n // it could be an IPFS URI, a magnet link, immediate data encoded as an RFC2379 "data" URL, or even an opaque\n // issuer-specific encoding. The URI is NOT checked for validity, but the field is limited to a maximum length of\n // 256 bytes.\n // This field must be hex-encoded.\n URI?: string;\n}\n')),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type MintNFTFlags = {\n tfBurnable?: boolean;\n tfOnlyXRP?: boolean;\n tfTrustLine?: boolean;\n tfTransferable?: boolean;\n} | number;\n")),(0,l.kt)("p",null,"More details about the flags can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#flags-field"},"here"),"."),(0,l.kt)("h4",{id:"response-11"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenID"),": The ID of the NFT."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n NFTokenID: string;\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-10"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-11"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { mintNFT } from "@gemwallet/api";\n\nconst payload = {\n URI: "4d696e746564207468726f7567682047656d57616c6c657421",\n flags: {\n tfOnlyXRP: true,\n tfTransferable: true\n },\n fee: "199",\n transferFee: 3000, // 3%,\n NFTokenTaxon: 0,\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\nmintNFT(payload).then((response) => {\n console.log("NFT ID: ", response.result?.NFTokenID);\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, mintNFT } from "@gemwallet/api";\n\nfunction App() {\n const handleMintNFT = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n URI: "4d696e746564207468726f7567682047656d57616c6c657421",\n flags: {\n tfOnlyXRP: true,\n tfTransferable: true\n },\n fee: "199",\n transferFee: 3000, // 3%,\n NFTokenTaxon: 0,\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n mintNFT(payload).then((response) => {\n console.log("NFT ID: ", response.result?.NFTokenID);\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"sendpayment"},"sendPayment"),(0,l.kt)("p",null,"Initiates a payment transaction through the extension."),(0,l.kt)("h4",{id:"request-12"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload object as an input parameter, which has properties defined by ",(0,l.kt)("inlineCode",{parentName:"p"},"SendPaymentRequest"),"."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"amount"),": The amount to deliver, in one of the following formats:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"A ",(0,l.kt)("em",{parentName:"li"},"string")," representing the number of XRP to deliver, in drops."),(0,l.kt)("li",{parentName:"ul"},"An ",(0,l.kt)("em",{parentName:"li"},"object")," where 'value' is a string representing the number of the token to deliver."),(0,l.kt)("li",{parentName:"ul"},"More technical details about the amount formats can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"destination"),": The unique address of the account receiving the payment."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"memos"),": The memos to attach to the transaction. Each attribute of each memo must be hex encoded.",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"More technical details about the memos can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/transaction-common-fields.html#memos-field"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"destinationTag"),": The destination tag to attach to the transaction."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"fee"),": Integer amount of XRP, in drops, to be destroyed as a cost for distributing this transaction to the network.",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"More technical details about the drops can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/currency-formats.html#xrp-amounts"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"flags"),": Flags to set on the transaction.")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"export interface SendPaymentRequest {\n // The amount to deliver, in one of the following formats:\n // - A string representing the number of XRP to deliver, in drops.\n // - An object where 'value' is a string representing the number of the token to deliver.\n amount: Amount;\n // The unique address of the account receiving the payment\n destination: string;\n // The memos to attach to the transaction\n // Each attribute of each memo must be hex encoded\n memos?: Memo[];\n // The destination tag to attach to the transaction\n destinationTag?: number;\n // Integer amount of XRP, in drops, to be destroyed as a cost for distributing this transaction to the network\n fee?: string;\n // Flags to set on the transaction\n flags?: PaymentFlags;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type Amount = {\n currency: string;\n issuer: string;\n value: string;\n} | string;\n")),(0,l.kt)("p",null,"More details about the amount format can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface Memo {\n memo: {\n memoType?: string;\n memoData?: string;\n memoFormat?: string;\n };\n}\n")),(0,l.kt)("p",null,"More technical details about the memos can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#memos-field"},"here"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type PaymentFlags = {\n tfNoDirectRipple?: boolean;\n tfPartialPayment?: boolean;\n tfLimitQuality?: boolean;\n} | number;\n")),(0,l.kt)("p",null,"More details about the flags can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#flags-field"},"here"),"."),(0,l.kt)("h4",{id:"response-12"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-11"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-12"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { sendPayment } from "@gemwallet/api";\n\nconst payload = {\n amount: "1000000", // In drops (1 XRP)\n destination: "rLWQskMM8EoPxaLsmuQxE5rYeP4uX7dhym",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f",\n },\n },\n ],\n destinationTag: 12,\n fee: "199",\n flags: {\n tfNoDirectRipple: false,\n tfPartialPayment: false,\n tfLimitQuality: false,\n },\n};\n\nsendPayment(payload).then((response) => {\n console.log(response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example for an XRP Payment with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, sendPayment } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payment = {\n amount: "1000000", // In drops (1 XRP)\n destination: "rLWQskMM8EoPxaLsmuQxE5rYeP4uX7dhym",\n };\n sendPayment(payment).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("p",null,"Here is an example for an ETH Payment with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, sendPayment } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payment = {\n amount: {\n currency: "ETH",\n value: "0.01", // In currency\n issuer: "rnm76Qgz4G9G4gZBJVuXVvkbt7gVD7szey",\n },\n destination: "rLWQskMM8EoPxaLsmuQxE5rYeP4uX7dhym",\n };\n sendPayment(payment).then((trHash) => {\n console.log("Transaction Hash: ", trHash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"setaccount"},"setAccount"),(0,l.kt)("p",null,"Sets an account through the extension."),(0,l.kt)("h4",{id:"request-13"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"SetAccountRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"flags"),": Flags to set on the transaction."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"clearFlag"),": Unique identifier of a flag to disable for this account."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"domain"),": The domain that owns this account, as a string of hex representing the ASCII for the domain in lowercase. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Cannot be more than 256 bytes in length."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"emailHash"),": An arbitrary 128-bit value. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Conventionally, clients treat this as the md5 hash of an email address to use for displaying a Gravatar image."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"messageKey"),": Public key for sending encrypted messages to this account. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"To set the key, it must be exactly 33 bytes, with the first byte indicating the key type: 0x02 or 0x03 for secp256k1 keys, 0xED for Ed25519 keys. "),(0,l.kt)("li",{parentName:"ul"},"To remove the key, use an empty value."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenMinter"),": Another account that can mint NFTokens for you."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"setFlag"),": Integer flag to enable for this account."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"transferRate"),": The fee to charge when users transfer this account's tokens, represented as billionths of a unit. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Cannot be more than 2000000000 or less than 1000000000, except for the special case 0 meaning no fee."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"tickSize"),": Tick size to use for offers involving a currency issued by this address. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"The exchange rates of those offers is rounded to this many significant digits. "),(0,l.kt)("li",{parentName:"ul"},"Valid values are 3 to 15 inclusive, or 0 to disable.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface SetAccountRequest extends BaseTransactionRequest {\n flags?: SetAccountFlags;\n // Unique identifier of a flag to disable for this account.\n clearFlag?: number;\n // The domain that owns this account, as a string of hex representing the ASCII for the domain in lowercase.\n // Cannot be more than 256 bytes in length.\n domain?: string;\n // An arbitrary 128-bit value. Conventionally, clients treat this as the md5 hash of an email address to use for\n // displaying a Gravatar image.\n emailHash?: string;\n // Public key for sending encrypted messages to this account. To set the key, it must be exactly 33 bytes, with the\n // first byte indicating the key type: 0x02 or 0x03 for secp256k1 keys, 0xED for Ed25519 keys. To remove the key, use\n // an empty value.\n messageKey?: string;\n // Another account that can mint NFTokens for you.\n NFTokenMinter?: string;\n // Integer flag to enable for this account.\n setFlag?: AccountSetAsfFlags;\n // The fee to charge when users transfer this account's tokens, represented as billionths of a unit. Cannot be more\n // than 2000000000 or less than 1000000000, except for the special case 0 meaning no fee.\n transferRate?: number;\n // Tick size to use for offers involving a currency issued by this address. The exchange rates of those offers is\n // rounded to this many significant digits. Valid values are 3 to 15 inclusive, or 0 to disable.\n tickSize?: number;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type AccountSetFlagsInterface = {\n tfRequireDestTag?: boolean;\n tfOptionalDestTag?: boolean;\n tfRequireAuth?: boolean;\n tfOptionalAuth?: boolean;\n tfDisallowXRP?: boolean;\n tfAllowXRP?: boolean;\n} | number;\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"enum AccountSetAsfFlags {\n asfRequireDest = 1,\n asfRequireAuth = 2,\n asfDisallowXRP = 3,\n asfDisableMaster = 4,\n asfAccountTxnID = 5,\n asfNoFreeze = 6,\n asfGlobalFreeze = 7,\n asfDefaultRipple = 8,\n asfDepositAuth = 9,\n asfAuthorizedNFTokenMinter = 10,\n asfDisallowIncomingNFTokenOffer = 12,\n asfDisallowIncomingCheck = 13,\n asfDisallowIncomingPayChan = 14,\n asfDisallowIncomingTrustline = 15\n}\n")),(0,l.kt)("h4",{id:"response-13"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-12"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-13"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { setAccount } from "@gemwallet/api";\n\nconst payload = {\n emailHash: "1D1382344586ECFF844DACFF698C2EFB",\n fee: "199",\n flags: {\n tfAllowXRP: true\n },\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\nsetAccount(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, setAccount } from "@gemwallet/api";\n\nfunction App() {\n const handleSetAccount = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n emailHash: "1D1382344586ECFF844DACFF698C2EFB",\n fee: "199",\n flags: {\n tfAllowXRP: true\n },\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n setAccount(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"settrustline"},"setTrustLine"),(0,l.kt)("p",null,"Adds or edits a trustline within the wallet."),(0,l.kt)("h4",{id:"request-14"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"SetTrustlineRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"limitAmount"),": The maximum amount of currency that can be exchanged to the trustline.",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"More technical details about the amount formats can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"fee"),": Integer amount of XRP, in drops, to be destroyed as a cost for distributing this transaction to the network. Some transaction types have different minimum requirements.",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"More technical details about the drops can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/currency-formats.html#xrp-amounts"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"memos"),": The memos to attach to the transaction. Each attribute of each memo must be hex encoded.",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"More technical details about the memos can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/transaction-common-fields.html#memos-field"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"flags"),": Flags to set on the transaction.")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface SetTrustlineRequest {\n // The maximum amount of currency that can be exchanged to the trustline\n limitAmount: IssuedCurrencyAmount;\n // Integer amount of XRP, in drops, to be destroyed as a cost for distributing this transaction to the network.\n // Some transaction types have different minimum requirements.\n fee?: string;\n // The memos to attach to the transaction\n // Each attribute of each memo must be hex encoded\n memos?: Memo[];\n // Flags to set on the transaction\n flags?: TrustSetFlags;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface IssuedCurrencyAmount {\n currency: string;\n issuer: string;\n value: string;\n}\n")),(0,l.kt)("p",null,"More technical details about the currency amount formats can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface Memo {\n memo: {\n memoType?: string;\n memoData?: string;\n memoFormat?: string;\n };\n}\n")),(0,l.kt)("p",null,"More technical details about the memos can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#memos-field"},"here"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type TrustSetFlags = {\n tfSetfAuth?: boolean;\n tfSetNoRipple?: boolean;\n tfClearNoRipple?: boolean;\n tfSetFreeze?: boolean;\n tfClearFreeze?: boolean;\n} | number;\n")),(0,l.kt)("p",null,"More details about the flags can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#flags-field"},"here"),"."),(0,l.kt)("h4",{id:"response-14"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-13"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-14"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { setTrustline } from "@gemwallet/api";\n\nconst trustline = {\n limitAmount: {\n currency: "ETH",\n issuer: "rnm76Qgz4G9G4gZBJVuXVvkbt7gVD7szey",\n value: "10000000",\n },\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f",\n },\n },\n ],\n fee: "199",\n flags: {\n tfClearFreeze: false,\n tfClearNoRipple: false,\n tfSetFreeze: true,\n tfSetNoRipple: true,\n tfSetfAuth: false,\n },\n};\n\nsetTrustline(trustline).then((response) => {\n console.log(response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, addTrustline } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const transaction = {\n limitAmount: {\n currency: "ETH",\n issuer: "rnm76Qgz4G9G4gZBJVuXVvkbt7gVD7szey",\n value: "10000000",\n },\n };\n addTrustline(transaction).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"signmessage"},"signMessage"),(0,l.kt)("p",null,"Signs a message using the private key of the user's wallet."),(0,l.kt)("h4",{id:"request-15"},"Request"),(0,l.kt)("p",null,"The function takes a message string as an input parameter."),(0,l.kt)("h4",{id:"response-15"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"signedMessage"),": The signed message.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n signedMessage: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-14"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-15"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { signMessage } from "@gemwallet/api";\n\nconst message = "Hello, World!";\n\nsignMessage(message).then((response) => {\n console.log(response.result?.signedMessage);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, signMessage } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n signMessage("The message I want to get signed").then((response) => {\n console.log("Signed message: ", response.result?.signedMessage);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"submittransaction"},"submitTransaction"),(0,l.kt)("p",null,"Submits a transaction request to the XRPL network via the extension."),(0,l.kt)("h4",{id:"request-16"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"SubmitTransactionRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"transaction"),": The transaction payload to submit to the XRPL network.")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface SubmitTransactionRequest {\n transaction: Transaction;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"export type Transaction = AccountDelete | AccountSet | CheckCancel | CheckCash | CheckCreate | DepositPreauth | EscrowCancel | EscrowCreate | EscrowFinish | NFTokenAcceptOffer | NFTokenBurn | NFTokenCancelOffer | NFTokenCreateOffer | NFTokenMint | OfferCancel | OfferCreate | Payment | PaymentChannelClaim | PaymentChannelCreate | PaymentChannelFund | SetRegularKey | SignerListSet | TicketCreate | TrustSet;\n")),(0,l.kt)("p",null,"Notes:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"The ",(0,l.kt)("inlineCode",{parentName:"li"},"Transaction")," and the other derived types shown here come from ",(0,l.kt)("a",{parentName:"li",href:"https://js.xrpl.org/"},"js.xrpl.org"),"."),(0,l.kt)("li",{parentName:"ul"},"If the transaction field ",(0,l.kt)("inlineCode",{parentName:"li"},"Account")," is not set, the account of the user's wallet will be used.")),(0,l.kt)("h4",{id:"response-16"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-15"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-16"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { submitTransaction } from "@gemwallet/api";\n\nconst transaction = {\n TransactionType: "Payment",\n Destination: "rhikRdkFw28csKw9z7fVoBjWncz1HSoQij",\n Amount: "100000",\n Memos: [\n {\n Memo: {\n MemoData: "54657374206D656D6F",\n MemoType: "4465736372697074696F6E"\n }\n }\n ]\n};\n\nsubmitTransaction({ transaction }).then((response) => {\n console.log(response.result?.hash);\n}).catch((error) => {\n console.error("Transaction submission failed", error);\n});\n\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { submitTransaction, isInstalled } from "@gemwallet/api";\n\nfunction App() {\n const handleTransaction = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const transaction = {\n TransactionType: "Payment",\n Destination: "rhikRdkFw28csKw9z7fVoBjWncz1HSoQij",\n Amount: "100000",\n Memos: [\n {\n Memo: {\n MemoData: "54657374206D656D6F",\n MemoType: "4465736372697074696F6E"\n }\n }\n ]\n };\n submitTransaction({ transaction }).then((response) => {\n console.log("Transaction hash: ", response.result?.hash);\n }).catch((error) => {\n console.error("Transaction submission failed", error);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n\n')),(0,l.kt)("h2",{id:"other"},"Other"),(0,l.kt)("h3",{id:"basetransactionrequest"},"BaseTransactionRequest"),(0,l.kt)("p",null,"All the ",(0,l.kt)("inlineCode",{parentName:"p"},"Request")," interfaces that extend the ",(0,l.kt)("inlineCode",{parentName:"p"},"BaseTransactionRequest")," interface also include the following fields:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"fee"),": Integer amount of XRP, in drops, to be destroyed as a cost for distributing this transaction to the network.",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Some transaction types have different minimum requirements."),(0,l.kt)("li",{parentName:"ul"},"More technical details about the drops can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/currency-formats.html#xrp-amounts"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"sequence"),": The sequence number of the account sending the transaction. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"A transaction is only valid if the Sequence number is exactly 1 greater than the previous transaction from the same account. "),(0,l.kt)("li",{parentName:"ul"},"The special case 0 means the transaction is using a Ticket instead."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"accountTxnID"),": Hash value identifying another transaction. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"If provided, this transaction is only valid if the sending account's previously-sent transaction matches the provided hash."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"lastLedgerSequence"),": Highest ledger index this transaction can appear in. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Specifying this field places a strict upper limit on how long the transaction can wait to be validated or rejected."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"memos"),": Additional arbitrary information used to identify this transaction. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Each attribute of each memo must be hex encoded."),(0,l.kt)("li",{parentName:"ul"},"More technical details about the memos can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/transaction-common-fields.html#memos-field"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"signers"),": Array of objects that represent a multi-signature which authorizes this transaction.",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"More technical details about the signers can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/transaction-common-fields.html#signers-field"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"sourceTag"),": Arbitrary integer used to identify the reason for this payment, or a sender on whose behalf this transaction is made. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Conventionally, a refund should specify the initial payment's SourceTag as the refund payment's DestinationTag."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"signingPubKey"),": Hex representation of the public key that corresponds to the private key used to sign this transaction. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"If an empty string, indicates a multi-signature is present in the Signers field instead."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"ticketSequence"),": The sequence number of the ticket to use in place of a Sequence number. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"If this is provided, Sequence must be 0. "),(0,l.kt)("li",{parentName:"ul"},"Cannot be used with AccountTxnID."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"txnSignature"),": The signature that verifies this transaction as originating from the account it says it is from.")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface BaseTransactionRequest {\n // Integer amount of XRP, in drops, to be destroyed as a cost for distributing this transaction to the network.\n // Some transaction types have different minimum requirements.\n fee?: string;\n // The sequence number of the account sending the transaction. A transaction is only valid if the Sequence number is\n // exactly 1 greater than the previous transaction from the same account. The special case 0 means the transaction is\n // using a Ticket instead.\n sequence?: number;\n // Hash value identifying another transaction. If provided, this transaction is only valid if the sending account's\n // previously-sent transaction matches the provided hash.\n accountTxnID?: string;\n // Highest ledger index this transaction can appear in. Specifying this field places a strict upper limit on how long\n // the transaction can wait to be validated or rejected.\n lastLedgerSequence?: number;\n // Additional arbitrary information used to identify this transaction.\n // Each attribute of each memo must be hex encoded.\n memos?: Memo[];\n // Array of objects that represent a multi-signature which authorizes this transaction.\n signers?: Signer[];\n // Arbitrary integer used to identify the reason for this payment, or a sender on whose behalf this transaction is\n // made. Conventionally, a refund should specify the initial payment's SourceTag as the refund payment's\n // DestinationTag.\n sourceTag?: number;\n // Hex representation of the public key that corresponds to the private key used to sign this transaction. If an empty\n // string, indicates a multi-signature is present in the Signers field instead.\n signingPubKey?: string;\n // The sequence number of the ticket to use in place of a Sequence number. If this is provided, Sequence must be 0.\n // Cannot be used with AccountTxnID.\n ticketSequence?: number;\n // The signature that verifies this transaction as originating from the account it says it is from.\n txnSignature?: string;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface Memo {\n memo: {\n memoType?: string;\n memoData?: string;\n memoFormat?: string;\n };\n}\n")),(0,l.kt)("p",null,"More technical details about the memos can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#memos-field"},"here"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface Signer {\n signer: {\n account: string;\n txnSignature: string;\n signingPubKey: string;\n };\n}\n")),(0,l.kt)("p",null,"More technical details about the signers can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#signers-field"},"here"),"."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/47b0b88f.7af8174c.js b/assets/js/47b0b88f.7af8174c.js new file mode 100644 index 00000000..899fe623 --- /dev/null +++ b/assets/js/47b0b88f.7af8174c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[1580],{9754:function(e,n,t){t.r(n),t.d(n,{assets:function(){return u},contentTitle:function(){return o},default:function(){return d},frontMatter:function(){return i},metadata:function(){return p},toc:function(){return m}});var a=t(3117),r=t(102),l=(t(7294),t(4137)),s=["components"],i={id:"gemwallet-api-reference",title:"Reference",description:"Provides the documentation on how to use GemWallet API."},o="Reference",p={unversionedId:"api/gemwallet-api-reference",id:"api/gemwallet-api-reference",title:"Reference",description:"Provides the documentation on how to use GemWallet API.",source:"@site/docs/api/reference.md",sourceDirName:"api",slug:"/api/gemwallet-api-reference",permalink:"/docs/next/api/gemwallet-api-reference",draft:!1,editUrl:"https://github.com/GemWallet/gemwallet-website/blob/master/docs/api/reference.md",tags:[],version:"current",frontMatter:{id:"gemwallet-api-reference",title:"Reference",description:"Provides the documentation on how to use GemWallet API."},sidebar:"docs",previous:{title:"Installation",permalink:"/docs/next/api/gemwallet-api-installation"},next:{title:"acceptNFTOffer",permalink:"/docs/next/playground/acceptNFTOffer"}},u={},m=[{value:"Regular methods",id:"regular-methods",level:2},{value:"acceptNFTOffer",id:"acceptnftoffer",level:3},{value:"Request",id:"request",level:4},{value:"Response",id:"response",level:4},{value:"Error Handling",id:"error-handling",level:4},{value:"Examples",id:"examples",level:4},{value:"burnNFT",id:"burnnft",level:3},{value:"Request",id:"request-1",level:4},{value:"Response",id:"response-1",level:4},{value:"Error Handling",id:"error-handling-1",level:4},{value:"Examples",id:"examples-1",level:4},{value:"cancelNFTOffer",id:"cancelnftoffer",level:3},{value:"Request",id:"request-2",level:4},{value:"Response",id:"response-2",level:4},{value:"Error Handling",id:"error-handling-2",level:4},{value:"Examples",id:"examples-2",level:4},{value:"cancelOffer",id:"canceloffer",level:3},{value:"Request",id:"request-3",level:4},{value:"Response",id:"response-3",level:4},{value:"Error Handling",id:"error-handling-3",level:4},{value:"Examples",id:"examples-3",level:4},{value:"createNFTOffer",id:"createnftoffer",level:3},{value:"Request",id:"request-4",level:4},{value:"Response",id:"response-4",level:4},{value:"Error Handling",id:"error-handling-4",level:4},{value:"Examples",id:"examples-4",level:4},{value:"createOffer",id:"createoffer",level:3},{value:"Request",id:"request-5",level:4},{value:"Response",id:"response-5",level:4},{value:"Error Handling",id:"error-handling-5",level:4},{value:"Examples",id:"examples-5",level:4},{value:"getAddress",id:"getaddress",level:3},{value:"Request",id:"request-6",level:4},{value:"Response",id:"response-6",level:4},{value:"Error Handling",id:"error-handling-6",level:4},{value:"Examples",id:"examples-6",level:4},{value:"getNetwork",id:"getnetwork",level:3},{value:"Request",id:"request-7",level:4},{value:"Response",id:"response-7",level:4},{value:"Error Handling",id:"error-handling-7",level:4},{value:"Examples",id:"examples-7",level:4},{value:"getNFT",id:"getnft",level:3},{value:"Request",id:"request-8",level:4},{value:"Response",id:"response-8",level:4},{value:"Error Handling",id:"error-handling-8",level:4},{value:"Examples",id:"examples-8",level:4},{value:"getPublicKey",id:"getpublickey",level:3},{value:"Request",id:"request-9",level:4},{value:"Response",id:"response-9",level:4},{value:"Error Handling",id:"error-handling-9",level:4},{value:"Examples",id:"examples-9",level:4},{value:"isInstalled",id:"isinstalled",level:3},{value:"Request",id:"request-10",level:4},{value:"Response",id:"response-10",level:4},{value:"Examples",id:"examples-10",level:4},{value:"mintNFT",id:"mintnft",level:3},{value:"Request",id:"request-11",level:4},{value:"Response",id:"response-11",level:4},{value:"Error Handling",id:"error-handling-10",level:4},{value:"Examples",id:"examples-11",level:4},{value:"sendPayment",id:"sendpayment",level:3},{value:"Request",id:"request-12",level:4},{value:"Response",id:"response-12",level:4},{value:"Error Handling",id:"error-handling-11",level:4},{value:"Examples",id:"examples-12",level:4},{value:"setAccount",id:"setaccount",level:3},{value:"Request",id:"request-13",level:4},{value:"Response",id:"response-13",level:4},{value:"Error Handling",id:"error-handling-12",level:4},{value:"Examples",id:"examples-13",level:4},{value:"setTrustLine",id:"settrustline",level:3},{value:"Request",id:"request-14",level:4},{value:"Response",id:"response-14",level:4},{value:"Error Handling",id:"error-handling-13",level:4},{value:"Examples",id:"examples-14",level:4},{value:"signMessage",id:"signmessage",level:3},{value:"Request",id:"request-15",level:4},{value:"Response",id:"response-15",level:4},{value:"Error Handling",id:"error-handling-14",level:4},{value:"Examples",id:"examples-15",level:4},{value:"XRPL Protocol methods",id:"xrpl-protocol-methods",level:2},{value:"submitTransaction",id:"submittransaction",level:3},{value:"Request",id:"request-16",level:4},{value:"Response",id:"response-16",level:4},{value:"Error Handling",id:"error-handling-15",level:4},{value:"Examples",id:"examples-16",level:4},{value:"Other",id:"other",level:2},{value:"BaseTransactionRequest",id:"basetransactionrequest",level:3}],c={toc:m};function d(e){var n=e.components,t=(0,r.Z)(e,s);return(0,l.kt)("wrapper",(0,a.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"reference"},"Reference"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Notes"),": "),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"The regular methods take payloads objects as input parameters, which are documented for each method. These methods are designed to be easy to use and understand. "),(0,l.kt)("li",{parentName:"ul"},"However, if you are already familiar with the XRPL protocol convention, you can use the methods documented in the ",(0,l.kt)("a",{parentName:"li",href:"#xrpl-protocol-methods"},"XRPL Protocol methods")," section. These methods will directly take transaction payloads as defined in the ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/transaction-common-fields.html#transaction-common-fields"},"XRPL Protocol"),".")),(0,l.kt)("h2",{id:"regular-methods"},"Regular methods"),(0,l.kt)("h3",{id:"acceptnftoffer"},"acceptNFTOffer"),(0,l.kt)("p",null,"Accepts an existing offer for a Non-Fungible Token (NFT) through the extension."),(0,l.kt)("h4",{id:"request"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"AcceptNFTOfferRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenSellOffer"),": Identifies the NFTokenOffer that offers to sell the NFToken."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenBuyOffer"),": Identifies the NFTokenOffer that offers to buy the NFToken."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenBrokerFee"),":\nThis field is only valid in brokered mode, and specifies the amount that the broker keeps as part of their fee for bringing the two offers together; the remaining amount is sent to the seller of the NFToken being bought. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"If specified, the fee must be such that, before applying the transfer fee, the amount that the seller would receive is at least as much as the amount indicated in the sell offer."),(0,l.kt)("li",{parentName:"ul"},"Specified in one of the following formats:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"A ",(0,l.kt)("em",{parentName:"li"},"string")," representing the number of XRP to deliver, in drops."),(0,l.kt)("li",{parentName:"ul"},"An ",(0,l.kt)("em",{parentName:"li"},"object")," where 'value' is a string representing the number of the token to deliver."),(0,l.kt)("li",{parentName:"ul"},"More technical details about the amount formats can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),".")))))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface AcceptNFTOfferRequest extends BaseTransactionRequest {\n // Identifies the NFTokenOffer that offers to sell the NFToken.\n NFTokenSellOffer?: string;\n // Identifies the NFTokenOffer that offers to buy the NFToken.\n NFTokenBuyOffer?: string;\n // This field is only valid in brokered mode, and specifies the amount that the broker keeps as part of their fee for\n // bringing the two offers together; the remaining amount is sent to the seller of the NFToken being bought.\n // If specified, the fee must be such that, before applying the transfer fee, the amount that the seller would receive\n // is at least as much as the amount indicated in the sell offer.\n NFTokenBrokerFee?: Amount;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type Amount = {\n currency: string;\n issuer: string;\n value: string;\n} | string;\n")),(0,l.kt)("p",null,"More details about the amount format can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."),(0,l.kt)("h4",{id:"response"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { acceptNFTOffer } from "@gemwallet/api";\n\nconst payload = {\n NFTokenSellOffer: "Replace me!",\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\nacceptNFTOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, acceptNFTOffer } from "@gemwallet/api";\n\nfunction App() {\n const handleAcceptOffer = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n NFTokenSellOffer: "Replace me!",\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n acceptNFTOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"burnnft"},"burnNFT"),(0,l.kt)("p",null,"Burns a Non-Fungible Token (NFT) through the extension."),(0,l.kt)("h4",{id:"request-1"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"BurnNFTRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenID"),": The NFToken to be removed by this transaction."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"owner"),": The owner of the NFToken to burn. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Only used if that owner is different than the account sending this transaction."),(0,l.kt)("li",{parentName:"ul"},"The issuer or authorized minter can use this field to burn NFTs that have the lsfBurnable flag enabled.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface BurnNFTRequest extends BaseTransactionRequest {\n // The NFToken to be removed by this transaction.\n NFTokenID: string;\n // The owner of the NFToken to burn. Only used if that owner is different than the account sending this transaction.\n // The issuer or authorized minter can use this field to burn NFTs that have the lsfBurnable flag enabled.\n owner?: string;\n}\n")),(0,l.kt)("h4",{id:"response-1"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-1"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-1"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { burnNFT } from "@gemwallet/api";\n\nconst payload = {\n NFTokenID: "Replace me!",\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\nburnNFT(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, burnNFT } from "@gemwallet/api";\n\nfunction App() {\n const handleBurnNFT = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n NFTokenID: "Replace me!",\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n burnNFT(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"cancelnftoffer"},"cancelNFTOffer"),(0,l.kt)("p",null,"Cancels an existing offer for a Non-Fungible Token (NFT) through the extension."),(0,l.kt)("h4",{id:"request-2"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"CancelNFTOfferRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenOffers"),": An array of IDs of the NFTokenOffer objects to cancel. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Each entry must be a different object ID of an NFTokenOffer object; the transaction is invalid if the array contains duplicate entries.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface CancelNFTOfferRequest extends BaseTransactionRequest {\n // An array of IDs of the NFTokenOffer objects to cancel (not the IDs of NFToken objects, but the IDs of the\n // NFTokenOffer objects). Each entry must be a different object ID of an NFTokenOffer object; the transaction is\n // invalid if the array contains duplicate entries.\n NFTokenOffers: string[];\n}\n")),(0,l.kt)("h4",{id:"response-2"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-2"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-2"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { cancelNFTOffer } from "@gemwallet/api";\n\nconst payload = {\n NFTokenOffers: ["Replace me!"],\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\ncancelNFTOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, cancelNFTOffer } from "@gemwallet/api";\n\nfunction App() {\n const handleCancelNFTOffer = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n NFTokenOffers: ["Replace me!"],\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n cancelNFTOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"canceloffer"},"cancelOffer"),(0,l.kt)("p",null,"Cancels an existing offer through the extension."),(0,l.kt)("h4",{id:"request-3"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"CancelOfferRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"offerSequence"),": The sequence number (or Ticket number) of a previous OfferCreate transaction. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"If specified, cancel any offer object in the ledger that was created by that transaction. "),(0,l.kt)("li",{parentName:"ul"},"It is not considered an error if the offer specified does not exist.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface CancelOfferRequest extends BaseTransactionRequest {\n // The sequence number (or Ticket number) of a previous OfferCreate transaction. If specified, cancel any offer object\n // in the ledger that was created by that transaction. It is not considered an error if the offer specified does not\n // exist.\n offerSequence: number;\n}\n")),(0,l.kt)("h4",{id:"response-3"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-3"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-3"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { cancelOffer } from "@gemwallet/api";\n\nconst payload = {\n offerSequence: 0, // Replace me!\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\ncancelOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, cancelOffer } from "@gemwallet/api";\n\nfunction App() {\n const handleCancelOffer = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n offerSequence: 0, // Replace me!\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n cancelOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"createnftoffer"},"createNFTOffer"),(0,l.kt)("p",null,"Creates a new offer for a Non-Fungible Token (NFT) through the extension."),(0,l.kt)("h4",{id:"request-4"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"CreateNFTOfferRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenID"),": Identifies the NFTokenID of the NFToken object that the offer references."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"amount"),": Indicates the amount expected or offered for the Token.",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"The amount must be non-zero, except when this is a sell offer and the asset is XRP. This would indicate that the current owner of the token is giving it away free, either to anyone at all, or to the account identified by the Destination field."),(0,l.kt)("li",{parentName:"ul"},"Specified in one of the following formats:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"A ",(0,l.kt)("em",{parentName:"li"},"string")," representing the number of XRP to deliver, in drops."),(0,l.kt)("li",{parentName:"ul"},"An ",(0,l.kt)("em",{parentName:"li"},"object")," where 'value' is a string representing the number of the token to deliver."),(0,l.kt)("li",{parentName:"ul"},"More technical details about the amount formats can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."))))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"owner"),": Indicates the AccountID of the account that owns the corresponding NFToken. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"If the offer is to buy a token, this field must be present and it must be different than Account (since an offer to buy a token one already holds is meaningless). "),(0,l.kt)("li",{parentName:"ul"},"If the offer is to sell a token, this field must not be present, as the owner is, implicitly, the same as Account (since an offer to sell a token one doesn't already hold is meaningless)."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"expiration"),": Indicates the time after which the offer will no longer be valid. The value is the number of seconds since the Ripple Epoch."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"destination"),": If present, indicates that this offer may only be accepted by the specified account. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Attempts by other accounts to accept this offer MUST fail."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"flags"),": Flags to set on the transaction.")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface CreateNFTOfferRequest extends BaseTransactionRequest {\n // Identifies the NFTokenID of the NFToken object that the offer references.\n NFTokenID: string;\n // Indicates the amount expected or offered for the Token.\n // The amount must be non-zero, except when this is a sell offer and the asset is XRP. This would indicate that the\n // current owner of the token is giving it away free, either to anyone at all, or to the account identified by the\n // Destination field.\n amount: Amount;\n // Indicates the AccountID of the account that owns the corresponding NFToken.\n // If the offer is to buy a token, this field must be present and it must be different than Account (since an offer\n // to buy a token one already holds is meaningless).\n // If the offer is to sell a token, this field must not be present, as the owner is, implicitly, the same as Account\n // (since an offer to sell a token one doesn't already hold is meaningless).\n owner?: string;\n // Indicates the time after which the offer will no longer be valid. The value is the number of seconds since the\n // Ripple Epoch.\n expiration?: number;\n // If present, indicates that this offer may only be accepted by the specified account. Attempts by other accounts to\n // accept this offer MUST fail.\n destination?: string;\n flags?: CreateNFTOfferFlags;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type CreateNFTOfferFlags = {\n tfSellNFToken?: boolean;\n} | number;\n")),(0,l.kt)("p",null,"More details about the flags can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#flags-field"},"here"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type Amount = {\n currency: string;\n issuer: string;\n value: string;\n} | string;\n")),(0,l.kt)("p",null,"More details about the amount format can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."),(0,l.kt)("h4",{id:"response-4"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-4"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-4"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { createNFTOffer } from "@gemwallet/api";\n\nconst payload = {\n NFTokenID: "Replace me!",\n amount: 50000000, // 50 XRP\n fee: "199",\n flags: {\n tfSellNFToken: true // If enabled, indicates that the offer is a sell offer. Otherwise, it is a buy offer.\n },\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\ncreateNFTOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, createNFTOffer } from "@gemwallet/api";\n\nfunction App() {\n const handleCreateNFTOffer = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n NFTokenID: "Replace me!",\n amount: 50000000, // 50 XRP\n fee: "199",\n flags: {\n tfSellNFToken: true // If enabled, indicates that the offer is a sell offer. Otherwise, it is a buy offer.\n },\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n createNFTOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"createoffer"},"createOffer"),(0,l.kt)("p",null,"Creates a new offer through the extension."),(0,l.kt)("h4",{id:"request-5"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"CreateOfferRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"flags"),": Flags to set on the transaction."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"expiration"),": Time after which the Offer is no longer active, in seconds since the Ripple Epoch."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"offerSequence"),": An Offer to delete first, specified in the same way as OfferCancel."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"takerGets"),": The amount and type of currency being sold, in one of the following formats:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"A ",(0,l.kt)("em",{parentName:"li"},"string")," representing the number of XRP to deliver, in drops."),(0,l.kt)("li",{parentName:"ul"},"An ",(0,l.kt)("em",{parentName:"li"},"object")," where 'value' is a string representing the number of the token to deliver."),(0,l.kt)("li",{parentName:"ul"},"More technical details about the amount formats can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"takerPays"),": The amount and type of currency being bought, in one of the following formats:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"A ",(0,l.kt)("em",{parentName:"li"},"string")," representing the number of XRP to deliver, in drops."),(0,l.kt)("li",{parentName:"ul"},"An ",(0,l.kt)("em",{parentName:"li"},"object")," where 'value' is a string representing the number of the token to deliver."),(0,l.kt)("li",{parentName:"ul"},"More technical details about the amount formats can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),".")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface CreateOfferRequest extends BaseTransactionRequest {\n flags?: CreateOfferFlags;\n // Time after which the Offer is no longer active, in seconds since the Ripple Epoch.\n expiration?: number;\n // An Offer to delete first, specified in the same way as OfferCancel.\n offerSequence?: number;\n // The amount and type of currency being sold.\n takerGets: Amount;\n // The amount and type of currency being bought.\n takerPays: Amount;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type OfferCreateFlagsInterface = {\n tfPassive?: boolean;\n tfImmediateOrCancel?: boolean;\n tfFillOrKill?: boolean;\n tfSell?: boolean;\n} | number;\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type Amount = {\n currency: string;\n issuer: string;\n value: string;\n} | string;\n")),(0,l.kt)("p",null,"More details about the amount format can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."),(0,l.kt)("h4",{id:"response-5"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-5"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-5"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { createOffer } from "@gemwallet/api";\n\nconst payload = {\n takerGets: "10000000", // 10 XRP\n takerPays: {\n currency: "ETH",\n issuer: "rnm76Qgz4G9G4gZBJVuXVvkbt7gVD7szey",\n value: "0.1"\n },\n flags: {\n tfPassive: true\n },\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\ncreateOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, createOffer } from "@gemwallet/api";\n\nfunction App() {\n const handleCreateOffer = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n takerGets: "10000000", // 10 XRP\n takerPays: {\n currency: "ETH",\n issuer: "rnm76Qgz4G9G4gZBJVuXVvkbt7gVD7szey",\n value: "0.1"\n },\n flags: {\n tfPassive: true\n },\n fee: "199",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n createOffer(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"getaddress"},"getAddress"),(0,l.kt)("p",null,"Retrieves the wallet address associated with the extension."),(0,l.kt)("h4",{id:"request-6"},"Request"),(0,l.kt)("p",null,"This function does not require any parameters."),(0,l.kt)("h4",{id:"response-6"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address"),": The classic address of the wallet.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n address: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-6"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-6"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { getAddress } from "@gemwallet/api";\n\ngetAddress().then((response) => {\n console.log(response.result?.address);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, getAddress } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n getAddress().then((response) => {\n console.log(`Your address: ${response.result?.address}`);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"getnetwork"},"getNetwork"),(0,l.kt)("p",null,"Retrieves the network associated with the extension."),(0,l.kt)("h4",{id:"request-7"},"Request"),(0,l.kt)("p",null,"This function does not require any parameters."),(0,l.kt)("h4",{id:"response-7"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"network"),": The network name as a string.")))),(0,l.kt)("p",null,"Returns:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"Mainnet")," if the user is connected to the ",(0,l.kt)("inlineCode",{parentName:"li"},"main network"),"."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"Testnet")," if the user is connected to the ",(0,l.kt)("inlineCode",{parentName:"li"},"test network"),"."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"Devnet")," if the user is connected to the ",(0,l.kt)("inlineCode",{parentName:"li"},"developer network"),"."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"AMM-Devnet")," if the user is connected to the ",(0,l.kt)("inlineCode",{parentName:"li"},"AMM Devnet"),".")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n network: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-7"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-7"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { getNetwork } from "@gemwallet/api";\n\ngetNetwork().then((response) => {\n console.log(response.result?.network);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, getNetwork } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n getNetwork().then((response) => {\n console.log(`Your network: ${response.result?.network}`);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"getnft"},"getNFT"),(0,l.kt)("p",null,"Retrieves NFTs associated with the wallet."),(0,l.kt)("h4",{id:"request-8"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Optional")," - This function requires an optional payload parameter which has properties defined by ",(0,l.kt)("inlineCode",{parentName:"p"},"GetNFTRequest"),"."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"limit"),": The maximum number of NFTs to return."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"marker"),": A value from a previous paginated response. This is used to resume retrieving data where the previous response left off.")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface GetNFTRequest {\n // Limit the number of NFTokens to retrieve.\n limit?: number;\n // Value from a previous paginated response. Resume retrieving data where that response left off.\n marker?: unknown;\n}\n")),(0,l.kt)("h4",{id:"response-8"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"account_nfts"),": AccountNFToken[] - An array of NFTs associated with the wallet."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"marker"),": A value to be used as a marker in a subsequent request.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n account_nfts: AccountNFToken[];\n marker: unknown;\n}\n')),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface AccountNFToken {\n Flags: number;\n Issuer: string;\n NFTokenID: string;\n NFTokenTaxon: number;\n URI?: string;\n nft_serial: number;\n}\n")),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-8"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-8"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { getNFT } from "@gemwallet/api";\n\ngetNFT({ limit: 10 }).then((response) => {\n console.log(response.result?.account_nfts);\n});\n')),(0,l.kt)("p",null,"Here is an example of implementation:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, getNFT } from "@gemwallet/api";\n\nfunction App() {\n const handleNFTs = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n getNFT().then((result) => {\n console.log("Your NFTs: ", result.result?.account_nfts);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"getpublickey"},"getPublicKey"),(0,l.kt)("p",null,"Retrieves the public key associated with the wallet."),(0,l.kt)("h4",{id:"request-9"},"Request"),(0,l.kt)("p",null,"This function does not require any parameters."),(0,l.kt)("h4",{id:"response-9"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"address"),": Classic address of the wallet."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"publicKey"),": Public key of the wallet.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n address: string;\n publicKey: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-9"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-9"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { getPublicKey } from "@gemwallet/api";\n\ngetPublicKey().then((response) => {\n console.log(`${response.result?.address} - ${response.result?.publicKey}`);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, getPublicKey } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n getPublicKey().then((response) => {\n console.log(\n `${response.result?.address} - ${response.result?.publicKey}`\n );\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"isinstalled"},"isInstalled"),(0,l.kt)("p",null,"Checks if the GemWallet extension is installed in the user's browser."),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"We definitely recommend that you check if the user has GemWallet installed before using any of the other methods available.")),(0,l.kt)("h4",{id:"request-10"},"Request"),(0,l.kt)("p",null,"This function does not require any parameters."),(0,l.kt)("h4",{id:"response-10"},"Response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},"result: {\n isInstalled: boolean;\n}\n")),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"isInstalled"),": ",(0,l.kt)("inlineCode",{parentName:"li"},"true")," if the user has GemWallet extension installed, ",(0,l.kt)("inlineCode",{parentName:"li"},"false")," otherwise.")),(0,l.kt)("h4",{id:"examples-10"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled } from "@gemwallet/api";\n\nisInstalled().then((response) => {\n console.log(response.result.isInstalled);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (!response.result.isInstalled) {\n console.log("GemWallet is not installed");\n } else {\n console.log("GemWallet is installed");\n }\n });\n };\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"mintnft"},"mintNFT"),(0,l.kt)("p",null,"Mints a new Non-Fungible Token (NFT) through the extension."),(0,l.kt)("h4",{id:"request-11"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"MintNFTRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"flags"),": Flags to be set on the transaction."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"issuer"),": Indicates the issuer of the token. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Should only be specified if the account executing the transaction is not the Issuer of the token, e.g. when minting on behalf of another account."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenTaxon"),": Indicates the taxon associated with this token. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"The taxon is generally a value chosen by the minter of the token and a given taxon may be used for multiple tokens. "),(0,l.kt)("li",{parentName:"ul"},"The implementation reserves taxon identifiers greater than or equal to 2147483648 (0x80000000). "),(0,l.kt)("li",{parentName:"ul"},"If you have no use for this field, set it to 0."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"transferFee"),": Specifies the fee charged by the issuer for secondary sales of the Token, if such sales are allowed. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Valid values for this field are between 0 and 50000 inclusive, allowing transfer rates between 0.000% and 50.000% in increments of 0.001%. "),(0,l.kt)("li",{parentName:"ul"},"This field must NOT be present if the tfTransferable flag is not set."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"URI"),": URI that points to the data and/or metadata associated with the NFT. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},'This field need not be an HTTP or HTTPS URL; it could be an IPFS URI, a magnet link, immediate data encoded as an RFC2379 "data" URL, or even an opaque issuer-specific encoding. '),(0,l.kt)("li",{parentName:"ul"},"The URI is NOT checked for validity, but the field is limited to a maximum length of 256 bytes. "),(0,l.kt)("li",{parentName:"ul"},"This field must be hex-encoded.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},'interface MintNFTRequest extends BaseTransactionRequest {\n flags?: MintNFTFlags;\n // Indicates the issuer of the token.\n // Should only be specified if the account executing the transaction is not the Issuer of the token, e.g. when minting on behalf of another account.\n issuer?: string;\n // Indicates the taxon associated with this token. The taxon is generally a value chosen by the minter of the token\n // and a given taxon may be used for multiple tokens. The implementation reserves taxon identifiers greater than or\n // equal to 2147483648 (0x80000000). If you have no use for this field, set it to 0.\n NFTokenTaxon: number;\n // Specifies the fee charged by the issuer for secondary sales of the Token, if such sales are allowed. Valid values\n // for this field are between 0 and 50000 inclusive, allowing transfer rates between 0.000% and 50.000% in increments\n // of 0.001%. This field must NOT be present if the tfTransferable flag is not set.\n transferFee?: number;\n // URI that points to the data and/or metadata associated with the NFT. This field need not be an HTTP or HTTPS URL;\n // it could be an IPFS URI, a magnet link, immediate data encoded as an RFC2379 "data" URL, or even an opaque\n // issuer-specific encoding. The URI is NOT checked for validity, but the field is limited to a maximum length of\n // 256 bytes.\n // This field must be hex-encoded.\n URI?: string;\n}\n')),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type MintNFTFlags = {\n tfBurnable?: boolean;\n tfOnlyXRP?: boolean;\n tfTrustLine?: boolean;\n tfTransferable?: boolean;\n} | number;\n")),(0,l.kt)("p",null,"More details about the flags can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#flags-field"},"here"),"."),(0,l.kt)("h4",{id:"response-11"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenID"),": The ID of the NFT."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n NFTokenID: string;\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-10"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-11"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { mintNFT } from "@gemwallet/api";\n\nconst payload = {\n URI: "4d696e746564207468726f7567682047656d57616c6c657421",\n flags: {\n tfOnlyXRP: true,\n tfTransferable: true\n },\n fee: "199",\n transferFee: 3000, // 3%,\n NFTokenTaxon: 0,\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\nmintNFT(payload).then((response) => {\n console.log("NFT ID: ", response.result?.NFTokenID);\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, mintNFT } from "@gemwallet/api";\n\nfunction App() {\n const handleMintNFT = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n URI: "4d696e746564207468726f7567682047656d57616c6c657421",\n flags: {\n tfOnlyXRP: true,\n tfTransferable: true\n },\n fee: "199",\n transferFee: 3000, // 3%,\n NFTokenTaxon: 0,\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n mintNFT(payload).then((response) => {\n console.log("NFT ID: ", response.result?.NFTokenID);\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"sendpayment"},"sendPayment"),(0,l.kt)("p",null,"Initiates a payment transaction through the extension."),(0,l.kt)("h4",{id:"request-12"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload object as an input parameter, which has properties defined by ",(0,l.kt)("inlineCode",{parentName:"p"},"SendPaymentRequest"),"."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"amount"),": The amount to deliver, in one of the following formats:",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"A ",(0,l.kt)("em",{parentName:"li"},"string")," representing the number of XRP to deliver, in drops."),(0,l.kt)("li",{parentName:"ul"},"An ",(0,l.kt)("em",{parentName:"li"},"object")," where 'value' is a string representing the number of the token to deliver."),(0,l.kt)("li",{parentName:"ul"},"More technical details about the amount formats can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"destination"),": The unique address of the account receiving the payment."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"destinationTag"),": The destination tag to attach to the transaction."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"flags"),": Flags to set on the transaction.")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"export interface SendPaymentRequest extends BaseTransactionRequest {\n // The amount to deliver, in one of the following formats:\n // - A string representing the number of XRP to deliver, in drops.\n // - An object where 'value' is a string representing the number of the token to deliver.\n amount: Amount;\n // The unique address of the account receiving the payment\n destination: string;\n // The destination tag to attach to the transaction\n destinationTag?: number;\n // Flags to set on the transaction\n flags?: PaymentFlags;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type Amount = {\n currency: string;\n issuer: string;\n value: string;\n} | string;\n")),(0,l.kt)("p",null,"More details about the amount format can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface Memo {\n memo: {\n memoType?: string;\n memoData?: string;\n memoFormat?: string;\n };\n}\n")),(0,l.kt)("p",null,"More technical details about the memos can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#memos-field"},"here"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type PaymentFlags = {\n tfNoDirectRipple?: boolean;\n tfPartialPayment?: boolean;\n tfLimitQuality?: boolean;\n} | number;\n")),(0,l.kt)("p",null,"More details about the flags can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#flags-field"},"here"),"."),(0,l.kt)("h4",{id:"response-12"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-11"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-12"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { sendPayment } from "@gemwallet/api";\n\nconst payload = {\n amount: "1000000", // In drops (1 XRP)\n destination: "rLWQskMM8EoPxaLsmuQxE5rYeP4uX7dhym",\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f",\n },\n },\n ],\n destinationTag: 12,\n fee: "199",\n flags: {\n tfNoDirectRipple: false,\n tfPartialPayment: false,\n tfLimitQuality: false,\n },\n};\n\nsendPayment(payload).then((response) => {\n console.log(response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example for an XRP Payment with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, sendPayment } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payment = {\n amount: "1000000", // In drops (1 XRP)\n destination: "rLWQskMM8EoPxaLsmuQxE5rYeP4uX7dhym",\n };\n sendPayment(payment).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("p",null,"Here is an example for an ETH Payment with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, sendPayment } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payment = {\n amount: {\n currency: "ETH",\n value: "0.01", // In currency\n issuer: "rnm76Qgz4G9G4gZBJVuXVvkbt7gVD7szey",\n },\n destination: "rLWQskMM8EoPxaLsmuQxE5rYeP4uX7dhym",\n };\n sendPayment(payment).then((trHash) => {\n console.log("Transaction Hash: ", trHash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"setaccount"},"setAccount"),(0,l.kt)("p",null,"Sets an account through the extension."),(0,l.kt)("h4",{id:"request-13"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"SetAccountRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"flags"),": Flags to set on the transaction."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"clearFlag"),": Unique identifier of a flag to disable for this account."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"domain"),": The domain that owns this account, as a string of hex representing the ASCII for the domain in lowercase. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Cannot be more than 256 bytes in length."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"emailHash"),": An arbitrary 128-bit value. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Conventionally, clients treat this as the md5 hash of an email address to use for displaying a Gravatar image."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"messageKey"),": Public key for sending encrypted messages to this account. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"To set the key, it must be exactly 33 bytes, with the first byte indicating the key type: 0x02 or 0x03 for secp256k1 keys, 0xED for Ed25519 keys. "),(0,l.kt)("li",{parentName:"ul"},"To remove the key, use an empty value."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"NFTokenMinter"),": Another account that can mint NFTokens for you."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"setFlag"),": Integer flag to enable for this account."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"transferRate"),": The fee to charge when users transfer this account's tokens, represented as billionths of a unit. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Cannot be more than 2000000000 or less than 1000000000, except for the special case 0 meaning no fee."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"tickSize"),": Tick size to use for offers involving a currency issued by this address. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"The exchange rates of those offers is rounded to this many significant digits. "),(0,l.kt)("li",{parentName:"ul"},"Valid values are 3 to 15 inclusive, or 0 to disable.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface SetAccountRequest extends BaseTransactionRequest {\n flags?: SetAccountFlags;\n // Unique identifier of a flag to disable for this account.\n clearFlag?: number;\n // The domain that owns this account, as a string of hex representing the ASCII for the domain in lowercase.\n // Cannot be more than 256 bytes in length.\n domain?: string;\n // An arbitrary 128-bit value. Conventionally, clients treat this as the md5 hash of an email address to use for\n // displaying a Gravatar image.\n emailHash?: string;\n // Public key for sending encrypted messages to this account. To set the key, it must be exactly 33 bytes, with the\n // first byte indicating the key type: 0x02 or 0x03 for secp256k1 keys, 0xED for Ed25519 keys. To remove the key, use\n // an empty value.\n messageKey?: string;\n // Another account that can mint NFTokens for you.\n NFTokenMinter?: string;\n // Integer flag to enable for this account.\n setFlag?: AccountSetAsfFlags;\n // The fee to charge when users transfer this account's tokens, represented as billionths of a unit. Cannot be more\n // than 2000000000 or less than 1000000000, except for the special case 0 meaning no fee.\n transferRate?: number;\n // Tick size to use for offers involving a currency issued by this address. The exchange rates of those offers is\n // rounded to this many significant digits. Valid values are 3 to 15 inclusive, or 0 to disable.\n tickSize?: number;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type AccountSetFlagsInterface = {\n tfRequireDestTag?: boolean;\n tfOptionalDestTag?: boolean;\n tfRequireAuth?: boolean;\n tfOptionalAuth?: boolean;\n tfDisallowXRP?: boolean;\n tfAllowXRP?: boolean;\n} | number;\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"enum AccountSetAsfFlags {\n asfRequireDest = 1,\n asfRequireAuth = 2,\n asfDisallowXRP = 3,\n asfDisableMaster = 4,\n asfAccountTxnID = 5,\n asfNoFreeze = 6,\n asfGlobalFreeze = 7,\n asfDefaultRipple = 8,\n asfDepositAuth = 9,\n asfAuthorizedNFTokenMinter = 10,\n asfDisallowIncomingNFTokenOffer = 12,\n asfDisallowIncomingCheck = 13,\n asfDisallowIncomingPayChan = 14,\n asfDisallowIncomingTrustline = 15\n}\n")),(0,l.kt)("h4",{id:"response-13"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-12"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-13"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { setAccount } from "@gemwallet/api";\n\nconst payload = {\n emailHash: "1D1382344586ECFF844DACFF698C2EFB",\n fee: "199",\n flags: {\n tfAllowXRP: true\n },\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n};\n\nsetAccount(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, setAccount } from "@gemwallet/api";\n\nfunction App() {\n const handleSetAccount = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const payload = {\n emailHash: "1D1382344586ECFF844DACFF698C2EFB",\n fee: "199",\n flags: {\n tfAllowXRP: true\n },\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f"\n }\n }\n ]\n };\n setAccount(payload).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"settrustline"},"setTrustLine"),(0,l.kt)("p",null,"Adds or edits a trustline within the wallet."),(0,l.kt)("h4",{id:"request-14"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"SetTrustlineRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"All the fields from ",(0,l.kt)("inlineCode",{parentName:"li"},"BaseTransactionRequest"),".",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"See ",(0,l.kt)("a",{parentName:"li",href:"#basetransactionrequest"},"BaseTransactionRequest")," for more details."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"limitAmount"),": The maximum amount of currency that can be exchanged to the trustline.",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"More technical details about the amount formats can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"flags"),": Flags to set on the transaction.")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface SetTrustlineRequest extends BaseTransactionRequest {\n // The maximum amount of currency that can be exchanged to the trustline\n limitAmount: IssuedCurrencyAmount;\n // Flags to set on the transaction\n flags?: TrustSetFlags;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface IssuedCurrencyAmount {\n currency: string;\n issuer: string;\n value: string;\n}\n")),(0,l.kt)("p",null,"More technical details about the currency amount formats can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/basic-data-types.html#specifying-currency-amounts"},"here"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface Memo {\n memo: {\n memoType?: string;\n memoData?: string;\n memoFormat?: string;\n };\n}\n")),(0,l.kt)("p",null,"More technical details about the memos can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#memos-field"},"here"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"type TrustSetFlags = {\n tfSetfAuth?: boolean;\n tfSetNoRipple?: boolean;\n tfClearNoRipple?: boolean;\n tfSetFreeze?: boolean;\n tfClearFreeze?: boolean;\n} | number;\n")),(0,l.kt)("p",null,"More details about the flags can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#flags-field"},"here"),"."),(0,l.kt)("h4",{id:"response-14"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-13"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-14"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { setTrustline } from "@gemwallet/api";\n\nconst trustline = {\n limitAmount: {\n currency: "ETH",\n issuer: "rnm76Qgz4G9G4gZBJVuXVvkbt7gVD7szey",\n value: "10000000",\n },\n memos: [\n {\n memo: {\n memoType: "4465736372697074696f6e",\n memoData: "54657374206d656d6f",\n },\n },\n ],\n fee: "199",\n flags: {\n tfClearFreeze: false,\n tfClearNoRipple: false,\n tfSetFreeze: true,\n tfSetNoRipple: true,\n tfSetfAuth: false,\n },\n};\n\nsetTrustline(trustline).then((response) => {\n console.log(response.result?.hash);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, addTrustline } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const transaction = {\n limitAmount: {\n currency: "ETH",\n issuer: "rnm76Qgz4G9G4gZBJVuXVvkbt7gVD7szey",\n value: "10000000",\n },\n };\n addTrustline(transaction).then((response) => {\n console.log("Transaction Hash: ", response.result?.hash);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h3",{id:"signmessage"},"signMessage"),(0,l.kt)("p",null,"Signs a message using the private key of the user's wallet."),(0,l.kt)("h4",{id:"request-15"},"Request"),(0,l.kt)("p",null,"The function takes a message string as an input parameter."),(0,l.kt)("h4",{id:"response-15"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"signedMessage"),": The signed message.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n signedMessage: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-14"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-15"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { signMessage } from "@gemwallet/api";\n\nconst message = "Hello, World!";\n\nsignMessage(message).then((response) => {\n console.log(response.result?.signedMessage);\n});\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isInstalled, signMessage } from "@gemwallet/api";\n\nfunction App() {\n const handleConnect = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n signMessage("The message I want to get signed").then((response) => {\n console.log("Signed message: ", response.result?.signedMessage);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n')),(0,l.kt)("h2",{id:"xrpl-protocol-methods"},"XRPL Protocol methods"),(0,l.kt)("h3",{id:"submittransaction"},"submitTransaction"),(0,l.kt)("p",null,"Submits a transaction payload request to the XRPL network via the extension. The transaction will be automatically autofilled, signed and submitted."),(0,l.kt)("h4",{id:"request-16"},"Request"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Mandatory")," - The function takes a payload of type ",(0,l.kt)("inlineCode",{parentName:"p"},"SubmitTransactionRequest")," as an input parameter."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"transaction"),": The transaction payload to submit to the XRPL network.")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface SubmitTransactionRequest {\n transaction: Transaction;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"export type Transaction = AccountDelete | AccountSet | CheckCancel | CheckCash | CheckCreate | DepositPreauth | EscrowCancel | EscrowCreate | EscrowFinish | NFTokenAcceptOffer | NFTokenBurn | NFTokenCancelOffer | NFTokenCreateOffer | NFTokenMint | OfferCancel | OfferCreate | Payment | PaymentChannelClaim | PaymentChannelCreate | PaymentChannelFund | SetRegularKey | SignerListSet | TicketCreate | TrustSet;\n")),(0,l.kt)("p",null,"Notes:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"The ",(0,l.kt)("inlineCode",{parentName:"li"},"Transaction")," and the other derived types shown here come from ",(0,l.kt)("a",{parentName:"li",href:"https://js.xrpl.org/"},"js.xrpl.org"),"."),(0,l.kt)("li",{parentName:"ul"},"If the transaction field ",(0,l.kt)("inlineCode",{parentName:"li"},"Account")," is not set, the account of the user's wallet will be used.")),(0,l.kt)("h4",{id:"response-16"},"Response"),(0,l.kt)("p",null,"The response is a Promise which resolves to an object with a ",(0,l.kt)("inlineCode",{parentName:"p"},"type")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"result")," property."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"type"),": ",(0,l.kt)("inlineCode",{parentName:"li"},'"response" | "reject"')),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"result"),":",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"hash"),": The hash of the transaction.")))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "response";\nresult: {\n hash: string;\n}\n')),(0,l.kt)("p",null,"or"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'type: "reject";\nresult: undefined;\n')),(0,l.kt)("h4",{id:"error-handling-15"},"Error Handling"),(0,l.kt)("p",null,"In case of error, the error will be thrown."),(0,l.kt)("h4",{id:"examples-16"},"Examples"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { submitTransaction } from "@gemwallet/api";\n\nconst transaction = {\n TransactionType: "Payment",\n Destination: "rhikRdkFw28csKw9z7fVoBjWncz1HSoQij",\n Amount: "100000",\n Memos: [\n {\n Memo: {\n MemoData: "54657374206D656D6F",\n MemoType: "4465736372697074696F6E"\n }\n }\n ]\n};\n\nsubmitTransaction({ transaction }).then((response) => {\n console.log(response.result?.hash);\n}).catch((error) => {\n console.error("Transaction submission failed", error);\n});\n\n')),(0,l.kt)("p",null,"Here is an example with a React web application:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { submitTransaction, isInstalled } from "@gemwallet/api";\n\nfunction App() {\n const handleTransaction = () => {\n isInstalled().then((response) => {\n if (response.result.isInstalled) {\n const transaction = {\n TransactionType: "Payment",\n Destination: "rhikRdkFw28csKw9z7fVoBjWncz1HSoQij",\n Amount: "100000",\n Memos: [\n {\n Memo: {\n MemoData: "54657374206D656D6F",\n MemoType: "4465736372697074696F6E"\n }\n }\n ]\n };\n submitTransaction({ transaction }).then((response) => {\n console.log("Transaction hash: ", response.result?.hash);\n }).catch((error) => {\n console.error("Transaction submission failed", error);\n });\n }\n });\n };\n\n return (\n
\n \n
\n );\n}\n\nexport default App;\n\n')),(0,l.kt)("h2",{id:"other"},"Other"),(0,l.kt)("h3",{id:"basetransactionrequest"},"BaseTransactionRequest"),(0,l.kt)("p",null,"All the ",(0,l.kt)("inlineCode",{parentName:"p"},"Request")," interfaces that extend the ",(0,l.kt)("inlineCode",{parentName:"p"},"BaseTransactionRequest")," interface also include the following fields:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"fee"),": Integer amount of XRP, in drops, to be destroyed as a cost for distributing this transaction to the network.",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Some transaction types have different minimum requirements."),(0,l.kt)("li",{parentName:"ul"},"More technical details about the drops can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/currency-formats.html#xrp-amounts"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"sequence"),": The sequence number of the account sending the transaction. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"A transaction is only valid if the Sequence number is exactly 1 greater than the previous transaction from the same account. "),(0,l.kt)("li",{parentName:"ul"},"The special case 0 means the transaction is using a Ticket instead."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"accountTxnID"),": Hash value identifying another transaction. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"If provided, this transaction is only valid if the sending account's previously-sent transaction matches the provided hash."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"lastLedgerSequence"),": Highest ledger index this transaction can appear in. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Specifying this field places a strict upper limit on how long the transaction can wait to be validated or rejected."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"memos"),": Additional arbitrary information used to identify this transaction. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Each attribute of each memo must be hex encoded."),(0,l.kt)("li",{parentName:"ul"},"More technical details about the memos can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/transaction-common-fields.html#memos-field"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"signers"),": Array of objects that represent a multi-signature which authorizes this transaction.",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"More technical details about the signers can be found ",(0,l.kt)("a",{parentName:"li",href:"https://xrpl.org/transaction-common-fields.html#signers-field"},"here"),"."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"sourceTag"),": Arbitrary integer used to identify the reason for this payment, or a sender on whose behalf this transaction is made. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Conventionally, a refund should specify the initial payment's SourceTag as the refund payment's DestinationTag."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"signingPubKey"),": Hex representation of the public key that corresponds to the private key used to sign this transaction. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"If an empty string, indicates a multi-signature is present in the Signers field instead."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"ticketSequence"),": The sequence number of the ticket to use in place of a Sequence number. ",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"If this is provided, Sequence must be 0. "),(0,l.kt)("li",{parentName:"ul"},"Cannot be used with AccountTxnID."))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"txnSignature"),": The signature that verifies this transaction as originating from the account it says it is from.")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface BaseTransactionRequest {\n // Integer amount of XRP, in drops, to be destroyed as a cost for distributing this transaction to the network.\n // Some transaction types have different minimum requirements.\n fee?: string;\n // The sequence number of the account sending the transaction. A transaction is only valid if the Sequence number is\n // exactly 1 greater than the previous transaction from the same account. The special case 0 means the transaction is\n // using a Ticket instead.\n sequence?: number;\n // Hash value identifying another transaction. If provided, this transaction is only valid if the sending account's\n // previously-sent transaction matches the provided hash.\n accountTxnID?: string;\n // Highest ledger index this transaction can appear in. Specifying this field places a strict upper limit on how long\n // the transaction can wait to be validated or rejected.\n lastLedgerSequence?: number;\n // Additional arbitrary information used to identify this transaction.\n // Each attribute of each memo must be hex encoded.\n memos?: Memo[];\n // Array of objects that represent a multi-signature which authorizes this transaction.\n signers?: Signer[];\n // Arbitrary integer used to identify the reason for this payment, or a sender on whose behalf this transaction is\n // made. Conventionally, a refund should specify the initial payment's SourceTag as the refund payment's\n // DestinationTag.\n sourceTag?: number;\n // Hex representation of the public key that corresponds to the private key used to sign this transaction. If an empty\n // string, indicates a multi-signature is present in the Signers field instead.\n signingPubKey?: string;\n // The sequence number of the ticket to use in place of a Sequence number. If this is provided, Sequence must be 0.\n // Cannot be used with AccountTxnID.\n ticketSequence?: number;\n // The signature that verifies this transaction as originating from the account it says it is from.\n txnSignature?: string;\n}\n")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface Memo {\n memo: {\n memoType?: string;\n memoData?: string;\n memoFormat?: string;\n };\n}\n")),(0,l.kt)("p",null,"More technical details about the memos can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#memos-field"},"here"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"interface Signer {\n signer: {\n account: string;\n txnSignature: string;\n signingPubKey: string;\n };\n}\n")),(0,l.kt)("p",null,"More technical details about the signers can be found ",(0,l.kt)("a",{parentName:"p",href:"https://xrpl.org/transaction-common-fields.html#signers-field"},"here"),"."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5547.f15ccc31.js b/assets/js/5547.e5e69b8b.js similarity index 59% rename from assets/js/5547.f15ccc31.js rename to assets/js/5547.e5e69b8b.js index 58e598f5..12869fac 100644 --- a/assets/js/5547.f15ccc31.js +++ b/assets/js/5547.e5e69b8b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[5547],{4209:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},1911:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.GEM_WALLET=void 0,t.GEM_WALLET="gem-wallet"},7247:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(4209),t),o(n(4240),t),o(n(9144),t),o(n(1911),t),o(n(9829),t),o(n(8325),t),o(n(3354),t)},4240:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},9144:function(e,t){var n,r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.NETWORK=t.NetworkServer=t.Network=void 0,function(e){e.MAINNET="Mainnet",e.TESTNET="Testnet",e.DEVNET="Devnet",e.AMM_DEVNET="AMM-Devnet"}(r=t.Network||(t.Network={})),function(e){e.MAINNET="wss://xrplcluster.com",e.TESTNET="wss://s.altnet.rippletest.net:51233",e.DEVNET="wss://s.devnet.rippletest.net:51233",e.AMM_DEVNET="wss://amm.devnet.rippletest.net:51233"}(o=t.NetworkServer||(t.NetworkServer={})),t.NETWORK=((n={})[r.MAINNET]={name:r.MAINNET,server:o.MAINNET,description:"Main network using the production version of the XRP Ledger."},n[r.TESTNET]={name:r.TESTNET,server:o.TESTNET,description:"Acts as a testing network, without impacting production users and risking real money."},n[r.DEVNET]={name:r.DEVNET,server:o.DEVNET,description:"A preview of upcoming features, where unstable changes are tested out."},n[r.AMM_DEVNET]={name:r.AMM_DEVNET,server:o.AMM_DEVNET,description:"XLS-30d Automated Market Makers preview network."},n)},9829:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},8325:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},3354:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},2707:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function u(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] {\n // We make sure that we are connected to the ledger with the isConnected API\n isConnected().then((isConnected) => {\n if (isConnected) {\n const transaction = {\n amount: "0.999999",\n destination: "rNvFCZXpDtGeQ3bSas15wGLN6N2stGmA9o",\n };\n // We send the payment to the extension which will forward it to the XRP Ledger\n sendPayment(transaction)\n .then((trHash) => {\n // If the transaction is a success, the promise returns a transaction hash\n console.log("Transaction Hash: ", trHash);\n })\n .catch((e) => {\n console.log("THE ERROR: ", e);\n });\n } else {\n console.log("You are not connected");\n }\n });\n };\n\n return (\n \n PAY\n \n );\n}\n')),(0,l.kt)("p",null,"In order to don't pollute the npm repository of GemWallet the beta is under the package: ",(0,l.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/@gemwallet-beta/api"},"@gemwallet-beta/api"),"."),(0,l.kt)("p",null,"The code above is extracted from this repository where you can have an example of implementation: ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/FlorianBouron/gemwallet-store-demo/tree/release/2.0.0"},"https://github.com/FlorianBouron/gemwallet-store-demo/tree/release/2.0.0")),(0,l.kt)("h3",{id:"how-to-give-feedback"},"How to give feedback?"),(0,l.kt)("p",null,"Giving us feedback has never been that easy, there are a few ways:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Contact us on ",(0,l.kt)("a",{parentName:"li",href:"https://twitter.com/gemwallet_app"},"Twitter")),(0,l.kt)("li",{parentName:"ul"},"Join the ",(0,l.kt)("a",{parentName:"li",href:"https://discord.gg/CnkP9KGHBe"},"Discord"))),(0,l.kt)("h3",{id:"whats-next"},"What's next?"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Improvements in explaining the reserved amount within the Ledger"),(0,l.kt)("li",{parentName:"ul"},"Enable GemWallet to be connected to the mainnet"),(0,l.kt)("li",{parentName:"ul"},"Answer to your feedback"),(0,l.kt)("li",{parentName:"ul"},"Create a Sign Method to allow authentication within web3 pages"),(0,l.kt)("li",{parentName:"ul"},"Make the 2.0.0 release"),(0,l.kt)("li",{parentName:"ul"},"And much more (Stay tuned for the next announcements, follow us on ",(0,l.kt)("a",{parentName:"li",href:"https://twitter.com/gemwallet_app"},"Twitter"),").")))}c.isMDXComponent=!0},3046:function(e,t,a){t.Z=a.p+"assets/files/gemwallet-beta-8f2860bee30fe2f6f6cd7b6b18f09f6e.zip"},1344:function(e,t,a){t.Z=a.p+"assets/images/GemWalletBeta-70440d6f296006462a2a3b541921b23e.png"},3888:function(e,t){t.Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAAKElEQVR4AWMYrqDUvfQ5ELoTrQGo+D8QPqeZBoSTqAVGQ2k0lIYpAAA/gTrh2+TtPAAAAABJRU5ErkJggg=="}}]); \ No newline at end of file +"use strict";(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[2561],{8403:function(e,t,a){a.r(t),a.d(t,{assets:function(){return p},contentTitle:function(){return s},default:function(){return c},frontMatter:function(){return i},metadata:function(){return m},toc:function(){return h}});var n=a(3117),o=a(102),l=(a(7294),a(4137)),r=["components"],i={slug:"gemwallet-looking-for-beta-testers",title:"GemWallet looking for beta testers",authors:"florianb",tags:["GemWallet","Release 2.0.0"]},s=void 0,m={permalink:"/blog/gemwallet-looking-for-beta-testers",editUrl:"https://github.com/GemWallet/gemwallet-website/blob/master/blog/2022-07-26-gemwallet-looking-for-beta-testers.mdx",source:"@site/blog/2022-07-26-gemwallet-looking-for-beta-testers.mdx",title:"GemWallet looking for beta testers",description:"GemWallet Beta - looking for beta testers",date:"2022-07-26T00:00:00.000Z",formattedDate:"July 26, 2022",tags:[{label:"GemWallet",permalink:"/blog/tags/gem-wallet"},{label:"Release 2.0.0",permalink:"/blog/tags/release-2-0-0"}],readingTime:3.135,hasTruncateMarker:!1,authors:[{name:"Florian Bouron",title:"Founder and Maintainer of GemWallet",url:"https://github.com/FlorianBouron",imageURL:"https://github.com/FlorianBouron.png",key:"florianb"}],frontMatter:{slug:"gemwallet-looking-for-beta-testers",title:"GemWallet looking for beta testers",authors:"florianb",tags:["GemWallet","Release 2.0.0"]},prevItem:{title:"Import XUMM wallets into GemWallet",permalink:"/blog/import-xumm-wallets-into-gemwallet"},nextItem:{title:"GemWallet awarded $75,000 by Ripple to speed up its development",permalink:"/blog/gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development"}},p={authorsImageUrls:[void 0]},h=[{value:"Introduction",id:"introduction",level:3},{value:"What's new?",id:"whats-new",level:3},{value:"How to install it?",id:"how-to-install-it",level:3},{value:"How to use it?",id:"how-to-use-it",level:3},{value:"How to give feedback?",id:"how-to-give-feedback",level:3},{value:"What's next?",id:"whats-next",level:3}],u={toc:h};function c(e){var t=e.components,i=(0,o.Z)(e,r);return(0,l.kt)("wrapper",(0,n.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,(0,l.kt)("img",{alt:"GemWallet Beta - looking for beta testers",src:a(5867).Z,width:"1366",height:"768"})),(0,l.kt)("h3",{id:"introduction"},"Introduction"),(0,l.kt)("p",null,"GemWallet has already presented its beta version in a previous article, but now are working hard on version 2.0.0."),(0,l.kt)("p",null,"You can find the last source code of version 2.0.0 on the ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/GemWallet/gemwallet-extension/tree/release/2.0.0"},"release/2.0.0 branch"),"."),(0,l.kt)("p",null,"In this article, I am going to explain to you what changes in this version and what is planned on the TODO list before going to the Chrome Store."),(0,l.kt)("h3",{id:"whats-new"},"What's new?"),(0,l.kt)("p",null,"\ud83c\udf31 Features:"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Refactor transaction payment API"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Make the payload simpler"),(0,l.kt)("li",{parentName:"ul"},"Return the hash of the transaction in case of a successful transaction"),(0,l.kt)("li",{parentName:"ul"},"Return an error in case of an unsuccessful transaction"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Inform the user when the password is wrong")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Allow the user to go to the previous page on import seed phrase or create a new wallet")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Inform users when they don't have enough funds in their wallet before executing a transaction"))),(0,l.kt)("p",null,"\ud83e\uddf0 Tech Improvements:"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"Replace constants by enum"),(0,l.kt)("li",{parentName:"ol"},"Properly catch errors"),(0,l.kt)("li",{parentName:"ol"},"Refactor onboardings"),(0,l.kt)("li",{parentName:"ol"},"Disconnect the WebSocket to the ledger before the extension closes"),(0,l.kt)("li",{parentName:"ol"},"Catch errors within Sentry")),(0,l.kt)("p",null,"And much more, you can check the ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/GemWallet/gemwallet-extension/pull/44"},"release 2.0.0 pull request")," to see the other improvements."),(0,l.kt)("h3",{id:"how-to-install-it"},"How to install it?"),(0,l.kt)("p",null,"To install the last beta version, it's pretty easy:"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Download it ",(0,l.kt)("a",{target:"_blank",href:a(3046).Z},"here"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Extract the zip file you have just downloaded")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Install it in your web browser:"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Chrome: At the top right, click on ",(0,l.kt)("img",{alt:"More",src:a(2459).Z,width:"24",height:"24"}),', "More tools" and then "Extensions".'),(0,l.kt)("li",{parentName:"ul"},"Brave: At the top right, click on ",(0,l.kt)("img",{alt:"More",src:a(2459).Z,width:"24",height:"24"}),', then "Extensions".'))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Activate the developer mode by switching on the slider")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},'Click on "Load unpacked" and select the folder of your extension.')),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Congrats \ud83c\udf89 you now have GemWallet installed."))),(0,l.kt)("p",null,"The video below is put at the right timestamp to show you how to install GemWallet within your web browser."),(0,l.kt)("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/GQFdgM6k60g?start=117",title:"GemWallet Beta Installation",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:!0}),(0,l.kt)("h3",{id:"how-to-use-it"},"How to use it?"),(0,l.kt)("p",null,"To use GemWallet, you need to use the GemWallet API described in the ",(0,l.kt)("a",{parentName:"p",href:"/docs/user-guide/introduction"},"documentation"),"."),(0,l.kt)("p",null,"Unfortunately, the documentation is not up to date as the package is still under development."),(0,l.kt)("p",null,"I am going to show you how to connect the version beta with the following code snippet:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import { isConnected, sendPayment } from "@gemwallet/api";\n\nexport function Checkout() {\n const handlePayment = () => {\n // We make sure that we are connected to the ledger with the isConnected API\n isConnected().then((isConnected) => {\n if (isConnected) {\n const transaction = {\n amount: "0.999999",\n destination: "rNvFCZXpDtGeQ3bSas15wGLN6N2stGmA9o",\n };\n // We send the payment to the extension which will forward it to the XRP Ledger\n sendPayment(transaction)\n .then((trHash) => {\n // If the transaction is a success, the promise returns a transaction hash\n console.log("Transaction Hash: ", trHash);\n })\n .catch((e) => {\n console.log("THE ERROR: ", e);\n });\n } else {\n console.log("You are not connected");\n }\n });\n };\n\n return (\n \n PAY\n \n );\n}\n')),(0,l.kt)("p",null,"In order to don't pollute the npm repository of GemWallet the beta is under the package: ",(0,l.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/@gemwallet-beta/api"},"@gemwallet-beta/api"),"."),(0,l.kt)("p",null,"The code above is extracted from this repository where you can have an example of implementation: ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/FlorianBouron/gemwallet-store-demo/tree/release/2.0.0"},"https://github.com/FlorianBouron/gemwallet-store-demo/tree/release/2.0.0")),(0,l.kt)("h3",{id:"how-to-give-feedback"},"How to give feedback?"),(0,l.kt)("p",null,"Giving us feedback has never been that easy, there are a few ways:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Contact us on ",(0,l.kt)("a",{parentName:"li",href:"https://twitter.com/gemwallet_app"},"Twitter")),(0,l.kt)("li",{parentName:"ul"},"Join the ",(0,l.kt)("a",{parentName:"li",href:"https://discord.gg/CnkP9KGHBe"},"Discord"))),(0,l.kt)("h3",{id:"whats-next"},"What's next?"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Improvements in explaining the reserved amount within the Ledger"),(0,l.kt)("li",{parentName:"ul"},"Enable GemWallet to be connected to the mainnet"),(0,l.kt)("li",{parentName:"ul"},"Answer to your feedback"),(0,l.kt)("li",{parentName:"ul"},"Create a Sign Method to allow authentication within web3 pages"),(0,l.kt)("li",{parentName:"ul"},"Make the 2.0.0 release"),(0,l.kt)("li",{parentName:"ul"},"And much more (Stay tuned for the next announcements, follow us on ",(0,l.kt)("a",{parentName:"li",href:"https://twitter.com/gemwallet_app"},"Twitter"),").")))}c.isMDXComponent=!0},3046:function(e,t,a){t.Z=a.p+"assets/files/gemwallet-beta-8f2860bee30fe2f6f6cd7b6b18f09f6e.zip"},5867:function(e,t,a){t.Z=a.p+"assets/images/GemWalletBeta-70440d6f296006462a2a3b541921b23e.png"},2459:function(e,t){t.Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAAKElEQVR4AWMYrqDUvfQ5ELoTrQGo+D8QPqeZBoSTqAVGQ2k0lIYpAAA/gTrh2+TtPAAAAABJRU5ErkJggg=="}}]); \ No newline at end of file diff --git a/assets/js/98739107.6c029736.js b/assets/js/98739107.e83f8020.js similarity index 96% rename from assets/js/98739107.6c029736.js rename to assets/js/98739107.e83f8020.js index b843c9fe..3f4d9723 100644 --- a/assets/js/98739107.6c029736.js +++ b/assets/js/98739107.e83f8020.js @@ -1 +1 @@ -"use strict";(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[7126],{5261:function(e,t,a){a.r(t),a.d(t,{assets:function(){return m},contentTitle:function(){return p},default:function(){return h},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return d}});var l=a(3117),o=a(102),n=(a(7294),a(4137)),r=["components"],i={slug:"gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development",title:"GemWallet awarded $75,000 by Ripple to speed up its development",authors:"florianb",tags:["GemWallet"]},p=void 0,s={permalink:"/blog/gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development",editUrl:"https://github.com/GemWallet/gemwallet-website/blob/master/blog/2022-07-25-gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development.mdx",source:"@site/blog/2022-07-25-gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development.mdx",title:"GemWallet awarded $75,000 by Ripple to speed up its development",description:"GemWallet and Ripple",date:"2022-07-25T00:00:00.000Z",formattedDate:"July 25, 2022",tags:[{label:"GemWallet",permalink:"/blog/tags/gem-wallet"}],readingTime:1,hasTruncateMarker:!1,authors:[{name:"Florian Bouron",title:"Founder and Maintainer of GemWallet",url:"https://github.com/FlorianBouron",imageURL:"https://github.com/FlorianBouron.png",key:"florianb"}],frontMatter:{slug:"gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development",title:"GemWallet awarded $75,000 by Ripple to speed up its development",authors:"florianb",tags:["GemWallet"]},prevItem:{title:"GemWallet looking for beta testers",permalink:"/blog/gemwallet-looking-for-beta-testers"},nextItem:{title:"Getting started with GemWallet beta",permalink:"/blog/getting-started-with-gemwallet-beta"}},m={authorsImageUrls:[void 0]},d=[],u={toc:d};function h(e){var t=e.components,i=(0,o.Z)(e,r);return(0,n.kt)("wrapper",(0,l.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"GemWallet and Ripple",src:a(1714).Z,width:"1366",height:"768"})),(0,n.kt)("p",null,"Today I would like to announce to you that GemWallet was awarded $75,000 to push the web 3.0 crypto payment onto the web."),(0,n.kt)("p",null,"The grant was awarded during the XRPL Grant Wave 3, which is an international program funded by Ripple.\nIt will help us to accelerate the development of GemWallet and give us visibility through the XRPL (XRP Ledger) community."),(0,n.kt)("p",null,"GemWallet allows you to pay in crypto currency through the XRPL with a web extension, one click you validate the operation with your password and it\u2019s done! As easy as using Apple Pay or Google Pay. The difference is that the payments are low fees ($0.0002 per transaction on average) and fast (3-5 seconds) to get from one account to another."),(0,n.kt)("p",null,"Here is the high level sneak peek of our roadmap:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"Connect GemWallet to the mainnet and publish it to the Chrome Store"),(0,n.kt)("li",{parentName:"ol"},"Allow user to import their wallets via Mnemonic and secret numbers"),(0,n.kt)("li",{parentName:"ol"},"Support different wallet within GemWallet instead of only one wallet"),(0,n.kt)("li",{parentName:"ol"},"Accept other tokens than XRP"),(0,n.kt)("li",{parentName:"ol"},"Compatibility with Mozilla Firefox and not only Chrome, Edge and Brave"),(0,n.kt)("li",{parentName:"ol"},"WooCommerce plugin"),(0,n.kt)("li",{parentName:"ol"},"More developer features\u2026"),(0,n.kt)("li",{parentName:"ol"},"And much more\u2026")))}h.isMDXComponent=!0},1714:function(e,t,a){t.Z=a.p+"assets/images/GemWalletxRipple-cb6dcda3c0741ba278e2b146f362063b.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[7126],{5261:function(e,t,a){a.r(t),a.d(t,{assets:function(){return m},contentTitle:function(){return p},default:function(){return h},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return d}});var l=a(3117),o=a(102),n=(a(7294),a(4137)),r=["components"],i={slug:"gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development",title:"GemWallet awarded $75,000 by Ripple to speed up its development",authors:"florianb",tags:["GemWallet"]},p=void 0,s={permalink:"/blog/gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development",editUrl:"https://github.com/GemWallet/gemwallet-website/blob/master/blog/2022-07-25-gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development.mdx",source:"@site/blog/2022-07-25-gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development.mdx",title:"GemWallet awarded $75,000 by Ripple to speed up its development",description:"GemWallet and Ripple",date:"2022-07-25T00:00:00.000Z",formattedDate:"July 25, 2022",tags:[{label:"GemWallet",permalink:"/blog/tags/gem-wallet"}],readingTime:1,hasTruncateMarker:!1,authors:[{name:"Florian Bouron",title:"Founder and Maintainer of GemWallet",url:"https://github.com/FlorianBouron",imageURL:"https://github.com/FlorianBouron.png",key:"florianb"}],frontMatter:{slug:"gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development",title:"GemWallet awarded $75,000 by Ripple to speed up its development",authors:"florianb",tags:["GemWallet"]},prevItem:{title:"GemWallet looking for beta testers",permalink:"/blog/gemwallet-looking-for-beta-testers"},nextItem:{title:"Getting started with GemWallet beta",permalink:"/blog/getting-started-with-gemwallet-beta"}},m={authorsImageUrls:[void 0]},d=[],u={toc:d};function h(e){var t=e.components,i=(0,o.Z)(e,r);return(0,n.kt)("wrapper",(0,l.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"GemWallet and Ripple",src:a(8942).Z,width:"1366",height:"768"})),(0,n.kt)("p",null,"Today I would like to announce to you that GemWallet was awarded $75,000 to push the web 3.0 crypto payment onto the web."),(0,n.kt)("p",null,"The grant was awarded during the XRPL Grant Wave 3, which is an international program funded by Ripple.\nIt will help us to accelerate the development of GemWallet and give us visibility through the XRPL (XRP Ledger) community."),(0,n.kt)("p",null,"GemWallet allows you to pay in crypto currency through the XRPL with a web extension, one click you validate the operation with your password and it\u2019s done! As easy as using Apple Pay or Google Pay. The difference is that the payments are low fees ($0.0002 per transaction on average) and fast (3-5 seconds) to get from one account to another."),(0,n.kt)("p",null,"Here is the high level sneak peek of our roadmap:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"Connect GemWallet to the mainnet and publish it to the Chrome Store"),(0,n.kt)("li",{parentName:"ol"},"Allow user to import their wallets via Mnemonic and secret numbers"),(0,n.kt)("li",{parentName:"ol"},"Support different wallet within GemWallet instead of only one wallet"),(0,n.kt)("li",{parentName:"ol"},"Accept other tokens than XRP"),(0,n.kt)("li",{parentName:"ol"},"Compatibility with Mozilla Firefox and not only Chrome, Edge and Brave"),(0,n.kt)("li",{parentName:"ol"},"WooCommerce plugin"),(0,n.kt)("li",{parentName:"ol"},"More developer features\u2026"),(0,n.kt)("li",{parentName:"ol"},"And much more\u2026")))}h.isMDXComponent=!0},8942:function(e,t,a){t.Z=a.p+"assets/images/GemWalletxRipple-cb6dcda3c0741ba278e2b146f362063b.png"}}]); \ No newline at end of file diff --git a/assets/js/3767a4a0.ec7c5cca.js b/assets/js/b4dbc926.cabde5f1.js similarity index 68% rename from assets/js/3767a4a0.ec7c5cca.js rename to assets/js/b4dbc926.cabde5f1.js index 6bb81778..82ca8c6f 100644 --- a/assets/js/3767a4a0.ec7c5cca.js +++ b/assets/js/b4dbc926.cabde5f1.js @@ -1 +1 @@ -"use strict";(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[4951],{3769:function(e){e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[2073],{3769:function(e){e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/e172597e.6250344a.js b/assets/js/e172597e.978f2b68.js similarity index 96% rename from assets/js/e172597e.6250344a.js rename to assets/js/e172597e.978f2b68.js index 848ac80a..ee129175 100644 --- a/assets/js/e172597e.6250344a.js +++ b/assets/js/e172597e.978f2b68.js @@ -1 +1 @@ -"use strict";(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[8859],{3369:function(e,t,a){a.r(t),a.d(t,{assets:function(){return m},contentTitle:function(){return p},default:function(){return h},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return d}});var l=a(3117),o=a(102),n=(a(7294),a(4137)),r=["components"],i={slug:"gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development",title:"GemWallet awarded $75,000 by Ripple to speed up its development",authors:"florianb",tags:["GemWallet"]},p=void 0,s={permalink:"/blog/gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development",editUrl:"https://github.com/GemWallet/gemwallet-website/blob/master/blog/2022-07-25-gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development.mdx",source:"@site/blog/2022-07-25-gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development.mdx",title:"GemWallet awarded $75,000 by Ripple to speed up its development",description:"GemWallet and Ripple",date:"2022-07-25T00:00:00.000Z",formattedDate:"July 25, 2022",tags:[{label:"GemWallet",permalink:"/blog/tags/gem-wallet"}],readingTime:1,hasTruncateMarker:!1,authors:[{name:"Florian Bouron",title:"Founder and Maintainer of GemWallet",url:"https://github.com/FlorianBouron",imageURL:"https://github.com/FlorianBouron.png",key:"florianb"}],frontMatter:{slug:"gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development",title:"GemWallet awarded $75,000 by Ripple to speed up its development",authors:"florianb",tags:["GemWallet"]},prevItem:{title:"GemWallet looking for beta testers",permalink:"/blog/gemwallet-looking-for-beta-testers"},nextItem:{title:"Getting started with GemWallet beta",permalink:"/blog/getting-started-with-gemwallet-beta"}},m={authorsImageUrls:[void 0]},d=[],u={toc:d};function h(e){var t=e.components,i=(0,o.Z)(e,r);return(0,n.kt)("wrapper",(0,l.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"GemWallet and Ripple",src:a(1714).Z,width:"1366",height:"768"})),(0,n.kt)("p",null,"Today I would like to announce to you that GemWallet was awarded $75,000 to push the web 3.0 crypto payment onto the web."),(0,n.kt)("p",null,"The grant was awarded during the XRPL Grant Wave 3, which is an international program funded by Ripple.\nIt will help us to accelerate the development of GemWallet and give us visibility through the XRPL (XRP Ledger) community."),(0,n.kt)("p",null,"GemWallet allows you to pay in crypto currency through the XRPL with a web extension, one click you validate the operation with your password and it\u2019s done! As easy as using Apple Pay or Google Pay. The difference is that the payments are low fees ($0.0002 per transaction on average) and fast (3-5 seconds) to get from one account to another."),(0,n.kt)("p",null,"Here is the high level sneak peek of our roadmap:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"Connect GemWallet to the mainnet and publish it to the Chrome Store"),(0,n.kt)("li",{parentName:"ol"},"Allow user to import their wallets via Mnemonic and secret numbers"),(0,n.kt)("li",{parentName:"ol"},"Support different wallet within GemWallet instead of only one wallet"),(0,n.kt)("li",{parentName:"ol"},"Accept other tokens than XRP"),(0,n.kt)("li",{parentName:"ol"},"Compatibility with Mozilla Firefox and not only Chrome, Edge and Brave"),(0,n.kt)("li",{parentName:"ol"},"WooCommerce plugin"),(0,n.kt)("li",{parentName:"ol"},"More developer features\u2026"),(0,n.kt)("li",{parentName:"ol"},"And much more\u2026")))}h.isMDXComponent=!0},1714:function(e,t,a){t.Z=a.p+"assets/images/GemWalletxRipple-cb6dcda3c0741ba278e2b146f362063b.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[8859],{3369:function(e,t,a){a.r(t),a.d(t,{assets:function(){return m},contentTitle:function(){return p},default:function(){return h},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return d}});var l=a(3117),o=a(102),n=(a(7294),a(4137)),r=["components"],i={slug:"gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development",title:"GemWallet awarded $75,000 by Ripple to speed up its development",authors:"florianb",tags:["GemWallet"]},p=void 0,s={permalink:"/blog/gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development",editUrl:"https://github.com/GemWallet/gemwallet-website/blob/master/blog/2022-07-25-gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development.mdx",source:"@site/blog/2022-07-25-gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development.mdx",title:"GemWallet awarded $75,000 by Ripple to speed up its development",description:"GemWallet and Ripple",date:"2022-07-25T00:00:00.000Z",formattedDate:"July 25, 2022",tags:[{label:"GemWallet",permalink:"/blog/tags/gem-wallet"}],readingTime:1,hasTruncateMarker:!1,authors:[{name:"Florian Bouron",title:"Founder and Maintainer of GemWallet",url:"https://github.com/FlorianBouron",imageURL:"https://github.com/FlorianBouron.png",key:"florianb"}],frontMatter:{slug:"gemwallet-awarded-$75,000-by-ripple-to-speed-up-its-development",title:"GemWallet awarded $75,000 by Ripple to speed up its development",authors:"florianb",tags:["GemWallet"]},prevItem:{title:"GemWallet looking for beta testers",permalink:"/blog/gemwallet-looking-for-beta-testers"},nextItem:{title:"Getting started with GemWallet beta",permalink:"/blog/getting-started-with-gemwallet-beta"}},m={authorsImageUrls:[void 0]},d=[],u={toc:d};function h(e){var t=e.components,i=(0,o.Z)(e,r);return(0,n.kt)("wrapper",(0,l.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"GemWallet and Ripple",src:a(8942).Z,width:"1366",height:"768"})),(0,n.kt)("p",null,"Today I would like to announce to you that GemWallet was awarded $75,000 to push the web 3.0 crypto payment onto the web."),(0,n.kt)("p",null,"The grant was awarded during the XRPL Grant Wave 3, which is an international program funded by Ripple.\nIt will help us to accelerate the development of GemWallet and give us visibility through the XRPL (XRP Ledger) community."),(0,n.kt)("p",null,"GemWallet allows you to pay in crypto currency through the XRPL with a web extension, one click you validate the operation with your password and it\u2019s done! As easy as using Apple Pay or Google Pay. The difference is that the payments are low fees ($0.0002 per transaction on average) and fast (3-5 seconds) to get from one account to another."),(0,n.kt)("p",null,"Here is the high level sneak peek of our roadmap:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"Connect GemWallet to the mainnet and publish it to the Chrome Store"),(0,n.kt)("li",{parentName:"ol"},"Allow user to import their wallets via Mnemonic and secret numbers"),(0,n.kt)("li",{parentName:"ol"},"Support different wallet within GemWallet instead of only one wallet"),(0,n.kt)("li",{parentName:"ol"},"Accept other tokens than XRP"),(0,n.kt)("li",{parentName:"ol"},"Compatibility with Mozilla Firefox and not only Chrome, Edge and Brave"),(0,n.kt)("li",{parentName:"ol"},"WooCommerce plugin"),(0,n.kt)("li",{parentName:"ol"},"More developer features\u2026"),(0,n.kt)("li",{parentName:"ol"},"And much more\u2026")))}h.isMDXComponent=!0},8942:function(e,t,a){t.Z=a.p+"assets/images/GemWalletxRipple-cb6dcda3c0741ba278e2b146f362063b.png"}}]); \ No newline at end of file diff --git a/assets/js/main.d8ee206c.js b/assets/js/main.d8ee206c.js new file mode 100644 index 00000000..d354fb8a --- /dev/null +++ b/assets/js/main.d8ee206c.js @@ -0,0 +1,2 @@ +/*! For license information please see main.d8ee206c.js.LICENSE.txt */ +(self.webpackChunkgemwallet_website=self.webpackChunkgemwallet_website||[]).push([[179],{4334:function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t=d.reach);x+=E.value.length,E=E.next){var _=E.value;if(t.length>e.length)return;if(!(_ instanceof o)){var S,T=1;if(v){if(!(S=a(k,x,e,b))||S.index>=e.length)break;var C=S.index,P=S.index+S[0].length,N=x;for(N+=E.value.length;C>=N;)N+=(E=E.next).value.length;if(x=N-=E.value.length,E.value instanceof o)continue;for(var A=E;A!==t.tail&&(Nd.reach&&(d.reach=I);var D=E.prev;if(L&&(D=s(t,D,L),x+=L.length),u(t,D,T),E=s(t,D,new o(p,h?r.tokenize(O,h):O,y,O)),R&&s(t,E,R),T>1){var M={cause:p+","+g,reach:I};i(e,t,n,E.prev,x,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o"+a.content+""},r}(),r=n;n.default=n,r.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[t]},n.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:n}};o["language-"+t]={pattern:/[\s\S]+/,inside:r.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:o},r.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(e,t){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:r.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.c=r.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),r.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),r.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},r.languages.c.string],char:r.languages.c.char,comment:r.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:r.languages.c}}}}),r.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete r.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(r),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(r),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},o={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:o,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:o})}(r),r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(r),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+o+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(r),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(r),r.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:r.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},r.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var l=p(/^\{$/,/^\}$/);if(-1===l)continue;for(var s=n;s=0&&f(u,"variable-input")}}}}function c(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,o=r.inside["interpolation-punctuation"],a=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function s(t,n,r){var o={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(o.code,o.grammar),e.hooks.run("after-tokenize",o),o.tokens}function u(t){var n={};n["interpolation-punctuation"]=o;var a=e.tokenize(t,n);if(3===a.length){var i=[1,1];i.push.apply(i,s(a[1],e.languages.javascript,"javascript")),a.splice.apply(a,i)}return new e.Token("interpolation",a,r.alias,t)}function c(t,n,r){var o=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),i=0,c={},d=s(o.map((function(e){if("string"==typeof e)return e;for(var n,o=e.content;-1!==t.indexOf(n=l(i++,r)););return c[n]=o,n})).join(""),n,r),p=Object.keys(c);return i=0,function e(t){for(var n=0;n=p.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var o=p[i],a="string"==typeof r?r:r.content,l=a.indexOf(o);if(-1!==l){++i;var s=a.substring(0,l),d=u(c[o]),f=a.substring(l+o.length),g=[];if(s&&g.push(s),g.push(d),f){var m=[f];e(m),g.push.apply(g,m)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(g)),n+=g.length-1):r.content=g}}else{var h=r.content;Array.isArray(h)?e(h):e([h])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function p(e){return"string"==typeof e?e:Array.isArray(e)?e.map(p).join(""):p(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,o=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(r),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function a(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return o})),RegExp(e,t)}o=a(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},l=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===i(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:i(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var s=i(o);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(s=i(t[r-1])+s,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",s,null,s)}o.content&&"string"!=typeof o.content&&l(o.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||l(e.tokens)}))}(r),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),"diff"===n&&o.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(r),r.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},r.languages.go=r.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),r.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete r.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,l=i.length;-1!==n.code.indexOf(o=t(r,l));)++l;return i[l]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=a.length);s++){var u=l[s];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=a[o],d=n.tokenStack[c],p="string"==typeof u?u:u.content,f=t(r,c),g=p.indexOf(f);if(g>-1){++o;var m=p.substring(0,g),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=p.substring(g+f.length),v=[];m&&v.push.apply(v,i([m])),v.push(h),b&&v.push.apply(v,i([b])),"string"==typeof u?l.splice.apply(l,[s,1].concat(v)):u.content=v}}else u.content&&i(u.content)}return l}(n.tokens)}}}})}(r),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(r),r.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},r.languages.webmanifest=r.languages.json,r.languages.less=r.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),r.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),r.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},r.languages.objectivec=r.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete r.languages.objectivec["class-name"],r.languages.objc=r.languages.objectivec,r.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},r.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},r.languages.python["string-interpolation"].inside.interpolation.inside.rest=r.languages.python,r.languages.py=r.languages.python,r.languages.reason=r.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),r.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete r.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(r),r.languages.scss=r.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),r.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),r.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),r.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),r.languages.scss.atrule.inside.rest=r.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(r),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(r),r.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},t.Z=r},7459:function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t1?t-1:0),r=1;r\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

\n

We suggest trying baseUrl =

\n\n'}(e)).replace(/0)&&(j.current.unobserve(e),j.current.disconnect(),null!=I&&window.docusaurus.prefetch(I))}))})),j.current.observe(e))},to:I},m&&{isActive:y,activeClassName:v}))}var m=a.forwardRef(g)},7325:function(e,t,n){"use strict";n.d(t,{Z:function(){return s},I:function(){return l}});var r=n(7294);function o(e,t){var n=e.split(/(\{\w+\})/).map((function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e}));return n.some((function(e){return(0,r.isValidElement)(e)}))?n.map((function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e})).filter((function(e){return""!==e})):n.join("")}var a=n(7529);function i(e){var t,n,r=e.id,o=e.message;if(void 0===r&&void 0===o)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=a[null!=r?r:o])?n:o)?t:r}function l(e,t){return o(i({message:e.message,id:e.id}),t)}function s(e){var t=e.children,n=e.id,a=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var l=i({message:t,id:n});return r.createElement(r.Fragment,null,o(l,a))}},6875:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var r="default"},2735:function(e,t,n){"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{Z:function(){return o},b:function(){return r}})},9524:function(e,t,n){"use strict";n.d(t,{C:function(){return a},Z:function(){return i}});var r=n(9962),o=n(2735);function a(){var e=(0,r.Z)().siteConfig,t=e.baseUrl,n=e.url;return{withBaseUrl:function(e,r){return function(e,t,n,r){var a=void 0===r?{}:r,i=a.forcePrependBaseUrl,l=void 0!==i&&i,s=a.absolute,u=void 0!==s&&s;if(!n||n.startsWith("#")||(0,o.b)(n))return n;if(l)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;var c=n.startsWith(t)?n:t+n.replace(/^\//,"");return u?e+c:c}(n,t,e,r)}}}function i(e,t){return void 0===t&&(t={}),(0,a().withBaseUrl)(e,t)}},9962:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(7294),o=n(694);function a(){return(0,r.useContext)(o._)}},1048:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(7294),o=n(8121);function a(){return(0,r.useContext)(o._)}},5304:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(e){var t={};return function e(n,r){Object.entries(n).forEach((function(n){var o,a=n[0],i=n[1],l=r?r+"."+a:a;"object"==typeof(o=i)&&o&&Object.keys(o).length>0?e(i,l):t[l]=i}))}(e),t}},9656:function(e,t,n){"use strict";n.d(t,{_:function(){return o},z:function(){return a}});var r=n(7294),o=r.createContext(null);function a(e){var t=e.children,n=e.value,a=r.useContext(o),i=(0,r.useMemo)((function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:a,value:n})}),[a,n]);return r.createElement(o.Provider,{value:i},t)}},9871:function(e,t,n){"use strict";n.d(t,{Iw:function(){return m},gA:function(){return p},_r:function(){return c},Jo:function(){return h},zh:function(){return d},yW:function(){return g},gB:function(){return f}});var r=n(6775),o=n(9962),a=n(6875);function i(e,t){void 0===t&&(t={});var n=(0,o.Z)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var l=function(e){return e.versions.find((function(e){return e.isLast}))};function s(e,t){var n,o,a=function(e,t){var n=l(e);return[].concat(e.versions.filter((function(e){return e!==n})),[n]).find((function(e){return!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})}))}(e,t),i=null==a?void 0:a.docs.find((function(e){return!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:a,activeDoc:i,alternateDocVersions:i?(n=i.id,o={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===n&&(o[e.name]=t)}))})),o):{}}}var u={},c=function(){var e;return null!=(e=i("docusaurus-plugin-content-docs"))?e:u},d=function(e){return function(e,t,n){void 0===t&&(t=a.m),void 0===n&&(n={});var r=i(e),o=null==r?void 0:r[t];if(!o&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return o}("docusaurus-plugin-content-docs",e,{failfast:!0})};function p(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var o=Object.entries(e).sort((function(e,t){return t[1].path.localeCompare(e[1].path)})).find((function(e){var n=e[1];return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),a=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!a&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map((function(e){return e.path})).join(", "));return a}(c(),(0,r.TH)().pathname,e)}function f(e){return d(e).versions}function g(e){var t=d(e);return l(t)}function m(e){return s(d(e),(0,r.TH)().pathname)}function h(e){return function(e,t){var n=l(e);return{latestDocSuggestion:s(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(d(e),(0,r.TH)().pathname)}},4313:function(e,t,n){"use strict";n.r(t);var r={onRouteDidUpdate:function(e){var t=e.location,n=e.previousLocation;!n||t.pathname===n.pathname&&t.search===n.search&&t.hash===n.hash||setTimeout((function(){window.gtag("event","page_view",{page_title:document.title,page_location:window.location.href,page_path:t.pathname+t.search+t.hash})}))}};t.default=r},9957:function(e,t,n){"use strict";n.r(t);var r=n(4865),o=n.n(r);o().configure({showSpinner:!1});var a={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout((function(){o().start()}),200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){o().done()}};t.default=a},2251:function(e,t,n){"use strict";n.r(t);var r,o,a=n(1205),i=n(6809);r=a.Z,o=i.default.themeConfig.prism.additionalLanguages,globalThis.Prism=r,o.forEach((function(e){n(6726)("./prism-"+e)})),delete globalThis.Prism},4082:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(7294),o="iconExternalLink_nPIU";function a(e){var t=e.width,n=void 0===t?13.5:t,a=e.height,i=void 0===a?13.5:a;return r.createElement("svg",{width:n,height:i,"aria-hidden":"true",viewBox:"0 0 24 24",className:o},r.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},3386:function(e,t,n){"use strict";n.d(t,{Z:function(){return St}});var r=n(7294),o=n(4334),a=n(3256),i=n(5463),l=n(3702),s=n(8181),u=n(7325),c=n(6775),d=n(3266);function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}var f="skipToContent_fXgn";function g(){var e=function(){var e=(0,r.useRef)(null),t=(0,c.k6)().action,n=(0,r.useCallback)((function(e){var t;e.preventDefault();var n=null!=(t=document.querySelector("main:first-of-type"))?t:document.querySelector("."+l.k.wrapper.main);n&&p(n)}),[]);return(0,d.S)((function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,handleSkip:n}}(),t=e.containerRef,n=e.handleSkip;return r.createElement("div",{ref:t,role:"region","aria-label":(0,u.I)({id:"theme.common.skipToMainContent"})},r.createElement("a",{href:"#",className:f,onClick:n},r.createElement(u.Z,{id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"},"Skip to main content")))}var m=n(107),h=n(5830),b=n(3117),v=n(102),y=["width","height","color","strokeWidth","className"];function w(e){var t=e.width,n=void 0===t?21:t,o=e.height,a=void 0===o?21:o,i=e.color,l=void 0===i?"currentColor":i,s=e.strokeWidth,u=void 0===s?1.2:s,c=(e.className,(0,v.Z)(e,y));return r.createElement("svg",(0,b.Z)({viewBox:"0 0 15 15",width:n,height:a},c),r.createElement("g",{stroke:l,strokeWidth:u},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}var k="closeButton_CVFx";function E(e){return r.createElement("button",(0,b.Z)({type:"button","aria-label":(0,u.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,o.Z)("clean-btn close",k,e.className)}),r.createElement(w,{width:14,height:14,strokeWidth:3.1}))}var x="content_knG7";function _(e){var t=(0,m.L)().announcementBar.content;return r.createElement("div",(0,b.Z)({},e,{className:(0,o.Z)(x,e.className),dangerouslySetInnerHTML:{__html:t}}))}var S="announcementBar_mb4j",T="announcementBarPlaceholder_vyr4",C="announcementBarClose_gvF7",P="announcementBarContent_xLdY";function N(){var e=(0,m.L)().announcementBar,t=(0,h.nT)(),n=t.isActive,o=t.close;if(!n)return null;var a=e.backgroundColor,i=e.textColor,l=e.isCloseable;return r.createElement("div",{className:S,style:{backgroundColor:a,color:i},role:"banner"},l&&r.createElement("div",{className:T}),r.createElement(_,{className:P}),l&&r.createElement(E,{onClick:o,className:C}))}var A=n(2600),O=n(2957);var L=n(109),R=n(3086),I=r.createContext(null);function D(e){var t,n,o,a,i,l,s,u=e.children,c=(t=(0,A.e)(),n=(0,R.HY)(),o=(0,r.useState)(!1),a=o[0],i=o[1],l=null!==n.component,s=(0,L.D9)(l),(0,r.useEffect)((function(){l&&!s&&i(!0)}),[l,s]),(0,r.useEffect)((function(){l?t.shown||i(!0):i(!1)}),[t.shown,l]),(0,r.useMemo)((function(){return[a,i]}),[a]));return r.createElement(I.Provider,{value:c},u)}function M(e){if(e.component){var t=e.component;return r.createElement(t,e.props)}}function F(){var e=(0,r.useContext)(I);if(!e)throw new L.i6("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],o=(0,r.useCallback)((function(){return n(!1)}),[n]),a=(0,R.HY)();return(0,r.useMemo)((function(){return{shown:t,hide:o,content:M(a)}}),[o,a,t])}function j(e){var t=e.header,n=e.primaryMenu,a=e.secondaryMenu,i=F().shown;return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,o.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},a)))}var B=n(9200),z=n(1048);function U(e){return r.createElement("svg",(0,b.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"}))}function $(e){return r.createElement("svg",(0,b.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"}))}var q={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function Z(e){var t=e.className,n=e.value,a=e.onChange,i=(0,z.Z)(),l=(0,u.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===n?(0,u.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,u.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,o.Z)(q.toggle,t)},r.createElement("button",{className:(0,o.Z)("clean-btn",q.toggleButton,!i&&q.toggleButtonDisabled),type:"button",onClick:function(){return a("dark"===n?"light":"dark")},disabled:!i,title:l,"aria-label":l},r.createElement(U,{className:(0,o.Z)(q.toggleIcon,q.lightToggleIcon)}),r.createElement($,{className:(0,o.Z)(q.toggleIcon,q.darkToggleIcon)})))}var G=r.memo(Z);function H(e){var t=e.className,n=(0,m.L)().colorMode.disableSwitch,o=(0,B.I)(),a=o.colorMode,i=o.setColorMode;return n?null:r.createElement(G,{className:t,value:a,onChange:i})}var V=n(6811);function W(){return r.createElement(V.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function K(){var e=(0,A.e)();return r.createElement("button",{type:"button",className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()}},r.createElement(w,{color:"var(--ifm-color-emphasis-600)"}))}function Y(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(W,null),r.createElement(H,{className:"margin-right--md"}),r.createElement(K,null))}var Q=n(3699),X=n(9524),J=n(2735);function ee(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var te=n(4082),ne=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function re(e){var t=e.activeBasePath,n=e.activeBaseRegex,o=e.to,a=e.href,i=e.label,l=e.html,s=e.isDropdownLink,u=e.prependBaseUrlToHref,c=(0,v.Z)(e,ne),d=(0,X.Z)(o),p=(0,X.Z)(t),f=(0,X.Z)(a,{forcePrependBaseUrl:!0}),g=i&&a&&!(0,J.Z)(a),m=l?{dangerouslySetInnerHTML:{__html:l}}:{children:r.createElement(r.Fragment,null,i,g&&r.createElement(te.Z,s&&{width:12,height:12}))};return a?r.createElement(Q.Z,(0,b.Z)({href:u?f:a},c,m)):r.createElement(Q.Z,(0,b.Z)({to:d,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?ee(n,t.pathname):t.pathname.startsWith(p)}},c,m))}var oe=["className","isDropdownItem"],ae=["className","isDropdownItem"],ie=["mobile","position"];function le(e){var t=e.className,n=e.isDropdownItem,a=void 0!==n&&n,i=(0,v.Z)(e,oe),l=r.createElement(re,(0,b.Z)({className:(0,o.Z)(a?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:a},i));return a?r.createElement("li",null,l):l}function se(e){var t=e.className,n=(e.isDropdownItem,(0,v.Z)(e,ae));return r.createElement("li",{className:"menu__list-item"},r.createElement(re,(0,b.Z)({className:(0,o.Z)("menu__link",t)},n)))}function ue(e){var t,n=e.mobile,o=void 0!==n&&n,a=(e.position,(0,v.Z)(e,ie)),i=o?se:le;return r.createElement(i,(0,b.Z)({},a,{activeClassName:null!=(t=a.activeClassName)?t:o?"menu__link--active":"navbar__link--active"}))}var ce=n(4639),de=n(9003),pe=n(9962);var fe=["items","position","className","onClick"],ge=["items","className","position","onClick"],me=["mobile"];function he(e,t){return e.some((function(e){return function(e,t){return!!(0,de.Mg)(e.to,t)||!!ee(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)}))}function be(e){var t,n=e.items,a=e.position,i=e.className,l=(e.onClick,(0,v.Z)(e,fe)),s=(0,r.useRef)(null),u=(0,r.useState)(!1),c=u[0],d=u[1];return(0,r.useEffect)((function(){var e=function(e){s.current&&!s.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[s]),r.createElement("div",{ref:s,className:(0,o.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===a,"dropdown--show":c})},r.createElement(re,(0,b.Z)({"aria-haspopup":"true","aria-expanded":c,role:"button",href:l.to?void 0:"#",className:(0,o.Z)("navbar__link",i)},l,{onClick:l.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),d(!c))}}),null!=(t=l.children)?t:l.label),r.createElement("ul",{className:"dropdown__menu"},n.map((function(e,t){return r.createElement(je,(0,b.Z)({isDropdownItem:!0,onKeyDown:function(e){if(t===n.length-1&&"Tab"===e.key){e.preventDefault(),d(!1);var r=s.current.nextElementSibling;if(r)(r instanceof HTMLAnchorElement?r:r.querySelector("a")).focus()}},activeClassName:"dropdown__link--active"},e,{key:t}))}))))}function ve(e){var t,n,a=e.items,i=e.className,l=(e.position,e.onClick),s=(0,v.Z)(e,ge),u=(n=(0,pe.Z)().siteConfig.baseUrl,(0,c.TH)().pathname.replace(n,"/")),d=he(a,u),p=(0,ce.u)({initialState:function(){return!d}}),f=p.collapsed,g=p.toggleCollapsed,m=p.setCollapsed;return(0,r.useEffect)((function(){d&&m(!d)}),[u,d,m]),r.createElement("li",{className:(0,o.Z)("menu__list-item",{"menu__list-item--collapsed":f})},r.createElement(re,(0,b.Z)({role:"button",className:(0,o.Z)("menu__link menu__link--sublist menu__link--sublist-caret",i)},s,{onClick:function(e){e.preventDefault(),g()}}),null!=(t=s.children)?t:s.label),r.createElement(ce.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:f},a.map((function(e,t){return r.createElement(je,(0,b.Z)({mobile:!0,isDropdownItem:!0,onClick:l,activeClassName:"menu__link--active"},e,{key:t}))}))))}function ye(e){var t=e.mobile,n=void 0!==t&&t,o=(0,v.Z)(e,me),a=n?ve:be;return r.createElement(a,o)}var we=n(626),ke=["width","height"];function Ee(e){var t=e.width,n=void 0===t?20:t,o=e.height,a=void 0===o?20:o,i=(0,v.Z)(e,ke);return r.createElement("svg",(0,b.Z)({viewBox:"0 0 24 24",width:n,height:a,"aria-hidden":!0},i),r.createElement("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"}))}var xe="iconLanguage_nlXk",_e=["mobile","dropdownItemsBefore","dropdownItemsAfter"];var Se=function(){return null},Te="searchBox_ZlJk";function Ce(e){var t=e.children,n=e.className;return r.createElement("div",{className:(0,o.Z)(n,Te)},t)}var Pe=n(9871),Ne=n(4544),Ae=["docId","label","docsPluginId"];var Oe=["sidebarId","label","docsPluginId"];var Le=["label","to","docsPluginId"];var Re=n(6409),Ie=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"],De=function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))};var Me={default:ue,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,o=e.dropdownItemsAfter,a=(0,v.Z)(e,_e),i=(0,pe.Z)().i18n,l=i.currentLocale,s=i.locales,c=i.localeConfigs,d=(0,we.l)(),p=s.map((function(e){var n="pathname://"+d.createUrl({locale:e,fullyQualified:!1});return{label:c[e].label,lang:c[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===l?t?"menu__link--active":"dropdown__link--active":""}})),f=[].concat(n,p,o),g=t?(0,u.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):c[l].label;return r.createElement(ye,(0,b.Z)({},a,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(Ee,{className:xe}),g),items:f}))},search:function(e){var t=e.mobile,n=e.className;return t?null:r.createElement(Ce,{className:n},r.createElement(Se,null))},dropdown:ye,html:function(e){var t=e.value,n=e.className,a=e.mobile,i=void 0!==a&&a,l=e.isDropdownItem,s=void 0!==l&&l,u=s?"li":"div";return r.createElement(u,{className:(0,o.Z)({navbar__item:!i&&!s,"menu__list-item":i},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,o=e.docsPluginId,a=(0,v.Z)(e,Ae),i=(0,Pe.Iw)(o).activeDoc,l=(0,Ne.vY)(t,o);return null===l?null:r.createElement(ue,(0,b.Z)({exact:!0},a,{isActive:function(){return(null==i?void 0:i.path)===l.path||!(null==i||!i.sidebar)&&i.sidebar===l.sidebar},label:null!=n?n:l.id,to:l.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,o=e.docsPluginId,a=(0,v.Z)(e,Oe),i=(0,Pe.Iw)(o).activeDoc,l=(0,Ne.oz)(t,o).link;if(!l)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return r.createElement(ue,(0,b.Z)({exact:!0},a,{isActive:function(){return(null==i?void 0:i.sidebar)===t},label:null!=n?n:l.label,to:l.path}))},docsVersion:function(e){var t=e.label,n=e.to,o=e.docsPluginId,a=(0,v.Z)(e,Le),i=(0,Ne.lO)(o)[0],l=null!=t?t:i.label,s=null!=n?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(i).path;return r.createElement(ue,(0,b.Z)({},a,{label:l,to:s}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,o=e.dropdownActiveClassDisabled,a=e.dropdownItemsBefore,i=e.dropdownItemsAfter,l=(0,v.Z)(e,Ie),s=(0,Pe.Iw)(n),c=(0,Pe.gB)(n),d=(0,Re.J)(n).savePreferredVersionName,p=c.map((function(e){var t,n=null!=(t=s.alternateDocVersions[e.name])?t:De(e);return{label:e.label,to:n.path,isActive:function(){return e===s.activeVersion},onClick:function(){return d(e.name)}}})),f=[].concat(a,p,i),g=(0,Ne.lO)(n)[0],m=t&&f.length>1?(0,u.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,h=t&&f.length>1?void 0:De(g).path;return f.length<=1?r.createElement(ue,(0,b.Z)({},l,{mobile:t,label:m,to:h,isActive:o?function(){return!1}:void 0})):r.createElement(ye,(0,b.Z)({},l,{mobile:t,label:m,to:h,items:f,isActive:o?function(){return!1}:void 0}))}},Fe=["type"];function je(e){var t=e.type,n=(0,v.Z)(e,Fe),o=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=Me[o];if(!a)throw new Error('No NavbarItem component found for type "'+t+'".');return r.createElement(a,n)}function Be(){var e=(0,A.e)(),t=(0,m.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map((function(t,n){return r.createElement(je,(0,b.Z)({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))})))}function ze(e){return r.createElement("button",(0,b.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(u.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"},"\u2190 Back to main menu"))}function Ue(){var e=0===(0,m.L)().navbar.items.length,t=F();return r.createElement(r.Fragment,null,!e&&r.createElement(ze,{onClick:function(){return t.hide()}}),t.content)}function $e(){var e,t=(0,A.e)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e]),t.shouldRender?r.createElement(j,{header:r.createElement(Y,null),primaryMenu:r.createElement(Be,null),secondaryMenu:r.createElement(Ue,null)}):null}var qe="navbarHideable_m1mJ",Ze="navbarHidden_jGov";function Ge(e){return r.createElement("div",(0,b.Z)({role:"presentation"},e,{className:(0,o.Z)("navbar-sidebar__backdrop",e.className)}))}function He(e){var t=e.children,n=(0,m.L)().navbar,a=n.hideOnScroll,i=n.style,l=(0,A.e)(),s=function(e){var t=(0,r.useState)(e),n=t[0],o=t[1],a=(0,r.useRef)(!1),i=(0,r.useRef)(0),l=(0,r.useCallback)((function(e){null!==e&&(i.current=e.getBoundingClientRect().height)}),[]);return(0,O.RF)((function(t,n){var r=t.scrollY;if(e)if(r=l?o(!1):r+u0&&r.createElement(ut,{links:n}),logo:o&&r.createElement(ft,{logo:o}),copyright:t&&r.createElement(gt,{copyright:t})})}var bt=r.memo(ht),vt=n(2560),yt="docusaurus.tab.",wt=r.createContext(void 0);var kt=(0,L.Qc)([B.S,h.pl,function(e){var t=e.children,n=function(){var e=(0,r.useState)({}),t=e[0],n=e[1],o=(0,r.useCallback)((function(e,t){(0,vt.W)("docusaurus.tab."+e).set(t)}),[]);(0,r.useEffect)((function(){try{var e={};(0,vt._)().forEach((function(t){if(t.startsWith(yt)){var n=t.substring(yt.length);e[n]=(0,vt.W)(t).get()}})),n(e)}catch(t){console.error(t)}}),[]);var a=(0,r.useCallback)((function(e,t){n((function(n){var r;return Object.assign({},n,((r={})[e]=t,r))})),o(e,t)}),[o]);return(0,r.useMemo)((function(){return{tabGroupChoices:t,setTabGroupChoices:a}}),[t,a])}();return r.createElement(wt.Provider,{value:n},t)},O.OC,Re.L5,i.VC,function(e){var t=e.children;return r.createElement(R.n2,null,r.createElement(A.M,null,r.createElement(D,null,t)))}]);function Et(e){var t=e.children;return r.createElement(kt,null,t)}function xt(e){var t=e.error,n=e.tryAgain;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(u.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("p",null,t.message),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},r.createElement(u.Z,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again when the page crashed"},"Try again"))))))}var _t="mainWrapper_z2l0";function St(e){var t=e.children,n=e.noFooter,u=e.wrapperClassName,c=e.title,d=e.description;return(0,s.t)(),r.createElement(Et,null,r.createElement(i.d,{title:c,description:d}),r.createElement(g,null),r.createElement(N,null),r.createElement(et,null),r.createElement("div",{className:(0,o.Z)(l.k.wrapper.main,_t,u)},r.createElement(a.Z,{fallback:function(e){return r.createElement(xt,e)}},t)),!n&&r.createElement(bt,null))}},6811:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(3117),o=n(102),a=n(7294),i=n(3699),l=n(9524),s=n(9962),u=n(107),c=n(7909),d=["imageClassName","titleClassName"];function p(e){var t=e.logo,n=e.alt,r=e.imageClassName,o={light:(0,l.Z)(t.src),dark:(0,l.Z)(t.srcDark||t.src)},i=a.createElement(c.Z,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?a.createElement("div",{className:r},i):i}function f(e){var t,n=(0,s.Z)().siteConfig.title,c=(0,u.L)().navbar,f=c.title,g=c.logo,m=e.imageClassName,h=e.titleClassName,b=(0,o.Z)(e,d),v=(0,l.Z)((null==g?void 0:g.href)||"/"),y=f?"":n,w=null!=(t=null==g?void 0:g.alt)?t:y;return a.createElement(i.Z,(0,r.Z)({to:v},b,(null==g?void 0:g.target)&&{target:g.target}),g&&a.createElement(p,{logo:g,alt:w,imageClassName:m}),null!=f&&a.createElement("b",{className:h},f))}},3647:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(7294),o=n(1514);function a(e){var t=e.locale,n=e.version,a=e.tag,i=t;return r.createElement(o.Z,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),a&&r.createElement("meta",{name:"docusaurus_tag",content:a}),i&&r.createElement("meta",{name:"docsearch:language",content:i}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),a&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:a}))}},7909:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(3117),o=n(102),a=n(7294),i=n(4334),l=n(1048),s=n(9200),u={themedImage:"themedImage_ToTc","themedImage--light":"themedImage--light_HNdA","themedImage--dark":"themedImage--dark_i4oU"},c=["sources","className","alt"];function d(e){var t=(0,l.Z)(),n=(0,s.I)().colorMode,d=e.sources,p=e.className,f=e.alt,g=(0,o.Z)(e,c),m=t?"dark"===n?["dark"]:["light"]:["light","dark"];return a.createElement(a.Fragment,null,m.map((function(e){return a.createElement("img",(0,r.Z)({key:e,src:d[e],alt:f,className:(0,i.Z)(u.themedImage,u["themedImage--"+e],p)},g))})))}},4639:function(e,t,n){"use strict";n.d(t,{u:function(){return u},z:function(){return b}});var r=n(3117),o=n(102),a=n(7294),i=n(6136),l=["collapsed"],s=["lazy"];function u(e){var t=e.initialState,n=(0,a.useState)(null!=t&&t),r=n[0],o=n[1],i=(0,a.useCallback)((function(){o((function(e){return!e}))}),[]);return{collapsed:r,setCollapsed:o,toggleCollapsed:i}}var c={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function p(e,t){var n=t?c:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function f(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,o=(0,a.useRef)(!1);(0,a.useEffect)((function(){var e,a=t.current;function i(){var e,t,n=a.scrollHeight,o=null!=(e=null==r?void 0:r.duration)?e:function(e){var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+o+"ms "+(null!=(t=null==r?void 0:r.easing)?t:"ease-in-out"),height:n+"px"}}function l(){var e=i();a.style.transition=e.transition,a.style.height=e.height}if(!o.current)return p(a,n),void(o.current=!0);return a.style.willChange="height",e=requestAnimationFrame((function(){n?(l(),requestAnimationFrame((function(){a.style.height=c.height,a.style.overflow=c.overflow}))):(a.style.display="block",requestAnimationFrame((function(){l()})))})),function(){return cancelAnimationFrame(e)}}),[t,n,r])}function g(e){if(!i.Z.canUseDOM)return e?c:d}function m(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,o=e.children,i=e.animation,l=e.onCollapseTransitionEnd,s=e.className,u=e.disableSSRStyle,c=(0,a.useRef)(null);return f({collapsibleRef:c,collapsed:r,animation:i}),a.createElement(n,{ref:c,style:u?void 0:g(r),onTransitionEnd:function(e){"height"===e.propertyName&&(p(c.current,r),null==l||l(r))},className:s},o)}function h(e){var t=e.collapsed,n=(0,o.Z)(e,l),i=(0,a.useState)(!t),s=i[0],u=i[1],c=(0,a.useState)(t),d=c[0],p=c[1];return(0,a.useLayoutEffect)((function(){t||u(!0)}),[t]),(0,a.useLayoutEffect)((function(){s&&p(t)}),[s,t]),s?a.createElement(m,(0,r.Z)({},n,{collapsed:d})):null}function b(e){var t=e.lazy,n=(0,o.Z)(e,s),r=t?h:m;return a.createElement(r,n)}},5830:function(e,t,n){"use strict";n.d(t,{nT:function(){return g},pl:function(){return f}});var r=n(7294),o=n(1048),a=n(2560),i=n(109),l=n(107),s=(0,a.W)("docusaurus.announcement.dismiss"),u=(0,a.W)("docusaurus.announcement.id"),c=function(){return"true"===s.get()},d=function(e){return s.set(String(e))},p=r.createContext(null);function f(e){var t=e.children,n=function(){var e=(0,l.L)().announcementBar,t=(0,o.Z)(),n=(0,r.useState)((function(){return!!t&&c()})),a=n[0],i=n[1];(0,r.useEffect)((function(){i(c())}),[]);var s=(0,r.useCallback)((function(){d(!0),i(!0)}),[]);return(0,r.useEffect)((function(){if(e){var t=e.id,n=u.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;u.set(t),r&&d(!1),!r&&c()||i(!1)}}),[e]),(0,r.useMemo)((function(){return{isActive:!!e&&!a,close:s}}),[e,a,s])}();return r.createElement(p.Provider,{value:n},t)}function g(){var e=(0,r.useContext)(p);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},9200:function(e,t,n){"use strict";n.d(t,{I:function(){return h},S:function(){return m}});var r=n(7294),o=n(6136),a=n(109),i=n(2560),l=n(107),s=r.createContext(void 0),u="theme",c=(0,i.W)(u),d="light",p="dark",f=function(e){return e===p?p:d};function g(){var e=(0,l.L)().colorMode,t=e.defaultMode,n=e.disableSwitch,a=e.respectPrefersColorScheme,i=(0,r.useState)(function(e){return o.Z.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e)}(t)),s=i[0],g=i[1];(0,r.useEffect)((function(){n&&c.del()}),[n]);var m=(0,r.useCallback)((function(e,n){void 0===n&&(n={});var r=n.persist,o=void 0===r||r;e?(g(e),o&&function(e){c.set(f(e))}(e)):(g(a?window.matchMedia("(prefers-color-scheme: dark)").matches?p:d:t),c.del())}),[a,t]);(0,r.useEffect)((function(){document.documentElement.setAttribute("data-theme",f(s))}),[s]),(0,r.useEffect)((function(){if(!n){var e=function(e){if(e.key===u){var t=c.get();null!==t&&m(f(t))}};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}}}),[n,m]);var h=(0,r.useRef)(!1);return(0,r.useEffect)((function(){if(!n||a){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(){window.matchMedia("print").matches||h.current?h.current=window.matchMedia("print").matches:m(null)};return e.addListener(t),function(){return e.removeListener(t)}}}),[m,n,a]),(0,r.useMemo)((function(){return{colorMode:s,setColorMode:m,get isDarkTheme(){return s===p},setLightTheme:function(){m(d)},setDarkTheme:function(){m(p)}}}),[s,m])}function m(e){var t=e.children,n=g();return r.createElement(s.Provider,{value:n},t)}function h(){var e=(0,r.useContext)(s);if(null==e)throw new a.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},6409:function(e,t,n){"use strict";n.d(t,{J:function(){return y},L5:function(){return b}});var r=n(7294),o=n(9871),a=n(6875),i=n(107),l=n(4544),s=n(109),u=n(2560),c=function(e){return"docs-preferred-version-"+e},d=function(e,t,n){(0,u.W)(c(e),{persistence:t}).set(n)},p=function(e,t){return(0,u.W)(c(e),{persistence:t}).get()},f=function(e,t){(0,u.W)(c(e),{persistence:t}).del()};var g=r.createContext(null);function m(){var e=(0,o._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((function(){return Object.keys(e)}),[e]),a=(0,r.useState)((function(){return function(e){return Object.fromEntries(e.map((function(e){return[e,{preferredVersionName:null}]})))}(n)})),l=a[0],s=a[1];return(0,r.useEffect)((function(){s(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map((function(e){return[e,(t=e,o=p(t,n),r[t].versions.some((function(e){return e.name===o}))?{preferredVersionName:o}:(f(t,n),{preferredVersionName:null}))];var t,o})))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[l,(0,r.useMemo)((function(){return{savePreferredVersion:function(e,n){d(e,t,n),s((function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))}))}}}),[t])]}function h(e){var t=e.children,n=m();return r.createElement(g.Provider,{value:n},t)}function b(e){var t=e.children;return l.cE?r.createElement(h,null,t):r.createElement(r.Fragment,null,t)}function v(){var e=(0,r.useContext)(g);if(!e)throw new s.i6("DocsPreferredVersionContextProvider");return e}function y(e){var t;void 0===e&&(e=a.m);var n=(0,o.zh)(e),i=v(),l=i[0],s=i[1],u=l[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find((function(e){return e.name===u})))?t:null,savePreferredVersionName:(0,r.useCallback)((function(t){s.savePreferredVersion(e,t)}),[s,e])}}},4432:function(e,t,n){"use strict";n.d(t,{V:function(){return s},b:function(){return l}});var r=n(7294),o=n(109),a=Symbol("EmptyContext"),i=r.createContext(a);function l(e){var t=e.children,n=e.name,o=e.items,a=(0,r.useMemo)((function(){return n&&o?{name:n,items:o}:null}),[n,o]);return r.createElement(i.Provider,{value:a},t)}function s(){var e=(0,r.useContext)(i);if(e===a)throw new o.i6("DocsSidebarProvider");return e}},2600:function(e,t,n){"use strict";n.d(t,{M:function(){return p},e:function(){return f}});var r=n(7294),o=n(3086),a=n(3488),i=n(6775),l=n(109);function s(e){!function(e){var t=(0,i.k6)(),n=(0,l.zX)(e);(0,r.useEffect)((function(){return t.block((function(e,t){return n(e,t)}))}),[t,n])}((function(t,n){if("POP"===n)return e(t,n)}))}var u=n(107),c=r.createContext(void 0);function d(){var e,t=(e=(0,o.HY)(),0===(0,u.L)().navbar.items.length&&!e.component),n=(0,a.i)(),i=!t&&"mobile"===n,l=(0,r.useState)(!1),c=l[0],d=l[1];s((function(){if(c)return d(!1),!1}));var p=(0,r.useCallback)((function(){d((function(e){return!e}))}),[]);return(0,r.useEffect)((function(){"desktop"===n&&d(!1)}),[n]),(0,r.useMemo)((function(){return{disabled:t,shouldRender:i,toggle:p,shown:c}}),[t,i,p,c])}function p(e){var t=e.children,n=d();return r.createElement(c.Provider,{value:n},t)}function f(){var e=r.useContext(c);if(void 0===e)throw new l.i6("NavbarMobileSidebarProvider");return e}},3086:function(e,t,n){"use strict";n.d(t,{HY:function(){return l},Zo:function(){return s},n2:function(){return i}});var r=n(7294),o=n(109),a=r.createContext(null);function i(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return r.createElement(a.Provider,{value:n},t)}function l(){var e=(0,r.useContext)(a);if(!e)throw new o.i6("NavbarSecondaryMenuContentProvider");return e[0]}function s(e){var t=e.component,n=e.props,i=(0,r.useContext)(a);if(!i)throw new o.i6("NavbarSecondaryMenuContentProvider");var l=i[1],s=(0,o.Ql)(n);return(0,r.useEffect)((function(){l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((function(){return function(){return l({component:null,props:null})}}),[l]),null}},8181:function(e,t,n){"use strict";n.d(t,{h:function(){return o},t:function(){return a}});var r=n(7294),o="navigation-with-keyboard";function a(){(0,r.useEffect)((function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(o),"mousedown"===e.type&&document.body.classList.remove(o)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},3488:function(e,t,n){"use strict";n.d(t,{i:function(){return u}});var r=n(7294),o=n(6136),a="desktop",i="mobile",l="ssr";function s(){return o.Z.canUseDOM?window.innerWidth>996?a:i:l}function u(){var e=(0,r.useState)((function(){return s()})),t=e[0],n=e[1];return(0,r.useEffect)((function(){function e(){n(s())}return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),clearTimeout(undefined)}}),[]),t}},3702:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",admonitionType:function(e){return"theme-admonition-"+e}},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{}}},4544:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Wl:function(){return g},_F:function(){return h},cE:function(){return f},hI:function(){return E},lO:function(){return y},vY:function(){return k},oz:function(){return w},s1:function(){return v}});var a=n(7294),i=n(6775),l=n(8790),s=n(9871),u=n(6409),c=n(4432);function d(e){return Array.from(new Set(e))}var p=n(9003),f=!!s._r;function g(e){if(e.href)return e.href;for(var t,n=o(e.items);!(t=n()).done;){var r=t.value;if("link"===r.type)return r.href;if("category"===r.type){var a=g(r);if(a)return a}}}var m=function(e,t){return void 0!==e&&(0,p.Mg)(e,t)};function h(e,t){return"link"===e.type?m(e.href,t):"category"===e.type&&(m(e.href,t)||function(e,t){return e.some((function(e){return h(e,t)}))}(e.items,t))}function b(e){var t=e.sidebarItems,n=e.pathname,r=e.onlyCategories,a=void 0!==r&&r,i=[];return function e(t){for(var r,l=o(t);!(r=l()).done;){var s=r.value;if("category"===s.type&&((0,p.Mg)(s.href,n)||e(s.items))||"link"===s.type&&(0,p.Mg)(s.href,n))return a&&"category"!==s.type||i.unshift(s),!0}return!1}(t),i}function v(){var e,t=(0,c.V)(),n=(0,i.TH)().pathname;return!1!==(null==(e=(0,s.gA)())?void 0:e.pluginData.breadcrumbs)&&t?b({sidebarItems:t.items,pathname:n}):null}function y(e){var t=(0,s.Iw)(e).activeVersion,n=(0,u.J)(e).preferredVersion,r=(0,s.yW)(e);return(0,a.useMemo)((function(){return d([t,n,r].filter(Boolean))}),[t,n,r])}function w(e,t){var n=y(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.sidebars?Object.entries(e.sidebars):[]})),r=t.find((function(t){return t[0]===e}));if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\n Available sidebar ids are:\n - '+Object.keys(t).join("\n- "));return r[1]}),[e,n])}function k(e,t){var n=y(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.docs})),r=t.find((function(t){return t.id===e}));if(!r){if(n.flatMap((function(e){return e.draftIds})).includes(e))return null;throw new Error("DocNavbarItem: couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\nAvailable doc ids are:\n- '+d(t.map((function(e){return e.id}))).join("\n- "))}return r}),[e,n])}function E(e){var t=e.route,n=e.versionMetadata,r=(0,i.TH)(),o=t.routes,a=o.find((function(e){return(0,i.LX)(r.pathname,e)}));if(!a)return null;var s=a.sidebar,u=s?n.docsSidebars[s]:void 0;return{docElement:(0,l.H)(o),sidebarName:s,sidebarItems:u}}},5463:function(e,t,n){"use strict";n.d(t,{FG:function(){return p},d:function(){return c},VC:function(){return f}});var r=n(7294),o=n(7459),a=n(1514),i=n(9656);function l(){var e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var s=n(9524),u=n(9962);function c(e){var t=e.title,n=e.description,o=e.keywords,i=e.image,l=e.children,c=function(e){var t=(0,u.Z)().siteConfig,n=t.title,r=t.titleDelimiter;return null!=e&&e.trim().length?e.trim()+" "+r+" "+n:n}(t),d=(0,s.C)().withBaseUrl,p=i?d(i,{absolute:!0}):void 0;return r.createElement(a.Z,null,t&&r.createElement("title",null,c),t&&r.createElement("meta",{property:"og:title",content:c}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),o&&r.createElement("meta",{name:"keywords",content:Array.isArray(o)?o.join(","):o}),p&&r.createElement("meta",{property:"og:image",content:p}),p&&r.createElement("meta",{name:"twitter:image",content:p}),l)}var d=r.createContext(void 0);function p(e){var t=e.className,n=e.children,i=r.useContext(d),l=(0,o.Z)(i,t);return r.createElement(d.Provider,{value:l},r.createElement(a.Z,null,r.createElement("html",{className:l})),n)}function f(e){var t=e.children,n=l(),a="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),i="plugin-id-"+n.plugin.id;return r.createElement(p,{className:(0,o.Z)(a,i)},t)}},109:function(e,t,n){"use strict";n.d(t,{i6:function(){return g},Qc:function(){return h},zX:function(){return p},D9:function(){return f},Ql:function(){return m}});var r=n(7802),o=n(1073);function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}var i=n(9817);function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function s(e,t,n){return s=l()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&(0,i.Z)(o,n.prototype),o},s.apply(null,arguments)}function u(e){var t="function"==typeof Map?new Map:void 0;return u=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,a(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,i.Z)(r,e)},u(e)}var c=n(7294),d=n(6136).Z.canUseDOM?c.useLayoutEffect:c.useEffect;function p(e){var t=(0,c.useRef)(e);return d((function(){t.current=e}),[e]),(0,c.useCallback)((function(){return t.current.apply(t,arguments)}),[])}function f(e){var t=(0,c.useRef)();return d((function(){t.current=e})),t.current}var g=function(e){function t(t,n){var o,a,i,l,s;return(s=e.call(this)||this).name="ReactContextError",s.message="Hook "+(null!=(o=null==(a=s.stack)||null==(i=a.split("\n")[1])||null==(l=i.match((0,r.Z)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:l.groups.name)?o:"")+" is called outside the <"+t+">. "+(null!=n?n:""),s}return(0,o.Z)(t,e),t}(u(Error));function m(e){var t=Object.entries(e);return t.sort((function(e,t){return e[0].localeCompare(t[0])})),(0,c.useMemo)((function(){return e}),t.flat())}function h(e){return function(t){var n=t.children;return c.createElement(c.Fragment,null,e.reduceRight((function(e,t){return c.createElement(t,null,e)}),n))}}},9003:function(e,t,n){"use strict";n.d(t,{Mg:function(){return i},Ns:function(){return l}});var r=n(7294),o=n(997),a=n(9962);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function l(){var e=(0,a.Z)().siteConfig.baseUrl;return(0,r.useMemo)((function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap((function(e){var t;return null!=(t=e.routes)?t:[]})))}(e.routes)}({routes:o.Z,baseUrl:e})}),[e])}},2957:function(e,t,n){"use strict";n.d(t,{Ct:function(){return p},OC:function(){return s},RF:function(){return d}});var r=n(7294),o=n(6136),a=n(1048),i=n(109);var l=r.createContext(void 0);function s(e){var t,n=e.children,o=(t=(0,r.useRef)(!0),(0,r.useMemo)((function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}}),[]));return r.createElement(l.Provider,{value:o},n)}function u(){var e=(0,r.useContext)(l);if(null==e)throw new i.i6("ScrollControllerProvider");return e}var c=function(){return o.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function d(e,t){void 0===t&&(t=[]);var n=u().scrollEventsEnabledRef,o=(0,r.useRef)(c()),a=(0,i.zX)(e);(0,r.useEffect)((function(){var e=function(){if(n.current){var e=c();a(e,o.current),o.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}}),[a,n].concat(t))}function p(){var e=(0,r.useRef)(null),t=(0,a.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var o=document.documentElement.scrollTop;(n&&o>e||!n&&o=0;p--){var f=i[p];"."===f?a(i,p):".."===f?(a(i,p),d++):d&&(a(i,p),d--)}if(!u)for(;d--;d)i.unshift("..");!u||""===i[0]||i[0]&&o(i[0])||i.unshift("");var g=i.join("/");return n&&"/"!==g.substr(-1)&&(g+="/"),g},l=n(2177);function s(e){return"/"===e.charAt(0)?e:"/"+e}function u(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function f(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,r.Z)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function g(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=f(e,t,m(),w.location);c.confirmTransitionTo(o,r,n,(function(e){e&&(w.entries[w.index]=o,d({action:r,location:o}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t
'};function o(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}function i(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var a=n.render(!t),u=a.querySelector(r.barSelector),c=r.speed,d=r.easing;return a.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,i(e,c,d)),1===e?(s(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout((function(){s(a,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),l=e?"-100":a(n.status||0),u=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&f(o),u!=document.body&&c(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}function o(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=o(t),e.style[t]=n}return function(e,t){var n,r,o=arguments;if(2==o.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,o[1],o[2])}}();function u(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=p(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(o="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=o)},7418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,a){for(var i,l,s=o(e),u=1;u