From 58b52b1c30d3de6c37a892dfa34032cb0adc8c8a Mon Sep 17 00:00:00 2001 From: Bobinstein Date: Wed, 27 Sep 2023 00:23:41 +0000 Subject: [PATCH] deploy: 808a32ccfd5b37b89147e023381a54bee5c1e35a --- 404.html | 6 +++--- assets/js/{29.9d9f1afa.js => 29.d7450a84.js} | 2 +- assets/js/{30.2d65f871.js => 30.e18bcd95.js} | 2 +- assets/js/{31.92b62040.js => 31.e7ba423f.js} | 2 +- assets/js/{32.ae676860.js => 32.19ad2198.js} | 2 +- assets/js/{33.71e942e2.js => 33.fca37d1f.js} | 2 +- assets/js/{34.68107c11.js => 34.3f6b03d2.js} | 2 +- assets/js/{35.12cd9a8f.js => 35.5c62359b.js} | 2 +- assets/js/{36.f3a20b89.js => 36.4268e199.js} | 2 +- assets/js/{37.64de29f9.js => 37.14c80239.js} | 2 +- assets/js/{38.bb787046.js => 38.3c2b17dc.js} | 2 +- assets/js/{39.73a32351.js => 39.5b586896.js} | 2 +- assets/js/{40.0f306301.js => 40.6c08260a.js} | 2 +- assets/js/{app.99081f9c.js => app.c54f9bce.js} | 4 ++-- docs/arfs/content-types.html | 4 ++-- docs/arfs/data-model.html | 4 ++-- docs/arfs/entity-types.html | 4 ++-- docs/arfs/index.html | 4 ++-- docs/arfs/privacy.html | 4 ++-- docs/arfs/schema-diagrams.html | 4 ++-- docs/arfs/usage/change/drives.html | 4 ++-- docs/arfs/usage/change/files.html | 4 ++-- docs/arfs/usage/change/folders.html | 4 ++-- docs/arfs/usage/change/snapshots.html | 4 ++-- docs/arfs/usage/create/create-file.html | 4 ++-- docs/arfs/usage/create/create-folder.html | 4 ++-- docs/arfs/usage/create/create-snapshot.html | 4 ++-- docs/arfs/usage/create/index.html | 4 ++-- docs/arfs/usage/extending-schemas.html | 4 ++-- docs/arfs/usage/read/index.html | 4 ++-- docs/cli/all-commands.html | 4 ++-- docs/cli/getting-help.html | 4 ++-- docs/cli/getting-started.html | 4 ++-- docs/cli/index.html | 4 ++-- docs/cli/using-the-cli.html | 4 ++-- docs/core-sdk.html | 4 ++-- docs/index.html | 4 ++-- docs/misc/deploy/deploy.html | 4 ++-- docs/misc/deploy/examples.html | 4 ++-- docs/misc/deploy/index.html | 4 ++-- docs/misc/deploy/paths.html | 4 ++-- docs/misc/deploy/routing.html | 4 ++-- docs/misc/price-calculator.html | 4 ++-- docs/turbo/api/payment.html | 4 ++-- docs/turbo/api/upload.html | 4 ++-- docs/turbo/turbo-sdk/index.html | 4 ++-- docs/turbo/what-is-turbo.html | 4 ++-- index.html | 4 ++-- 48 files changed, 85 insertions(+), 85 deletions(-) rename assets/js/{29.9d9f1afa.js => 29.d7450a84.js} (98%) rename assets/js/{30.2d65f871.js => 30.e18bcd95.js} (97%) rename assets/js/{31.92b62040.js => 31.e7ba423f.js} (98%) rename assets/js/{32.ae676860.js => 32.19ad2198.js} (95%) rename assets/js/{33.71e942e2.js => 33.fca37d1f.js} (97%) rename assets/js/{34.68107c11.js => 34.3f6b03d2.js} (99%) rename assets/js/{35.12cd9a8f.js => 35.5c62359b.js} (88%) rename assets/js/{36.f3a20b89.js => 36.4268e199.js} (99%) rename assets/js/{37.64de29f9.js => 37.14c80239.js} (98%) rename assets/js/{38.bb787046.js => 38.3c2b17dc.js} (99%) rename assets/js/{39.73a32351.js => 39.5b586896.js} (93%) rename assets/js/{40.0f306301.js => 40.6c08260a.js} (99%) rename assets/js/{app.99081f9c.js => app.c54f9bce.js} (95%) diff --git a/404.html b/404.html index 4060f7d..33c1fe6 100644 --- a/404.html +++ b/404.html @@ -12,13 +12,13 @@ - + -

404

That's a Four-Oh-Four.
+ - + diff --git a/assets/js/29.9d9f1afa.js b/assets/js/29.d7450a84.js similarity index 98% rename from assets/js/29.9d9f1afa.js rename to assets/js/29.d7450a84.js index 6a8b802..629fa88 100644 --- a/assets/js/29.9d9f1afa.js +++ b/assets/js/29.d7450a84.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{320:function(e,t,a){"use strict";a.r(t);var o=a(10),r=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"deploying-your-dapp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#deploying-your-dapp"}},[e._v("#")]),e._v(" Deploying your dApp")]),e._v(" "),t("h2",{attrs:{id:"overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[e._v("#")]),e._v(" Overview")]),e._v(" "),t("p",[e._v("This guide will outline the steps needed to deploy your dApp onto the Arweave blockchain using the ArDrive web app. It assumes you have already prepared your dApp to use hash routing and relative file paths, and built static files for any dApp in a language or framework that requires it (like React).")]),e._v(" "),t("h2",{attrs:{id:"deploying"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#deploying"}},[e._v("#")]),e._v(" Deploying")]),e._v(" "),t("h3",{attrs:{id:"step-1-log-into-ardrive"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#step-1-log-into-ardrive"}},[e._v("#")]),e._v(" Step 1: Log into ArDrive")]),e._v(" "),t("p",[e._v("Go to the "),t("a",{attrs:{href:"https://app.ardrive.io/#/sign-in",target:"_blank",rel:"noopener noreferrer"}},[e._v("ArDrive web app"),t("OutboundLink")],1),e._v(" and log in using the method of your choosing. If you don't already have an account, you will need to follow the instructions to set one up.")]),e._v(" "),t("h3",{attrs:{id:"step-2-select-or-create-a-drive"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#step-2-select-or-create-a-drive"}},[e._v("#")]),e._v(" Step 2: Select or Create a Drive")]),e._v(" "),t("p",[e._v('Once logged in, navigate to the drive where you want your project to be hosted. If you haven\'t created a drive yet, or if you want a new one specifically for this project, click the big red "New" button at the top left and create a new drive. Remember, the drive needs to be set to public for your dApp to be accessible to others.')]),e._v(" "),t("h3",{attrs:{id:"step-3-upload-your-project"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#step-3-upload-your-project"}},[e._v("#")]),e._v(" Step 3: Upload your project")]),e._v(" "),t("p",[e._v('With your drive selected, click the big red "New" button again, but this time, select "Upload Folder". Navigate to your project\'s root directory, or the built directory if required, and select it. This will upload the entire directory, maintaining your project\'s file structure.')]),e._v(" "),t("h3",{attrs:{id:"step-4-confirm-upload"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#step-4-confirm-upload"}},[e._v("#")]),e._v(" Step 4: Confirm Upload")]),e._v(" "),t("p",[e._v('You\'ll be given a chance to review the upload and the associated cost. If everything looks right, click "Confirm". Remember, uploading to Arweave isnt free, but the cost is usually quite small and the benefits of having your dApp hosted on the permaweb are significant.')]),e._v(" "),t("h3",{attrs:{id:"step-5-create-the-manifest"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#step-5-create-the-manifest"}},[e._v("#")]),e._v(" Step 5: Create the Manifest")]),e._v(" "),t("p",[e._v('While ArDrive displays your uploaded files as a traditional file structure, with files and folders inside other folders, thats not how they actually exist on Arweave. The manifest acts as a map to all the files your dApp needs to function. After you confirm your upload, navigate into your newly created folder by double clicking on it. Click the big red "New" button again and select "Create manifest". You\'ll be prompted to name the manifest and choose where to save it. Be sure to save it inside the folder you just created.')]),e._v(" "),t("h3",{attrs:{id:"step-6-get-the-data-tx-id"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#step-6-get-the-data-tx-id"}},[e._v("#")]),e._v(" Step 6: Get the Data TX ID")]),e._v(" "),t("p",[e._v('Once the manifest is created, click on it to expand its details. On the bottom right, there\'s a line labeled "Data TX ID". This is the unique identifier for your uploaded dApp on Arweave. Copy this value.')]),e._v(" "),t("h3",{attrs:{id:"step-7-view-and-share-your-dapp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#step-7-view-and-share-your-dapp"}},[e._v("#")]),e._v(" Step 7: View and Share your dApp")]),e._v(" "),t("p",[e._v("Your dApp is now available on the permaweb forever! Append the Data TX ID you just copied to the end of an Arweave gateway URL, like "),t("code",[e._v("https://arweave.net/")]),e._v(" . It might take a few minutes for all of your files to finish propagating through the network, but once they do your dApp will be accessible to anyone, anywhere, at any time.")]),e._v(" "),t("h2",{attrs:{id:"updating-your-dapp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#updating-your-dapp"}},[e._v("#")]),e._v(" Updating your dApp")]),e._v(" "),t("p",[e._v("Files uploaded to Arweave are permanent and immutable. They cannot be changed. However, the "),t("RouterLink",{attrs:{to:"/docs/arfs/overview.html"}},[e._v("Arweave File System (ArFS)")]),e._v(' protocol used (and created) by ArDrive lets you "replace" them with new versions while still being able to access the old ones. You can do this with entire dApps as well. The old files won\'t be displayed in the ArDrive web app unless you click on a file to view its history.')],1),e._v(" "),t("p",[e._v('Once you have made changes to your dApp, and built the static directory for it, you can upload the entire folder again to the same location where you uploaded the original. Follow all the same steps listed above for uploading your dApp. You will need to create a new manifest to correctly point to the updated files. Give it the same name as the old manifest in order to "replace" it. Creating the new manifest will generate a new TX ID used to view the updated dApp.')]),e._v(" "),t("p",[e._v("The old version of the dApp will always be available to anyone who has the correct TX ID")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{309:function(e,t,a){"use strict";a.r(t);var o=a(10),r=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"deploying-your-dapp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#deploying-your-dapp"}},[e._v("#")]),e._v(" Deploying your dApp")]),e._v(" "),t("h2",{attrs:{id:"overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[e._v("#")]),e._v(" Overview")]),e._v(" "),t("p",[e._v("This guide will outline the steps needed to deploy your dApp onto the Arweave blockchain using the ArDrive web app. It assumes you have already prepared your dApp to use hash routing and relative file paths, and built static files for any dApp in a language or framework that requires it (like React).")]),e._v(" "),t("h2",{attrs:{id:"deploying"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#deploying"}},[e._v("#")]),e._v(" Deploying")]),e._v(" "),t("h3",{attrs:{id:"step-1-log-into-ardrive"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#step-1-log-into-ardrive"}},[e._v("#")]),e._v(" Step 1: Log into ArDrive")]),e._v(" "),t("p",[e._v("Go to the "),t("a",{attrs:{href:"https://app.ardrive.io/#/sign-in",target:"_blank",rel:"noopener noreferrer"}},[e._v("ArDrive web app"),t("OutboundLink")],1),e._v(" and log in using the method of your choosing. If you don't already have an account, you will need to follow the instructions to set one up.")]),e._v(" "),t("h3",{attrs:{id:"step-2-select-or-create-a-drive"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#step-2-select-or-create-a-drive"}},[e._v("#")]),e._v(" Step 2: Select or Create a Drive")]),e._v(" "),t("p",[e._v('Once logged in, navigate to the drive where you want your project to be hosted. If you haven\'t created a drive yet, or if you want a new one specifically for this project, click the big red "New" button at the top left and create a new drive. Remember, the drive needs to be set to public for your dApp to be accessible to others.')]),e._v(" "),t("h3",{attrs:{id:"step-3-upload-your-project"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#step-3-upload-your-project"}},[e._v("#")]),e._v(" Step 3: Upload your project")]),e._v(" "),t("p",[e._v('With your drive selected, click the big red "New" button again, but this time, select "Upload Folder". Navigate to your project\'s root directory, or the built directory if required, and select it. This will upload the entire directory, maintaining your project\'s file structure.')]),e._v(" "),t("h3",{attrs:{id:"step-4-confirm-upload"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#step-4-confirm-upload"}},[e._v("#")]),e._v(" Step 4: Confirm Upload")]),e._v(" "),t("p",[e._v('You\'ll be given a chance to review the upload and the associated cost. If everything looks right, click "Confirm". Remember, uploading to Arweave isnt free, but the cost is usually quite small and the benefits of having your dApp hosted on the permaweb are significant.')]),e._v(" "),t("h3",{attrs:{id:"step-5-create-the-manifest"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#step-5-create-the-manifest"}},[e._v("#")]),e._v(" Step 5: Create the Manifest")]),e._v(" "),t("p",[e._v('While ArDrive displays your uploaded files as a traditional file structure, with files and folders inside other folders, thats not how they actually exist on Arweave. The manifest acts as a map to all the files your dApp needs to function. After you confirm your upload, navigate into your newly created folder by double clicking on it. Click the big red "New" button again and select "Create manifest". You\'ll be prompted to name the manifest and choose where to save it. Be sure to save it inside the folder you just created.')]),e._v(" "),t("h3",{attrs:{id:"step-6-get-the-data-tx-id"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#step-6-get-the-data-tx-id"}},[e._v("#")]),e._v(" Step 6: Get the Data TX ID")]),e._v(" "),t("p",[e._v('Once the manifest is created, click on it to expand its details. On the bottom right, there\'s a line labeled "Data TX ID". This is the unique identifier for your uploaded dApp on Arweave. Copy this value.')]),e._v(" "),t("h3",{attrs:{id:"step-7-view-and-share-your-dapp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#step-7-view-and-share-your-dapp"}},[e._v("#")]),e._v(" Step 7: View and Share your dApp")]),e._v(" "),t("p",[e._v("Your dApp is now available on the permaweb forever! Append the Data TX ID you just copied to the end of an Arweave gateway URL, like "),t("code",[e._v("https://arweave.net/")]),e._v(" . It might take a few minutes for all of your files to finish propagating through the network, but once they do your dApp will be accessible to anyone, anywhere, at any time.")]),e._v(" "),t("h2",{attrs:{id:"updating-your-dapp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#updating-your-dapp"}},[e._v("#")]),e._v(" Updating your dApp")]),e._v(" "),t("p",[e._v("Files uploaded to Arweave are permanent and immutable. They cannot be changed. However, the "),t("RouterLink",{attrs:{to:"/docs/arfs/overview.html"}},[e._v("Arweave File System (ArFS)")]),e._v(' protocol used (and created) by ArDrive lets you "replace" them with new versions while still being able to access the old ones. You can do this with entire dApps as well. The old files won\'t be displayed in the ArDrive web app unless you click on a file to view its history.')],1),e._v(" "),t("p",[e._v('Once you have made changes to your dApp, and built the static directory for it, you can upload the entire folder again to the same location where you uploaded the original. Follow all the same steps listed above for uploading your dApp. You will need to create a new manifest to correctly point to the updated files. Give it the same name as the old manifest in order to "replace" it. Creating the new manifest will generate a new TX ID used to view the updated dApp.')]),e._v(" "),t("p",[e._v("The old version of the dApp will always be available to anyone who has the correct TX ID")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/30.2d65f871.js b/assets/js/30.e18bcd95.js similarity index 97% rename from assets/js/30.2d65f871.js rename to assets/js/30.e18bcd95.js index 0fd5767..d5736d7 100644 --- a/assets/js/30.2d65f871.js +++ b/assets/js/30.e18bcd95.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{309:function(e,t,a){"use strict";a.r(t);var r=a(10),s=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"examples"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#examples"}},[e._v("#")]),e._v(" Examples")]),e._v(" "),t("p",[e._v("Below are some basic websites built with different languages or frameworks that provide more detailed information on how to configure your dApp for that framework. Each one has been deployed to Arweave itself to show that it functions correctly, and can be accessed through any Arweave gateway by using its TX ID. These are all very basic examples, but if you follow the principles explained, your dApp will function correctly when deployed to the permaweb no matter how big or complex it becomes.")]),e._v(" "),t("h2",{attrs:{id:"basic-html"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#basic-html"}},[e._v("#")]),e._v(" Basic HTML")]),e._v(" "),t("p",[e._v("A basic HTML website with a javascript script to facilitate hash routing:")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://arweave.net/GPOX8dgUpFpt8IVUyyfBMiPpfWZ9eXHZjNi42W4-_50",target:"_blank",rel:"noopener noreferrer"}},[e._v("GPOX8dgUpFpt8IVUyyfBMiPpfWZ9eXHZjNi42W4-_50"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"react"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#react"}},[e._v("#")]),e._v(" React")]),e._v(" "),t("p",[e._v("A React dApp created using Create-React-App:")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://arweave.net/BTjZhINTpCtWiE0PcfpAQ8a3QhL-1AwXfNJ9lhbaJj0",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTjZhINTpCtWiE0PcfpAQ8a3QhL-1AwXfNJ9lhbaJj0"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"next"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#next"}},[e._v("#")]),e._v(" Next")]),e._v(" "),t("p",[e._v("A Nextjs dApp created using Create-Next-App:")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://arweave.net/01hMcPNA_TEXh1S7p4f6jop7r4lrElF1mIlAwkzhJ_s",target:"_blank",rel:"noopener noreferrer"}},[e._v("01hMcPNA_TEXh1S7p4f6jop7r4lrElF1mIlAwkzhJ_s"),t("OutboundLink")],1)])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{310:function(e,t,a){"use strict";a.r(t);var r=a(10),s=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"examples"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#examples"}},[e._v("#")]),e._v(" Examples")]),e._v(" "),t("p",[e._v("Below are some basic websites built with different languages or frameworks that provide more detailed information on how to configure your dApp for that framework. Each one has been deployed to Arweave itself to show that it functions correctly, and can be accessed through any Arweave gateway by using its TX ID. These are all very basic examples, but if you follow the principles explained, your dApp will function correctly when deployed to the permaweb no matter how big or complex it becomes.")]),e._v(" "),t("h2",{attrs:{id:"basic-html"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#basic-html"}},[e._v("#")]),e._v(" Basic HTML")]),e._v(" "),t("p",[e._v("A basic HTML website with a javascript script to facilitate hash routing:")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://arweave.net/GPOX8dgUpFpt8IVUyyfBMiPpfWZ9eXHZjNi42W4-_50",target:"_blank",rel:"noopener noreferrer"}},[e._v("GPOX8dgUpFpt8IVUyyfBMiPpfWZ9eXHZjNi42W4-_50"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"react"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#react"}},[e._v("#")]),e._v(" React")]),e._v(" "),t("p",[e._v("A React dApp created using Create-React-App:")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://arweave.net/BTjZhINTpCtWiE0PcfpAQ8a3QhL-1AwXfNJ9lhbaJj0",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTjZhINTpCtWiE0PcfpAQ8a3QhL-1AwXfNJ9lhbaJj0"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"next"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#next"}},[e._v("#")]),e._v(" Next")]),e._v(" "),t("p",[e._v("A Nextjs dApp created using Create-Next-App:")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://arweave.net/01hMcPNA_TEXh1S7p4f6jop7r4lrElF1mIlAwkzhJ_s",target:"_blank",rel:"noopener noreferrer"}},[e._v("01hMcPNA_TEXh1S7p4f6jop7r4lrElF1mIlAwkzhJ_s"),t("OutboundLink")],1)])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/31.92b62040.js b/assets/js/31.e7ba423f.js similarity index 98% rename from assets/js/31.92b62040.js rename to assets/js/31.e7ba423f.js index 6039601..c3dbc59 100644 --- a/assets/js/31.92b62040.js +++ b/assets/js/31.e7ba423f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{310:function(e,t,a){"use strict";a.r(t);var i=a(10),r=Object(i.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"file-paths"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#file-paths"}},[e._v("#")]),e._v(" File Paths")]),e._v(" "),t("h2",{attrs:{id:"overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[e._v("#")]),e._v(" Overview")]),e._v(" "),t("p",[e._v("File paths are needed to locate resources in your file system or on a server. There are two types of file paths: absolute and relative. Because there is no way to know exactly from where a user will access a dApp deployed on Arweave, all file paths used need to be relative.")]),e._v(" "),t("h2",{attrs:{id:"absolute-vs-relative"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#absolute-vs-relative"}},[e._v("#")]),e._v(" Absolute Vs. Relative")]),e._v(" "),t("p",[e._v("An absolute path is the full URL to a resource, starting from the root. For example, "),t("code",[e._v("http://www.example.com/images/myImage.jpg")]),e._v(" is an absolute path. It points directly to the image no matter where the code referencing it is located.")]),e._v(" "),t("p",[e._v("A relative path is a path relative to the current location. If you have an HTML file in the root directory (folder) and an image in a subdirectory called 'images', you could use the relative path "),t("code",[e._v("images/myImage.jpg")]),e._v(" to reference the image.")]),e._v(" "),t("h2",{attrs:{id:"why-relative-paths"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#why-relative-paths"}},[e._v("#")]),e._v(" Why Relative Paths")]),e._v(" "),t("p",[e._v("When deploying dApps on Arweave, relative paths are essential because:")]),e._v(" "),t("ul",[t("li",[t("strong",[e._v("Domain agnostic")]),e._v(": Arweave permaweb dApps can be accessed from various gateways, not just one domain. Absolute paths tied to a specific domain will not work.")]),e._v(" "),t("li",[t("strong",[e._v("Decentralized")]),e._v(": Arweave is a decentralized network. There is no root directory or server configuration to reference. All file paths must be relative to the file trying to find an asset, or your dApp wont be able to find it.")])]),e._v(" "),t("h2",{attrs:{id:"identifying-relative-and-absolute-paths"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#identifying-relative-and-absolute-paths"}},[e._v("#")]),e._v(" Identifying Relative and Absolute Paths")]),e._v(" "),t("p",[e._v("The key difference between relative and absolute file paths is where they start from:")]),e._v(" "),t("ul",[t("li",[t("strong",[e._v("Absolute Paths")]),e._v(" start with a slash (/) or a full URL (including the protocol, such as "),t("code",[e._v("http://")]),e._v("). For example, "),t("code",[e._v("/images/myImage.jpg")]),e._v(" or "),t("code",[e._v("http://www.example.com/images/myImage.jpg")]),e._v(" are absolute paths.")]),e._v(" "),t("li",[t("strong",[e._v("Relative Paths")]),e._v(" do not start with a slash. They are relative to the current directory. For example, "),t("code",[e._v("images/myImage.jpg")]),e._v(" or "),t("code",[e._v("../myImage.jpg")]),e._v(" are relative paths.")])]),e._v(" "),t("h2",{attrs:{id:"navigating-with-relative-paths"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#navigating-with-relative-paths"}},[e._v("#")]),e._v(" Navigating with Relative Paths")]),e._v(" "),t("p",[e._v("You can navigate around the files of your project with relative paths by following these principles:")]),e._v(" "),t("ul",[t("li",[t("p",[t("strong",[e._v("Same Directory")]),e._v(": If the file you're trying to reference is in the same directory as the current file, you can just use the filename. For example, if "),t("code",[e._v("index.html")]),e._v(" and "),t("code",[e._v("about.html")]),e._v(" are in the same directory, you can link to "),t("code",[e._v("about.html")]),e._v(" just using "),t("code",[e._v("about.html")]),e._v(".")])]),e._v(" "),t("li",[t("p",[t("strong",[e._v("Subdirectory")]),e._v(": If the file is in a subdirectory, you can use the directory name followed by the filename. For example, "),t("code",[e._v("images/myImage.jpg")]),e._v(" will point to the "),t("code",[e._v("myImage.jpg")]),e._v(" file in the "),t("code",[e._v("images")]),e._v(" subdirectory.")])]),e._v(" "),t("li",[t("p",[t("strong",[e._v("Parent Directory")]),e._v(": If the file is in a parent directory, you can use "),t("code",[e._v("../")]),e._v(" to go up one level. For example, "),t("code",[e._v("../index.html")]),e._v(" will point to "),t("code",[e._v("index.html")]),e._v(" in the parent directory. You can use multiple "),t("code",[e._v("../")]),e._v(" to go up multiple levels, like "),t("code",[e._v("../../index.html")]),e._v(".")])])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{311:function(e,t,a){"use strict";a.r(t);var i=a(10),r=Object(i.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"file-paths"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#file-paths"}},[e._v("#")]),e._v(" File Paths")]),e._v(" "),t("h2",{attrs:{id:"overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[e._v("#")]),e._v(" Overview")]),e._v(" "),t("p",[e._v("File paths are needed to locate resources in your file system or on a server. There are two types of file paths: absolute and relative. Because there is no way to know exactly from where a user will access a dApp deployed on Arweave, all file paths used need to be relative.")]),e._v(" "),t("h2",{attrs:{id:"absolute-vs-relative"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#absolute-vs-relative"}},[e._v("#")]),e._v(" Absolute Vs. Relative")]),e._v(" "),t("p",[e._v("An absolute path is the full URL to a resource, starting from the root. For example, "),t("code",[e._v("http://www.example.com/images/myImage.jpg")]),e._v(" is an absolute path. It points directly to the image no matter where the code referencing it is located.")]),e._v(" "),t("p",[e._v("A relative path is a path relative to the current location. If you have an HTML file in the root directory (folder) and an image in a subdirectory called 'images', you could use the relative path "),t("code",[e._v("images/myImage.jpg")]),e._v(" to reference the image.")]),e._v(" "),t("h2",{attrs:{id:"why-relative-paths"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#why-relative-paths"}},[e._v("#")]),e._v(" Why Relative Paths")]),e._v(" "),t("p",[e._v("When deploying dApps on Arweave, relative paths are essential because:")]),e._v(" "),t("ul",[t("li",[t("strong",[e._v("Domain agnostic")]),e._v(": Arweave permaweb dApps can be accessed from various gateways, not just one domain. Absolute paths tied to a specific domain will not work.")]),e._v(" "),t("li",[t("strong",[e._v("Decentralized")]),e._v(": Arweave is a decentralized network. There is no root directory or server configuration to reference. All file paths must be relative to the file trying to find an asset, or your dApp wont be able to find it.")])]),e._v(" "),t("h2",{attrs:{id:"identifying-relative-and-absolute-paths"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#identifying-relative-and-absolute-paths"}},[e._v("#")]),e._v(" Identifying Relative and Absolute Paths")]),e._v(" "),t("p",[e._v("The key difference between relative and absolute file paths is where they start from:")]),e._v(" "),t("ul",[t("li",[t("strong",[e._v("Absolute Paths")]),e._v(" start with a slash (/) or a full URL (including the protocol, such as "),t("code",[e._v("http://")]),e._v("). For example, "),t("code",[e._v("/images/myImage.jpg")]),e._v(" or "),t("code",[e._v("http://www.example.com/images/myImage.jpg")]),e._v(" are absolute paths.")]),e._v(" "),t("li",[t("strong",[e._v("Relative Paths")]),e._v(" do not start with a slash. They are relative to the current directory. For example, "),t("code",[e._v("images/myImage.jpg")]),e._v(" or "),t("code",[e._v("../myImage.jpg")]),e._v(" are relative paths.")])]),e._v(" "),t("h2",{attrs:{id:"navigating-with-relative-paths"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#navigating-with-relative-paths"}},[e._v("#")]),e._v(" Navigating with Relative Paths")]),e._v(" "),t("p",[e._v("You can navigate around the files of your project with relative paths by following these principles:")]),e._v(" "),t("ul",[t("li",[t("p",[t("strong",[e._v("Same Directory")]),e._v(": If the file you're trying to reference is in the same directory as the current file, you can just use the filename. For example, if "),t("code",[e._v("index.html")]),e._v(" and "),t("code",[e._v("about.html")]),e._v(" are in the same directory, you can link to "),t("code",[e._v("about.html")]),e._v(" just using "),t("code",[e._v("about.html")]),e._v(".")])]),e._v(" "),t("li",[t("p",[t("strong",[e._v("Subdirectory")]),e._v(": If the file is in a subdirectory, you can use the directory name followed by the filename. For example, "),t("code",[e._v("images/myImage.jpg")]),e._v(" will point to the "),t("code",[e._v("myImage.jpg")]),e._v(" file in the "),t("code",[e._v("images")]),e._v(" subdirectory.")])]),e._v(" "),t("li",[t("p",[t("strong",[e._v("Parent Directory")]),e._v(": If the file is in a parent directory, you can use "),t("code",[e._v("../")]),e._v(" to go up one level. For example, "),t("code",[e._v("../index.html")]),e._v(" will point to "),t("code",[e._v("index.html")]),e._v(" in the parent directory. You can use multiple "),t("code",[e._v("../")]),e._v(" to go up multiple levels, like "),t("code",[e._v("../../index.html")]),e._v(".")])])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/32.ae676860.js b/assets/js/32.19ad2198.js similarity index 95% rename from assets/js/32.ae676860.js rename to assets/js/32.19ad2198.js index b0520b4..2014b18 100644 --- a/assets/js/32.ae676860.js +++ b/assets/js/32.19ad2198.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{311:function(e,t,r){"use strict";r.r(t);var o=r(10),n=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"preparing-your-dapp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#preparing-your-dapp"}},[e._v("#")]),e._v(" Preparing Your dApp")]),e._v(" "),t("p",[e._v("To make sure dApps work correctly on the Arweave blockchain, they need to be set up in a specific manner. This is because, unlike traditional web hosting, there are no centralized servers for browsers to request files from. Your dApp needs to be able to handle navigation inside the client's browser instead of relying on communication between the client and a server, and not rely on a server as a point of origin for file paths. This is done by ensuring the following:")]),e._v(" "),t("ul",[t("li",[e._v("Your dApp must use "),t("RouterLink",{attrs:{to:"/docs/misc/deploy/routing.html"}},[e._v("hash routing")])],1),e._v(" "),t("li",[e._v("All internal links in your dApp must use "),t("RouterLink",{attrs:{to:"/docs/misc/deploy/paths.html"}},[e._v("relative file paths")]),e._v(".")],1)]),e._v(" "),t("p",[e._v("Failure to properly implement either will result in your dApp not working the way it should once it is deployed onto Arweave.")])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{312:function(e,t,r){"use strict";r.r(t);var o=r(10),n=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"preparing-your-dapp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#preparing-your-dapp"}},[e._v("#")]),e._v(" Preparing Your dApp")]),e._v(" "),t("p",[e._v("To make sure dApps work correctly on the Arweave blockchain, they need to be set up in a specific manner. This is because, unlike traditional web hosting, there are no centralized servers for browsers to request files from. Your dApp needs to be able to handle navigation inside the client's browser instead of relying on communication between the client and a server, and not rely on a server as a point of origin for file paths. This is done by ensuring the following:")]),e._v(" "),t("ul",[t("li",[e._v("Your dApp must use "),t("RouterLink",{attrs:{to:"/docs/misc/deploy/routing.html"}},[e._v("hash routing")])],1),e._v(" "),t("li",[e._v("All internal links in your dApp must use "),t("RouterLink",{attrs:{to:"/docs/misc/deploy/paths.html"}},[e._v("relative file paths")]),e._v(".")],1)]),e._v(" "),t("p",[e._v("Failure to properly implement either will result in your dApp not working the way it should once it is deployed onto Arweave.")])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/33.71e942e2.js b/assets/js/33.fca37d1f.js similarity index 97% rename from assets/js/33.71e942e2.js rename to assets/js/33.fca37d1f.js index 322897d..5f10a4d 100644 --- a/assets/js/33.71e942e2.js +++ b/assets/js/33.fca37d1f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[33],{312:function(e,t,a){"use strict";a.r(t);var r=a(10),s=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"hash-routing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hash-routing"}},[e._v("#")]),e._v(" Hash Routing")]),e._v(" "),t("h2",{attrs:{id:"overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[e._v("#")]),e._v(" Overview")]),e._v(" "),t("p",[e._v('Hash routing is a popular technique in single page applications (SPAs) where the site navigation is handled using JavaScript. The "hash" in hash routing refers to the hash symbol (#) inserted into the URL. The part of the URL after the hash symbol is used to determine which "page" to show.')]),e._v(" "),t("p",[e._v('For example, if your URL is "http://www.example.com/#about", the part after the hash (about) would be used to show an app\'s "about" page.')]),e._v(" "),t("h2",{attrs:{id:"hash-routing-vs-history-routing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hash-routing-vs-history-routing"}},[e._v("#")]),e._v(" Hash Routing Vs. History Routing")]),e._v(" "),t("p",[e._v('Traditional web apps use history routing, where each unique URL represents a different source or asset contained in a server. The URL "http://www.example.com/about" would fetch the "about" page from the app\'s server and display it for a user. History routing requires a server be available to provide the correct files every time a user navigates around an app.')]),e._v(" "),t("p",[e._v("In contrast, with hash routing, all navigation is handled by the client's browser, so no server is needed for navigation.")]),e._v(" "),t("h2",{attrs:{id:"why-hash-routing-for-dapps"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#why-hash-routing-for-dapps"}},[e._v("#")]),e._v(" Why Hash Routing for dApps")]),e._v(" "),t("p",[e._v("Hash routing is particularly useful for apps deployed on Arweave for several reasons:")]),e._v(" "),t("ul",[t("li",[t("strong",[e._v("Serverless")]),e._v(": Arweave is a decentralized storage network. There's no server to process requests, so routing cannot be handled by a server.")]),e._v(" "),t("li",[t("strong",[e._v("Persistence")]),e._v(': Once data is stored on Arweave, it can\'t be changed. Hash routing allows you to have "dynamic" content within this immutable structure.')]),e._v(" "),t("li",[t("strong",[e._v("Performance")]),e._v(": With hash routing, all the necessary code is loaded once, reducing the number of network requests and improving performance.")])])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[33],{313:function(e,t,a){"use strict";a.r(t);var r=a(10),s=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"hash-routing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hash-routing"}},[e._v("#")]),e._v(" Hash Routing")]),e._v(" "),t("h2",{attrs:{id:"overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[e._v("#")]),e._v(" Overview")]),e._v(" "),t("p",[e._v('Hash routing is a popular technique in single page applications (SPAs) where the site navigation is handled using JavaScript. The "hash" in hash routing refers to the hash symbol (#) inserted into the URL. The part of the URL after the hash symbol is used to determine which "page" to show.')]),e._v(" "),t("p",[e._v('For example, if your URL is "http://www.example.com/#about", the part after the hash (about) would be used to show an app\'s "about" page.')]),e._v(" "),t("h2",{attrs:{id:"hash-routing-vs-history-routing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hash-routing-vs-history-routing"}},[e._v("#")]),e._v(" Hash Routing Vs. History Routing")]),e._v(" "),t("p",[e._v('Traditional web apps use history routing, where each unique URL represents a different source or asset contained in a server. The URL "http://www.example.com/about" would fetch the "about" page from the app\'s server and display it for a user. History routing requires a server be available to provide the correct files every time a user navigates around an app.')]),e._v(" "),t("p",[e._v("In contrast, with hash routing, all navigation is handled by the client's browser, so no server is needed for navigation.")]),e._v(" "),t("h2",{attrs:{id:"why-hash-routing-for-dapps"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#why-hash-routing-for-dapps"}},[e._v("#")]),e._v(" Why Hash Routing for dApps")]),e._v(" "),t("p",[e._v("Hash routing is particularly useful for apps deployed on Arweave for several reasons:")]),e._v(" "),t("ul",[t("li",[t("strong",[e._v("Serverless")]),e._v(": Arweave is a decentralized storage network. There's no server to process requests, so routing cannot be handled by a server.")]),e._v(" "),t("li",[t("strong",[e._v("Persistence")]),e._v(': Once data is stored on Arweave, it can\'t be changed. Hash routing allows you to have "dynamic" content within this immutable structure.')]),e._v(" "),t("li",[t("strong",[e._v("Performance")]),e._v(": With hash routing, all the necessary code is loaded once, reducing the number of network requests and improving performance.")])])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/34.68107c11.js b/assets/js/34.3f6b03d2.js similarity index 99% rename from assets/js/34.68107c11.js rename to assets/js/34.3f6b03d2.js index 2c74143..050fc84 100644 --- a/assets/js/34.68107c11.js +++ b/assets/js/34.3f6b03d2.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[34],{313:function(e,t,r){"use strict";r.r(t);var a=r(10),s=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"ardrive-price-calculator"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#ardrive-price-calculator"}},[e._v("#")]),e._v(" ArDrive Price Calculator")]),e._v(" "),t("h2",{attrs:{id:"overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[e._v("#")]),e._v(" Overview")]),e._v(" "),t("p",[e._v("The "),t("a",{attrs:{href:"https://ardrive.io/pricing/",target:"_blank",rel:"noopener noreferrer"}},[e._v("ArDrive Price Calculator website"),t("OutboundLink")],1),e._v(" is open source, and its code can be viewed "),t("a",{attrs:{href:"https://github.com/ardriveapp/price-calculator",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("This website is intended to calculate the cost, in a wide variety of denominations and cryptocurrencies, of uploading data to Arweave. You can spin up your own version by cloning the code from Github and following these steps.")]),e._v(" "),t("h2",{attrs:{id:"developer-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#developer-setup"}},[e._v("#")]),e._v(" Developer Setup")]),e._v(" "),t("p",[e._v("Follow these steps to get the developer environment up and running:")]),e._v(" "),t("h3",{attrs:{id:"install-yarn-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-yarn-2"}},[e._v("#")]),e._v(" Install Yarn 2")]),e._v(" "),t("p",[e._v("The ArDrive Price Calculator uses Yarn 2, so install the latest version with the "),t("a",{attrs:{href:"https://yarnpkg.com/getting-started/install",target:"_blank",rel:"noopener noreferrer"}},[e._v("yarn installation instructions"),t("OutboundLink")],1),e._v(". In most cases:")]),e._v(" "),t("div",{staticClass:"language-shell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-shell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Brew:")]),e._v("\nbrew "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("install")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("yarn")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Or with NPM:")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("npm")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("install")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-g")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("yarn")]),e._v("\n")])])]),t("p",[e._v("We also use husky to manage the git commit hooks that help to improve the quality of our commits. Without installing husky, you risk committing non-compliant code to the repository.")]),e._v(" "),t("p",[e._v("Using husky triggers two pre-commit hooks. The first will run "),t("code",[e._v("lint-staged")]),e._v(" on each staged file, which includes running prettier to format, eslint for linting, and also tsc-files for quickly checking that TypeScript can compile the code. The second hook will test the codebase prior to committing, ensuring that all tests must pass.")]),e._v(" "),t("p",[e._v("To enable hooks locally, you will need to run:")]),e._v(" "),t("div",{staticClass:"language-shell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-shell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("yarn")]),e._v(" husky "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("install")]),e._v("\n")])])]),t("h3",{attrs:{id:"nvm"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#nvm"}},[e._v("#")]),e._v(" NVM")]),e._v(" "),t("p",[e._v("This repository uses NVM and an "),t("code",[e._v(".nvmrc")]),e._v(" file to lock the Node version to the current version used by "),t("code",[e._v("ardrive-core-js")]),e._v(".")]),e._v(" "),t("p",[e._v("Note for Windows: "),t("strong",[e._v("We recommend using WSL")]),e._v(" for setting up NVM on Windows using the "),t("a",{attrs:{href:"https://code.visualstudio.com/docs/remote/wsl",target:"_blank",rel:"noopener noreferrer"}},[e._v("instructions described here"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("Follow these steps to get NVM up and running on your system:")]),e._v(" "),t("ol",[t("li",[e._v("Install NVM using "),t("a",{attrs:{href:"https://github.com/nvm-sh/nvm#installing-and-updating",target:"_blank",rel:"noopener noreferrer"}},[e._v("these installation instructions"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[e._v("Navigate to this project's root directory")]),e._v(" "),t("li",[e._v("Ensure that the correct version of Node is installed by performing: "),t("code",[e._v("nvm install")])]),e._v(" "),t("li",[t("strong",[e._v("Every time you start a new terminal session or switch to this project from another NPM project")]),e._v(", you should set the correct version of Node by running: "),t("code",[e._v("nvm use")])])]),e._v(" "),t("h3",{attrs:{id:"recommended-visual-studio-code-extensions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#recommended-visual-studio-code-extensions"}},[e._v("#")]),e._v(" Recommended Visual Studio Code extensions")]),e._v(" "),t("p",[e._v("To ensure your environment is compatible, we also recommend the following VSCode extensions:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint",target:"_blank",rel:"noopener noreferrer"}},[e._v("ES-Lint"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig",target:"_blank",rel:"noopener noreferrer"}},[e._v("Editor-Config"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode",target:"_blank",rel:"noopener noreferrer"}},[e._v("Prettier"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://marketplace.visualstudio.com/items?itemName=arcanis.vscode-zipfs",target:"_blank",rel:"noopener noreferrer"}},[e._v("ZipFS"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"available-scripts"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#available-scripts"}},[e._v("#")]),e._v(" Available Scripts")]),e._v(" "),t("h3",{attrs:{id:"yarn-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#yarn-start"}},[e._v("#")]),e._v(" yarn start")]),e._v(" "),t("p",[e._v("Runs the app in the development mode.\nOpen http://localhost:8080 to view it in the browser.")]),e._v(" "),t("p",[e._v("The page will reload if you make edits.\nYou will also see any lint errors in the console.")]),e._v(" "),t("h3",{attrs:{id:"yarn-build"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#yarn-build"}},[e._v("#")]),e._v(" yarn build")]),e._v(" "),t("p",[e._v("Builds a static copy of your site to the "),t("code",[e._v("build/")]),e._v(" folder.\nYour app is ready to be deployed!")]),e._v(" "),t("h3",{attrs:{id:"yarn-test"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#yarn-test"}},[e._v("#")]),e._v(" yarn test")]),e._v(" "),t("p",[e._v("Launches the application test runner.\nRun with the "),t("code",[e._v("--watch")]),e._v(" flag ("),t("code",[e._v("yarn test -- --watch")]),e._v(") to run in interactive watch mode.")]),e._v(" "),t("h3",{attrs:{id:"yarn-run-prod"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#yarn-run-prod"}},[e._v("#")]),e._v(" yarn run:prod")]),e._v(" "),t("p",[e._v("Builds a fresh snowpack production build to the "),t("code",[e._v("build/")]),e._v(" folder\nThen launches that copy with "),t("code",[e._v("http-server-spa")]),e._v(" for local testing\nThe build will be available for preview at: "),t("a",{attrs:{href:"http://localhost:8080",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://localhost:8080"),t("OutboundLink")],1)])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[34],{314:function(e,t,r){"use strict";r.r(t);var a=r(10),s=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"ardrive-price-calculator"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#ardrive-price-calculator"}},[e._v("#")]),e._v(" ArDrive Price Calculator")]),e._v(" "),t("h2",{attrs:{id:"overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[e._v("#")]),e._v(" Overview")]),e._v(" "),t("p",[e._v("The "),t("a",{attrs:{href:"https://ardrive.io/pricing/",target:"_blank",rel:"noopener noreferrer"}},[e._v("ArDrive Price Calculator website"),t("OutboundLink")],1),e._v(" is open source, and its code can be viewed "),t("a",{attrs:{href:"https://github.com/ardriveapp/price-calculator",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("This website is intended to calculate the cost, in a wide variety of denominations and cryptocurrencies, of uploading data to Arweave. You can spin up your own version by cloning the code from Github and following these steps.")]),e._v(" "),t("h2",{attrs:{id:"developer-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#developer-setup"}},[e._v("#")]),e._v(" Developer Setup")]),e._v(" "),t("p",[e._v("Follow these steps to get the developer environment up and running:")]),e._v(" "),t("h3",{attrs:{id:"install-yarn-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-yarn-2"}},[e._v("#")]),e._v(" Install Yarn 2")]),e._v(" "),t("p",[e._v("The ArDrive Price Calculator uses Yarn 2, so install the latest version with the "),t("a",{attrs:{href:"https://yarnpkg.com/getting-started/install",target:"_blank",rel:"noopener noreferrer"}},[e._v("yarn installation instructions"),t("OutboundLink")],1),e._v(". In most cases:")]),e._v(" "),t("div",{staticClass:"language-shell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-shell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Brew:")]),e._v("\nbrew "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("install")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("yarn")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Or with NPM:")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("npm")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("install")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-g")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("yarn")]),e._v("\n")])])]),t("p",[e._v("We also use husky to manage the git commit hooks that help to improve the quality of our commits. Without installing husky, you risk committing non-compliant code to the repository.")]),e._v(" "),t("p",[e._v("Using husky triggers two pre-commit hooks. The first will run "),t("code",[e._v("lint-staged")]),e._v(" on each staged file, which includes running prettier to format, eslint for linting, and also tsc-files for quickly checking that TypeScript can compile the code. The second hook will test the codebase prior to committing, ensuring that all tests must pass.")]),e._v(" "),t("p",[e._v("To enable hooks locally, you will need to run:")]),e._v(" "),t("div",{staticClass:"language-shell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-shell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("yarn")]),e._v(" husky "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("install")]),e._v("\n")])])]),t("h3",{attrs:{id:"nvm"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#nvm"}},[e._v("#")]),e._v(" NVM")]),e._v(" "),t("p",[e._v("This repository uses NVM and an "),t("code",[e._v(".nvmrc")]),e._v(" file to lock the Node version to the current version used by "),t("code",[e._v("ardrive-core-js")]),e._v(".")]),e._v(" "),t("p",[e._v("Note for Windows: "),t("strong",[e._v("We recommend using WSL")]),e._v(" for setting up NVM on Windows using the "),t("a",{attrs:{href:"https://code.visualstudio.com/docs/remote/wsl",target:"_blank",rel:"noopener noreferrer"}},[e._v("instructions described here"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("Follow these steps to get NVM up and running on your system:")]),e._v(" "),t("ol",[t("li",[e._v("Install NVM using "),t("a",{attrs:{href:"https://github.com/nvm-sh/nvm#installing-and-updating",target:"_blank",rel:"noopener noreferrer"}},[e._v("these installation instructions"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[e._v("Navigate to this project's root directory")]),e._v(" "),t("li",[e._v("Ensure that the correct version of Node is installed by performing: "),t("code",[e._v("nvm install")])]),e._v(" "),t("li",[t("strong",[e._v("Every time you start a new terminal session or switch to this project from another NPM project")]),e._v(", you should set the correct version of Node by running: "),t("code",[e._v("nvm use")])])]),e._v(" "),t("h3",{attrs:{id:"recommended-visual-studio-code-extensions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#recommended-visual-studio-code-extensions"}},[e._v("#")]),e._v(" Recommended Visual Studio Code extensions")]),e._v(" "),t("p",[e._v("To ensure your environment is compatible, we also recommend the following VSCode extensions:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint",target:"_blank",rel:"noopener noreferrer"}},[e._v("ES-Lint"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig",target:"_blank",rel:"noopener noreferrer"}},[e._v("Editor-Config"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode",target:"_blank",rel:"noopener noreferrer"}},[e._v("Prettier"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://marketplace.visualstudio.com/items?itemName=arcanis.vscode-zipfs",target:"_blank",rel:"noopener noreferrer"}},[e._v("ZipFS"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"available-scripts"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#available-scripts"}},[e._v("#")]),e._v(" Available Scripts")]),e._v(" "),t("h3",{attrs:{id:"yarn-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#yarn-start"}},[e._v("#")]),e._v(" yarn start")]),e._v(" "),t("p",[e._v("Runs the app in the development mode.\nOpen http://localhost:8080 to view it in the browser.")]),e._v(" "),t("p",[e._v("The page will reload if you make edits.\nYou will also see any lint errors in the console.")]),e._v(" "),t("h3",{attrs:{id:"yarn-build"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#yarn-build"}},[e._v("#")]),e._v(" yarn build")]),e._v(" "),t("p",[e._v("Builds a static copy of your site to the "),t("code",[e._v("build/")]),e._v(" folder.\nYour app is ready to be deployed!")]),e._v(" "),t("h3",{attrs:{id:"yarn-test"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#yarn-test"}},[e._v("#")]),e._v(" yarn test")]),e._v(" "),t("p",[e._v("Launches the application test runner.\nRun with the "),t("code",[e._v("--watch")]),e._v(" flag ("),t("code",[e._v("yarn test -- --watch")]),e._v(") to run in interactive watch mode.")]),e._v(" "),t("h3",{attrs:{id:"yarn-run-prod"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#yarn-run-prod"}},[e._v("#")]),e._v(" yarn run:prod")]),e._v(" "),t("p",[e._v("Builds a fresh snowpack production build to the "),t("code",[e._v("build/")]),e._v(" folder\nThen launches that copy with "),t("code",[e._v("http-server-spa")]),e._v(" for local testing\nThe build will be available for preview at: "),t("a",{attrs:{href:"http://localhost:8080",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://localhost:8080"),t("OutboundLink")],1)])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/35.12cd9a8f.js b/assets/js/35.5c62359b.js similarity index 88% rename from assets/js/35.12cd9a8f.js rename to assets/js/35.5c62359b.js index 56c5301..6312f5f 100644 --- a/assets/js/35.12cd9a8f.js +++ b/assets/js/35.5c62359b.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{314:function(t,e,s){"use strict";s.r(e);var i=s(10),a=Object(i.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("h1",{attrs:{id:"placeholder"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#placeholder"}},[this._v("#")]),this._v(" placeholder")]),this._v(" "),t("p",[this._v("Exercitation proident duis qui est veniam duis ullamco proident et veniam.")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{315:function(t,e,s){"use strict";s.r(e);var i=s(10),a=Object(i.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("h1",{attrs:{id:"placeholder"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#placeholder"}},[this._v("#")]),this._v(" placeholder")]),this._v(" "),t("p",[this._v("Exercitation proident duis qui est veniam duis ullamco proident et veniam.")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/36.f3a20b89.js b/assets/js/36.4268e199.js similarity index 99% rename from assets/js/36.f3a20b89.js rename to assets/js/36.4268e199.js index 49e22bb..1c8cf9c 100644 --- a/assets/js/36.f3a20b89.js +++ b/assets/js/36.4268e199.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{315:function(n,a,e){"use strict";e.r(a);var t=e(10),r=Object(t.a)({},(function(){var n=this,a=n._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":n.$parent.slotKey}},[a("h1",{attrs:{id:"payment-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#payment-api"}},[n._v("#")]),n._v(" Payment API")]),n._v(" "),a("h2",{attrs:{id:"overview"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[n._v("#")]),n._v(" Overview")]),n._v(" "),a("p",[n._v('ArDrive offers several API endpoints to help manage and determine costs associated with converting currencies into Turbo credits. The below endpoints offer access to useful information that can help stay in control when uploading data to Arweave using Turbo. "winc" refers to "winston credits", the smallest denomination of a Turbo credit.')]),n._v(" "),a("p",[a("strong",[n._v("Note")]),n._v(": This service is still evolving and the information provided below may be out of date. You can view the most up to date information about the available endpoints "),a("a",{attrs:{href:"https://payment.ardrive.io/api-docs",target:"_blank",rel:"noopener noreferrer"}},[n._v("here"),a("OutboundLink")],1),n._v(", or view the raw json for that documentation "),a("a",{attrs:{href:"https://payment.ardrive.io/openapi.json",target:"_blank",rel:"noopener noreferrer"}},[n._v("here"),a("OutboundLink")],1),n._v(".")]),n._v(" "),a("h2",{attrs:{id:"endpoints"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#endpoints"}},[n._v("#")]),n._v(" Endpoints")]),n._v(" "),a("p",[n._v("The host url for all below endpoints is:")]),n._v(" "),a("p",[a("code",[n._v("https://payment.ardrive.io/v1")])]),n._v(" "),a("p",[n._v("All of these endpoints use GET requests")]),n._v(" "),a("h3",{attrs:{id:"get-amount-of-credits-for-byte-count"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-amount-of-credits-for-byte-count"}},[n._v("#")]),n._v(" Get Amount of Credits for Byte Count")]),n._v(" "),a("p",[n._v("Returns the current amount of winc it will cost to upload a provided byte count worth of data.")]),n._v(" "),a("p",[a("code",[n._v("/price/bytes/{byteCount}")])]),n._v(" "),a("h4",{attrs:{id:"parameters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters"}},[n._v("#")]),n._v(" Parameters")]),n._v(" "),a("p",[a("code",[n._v("byteCount")]),n._v("*: integer - (path)")]),n._v(" "),a("h4",{attrs:{id:"example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example"}},[n._v("#")]),n._v(" Example")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v("https://payment.ardrive.io/v1/price/bytes/5242880\n")])])]),a("details",[a("summary",[n._v("Response Body (JSON)")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v('{\n "winc": "1676650364",\n "adjustments": [\n {\n "name": "FWD Research July 2023 Subsidy",\n "description": "A 60% discount for uploads over 500KiB",\n "operator": "multiply",\n "value": 0.6,\n "adjustmentAmount": "-2514975546"\n }\n ]\n}\n')])])])]),n._v(" "),a("h3",{attrs:{id:"get-winc-for-payment-type-and-amount"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-winc-for-payment-type-and-amount"}},[n._v("#")]),n._v(" Get winc for Payment Type and Amount")]),n._v(" "),a("p",[n._v("Returns the current amount of winc Turbo will quote for a given payment type and amount.")]),n._v(" "),a("p",[a("code",[n._v("/price/{type}/{amount}")])]),n._v(" "),a("h4",{attrs:{id:"parameters-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-2"}},[n._v("#")]),n._v(" Parameters")]),n._v(" "),a("p",[a("code",[n._v("type")]),n._v('*: string - must match a supported currency, such as "usd" - (path)')]),n._v(" "),a("p",[a("code",[n._v("amount")]),n._v("*: integer - (path)")]),n._v(" "),a("h4",{attrs:{id:"example-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-2"}},[n._v("#")]),n._v(" Example")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v("https://payment.ardrive.io/v1/price/usd/1000\n")])])]),a("details",[a("summary",[n._v("Response Body (JSON)")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v('{\n "winc": "1365248226950"\n}\n')])])])]),n._v(" "),a("h3",{attrs:{id:"get-current-balance-of-winc"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-current-balance-of-winc"}},[n._v("#")]),n._v(" Get Current Balance of winc")]),n._v(" "),a("p",[n._v("use a signed request of a previously obtained JWT to get the signing wallet's current service balance in winc.")]),n._v(" "),a("p",[a("code",[n._v("/balance")])]),n._v(" "),a("h4",{attrs:{id:"parameters-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-3"}},[n._v("#")]),n._v(" Parameters")]),n._v(" "),a("p",[a("code",[n._v("x-signature")]),n._v("*: string - (header)")]),n._v(" "),a("p",[a("code",[n._v("x-nonce")]),n._v("*: string - (header)")]),n._v(" "),a("p",[a("code",[n._v("x-public-key")]),n._v("*: string - (header)")]),n._v(" "),a("h3",{attrs:{id:"get-quote-for-credits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-quote-for-credits"}},[n._v("#")]),n._v(" Get Quote for Credits")]),n._v(" "),a("p",[n._v("Gets a quote and payment session for a given payment method, destination address, currency type, and payment amount")]),n._v(" "),a("p",[a("code",[n._v("/top-up/{method}/{address}/{currency}/{amount}")])]),n._v(" "),a("h4",{attrs:{id:"parameters-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-4"}},[n._v("#")]),n._v(" Parameters")]),n._v(" "),a("p",[a("code",[n._v("method")]),n._v("*: string - payment-intent | checkout-session - (path)")]),n._v(" "),a("p",[a("code",[n._v("address")]),n._v("*: string - public address of wallet - (path)")]),n._v(" "),a("p",[a("code",[n._v("currency")]),n._v("*: string - must match supported currency, such as usd - (path)")]),n._v(" "),a("p",[a("code",[n._v("amount")]),n._v("*: integer - amount of the currency to convert to winc, usd has a minimum transaction amount of 1000 ($10.00) - (path)")]),n._v(" "),a("h4",{attrs:{id:"example-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-3"}},[n._v("#")]),n._v(" Example")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v("https://payment.ardrive.io/v1/top-up/checkout-session/cF0H0SKdnaDTqWKY9iJKBktTpdEWgb3GnlndE7ABv0Q/usd/1000\n")])])]),a("details",[a("summary",[a("b",[n._v("Response Body (JSON)")])]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v('{\n "topUpQuote": {\n "topUpQuoteId": "54f57b67-4fcf-47fb-85e6-85d4a8c96f25",\n "destinationAddressType": "arweave",\n "paymentAmount": 1000,\n "winstonCreditAmount": "1360424028269",\n "destinationAddress": "cF0H0SKdnaDTqWKY9iJKBktTpdEWgb3GnlndE7ABv0Q",\n "currencyType": "usd",\n "quoteExpirationDate": "2023-07-27T01:56:26.436Z",\n "paymentProvider": "stripe"\n },\n "paymentSession": {\n "id": "cs_live_a1p47UpvijHGe7sI8AI1kScZdd5qKzdyaHUWRaeuFVvVvDHXeuck68Pf51",\n "object": "checkout.session",\n "after_expiration": null,\n "allow_promotion_codes": null,\n "amount_subtotal": 1000,\n "amount_total": 1000,\n "automatic_tax": {\n "enabled": false,\n "status": null\n },\n "billing_address_collection": null,\n "cancel_url": "https://app.ardrive.io",\n "client_reference_id": null,\n "consent": null,\n "consent_collection": null,\n "created": 1690422686,\n "currency": "usd",\n "currency_conversion": null,\n "custom_fields": [],\n "custom_text": {\n "shipping_address": null,\n "submit": null\n },\n "customer": null,\n "customer_creation": "if_required",\n "customer_details": null,\n "customer_email": null,\n "expires_at": 1690509086,\n "invoice": null,\n "invoice_creation": {\n "enabled": false,\n "invoice_data": {\n "account_tax_ids": null,\n "custom_fields": null,\n "description": null,\n "footer": null,\n "metadata": {},\n "rendering_options": null\n }\n },\n "livemode": true,\n "locale": null,\n "metadata": {},\n "mode": "payment",\n "payment_intent": null,\n "payment_link": null,\n "payment_method_collection": "always",\n "payment_method_options": {},\n "payment_method_types": [\n "card"\n ],\n "payment_status": "unpaid",\n "phone_number_collection": {\n "enabled": false\n },\n "recovered_from": null,\n "setup_intent": null,\n "shipping_address_collection": null,\n "shipping_cost": null,\n "shipping_details": null,\n "shipping_options": [],\n "status": "open",\n "submit_type": null,\n "subscription": null,\n "success_url": "https://app.ardrive.io",\n "total_details": {\n "amount_discount": 0,\n "amount_shipping": 0,\n "amount_tax": 0\n },\n "url": "https://checkout.stripe.com/c/pay/cs_live_a1p47UpvijHGe7sI8AI1kScZdd5qKzdyaHUWRaeuFVvVvDHXeuck68Pf51#fidkdWxOYHwnPyd1blppbHNgWjA0T1BEcXJGPWR1VUpSbkFJSFR0S0M8dlV1Y2tgS1ZVa3JdPVxfPXw0Q0tBaTNzPDFtX0xyf2JDVlxpNzJnUkAxSmp2PUZJdHBwa1B2ck53TmZkQW1BSjNoNTU3XG88RGBObycpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl"\n }\n}\n')])])])]),n._v(" "),a("h3",{attrs:{id:"get-supported-currencies"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-supported-currencies"}},[n._v("#")]),n._v(" Get Supported Currencies")]),n._v(" "),a("p",[n._v("Returns a list of currency types supported by Turbo")]),n._v(" "),a("p",[a("code",[n._v("/currencies")])]),n._v(" "),a("h4",{attrs:{id:"parameters-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-5"}},[n._v("#")]),n._v(" Parameters")]),n._v(" "),a("p",[n._v("None")]),n._v(" "),a("h4",{attrs:{id:"example-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-4"}},[n._v("#")]),n._v(" Example")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v("https://payment.ardrive.io/v1/currencies\n")])])]),a("details",[a("summary",[a("b",[n._v("Response Body (JSON)")])]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v('{\n "supportedCurrencies": [\n "aud",\n "brl",\n "cad",\n "eur",\n "gbp",\n "hkd",\n "inr",\n "jpy",\n "sgd",\n "usd"\n ],\n "limits": {\n "aud": {\n "maximumPaymentAmount": 1500000,\n "minimumPaymentAmount": 1500,\n "suggestedPaymentAmounts": [\n 2500,\n 7500,\n 15000\n ],\n "zeroDecimalCurrency": false\n },\n "brl": {\n "maximumPaymentAmount": 5000000,\n "minimumPaymentAmount": 5000,\n "suggestedPaymentAmounts": [\n 12500,\n 25000,\n 50000\n ],\n "zeroDecimalCurrency": false\n },\n "cad": {\n "maximumPaymentAmount": 1300000,\n "minimumPaymentAmount": 1400,\n "suggestedPaymentAmounts": [\n 2500,\n 5000,\n 10000\n ],\n "zeroDecimalCurrency": false\n },\n "eur": {\n "maximumPaymentAmount": 1000000,\n "minimumPaymentAmount": 1000,\n "suggestedPaymentAmounts": [\n 2500,\n 5000,\n 10000\n ],\n "zeroDecimalCurrency": false\n },\n "gbp": {\n "maximumPaymentAmount": 770000,\n "minimumPaymentAmount": 780,\n "suggestedPaymentAmounts": [\n 2000,\n 4000,\n 8000\n ],\n "zeroDecimalCurrency": false\n },\n "hkd": {\n "maximumPaymentAmount": 7800000,\n "minimumPaymentAmount": 7900,\n "suggestedPaymentAmounts": [\n 20000,\n 40000,\n 80000\n ],\n "zeroDecimalCurrency": false\n },\n "inr": {\n "maximumPaymentAmount": 90000000,\n "minimumPaymentAmount": 83000,\n "suggestedPaymentAmounts": [\n 200000,\n 400000,\n 800000\n ],\n "zeroDecimalCurrency": false\n },\n "jpy": {\n "maximumPaymentAmount": 1500000,\n "minimumPaymentAmount": 1500,\n "suggestedPaymentAmounts": [\n 3500,\n 6500,\n 15000\n ],\n "zeroDecimalCurrency": true\n },\n "sgd": {\n "maximumPaymentAmount": 1300000,\n "minimumPaymentAmount": 1500,\n "suggestedPaymentAmounts": [\n 2500,\n 7500,\n 15000\n ],\n "zeroDecimalCurrency": false\n },\n "usd": {\n "maximumPaymentAmount": 1000000,\n "minimumPaymentAmount": 1000,\n "suggestedPaymentAmounts": [\n 2500,\n 5000,\n 10000\n ],\n "zeroDecimalCurrency": false\n }\n }\n}\n')])])])]),n._v(" "),a("h3",{attrs:{id:"get-supported-countries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-supported-countries"}},[n._v("#")]),n._v(" Get Supported Countries")]),n._v(" "),a("p",[n._v("Returns a list of countries where Turbo is available")]),n._v(" "),a("p",[a("code",[n._v("/countries")])]),n._v(" "),a("h4",{attrs:{id:"parameters-6"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-6"}},[n._v("#")]),n._v(" Parameters")]),n._v(" "),a("p",[n._v("None")]),n._v(" "),a("h4",{attrs:{id:"example-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-5"}},[n._v("#")]),n._v(" Example")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v("https://payment.ardrive.io/v1/countries\n")])])]),a("details",[a("summary",[a("b",[n._v("Response Body (JSON)")])]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v('[\n "United States",\n "United Kingdom",\n "Afghanistan",\n "Albania",\n "Algeria",\n "Andorra",\n "Angola",\n "Antigua and Barbuda",\n "Argentina",\n "Armenia",\n "Australia",\n "Austria",\n "Azerbaijan",\n "Bahamas",\n "Bahrain",\n "Bangladesh",\n "Barbados",\n "Belarus",\n "Belgium",\n "Belize",\n "Benin",\n "Bhutan",\n "Bolivia",\n "Bosnia and Herzegovina",\n "Botswana",\n "Brazil",\n "Brunei",\n "Bulgaria",\n "Burkina Faso",\n "Burundi",\n "Cabo Verde",\n "Cambodia",\n "Cameroon",\n "Canada",\n "Central African Republic",\n "Chad",\n "Chile",\n "China",\n "Colombia",\n "Comoros",\n "Congo",\n "Costa Rica",\n "Cote d\'Ivoire",\n "Croatia",\n "Cyprus",\n "Czech Republic",\n "Democratic Republic of the Congo",\n "Denmark",\n "Djibouti",\n "Dominica",\n "Dominican Republic",\n "East Timor",\n "Ecuador",\n "Egypt",\n "El Salvador",\n "Equatorial Guinea",\n "Eritrea",\n "Estonia",\n "Eswatini",\n "Ethiopia",\n "Fiji",\n "Finland",\n "France",\n "Gabon",\n "Gambia",\n "Georgia",\n "Germany",\n "Ghana",\n "Greece",\n "Grenada",\n "Guatemala",\n "Guinea",\n "Guinea-Bissau",\n "Guyana",\n "Haiti",\n "Honduras",\n "Hungary",\n "Iceland",\n "India",\n "Indonesia",\n "Iraq",\n "Ireland",\n "Israel",\n "Italy",\n "Jamaica",\n "Japan",\n "Jordan",\n "Kazakhstan",\n "Kenya",\n "Kiribati",\n "Kuwait",\n "Kyrgyzstan",\n "Laos",\n "Latvia",\n "Lebanon",\n "Lesotho",\n "Liberia",\n "Libya",\n "Liechtenstein",\n "Lithuania",\n "Luxembourg",\n "Madagascar",\n "Malawi",\n "Malaysia",\n "Maldives",\n "Mali",\n "Malta",\n "Marshall Islands",\n "Mauritania",\n "Mauritius",\n "Mexico",\n "Micronesia",\n "Moldova",\n "Monaco",\n "Mongolia",\n "Montenegro",\n "Morocco",\n "Mozambique",\n "Myanmar",\n "Namibia",\n "Nauru",\n "Nepal",\n "Netherlands",\n "New Zealand",\n "Nicaragua",\n "Niger",\n "Nigeria",\n "North Macedonia",\n "Norway",\n "Oman",\n "Pakistan",\n "Palau",\n "Palestine",\n "Panama",\n "Papua New Guinea",\n "Paraguay",\n "Peru",\n "Philippines",\n "Poland",\n "Portugal",\n "Qatar",\n "Romania",\n "Russia",\n "Rwanda",\n "Saint Kitts and Nevis",\n "Saint Lucia",\n "Saint Vincent and the Grenadines",\n "Samoa",\n "San Marino",\n "Sao Tome and Principe",\n "Saudi Arabia",\n "Senegal",\n "Serbia",\n "Seychelles",\n "Sierra Leone",\n "Singapore",\n "Slovakia",\n "Slovenia",\n "Solomon Islands",\n "Somalia",\n "South Africa",\n "South Korea",\n "South Sudan",\n "Spain",\n "Sri Lanka",\n "Sudan",\n "Suriname",\n "Sweden",\n "Switzerland",\n "Taiwan",\n "Tajikistan",\n "Tanzania",\n "Thailand",\n "Togo",\n "Tonga",\n "Trinidad and Tobago",\n "Tunisia",\n "Turkey",\n "Turkmenistan",\n "Tuvalu",\n "Uganda",\n "Ukraine",\n "United Arab Emirates",\n "Uruguay",\n "Uzbekistan",\n "Vanuatu",\n "Vatican City",\n "Venezuela",\n "Vietnam",\n "Yemen",\n "Zambia",\n "Zimbabwe"\n]\n')])])])]),n._v(" "),a("h3",{attrs:{id:"get-conversion-rates"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-conversion-rates"}},[n._v("#")]),n._v(" Get Conversion Rates")]),n._v(" "),a("p",[n._v("Returns supported fiat conversion rates for 1GB of storage based on current market prices")]),n._v(" "),a("p",[a("code",[n._v("/rates")])]),n._v(" "),a("h4",{attrs:{id:"parameters-7"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-7"}},[n._v("#")]),n._v(" Parameters")]),n._v(" "),a("p",[n._v("None")]),n._v(" "),a("h4",{attrs:{id:"example-6"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-6"}},[n._v("#")]),n._v(" Example")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v("https://payment.ardrive.io/v1/rates\n")])])]),a("details",[a("summary",[a("b",[n._v("Response Body (JSON)")])]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v('{\n "winc": "343168912867",\n "fiat": {\n "aud": 3.52873729722864,\n "brl": 11.34598786477272,\n "cad": 3.15729126594135,\n "eur": 2.1569195680425,\n "gbp": 1.8487882011791101,\n "hkd": 18.66938404981161,\n "inr": 196.24591287088242,\n "jpy": 334.744630809484,\n "sgd": 3.16995419882613,\n "usd": 2.39329431522465\n },\n "adjustments": [\n {\n "name": "FWD Research July 2023 Subsidy",\n "description": "A 60% discount for uploads over 500KiB",\n "operator": "multiply",\n "value": 0.6,\n "adjustmentAmount": "-514753369299"\n }\n ]\n}\n')])])])]),n._v(" "),a("p",[n._v("* required")])])}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{316:function(n,a,e){"use strict";e.r(a);var t=e(10),r=Object(t.a)({},(function(){var n=this,a=n._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":n.$parent.slotKey}},[a("h1",{attrs:{id:"payment-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#payment-api"}},[n._v("#")]),n._v(" Payment API")]),n._v(" "),a("h2",{attrs:{id:"overview"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[n._v("#")]),n._v(" Overview")]),n._v(" "),a("p",[n._v('ArDrive offers several API endpoints to help manage and determine costs associated with converting currencies into Turbo credits. The below endpoints offer access to useful information that can help stay in control when uploading data to Arweave using Turbo. "winc" refers to "winston credits", the smallest denomination of a Turbo credit.')]),n._v(" "),a("p",[a("strong",[n._v("Note")]),n._v(": This service is still evolving and the information provided below may be out of date. You can view the most up to date information about the available endpoints "),a("a",{attrs:{href:"https://payment.ardrive.io/api-docs",target:"_blank",rel:"noopener noreferrer"}},[n._v("here"),a("OutboundLink")],1),n._v(", or view the raw json for that documentation "),a("a",{attrs:{href:"https://payment.ardrive.io/openapi.json",target:"_blank",rel:"noopener noreferrer"}},[n._v("here"),a("OutboundLink")],1),n._v(".")]),n._v(" "),a("h2",{attrs:{id:"endpoints"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#endpoints"}},[n._v("#")]),n._v(" Endpoints")]),n._v(" "),a("p",[n._v("The host url for all below endpoints is:")]),n._v(" "),a("p",[a("code",[n._v("https://payment.ardrive.io/v1")])]),n._v(" "),a("p",[n._v("All of these endpoints use GET requests")]),n._v(" "),a("h3",{attrs:{id:"get-amount-of-credits-for-byte-count"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-amount-of-credits-for-byte-count"}},[n._v("#")]),n._v(" Get Amount of Credits for Byte Count")]),n._v(" "),a("p",[n._v("Returns the current amount of winc it will cost to upload a provided byte count worth of data.")]),n._v(" "),a("p",[a("code",[n._v("/price/bytes/{byteCount}")])]),n._v(" "),a("h4",{attrs:{id:"parameters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters"}},[n._v("#")]),n._v(" Parameters")]),n._v(" "),a("p",[a("code",[n._v("byteCount")]),n._v("*: integer - (path)")]),n._v(" "),a("h4",{attrs:{id:"example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example"}},[n._v("#")]),n._v(" Example")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v("https://payment.ardrive.io/v1/price/bytes/5242880\n")])])]),a("details",[a("summary",[n._v("Response Body (JSON)")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v('{\n "winc": "1676650364",\n "adjustments": [\n {\n "name": "FWD Research July 2023 Subsidy",\n "description": "A 60% discount for uploads over 500KiB",\n "operator": "multiply",\n "value": 0.6,\n "adjustmentAmount": "-2514975546"\n }\n ]\n}\n')])])])]),n._v(" "),a("h3",{attrs:{id:"get-winc-for-payment-type-and-amount"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-winc-for-payment-type-and-amount"}},[n._v("#")]),n._v(" Get winc for Payment Type and Amount")]),n._v(" "),a("p",[n._v("Returns the current amount of winc Turbo will quote for a given payment type and amount.")]),n._v(" "),a("p",[a("code",[n._v("/price/{type}/{amount}")])]),n._v(" "),a("h4",{attrs:{id:"parameters-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-2"}},[n._v("#")]),n._v(" Parameters")]),n._v(" "),a("p",[a("code",[n._v("type")]),n._v('*: string - must match a supported currency, such as "usd" - (path)')]),n._v(" "),a("p",[a("code",[n._v("amount")]),n._v("*: integer - (path)")]),n._v(" "),a("h4",{attrs:{id:"example-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-2"}},[n._v("#")]),n._v(" Example")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v("https://payment.ardrive.io/v1/price/usd/1000\n")])])]),a("details",[a("summary",[n._v("Response Body (JSON)")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v('{\n "winc": "1365248226950"\n}\n')])])])]),n._v(" "),a("h3",{attrs:{id:"get-current-balance-of-winc"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-current-balance-of-winc"}},[n._v("#")]),n._v(" Get Current Balance of winc")]),n._v(" "),a("p",[n._v("use a signed request of a previously obtained JWT to get the signing wallet's current service balance in winc.")]),n._v(" "),a("p",[a("code",[n._v("/balance")])]),n._v(" "),a("h4",{attrs:{id:"parameters-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-3"}},[n._v("#")]),n._v(" Parameters")]),n._v(" "),a("p",[a("code",[n._v("x-signature")]),n._v("*: string - (header)")]),n._v(" "),a("p",[a("code",[n._v("x-nonce")]),n._v("*: string - (header)")]),n._v(" "),a("p",[a("code",[n._v("x-public-key")]),n._v("*: string - (header)")]),n._v(" "),a("h3",{attrs:{id:"get-quote-for-credits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-quote-for-credits"}},[n._v("#")]),n._v(" Get Quote for Credits")]),n._v(" "),a("p",[n._v("Gets a quote and payment session for a given payment method, destination address, currency type, and payment amount")]),n._v(" "),a("p",[a("code",[n._v("/top-up/{method}/{address}/{currency}/{amount}")])]),n._v(" "),a("h4",{attrs:{id:"parameters-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-4"}},[n._v("#")]),n._v(" Parameters")]),n._v(" "),a("p",[a("code",[n._v("method")]),n._v("*: string - payment-intent | checkout-session - (path)")]),n._v(" "),a("p",[a("code",[n._v("address")]),n._v("*: string - public address of wallet - (path)")]),n._v(" "),a("p",[a("code",[n._v("currency")]),n._v("*: string - must match supported currency, such as usd - (path)")]),n._v(" "),a("p",[a("code",[n._v("amount")]),n._v("*: integer - amount of the currency to convert to winc, usd has a minimum transaction amount of 1000 ($10.00) - (path)")]),n._v(" "),a("h4",{attrs:{id:"example-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-3"}},[n._v("#")]),n._v(" Example")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v("https://payment.ardrive.io/v1/top-up/checkout-session/cF0H0SKdnaDTqWKY9iJKBktTpdEWgb3GnlndE7ABv0Q/usd/1000\n")])])]),a("details",[a("summary",[a("b",[n._v("Response Body (JSON)")])]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v('{\n "topUpQuote": {\n "topUpQuoteId": "54f57b67-4fcf-47fb-85e6-85d4a8c96f25",\n "destinationAddressType": "arweave",\n "paymentAmount": 1000,\n "winstonCreditAmount": "1360424028269",\n "destinationAddress": "cF0H0SKdnaDTqWKY9iJKBktTpdEWgb3GnlndE7ABv0Q",\n "currencyType": "usd",\n "quoteExpirationDate": "2023-07-27T01:56:26.436Z",\n "paymentProvider": "stripe"\n },\n "paymentSession": {\n "id": "cs_live_a1p47UpvijHGe7sI8AI1kScZdd5qKzdyaHUWRaeuFVvVvDHXeuck68Pf51",\n "object": "checkout.session",\n "after_expiration": null,\n "allow_promotion_codes": null,\n "amount_subtotal": 1000,\n "amount_total": 1000,\n "automatic_tax": {\n "enabled": false,\n "status": null\n },\n "billing_address_collection": null,\n "cancel_url": "https://app.ardrive.io",\n "client_reference_id": null,\n "consent": null,\n "consent_collection": null,\n "created": 1690422686,\n "currency": "usd",\n "currency_conversion": null,\n "custom_fields": [],\n "custom_text": {\n "shipping_address": null,\n "submit": null\n },\n "customer": null,\n "customer_creation": "if_required",\n "customer_details": null,\n "customer_email": null,\n "expires_at": 1690509086,\n "invoice": null,\n "invoice_creation": {\n "enabled": false,\n "invoice_data": {\n "account_tax_ids": null,\n "custom_fields": null,\n "description": null,\n "footer": null,\n "metadata": {},\n "rendering_options": null\n }\n },\n "livemode": true,\n "locale": null,\n "metadata": {},\n "mode": "payment",\n "payment_intent": null,\n "payment_link": null,\n "payment_method_collection": "always",\n "payment_method_options": {},\n "payment_method_types": [\n "card"\n ],\n "payment_status": "unpaid",\n "phone_number_collection": {\n "enabled": false\n },\n "recovered_from": null,\n "setup_intent": null,\n "shipping_address_collection": null,\n "shipping_cost": null,\n "shipping_details": null,\n "shipping_options": [],\n "status": "open",\n "submit_type": null,\n "subscription": null,\n "success_url": "https://app.ardrive.io",\n "total_details": {\n "amount_discount": 0,\n "amount_shipping": 0,\n "amount_tax": 0\n },\n "url": "https://checkout.stripe.com/c/pay/cs_live_a1p47UpvijHGe7sI8AI1kScZdd5qKzdyaHUWRaeuFVvVvDHXeuck68Pf51#fidkdWxOYHwnPyd1blppbHNgWjA0T1BEcXJGPWR1VUpSbkFJSFR0S0M8dlV1Y2tgS1ZVa3JdPVxfPXw0Q0tBaTNzPDFtX0xyf2JDVlxpNzJnUkAxSmp2PUZJdHBwa1B2ck53TmZkQW1BSjNoNTU3XG88RGBObycpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl"\n }\n}\n')])])])]),n._v(" "),a("h3",{attrs:{id:"get-supported-currencies"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-supported-currencies"}},[n._v("#")]),n._v(" Get Supported Currencies")]),n._v(" "),a("p",[n._v("Returns a list of currency types supported by Turbo")]),n._v(" "),a("p",[a("code",[n._v("/currencies")])]),n._v(" "),a("h4",{attrs:{id:"parameters-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-5"}},[n._v("#")]),n._v(" Parameters")]),n._v(" "),a("p",[n._v("None")]),n._v(" "),a("h4",{attrs:{id:"example-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-4"}},[n._v("#")]),n._v(" Example")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v("https://payment.ardrive.io/v1/currencies\n")])])]),a("details",[a("summary",[a("b",[n._v("Response Body (JSON)")])]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v('{\n "supportedCurrencies": [\n "aud",\n "brl",\n "cad",\n "eur",\n "gbp",\n "hkd",\n "inr",\n "jpy",\n "sgd",\n "usd"\n ],\n "limits": {\n "aud": {\n "maximumPaymentAmount": 1500000,\n "minimumPaymentAmount": 1500,\n "suggestedPaymentAmounts": [\n 2500,\n 7500,\n 15000\n ],\n "zeroDecimalCurrency": false\n },\n "brl": {\n "maximumPaymentAmount": 5000000,\n "minimumPaymentAmount": 5000,\n "suggestedPaymentAmounts": [\n 12500,\n 25000,\n 50000\n ],\n "zeroDecimalCurrency": false\n },\n "cad": {\n "maximumPaymentAmount": 1300000,\n "minimumPaymentAmount": 1400,\n "suggestedPaymentAmounts": [\n 2500,\n 5000,\n 10000\n ],\n "zeroDecimalCurrency": false\n },\n "eur": {\n "maximumPaymentAmount": 1000000,\n "minimumPaymentAmount": 1000,\n "suggestedPaymentAmounts": [\n 2500,\n 5000,\n 10000\n ],\n "zeroDecimalCurrency": false\n },\n "gbp": {\n "maximumPaymentAmount": 770000,\n "minimumPaymentAmount": 780,\n "suggestedPaymentAmounts": [\n 2000,\n 4000,\n 8000\n ],\n "zeroDecimalCurrency": false\n },\n "hkd": {\n "maximumPaymentAmount": 7800000,\n "minimumPaymentAmount": 7900,\n "suggestedPaymentAmounts": [\n 20000,\n 40000,\n 80000\n ],\n "zeroDecimalCurrency": false\n },\n "inr": {\n "maximumPaymentAmount": 90000000,\n "minimumPaymentAmount": 83000,\n "suggestedPaymentAmounts": [\n 200000,\n 400000,\n 800000\n ],\n "zeroDecimalCurrency": false\n },\n "jpy": {\n "maximumPaymentAmount": 1500000,\n "minimumPaymentAmount": 1500,\n "suggestedPaymentAmounts": [\n 3500,\n 6500,\n 15000\n ],\n "zeroDecimalCurrency": true\n },\n "sgd": {\n "maximumPaymentAmount": 1300000,\n "minimumPaymentAmount": 1500,\n "suggestedPaymentAmounts": [\n 2500,\n 7500,\n 15000\n ],\n "zeroDecimalCurrency": false\n },\n "usd": {\n "maximumPaymentAmount": 1000000,\n "minimumPaymentAmount": 1000,\n "suggestedPaymentAmounts": [\n 2500,\n 5000,\n 10000\n ],\n "zeroDecimalCurrency": false\n }\n }\n}\n')])])])]),n._v(" "),a("h3",{attrs:{id:"get-supported-countries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-supported-countries"}},[n._v("#")]),n._v(" Get Supported Countries")]),n._v(" "),a("p",[n._v("Returns a list of countries where Turbo is available")]),n._v(" "),a("p",[a("code",[n._v("/countries")])]),n._v(" "),a("h4",{attrs:{id:"parameters-6"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-6"}},[n._v("#")]),n._v(" Parameters")]),n._v(" "),a("p",[n._v("None")]),n._v(" "),a("h4",{attrs:{id:"example-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-5"}},[n._v("#")]),n._v(" Example")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v("https://payment.ardrive.io/v1/countries\n")])])]),a("details",[a("summary",[a("b",[n._v("Response Body (JSON)")])]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v('[\n "United States",\n "United Kingdom",\n "Afghanistan",\n "Albania",\n "Algeria",\n "Andorra",\n "Angola",\n "Antigua and Barbuda",\n "Argentina",\n "Armenia",\n "Australia",\n "Austria",\n "Azerbaijan",\n "Bahamas",\n "Bahrain",\n "Bangladesh",\n "Barbados",\n "Belarus",\n "Belgium",\n "Belize",\n "Benin",\n "Bhutan",\n "Bolivia",\n "Bosnia and Herzegovina",\n "Botswana",\n "Brazil",\n "Brunei",\n "Bulgaria",\n "Burkina Faso",\n "Burundi",\n "Cabo Verde",\n "Cambodia",\n "Cameroon",\n "Canada",\n "Central African Republic",\n "Chad",\n "Chile",\n "China",\n "Colombia",\n "Comoros",\n "Congo",\n "Costa Rica",\n "Cote d\'Ivoire",\n "Croatia",\n "Cyprus",\n "Czech Republic",\n "Democratic Republic of the Congo",\n "Denmark",\n "Djibouti",\n "Dominica",\n "Dominican Republic",\n "East Timor",\n "Ecuador",\n "Egypt",\n "El Salvador",\n "Equatorial Guinea",\n "Eritrea",\n "Estonia",\n "Eswatini",\n "Ethiopia",\n "Fiji",\n "Finland",\n "France",\n "Gabon",\n "Gambia",\n "Georgia",\n "Germany",\n "Ghana",\n "Greece",\n "Grenada",\n "Guatemala",\n "Guinea",\n "Guinea-Bissau",\n "Guyana",\n "Haiti",\n "Honduras",\n "Hungary",\n "Iceland",\n "India",\n "Indonesia",\n "Iraq",\n "Ireland",\n "Israel",\n "Italy",\n "Jamaica",\n "Japan",\n "Jordan",\n "Kazakhstan",\n "Kenya",\n "Kiribati",\n "Kuwait",\n "Kyrgyzstan",\n "Laos",\n "Latvia",\n "Lebanon",\n "Lesotho",\n "Liberia",\n "Libya",\n "Liechtenstein",\n "Lithuania",\n "Luxembourg",\n "Madagascar",\n "Malawi",\n "Malaysia",\n "Maldives",\n "Mali",\n "Malta",\n "Marshall Islands",\n "Mauritania",\n "Mauritius",\n "Mexico",\n "Micronesia",\n "Moldova",\n "Monaco",\n "Mongolia",\n "Montenegro",\n "Morocco",\n "Mozambique",\n "Myanmar",\n "Namibia",\n "Nauru",\n "Nepal",\n "Netherlands",\n "New Zealand",\n "Nicaragua",\n "Niger",\n "Nigeria",\n "North Macedonia",\n "Norway",\n "Oman",\n "Pakistan",\n "Palau",\n "Palestine",\n "Panama",\n "Papua New Guinea",\n "Paraguay",\n "Peru",\n "Philippines",\n "Poland",\n "Portugal",\n "Qatar",\n "Romania",\n "Russia",\n "Rwanda",\n "Saint Kitts and Nevis",\n "Saint Lucia",\n "Saint Vincent and the Grenadines",\n "Samoa",\n "San Marino",\n "Sao Tome and Principe",\n "Saudi Arabia",\n "Senegal",\n "Serbia",\n "Seychelles",\n "Sierra Leone",\n "Singapore",\n "Slovakia",\n "Slovenia",\n "Solomon Islands",\n "Somalia",\n "South Africa",\n "South Korea",\n "South Sudan",\n "Spain",\n "Sri Lanka",\n "Sudan",\n "Suriname",\n "Sweden",\n "Switzerland",\n "Taiwan",\n "Tajikistan",\n "Tanzania",\n "Thailand",\n "Togo",\n "Tonga",\n "Trinidad and Tobago",\n "Tunisia",\n "Turkey",\n "Turkmenistan",\n "Tuvalu",\n "Uganda",\n "Ukraine",\n "United Arab Emirates",\n "Uruguay",\n "Uzbekistan",\n "Vanuatu",\n "Vatican City",\n "Venezuela",\n "Vietnam",\n "Yemen",\n "Zambia",\n "Zimbabwe"\n]\n')])])])]),n._v(" "),a("h3",{attrs:{id:"get-conversion-rates"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-conversion-rates"}},[n._v("#")]),n._v(" Get Conversion Rates")]),n._v(" "),a("p",[n._v("Returns supported fiat conversion rates for 1GB of storage based on current market prices")]),n._v(" "),a("p",[a("code",[n._v("/rates")])]),n._v(" "),a("h4",{attrs:{id:"parameters-7"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-7"}},[n._v("#")]),n._v(" Parameters")]),n._v(" "),a("p",[n._v("None")]),n._v(" "),a("h4",{attrs:{id:"example-6"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-6"}},[n._v("#")]),n._v(" Example")]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v("https://payment.ardrive.io/v1/rates\n")])])]),a("details",[a("summary",[a("b",[n._v("Response Body (JSON)")])]),n._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[n._v('{\n "winc": "343168912867",\n "fiat": {\n "aud": 3.52873729722864,\n "brl": 11.34598786477272,\n "cad": 3.15729126594135,\n "eur": 2.1569195680425,\n "gbp": 1.8487882011791101,\n "hkd": 18.66938404981161,\n "inr": 196.24591287088242,\n "jpy": 334.744630809484,\n "sgd": 3.16995419882613,\n "usd": 2.39329431522465\n },\n "adjustments": [\n {\n "name": "FWD Research July 2023 Subsidy",\n "description": "A 60% discount for uploads over 500KiB",\n "operator": "multiply",\n "value": 0.6,\n "adjustmentAmount": "-514753369299"\n }\n ]\n}\n')])])])]),n._v(" "),a("p",[n._v("* required")])])}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/37.64de29f9.js b/assets/js/37.14c80239.js similarity index 98% rename from assets/js/37.64de29f9.js rename to assets/js/37.14c80239.js index 99db24c..935cde7 100644 --- a/assets/js/37.64de29f9.js +++ b/assets/js/37.14c80239.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[37],{316:function(e,t,a){"use strict";a.r(t);var n=a(10),s=Object(n.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"upload-api"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#upload-api"}},[e._v("#")]),e._v(" Upload API")]),e._v(" "),t("h2",{attrs:{id:"overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[e._v("#")]),e._v(" Overview")]),e._v(" "),t("p",[e._v("The Turbo Upload Service supports payment for signed data-items to upload.ardrive.io using Turbo Credits. An API endpoint has been created to facilitate the payments. A signed data-item can be posted to upload.ardrive.io using the below schema.")]),e._v(" "),t("p",[t("strong",[e._v("Note")]),e._v(": This service is still evolving and the information provided below may be out of date. You can view the most up to date information about the available endpoints "),t("a",{attrs:{href:"https://upload.ardrive.io/api-docs",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v(", or view the raw json for that documentation "),t("a",{attrs:{href:"https://upload.ardrive.io/openapi.json",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"endpoint"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#endpoint"}},[e._v("#")]),e._v(" Endpoint")]),e._v(" "),t("p",[t("code",[e._v("https://upload.ardrive.io/v1/tx")])]),e._v(" "),t("h2",{attrs:{id:"schema"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#schema"}},[e._v("#")]),e._v(" Schema")]),e._v(" "),t("h3",{attrs:{id:"headers"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#headers"}},[e._v("#")]),e._v(" Headers")]),e._v(" "),t("p",[t("code",[e._v("content-type")]),e._v('*: "application/octet-stream"')]),e._v(" "),t("p",[t("code",[e._v("accept")]),e._v('*: string - media type, such as "application/json"')]),e._v(" "),t("h3",{attrs:{id:"body"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#body"}},[e._v("#")]),e._v(" Body")]),e._v(" "),t("p",[e._v("The body of your request should contain a signed data-item.")]),e._v(" "),t("p",[e._v("Data-items can be created and signed with the arbundles library, following the below example.")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v('// Initiates the arbundles Arweave signer with your wallet\nconst signer = new ArweaveSigner(jwk);\n\n// Sets the data you would like to use to create a data-item\nconst data = "Any value can Go here";\n\n// Creates a data-item using your data and the Arweave Signer\nconst dataItem = createData(data, signer);\n\n// Signs the data-item\nawait dataItem.sign(signer);\n\n')])])]),t("p",[e._v("In this example, the variable "),t("code",[e._v("dataItem")]),e._v(" is what should be sent in your api post request in order to finalize and pay for the upload using Turbo Credits. "),t("code",[e._v("dataItem.sign()")]),e._v(" is a mutating method, so there is no need to create a separate variable to hold the results of signing the data-item.")]),e._v(" "),t("h3",{attrs:{id:"response"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#response"}},[e._v("#")]),e._v(" Response")]),e._v(" "),t("details",[t("summary",[e._v("Headers")]),e._v("\n```\n access-control-allow-methods: PUT,GET,HEAD,POST,DELETE,OPTIONS \n access-control-allow-origin: https://upload.ardrive.io \n content-length: 173 \n content-security-policy: frame-ancestors 'none'; default-src 'self'; img-src data: https:; script-src 'self' 'unsafe-inline' https:; style-src 'unsafe-inline' https:; object-src 'none'; font-src 'self' https:; \n content-type: application/json; charset=utf-8 \n date: Thu,27 Jul 2023 22:06:33 GMT \n strict-transport-security: max-age=3600; includeSubDomains; preload \n vary: Origin \n via: 1.1 d0d53eedec01ac540f737b5fafb16436.cloudfront.net (CloudFront) \n x-amz-cf-id: eypqkKDp-ADDMHmBOp3UQzDK4gZ8iYE8fbmYAyZjfyR3Cj8gevgF6g== \n x-amz-cf-pop: IAD12-P3 \n x-cache: Miss from cloudfront \n x-content-type-options: nosniff \n x-frame-options: SAMEORIGIN \n x-xss-protection: 1; mode=block \n```\n")]),e._v(" "),t("details",[t("summary",[e._v("Body")]),e._v('\n```\n{\n "id": "1wk8nyVTHTHpbmEZ-IGNsGcro4og8XXVbBhHvMFxUgQ",\n "owner": "cF0H0SKdnaDTqWKY9iJKBktTpdEWgb3GnlndE7ABv0Q",\n "dataCaches": [\n "arweave.net"\n ],\n "fastFinalityIndexes": [\n "arweave.net"\n ]\n}\n```\n')]),e._v(" "),t("p",[e._v("* required")])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[37],{317:function(e,t,a){"use strict";a.r(t);var n=a(10),s=Object(n.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"upload-api"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#upload-api"}},[e._v("#")]),e._v(" Upload API")]),e._v(" "),t("h2",{attrs:{id:"overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview"}},[e._v("#")]),e._v(" Overview")]),e._v(" "),t("p",[e._v("The Turbo Upload Service supports payment for signed data-items to upload.ardrive.io using Turbo Credits. An API endpoint has been created to facilitate the payments. A signed data-item can be posted to upload.ardrive.io using the below schema.")]),e._v(" "),t("p",[t("strong",[e._v("Note")]),e._v(": This service is still evolving and the information provided below may be out of date. You can view the most up to date information about the available endpoints "),t("a",{attrs:{href:"https://upload.ardrive.io/api-docs",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v(", or view the raw json for that documentation "),t("a",{attrs:{href:"https://upload.ardrive.io/openapi.json",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"endpoint"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#endpoint"}},[e._v("#")]),e._v(" Endpoint")]),e._v(" "),t("p",[t("code",[e._v("https://upload.ardrive.io/v1/tx")])]),e._v(" "),t("h2",{attrs:{id:"schema"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#schema"}},[e._v("#")]),e._v(" Schema")]),e._v(" "),t("h3",{attrs:{id:"headers"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#headers"}},[e._v("#")]),e._v(" Headers")]),e._v(" "),t("p",[t("code",[e._v("content-type")]),e._v('*: "application/octet-stream"')]),e._v(" "),t("p",[t("code",[e._v("accept")]),e._v('*: string - media type, such as "application/json"')]),e._v(" "),t("h3",{attrs:{id:"body"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#body"}},[e._v("#")]),e._v(" Body")]),e._v(" "),t("p",[e._v("The body of your request should contain a signed data-item.")]),e._v(" "),t("p",[e._v("Data-items can be created and signed with the arbundles library, following the below example.")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v('// Initiates the arbundles Arweave signer with your wallet\nconst signer = new ArweaveSigner(jwk);\n\n// Sets the data you would like to use to create a data-item\nconst data = "Any value can Go here";\n\n// Creates a data-item using your data and the Arweave Signer\nconst dataItem = createData(data, signer);\n\n// Signs the data-item\nawait dataItem.sign(signer);\n\n')])])]),t("p",[e._v("In this example, the variable "),t("code",[e._v("dataItem")]),e._v(" is what should be sent in your api post request in order to finalize and pay for the upload using Turbo Credits. "),t("code",[e._v("dataItem.sign()")]),e._v(" is a mutating method, so there is no need to create a separate variable to hold the results of signing the data-item.")]),e._v(" "),t("h3",{attrs:{id:"response"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#response"}},[e._v("#")]),e._v(" Response")]),e._v(" "),t("details",[t("summary",[e._v("Headers")]),e._v("\n```\n access-control-allow-methods: PUT,GET,HEAD,POST,DELETE,OPTIONS \n access-control-allow-origin: https://upload.ardrive.io \n content-length: 173 \n content-security-policy: frame-ancestors 'none'; default-src 'self'; img-src data: https:; script-src 'self' 'unsafe-inline' https:; style-src 'unsafe-inline' https:; object-src 'none'; font-src 'self' https:; \n content-type: application/json; charset=utf-8 \n date: Thu,27 Jul 2023 22:06:33 GMT \n strict-transport-security: max-age=3600; includeSubDomains; preload \n vary: Origin \n via: 1.1 d0d53eedec01ac540f737b5fafb16436.cloudfront.net (CloudFront) \n x-amz-cf-id: eypqkKDp-ADDMHmBOp3UQzDK4gZ8iYE8fbmYAyZjfyR3Cj8gevgF6g== \n x-amz-cf-pop: IAD12-P3 \n x-cache: Miss from cloudfront \n x-content-type-options: nosniff \n x-frame-options: SAMEORIGIN \n x-xss-protection: 1; mode=block \n```\n")]),e._v(" "),t("details",[t("summary",[e._v("Body")]),e._v('\n```\n{\n "id": "1wk8nyVTHTHpbmEZ-IGNsGcro4og8XXVbBhHvMFxUgQ",\n "owner": "cF0H0SKdnaDTqWKY9iJKBktTpdEWgb3GnlndE7ABv0Q",\n "dataCaches": [\n "arweave.net"\n ],\n "fastFinalityIndexes": [\n "arweave.net"\n ]\n}\n```\n')]),e._v(" "),t("p",[e._v("* required")])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/38.bb787046.js b/assets/js/38.3c2b17dc.js similarity index 99% rename from assets/js/38.bb787046.js rename to assets/js/38.3c2b17dc.js index 4510328..95ae973 100644 --- a/assets/js/38.bb787046.js +++ b/assets/js/38.3c2b17dc.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[38],{317:function(t,s,a){"use strict";a.r(s);var n=a(10),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"ardriveapp-turbo-sdk-🚀"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ardriveapp-turbo-sdk-🚀"}},[t._v("#")]),t._v(" @ardriveapp/turbo-sdk 🚀")]),t._v(" "),s("p",[t._v("Welcome to the "),s("code",[t._v("@ardrive/turbo-sdk")]),t._v("! This SDK provides functionality for interacting with the Turbo Upload and Payment Services and is available for both NodeJS and Web environments.")]),t._v(" "),s("h2",{attrs:{id:"installation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[t._v("#")]),t._v(" Installation")]),t._v(" "),s("div",{staticClass:"language-shell extra-class"},[s("pre",{pre:!0,attrs:{class:"language-shell"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" @ardrive/turbo-sdk\n")])])]),s("p",[t._v("or")]),t._v(" "),s("div",{staticClass:"language-shell extra-class"},[s("pre",{pre:!0,attrs:{class:"language-shell"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("yarn")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("add")]),t._v(" @ardrive/turbo-sdk\n")])])]),s("h2",{attrs:{id:"quick-start"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[t._v("#")]),t._v(" Quick Start")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" TurboFactory "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@ardrive/turbo-sdk'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// load your JWK from a file or generate a new one")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" jwk "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("readFileSync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'./my-jwk.json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" address "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" arweave"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("wallets"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("jwkToAddress")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("jwk"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" turbo "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" TurboFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("authenticated")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" privateKey"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" jwk "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// get the wallet balance")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" balance "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getBalance")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// prep file for upload")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" filePath "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" path"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("join")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("__dirname"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'./my-image.png'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" fileSize "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("statSync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("filePath"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("size"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// get the cost of uploading the file")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" fileSizeCost "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getUploadCosts")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n bytes"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("fileSize"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// check if balance greater than upload cost")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("balance "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v(" fileSizeCost"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" url "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createCheckoutSession")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n amount"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" fileSizeCost"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n owner"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" address"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// add a promo code if you have one")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// open the URL to top-up, continue when done")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("open")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("url"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// upload the file")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" id"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" owner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dataCaches"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" fastFinalityIndexes "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("uploadFile")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n fileStreamFactory "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" fs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createReadStream")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("filePath"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n fileSizeFactory "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" fileSize"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// upload complete!")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("console")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Successfully upload data item!'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" id"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" owner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dataCaches"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" fastFinalityIndexes "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// upload failed")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("console")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("error")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Failed to upload data item!'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("finally")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" newBalance "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getBalance")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("console")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'New balance:'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" newBalance"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"usage"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),s("p",[t._v("The SDK is provided in both CommonJS and ESM formats, and it's compatible with bundlers such as Webpack, Rollup, and ESbuild. Utilize the appropriate named exports provided by this SDK's "),s("a",{attrs:{href:"https://github.com/ardriveapp/turbo-sdk/blob/main/package.json",target:"_blank",rel:"noopener noreferrer"}},[t._v("package.json"),s("OutboundLink")],1),t._v(" based on your project's configuration. Refer to the "),s("a",{attrs:{href:"https://github.com/ardriveapp/turbo-sdk/tree/main/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("examples"),s("OutboundLink")],1),t._v(" directory to see how to use the SDK in various environments.")]),t._v(" "),s("h3",{attrs:{id:"web"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#web"}},[t._v("#")]),t._v(" Web")]),t._v(" "),s("h4",{attrs:{id:"bundlers-webpack-rollup-esbuild-etc"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#bundlers-webpack-rollup-esbuild-etc"}},[t._v("#")]),t._v(" Bundlers (Webpack, Rollup, ESbuild, etc.)")]),t._v(" "),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" TurboFactory "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@ardrive/turbo-sdk'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" turbo "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" TurboFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("unauthenticated")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rates "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getFiatRates")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h4",{attrs:{id:"browser"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#browser"}},[t._v("#")]),t._v(" Browser")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("type")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("module"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}},[s("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" TurboFactory "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://unpkg.com/@ardrive/turbo-sdk'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" turbo "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" TurboFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("unauthenticated")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rates "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getFiatRates")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("h3",{attrs:{id:"nodejs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nodejs"}},[t._v("#")]),t._v(" NodeJS")]),t._v(" "),s("h4",{attrs:{id:"commonjs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#commonjs"}},[t._v("#")]),t._v(" CommonJS")]),t._v(" "),s("p",[t._v("Project's "),s("code",[t._v("package.json")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"commonjs"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// or absent")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Project's "),s("code",[t._v("tsconfig.json")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"compilerOptions"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"module"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"CommonJS"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"moduleResolution"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Node"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"skipLibCheck"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Usage:")]),t._v(" "),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" TurboFactory "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("require")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@ardrive/turbo-sdk'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" turbo "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" TurboFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("unauthenticated")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rates "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getFiatRates")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h4",{attrs:{id:"esm"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#esm"}},[t._v("#")]),t._v(" ESM")]),t._v(" "),s("p",[t._v("Project's "),s("code",[t._v("package.json")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"module"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Project's "),s("code",[t._v("tsconfig.json")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"compilerOptions"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"module"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NodeNext"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"moduleResolution"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NodeNext"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"skipLibCheck"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Usage:")]),t._v(" "),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" TurboFactory "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@ardrive/turbo-sdk/node'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" turbo "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" TurboFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("unauthenticated")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rates "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getFiatRates")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"typescript"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#typescript"}},[t._v("#")]),t._v(" Typescript")]),t._v(" "),s("p",[t._v("The SDK provides TypeScript types. When you import the SDK in a TypeScript project:")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" TurboFactory "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@ardrive/turbo-sdk/web'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// or '@ardrive/turbo-sdk/node' for Node.js projects")]),t._v("\n")])])]),s("p",[t._v("Types are exported from "),s("code",[t._v("./lib/types/[node/web]/index.d.ts")]),t._v(" and should be automatically recognized, offering benefits such as type-checking and autocompletion.")]),t._v(" "),s("h2",{attrs:{id:"apis"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#apis"}},[t._v("#")]),t._v(" APIs")]),t._v(" "),s("h3",{attrs:{id:"turbofactory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#turbofactory"}},[t._v("#")]),t._v(" TurboFactory")]),t._v(" "),s("ul",[s("li",[s("p",[s("code",[t._v("unauthenticated()")]),t._v(" - Creates an instance of a client that accesses Turbo's unauthenticated services.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" turbo "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" TurboFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("unauthenticated")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("authenticated()")]),t._v(" - Creates an instance of a client that accesses Turbo's authenticated and unauthenticated services.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" jwk "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" arweave"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("crypto"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("generateJWK")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" turbo "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" TurboFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("authenticated")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" privateKey"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" jwk "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])])]),t._v(" "),s("h3",{attrs:{id:"turbounauthenticatedclient"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#turbounauthenticatedclient"}},[t._v("#")]),t._v(" TurboUnauthenticatedClient")]),t._v(" "),s("ul",[s("li",[s("p",[s("code",[t._v("getSupportedCurrencies()")]),t._v(" - Returns the list of currencies supported by the Turbo Payment Service for topping up a user balance of AR Credits (measured in Winston Credits, or winc).")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" currencies "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getSupportedCurrencies")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("getSupportedCountries()")]),t._v(" - Returns the list of countries supported by the Turbo Payment Service's top up workflow.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" countries "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getSupportedCountries")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("getFiatToAR({ currency })")]),t._v(" - Returns the current raw fiat to AR conversion rate for a specific currency as reported by third-party pricing oracles.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" fiatToAR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getFiatToAR")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" currency"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USD'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("getFiatRates()")]),t._v(" - Returns the current fiat rates for 1 GiB of data for supported currencies, including all top-up adjustments and fees.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rates "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getFiatRates")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("getWincForFiat({ amount })")]),t._v(" - Returns the current amount of Winston Credits including all adjustments for the provided fiat currency, amount. To leverage promo codes, see "),s("a",{attrs:{href:"#turboauthenticatedclient"}},[t._v("TurboAuthenticatedClient")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" paymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" quotedPaymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" adjustments "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getWincForFiat")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n amount"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("USD")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// promo codes require an authenticated client")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("getUploadCosts({ bytes })")]),t._v(" - Returns the estimated cost in Winston Credits for the provided file sizes, including all upload adjustments and fees.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("uploadCostForFile"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getUploadCosts")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" bytes"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1024")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" adjustments "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" uploadCostForFile"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("uploadSignedDataItem({ dataItemStreamFactory, dataItemSizeFactory, signal })")]),t._v(" - Uploads a signed data item. The provided "),s("code",[t._v("dataItemStreamFactory")]),t._v(" should produce a NEW signed data item stream each time is it invoked. The "),s("code",[t._v("dataItemSizeFactory")]),t._v(" is a function that returns the size of the file. The "),s("code",[t._v("signal")]),t._v(" is an optional "),s("a",{attrs:{href:"https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal",target:"_blank",rel:"noopener noreferrer"}},[t._v("AbortSignal"),s("OutboundLink")],1),t._v(" that can be used to cancel the upload or timeout the request.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" filePath "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" path"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("join")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("__dirname"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'./my-signed-data-item'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dataItemSize "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("statSync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("filePath"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("size"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" uploadResponse "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("uploadSignedDataItem")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("dataItemStreamFactory")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" fs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createReadStream")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("filePath"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("dataItemSizeFactory")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" dataItemSize"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n signal"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" AbortSignal"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("timeout")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10_000")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// cancel the upload after 10 seconds")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("createCheckoutSession({ amount, owner })")]),t._v(" - Creates a Stripe checkout session for a Turbo Top Up with the provided amount, currency, owner. The returned URL can be opened in the browser, all payments are processed by Stripe. To leverage promo codes, see "),s("a",{attrs:{href:"#turboauthenticatedclient"}},[t._v("TurboAuthenticatedClient")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" url"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" paymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" quotedPaymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" adjustments "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createCheckoutSession")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n amount"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("USD")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10.0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// $10.00 USD")]),t._v("\n owner"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" publicArweaveAddress"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// promo codes require an authenticated client")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Open checkout session in a browser")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("platform "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'darwin'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// macOS")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("exec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("open ")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("url"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("platform "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'win32'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Windows")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("exec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('start "" "')]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("url"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"')]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" shell"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Linux/Unix")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("open")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("url"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])]),t._v(" "),s("h3",{attrs:{id:"turboauthenticatedclient"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#turboauthenticatedclient"}},[t._v("#")]),t._v(" TurboAuthenticatedClient")]),t._v(" "),s("ul",[s("li",[s("p",[s("code",[t._v("getBalance()")]),t._v(" - Issues a signed request to get the credit balance of a wallet measured in AR (measured in Winston Credits, or winc).")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" balance "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getBalance")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("getWincForFiat({ amount, promoCodes })")]),t._v(" - Returns the current amount of Winston Credits including all adjustments for the provided fiat currency, amount, and optional promo codes.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" paymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" quotedPaymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" adjustments "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getWincForFiat")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n amount"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("USD")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n promoCodes"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'MY_PROMO_CODE'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// promo codes require an authenticated client")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("createCheckoutSession({ amount, owner, promoCodes })")]),t._v(" - Creates a Stripe checkout session for a Turbo Top Up with the provided amount, currency, owner, and optional promo codes. The returned URL can be opened in the browser, all payments are processed by Stripe. Promo codes require an authenticated client.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" url"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" paymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" quotedPaymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" adjustments "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createCheckoutSession")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n amount"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("USD")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10.0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// $10.00 USD")]),t._v("\n owner"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" publicArweaveAddress"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n promoCodes"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'MY_PROMO_CODE'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// promo codes require an authenticated client")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Open checkout session in a browser")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("platform "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'darwin'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// macOS")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("exec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("open ")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("url"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("platform "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'win32'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Windows")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("exec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('start "" "')]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("url"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"')]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" shell"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Linux/Unix")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("open")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("url"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("uploadFile({ fileStreamFactory, fileSizeFactory, signal })")]),t._v(" - Signs and uploads a raw file. The provided "),s("code",[t._v("fileStreamFactory")]),t._v(" should produce a NEW file data stream each time is it invoked. The "),s("code",[t._v("fileSizeFactory")]),t._v(" is a function that returns the size of the file. The "),s("code",[t._v("signal")]),t._v(" is an optional "),s("a",{attrs:{href:"https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal",target:"_blank",rel:"noopener noreferrer"}},[t._v("AbortSignal"),s("OutboundLink")],1),t._v(" that can be used to cancel the upload or timeout the request.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" filePath "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" path"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("join")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("__dirname"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'./my-unsigned-file.txt'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" fileSize "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stateSync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("filePath"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("size"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" uploadResult "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("uploadFile")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("fileStreamFactory")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" fs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createReadStream")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("filePath"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("fileSizeFactory")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" fileSize"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// no timeout or AbortSignal provided")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])])]),t._v(" "),s("h2",{attrs:{id:"contributions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#contributions"}},[t._v("#")]),t._v(" Contributions")]),t._v(" "),s("p",[t._v("If you encounter any issues or have feature requests, please file an issue on our GitHub repository. Contributions, pull requests, and feedback are both welcome and encouraged.")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[38],{318:function(t,s,a){"use strict";a.r(s);var n=a(10),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"ardriveapp-turbo-sdk-🚀"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ardriveapp-turbo-sdk-🚀"}},[t._v("#")]),t._v(" @ardriveapp/turbo-sdk 🚀")]),t._v(" "),s("p",[t._v("Welcome to the "),s("code",[t._v("@ardrive/turbo-sdk")]),t._v("! This SDK provides functionality for interacting with the Turbo Upload and Payment Services and is available for both NodeJS and Web environments.")]),t._v(" "),s("h2",{attrs:{id:"installation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[t._v("#")]),t._v(" Installation")]),t._v(" "),s("div",{staticClass:"language-shell extra-class"},[s("pre",{pre:!0,attrs:{class:"language-shell"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" @ardrive/turbo-sdk\n")])])]),s("p",[t._v("or")]),t._v(" "),s("div",{staticClass:"language-shell extra-class"},[s("pre",{pre:!0,attrs:{class:"language-shell"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("yarn")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("add")]),t._v(" @ardrive/turbo-sdk\n")])])]),s("h2",{attrs:{id:"quick-start"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[t._v("#")]),t._v(" Quick Start")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" TurboFactory "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@ardrive/turbo-sdk'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// load your JWK from a file or generate a new one")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" jwk "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("readFileSync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'./my-jwk.json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" address "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" arweave"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("wallets"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("jwkToAddress")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("jwk"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" turbo "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" TurboFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("authenticated")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" privateKey"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" jwk "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// get the wallet balance")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" balance "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getBalance")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// prep file for upload")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" filePath "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" path"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("join")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("__dirname"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'./my-image.png'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" fileSize "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("statSync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("filePath"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("size"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// get the cost of uploading the file")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" fileSizeCost "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getUploadCosts")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n bytes"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("fileSize"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// check if balance greater than upload cost")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("balance "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v(" fileSizeCost"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" url "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createCheckoutSession")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n amount"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" fileSizeCost"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n owner"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" address"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// add a promo code if you have one")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// open the URL to top-up, continue when done")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("open")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("url"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// upload the file")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" id"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" owner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dataCaches"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" fastFinalityIndexes "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("uploadFile")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n fileStreamFactory "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" fs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createReadStream")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("filePath"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n fileSizeFactory "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" fileSize"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// upload complete!")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("console")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Successfully upload data item!'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" id"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" owner"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dataCaches"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" fastFinalityIndexes "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// upload failed")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("console")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("error")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Failed to upload data item!'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" error"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("finally")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" newBalance "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getBalance")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("console")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'New balance:'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" newBalance"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"usage"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),s("p",[t._v("The SDK is provided in both CommonJS and ESM formats, and it's compatible with bundlers such as Webpack, Rollup, and ESbuild. Utilize the appropriate named exports provided by this SDK's "),s("a",{attrs:{href:"https://github.com/ardriveapp/turbo-sdk/blob/main/package.json",target:"_blank",rel:"noopener noreferrer"}},[t._v("package.json"),s("OutboundLink")],1),t._v(" based on your project's configuration. Refer to the "),s("a",{attrs:{href:"https://github.com/ardriveapp/turbo-sdk/tree/main/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("examples"),s("OutboundLink")],1),t._v(" directory to see how to use the SDK in various environments.")]),t._v(" "),s("h3",{attrs:{id:"web"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#web"}},[t._v("#")]),t._v(" Web")]),t._v(" "),s("h4",{attrs:{id:"bundlers-webpack-rollup-esbuild-etc"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#bundlers-webpack-rollup-esbuild-etc"}},[t._v("#")]),t._v(" Bundlers (Webpack, Rollup, ESbuild, etc.)")]),t._v(" "),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" TurboFactory "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@ardrive/turbo-sdk'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" turbo "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" TurboFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("unauthenticated")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rates "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getFiatRates")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h4",{attrs:{id:"browser"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#browser"}},[t._v("#")]),t._v(" Browser")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("type")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("module"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}},[s("span",{pre:!0,attrs:{class:"token language-javascript"}},[t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" TurboFactory "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://unpkg.com/@ardrive/turbo-sdk'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" turbo "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" TurboFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("unauthenticated")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rates "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getFiatRates")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("h3",{attrs:{id:"nodejs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nodejs"}},[t._v("#")]),t._v(" NodeJS")]),t._v(" "),s("h4",{attrs:{id:"commonjs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#commonjs"}},[t._v("#")]),t._v(" CommonJS")]),t._v(" "),s("p",[t._v("Project's "),s("code",[t._v("package.json")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"commonjs"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// or absent")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Project's "),s("code",[t._v("tsconfig.json")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"compilerOptions"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"module"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"CommonJS"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"moduleResolution"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Node"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"skipLibCheck"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Usage:")]),t._v(" "),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" TurboFactory "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("require")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@ardrive/turbo-sdk'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" turbo "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" TurboFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("unauthenticated")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rates "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getFiatRates")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h4",{attrs:{id:"esm"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#esm"}},[t._v("#")]),t._v(" ESM")]),t._v(" "),s("p",[t._v("Project's "),s("code",[t._v("package.json")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"module"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Project's "),s("code",[t._v("tsconfig.json")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"compilerOptions"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"module"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NodeNext"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"moduleResolution"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NodeNext"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"skipLibCheck"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Usage:")]),t._v(" "),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" TurboFactory "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@ardrive/turbo-sdk/node'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" turbo "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" TurboFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("unauthenticated")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rates "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getFiatRates")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"typescript"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#typescript"}},[t._v("#")]),t._v(" Typescript")]),t._v(" "),s("p",[t._v("The SDK provides TypeScript types. When you import the SDK in a TypeScript project:")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" TurboFactory "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@ardrive/turbo-sdk/web'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// or '@ardrive/turbo-sdk/node' for Node.js projects")]),t._v("\n")])])]),s("p",[t._v("Types are exported from "),s("code",[t._v("./lib/types/[node/web]/index.d.ts")]),t._v(" and should be automatically recognized, offering benefits such as type-checking and autocompletion.")]),t._v(" "),s("h2",{attrs:{id:"apis"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#apis"}},[t._v("#")]),t._v(" APIs")]),t._v(" "),s("h3",{attrs:{id:"turbofactory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#turbofactory"}},[t._v("#")]),t._v(" TurboFactory")]),t._v(" "),s("ul",[s("li",[s("p",[s("code",[t._v("unauthenticated()")]),t._v(" - Creates an instance of a client that accesses Turbo's unauthenticated services.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" turbo "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" TurboFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("unauthenticated")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("authenticated()")]),t._v(" - Creates an instance of a client that accesses Turbo's authenticated and unauthenticated services.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" jwk "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" arweave"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("crypto"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("generateJWK")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" turbo "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" TurboFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("authenticated")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" privateKey"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" jwk "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])])]),t._v(" "),s("h3",{attrs:{id:"turbounauthenticatedclient"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#turbounauthenticatedclient"}},[t._v("#")]),t._v(" TurboUnauthenticatedClient")]),t._v(" "),s("ul",[s("li",[s("p",[s("code",[t._v("getSupportedCurrencies()")]),t._v(" - Returns the list of currencies supported by the Turbo Payment Service for topping up a user balance of AR Credits (measured in Winston Credits, or winc).")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" currencies "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getSupportedCurrencies")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("getSupportedCountries()")]),t._v(" - Returns the list of countries supported by the Turbo Payment Service's top up workflow.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" countries "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getSupportedCountries")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("getFiatToAR({ currency })")]),t._v(" - Returns the current raw fiat to AR conversion rate for a specific currency as reported by third-party pricing oracles.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" fiatToAR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getFiatToAR")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" currency"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USD'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("getFiatRates()")]),t._v(" - Returns the current fiat rates for 1 GiB of data for supported currencies, including all top-up adjustments and fees.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rates "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getFiatRates")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("getWincForFiat({ amount })")]),t._v(" - Returns the current amount of Winston Credits including all adjustments for the provided fiat currency, amount. To leverage promo codes, see "),s("a",{attrs:{href:"#turboauthenticatedclient"}},[t._v("TurboAuthenticatedClient")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" paymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" quotedPaymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" adjustments "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getWincForFiat")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n amount"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("USD")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// promo codes require an authenticated client")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("getUploadCosts({ bytes })")]),t._v(" - Returns the estimated cost in Winston Credits for the provided file sizes, including all upload adjustments and fees.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("uploadCostForFile"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getUploadCosts")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" bytes"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1024")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" adjustments "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" uploadCostForFile"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("uploadSignedDataItem({ dataItemStreamFactory, dataItemSizeFactory, signal })")]),t._v(" - Uploads a signed data item. The provided "),s("code",[t._v("dataItemStreamFactory")]),t._v(" should produce a NEW signed data item stream each time is it invoked. The "),s("code",[t._v("dataItemSizeFactory")]),t._v(" is a function that returns the size of the file. The "),s("code",[t._v("signal")]),t._v(" is an optional "),s("a",{attrs:{href:"https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal",target:"_blank",rel:"noopener noreferrer"}},[t._v("AbortSignal"),s("OutboundLink")],1),t._v(" that can be used to cancel the upload or timeout the request.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" filePath "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" path"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("join")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("__dirname"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'./my-signed-data-item'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dataItemSize "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("statSync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("filePath"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("size"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" uploadResponse "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("uploadSignedDataItem")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("dataItemStreamFactory")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" fs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createReadStream")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("filePath"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("dataItemSizeFactory")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" dataItemSize"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n signal"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" AbortSignal"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("timeout")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10_000")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// cancel the upload after 10 seconds")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("createCheckoutSession({ amount, owner })")]),t._v(" - Creates a Stripe checkout session for a Turbo Top Up with the provided amount, currency, owner. The returned URL can be opened in the browser, all payments are processed by Stripe. To leverage promo codes, see "),s("a",{attrs:{href:"#turboauthenticatedclient"}},[t._v("TurboAuthenticatedClient")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" url"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" paymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" quotedPaymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" adjustments "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createCheckoutSession")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n amount"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("USD")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10.0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// $10.00 USD")]),t._v("\n owner"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" publicArweaveAddress"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// promo codes require an authenticated client")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Open checkout session in a browser")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("platform "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'darwin'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// macOS")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("exec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("open ")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("url"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("platform "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'win32'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Windows")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("exec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('start "" "')]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("url"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"')]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" shell"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Linux/Unix")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("open")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("url"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])]),t._v(" "),s("h3",{attrs:{id:"turboauthenticatedclient"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#turboauthenticatedclient"}},[t._v("#")]),t._v(" TurboAuthenticatedClient")]),t._v(" "),s("ul",[s("li",[s("p",[s("code",[t._v("getBalance()")]),t._v(" - Issues a signed request to get the credit balance of a wallet measured in AR (measured in Winston Credits, or winc).")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" balance "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getBalance")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("getWincForFiat({ amount, promoCodes })")]),t._v(" - Returns the current amount of Winston Credits including all adjustments for the provided fiat currency, amount, and optional promo codes.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" paymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" quotedPaymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" adjustments "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getWincForFiat")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n amount"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("USD")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n promoCodes"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'MY_PROMO_CODE'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// promo codes require an authenticated client")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("createCheckoutSession({ amount, owner, promoCodes })")]),t._v(" - Creates a Stripe checkout session for a Turbo Top Up with the provided amount, currency, owner, and optional promo codes. The returned URL can be opened in the browser, all payments are processed by Stripe. Promo codes require an authenticated client.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" url"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" winc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" paymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" quotedPaymentAmount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" adjustments "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createCheckoutSession")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n amount"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("USD")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10.0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// $10.00 USD")]),t._v("\n owner"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" publicArweaveAddress"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n promoCodes"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'MY_PROMO_CODE'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// promo codes require an authenticated client")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Open checkout session in a browser")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("platform "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'darwin'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// macOS")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("exec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("open ")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("url"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("platform "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'win32'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Windows")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("exec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('start "" "')]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("url"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"')]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" shell"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Linux/Unix")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("open")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("url"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("uploadFile({ fileStreamFactory, fileSizeFactory, signal })")]),t._v(" - Signs and uploads a raw file. The provided "),s("code",[t._v("fileStreamFactory")]),t._v(" should produce a NEW file data stream each time is it invoked. The "),s("code",[t._v("fileSizeFactory")]),t._v(" is a function that returns the size of the file. The "),s("code",[t._v("signal")]),t._v(" is an optional "),s("a",{attrs:{href:"https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal",target:"_blank",rel:"noopener noreferrer"}},[t._v("AbortSignal"),s("OutboundLink")],1),t._v(" that can be used to cancel the upload or timeout the request.")]),t._v(" "),s("div",{staticClass:"language-typescript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-typescript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" filePath "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" path"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("join")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("__dirname"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'./my-unsigned-file.txt'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" fileSize "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stateSync")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("filePath"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("size"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" uploadResult "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" turbo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("uploadFile")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("fileStreamFactory")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" fs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createReadStream")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("filePath"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("fileSizeFactory")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" fileSize"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// no timeout or AbortSignal provided")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])])]),t._v(" "),s("h2",{attrs:{id:"contributions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#contributions"}},[t._v("#")]),t._v(" Contributions")]),t._v(" "),s("p",[t._v("If you encounter any issues or have feature requests, please file an issue on our GitHub repository. Contributions, pull requests, and feedback are both welcome and encouraged.")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/39.73a32351.js b/assets/js/39.5b586896.js similarity index 93% rename from assets/js/39.73a32351.js rename to assets/js/39.5b586896.js index 7c437b7..3d02e49 100644 --- a/assets/js/39.73a32351.js +++ b/assets/js/39.5b586896.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[39],{318:function(t,e,r){"use strict";r.r(e);var s=r(10),a=Object(s.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("h1",{attrs:{id:"what-is-turbo"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#what-is-turbo"}},[this._v("#")]),this._v(" What Is Turbo?")]),this._v(" "),t("p",[this._v("Turbo is a new service offered by ArDrive that removes the barriers to permaweb storage by allowing users to pay for uploads using a credit or debit card. Turbo consists of two separate components: a bundling upload service and a payment service. Turbo Credits can be purchased in the ArDrive web app, and represent a 1:1 conversion from AR tokens in the amount of data they can upload. The smallest denomination of a Turbo Credit is a Winston Credit (winc).")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[39],{319:function(t,e,r){"use strict";r.r(e);var s=r(10),a=Object(s.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("h1",{attrs:{id:"what-is-turbo"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#what-is-turbo"}},[this._v("#")]),this._v(" What Is Turbo?")]),this._v(" "),t("p",[this._v("Turbo is a new service offered by ArDrive that removes the barriers to permaweb storage by allowing users to pay for uploads using a credit or debit card. Turbo consists of two separate components: a bundling upload service and a payment service. Turbo Credits can be purchased in the ArDrive web app, and represent a 1:1 conversion from AR tokens in the amount of data they can upload. The smallest denomination of a Turbo Credit is a Winston Credit (winc).")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/40.0f306301.js b/assets/js/40.6c08260a.js similarity index 99% rename from assets/js/40.0f306301.js rename to assets/js/40.6c08260a.js index c840937..5bb51cc 100644 --- a/assets/js/40.0f306301.js +++ b/assets/js/40.6c08260a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{319:function(e,r,a){"use strict";a.r(r);var t=a(10),o=Object(t.a)({},(function(){var e=this,r=e._self._c;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"about-ardrive"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#about-ardrive"}},[e._v("#")]),e._v(" About ArDrive")]),e._v(" "),r("p",[e._v("ArDrive offers never-ending storage of your most valuable files. Pay once and save your memories forever.")]),e._v(" "),r("h2",{attrs:{id:"control-your-own-data"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#control-your-own-data"}},[e._v("#")]),e._v(" Control Your Own Data")]),e._v(" "),r("h3",{attrs:{id:"true-data-ownership"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#true-data-ownership"}},[e._v("#")]),e._v(" True Data Ownership")]),e._v(" "),r("p",[e._v("With pay-once pricing you no longer have to add another subscription fee to your monthly budget. Save big when you only have to pay for what you use.")]),e._v(" "),r("h3",{attrs:{id:"no-more-lost-data"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#no-more-lost-data"}},[e._v("#")]),e._v(" No More Lost Data")]),e._v(" "),r("p",[e._v("Feel safe about the longevity of your files and avoid the horror stories of broken hard drives, deleted accounts, or lost files.")]),e._v(" "),r("h3",{attrs:{id:"decentralized-network"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#decentralized-network"}},[e._v("#")]),e._v(" Decentralized Network")]),e._v(" "),r("p",[e._v("Break free from Big Tech and leverage the power of the decentralized Arweave blockchain network that puts you back in control. Own your data instead of renting it.")]),e._v(" "),r("h3",{attrs:{id:"community-owned"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#community-owned"}},[e._v("#")]),e._v(" Community Owned")]),e._v(" "),r("p",[r("em",[e._v("You're the boss.")]),e._v(" As a Web3 organization, ArDrive is owned collectively so you can have a say in our governance and share in our rewards.")]),e._v(" "),r("h2",{attrs:{id:"how-can-ardrive-help-you"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#how-can-ardrive-help-you"}},[e._v("#")]),e._v(" How can Ardrive Help You?")]),e._v(" "),r("h3",{attrs:{id:"store-family-memories-forever"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#store-family-memories-forever"}},[e._v("#")]),e._v(" Store Family Memories Forever")]),e._v(" "),r("p",[e._v("Never lose a cherished photo or video again. Keep and pass along all of your most important photos and documents to the present or future generations. "),r("a",{attrs:{href:"https://ardrive.io/features/family-memories/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"permanence"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#permanence"}},[e._v("#")]),e._v(" Permanence")]),e._v(" "),r("p",[e._v("In a digital world, how do you guarantee information is kept for long-periods of time? Just as the web connects data and people over vast distances, your data can now be kept over vast periods of time. "),r("a",{attrs:{href:"https://ardrive.io/features/permanent/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"totally-private-or-totally-public"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#totally-private-or-totally-public"}},[e._v("#")]),e._v(" Totally Private or Totally Public")]),e._v(" "),r("p",[e._v("It’s your choice in how you want to manage your data. Keep it private, share with select individuals, or make it public to the world. ArDrive is optimized for photography, digital art and NFT storage. "),r("a",{attrs:{href:"https://ardrive.io/features/public-or-private/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"eliminate-subscription-fees"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#eliminate-subscription-fees"}},[e._v("#")]),e._v(" Eliminate Subscription Fees")]),e._v(" "),r("p",[e._v("If you are paying monthly for cloud storage you are renting out your data. Get a digital wallet and move to full ownership of your data with our innovative pay once per file pricing. "),r("a",{attrs:{href:"https://ardrive.io/features/eliminate-subscription-fees/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"control-your-data"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#control-your-data"}},[e._v("#")]),e._v(" Control Your Data")]),e._v(" "),r("p",[e._v("Break free from the whims of centralized big tech and ever-changing terms of service. Enjoy the benefits of total privacy, security, and extreme data redundancy on a decentralized network. "),r("a",{attrs:{href:"https://ardrive.io/features/control-your-data/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"perfect-record-keeping"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#perfect-record-keeping"}},[e._v("#")]),e._v(" Perfect Record Keeping")]),e._v(" "),r("p",[e._v("Data integrity, accuracy and consistency for your most important files! Achieve regulatory compliance in any industry or your personal life by having an immutable (unchanging) and time-stamped record of all your files. "),r("a",{attrs:{href:"https://ardrive.io/features/perfect-record-keeping/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"durable-nfts"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#durable-nfts"}},[e._v("#")]),e._v(" Durable NFTs")]),e._v(" "),r("p",[e._v("NFTs make the internet ownable. But when you buy an NFT how do you know it is going to be around in 20 years? Who is paying to store it? And what if they stop? "),r("a",{attrs:{href:"https://ardrive.io/nft/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"archive-the-web"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#archive-the-web"}},[e._v("#")]),e._v(" Archive the Web")]),e._v(" "),r("p",[e._v("Save a copy of any webpage you create or find! Each page will be given a unique url and saved on to Arweave’s permaweb (just like the web, but forever!). "),r("a",{attrs:{href:"https://ardrive.io/features/archive/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)])])}),[],!1,null,null,null);r.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{320:function(e,r,a){"use strict";a.r(r);var t=a(10),o=Object(t.a)({},(function(){var e=this,r=e._self._c;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"about-ardrive"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#about-ardrive"}},[e._v("#")]),e._v(" About ArDrive")]),e._v(" "),r("p",[e._v("ArDrive offers never-ending storage of your most valuable files. Pay once and save your memories forever.")]),e._v(" "),r("h2",{attrs:{id:"control-your-own-data"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#control-your-own-data"}},[e._v("#")]),e._v(" Control Your Own Data")]),e._v(" "),r("h3",{attrs:{id:"true-data-ownership"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#true-data-ownership"}},[e._v("#")]),e._v(" True Data Ownership")]),e._v(" "),r("p",[e._v("With pay-once pricing you no longer have to add another subscription fee to your monthly budget. Save big when you only have to pay for what you use.")]),e._v(" "),r("h3",{attrs:{id:"no-more-lost-data"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#no-more-lost-data"}},[e._v("#")]),e._v(" No More Lost Data")]),e._v(" "),r("p",[e._v("Feel safe about the longevity of your files and avoid the horror stories of broken hard drives, deleted accounts, or lost files.")]),e._v(" "),r("h3",{attrs:{id:"decentralized-network"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#decentralized-network"}},[e._v("#")]),e._v(" Decentralized Network")]),e._v(" "),r("p",[e._v("Break free from Big Tech and leverage the power of the decentralized Arweave blockchain network that puts you back in control. Own your data instead of renting it.")]),e._v(" "),r("h3",{attrs:{id:"community-owned"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#community-owned"}},[e._v("#")]),e._v(" Community Owned")]),e._v(" "),r("p",[r("em",[e._v("You're the boss.")]),e._v(" As a Web3 organization, ArDrive is owned collectively so you can have a say in our governance and share in our rewards.")]),e._v(" "),r("h2",{attrs:{id:"how-can-ardrive-help-you"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#how-can-ardrive-help-you"}},[e._v("#")]),e._v(" How can Ardrive Help You?")]),e._v(" "),r("h3",{attrs:{id:"store-family-memories-forever"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#store-family-memories-forever"}},[e._v("#")]),e._v(" Store Family Memories Forever")]),e._v(" "),r("p",[e._v("Never lose a cherished photo or video again. Keep and pass along all of your most important photos and documents to the present or future generations. "),r("a",{attrs:{href:"https://ardrive.io/features/family-memories/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"permanence"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#permanence"}},[e._v("#")]),e._v(" Permanence")]),e._v(" "),r("p",[e._v("In a digital world, how do you guarantee information is kept for long-periods of time? Just as the web connects data and people over vast distances, your data can now be kept over vast periods of time. "),r("a",{attrs:{href:"https://ardrive.io/features/permanent/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"totally-private-or-totally-public"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#totally-private-or-totally-public"}},[e._v("#")]),e._v(" Totally Private or Totally Public")]),e._v(" "),r("p",[e._v("It’s your choice in how you want to manage your data. Keep it private, share with select individuals, or make it public to the world. ArDrive is optimized for photography, digital art and NFT storage. "),r("a",{attrs:{href:"https://ardrive.io/features/public-or-private/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"eliminate-subscription-fees"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#eliminate-subscription-fees"}},[e._v("#")]),e._v(" Eliminate Subscription Fees")]),e._v(" "),r("p",[e._v("If you are paying monthly for cloud storage you are renting out your data. Get a digital wallet and move to full ownership of your data with our innovative pay once per file pricing. "),r("a",{attrs:{href:"https://ardrive.io/features/eliminate-subscription-fees/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"control-your-data"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#control-your-data"}},[e._v("#")]),e._v(" Control Your Data")]),e._v(" "),r("p",[e._v("Break free from the whims of centralized big tech and ever-changing terms of service. Enjoy the benefits of total privacy, security, and extreme data redundancy on a decentralized network. "),r("a",{attrs:{href:"https://ardrive.io/features/control-your-data/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"perfect-record-keeping"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#perfect-record-keeping"}},[e._v("#")]),e._v(" Perfect Record Keeping")]),e._v(" "),r("p",[e._v("Data integrity, accuracy and consistency for your most important files! Achieve regulatory compliance in any industry or your personal life by having an immutable (unchanging) and time-stamped record of all your files. "),r("a",{attrs:{href:"https://ardrive.io/features/perfect-record-keeping/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"durable-nfts"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#durable-nfts"}},[e._v("#")]),e._v(" Durable NFTs")]),e._v(" "),r("p",[e._v("NFTs make the internet ownable. But when you buy an NFT how do you know it is going to be around in 20 years? Who is paying to store it? And what if they stop? "),r("a",{attrs:{href:"https://ardrive.io/nft/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"archive-the-web"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#archive-the-web"}},[e._v("#")]),e._v(" Archive the Web")]),e._v(" "),r("p",[e._v("Save a copy of any webpage you create or find! Each page will be given a unique url and saved on to Arweave’s permaweb (just like the web, but forever!). "),r("a",{attrs:{href:"https://ardrive.io/features/archive/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Learn more"),r("OutboundLink")],1)])])}),[],!1,null,null,null);r.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/app.99081f9c.js b/assets/js/app.c54f9bce.js similarity index 95% rename from assets/js/app.99081f9c.js rename to assets/js/app.c54f9bce.js index 0377381..6c9eac9 100644 --- a/assets/js/app.99081f9c.js +++ b/assets/js/app.c54f9bce.js @@ -1,4 +1,4 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(t){function e(e){for(var r,a,s=e[0],c=e[1],u=e[2],f=0,p=[];f
'};function o(t,e,n){return tn?n:t}function i(t){return 100*(-1+t)}n.configure=function(t){var e,n;for(e in t)void 0!==(n=t[e])&&t.hasOwnProperty(e)&&(r[e]=n);return this},n.status=null,n.set=function(t){var e=n.isStarted();t=o(t,r.minimum,1),n.status=1===t?null:t;var c=n.render(!e),u=c.querySelector(r.barSelector),l=r.speed,f=r.easing;return c.offsetWidth,a((function(e){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,function(t,e,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+i(t)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+i(t)+"%,0)"}:{"margin-left":i(t)+"%"}).transition="all "+e+"ms "+n,o}(t,l,f)),1===t?(s(c,{transition:"none",opacity:1}),c.offsetWidth,setTimeout((function(){s(c,{transition:"all "+l+"ms linear",opacity:0}),setTimeout((function(){n.remove(),e()}),l)}),l)):setTimeout(e,l)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var t=function(){setTimeout((function(){n.status&&(n.trickle(),t())}),r.trickleSpeed)};return r.trickle&&t(),this},n.done=function(t){return t||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(t){var e=n.status;return e?("number"!=typeof t&&(t=(1-e)*o(Math.random()*e,.1,.95)),e=o(e+t,0,.994),n.set(e)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},t=0,e=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===e&&n.start(),t++,e++,r.always((function(){0==--e?(t=0,n.done()):n.set((t-e)/t)})),this):this},n.render=function(t){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var e=document.createElement("div");e.id="nprogress",e.innerHTML=r.template;var o,a=e.querySelector(r.barSelector),c=t?"-100":i(n.status||0),l=document.querySelector(r.parent);return s(a,{transition:"all 0 linear",transform:"translate3d("+c+"%,0,0)"}),r.showSpinner||(o=e.querySelector(r.spinnerSelector))&&p(o),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(e),e},n.remove=function(){l(document.documentElement,"nprogress-busy"),l(document.querySelector(r.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&p(t)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};var a=function(){var t=[];function e(){var n=t.shift();n&&n(e)}return function(n){t.push(n),1==t.length&&e()}}(),s=function(){var t=["Webkit","O","Moz","ms"],e={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(t,e){return e.toUpperCase()})),e[n]||(e[n]=function(e){var n=document.body.style;if(e in n)return e;for(var r,o=t.length,i=e.charAt(0).toUpperCase()+e.slice(1);o--;)if((r=t[o]+i)in n)return r;return e}(n))}function r(t,e,r){e=n(e),t.style[e]=r}return function(t,e){var n,o,i=arguments;if(2==i.length)for(n in e)void 0!==(o=e[n])&&e.hasOwnProperty(n)&&r(t,n,o);else r(t,i[1],i[2])}}();function c(t,e){return("string"==typeof t?t:f(t)).indexOf(" "+e+" ")>=0}function u(t,e){var n=f(t),r=n+e;c(n,e)||(t.className=r.substring(1))}function l(t,e){var n,r=f(t);c(t,e)&&(n=r.replace(" "+e+" "," "),t.className=n.substring(1,n.length-1))}function f(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function p(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return n})?r.call(e,n,e,t):r)||(t.exports=o)},function(t,e,n){var r=n(3),o=n(45).f,i=n(13),a=n(106),s=n(32),c=n(61),u=n(122);t.exports=function(t,e){var n,l,f,p,d,h=t.target,v=t.global,g=t.stat;if(n=v?r:g?r[h]||s(h,{}):(r[h]||{}).prototype)for(l in e){if(p=e[l],f=t.dontCallGetSet?(d=o(n,l))&&d.value:n[l],!u(v?l:h+(g?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),a(n,l,p,t)}}},function(t,e,n){var r=n(25),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},function(t,e,n){var r=n(1);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(46),o=n(47);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(3),o=n(0),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},function(t,e,n){var r=n(0),o=n(102),i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not a function")}},function(t,e,n){var r=n(3),o=n(56),i=n(7),a=n(58),s=n(54),c=n(53),u=r.Symbol,l=o("wks"),f=c?u.for||u:u&&u.withoutSetter||a;t.exports=function(t){return i(l,t)||(l[t]=s&&i(u,t)?u[t]:f("Symbol."+t)),l[t]}},function(t,e,n){var r=n(3),o=n(32),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,n){var r=n(3),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(47),o=Object;t.exports=function(t){return o(r(t))}},function(t,e,n){var r=n(8),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not an object")}},function(t,e,n){var r=n(119);t.exports=function(t){return r(t.length)}},function(t,e,n){var r=n(146),o=n(11),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},function(t,e,n){var r=n(9)(n(6),"Map");t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(166),o=n(173),i=n(175),a=n(176),s=n(177);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(4),o=n(43),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||(a.test(t)||!i.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(12),o=n(11);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(5),o=n(24),i=n(98),a=n(26),s=n(27),c=n(49),u=n(7),l=n(59),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=s(t),e=c(e),l)try{return f(t,e)}catch(t){}if(u(t,e))return a(!o(i.f,t,e),t[e])}},function(t,e,n){var r=n(2),o=n(1),i=n(15),a=Object,s=r("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?s(t,""):a(t)}:a},function(t,e,n){var r=n(48),o=TypeError;t.exports=function(t){if(r(t))throw o("Can't call method on "+t);return t}},function(t,e){t.exports=function(t){return null==t}},function(t,e,n){var r=n(99),o=n(51);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},function(t,e){var n="object"==typeof document&&document.all,r=void 0===n&&void 0!==n;t.exports={all:n,IS_HTMLDDA:r}},function(t,e,n){var r=n(28),o=n(0),i=n(52),a=n(53),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,s(t))}},function(t,e,n){var r=n(2);t.exports=r({}.isPrototypeOf)},function(t,e,n){var r=n(54);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var r=n(55),o=n(1);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(t,e,n){var r,o,i=n(3),a=n(100),s=i.process,c=i.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},function(t,e,n){var r=n(57),o=n(31);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.1",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"})},function(t,e){t.exports=!1},function(t,e,n){var r=n(2),o=0,i=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},function(t,e,n){var r=n(5),o=n(1),i=n(104);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e){t.exports={}},function(t,e,n){var r=n(7),o=n(113),i=n(45),a=n(16);t.exports=function(t,e,n){for(var s=o(e),c=a.f,u=i.f,l=0;ll))return!1;var p=c.get(t),d=c.get(e);if(p&&d)return p==e&&d==t;var h=-1,v=!0,g=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++h-1&&t%1==0&&t=0&&Math.floor(e)===e&&isFinite(t)}function v(t){return a(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function g(t){return null==t?"":Array.isArray(t)||p(t)&&t.toString===f?JSON.stringify(t,null,2):String(t)}function m(t){var e=parseFloat(t);return isNaN(e)?t:e}function y(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(r,1)}}var w=Object.prototype.hasOwnProperty;function x(t,e){return w.call(t,e)}function O(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var C=/-(\w)/g,k=O((function(t){return t.replace(C,(function(t,e){return e?e.toUpperCase():""}))})),S=O((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),j=/\B([A-Z])/g,$=O((function(t){return t.replace(j,"-$1").toLowerCase()}));var E=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function P(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function A(t,e){for(var n in e)t[n]=e[n];return t}function T(t){for(var e={},n=0;n0,X=Q&&Q.indexOf("edge/")>0;Q&&Q.indexOf("android");var Z=Q&&/iphone|ipad|ipod|ios/.test(Q);Q&&/chrome\/\d+/.test(Q),Q&&/phantomjs/.test(Q);var tt,et=Q&&Q.match(/firefox\/(\d+)/),nt={}.watch,rt=!1;if(K)try{var ot={};Object.defineProperty(ot,"passive",{get:function(){rt=!0}}),window.addEventListener("test-passive",null,ot)}catch(t){}var it=function(){return void 0===tt&&(tt=!K&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),tt},at=K&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function st(t){return"function"==typeof t&&/native code/.test(t.toString())}var ct,ut="undefined"!=typeof Symbol&&st(Symbol)&&"undefined"!=typeof Reflect&&st(Reflect.ownKeys);ct="undefined"!=typeof Set&&st(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var lt=null;function ft(t){void 0===t&&(t=null),t||lt&<._scope.off(),lt=t,t&&t._scope.on()}var pt=function(){function t(t,e,n,r,o,i,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),dt=function(t){void 0===t&&(t="");var e=new pt;return e.text=t,e.isComment=!0,e};function ht(t){return new pt(void 0,void 0,void 0,String(t))}function vt(t){var e=new pt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var gt=0,mt=[],yt=function(){function t(){this._pending=!1,this.id=gt++,this.subs=[]}return t.prototype.addSub=function(t){this.subs.push(t)},t.prototype.removeSub=function(t){this.subs[this.subs.indexOf(t)]=null,this._pending||(this._pending=!0,mt.push(this))},t.prototype.depend=function(e){t.target&&t.target.addDep(this)},t.prototype.notify=function(t){var e=this.subs.filter((function(t){return t}));for(var n=0,r=e.length;n0&&(re((u=t(u,"".concat(n||"","_").concat(r)))[0])&&re(f)&&(p[l]=ht(f.text+u[0].text),u.shift()),p.push.apply(p,u)):c(u)?re(f)?p[l]=ht(f.text+u):""!==u&&p.push(ht(u)):re(u)&&re(f)?p[l]=ht(f.text+u.text):(s(e._isVList)&&a(u.tag)&&i(u.key)&&a(n)&&(u.key="__vlist".concat(n,"_").concat(r,"__")),p.push(u)));return p}(t):void 0}function re(t){return a(t)&&a(t.text)&&!1===t.isComment}function oe(t,e){var n,r,i,s,c=null;if(o(t)||"string"==typeof t)for(c=new Array(t.length),n=0,r=t.length;n0,s=e?!!e.$stable:!a,c=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(s&&o&&o!==r&&c===o.$key&&!a&&!o.$hasNormal)return o;for(var u in i={},e)e[u]&&"$"!==u[0]&&(i[u]=Oe(t,n,u,e[u]))}else i={};for(var l in n)l in i||(i[l]=Ce(n,l));return e&&Object.isExtensible(e)&&(e._normalized=i),W(i,"$stable",s),W(i,"$key",c),W(i,"$hasNormal",a),i}function Oe(t,e,n,r){var i=function(){var e=lt;ft(t);var n=arguments.length?r.apply(null,arguments):r({}),i=(n=n&&"object"==typeof n&&!o(n)?[n]:ne(n))&&n[0];return ft(e),n&&(!i||1===n.length&&i.isComment&&!we(i))?void 0:n};return r.proxy&&Object.defineProperty(e,n,{get:i,enumerable:!0,configurable:!0}),i}function Ce(t,e){return function(){return t[e]}}function ke(t){return{get attrs(){if(!t._attrsProxy){var e=t._attrsProxy={};W(e,"_v_attr_proxy",!0),Se(e,t.$attrs,r,t,"$attrs")}return t._attrsProxy},get listeners(){t._listenersProxy||Se(t._listenersProxy={},t.$listeners,r,t,"$listeners");return t._listenersProxy},get slots(){return function(t){t._slotsProxy||$e(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(t)},emit:E(t.$emit,t),expose:function(e){e&&Object.keys(e).forEach((function(n){return Vt(t,e,n)}))}}}function Se(t,e,n,r,o){var i=!1;for(var a in e)a in t?e[a]!==n[a]&&(i=!0):(i=!0,je(t,a,r,o));for(var a in t)a in e||(i=!0,delete t[a]);return i}function je(t,e,n,r){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return n[r][e]}})}function $e(t,e){for(var n in e)t[n]=e[n];for(var n in t)n in e||delete t[n]}var Ee=null;function Pe(t,e){return(t.__esModule||ut&&"Module"===t[Symbol.toStringTag])&&(t=t.default),l(t)?e.extend(t):t}function Ae(t){if(o(t))for(var e=0;edocument.createEvent("Event").timeStamp&&(gn=function(){return mn.now()})}var yn=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function bn(){var t,e;for(vn=gn(),dn=!0,un.sort(yn),hn=0;hnhn&&un[n].id>t.id;)n--;un.splice(n+1,0,t)}else un.push(t);pn||(pn=!0,qe(bn))}}function wn(t,e){if(t){for(var n=Object.create(null),r=ut?Reflect.ownKeys(t):Object.keys(t),o=0;o-1)if(i&&!x(o,"default"))a=!1;else if(""===a||a===$(t)){var c=zn(String,o.type);(c<0||s-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!d(t)&&t.test(e)}function or(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=a.name;s&&!e(s)&&ir(n,i,r,o)}}}function ir(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,_(n,e)}tr.prototype._init=function(t){var e=this;e._uid=Xn++,e._isVue=!0,e.__v_skip=!0,e._scope=new Qt(!0),e._scope._vm=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=In(Zn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&nn(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,o=n&&n.context;t.$slots=be(e._renderChildren,o),t.$scopedSlots=n?xe(t.$parent,n.data.scopedSlots,t.$slots):r,t._c=function(e,n,r,o){return Te(t,e,n,r,o,!1)},t.$createElement=function(e,n,r,o){return Te(t,e,n,r,o,!0)};var i=n&&n.data;At(t,"$attrs",i&&i.attrs||r,null,!0),At(t,"$listeners",e._parentListeners||r,null,!0)}(e),cn(e,"beforeCreate",void 0,!1),function(t){var e=wn(t.$options.inject,t);e&&(jt(!1),Object.keys(e).forEach((function(n){At(t,n,e[n])})),jt(!0))}(e),qn(e),function(t){var e=t.$options.provide;if(e){var n=u(e)?e.call(t):e;if(!l(n))return;for(var r=Jt(t),o=ut?Reflect.ownKeys(n):Object.keys(n),i=0;i1?P(n):n;for(var r=P(arguments,1),o='event handler for "'.concat(t,'"'),i=0,a=n.length;iparseInt(this.max)&&ir(t,e[0],e,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)ir(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){or(t,(function(t){return rr(e,t)}))})),this.$watch("exclude",(function(e){or(t,(function(t){return!rr(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Ae(t),n=e&&e.componentOptions;if(n){var r=nr(n),o=this.include,i=this.exclude;if(o&&(!r||!rr(o,r))||i&&r&&rr(i,r))return e;var a=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):e.key;a[c]?(e.componentInstance=a[c].componentInstance,_(s,c),s.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return B}};Object.defineProperty(t,"config",e),t.util={warn:Pn,extend:A,mergeOptions:In,defineReactive:At},t.set=Tt,t.delete=Lt,t.nextTick=qe,t.observable=function(t){return Pt(t),t},t.options=Object.create(null),U.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,A(t.options.components,sr),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=P(arguments,1);return n.unshift(this),u(t.install)?t.install.apply(t,n):u(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=In(this.options,t),this}}(t),er(t),function(t){U.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&p(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&u(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(tr),Object.defineProperty(tr.prototype,"$isServer",{get:it}),Object.defineProperty(tr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(tr,"FunctionalRenderContext",{value:xn}),tr.version="2.7.14";var cr=y("style,class"),ur=y("input,textarea,option,select,progress"),lr=y("contenteditable,draggable,spellcheck"),fr=y("events,caret,typing,plaintext-only"),pr=y("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),dr="http://www.w3.org/1999/xlink",hr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},vr=function(t){return hr(t)?t.slice(6,t.length):""},gr=function(t){return null==t||!1===t};function mr(t){for(var e=t.data,n=t,r=t;a(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=yr(r.data,e));for(;a(n=n.parent);)n&&n.data&&(e=yr(e,n.data));return function(t,e){if(a(t)||a(e))return br(t,_r(e));return""}(e.staticClass,e.class)}function yr(t,e){return{staticClass:br(t.staticClass,e.staticClass),class:a(t.class)?[t.class,e.class]:e.class}}function br(t,e){return t?e?t+" "+e:t:e||""}function _r(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,o=t.length;r-1?Hr(t,e,n):pr(e)?gr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):lr(e)?t.setAttribute(e,function(t,e){return gr(e)||"false"===e?"false":"contenteditable"===t&&fr(e)?e:"true"}(e,n)):hr(e)?gr(n)?t.removeAttributeNS(dr,vr(e)):t.setAttributeNS(dr,e,n):Hr(t,e,n)}function Hr(t,e,n){if(gr(n))t.removeAttribute(e);else{if(J&&!Y&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var Wr={create:Br,update:Br};function qr(t,e){var n=e.elm,r=e.data,o=t.data;if(!(i(r.staticClass)&&i(r.class)&&(i(o)||i(o.staticClass)&&i(o.class)))){var s=mr(e),c=n._transitionClasses;a(c)&&(s=br(s,_r(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Gr,Kr={create:qr,update:qr};function Qr(t,e,n){var r=Gr;return function o(){var i=e.apply(null,arguments);null!==i&&Xr(t,o,n,r)}}var Jr=Fe&&!(et&&Number(et[1])<=53);function Yr(t,e,n,r){if(Jr){var o=vn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Gr.addEventListener(t,e,rt?{capture:n,passive:r}:n)}function Xr(t,e,n,r){(r||Gr).removeEventListener(t,e._wrapper||e,n)}function Zr(t,e){if(!i(t.data.on)||!i(e.data.on)){var n=e.data.on||{},r=t.data.on||{};Gr=e.elm||t.elm,function(t){if(a(t.__r)){var e=J?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}a(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(n),Zt(n,r,Yr,Xr,Qr,e.context),Gr=void 0}}var to,eo={create:Zr,update:Zr,destroy:function(t){return Zr(t,Ar)}};function no(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var n,r,o=e.elm,c=t.data.domProps||{},u=e.data.domProps||{};for(n in(a(u.__ob__)||s(u._v_attr_proxy))&&(u=e.data.domProps=A({},u)),c)n in u||(o[n]="");for(n in u){if(r=u[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===c[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n&&"PROGRESS"!==o.tagName){o._value=r;var l=i(r)?"":String(r);ro(o,l)&&(o.value=l)}else if("innerHTML"===n&&Or(o.tagName)&&i(o.innerHTML)){(to=to||document.createElement("div")).innerHTML="".concat(r,"");for(var f=to.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;f.firstChild;)o.appendChild(f.firstChild)}else if(r!==c[n])try{o[n]=r}catch(t){}}}}function ro(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(a(r)){if(r.number)return m(n)!==m(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var oo={create:no,update:no},io=O((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function ao(t){var e=so(t.style);return t.staticStyle?A(t.staticStyle,e):e}function so(t){return Array.isArray(t)?T(t):"string"==typeof t?io(t):t}var co,uo=/^--/,lo=/\s*!important$/,fo=function(t,e,n){if(uo.test(e))t.style.setProperty(e,n);else if(lo.test(n))t.style.setProperty($(e),n.replace(lo,""),"important");else{var r=ho(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(mo).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" ".concat(t.getAttribute("class")||""," ");n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function bo(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(mo).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" ".concat(t.getAttribute("class")||""," "),r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function _o(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&A(e,wo(t.name||"v")),A(e,t),e}return"string"==typeof t?wo(t):void 0}}var wo=O((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),xo=K&&!Y,Oo="transition",Co="transitionend",ko="animation",So="animationend";xo&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Oo="WebkitTransition",Co="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ko="WebkitAnimation",So="webkitAnimationEnd"));var jo=K?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function $o(t){jo((function(){jo(t)}))}function Eo(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),yo(t,e))}function Po(t,e){t._transitionClasses&&_(t._transitionClasses,e),bo(t,e)}function Ao(t,e,n){var r=Lo(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s="transition"===o?Co:So,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c0&&(n="transition",l=a,f=i.length):"animation"===e?u>0&&(n="animation",l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?"transition":"animation":null)?"transition"===n?i.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:"transition"===n&&To.test(r[Oo+"Property"])}}function Mo(t,e){for(;t.length1}function Uo(t,e){!0!==e.data.show&&Ro(e)}var Vo=function(t){var e,n,r={},u=t.modules,l=t.nodeOps;for(e=0;eh?_(t,i(n[m+1])?null:n[m+1].elm,n,d,m,r):d>m&&x(e,f,h)}(f,v,m,n,u):a(m)?(a(t.text)&&l.setTextContent(f,""),_(f,null,m,0,m.length-1,n)):a(v)?x(v,0,v.length-1):a(t.text)&&l.setTextContent(f,""):t.text!==e.text&&l.setTextContent(f,e.text),a(h)&&a(d=h.hook)&&a(d=d.postpatch)&&d(t,e)}}}function S(t,e,n){if(s(n)&&a(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r-1,a.selected!==i&&(a.selected=i);else if(R(qo(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Wo(t,e){return e.every((function(e){return!R(e,t)}))}function qo(t){return"_value"in t?t._value:t.value}function Go(t){t.target.composing=!0}function Ko(t){t.target.composing&&(t.target.composing=!1,Qo(t.target,"input"))}function Qo(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Jo(t){return!t.componentInstance||t.data&&t.data.transition?t:Jo(t.componentInstance._vnode)}var Yo={model:Bo,show:{bind:function(t,e,n){var r=e.value,o=(n=Jo(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Ro(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=Jo(n)).data&&n.data.transition?(n.data.show=!0,r?Ro(n,(function(){t.style.display=t.__vOriginalDisplay})):Io(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}}},Xo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Zo(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Zo(Ae(e.children)):t}function ti(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var r in o)e[k(r)]=o[r];return e}function ei(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var ni=function(t){return t.tag||we(t)},ri=function(t){return"show"===t.name},oi={name:"transition",props:Xo,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(ni)).length){0;var r=this.mode;0;var o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var i=Zo(o);if(!i)return o;if(this._leaving)return ei(t,o);var a="__transition-".concat(this._uid,"-");i.key=null==i.key?i.isComment?a+"comment":a+i.tag:c(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var s=(i.data||(i.data={})).transition=ti(this),u=this._vnode,l=Zo(u);if(i.data.directives&&i.data.directives.some(ri)&&(i.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(i,l)&&!we(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=A({},s);if("out-in"===r)return this._leaving=!0,te(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),ei(t,o);if("in-out"===r){if(we(i))return u;var p,d=function(){p()};te(s,"afterEnter",d),te(s,"enterCancelled",d),te(f,"delayLeave",(function(t){p=t}))}}return o}}},ii=A({tag:String,moveClass:String},Xo);function ai(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function si(t){t.data.newPos=t.elm.getBoundingClientRect()}function ci(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate(".concat(r,"px,").concat(o,"px)"),i.transitionDuration="0s"}}delete ii.mode;var ui={Transition:oi,TransitionGroup:{props:ii,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=on(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=ti(this),s=0;s-1?kr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:kr[t]=/HTMLUnknownElement/.test(e.toString())},A(tr.options.directives,Yo),A(tr.options.components,ui),tr.prototype.__patch__=K?Vo:L,tr.prototype.$mount=function(t,e){return function(t,e,n){var r;t.$el=e,t.$options.render||(t.$options.render=dt),cn(t,"beforeMount"),r=function(){t._update(t._render(),n)},new Xe(t,r,L,{before:function(){t._isMounted&&!t._isDestroyed&&cn(t,"beforeUpdate")}},!0),n=!1;var o=t._preWatchers;if(o)for(var i=0;i=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}(o.path||""),u=e&&e.path||"/",l=c.path?Pi(c.path,u,n||o.append):u,f=function(t,e,n){void 0===e&&(e={});var r,o=n||mi;try{r=o(t||"")}catch(t){r={}}for(var i in e){var a=e[i];r[i]=Array.isArray(a)?a.map(gi):gi(a)}return r}(c.query,o.query,r&&r.options.parseQuery),p=o.hash||c.hash;return p&&"#"!==p.charAt(0)&&(p="#"+p),{_normalized:!0,path:l,query:f,hash:p}}var Yi,Xi=function(){},Zi={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,o=n.resolve(this.to,r,this.append),i=o.location,a=o.route,s=o.href,c={},u=n.options.linkActiveClass,l=n.options.linkExactActiveClass,f=null==u?"router-link-active":u,p=null==l?"router-link-exact-active":l,d=null==this.activeClass?f:this.activeClass,h=null==this.exactActiveClass?p:this.exactActiveClass,v=a.redirectedFrom?_i(null,Ji(a.redirectedFrom),null,n):a;c[h]=ki(r,v,this.exactPath),c[d]=this.exact||this.exactPath?c[h]:function(t,e){return 0===t.path.replace(bi,"/").indexOf(e.path.replace(bi,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(r,v);var g=c[h]?this.ariaCurrentValue:null,m=function(t){ta(t)&&(e.replace?n.replace(i,Xi):n.push(i,Xi))},y={click:ta};Array.isArray(this.event)?this.event.forEach((function(t){y[t]=m})):y[this.event]=m;var b={class:c},_=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:s,route:a,navigate:m,isActive:c[d],isExactActive:c[h]});if(_){if(1===_.length)return _[0];if(_.length>1||!_.length)return 0===_.length?t():t("span",{},_)}if("a"===this.tag)b.on=y,b.attrs={href:s,"aria-current":g};else{var w=function t(e){var n;if(e)for(var r=0;r-1&&(s.params[p]=n.params[p]);return s.path=Qi(l.path,s.params),c(l,s,a)}if(s.path){s.params={};for(var d=0;d-1}function Aa(t,e){return Pa(t)&&t._isRouter&&(null==e||t.type===e)}function Ta(t,e,n){var r=function(o){o>=t.length?n():t[o]?e(t[o],(function(){r(o+1)})):r(o+1)};r(0)}function La(t){return function(e,n,r){var o=!1,i=0,a=null;Ma(t,(function(t,e,n,s){if("function"==typeof t&&void 0===t.cid){o=!0,i++;var c,u=Ia((function(e){var o;((o=e).__esModule||Ra&&"Module"===o[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:Yi.extend(e),n.components[s]=e,--i<=0&&r()})),l=Ia((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=Pa(t)?t:new Error(e),r(a))}));try{c=t(u,l)}catch(t){l(t)}if(c)if("function"==typeof c.then)c.then(u,l);else{var f=c.component;f&&"function"==typeof f.then&&f.then(u,l)}}})),o||r()}}function Ma(t,e){return Da(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function Da(t){return Array.prototype.concat.apply([],t)}var Ra="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Ia(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var Fa=function(t,e){this.router=t,this.base=function(t){if(!t)if(ea){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=xi,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Na(t,e,n,r){var o=Ma(t,(function(t,r,o,i){var a=function(t,e){"function"!=typeof t&&(t=Yi.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map((function(t){return n(t,r,o,i)})):n(a,r,o,i)}));return Da(r?o.reverse():o)}function Ua(t,e){if(e)return function(){return t.apply(e,arguments)}}Fa.prototype.listen=function(t){this.cb=t},Fa.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Fa.prototype.onError=function(t){this.errorCbs.push(t)},Fa.prototype.transitionTo=function(t,e,n){var r,o=this;try{r=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var i=this.current;this.confirmTransition(r,(function(){o.updateRoute(r),e&&e(r),o.ensureURL(),o.router.afterHooks.forEach((function(t){t&&t(r,i)})),o.ready||(o.ready=!0,o.readyCbs.forEach((function(t){t(r)})))}),(function(t){n&&n(t),t&&!o.ready&&(Aa(t,ka.redirected)&&i===xi||(o.ready=!0,o.readyErrorCbs.forEach((function(e){e(t)}))))}))},Fa.prototype.confirmTransition=function(t,e,n){var r=this,o=this.current;this.pending=t;var i,a,s=function(t){!Aa(t)&&Pa(t)&&(r.errorCbs.length?r.errorCbs.forEach((function(e){e(t)})):console.error(t)),n&&n(t)},c=t.matched.length-1,u=o.matched.length-1;if(ki(t,o)&&c===u&&t.matched[c]===o.matched[u])return this.ensureURL(),t.hash&&da(this.router,o,t,!1),s(((a=$a(i=o,t,ka.duplicated,'Avoided redundant navigation to current location: "'+i.fullPath+'".')).name="NavigationDuplicated",a));var l=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n0)){var e=this.router,n=e.options.scrollBehavior,r=xa&&n;r&&this.listeners.push(pa());var o=function(){var n=t.current,o=Ba(t.base);t.current===xi&&o===t._startLocation||t.transitionTo(o,(function(t){r&&da(e,t,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Oa(Ai(r.base+t.fullPath)),da(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Ca(Ai(r.base+t.fullPath)),da(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(Ba(this.base)!==this.current.fullPath){var e=Ai(this.base+this.current.fullPath);t?Oa(e):Ca(e)}},e.prototype.getCurrentLocation=function(){return Ba(this.base)},e}(Fa);function Ba(t){var e=window.location.pathname,n=e.toLowerCase(),r=t.toLowerCase();return!t||n!==r&&0!==n.indexOf(Ai(r+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var za=function(t){function e(e,n,r){t.call(this,e,n),r&&function(t){var e=Ba(t);if(!/^\/#/.test(e))return window.location.replace(Ai(t+"/#"+e)),!0}(this.base)||Ha()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,n=xa&&e;n&&this.listeners.push(pa());var r=function(){var e=t.current;Ha()&&t.transitionTo(Wa(),(function(r){n&&da(t.router,r,e,!0),xa||Ka(r.fullPath)}))},o=xa?"popstate":"hashchange";window.addEventListener(o,r),this.listeners.push((function(){window.removeEventListener(o,r)}))}},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Ga(t.fullPath),da(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Ka(t.fullPath),da(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Wa()!==e&&(t?Ga(e):Ka(e))},e.prototype.getCurrentLocation=function(){return Wa()},e}(Fa);function Ha(){var t=Wa();return"/"===t.charAt(0)||(Ka("/"+t),!1)}function Wa(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function qa(t){var e=window.location.href,n=e.indexOf("#");return(n>=0?e.slice(0,n):e)+"#"+t}function Ga(t){xa?Oa(qa(t)):window.location.hash=t}function Ka(t){xa?Ca(qa(t)):window.location.replace(qa(t))}var Qa=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){Aa(t,ka.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Fa),Ja=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=oa(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!xa&&!1!==t.fallback,this.fallback&&(e="hash"),ea||(e="abstract"),this.mode=e,e){case"history":this.history=new Va(this,t.base);break;case"hash":this.history=new za(this,t.base,this.fallback);break;case"abstract":this.history=new Qa(this,t.base);break;default:0}},Ya={currentRoute:{configurable:!0}};Ja.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},Ya.currentRoute.get=function(){return this.history&&this.history.current},Ja.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof Va||n instanceof za){var r=function(t){n.setupListeners(),function(t){var r=n.current,o=e.options.scrollBehavior;xa&&o&&"fullPath"in t&&da(e,t,r,!1)}(t)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},Ja.prototype.beforeEach=function(t){return Za(this.beforeHooks,t)},Ja.prototype.beforeResolve=function(t){return Za(this.resolveHooks,t)},Ja.prototype.afterEach=function(t){return Za(this.afterHooks,t)},Ja.prototype.onReady=function(t,e){this.history.onReady(t,e)},Ja.prototype.onError=function(t){this.history.onError(t)},Ja.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},Ja.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},Ja.prototype.go=function(t){this.history.go(t)},Ja.prototype.back=function(){this.go(-1)},Ja.prototype.forward=function(){this.go(1)},Ja.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Ja.prototype.resolve=function(t,e,n){var r=Ji(t,e=e||this.history.current,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?Ai(t+"/"+r):r}(this.history.base,i,this.mode),normalizedTo:r,resolved:o}},Ja.prototype.getRoutes=function(){return this.matcher.getRoutes()},Ja.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==xi&&this.history.transitionTo(this.history.getCurrentLocation())},Ja.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==xi&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Ja.prototype,Ya);var Xa=Ja;function Za(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}Ja.install=function t(e){if(!t.installed||Yi!==e){t.installed=!0,Yi=e;var n=function(t){return void 0!==t},r=function(t,e){var r=t.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(t,e)};e.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",$i),e.component("RouterLink",Zi);var o=e.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},Ja.version="3.6.5",Ja.isNavigationFailure=Aa,Ja.NavigationFailureType=ka,Ja.START_LOCATION=xi,ea&&window.Vue&&window.Vue.use(Ja);n(97);n(91),n(129);var ts={NotFound:()=>n.e(6).then(n.bind(null,284)),Layout:()=>Promise.all([n.e(0),n.e(2)]).then(n.bind(null,283))},es={"v-5e1e685a":()=>n.e(7).then(n.bind(null,287)),"v-c97ca880":()=>n.e(8).then(n.bind(null,288)),"v-0d609624":()=>n.e(9).then(n.bind(null,289)),"v-4f037d1a":()=>n.e(10).then(n.bind(null,290)),"v-18d0587a":()=>n.e(11).then(n.bind(null,291)),"v-3120da0c":()=>n.e(12).then(n.bind(null,292)),"v-2f7f848c":()=>n.e(13).then(n.bind(null,293)),"v-2eaf1140":()=>n.e(14).then(n.bind(null,294)),"v-18c2b964":()=>n.e(15).then(n.bind(null,295)),"v-09d6f550":()=>n.e(16).then(n.bind(null,296)),"v-9356a30c":()=>n.e(17).then(n.bind(null,297)),"v-7cc0117c":()=>n.e(18).then(n.bind(null,298)),"v-690a4650":()=>n.e(19).then(n.bind(null,299)),"v-58f7366c":()=>n.e(20).then(n.bind(null,300)),"v-0877efcc":()=>n.e(21).then(n.bind(null,301)),"v-950c4d48":()=>n.e(22).then(n.bind(null,302)),"v-47c1f97a":()=>n.e(23).then(n.bind(null,303)),"v-4fad50ba":()=>n.e(24).then(n.bind(null,304)),"v-4fc0d1c8":()=>n.e(25).then(n.bind(null,305)),"v-31657474":()=>n.e(26).then(n.bind(null,306)),"v-e2784654":()=>n.e(27).then(n.bind(null,307)),"v-0c3bd15a":()=>n.e(28).then(n.bind(null,308)),"v-074d53cc":()=>n.e(30).then(n.bind(null,309)),"v-0d650648":()=>n.e(31).then(n.bind(null,310)),"v-3e6ef1ac":()=>n.e(32).then(n.bind(null,311)),"v-6dd912ec":()=>n.e(33).then(n.bind(null,312)),"v-a6e64848":()=>n.e(34).then(n.bind(null,313)),"v-35b0f3b1":()=>n.e(35).then(n.bind(null,314)),"v-e65ea9a4":()=>n.e(36).then(n.bind(null,315)),"v-57c590fa":()=>n.e(37).then(n.bind(null,316)),"v-d297eaa6":()=>n.e(38).then(n.bind(null,317)),"v-5d3101c8":()=>n.e(39).then(n.bind(null,318)),"v-501d8193":()=>n.e(40).then(n.bind(null,319)),"v-84e0b14c":()=>n.e(29).then(n.bind(null,320))};function ns(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}const rs=/-(\w)/g,os=ns(t=>t.replace(rs,(t,e)=>e?e.toUpperCase():"")),is=/\B([A-Z])/g,as=ns(t=>t.replace(is,"-$1").toLowerCase()),ss=ns(t=>t.charAt(0).toUpperCase()+t.slice(1));function cs(t,e){if(!e)return;if(t(e))return t(e);return e.includes("-")?t(ss(os(e))):t(ss(e))||t(as(e))}const us=Object.assign({},ts,es),ls=t=>us[t],fs=t=>es[t],ps=t=>ts[t],ds=t=>tr.component(t);function hs(t){return cs(fs,t)}function vs(t){return cs(ps,t)}function gs(t){return cs(ls,t)}function ms(t){return cs(ds,t)}function ys(...t){return Promise.all(t.filter(t=>t).map(async t=>{if(!ms(t)&&gs(t)){const e=await gs(t)();tr.component(t,e.default)}}))}function bs(t,e){"undefined"!=typeof window&&window.__VUEPRESS__&&(window.__VUEPRESS__[t]=e)}var _s=n(88),ws=n.n(_s),xs=n(89),Os=n.n(xs),Cs={created(){if(this.siteMeta=this.$site.headTags.filter(([t])=>"meta"===t).map(([t,e])=>e),this.$ssrContext){const e=this.getMergedMetaTags();this.$ssrContext.title=this.$title,this.$ssrContext.lang=this.$lang,this.$ssrContext.pageMeta=(t=e)?t.map(t=>{let e="{e+=` ${n}="${Os()(t[n])}"`}),e+">"}).join("\n "):"",this.$ssrContext.canonicalLink=Ss(this.$canonicalUrl)}var t},mounted(){this.currentMetaTags=[...document.querySelectorAll("meta")],this.updateMeta(),this.updateCanonicalLink()},methods:{updateMeta(){document.title=this.$title,document.documentElement.lang=this.$lang;const t=this.getMergedMetaTags();this.currentMetaTags=js(t,this.currentMetaTags)},getMergedMetaTags(){const t=this.$page.frontmatter.meta||[];return ws()([{name:"description",content:this.$description}],t,this.siteMeta,$s)},updateCanonicalLink(){ks(),this.$canonicalUrl&&document.head.insertAdjacentHTML("beforeend",Ss(this.$canonicalUrl))}},watch:{$page(){this.updateMeta(),this.updateCanonicalLink()}},beforeDestroy(){js(null,this.currentMetaTags),ks()}};function ks(){const t=document.querySelector("link[rel='canonical']");t&&t.remove()}function Ss(t=""){return t?``:""}function js(t,e){if(e&&[...e].filter(t=>t.parentNode===document.head).forEach(t=>document.head.removeChild(t)),t)return t.map(t=>{const e=document.createElement("meta");return Object.keys(t).forEach(n=>{e.setAttribute(n,t[n])}),document.head.appendChild(e),e})}function $s(t){for(const e of["name","property","itemprop"])if(t.hasOwnProperty(e))return t[e]+e;return JSON.stringify(t)}var Es=n(90),Ps={mounted(){window.addEventListener("scroll",this.onScroll)},methods:{onScroll:n.n(Es)()((function(){this.setActiveHash()}),300),setActiveHash(){const t=[].slice.call(document.querySelectorAll(".sidebar-link")),e=[].slice.call(document.querySelectorAll(".header-anchor")).filter(e=>t.some(t=>t.hash===e.hash)),n=Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),o=window.innerHeight+n;for(let t=0;t=i.parentElement.offsetTop+10&&(!a||n{this.$nextTick(()=>{this.$vuepress.$set("disableScrollBehavior",!1)})})}}}},beforeDestroy(){window.removeEventListener("scroll",this.onScroll)}},As=n(22),Ts=n.n(As),Ls={mounted(){Ts.a.configure({showSpinner:!1}),this.$router.beforeEach((t,e,n)=>{t.path===e.path||tr.component(t.name)||Ts.a.start(),n()}),this.$router.afterEach(()=>{Ts.a.done(),this.isSidebarOpen=!1})}},Ms={props:{parent:Object,code:String,options:{align:String,color:String,backgroundTransition:Boolean,backgroundColor:String,successText:String,staticIcon:Boolean}},data:()=>({success:!1,originalBackground:null,originalTransition:null}),computed:{alignStyle(){let t={};return t[this.options.align]="7.5px",t},iconClass(){return this.options.staticIcon?"":"hover"}},mounted(){this.originalTransition=this.parent.style.transition,this.originalBackground=this.parent.style.background},beforeDestroy(){this.parent.style.transition=this.originalTransition,this.parent.style.background=this.originalBackground},methods:{hexToRgb(t){let e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null},copyToClipboard(t){if(navigator.clipboard)navigator.clipboard.writeText(this.code).then(()=>{this.setSuccessTransitions()},()=>{});else{let t=document.createElement("textarea");document.body.appendChild(t),t.value=this.code,t.select(),document.execCommand("Copy"),t.remove(),this.setSuccessTransitions()}},setSuccessTransitions(){if(clearTimeout(this.successTimeout),this.options.backgroundTransition){this.parent.style.transition="background 350ms";let t=this.hexToRgb(this.options.backgroundColor);this.parent.style.background=`rgba(${t.r}, ${t.g}, ${t.b}, 0.1)`}this.success=!0,this.successTimeout=setTimeout(()=>{this.options.backgroundTransition&&(this.parent.style.background=this.originalBackground,this.parent.style.transition=this.originalTransition),this.success=!1},500)}}},Ds=(n(237),n(10)),Rs=Object(Ds.a)(Ms,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"code-copy"},[e("svg",{class:t.iconClass,style:t.alignStyle,attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},on:{click:t.copyToClipboard}},[e("path",{attrs:{fill:"none",d:"M0 0h24v24H0z"}}),t._v(" "),e("path",{attrs:{fill:t.options.color,d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}})]),t._v(" "),e("span",{class:t.success?"success":"",style:t.alignStyle},[t._v("\n "+t._s(t.options.successText)+"\n ")])])}),[],!1,null,"49140617",null).exports,Is=(n(238),[Cs,Ps,Ls,{updated(){this.update()},methods:{update(){setTimeout(()=>{document.querySelectorAll('div[class*="language-"] pre').forEach(t=>{if(t.classList.contains("code-copy-added"))return;let e=new(tr.extend(Rs));e.options={align:"bottom",color:"#27b1ff",backgroundTransition:!0,backgroundColor:"#0075b8",successText:"Copied!",staticIcon:!1},e.code=t.innerText,e.parent=t,e.$mount(),t.classList.add("code-copy-added"),t.appendChild(e.$el)})},100)}}}]),Fs={name:"GlobalLayout",computed:{layout(){const t=this.getLayout();return bs("layout",t),tr.component(t)}},methods:{getLayout(){if(this.$page.path){const t=this.$page.frontmatter.layout;return t&&(this.$vuepress.getLayoutAsyncComponent(t)||this.$vuepress.getVueComponent(t))?t:"Layout"}return"NotFound"}}},Ns=Object(Ds.a)(Fs,(function(){return(0,this._self._c)(this.layout,{tag:"component"})}),[],!1,null,null,null).exports;!function(t,e,n){switch(e){case"components":t[e]||(t[e]={}),Object.assign(t[e],n);break;case"mixins":t[e]||(t[e]=[]),t[e].push(...n);break;default:throw new Error("Unknown option name.")}}(Ns,"mixins",Is);const Us=[{name:"v-5e1e685a",path:"/docs/arfs/content-types.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-5e1e685a").then(n)}},{name:"v-c97ca880",path:"/docs/arfs/data-model.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-c97ca880").then(n)}},{name:"v-0d609624",path:"/docs/arfs/entity-types.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-0d609624").then(n)}},{name:"v-4f037d1a",path:"/docs/arfs/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-4f037d1a").then(n)}},{path:"/docs/arfs/index.html",redirect:"/docs/arfs/"},{path:"/docs/arfs/overview.html",redirect:"/docs/arfs/"},{name:"v-18d0587a",path:"/docs/arfs/privacy.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-18d0587a").then(n)}},{name:"v-3120da0c",path:"/docs/arfs/schema-diagrams.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-3120da0c").then(n)}},{name:"v-2f7f848c",path:"/docs/arfs/usage/change/drives.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-2f7f848c").then(n)}},{name:"v-2eaf1140",path:"/docs/arfs/usage/change/files.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-2eaf1140").then(n)}},{name:"v-18c2b964",path:"/docs/arfs/usage/change/folders.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-18c2b964").then(n)}},{name:"v-09d6f550",path:"/docs/arfs/usage/change/snapshots.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-09d6f550").then(n)}},{name:"v-9356a30c",path:"/docs/arfs/usage/create/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-9356a30c").then(n)}},{path:"/docs/arfs/usage/create/index.html",redirect:"/docs/arfs/usage/create/"},{path:"/docs/arfs/usage/create/create-drive.html",redirect:"/docs/arfs/usage/create/"},{name:"v-7cc0117c",path:"/docs/arfs/usage/create/create-file.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-7cc0117c").then(n)}},{name:"v-690a4650",path:"/docs/arfs/usage/create/create-folder.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-690a4650").then(n)}},{name:"v-58f7366c",path:"/docs/arfs/usage/create/create-snapshot.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-58f7366c").then(n)}},{name:"v-0877efcc",path:"/docs/arfs/usage/extending-schemas.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-0877efcc").then(n)}},{name:"v-950c4d48",path:"/docs/arfs/usage/read/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-950c4d48").then(n)}},{path:"/docs/arfs/usage/read/index.html",redirect:"/docs/arfs/usage/read/"},{path:"/docs/arfs/usage/read/read-operations.html",redirect:"/docs/arfs/usage/read/"},{name:"v-47c1f97a",path:"/docs/cli/all-commands.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-47c1f97a").then(n)}},{name:"v-4fad50ba",path:"/docs/cli/getting-help.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-4fad50ba").then(n)}},{name:"v-4fc0d1c8",path:"/docs/cli/getting-started.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-4fc0d1c8").then(n)}},{name:"v-31657474",path:"/docs/cli/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-31657474").then(n)}},{path:"/docs/cli/index.html",redirect:"/docs/cli/"},{path:"/docs/cli/intro.html",redirect:"/docs/cli/"},{name:"v-e2784654",path:"/docs/cli/using-the-cli.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-e2784654").then(n)}},{name:"v-0c3bd15a",path:"/docs/core-sdk.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-0c3bd15a").then(n)}},{name:"v-074d53cc",path:"/docs/misc/deploy/examples.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-074d53cc").then(n)}},{name:"v-0d650648",path:"/docs/misc/deploy/paths.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-0d650648").then(n)}},{name:"v-3e6ef1ac",path:"/docs/misc/deploy/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-3e6ef1ac").then(n)}},{path:"/docs/misc/deploy/index.html",redirect:"/docs/misc/deploy/"},{path:"/docs/misc/deploy/prepare.html",redirect:"/docs/misc/deploy/"},{name:"v-6dd912ec",path:"/docs/misc/deploy/routing.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-6dd912ec").then(n)}},{name:"v-a6e64848",path:"/docs/misc/price-calculator.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-a6e64848").then(n)}},{name:"v-35b0f3b1",path:"/docs/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-35b0f3b1").then(n)}},{path:"/docs/index.html",redirect:"/docs/"},{name:"v-e65ea9a4",path:"/docs/turbo/api/payment.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-e65ea9a4").then(n)}},{name:"v-57c590fa",path:"/docs/turbo/api/upload.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-57c590fa").then(n)}},{name:"v-d297eaa6",path:"/docs/turbo/turbo-sdk/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-d297eaa6").then(n)}},{path:"/docs/turbo/turbo-sdk/index.html",redirect:"/docs/turbo/turbo-sdk/"},{name:"v-5d3101c8",path:"/docs/turbo/what-is-turbo.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-5d3101c8").then(n)}},{name:"v-501d8193",path:"/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-501d8193").then(n)}},{path:"/index.html",redirect:"/"},{name:"v-84e0b14c",path:"/docs/misc/deploy/deploy.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-84e0b14c").then(n)}},{path:"*",component:Ns}],Vs={title:"ArDrive Docs",description:"ArDrive documentation",base:"/",headTags:[["meta",{property:"og:image",content:"https://docs.ardrive.io/images/card-image.png"}],["meta",{name:"theme-color",content:"#3eaf7c"}],["meta",{name:"apple-mobile-web-app-capable",content:"yes"}],["meta",{name:"apple-mobile-web-app-status-bar-style",content:"black"}],["script",{src:"https://plausible.io/js/script.js",defer:!0,"data-domain":"docs.ardrive.io"}]],pages:[{title:"Content Types",frontmatter:{},regularPath:"/docs/arfs/content-types.html",relativePath:"docs/arfs/content-types.md",key:"v-5e1e685a",path:"/docs/arfs/content-types.html",headers:[{level:2,title:"Other Tags",slug:"other-tags"}]},{title:"Data Model",frontmatter:{},regularPath:"/docs/arfs/data-model.html",relativePath:"docs/arfs/data-model.md",key:"v-c97ca880",path:"/docs/arfs/data-model.html",headers:[{level:2,title:"Entity relationships",slug:"entity-relationships"},{level:2,title:"Metadata Format",slug:"metadata-format"}]},{title:"Entity Types",frontmatter:{},regularPath:"/docs/arfs/entity-types.html",relativePath:"docs/arfs/entity-types.md",key:"v-0d609624",path:"/docs/arfs/entity-types.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Drive",slug:"drive"},{level:2,title:"Folder",slug:"folder"},{level:2,title:"File",slug:"file"},{level:2,title:"Snapshot",slug:"snapshot"},{level:3,title:"Snapshot Entity Tags",slug:"snapshot-entity-tags"},{level:3,title:"Snapshot Entity Data",slug:"snapshot-entity-data"},{level:2,title:"Schema Diagrams",slug:"schema-diagrams"},{level:3,title:"Public Drive",slug:"public-drive"},{level:3,title:"Private Drive",slug:"private-drive"}]},{title:"ArFS Protocol: A Decentralized File System on Arweave",frontmatter:{permalink:"/docs/arfs/"},regularPath:"/docs/arfs/overview.html",relativePath:"docs/arfs/overview.md",key:"v-4f037d1a",path:"/docs/arfs/",headers:[{level:2,title:"Key Features",slug:"key-features"},{level:3,title:"File Structure",slug:"file-structure"},{level:3,title:"Metadata",slug:"metadata"},{level:3,title:"File Permissions",slug:"file-permissions"},{level:3,title:"File Versioning",slug:"file-versioning"},{level:3,title:"Data Deduplication",slug:"data-deduplication"},{level:3,title:"Search and Discovery",slug:"search-and-discovery"},{level:3,title:"Interoperability",slug:"interoperability"},{level:2,title:"Getting Started",slug:"getting-started"},{level:2,title:"ArFS Version History",slug:"arfs-version-history"},{level:2,title:"Resources",slug:"resources"}]},{title:"Privacy",frontmatter:{},regularPath:"/docs/arfs/privacy.html",relativePath:"docs/arfs/privacy.md",key:"v-18d0587a",path:"/docs/arfs/privacy.html",headers:[{level:2,title:"Deriving Keys",slug:"deriving-keys"},{level:2,title:"Private Drives",slug:"private-drives"},{level:2,title:"Private Files",slug:"private-files"}]},{title:"Schema Diagrams",frontmatter:{},regularPath:"/docs/arfs/schema-diagrams.html",relativePath:"docs/arfs/schema-diagrams.md",key:"v-3120da0c",path:"/docs/arfs/schema-diagrams.html",headers:[{level:2,title:"Schema Diagrams",slug:"schema-diagrams"},{level:3,title:"Public Drive",slug:"public-drive"},{level:3,title:"Private Drive",slug:"private-drive"}]},{title:"Drive Write Operations",frontmatter:{},regularPath:"/docs/arfs/usage/change/drives.html",relativePath:"docs/arfs/usage/change/drives.md",key:"v-2f7f848c",path:"/docs/arfs/usage/change/drives.html",headers:[{level:2,title:"Rename Drives",slug:"rename-drives"}]},{title:"File Write Operations",frontmatter:{},regularPath:"/docs/arfs/usage/change/files.html",relativePath:"docs/arfs/usage/change/files.md",key:"v-2eaf1140",path:"/docs/arfs/usage/change/files.html",headers:[{level:2,title:"Move File",slug:"move-file"},{level:2,title:"Rename File",slug:"rename-file"},{level:2,title:"Update File Version",slug:"update-file-version"}]},{title:"Folder Write Operations",frontmatter:{},regularPath:"/docs/arfs/usage/change/folders.html",relativePath:"docs/arfs/usage/change/folders.md",key:"v-18c2b964",path:"/docs/arfs/usage/change/folders.html",headers:[{level:2,title:"Move Folder",slug:"move-folder"},{level:2,title:"Rename Folder",slug:"rename-folder"}]},{frontmatter:{},regularPath:"/docs/arfs/usage/change/snapshots.html",relativePath:"docs/arfs/usage/change/snapshots.md",key:"v-09d6f550",path:"/docs/arfs/usage/change/snapshots.html"},{title:"Create Drive",frontmatter:{permalink:"/docs/arfs/usage/create/"},regularPath:"/docs/arfs/usage/create/create-drive.html",relativePath:"docs/arfs/usage/create/create-drive.md",key:"v-9356a30c",path:"/docs/arfs/usage/create/",headers:[{level:2,title:"New Drive Entity",slug:"new-drive-entity"},{level:2,title:"New Root Folder Entity",slug:"new-root-folder-entity"}]},{title:"Create File",frontmatter:{},regularPath:"/docs/arfs/usage/create/create-file.html",relativePath:"docs/arfs/usage/create/create-file.md",key:"v-7cc0117c",path:"/docs/arfs/usage/create/create-file.html",headers:[{level:2,title:"New File Entity",slug:"new-file-entity"}]},{title:"Create Folder",frontmatter:{},regularPath:"/docs/arfs/usage/create/create-folder.html",relativePath:"docs/arfs/usage/create/create-folder.md",key:"v-690a4650",path:"/docs/arfs/usage/create/create-folder.html",headers:[{level:2,title:"New Folder Entity",slug:"new-folder-entity"}]},{frontmatter:{},regularPath:"/docs/arfs/usage/create/create-snapshot.html",relativePath:"docs/arfs/usage/create/create-snapshot.md",key:"v-58f7366c",path:"/docs/arfs/usage/create/create-snapshot.html"},{title:"Extending Schemas",frontmatter:{next:!1},regularPath:"/docs/arfs/usage/extending-schemas.html",relativePath:"docs/arfs/usage/extending-schemas.md",key:"v-0877efcc",path:"/docs/arfs/usage/extending-schemas.html",headers:[{level:2,title:"Extending Schemas",slug:"extending-schemas"}]},{title:"Read ArFS Data",frontmatter:{permalink:"/docs/arfs/usage/read/"},regularPath:"/docs/arfs/usage/read/read-operations.html",relativePath:"docs/arfs/usage/read/read-operations.md",key:"v-950c4d48",path:"/docs/arfs/usage/read/",headers:[{level:2,title:"Folder/File Paths",slug:"folder-file-paths"},{level:2,title:"Folder View Queries",slug:"folder-view-queries"}]},{title:"All ArDrive CLI Commands",frontmatter:{},regularPath:"/docs/cli/all-commands.html",relativePath:"docs/cli/all-commands.md",key:"v-47c1f97a",path:"/docs/cli/all-commands.html"},{title:"Getting Help",frontmatter:{},regularPath:"/docs/cli/getting-help.html",relativePath:"docs/cli/getting-help.md",key:"v-4fad50ba",path:"/docs/cli/getting-help.html"},{title:"Getting Started",frontmatter:{},regularPath:"/docs/cli/getting-started.html",relativePath:"docs/cli/getting-started.md",key:"v-4fc0d1c8",path:"/docs/cli/getting-started.html",headers:[{level:2,title:"Prerequisites",slug:"prerequisites"},{level:3,title:"Git",slug:"git"},{level:3,title:"NVM (Optional - Recommended)",slug:"nvm-optional-recommended"},{level:2,title:"Quick Start",slug:"quick-start"},{level:3,title:"Installing and Starting the CLI From NPM Package",slug:"installing-and-starting-the-cli-from-npm-package"},{level:3,title:"Upgrading to the Latest Version",slug:"upgrading-to-the-latest-version"},{level:2,title:"Build and Run from Source",slug:"build-and-run-from-source"},{level:3,title:"Install Yarn 3",slug:"install-yarn-3"},{level:3,title:"Husky (Developers Only)",slug:"husky-developers-only"},{level:3,title:"Using a custom ArDrive-Core-JS (Optional)",slug:"using-a-custom-ardrive-core-js-optional"},{level:3,title:"Installing and Starting the CLI From Source",slug:"installing-and-starting-the-cli-from-source"},{level:3,title:"Recommended Visual Studio Code extensions (Developers Only)",slug:"recommended-visual-studio-code-extensions-developers-only"},{level:2,title:"Limitations",slug:"limitations"}]},{title:"CLI",frontmatter:{homepage:!0,permalink:"/docs/cli/"},regularPath:"/docs/cli/intro.html",relativePath:"docs/cli/intro.md",key:"v-31657474",path:"/docs/cli/",headers:[{level:2,title:"ArFS",slug:"arfs"},{level:2,title:"Data Portability",slug:"data-portability"},{level:2,title:"Intended Audience",slug:"intended-audience"}]},{title:"Using the CLI",frontmatter:{sidebarDepth:1},regularPath:"/docs/cli/using-the-cli.html",relativePath:"docs/cli/using-the-cli.md",key:"v-e2784654",path:"/docs/cli/using-the-cli.html",headers:[{level:2,title:"CLI Help",slug:"cli-help"},{level:2,title:"CLI Version",slug:"cli-version"},{level:2,title:"Wallet Operations",slug:"wallet-operations"},{level:2,title:"Working With Entities",slug:"working-with-entities"},{level:3,title:"Dry Run",slug:"dry-run"},{level:3,title:"Uploading to Turbo (BETA)",slug:"uploading-to-turbo-beta"},{level:2,title:"Working With Drives",slug:"working-with-drives"},{level:3,title:"Understanding Drive Hierarchies",slug:"understanding-drive-hierarchies"},{level:3,title:"Understanding Drive and File Keys",slug:"understanding-drive-and-file-keys"},{level:3,title:"Managing Drive Passwords",slug:"managing-drive-passwords"},{level:3,title:"Creating Drives",slug:"creating-drives"},{level:3,title:"Listing Drives for an Address",slug:"listing-drives-for-an-address"},{level:3,title:"Listing Every Entity in a Drive",slug:"listing-every-entity-in-a-drive"},{level:3,title:"List Drive Pipeline Examples",slug:"list-drive-pipeline-examples"},{level:2,title:"Working With Folders",slug:"working-with-folders"},{level:3,title:"Creating Folders",slug:"creating-folders"},{level:3,title:"Moving Folders",slug:"moving-folders"},{level:3,title:"Renaming Folders",slug:"renaming-folders"},{level:3,title:"Viewing Folder Metadata",slug:"viewing-folder-metadata"},{level:3,title:"Listing Contents of a Folder",slug:"listing-contents-of-a-folder"},{level:2,title:"Working With Files",slug:"working-with-files"},{level:3,title:"Uploading a Single File",slug:"uploading-a-single-file"},{level:3,title:"IPFS CID Tagging",slug:"ipfs-cid-tagging"},{level:3,title:"Progress Logging of Transaction Uploads",slug:"progress-logging-of-transaction-uploads"},{level:3,title:"Download a Single file (BETA)",slug:"download-a-single-file-beta"},{level:3,title:"Rename a Single File",slug:"rename-a-single-file"},{level:3,title:"Uploading a Folder with Files (Bulk Upload)",slug:"uploading-a-folder-with-files-bulk-upload"},{level:3,title:"Downloading a Folder with Files",slug:"downloading-a-folder-with-files"},{level:3,title:"Downloading a Drive",slug:"downloading-a-drive"},{level:3,title:"Uploading Multiple Files",slug:"uploading-multiple-files"},{level:3,title:"Name Conflict Resolution on Upload",slug:"name-conflict-resolution-on-upload"},{level:3,title:"Understanding Bundled Transactions",slug:"understanding-bundled-transactions"},{level:3,title:"Uploading a Non-Bundled Transaction (NOT RECOMMENDED)",slug:"uploading-a-non-bundled-transaction-not-recommended"},{level:3,title:"Fetching the Metadata of a File Entity",slug:"fetching-the-metadata-of-a-file-entity"},{level:3,title:"Retrying a Failed File Data Transaction (Public Unbundled Files Only)",slug:"retrying-a-failed-file-data-transaction-public-unbundled-files-only"},{level:3,title:"Moving Files",slug:"moving-files"},{level:3,title:"Uploading Manifests",slug:"uploading-manifests"},{level:3,title:"Uploading With a Custom Content Type",slug:"uploading-with-a-custom-content-type"},{level:3,title:"Uploading From a Remote URL",slug:"uploading-from-a-remote-url"},{level:3,title:"Uploading a Custom Manifest",slug:"uploading-a-custom-manifest"},{level:3,title:"Uploading Files with Custom MetaData",slug:"uploading-files-with-custom-metadata"},{level:2,title:"Other Utility Operations",slug:"other-utility-operations"},{level:3,title:"Monitoring Transactions",slug:"monitoring-transactions"},{level:3,title:"Dealing With Network Congestion",slug:"dealing-with-network-congestion"},{level:3,title:"Using a Custom Arweave Gateway",slug:"using-a-custom-arweave-gateway"},{level:3,title:"Persistent Caching of ArFS Entity Metadata",slug:"persistent-caching-of-arfs-entity-metadata"}]},{title:"Overview",frontmatter:{},regularPath:"/docs/core-sdk.html",relativePath:"docs/core-sdk.md",key:"v-0c3bd15a",path:"/docs/core-sdk.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Integrating with ArDrive Core",slug:"integrating-with-ardrive-core"},{level:2,title:"Development Environment Setup",slug:"development-environment-setup"},{level:3,title:"Recommended Visual Studio Code extensions",slug:"recommended-visual-studio-code-extensions"},{level:2,title:"Building the Library",slug:"building-the-library"},{level:2,title:"Testing the Library",slug:"testing-the-library"},{level:3,title:"Coverage",slug:"coverage"},{level:3,title:"Adding tests",slug:"adding-tests"},{level:3,title:"Using Sinon",slug:"using-sinon"},{level:3,title:"Debugging with Power-Assert",slug:"debugging-with-power-assert"},{level:3,title:"Progress Logging of Transaction Uploads",slug:"progress-logging-of-transaction-uploads"},{level:3,title:"Persistent Caching of ArFS Entity Metadata",slug:"persistent-caching-of-arfs-entity-metadata"},{level:3,title:"Applying Custom MetaData to ArFS File Transactions",slug:"applying-custom-metadata-to-arfs-file-transactions"}]},{title:"Examples",frontmatter:{},regularPath:"/docs/misc/deploy/examples.html",relativePath:"docs/misc/deploy/examples.md",key:"v-074d53cc",path:"/docs/misc/deploy/examples.html",headers:[{level:2,title:"Basic HTML",slug:"basic-html"},{level:2,title:"React",slug:"react"},{level:2,title:"Next",slug:"next"}]},{title:"File Paths",frontmatter:{},regularPath:"/docs/misc/deploy/paths.html",relativePath:"docs/misc/deploy/paths.md",key:"v-0d650648",path:"/docs/misc/deploy/paths.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Absolute Vs. Relative",slug:"absolute-vs-relative"},{level:2,title:"Why Relative Paths",slug:"why-relative-paths"},{level:2,title:"Identifying Relative and Absolute Paths",slug:"identifying-relative-and-absolute-paths"},{level:2,title:"Navigating with Relative Paths",slug:"navigating-with-relative-paths"}]},{title:"Preparing Your dApp",frontmatter:{prev:!1,permalink:"/docs/misc/deploy/"},regularPath:"/docs/misc/deploy/prepare.html",relativePath:"docs/misc/deploy/prepare.md",key:"v-3e6ef1ac",path:"/docs/misc/deploy/"},{title:"Hash Routing",frontmatter:{},regularPath:"/docs/misc/deploy/routing.html",relativePath:"docs/misc/deploy/routing.md",key:"v-6dd912ec",path:"/docs/misc/deploy/routing.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Hash Routing Vs. History Routing",slug:"hash-routing-vs-history-routing"},{level:2,title:"Why Hash Routing for dApps",slug:"why-hash-routing-for-dapps"}]},{title:"ArDrive Price Calculator",frontmatter:{prev:!1,next:!1},regularPath:"/docs/misc/price-calculator.html",relativePath:"docs/misc/price-calculator.md",key:"v-a6e64848",path:"/docs/misc/price-calculator.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Developer Setup",slug:"developer-setup"},{level:3,title:"Install Yarn 2",slug:"install-yarn-2"},{level:3,title:"NVM",slug:"nvm"},{level:3,title:"Recommended Visual Studio Code extensions",slug:"recommended-visual-studio-code-extensions"},{level:2,title:"Available Scripts",slug:"available-scripts"},{level:3,title:"yarn start",slug:"yarn-start"},{level:3,title:"yarn build",slug:"yarn-build"},{level:3,title:"yarn test",slug:"yarn-test"},{level:3,title:"yarn run:prod",slug:"yarn-run-prod"}]},{title:"placeholder",frontmatter:{},regularPath:"/docs/",relativePath:"docs/readme.md",key:"v-35b0f3b1",path:"/docs/"},{title:"Payment API",frontmatter:{},regularPath:"/docs/turbo/api/payment.html",relativePath:"docs/turbo/api/payment.md",key:"v-e65ea9a4",path:"/docs/turbo/api/payment.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Endpoints",slug:"endpoints"},{level:3,title:"Get Amount of Credits for Byte Count",slug:"get-amount-of-credits-for-byte-count"},{level:3,title:"Get winc for Payment Type and Amount",slug:"get-winc-for-payment-type-and-amount"},{level:3,title:"Get Current Balance of winc",slug:"get-current-balance-of-winc"},{level:3,title:"Get Quote for Credits",slug:"get-quote-for-credits"},{level:3,title:"Get Supported Currencies",slug:"get-supported-currencies"},{level:3,title:"Get Supported Countries",slug:"get-supported-countries"},{level:3,title:"Get Conversion Rates",slug:"get-conversion-rates"}]},{title:"Upload API",frontmatter:{next:!1},regularPath:"/docs/turbo/api/upload.html",relativePath:"docs/turbo/api/upload.md",key:"v-57c590fa",path:"/docs/turbo/api/upload.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Endpoint",slug:"endpoint"},{level:2,title:"Schema",slug:"schema"},{level:3,title:"Headers",slug:"headers"},{level:3,title:"Body",slug:"body"},{level:3,title:"Response",slug:"response"}]},{title:"@ardriveapp/turbo-sdk 🚀",frontmatter:{},regularPath:"/docs/turbo/turbo-sdk/",relativePath:"docs/turbo/turbo-sdk/index.md",key:"v-d297eaa6",path:"/docs/turbo/turbo-sdk/",headers:[{level:2,title:"Installation",slug:"installation"},{level:2,title:"Quick Start",slug:"quick-start"},{level:2,title:"Usage",slug:"usage"},{level:3,title:"Web",slug:"web"},{level:3,title:"NodeJS",slug:"nodejs"},{level:3,title:"Typescript",slug:"typescript"},{level:2,title:"APIs",slug:"apis"},{level:3,title:"TurboFactory",slug:"turbofactory"},{level:3,title:"TurboUnauthenticatedClient",slug:"turbounauthenticatedclient"},{level:3,title:"TurboAuthenticatedClient",slug:"turboauthenticatedclient"},{level:2,title:"Contributions",slug:"contributions"}]},{title:"What Is Turbo?",frontmatter:{prev:!1},regularPath:"/docs/turbo/what-is-turbo.html",relativePath:"docs/turbo/what-is-turbo.md",key:"v-5d3101c8",path:"/docs/turbo/what-is-turbo.html"},{title:"About ArDrive",frontmatter:{homepage:!0},regularPath:"/",relativePath:"index.md",key:"v-501d8193",path:"/",headers:[{level:2,title:"Control Your Own Data",slug:"control-your-own-data"},{level:3,title:"True Data Ownership",slug:"true-data-ownership"},{level:3,title:"No More Lost Data",slug:"no-more-lost-data"},{level:3,title:"Decentralized Network",slug:"decentralized-network"},{level:3,title:"Community Owned",slug:"community-owned"},{level:2,title:"How can Ardrive Help You?",slug:"how-can-ardrive-help-you"},{level:3,title:"Store Family Memories Forever",slug:"store-family-memories-forever"},{level:3,title:"Permanence",slug:"permanence"},{level:3,title:"Totally Private or Totally Public",slug:"totally-private-or-totally-public"},{level:3,title:"Eliminate Subscription Fees",slug:"eliminate-subscription-fees"},{level:3,title:"Control Your Data",slug:"control-your-data"},{level:3,title:"Perfect Record Keeping",slug:"perfect-record-keeping"},{level:3,title:"Durable NFTs",slug:"durable-nfts"},{level:3,title:"Archive the Web",slug:"archive-the-web"}]},{title:"Deploying your dApp",frontmatter:{},regularPath:"/docs/misc/deploy/deploy.html",relativePath:"docs/misc/deploy/deploy.md",key:"v-84e0b14c",path:"/docs/misc/deploy/deploy.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Deploying",slug:"deploying"},{level:3,title:"Step 1: Log into ArDrive",slug:"step-1-log-into-ardrive"},{level:3,title:"Step 2: Select or Create a Drive",slug:"step-2-select-or-create-a-drive"},{level:3,title:"Step 3: Upload your project",slug:"step-3-upload-your-project"},{level:3,title:"Step 4: Confirm Upload",slug:"step-4-confirm-upload"},{level:3,title:"Step 5: Create the Manifest",slug:"step-5-create-the-manifest"},{level:3,title:"Step 6: Get the Data TX ID",slug:"step-6-get-the-data-tx-id"},{level:3,title:"Step 7: View and Share your dApp",slug:"step-7-view-and-share-your-dapp"},{level:2,title:"Updating your dApp",slug:"updating-your-dapp"}]}],themeConfig:{searchPlaceholder:"Search",repo:"",editLinks:!1,docsDir:"",editLinkText:"",lastUpdated:!1,initialOpenGroupIndex:-1,logo:"/images/ArDrive-Logo.png",sidebar:{"/":[{title:"Core-js",path:"/docs/core-sdk"},{title:"CLI",initialOpenGroupIndex:-1,collapsable:!0,children:[{title:"Overview",path:"/docs/cli/intro"},{title:"Getting Started",path:"/docs/cli/getting-started"},{title:"Using the CLI",path:"/docs/cli/using-the-cli"},{title:"All Commands",path:"/docs/cli/all-commands"},{title:"Help",path:"/docs/cli/getting-help"}]},{title:"ArFS",initialOpenGroupIndex:-1,children:[{title:"Overview",path:"/docs/arfs/overview"},{title:"Data Model",path:"/docs/arfs/data-model"},{title:"Entity Types",path:"/docs/arfs/entity-types"},{title:"Schema Diagrams",path:"/docs/arfs/schema-diagrams"},{title:"Content Types",path:"/docs/arfs/content-types"},{title:"Privacy",path:"/docs/arfs/privacy"},{title:"Usage",children:[{title:"Create",children:[{title:"Create Drive",path:"/docs/arfs/usage/create/create-drive"},{title:"Create Folder",path:"/docs/arfs/usage/create/create-folder"},{title:"Create File",path:"/docs/arfs/usage/create/create-file"}]},{title:"Modify",children:[{title:"Modify Drives",path:"/docs/arfs/usage/change/drives"},{title:"Modify Folders",path:"/docs/arfs/usage/change/folders"},{title:"Modify Files",path:"/docs/arfs/usage/change/files"}]},{title:"Read",path:"/docs/arfs/usage/read/read-operations"},{title:"Extending Schemas",path:"/docs/arfs/usage/extending-schemas"}]}]},{title:"Turbo",sidebarDepth:2,children:[{title:"What is Turbo?",path:"/docs/turbo/what-is-turbo"},{title:"Payment API",path:"/docs/turbo/api/payment"},{title:"Upload API",path:"/docs/turbo/api/upload"},{title:"Turbo SDK",path:"/docs/turbo/turbo-sdk/"}]},{title:"Misc.",children:[{title:"Price Calculator",path:"/docs/misc/price-calculator"},{title:"How to Deploy a dApp",children:[{title:"Preparing your dApp",path:"/docs/misc/deploy/prepare"},{title:"Hash Routing",path:"/docs/misc/deploy/routing"},{title:"Relative File Paths",path:"/docs/misc/deploy/paths"},{title:"How to Deploy",path:"/docs/misc/deploy/deploy"},{title:"Examples",path:"/docs/misc/deploy/examples"}]}]}]}}};function Bs(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}}const zs="function"==typeof Proxy;let Hs,Ws;function qs(){return void 0!==Hs||("undefined"!=typeof window&&window.performance?(Hs=!0,Ws=window.performance):"undefined"!=typeof global&&(null===(t=global.perf_hooks)||void 0===t?void 0:t.performance)?(Hs=!0,Ws=global.perf_hooks.performance):Hs=!1),Hs?Ws.now():Date.now();var t}class Gs{constructor(t,e){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=e;const n={};if(t.settings)for(const e in t.settings){const r=t.settings[e];n[e]=r.defaultValue}const r="__vue-devtools-plugin-settings__"+t.id;let o=Object.assign({},n);try{const t=localStorage.getItem(r),e=JSON.parse(t);Object.assign(o,e)}catch(t){}this.fallbacks={getSettings:()=>o,setSettings(t){try{localStorage.setItem(r,JSON.stringify(t))}catch(t){}o=t},now:()=>qs()},e&&e.on("plugin:settings:set",(t,e)=>{t===this.plugin.id&&this.fallbacks.setSettings(e)}),this.proxiedOn=new Proxy({},{get:(t,e)=>this.target?this.target.on[e]:(...t)=>{this.onQueue.push({method:e,args:t})}}),this.proxiedTarget=new Proxy({},{get:(t,e)=>this.target?this.target[e]:"on"===e?this.proxiedOn:Object.keys(this.fallbacks).includes(e)?(...t)=>(this.targetQueue.push({method:e,args:t,resolve:()=>{}}),this.fallbacks[e](...t)):(...t)=>new Promise(n=>{this.targetQueue.push({method:e,args:t,resolve:n})})})}async setRealTarget(t){this.target=t;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function Ks(t,e){const n=t,r=Bs(),o=Bs().__VUE_DEVTOOLS_GLOBAL_HOOK__,i=zs&&n.enableEarlyProxy;if(!o||!r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&i){const t=i?new Gs(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:e,proxy:t}),t&&e(t.proxiedTarget)}else o.emit("devtools-plugin:setup",t,e)} +var r=Object.freeze({}),o=Array.isArray;function i(t){return null==t}function a(t){return null!=t}function s(t){return!0===t}function c(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function u(t){return"function"==typeof t}function l(t){return null!==t&&"object"==typeof t}var f=Object.prototype.toString;function p(t){return"[object Object]"===f.call(t)}function d(t){return"[object RegExp]"===f.call(t)}function h(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function v(t){return a(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function g(t){return null==t?"":Array.isArray(t)||p(t)&&t.toString===f?JSON.stringify(t,null,2):String(t)}function m(t){var e=parseFloat(t);return isNaN(e)?t:e}function y(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(r,1)}}var w=Object.prototype.hasOwnProperty;function x(t,e){return w.call(t,e)}function O(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var C=/-(\w)/g,k=O((function(t){return t.replace(C,(function(t,e){return e?e.toUpperCase():""}))})),S=O((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),j=/\B([A-Z])/g,$=O((function(t){return t.replace(j,"-$1").toLowerCase()}));var E=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function P(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function A(t,e){for(var n in e)t[n]=e[n];return t}function T(t){for(var e={},n=0;n0,X=Q&&Q.indexOf("edge/")>0;Q&&Q.indexOf("android");var Z=Q&&/iphone|ipad|ipod|ios/.test(Q);Q&&/chrome\/\d+/.test(Q),Q&&/phantomjs/.test(Q);var tt,et=Q&&Q.match(/firefox\/(\d+)/),nt={}.watch,rt=!1;if(K)try{var ot={};Object.defineProperty(ot,"passive",{get:function(){rt=!0}}),window.addEventListener("test-passive",null,ot)}catch(t){}var it=function(){return void 0===tt&&(tt=!K&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),tt},at=K&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function st(t){return"function"==typeof t&&/native code/.test(t.toString())}var ct,ut="undefined"!=typeof Symbol&&st(Symbol)&&"undefined"!=typeof Reflect&&st(Reflect.ownKeys);ct="undefined"!=typeof Set&&st(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var lt=null;function ft(t){void 0===t&&(t=null),t||lt&<._scope.off(),lt=t,t&&t._scope.on()}var pt=function(){function t(t,e,n,r,o,i,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),dt=function(t){void 0===t&&(t="");var e=new pt;return e.text=t,e.isComment=!0,e};function ht(t){return new pt(void 0,void 0,void 0,String(t))}function vt(t){var e=new pt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var gt=0,mt=[],yt=function(){function t(){this._pending=!1,this.id=gt++,this.subs=[]}return t.prototype.addSub=function(t){this.subs.push(t)},t.prototype.removeSub=function(t){this.subs[this.subs.indexOf(t)]=null,this._pending||(this._pending=!0,mt.push(this))},t.prototype.depend=function(e){t.target&&t.target.addDep(this)},t.prototype.notify=function(t){var e=this.subs.filter((function(t){return t}));for(var n=0,r=e.length;n0&&(re((u=t(u,"".concat(n||"","_").concat(r)))[0])&&re(f)&&(p[l]=ht(f.text+u[0].text),u.shift()),p.push.apply(p,u)):c(u)?re(f)?p[l]=ht(f.text+u):""!==u&&p.push(ht(u)):re(u)&&re(f)?p[l]=ht(f.text+u.text):(s(e._isVList)&&a(u.tag)&&i(u.key)&&a(n)&&(u.key="__vlist".concat(n,"_").concat(r,"__")),p.push(u)));return p}(t):void 0}function re(t){return a(t)&&a(t.text)&&!1===t.isComment}function oe(t,e){var n,r,i,s,c=null;if(o(t)||"string"==typeof t)for(c=new Array(t.length),n=0,r=t.length;n0,s=e?!!e.$stable:!a,c=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(s&&o&&o!==r&&c===o.$key&&!a&&!o.$hasNormal)return o;for(var u in i={},e)e[u]&&"$"!==u[0]&&(i[u]=Oe(t,n,u,e[u]))}else i={};for(var l in n)l in i||(i[l]=Ce(n,l));return e&&Object.isExtensible(e)&&(e._normalized=i),W(i,"$stable",s),W(i,"$key",c),W(i,"$hasNormal",a),i}function Oe(t,e,n,r){var i=function(){var e=lt;ft(t);var n=arguments.length?r.apply(null,arguments):r({}),i=(n=n&&"object"==typeof n&&!o(n)?[n]:ne(n))&&n[0];return ft(e),n&&(!i||1===n.length&&i.isComment&&!we(i))?void 0:n};return r.proxy&&Object.defineProperty(e,n,{get:i,enumerable:!0,configurable:!0}),i}function Ce(t,e){return function(){return t[e]}}function ke(t){return{get attrs(){if(!t._attrsProxy){var e=t._attrsProxy={};W(e,"_v_attr_proxy",!0),Se(e,t.$attrs,r,t,"$attrs")}return t._attrsProxy},get listeners(){t._listenersProxy||Se(t._listenersProxy={},t.$listeners,r,t,"$listeners");return t._listenersProxy},get slots(){return function(t){t._slotsProxy||$e(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(t)},emit:E(t.$emit,t),expose:function(e){e&&Object.keys(e).forEach((function(n){return Vt(t,e,n)}))}}}function Se(t,e,n,r,o){var i=!1;for(var a in e)a in t?e[a]!==n[a]&&(i=!0):(i=!0,je(t,a,r,o));for(var a in t)a in e||(i=!0,delete t[a]);return i}function je(t,e,n,r){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return n[r][e]}})}function $e(t,e){for(var n in e)t[n]=e[n];for(var n in t)n in e||delete t[n]}var Ee=null;function Pe(t,e){return(t.__esModule||ut&&"Module"===t[Symbol.toStringTag])&&(t=t.default),l(t)?e.extend(t):t}function Ae(t){if(o(t))for(var e=0;edocument.createEvent("Event").timeStamp&&(gn=function(){return mn.now()})}var yn=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function bn(){var t,e;for(vn=gn(),dn=!0,un.sort(yn),hn=0;hnhn&&un[n].id>t.id;)n--;un.splice(n+1,0,t)}else un.push(t);pn||(pn=!0,qe(bn))}}function wn(t,e){if(t){for(var n=Object.create(null),r=ut?Reflect.ownKeys(t):Object.keys(t),o=0;o-1)if(i&&!x(o,"default"))a=!1;else if(""===a||a===$(t)){var c=zn(String,o.type);(c<0||s-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!d(t)&&t.test(e)}function or(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=a.name;s&&!e(s)&&ir(n,i,r,o)}}}function ir(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,_(n,e)}tr.prototype._init=function(t){var e=this;e._uid=Xn++,e._isVue=!0,e.__v_skip=!0,e._scope=new Qt(!0),e._scope._vm=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=In(Zn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&nn(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,o=n&&n.context;t.$slots=be(e._renderChildren,o),t.$scopedSlots=n?xe(t.$parent,n.data.scopedSlots,t.$slots):r,t._c=function(e,n,r,o){return Te(t,e,n,r,o,!1)},t.$createElement=function(e,n,r,o){return Te(t,e,n,r,o,!0)};var i=n&&n.data;At(t,"$attrs",i&&i.attrs||r,null,!0),At(t,"$listeners",e._parentListeners||r,null,!0)}(e),cn(e,"beforeCreate",void 0,!1),function(t){var e=wn(t.$options.inject,t);e&&(jt(!1),Object.keys(e).forEach((function(n){At(t,n,e[n])})),jt(!0))}(e),qn(e),function(t){var e=t.$options.provide;if(e){var n=u(e)?e.call(t):e;if(!l(n))return;for(var r=Jt(t),o=ut?Reflect.ownKeys(n):Object.keys(n),i=0;i1?P(n):n;for(var r=P(arguments,1),o='event handler for "'.concat(t,'"'),i=0,a=n.length;iparseInt(this.max)&&ir(t,e[0],e,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)ir(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){or(t,(function(t){return rr(e,t)}))})),this.$watch("exclude",(function(e){or(t,(function(t){return!rr(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Ae(t),n=e&&e.componentOptions;if(n){var r=nr(n),o=this.include,i=this.exclude;if(o&&(!r||!rr(o,r))||i&&r&&rr(i,r))return e;var a=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):e.key;a[c]?(e.componentInstance=a[c].componentInstance,_(s,c),s.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return B}};Object.defineProperty(t,"config",e),t.util={warn:Pn,extend:A,mergeOptions:In,defineReactive:At},t.set=Tt,t.delete=Lt,t.nextTick=qe,t.observable=function(t){return Pt(t),t},t.options=Object.create(null),U.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,A(t.options.components,sr),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=P(arguments,1);return n.unshift(this),u(t.install)?t.install.apply(t,n):u(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=In(this.options,t),this}}(t),er(t),function(t){U.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&p(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&u(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(tr),Object.defineProperty(tr.prototype,"$isServer",{get:it}),Object.defineProperty(tr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(tr,"FunctionalRenderContext",{value:xn}),tr.version="2.7.14";var cr=y("style,class"),ur=y("input,textarea,option,select,progress"),lr=y("contenteditable,draggable,spellcheck"),fr=y("events,caret,typing,plaintext-only"),pr=y("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),dr="http://www.w3.org/1999/xlink",hr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},vr=function(t){return hr(t)?t.slice(6,t.length):""},gr=function(t){return null==t||!1===t};function mr(t){for(var e=t.data,n=t,r=t;a(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=yr(r.data,e));for(;a(n=n.parent);)n&&n.data&&(e=yr(e,n.data));return function(t,e){if(a(t)||a(e))return br(t,_r(e));return""}(e.staticClass,e.class)}function yr(t,e){return{staticClass:br(t.staticClass,e.staticClass),class:a(t.class)?[t.class,e.class]:e.class}}function br(t,e){return t?e?t+" "+e:t:e||""}function _r(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,o=t.length;r-1?Hr(t,e,n):pr(e)?gr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):lr(e)?t.setAttribute(e,function(t,e){return gr(e)||"false"===e?"false":"contenteditable"===t&&fr(e)?e:"true"}(e,n)):hr(e)?gr(n)?t.removeAttributeNS(dr,vr(e)):t.setAttributeNS(dr,e,n):Hr(t,e,n)}function Hr(t,e,n){if(gr(n))t.removeAttribute(e);else{if(J&&!Y&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var Wr={create:Br,update:Br};function qr(t,e){var n=e.elm,r=e.data,o=t.data;if(!(i(r.staticClass)&&i(r.class)&&(i(o)||i(o.staticClass)&&i(o.class)))){var s=mr(e),c=n._transitionClasses;a(c)&&(s=br(s,_r(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Gr,Kr={create:qr,update:qr};function Qr(t,e,n){var r=Gr;return function o(){var i=e.apply(null,arguments);null!==i&&Xr(t,o,n,r)}}var Jr=Fe&&!(et&&Number(et[1])<=53);function Yr(t,e,n,r){if(Jr){var o=vn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Gr.addEventListener(t,e,rt?{capture:n,passive:r}:n)}function Xr(t,e,n,r){(r||Gr).removeEventListener(t,e._wrapper||e,n)}function Zr(t,e){if(!i(t.data.on)||!i(e.data.on)){var n=e.data.on||{},r=t.data.on||{};Gr=e.elm||t.elm,function(t){if(a(t.__r)){var e=J?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}a(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(n),Zt(n,r,Yr,Xr,Qr,e.context),Gr=void 0}}var to,eo={create:Zr,update:Zr,destroy:function(t){return Zr(t,Ar)}};function no(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var n,r,o=e.elm,c=t.data.domProps||{},u=e.data.domProps||{};for(n in(a(u.__ob__)||s(u._v_attr_proxy))&&(u=e.data.domProps=A({},u)),c)n in u||(o[n]="");for(n in u){if(r=u[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===c[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n&&"PROGRESS"!==o.tagName){o._value=r;var l=i(r)?"":String(r);ro(o,l)&&(o.value=l)}else if("innerHTML"===n&&Or(o.tagName)&&i(o.innerHTML)){(to=to||document.createElement("div")).innerHTML="".concat(r,"");for(var f=to.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;f.firstChild;)o.appendChild(f.firstChild)}else if(r!==c[n])try{o[n]=r}catch(t){}}}}function ro(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(a(r)){if(r.number)return m(n)!==m(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var oo={create:no,update:no},io=O((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function ao(t){var e=so(t.style);return t.staticStyle?A(t.staticStyle,e):e}function so(t){return Array.isArray(t)?T(t):"string"==typeof t?io(t):t}var co,uo=/^--/,lo=/\s*!important$/,fo=function(t,e,n){if(uo.test(e))t.style.setProperty(e,n);else if(lo.test(n))t.style.setProperty($(e),n.replace(lo,""),"important");else{var r=ho(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(mo).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" ".concat(t.getAttribute("class")||""," ");n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function bo(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(mo).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" ".concat(t.getAttribute("class")||""," "),r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function _o(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&A(e,wo(t.name||"v")),A(e,t),e}return"string"==typeof t?wo(t):void 0}}var wo=O((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),xo=K&&!Y,Oo="transition",Co="transitionend",ko="animation",So="animationend";xo&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Oo="WebkitTransition",Co="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ko="WebkitAnimation",So="webkitAnimationEnd"));var jo=K?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function $o(t){jo((function(){jo(t)}))}function Eo(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),yo(t,e))}function Po(t,e){t._transitionClasses&&_(t._transitionClasses,e),bo(t,e)}function Ao(t,e,n){var r=Lo(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s="transition"===o?Co:So,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c0&&(n="transition",l=a,f=i.length):"animation"===e?u>0&&(n="animation",l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?"transition":"animation":null)?"transition"===n?i.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:"transition"===n&&To.test(r[Oo+"Property"])}}function Mo(t,e){for(;t.length1}function Uo(t,e){!0!==e.data.show&&Ro(e)}var Vo=function(t){var e,n,r={},u=t.modules,l=t.nodeOps;for(e=0;eh?_(t,i(n[m+1])?null:n[m+1].elm,n,d,m,r):d>m&&x(e,f,h)}(f,v,m,n,u):a(m)?(a(t.text)&&l.setTextContent(f,""),_(f,null,m,0,m.length-1,n)):a(v)?x(v,0,v.length-1):a(t.text)&&l.setTextContent(f,""):t.text!==e.text&&l.setTextContent(f,e.text),a(h)&&a(d=h.hook)&&a(d=d.postpatch)&&d(t,e)}}}function S(t,e,n){if(s(n)&&a(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r-1,a.selected!==i&&(a.selected=i);else if(R(qo(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Wo(t,e){return e.every((function(e){return!R(e,t)}))}function qo(t){return"_value"in t?t._value:t.value}function Go(t){t.target.composing=!0}function Ko(t){t.target.composing&&(t.target.composing=!1,Qo(t.target,"input"))}function Qo(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Jo(t){return!t.componentInstance||t.data&&t.data.transition?t:Jo(t.componentInstance._vnode)}var Yo={model:Bo,show:{bind:function(t,e,n){var r=e.value,o=(n=Jo(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Ro(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=Jo(n)).data&&n.data.transition?(n.data.show=!0,r?Ro(n,(function(){t.style.display=t.__vOriginalDisplay})):Io(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}}},Xo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Zo(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Zo(Ae(e.children)):t}function ti(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var r in o)e[k(r)]=o[r];return e}function ei(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var ni=function(t){return t.tag||we(t)},ri=function(t){return"show"===t.name},oi={name:"transition",props:Xo,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(ni)).length){0;var r=this.mode;0;var o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var i=Zo(o);if(!i)return o;if(this._leaving)return ei(t,o);var a="__transition-".concat(this._uid,"-");i.key=null==i.key?i.isComment?a+"comment":a+i.tag:c(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var s=(i.data||(i.data={})).transition=ti(this),u=this._vnode,l=Zo(u);if(i.data.directives&&i.data.directives.some(ri)&&(i.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(i,l)&&!we(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=A({},s);if("out-in"===r)return this._leaving=!0,te(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),ei(t,o);if("in-out"===r){if(we(i))return u;var p,d=function(){p()};te(s,"afterEnter",d),te(s,"enterCancelled",d),te(f,"delayLeave",(function(t){p=t}))}}return o}}},ii=A({tag:String,moveClass:String},Xo);function ai(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function si(t){t.data.newPos=t.elm.getBoundingClientRect()}function ci(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate(".concat(r,"px,").concat(o,"px)"),i.transitionDuration="0s"}}delete ii.mode;var ui={Transition:oi,TransitionGroup:{props:ii,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=on(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=ti(this),s=0;s-1?kr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:kr[t]=/HTMLUnknownElement/.test(e.toString())},A(tr.options.directives,Yo),A(tr.options.components,ui),tr.prototype.__patch__=K?Vo:L,tr.prototype.$mount=function(t,e){return function(t,e,n){var r;t.$el=e,t.$options.render||(t.$options.render=dt),cn(t,"beforeMount"),r=function(){t._update(t._render(),n)},new Xe(t,r,L,{before:function(){t._isMounted&&!t._isDestroyed&&cn(t,"beforeUpdate")}},!0),n=!1;var o=t._preWatchers;if(o)for(var i=0;i=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}(o.path||""),u=e&&e.path||"/",l=c.path?Pi(c.path,u,n||o.append):u,f=function(t,e,n){void 0===e&&(e={});var r,o=n||mi;try{r=o(t||"")}catch(t){r={}}for(var i in e){var a=e[i];r[i]=Array.isArray(a)?a.map(gi):gi(a)}return r}(c.query,o.query,r&&r.options.parseQuery),p=o.hash||c.hash;return p&&"#"!==p.charAt(0)&&(p="#"+p),{_normalized:!0,path:l,query:f,hash:p}}var Yi,Xi=function(){},Zi={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,o=n.resolve(this.to,r,this.append),i=o.location,a=o.route,s=o.href,c={},u=n.options.linkActiveClass,l=n.options.linkExactActiveClass,f=null==u?"router-link-active":u,p=null==l?"router-link-exact-active":l,d=null==this.activeClass?f:this.activeClass,h=null==this.exactActiveClass?p:this.exactActiveClass,v=a.redirectedFrom?_i(null,Ji(a.redirectedFrom),null,n):a;c[h]=ki(r,v,this.exactPath),c[d]=this.exact||this.exactPath?c[h]:function(t,e){return 0===t.path.replace(bi,"/").indexOf(e.path.replace(bi,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(r,v);var g=c[h]?this.ariaCurrentValue:null,m=function(t){ta(t)&&(e.replace?n.replace(i,Xi):n.push(i,Xi))},y={click:ta};Array.isArray(this.event)?this.event.forEach((function(t){y[t]=m})):y[this.event]=m;var b={class:c},_=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:s,route:a,navigate:m,isActive:c[d],isExactActive:c[h]});if(_){if(1===_.length)return _[0];if(_.length>1||!_.length)return 0===_.length?t():t("span",{},_)}if("a"===this.tag)b.on=y,b.attrs={href:s,"aria-current":g};else{var w=function t(e){var n;if(e)for(var r=0;r-1&&(s.params[p]=n.params[p]);return s.path=Qi(l.path,s.params),c(l,s,a)}if(s.path){s.params={};for(var d=0;d-1}function Aa(t,e){return Pa(t)&&t._isRouter&&(null==e||t.type===e)}function Ta(t,e,n){var r=function(o){o>=t.length?n():t[o]?e(t[o],(function(){r(o+1)})):r(o+1)};r(0)}function La(t){return function(e,n,r){var o=!1,i=0,a=null;Ma(t,(function(t,e,n,s){if("function"==typeof t&&void 0===t.cid){o=!0,i++;var c,u=Ia((function(e){var o;((o=e).__esModule||Ra&&"Module"===o[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:Yi.extend(e),n.components[s]=e,--i<=0&&r()})),l=Ia((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=Pa(t)?t:new Error(e),r(a))}));try{c=t(u,l)}catch(t){l(t)}if(c)if("function"==typeof c.then)c.then(u,l);else{var f=c.component;f&&"function"==typeof f.then&&f.then(u,l)}}})),o||r()}}function Ma(t,e){return Da(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function Da(t){return Array.prototype.concat.apply([],t)}var Ra="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Ia(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var Fa=function(t,e){this.router=t,this.base=function(t){if(!t)if(ea){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=xi,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Na(t,e,n,r){var o=Ma(t,(function(t,r,o,i){var a=function(t,e){"function"!=typeof t&&(t=Yi.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map((function(t){return n(t,r,o,i)})):n(a,r,o,i)}));return Da(r?o.reverse():o)}function Ua(t,e){if(e)return function(){return t.apply(e,arguments)}}Fa.prototype.listen=function(t){this.cb=t},Fa.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Fa.prototype.onError=function(t){this.errorCbs.push(t)},Fa.prototype.transitionTo=function(t,e,n){var r,o=this;try{r=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var i=this.current;this.confirmTransition(r,(function(){o.updateRoute(r),e&&e(r),o.ensureURL(),o.router.afterHooks.forEach((function(t){t&&t(r,i)})),o.ready||(o.ready=!0,o.readyCbs.forEach((function(t){t(r)})))}),(function(t){n&&n(t),t&&!o.ready&&(Aa(t,ka.redirected)&&i===xi||(o.ready=!0,o.readyErrorCbs.forEach((function(e){e(t)}))))}))},Fa.prototype.confirmTransition=function(t,e,n){var r=this,o=this.current;this.pending=t;var i,a,s=function(t){!Aa(t)&&Pa(t)&&(r.errorCbs.length?r.errorCbs.forEach((function(e){e(t)})):console.error(t)),n&&n(t)},c=t.matched.length-1,u=o.matched.length-1;if(ki(t,o)&&c===u&&t.matched[c]===o.matched[u])return this.ensureURL(),t.hash&&da(this.router,o,t,!1),s(((a=$a(i=o,t,ka.duplicated,'Avoided redundant navigation to current location: "'+i.fullPath+'".')).name="NavigationDuplicated",a));var l=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n0)){var e=this.router,n=e.options.scrollBehavior,r=xa&&n;r&&this.listeners.push(pa());var o=function(){var n=t.current,o=Ba(t.base);t.current===xi&&o===t._startLocation||t.transitionTo(o,(function(t){r&&da(e,t,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Oa(Ai(r.base+t.fullPath)),da(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Ca(Ai(r.base+t.fullPath)),da(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(Ba(this.base)!==this.current.fullPath){var e=Ai(this.base+this.current.fullPath);t?Oa(e):Ca(e)}},e.prototype.getCurrentLocation=function(){return Ba(this.base)},e}(Fa);function Ba(t){var e=window.location.pathname,n=e.toLowerCase(),r=t.toLowerCase();return!t||n!==r&&0!==n.indexOf(Ai(r+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var za=function(t){function e(e,n,r){t.call(this,e,n),r&&function(t){var e=Ba(t);if(!/^\/#/.test(e))return window.location.replace(Ai(t+"/#"+e)),!0}(this.base)||Ha()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,n=xa&&e;n&&this.listeners.push(pa());var r=function(){var e=t.current;Ha()&&t.transitionTo(Wa(),(function(r){n&&da(t.router,r,e,!0),xa||Ka(r.fullPath)}))},o=xa?"popstate":"hashchange";window.addEventListener(o,r),this.listeners.push((function(){window.removeEventListener(o,r)}))}},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Ga(t.fullPath),da(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Ka(t.fullPath),da(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Wa()!==e&&(t?Ga(e):Ka(e))},e.prototype.getCurrentLocation=function(){return Wa()},e}(Fa);function Ha(){var t=Wa();return"/"===t.charAt(0)||(Ka("/"+t),!1)}function Wa(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function qa(t){var e=window.location.href,n=e.indexOf("#");return(n>=0?e.slice(0,n):e)+"#"+t}function Ga(t){xa?Oa(qa(t)):window.location.hash=t}function Ka(t){xa?Ca(qa(t)):window.location.replace(qa(t))}var Qa=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){Aa(t,ka.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Fa),Ja=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=oa(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!xa&&!1!==t.fallback,this.fallback&&(e="hash"),ea||(e="abstract"),this.mode=e,e){case"history":this.history=new Va(this,t.base);break;case"hash":this.history=new za(this,t.base,this.fallback);break;case"abstract":this.history=new Qa(this,t.base);break;default:0}},Ya={currentRoute:{configurable:!0}};Ja.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},Ya.currentRoute.get=function(){return this.history&&this.history.current},Ja.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof Va||n instanceof za){var r=function(t){n.setupListeners(),function(t){var r=n.current,o=e.options.scrollBehavior;xa&&o&&"fullPath"in t&&da(e,t,r,!1)}(t)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},Ja.prototype.beforeEach=function(t){return Za(this.beforeHooks,t)},Ja.prototype.beforeResolve=function(t){return Za(this.resolveHooks,t)},Ja.prototype.afterEach=function(t){return Za(this.afterHooks,t)},Ja.prototype.onReady=function(t,e){this.history.onReady(t,e)},Ja.prototype.onError=function(t){this.history.onError(t)},Ja.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},Ja.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},Ja.prototype.go=function(t){this.history.go(t)},Ja.prototype.back=function(){this.go(-1)},Ja.prototype.forward=function(){this.go(1)},Ja.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Ja.prototype.resolve=function(t,e,n){var r=Ji(t,e=e||this.history.current,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?Ai(t+"/"+r):r}(this.history.base,i,this.mode),normalizedTo:r,resolved:o}},Ja.prototype.getRoutes=function(){return this.matcher.getRoutes()},Ja.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==xi&&this.history.transitionTo(this.history.getCurrentLocation())},Ja.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==xi&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Ja.prototype,Ya);var Xa=Ja;function Za(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}Ja.install=function t(e){if(!t.installed||Yi!==e){t.installed=!0,Yi=e;var n=function(t){return void 0!==t},r=function(t,e){var r=t.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(t,e)};e.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",$i),e.component("RouterLink",Zi);var o=e.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},Ja.version="3.6.5",Ja.isNavigationFailure=Aa,Ja.NavigationFailureType=ka,Ja.START_LOCATION=xi,ea&&window.Vue&&window.Vue.use(Ja);n(97);n(91),n(129);var ts={NotFound:()=>n.e(6).then(n.bind(null,284)),Layout:()=>Promise.all([n.e(0),n.e(2)]).then(n.bind(null,283))},es={"v-5e1e685a":()=>n.e(7).then(n.bind(null,287)),"v-c97ca880":()=>n.e(8).then(n.bind(null,288)),"v-0d609624":()=>n.e(9).then(n.bind(null,289)),"v-4f037d1a":()=>n.e(10).then(n.bind(null,290)),"v-18d0587a":()=>n.e(11).then(n.bind(null,291)),"v-3120da0c":()=>n.e(12).then(n.bind(null,292)),"v-2f7f848c":()=>n.e(13).then(n.bind(null,293)),"v-2eaf1140":()=>n.e(14).then(n.bind(null,294)),"v-18c2b964":()=>n.e(15).then(n.bind(null,295)),"v-09d6f550":()=>n.e(16).then(n.bind(null,296)),"v-9356a30c":()=>n.e(17).then(n.bind(null,297)),"v-7cc0117c":()=>n.e(18).then(n.bind(null,298)),"v-690a4650":()=>n.e(19).then(n.bind(null,299)),"v-58f7366c":()=>n.e(20).then(n.bind(null,300)),"v-0877efcc":()=>n.e(21).then(n.bind(null,301)),"v-950c4d48":()=>n.e(22).then(n.bind(null,302)),"v-47c1f97a":()=>n.e(23).then(n.bind(null,303)),"v-4fad50ba":()=>n.e(24).then(n.bind(null,304)),"v-4fc0d1c8":()=>n.e(25).then(n.bind(null,305)),"v-31657474":()=>n.e(26).then(n.bind(null,306)),"v-e2784654":()=>n.e(27).then(n.bind(null,307)),"v-0c3bd15a":()=>n.e(28).then(n.bind(null,308)),"v-84e0b14c":()=>n.e(29).then(n.bind(null,309)),"v-074d53cc":()=>n.e(30).then(n.bind(null,310)),"v-0d650648":()=>n.e(31).then(n.bind(null,311)),"v-3e6ef1ac":()=>n.e(32).then(n.bind(null,312)),"v-6dd912ec":()=>n.e(33).then(n.bind(null,313)),"v-a6e64848":()=>n.e(34).then(n.bind(null,314)),"v-35b0f3b1":()=>n.e(35).then(n.bind(null,315)),"v-e65ea9a4":()=>n.e(36).then(n.bind(null,316)),"v-57c590fa":()=>n.e(37).then(n.bind(null,317)),"v-d297eaa6":()=>n.e(38).then(n.bind(null,318)),"v-5d3101c8":()=>n.e(39).then(n.bind(null,319)),"v-501d8193":()=>n.e(40).then(n.bind(null,320))};function ns(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}const rs=/-(\w)/g,os=ns(t=>t.replace(rs,(t,e)=>e?e.toUpperCase():"")),is=/\B([A-Z])/g,as=ns(t=>t.replace(is,"-$1").toLowerCase()),ss=ns(t=>t.charAt(0).toUpperCase()+t.slice(1));function cs(t,e){if(!e)return;if(t(e))return t(e);return e.includes("-")?t(ss(os(e))):t(ss(e))||t(as(e))}const us=Object.assign({},ts,es),ls=t=>us[t],fs=t=>es[t],ps=t=>ts[t],ds=t=>tr.component(t);function hs(t){return cs(fs,t)}function vs(t){return cs(ps,t)}function gs(t){return cs(ls,t)}function ms(t){return cs(ds,t)}function ys(...t){return Promise.all(t.filter(t=>t).map(async t=>{if(!ms(t)&&gs(t)){const e=await gs(t)();tr.component(t,e.default)}}))}function bs(t,e){"undefined"!=typeof window&&window.__VUEPRESS__&&(window.__VUEPRESS__[t]=e)}var _s=n(88),ws=n.n(_s),xs=n(89),Os=n.n(xs),Cs={created(){if(this.siteMeta=this.$site.headTags.filter(([t])=>"meta"===t).map(([t,e])=>e),this.$ssrContext){const e=this.getMergedMetaTags();this.$ssrContext.title=this.$title,this.$ssrContext.lang=this.$lang,this.$ssrContext.pageMeta=(t=e)?t.map(t=>{let e="{e+=` ${n}="${Os()(t[n])}"`}),e+">"}).join("\n "):"",this.$ssrContext.canonicalLink=Ss(this.$canonicalUrl)}var t},mounted(){this.currentMetaTags=[...document.querySelectorAll("meta")],this.updateMeta(),this.updateCanonicalLink()},methods:{updateMeta(){document.title=this.$title,document.documentElement.lang=this.$lang;const t=this.getMergedMetaTags();this.currentMetaTags=js(t,this.currentMetaTags)},getMergedMetaTags(){const t=this.$page.frontmatter.meta||[];return ws()([{name:"description",content:this.$description}],t,this.siteMeta,$s)},updateCanonicalLink(){ks(),this.$canonicalUrl&&document.head.insertAdjacentHTML("beforeend",Ss(this.$canonicalUrl))}},watch:{$page(){this.updateMeta(),this.updateCanonicalLink()}},beforeDestroy(){js(null,this.currentMetaTags),ks()}};function ks(){const t=document.querySelector("link[rel='canonical']");t&&t.remove()}function Ss(t=""){return t?``:""}function js(t,e){if(e&&[...e].filter(t=>t.parentNode===document.head).forEach(t=>document.head.removeChild(t)),t)return t.map(t=>{const e=document.createElement("meta");return Object.keys(t).forEach(n=>{e.setAttribute(n,t[n])}),document.head.appendChild(e),e})}function $s(t){for(const e of["name","property","itemprop"])if(t.hasOwnProperty(e))return t[e]+e;return JSON.stringify(t)}var Es=n(90),Ps={mounted(){window.addEventListener("scroll",this.onScroll)},methods:{onScroll:n.n(Es)()((function(){this.setActiveHash()}),300),setActiveHash(){const t=[].slice.call(document.querySelectorAll(".sidebar-link")),e=[].slice.call(document.querySelectorAll(".header-anchor")).filter(e=>t.some(t=>t.hash===e.hash)),n=Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),o=window.innerHeight+n;for(let t=0;t=i.parentElement.offsetTop+10&&(!a||n{this.$nextTick(()=>{this.$vuepress.$set("disableScrollBehavior",!1)})})}}}},beforeDestroy(){window.removeEventListener("scroll",this.onScroll)}},As=n(22),Ts=n.n(As),Ls={mounted(){Ts.a.configure({showSpinner:!1}),this.$router.beforeEach((t,e,n)=>{t.path===e.path||tr.component(t.name)||Ts.a.start(),n()}),this.$router.afterEach(()=>{Ts.a.done(),this.isSidebarOpen=!1})}},Ms={props:{parent:Object,code:String,options:{align:String,color:String,backgroundTransition:Boolean,backgroundColor:String,successText:String,staticIcon:Boolean}},data:()=>({success:!1,originalBackground:null,originalTransition:null}),computed:{alignStyle(){let t={};return t[this.options.align]="7.5px",t},iconClass(){return this.options.staticIcon?"":"hover"}},mounted(){this.originalTransition=this.parent.style.transition,this.originalBackground=this.parent.style.background},beforeDestroy(){this.parent.style.transition=this.originalTransition,this.parent.style.background=this.originalBackground},methods:{hexToRgb(t){let e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null},copyToClipboard(t){if(navigator.clipboard)navigator.clipboard.writeText(this.code).then(()=>{this.setSuccessTransitions()},()=>{});else{let t=document.createElement("textarea");document.body.appendChild(t),t.value=this.code,t.select(),document.execCommand("Copy"),t.remove(),this.setSuccessTransitions()}},setSuccessTransitions(){if(clearTimeout(this.successTimeout),this.options.backgroundTransition){this.parent.style.transition="background 350ms";let t=this.hexToRgb(this.options.backgroundColor);this.parent.style.background=`rgba(${t.r}, ${t.g}, ${t.b}, 0.1)`}this.success=!0,this.successTimeout=setTimeout(()=>{this.options.backgroundTransition&&(this.parent.style.background=this.originalBackground,this.parent.style.transition=this.originalTransition),this.success=!1},500)}}},Ds=(n(237),n(10)),Rs=Object(Ds.a)(Ms,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"code-copy"},[e("svg",{class:t.iconClass,style:t.alignStyle,attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},on:{click:t.copyToClipboard}},[e("path",{attrs:{fill:"none",d:"M0 0h24v24H0z"}}),t._v(" "),e("path",{attrs:{fill:t.options.color,d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}})]),t._v(" "),e("span",{class:t.success?"success":"",style:t.alignStyle},[t._v("\n "+t._s(t.options.successText)+"\n ")])])}),[],!1,null,"49140617",null).exports,Is=(n(238),[Cs,Ps,Ls,{updated(){this.update()},methods:{update(){setTimeout(()=>{document.querySelectorAll('div[class*="language-"] pre').forEach(t=>{if(t.classList.contains("code-copy-added"))return;let e=new(tr.extend(Rs));e.options={align:"bottom",color:"#27b1ff",backgroundTransition:!0,backgroundColor:"#0075b8",successText:"Copied!",staticIcon:!1},e.code=t.innerText,e.parent=t,e.$mount(),t.classList.add("code-copy-added"),t.appendChild(e.$el)})},100)}}}]),Fs={name:"GlobalLayout",computed:{layout(){const t=this.getLayout();return bs("layout",t),tr.component(t)}},methods:{getLayout(){if(this.$page.path){const t=this.$page.frontmatter.layout;return t&&(this.$vuepress.getLayoutAsyncComponent(t)||this.$vuepress.getVueComponent(t))?t:"Layout"}return"NotFound"}}},Ns=Object(Ds.a)(Fs,(function(){return(0,this._self._c)(this.layout,{tag:"component"})}),[],!1,null,null,null).exports;!function(t,e,n){switch(e){case"components":t[e]||(t[e]={}),Object.assign(t[e],n);break;case"mixins":t[e]||(t[e]=[]),t[e].push(...n);break;default:throw new Error("Unknown option name.")}}(Ns,"mixins",Is);const Us=[{name:"v-5e1e685a",path:"/docs/arfs/content-types.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-5e1e685a").then(n)}},{name:"v-c97ca880",path:"/docs/arfs/data-model.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-c97ca880").then(n)}},{name:"v-0d609624",path:"/docs/arfs/entity-types.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-0d609624").then(n)}},{name:"v-4f037d1a",path:"/docs/arfs/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-4f037d1a").then(n)}},{path:"/docs/arfs/index.html",redirect:"/docs/arfs/"},{path:"/docs/arfs/overview.html",redirect:"/docs/arfs/"},{name:"v-18d0587a",path:"/docs/arfs/privacy.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-18d0587a").then(n)}},{name:"v-3120da0c",path:"/docs/arfs/schema-diagrams.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-3120da0c").then(n)}},{name:"v-2f7f848c",path:"/docs/arfs/usage/change/drives.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-2f7f848c").then(n)}},{name:"v-2eaf1140",path:"/docs/arfs/usage/change/files.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-2eaf1140").then(n)}},{name:"v-18c2b964",path:"/docs/arfs/usage/change/folders.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-18c2b964").then(n)}},{name:"v-09d6f550",path:"/docs/arfs/usage/change/snapshots.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-09d6f550").then(n)}},{name:"v-9356a30c",path:"/docs/arfs/usage/create/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-9356a30c").then(n)}},{path:"/docs/arfs/usage/create/index.html",redirect:"/docs/arfs/usage/create/"},{path:"/docs/arfs/usage/create/create-drive.html",redirect:"/docs/arfs/usage/create/"},{name:"v-7cc0117c",path:"/docs/arfs/usage/create/create-file.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-7cc0117c").then(n)}},{name:"v-690a4650",path:"/docs/arfs/usage/create/create-folder.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-690a4650").then(n)}},{name:"v-58f7366c",path:"/docs/arfs/usage/create/create-snapshot.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-58f7366c").then(n)}},{name:"v-0877efcc",path:"/docs/arfs/usage/extending-schemas.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-0877efcc").then(n)}},{name:"v-950c4d48",path:"/docs/arfs/usage/read/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-950c4d48").then(n)}},{path:"/docs/arfs/usage/read/index.html",redirect:"/docs/arfs/usage/read/"},{path:"/docs/arfs/usage/read/read-operations.html",redirect:"/docs/arfs/usage/read/"},{name:"v-47c1f97a",path:"/docs/cli/all-commands.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-47c1f97a").then(n)}},{name:"v-4fad50ba",path:"/docs/cli/getting-help.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-4fad50ba").then(n)}},{name:"v-4fc0d1c8",path:"/docs/cli/getting-started.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-4fc0d1c8").then(n)}},{name:"v-31657474",path:"/docs/cli/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-31657474").then(n)}},{path:"/docs/cli/index.html",redirect:"/docs/cli/"},{path:"/docs/cli/intro.html",redirect:"/docs/cli/"},{name:"v-e2784654",path:"/docs/cli/using-the-cli.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-e2784654").then(n)}},{name:"v-0c3bd15a",path:"/docs/core-sdk.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-0c3bd15a").then(n)}},{name:"v-84e0b14c",path:"/docs/misc/deploy/deploy.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-84e0b14c").then(n)}},{name:"v-074d53cc",path:"/docs/misc/deploy/examples.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-074d53cc").then(n)}},{name:"v-0d650648",path:"/docs/misc/deploy/paths.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-0d650648").then(n)}},{name:"v-3e6ef1ac",path:"/docs/misc/deploy/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-3e6ef1ac").then(n)}},{path:"/docs/misc/deploy/index.html",redirect:"/docs/misc/deploy/"},{path:"/docs/misc/deploy/prepare.html",redirect:"/docs/misc/deploy/"},{name:"v-6dd912ec",path:"/docs/misc/deploy/routing.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-6dd912ec").then(n)}},{name:"v-a6e64848",path:"/docs/misc/price-calculator.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-a6e64848").then(n)}},{name:"v-35b0f3b1",path:"/docs/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-35b0f3b1").then(n)}},{path:"/docs/index.html",redirect:"/docs/"},{name:"v-e65ea9a4",path:"/docs/turbo/api/payment.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-e65ea9a4").then(n)}},{name:"v-57c590fa",path:"/docs/turbo/api/upload.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-57c590fa").then(n)}},{name:"v-d297eaa6",path:"/docs/turbo/turbo-sdk/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-d297eaa6").then(n)}},{path:"/docs/turbo/turbo-sdk/index.html",redirect:"/docs/turbo/turbo-sdk/"},{name:"v-5d3101c8",path:"/docs/turbo/what-is-turbo.html",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-5d3101c8").then(n)}},{name:"v-501d8193",path:"/",component:Ns,beforeEnter:(t,e,n)=>{ys("Layout","v-501d8193").then(n)}},{path:"/index.html",redirect:"/"},{path:"*",component:Ns}],Vs={title:"ArDrive Docs",description:"ArDrive documentation",base:"/",headTags:[["meta",{property:"og:image",content:"https://docs.ardrive.io/images/card-image.png"}],["meta",{name:"theme-color",content:"#3eaf7c"}],["meta",{name:"apple-mobile-web-app-capable",content:"yes"}],["meta",{name:"apple-mobile-web-app-status-bar-style",content:"black"}],["script",{src:"https://plausible.io/js/script.js",defer:!0,"data-domain":"docs.ardrive.io"}]],pages:[{title:"Content Types",frontmatter:{},regularPath:"/docs/arfs/content-types.html",relativePath:"docs/arfs/content-types.md",key:"v-5e1e685a",path:"/docs/arfs/content-types.html",headers:[{level:2,title:"Other Tags",slug:"other-tags"}]},{title:"Data Model",frontmatter:{},regularPath:"/docs/arfs/data-model.html",relativePath:"docs/arfs/data-model.md",key:"v-c97ca880",path:"/docs/arfs/data-model.html",headers:[{level:2,title:"Entity relationships",slug:"entity-relationships"},{level:2,title:"Metadata Format",slug:"metadata-format"}]},{title:"Entity Types",frontmatter:{},regularPath:"/docs/arfs/entity-types.html",relativePath:"docs/arfs/entity-types.md",key:"v-0d609624",path:"/docs/arfs/entity-types.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Drive",slug:"drive"},{level:2,title:"Folder",slug:"folder"},{level:2,title:"File",slug:"file"},{level:2,title:"Snapshot",slug:"snapshot"},{level:3,title:"Snapshot Entity Tags",slug:"snapshot-entity-tags"},{level:3,title:"Snapshot Entity Data",slug:"snapshot-entity-data"},{level:2,title:"Schema Diagrams",slug:"schema-diagrams"},{level:3,title:"Public Drive",slug:"public-drive"},{level:3,title:"Private Drive",slug:"private-drive"}]},{title:"ArFS Protocol: A Decentralized File System on Arweave",frontmatter:{permalink:"/docs/arfs/"},regularPath:"/docs/arfs/overview.html",relativePath:"docs/arfs/overview.md",key:"v-4f037d1a",path:"/docs/arfs/",headers:[{level:2,title:"Key Features",slug:"key-features"},{level:3,title:"File Structure",slug:"file-structure"},{level:3,title:"Metadata",slug:"metadata"},{level:3,title:"File Permissions",slug:"file-permissions"},{level:3,title:"File Versioning",slug:"file-versioning"},{level:3,title:"Data Deduplication",slug:"data-deduplication"},{level:3,title:"Search and Discovery",slug:"search-and-discovery"},{level:3,title:"Interoperability",slug:"interoperability"},{level:2,title:"Getting Started",slug:"getting-started"},{level:2,title:"ArFS Version History",slug:"arfs-version-history"},{level:2,title:"Resources",slug:"resources"}]},{title:"Privacy",frontmatter:{},regularPath:"/docs/arfs/privacy.html",relativePath:"docs/arfs/privacy.md",key:"v-18d0587a",path:"/docs/arfs/privacy.html",headers:[{level:2,title:"Deriving Keys",slug:"deriving-keys"},{level:2,title:"Private Drives",slug:"private-drives"},{level:2,title:"Private Files",slug:"private-files"}]},{title:"Schema Diagrams",frontmatter:{},regularPath:"/docs/arfs/schema-diagrams.html",relativePath:"docs/arfs/schema-diagrams.md",key:"v-3120da0c",path:"/docs/arfs/schema-diagrams.html",headers:[{level:2,title:"Schema Diagrams",slug:"schema-diagrams"},{level:3,title:"Public Drive",slug:"public-drive"},{level:3,title:"Private Drive",slug:"private-drive"}]},{title:"Drive Write Operations",frontmatter:{},regularPath:"/docs/arfs/usage/change/drives.html",relativePath:"docs/arfs/usage/change/drives.md",key:"v-2f7f848c",path:"/docs/arfs/usage/change/drives.html",headers:[{level:2,title:"Rename Drives",slug:"rename-drives"}]},{title:"File Write Operations",frontmatter:{},regularPath:"/docs/arfs/usage/change/files.html",relativePath:"docs/arfs/usage/change/files.md",key:"v-2eaf1140",path:"/docs/arfs/usage/change/files.html",headers:[{level:2,title:"Move File",slug:"move-file"},{level:2,title:"Rename File",slug:"rename-file"},{level:2,title:"Update File Version",slug:"update-file-version"}]},{title:"Folder Write Operations",frontmatter:{},regularPath:"/docs/arfs/usage/change/folders.html",relativePath:"docs/arfs/usage/change/folders.md",key:"v-18c2b964",path:"/docs/arfs/usage/change/folders.html",headers:[{level:2,title:"Move Folder",slug:"move-folder"},{level:2,title:"Rename Folder",slug:"rename-folder"}]},{frontmatter:{},regularPath:"/docs/arfs/usage/change/snapshots.html",relativePath:"docs/arfs/usage/change/snapshots.md",key:"v-09d6f550",path:"/docs/arfs/usage/change/snapshots.html"},{title:"Create Drive",frontmatter:{permalink:"/docs/arfs/usage/create/"},regularPath:"/docs/arfs/usage/create/create-drive.html",relativePath:"docs/arfs/usage/create/create-drive.md",key:"v-9356a30c",path:"/docs/arfs/usage/create/",headers:[{level:2,title:"New Drive Entity",slug:"new-drive-entity"},{level:2,title:"New Root Folder Entity",slug:"new-root-folder-entity"}]},{title:"Create File",frontmatter:{},regularPath:"/docs/arfs/usage/create/create-file.html",relativePath:"docs/arfs/usage/create/create-file.md",key:"v-7cc0117c",path:"/docs/arfs/usage/create/create-file.html",headers:[{level:2,title:"New File Entity",slug:"new-file-entity"}]},{title:"Create Folder",frontmatter:{},regularPath:"/docs/arfs/usage/create/create-folder.html",relativePath:"docs/arfs/usage/create/create-folder.md",key:"v-690a4650",path:"/docs/arfs/usage/create/create-folder.html",headers:[{level:2,title:"New Folder Entity",slug:"new-folder-entity"}]},{frontmatter:{},regularPath:"/docs/arfs/usage/create/create-snapshot.html",relativePath:"docs/arfs/usage/create/create-snapshot.md",key:"v-58f7366c",path:"/docs/arfs/usage/create/create-snapshot.html"},{title:"Extending Schemas",frontmatter:{next:!1},regularPath:"/docs/arfs/usage/extending-schemas.html",relativePath:"docs/arfs/usage/extending-schemas.md",key:"v-0877efcc",path:"/docs/arfs/usage/extending-schemas.html",headers:[{level:2,title:"Extending Schemas",slug:"extending-schemas"}]},{title:"Read ArFS Data",frontmatter:{permalink:"/docs/arfs/usage/read/"},regularPath:"/docs/arfs/usage/read/read-operations.html",relativePath:"docs/arfs/usage/read/read-operations.md",key:"v-950c4d48",path:"/docs/arfs/usage/read/",headers:[{level:2,title:"Folder/File Paths",slug:"folder-file-paths"},{level:2,title:"Folder View Queries",slug:"folder-view-queries"}]},{title:"All ArDrive CLI Commands",frontmatter:{},regularPath:"/docs/cli/all-commands.html",relativePath:"docs/cli/all-commands.md",key:"v-47c1f97a",path:"/docs/cli/all-commands.html"},{title:"Getting Help",frontmatter:{},regularPath:"/docs/cli/getting-help.html",relativePath:"docs/cli/getting-help.md",key:"v-4fad50ba",path:"/docs/cli/getting-help.html"},{title:"Getting Started",frontmatter:{},regularPath:"/docs/cli/getting-started.html",relativePath:"docs/cli/getting-started.md",key:"v-4fc0d1c8",path:"/docs/cli/getting-started.html",headers:[{level:2,title:"Prerequisites",slug:"prerequisites"},{level:3,title:"Git",slug:"git"},{level:3,title:"NVM (Optional - Recommended)",slug:"nvm-optional-recommended"},{level:2,title:"Quick Start",slug:"quick-start"},{level:3,title:"Installing and Starting the CLI From NPM Package",slug:"installing-and-starting-the-cli-from-npm-package"},{level:3,title:"Upgrading to the Latest Version",slug:"upgrading-to-the-latest-version"},{level:2,title:"Build and Run from Source",slug:"build-and-run-from-source"},{level:3,title:"Install Yarn 3",slug:"install-yarn-3"},{level:3,title:"Husky (Developers Only)",slug:"husky-developers-only"},{level:3,title:"Using a custom ArDrive-Core-JS (Optional)",slug:"using-a-custom-ardrive-core-js-optional"},{level:3,title:"Installing and Starting the CLI From Source",slug:"installing-and-starting-the-cli-from-source"},{level:3,title:"Recommended Visual Studio Code extensions (Developers Only)",slug:"recommended-visual-studio-code-extensions-developers-only"},{level:2,title:"Limitations",slug:"limitations"}]},{title:"CLI",frontmatter:{homepage:!0,permalink:"/docs/cli/"},regularPath:"/docs/cli/intro.html",relativePath:"docs/cli/intro.md",key:"v-31657474",path:"/docs/cli/",headers:[{level:2,title:"ArFS",slug:"arfs"},{level:2,title:"Data Portability",slug:"data-portability"},{level:2,title:"Intended Audience",slug:"intended-audience"}]},{title:"Using the CLI",frontmatter:{sidebarDepth:1},regularPath:"/docs/cli/using-the-cli.html",relativePath:"docs/cli/using-the-cli.md",key:"v-e2784654",path:"/docs/cli/using-the-cli.html",headers:[{level:2,title:"CLI Help",slug:"cli-help"},{level:2,title:"CLI Version",slug:"cli-version"},{level:2,title:"Wallet Operations",slug:"wallet-operations"},{level:2,title:"Working With Entities",slug:"working-with-entities"},{level:3,title:"Dry Run",slug:"dry-run"},{level:3,title:"Uploading to Turbo (BETA)",slug:"uploading-to-turbo-beta"},{level:2,title:"Working With Drives",slug:"working-with-drives"},{level:3,title:"Understanding Drive Hierarchies",slug:"understanding-drive-hierarchies"},{level:3,title:"Understanding Drive and File Keys",slug:"understanding-drive-and-file-keys"},{level:3,title:"Managing Drive Passwords",slug:"managing-drive-passwords"},{level:3,title:"Creating Drives",slug:"creating-drives"},{level:3,title:"Listing Drives for an Address",slug:"listing-drives-for-an-address"},{level:3,title:"Listing Every Entity in a Drive",slug:"listing-every-entity-in-a-drive"},{level:3,title:"List Drive Pipeline Examples",slug:"list-drive-pipeline-examples"},{level:2,title:"Working With Folders",slug:"working-with-folders"},{level:3,title:"Creating Folders",slug:"creating-folders"},{level:3,title:"Moving Folders",slug:"moving-folders"},{level:3,title:"Renaming Folders",slug:"renaming-folders"},{level:3,title:"Viewing Folder Metadata",slug:"viewing-folder-metadata"},{level:3,title:"Listing Contents of a Folder",slug:"listing-contents-of-a-folder"},{level:2,title:"Working With Files",slug:"working-with-files"},{level:3,title:"Uploading a Single File",slug:"uploading-a-single-file"},{level:3,title:"IPFS CID Tagging",slug:"ipfs-cid-tagging"},{level:3,title:"Progress Logging of Transaction Uploads",slug:"progress-logging-of-transaction-uploads"},{level:3,title:"Download a Single file (BETA)",slug:"download-a-single-file-beta"},{level:3,title:"Rename a Single File",slug:"rename-a-single-file"},{level:3,title:"Uploading a Folder with Files (Bulk Upload)",slug:"uploading-a-folder-with-files-bulk-upload"},{level:3,title:"Downloading a Folder with Files",slug:"downloading-a-folder-with-files"},{level:3,title:"Downloading a Drive",slug:"downloading-a-drive"},{level:3,title:"Uploading Multiple Files",slug:"uploading-multiple-files"},{level:3,title:"Name Conflict Resolution on Upload",slug:"name-conflict-resolution-on-upload"},{level:3,title:"Understanding Bundled Transactions",slug:"understanding-bundled-transactions"},{level:3,title:"Uploading a Non-Bundled Transaction (NOT RECOMMENDED)",slug:"uploading-a-non-bundled-transaction-not-recommended"},{level:3,title:"Fetching the Metadata of a File Entity",slug:"fetching-the-metadata-of-a-file-entity"},{level:3,title:"Retrying a Failed File Data Transaction (Public Unbundled Files Only)",slug:"retrying-a-failed-file-data-transaction-public-unbundled-files-only"},{level:3,title:"Moving Files",slug:"moving-files"},{level:3,title:"Uploading Manifests",slug:"uploading-manifests"},{level:3,title:"Uploading With a Custom Content Type",slug:"uploading-with-a-custom-content-type"},{level:3,title:"Uploading From a Remote URL",slug:"uploading-from-a-remote-url"},{level:3,title:"Uploading a Custom Manifest",slug:"uploading-a-custom-manifest"},{level:3,title:"Uploading Files with Custom MetaData",slug:"uploading-files-with-custom-metadata"},{level:2,title:"Other Utility Operations",slug:"other-utility-operations"},{level:3,title:"Monitoring Transactions",slug:"monitoring-transactions"},{level:3,title:"Dealing With Network Congestion",slug:"dealing-with-network-congestion"},{level:3,title:"Using a Custom Arweave Gateway",slug:"using-a-custom-arweave-gateway"},{level:3,title:"Persistent Caching of ArFS Entity Metadata",slug:"persistent-caching-of-arfs-entity-metadata"}]},{title:"Overview",frontmatter:{},regularPath:"/docs/core-sdk.html",relativePath:"docs/core-sdk.md",key:"v-0c3bd15a",path:"/docs/core-sdk.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Integrating with ArDrive Core",slug:"integrating-with-ardrive-core"},{level:2,title:"Development Environment Setup",slug:"development-environment-setup"},{level:3,title:"Recommended Visual Studio Code extensions",slug:"recommended-visual-studio-code-extensions"},{level:2,title:"Building the Library",slug:"building-the-library"},{level:2,title:"Testing the Library",slug:"testing-the-library"},{level:3,title:"Coverage",slug:"coverage"},{level:3,title:"Adding tests",slug:"adding-tests"},{level:3,title:"Using Sinon",slug:"using-sinon"},{level:3,title:"Debugging with Power-Assert",slug:"debugging-with-power-assert"},{level:3,title:"Progress Logging of Transaction Uploads",slug:"progress-logging-of-transaction-uploads"},{level:3,title:"Persistent Caching of ArFS Entity Metadata",slug:"persistent-caching-of-arfs-entity-metadata"},{level:3,title:"Applying Custom MetaData to ArFS File Transactions",slug:"applying-custom-metadata-to-arfs-file-transactions"}]},{title:"Deploying your dApp",frontmatter:{},regularPath:"/docs/misc/deploy/deploy.html",relativePath:"docs/misc/deploy/deploy.md",key:"v-84e0b14c",path:"/docs/misc/deploy/deploy.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Deploying",slug:"deploying"},{level:3,title:"Step 1: Log into ArDrive",slug:"step-1-log-into-ardrive"},{level:3,title:"Step 2: Select or Create a Drive",slug:"step-2-select-or-create-a-drive"},{level:3,title:"Step 3: Upload your project",slug:"step-3-upload-your-project"},{level:3,title:"Step 4: Confirm Upload",slug:"step-4-confirm-upload"},{level:3,title:"Step 5: Create the Manifest",slug:"step-5-create-the-manifest"},{level:3,title:"Step 6: Get the Data TX ID",slug:"step-6-get-the-data-tx-id"},{level:3,title:"Step 7: View and Share your dApp",slug:"step-7-view-and-share-your-dapp"},{level:2,title:"Updating your dApp",slug:"updating-your-dapp"}]},{title:"Examples",frontmatter:{},regularPath:"/docs/misc/deploy/examples.html",relativePath:"docs/misc/deploy/examples.md",key:"v-074d53cc",path:"/docs/misc/deploy/examples.html",headers:[{level:2,title:"Basic HTML",slug:"basic-html"},{level:2,title:"React",slug:"react"},{level:2,title:"Next",slug:"next"}]},{title:"File Paths",frontmatter:{},regularPath:"/docs/misc/deploy/paths.html",relativePath:"docs/misc/deploy/paths.md",key:"v-0d650648",path:"/docs/misc/deploy/paths.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Absolute Vs. Relative",slug:"absolute-vs-relative"},{level:2,title:"Why Relative Paths",slug:"why-relative-paths"},{level:2,title:"Identifying Relative and Absolute Paths",slug:"identifying-relative-and-absolute-paths"},{level:2,title:"Navigating with Relative Paths",slug:"navigating-with-relative-paths"}]},{title:"Preparing Your dApp",frontmatter:{prev:!1,permalink:"/docs/misc/deploy/"},regularPath:"/docs/misc/deploy/prepare.html",relativePath:"docs/misc/deploy/prepare.md",key:"v-3e6ef1ac",path:"/docs/misc/deploy/"},{title:"Hash Routing",frontmatter:{},regularPath:"/docs/misc/deploy/routing.html",relativePath:"docs/misc/deploy/routing.md",key:"v-6dd912ec",path:"/docs/misc/deploy/routing.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Hash Routing Vs. History Routing",slug:"hash-routing-vs-history-routing"},{level:2,title:"Why Hash Routing for dApps",slug:"why-hash-routing-for-dapps"}]},{title:"ArDrive Price Calculator",frontmatter:{prev:!1,next:!1},regularPath:"/docs/misc/price-calculator.html",relativePath:"docs/misc/price-calculator.md",key:"v-a6e64848",path:"/docs/misc/price-calculator.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Developer Setup",slug:"developer-setup"},{level:3,title:"Install Yarn 2",slug:"install-yarn-2"},{level:3,title:"NVM",slug:"nvm"},{level:3,title:"Recommended Visual Studio Code extensions",slug:"recommended-visual-studio-code-extensions"},{level:2,title:"Available Scripts",slug:"available-scripts"},{level:3,title:"yarn start",slug:"yarn-start"},{level:3,title:"yarn build",slug:"yarn-build"},{level:3,title:"yarn test",slug:"yarn-test"},{level:3,title:"yarn run:prod",slug:"yarn-run-prod"}]},{title:"placeholder",frontmatter:{},regularPath:"/docs/",relativePath:"docs/readme.md",key:"v-35b0f3b1",path:"/docs/"},{title:"Payment API",frontmatter:{},regularPath:"/docs/turbo/api/payment.html",relativePath:"docs/turbo/api/payment.md",key:"v-e65ea9a4",path:"/docs/turbo/api/payment.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Endpoints",slug:"endpoints"},{level:3,title:"Get Amount of Credits for Byte Count",slug:"get-amount-of-credits-for-byte-count"},{level:3,title:"Get winc for Payment Type and Amount",slug:"get-winc-for-payment-type-and-amount"},{level:3,title:"Get Current Balance of winc",slug:"get-current-balance-of-winc"},{level:3,title:"Get Quote for Credits",slug:"get-quote-for-credits"},{level:3,title:"Get Supported Currencies",slug:"get-supported-currencies"},{level:3,title:"Get Supported Countries",slug:"get-supported-countries"},{level:3,title:"Get Conversion Rates",slug:"get-conversion-rates"}]},{title:"Upload API",frontmatter:{next:!1},regularPath:"/docs/turbo/api/upload.html",relativePath:"docs/turbo/api/upload.md",key:"v-57c590fa",path:"/docs/turbo/api/upload.html",headers:[{level:2,title:"Overview",slug:"overview"},{level:2,title:"Endpoint",slug:"endpoint"},{level:2,title:"Schema",slug:"schema"},{level:3,title:"Headers",slug:"headers"},{level:3,title:"Body",slug:"body"},{level:3,title:"Response",slug:"response"}]},{title:"@ardriveapp/turbo-sdk 🚀",frontmatter:{},regularPath:"/docs/turbo/turbo-sdk/",relativePath:"docs/turbo/turbo-sdk/index.md",key:"v-d297eaa6",path:"/docs/turbo/turbo-sdk/",headers:[{level:2,title:"Installation",slug:"installation"},{level:2,title:"Quick Start",slug:"quick-start"},{level:2,title:"Usage",slug:"usage"},{level:3,title:"Web",slug:"web"},{level:3,title:"NodeJS",slug:"nodejs"},{level:3,title:"Typescript",slug:"typescript"},{level:2,title:"APIs",slug:"apis"},{level:3,title:"TurboFactory",slug:"turbofactory"},{level:3,title:"TurboUnauthenticatedClient",slug:"turbounauthenticatedclient"},{level:3,title:"TurboAuthenticatedClient",slug:"turboauthenticatedclient"},{level:2,title:"Contributions",slug:"contributions"}]},{title:"What Is Turbo?",frontmatter:{prev:!1},regularPath:"/docs/turbo/what-is-turbo.html",relativePath:"docs/turbo/what-is-turbo.md",key:"v-5d3101c8",path:"/docs/turbo/what-is-turbo.html"},{title:"About ArDrive",frontmatter:{homepage:!0},regularPath:"/",relativePath:"index.md",key:"v-501d8193",path:"/",headers:[{level:2,title:"Control Your Own Data",slug:"control-your-own-data"},{level:3,title:"True Data Ownership",slug:"true-data-ownership"},{level:3,title:"No More Lost Data",slug:"no-more-lost-data"},{level:3,title:"Decentralized Network",slug:"decentralized-network"},{level:3,title:"Community Owned",slug:"community-owned"},{level:2,title:"How can Ardrive Help You?",slug:"how-can-ardrive-help-you"},{level:3,title:"Store Family Memories Forever",slug:"store-family-memories-forever"},{level:3,title:"Permanence",slug:"permanence"},{level:3,title:"Totally Private or Totally Public",slug:"totally-private-or-totally-public"},{level:3,title:"Eliminate Subscription Fees",slug:"eliminate-subscription-fees"},{level:3,title:"Control Your Data",slug:"control-your-data"},{level:3,title:"Perfect Record Keeping",slug:"perfect-record-keeping"},{level:3,title:"Durable NFTs",slug:"durable-nfts"},{level:3,title:"Archive the Web",slug:"archive-the-web"}]}],themeConfig:{searchPlaceholder:"Search",repo:"",editLinks:!1,docsDir:"",editLinkText:"",lastUpdated:!1,initialOpenGroupIndex:-1,logo:"/images/ArDrive-Logo.png",sidebar:{"/":[{title:"Core-js",path:"/docs/core-sdk"},{title:"CLI",initialOpenGroupIndex:-1,collapsable:!0,children:[{title:"Overview",path:"/docs/cli/intro"},{title:"Getting Started",path:"/docs/cli/getting-started"},{title:"Using the CLI",path:"/docs/cli/using-the-cli"},{title:"All Commands",path:"/docs/cli/all-commands"},{title:"Help",path:"/docs/cli/getting-help"}]},{title:"ArFS",initialOpenGroupIndex:-1,children:[{title:"Overview",path:"/docs/arfs/overview"},{title:"Data Model",path:"/docs/arfs/data-model"},{title:"Entity Types",path:"/docs/arfs/entity-types"},{title:"Schema Diagrams",path:"/docs/arfs/schema-diagrams"},{title:"Content Types",path:"/docs/arfs/content-types"},{title:"Privacy",path:"/docs/arfs/privacy"},{title:"Usage",children:[{title:"Create",children:[{title:"Create Drive",path:"/docs/arfs/usage/create/create-drive"},{title:"Create Folder",path:"/docs/arfs/usage/create/create-folder"},{title:"Create File",path:"/docs/arfs/usage/create/create-file"}]},{title:"Modify",children:[{title:"Modify Drives",path:"/docs/arfs/usage/change/drives"},{title:"Modify Folders",path:"/docs/arfs/usage/change/folders"},{title:"Modify Files",path:"/docs/arfs/usage/change/files"}]},{title:"Read",path:"/docs/arfs/usage/read/read-operations"},{title:"Extending Schemas",path:"/docs/arfs/usage/extending-schemas"}]}]},{title:"Turbo",sidebarDepth:2,children:[{title:"What is Turbo?",path:"/docs/turbo/what-is-turbo"},{title:"Payment API",path:"/docs/turbo/api/payment"},{title:"Upload API",path:"/docs/turbo/api/upload"},{title:"Turbo SDK",path:"/docs/turbo/turbo-sdk/"}]},{title:"Misc.",children:[{title:"Price Calculator",path:"/docs/misc/price-calculator"},{title:"How to Deploy a dApp",children:[{title:"Preparing your dApp",path:"/docs/misc/deploy/prepare"},{title:"Hash Routing",path:"/docs/misc/deploy/routing"},{title:"Relative File Paths",path:"/docs/misc/deploy/paths"},{title:"How to Deploy",path:"/docs/misc/deploy/deploy"},{title:"Examples",path:"/docs/misc/deploy/examples"}]}]}]}}};function Bs(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}}const zs="function"==typeof Proxy;let Hs,Ws;function qs(){return void 0!==Hs||("undefined"!=typeof window&&window.performance?(Hs=!0,Ws=window.performance):"undefined"!=typeof global&&(null===(t=global.perf_hooks)||void 0===t?void 0:t.performance)?(Hs=!0,Ws=global.perf_hooks.performance):Hs=!1),Hs?Ws.now():Date.now();var t}class Gs{constructor(t,e){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=e;const n={};if(t.settings)for(const e in t.settings){const r=t.settings[e];n[e]=r.defaultValue}const r="__vue-devtools-plugin-settings__"+t.id;let o=Object.assign({},n);try{const t=localStorage.getItem(r),e=JSON.parse(t);Object.assign(o,e)}catch(t){}this.fallbacks={getSettings:()=>o,setSettings(t){try{localStorage.setItem(r,JSON.stringify(t))}catch(t){}o=t},now:()=>qs()},e&&e.on("plugin:settings:set",(t,e)=>{t===this.plugin.id&&this.fallbacks.setSettings(e)}),this.proxiedOn=new Proxy({},{get:(t,e)=>this.target?this.target.on[e]:(...t)=>{this.onQueue.push({method:e,args:t})}}),this.proxiedTarget=new Proxy({},{get:(t,e)=>this.target?this.target[e]:"on"===e?this.proxiedOn:Object.keys(this.fallbacks).includes(e)?(...t)=>(this.targetQueue.push({method:e,args:t,resolve:()=>{}}),this.fallbacks[e](...t)):(...t)=>new Promise(n=>{this.targetQueue.push({method:e,args:t,resolve:n})})})}async setRealTarget(t){this.target=t;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function Ks(t,e){const n=t,r=Bs(),o=Bs().__VUE_DEVTOOLS_GLOBAL_HOOK__,i=zs&&n.enableEarlyProxy;if(!o||!r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&i){const t=i?new Gs(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:e,proxy:t}),t&&e(t.proxiedTarget)}else o.emit("devtools-plugin:setup",t,e)} /*! * vuex v4.1.0 * (c) 2022 Evan You diff --git a/docs/arfs/content-types.html b/docs/arfs/content-types.html index f5f2b20..160f496 100644 --- a/docs/arfs/content-types.html +++ b/docs/arfs/content-types.html @@ -12,7 +12,7 @@ - + @@ -23,6 +23,6 @@ App-Version: "<defined version of the app eg. 0.5.0" Client?: "<if the application has multiple clients, they should be specified here eg. Web"
- + diff --git a/docs/arfs/data-model.html b/docs/arfs/data-model.html index f7530cd..633a6b5 100644 --- a/docs/arfs/data-model.html +++ b/docs/arfs/data-model.html @@ -12,7 +12,7 @@ - + @@ -27,6 +27,6 @@ "author?": "John Doe" }

Enumerated field values (those which must adhere to certain values) are defined in the format "value 1 | value 2".

All UUIDs used for Entity-Ids are based on the Universally Unique Identifier (opens new window) standard.

There are no requirements to list ArFS tags in any specific order.

- + diff --git a/docs/arfs/entity-types.html b/docs/arfs/entity-types.html index 12dce23..2b3f47d 100644 --- a/docs/arfs/entity-types.html +++ b/docs/arfs/entity-types.html @@ -12,7 +12,7 @@ - + @@ -144,6 +144,6 @@ ] }
Snapshot Transaction JSON data example

# Schema Diagrams

The following diagrams show complete examples of Drive, Folder, and File entity Schemas.

# Public Drive

Public Drive Schema

# Private Drive

Private Drive Schema
- + diff --git a/docs/arfs/index.html b/docs/arfs/index.html index 0cc1656..04c5709 100644 --- a/docs/arfs/index.html +++ b/docs/arfs/index.html @@ -12,11 +12,11 @@ - +

# ArFS Protocol: A Decentralized File System on Arweave

Arweave File System, or “ArFS” is a data modeling, storage, and retrieval protocol designed to emulate common file system operations and to provide aspects of mutability to your data hierarchy on Arweave (opens new window)'s otherwise permanent, immutable data storage blockweave.

Due to Arweave's permanent, immutable and public nature traditional file system operations such as permissions, file/folder renaming and moving, and file updates cannot be done by simply updating the on-chain data model.

ArFS works around this by implementing a privacy and encryption pattern and defining an append-only transaction data model using tags within Arweave Transaction headers (opens new window).

# Key Features

# File Structure

ArFS organizes files and folders using a hierarchical structure. Files are stored as individual transactions on the Arweave blockchain, while folders are metadata that reference these file transactions.

# Metadata

Each file and folder has associated metadata, such as the name, type, size, and modification timestamp. ArFS leverages Arweave's tagging system to store this metadata in a standardized format, which allows for easy querying and organization.

# File Permissions

ArFS supports public and private file permissions. Public files can be accessed by anyone on the network, while private files are encrypted using the owner's private key, ensuring only they can decrypt and access the content.

# File Versioning

ArFS supports versioning of files, allowing users to store multiple versions of a file and access previous versions at any time. This is achieved by linking new file transactions to previous versions through the use of metadata tags.

# Data Deduplication

To minimize storage redundancy and costs, ArFS employs data deduplication techniques. If a user tries to store a file that already exists on the network, the protocol will simply create a new reference to the existing file instead of storing a duplicate copy.

# Search and Discovery

ArFS enables users to search and discover files based on their metadata, such as file names, types, and tags. This is made possible by indexing the metadata stored within the Arweave blockchain.

# Interoperability

ArFS is designed to be interoperable with other decentralized applications and services built on the Arweave network. This allows for seamless integration and collaboration between different applications and users.

# Getting Started

To start using ArFS, you'll need to familiarize yourself with the Arweave ecosystem, acquire AR tokens to cover storage costs, and choose a compatible client or library to interact with the ArFS protocol.

# ArFS Version History

Version Date Release Notes
0.10 August 2020 The brief, beta version that was in use during initial testing of ArDrive across Web (Dart) and legacy CLI (Typescript).
0.11 September 2020 Includes all of the major functionality supporting file systems on Arweave including new drives, folders, files, renames, moves and privacy.
0.12 December 2022 Added Snapshot entities to support quick synchronization of drive state.

# Resources

For more information, documentation, and community support, refer to the following resources:

- + diff --git a/docs/arfs/privacy.html b/docs/arfs/privacy.html index 095ee23..3c6a57b 100644 --- a/docs/arfs/privacy.html +++ b/docs/arfs/privacy.html @@ -12,7 +12,7 @@ - + @@ -24,6 +24,6 @@ Cipher-IV?: "<12 byte initialization vector as Base64>"

Just like drives, private files must have the Content-Type tag set as application/octet-stream in both its metadata and data transactions:

Content-Type: "application/octet-stream"
 
- + diff --git a/docs/arfs/schema-diagrams.html b/docs/arfs/schema-diagrams.html index 04119c3..14fe9d2 100644 --- a/docs/arfs/schema-diagrams.html +++ b/docs/arfs/schema-diagrams.html @@ -12,11 +12,11 @@ - +

# Schema Diagrams

The following diagrams show complete examples of Drive, Folder, and File entity Schemas.

# Public Drive

Public Drive Schema

# Private Drive

Private Drive Schema

Arweave GQL Tag Byte Limit is restricted to 2048. There is no determined limit on Data JSON custom metadata, though more data results in a higher upload cost.

- + diff --git a/docs/arfs/usage/change/drives.html b/docs/arfs/usage/change/drives.html index c33499c..ce58347 100644 --- a/docs/arfs/usage/change/drives.html +++ b/docs/arfs/usage/change/drives.html @@ -12,12 +12,12 @@ - +

# Drive Write Operations

# Rename Drives

  • A new root folder metadata transaction is created when a user wants to rename an existing drive.
  • The new root folder metadata transaction reuses the existing drive's Drive-Id and Folder-Id, and copies all of its old metadata values, except the drive's and folder's name field must be updated in its data JSON to the new drive name.
    • For private drives, new ciphers are generated for this new root folder metadata transaction.
  • The new root folder transaction must not have any Parent-Folder-Id since it is a root folder.
- + diff --git a/docs/arfs/usage/change/files.html b/docs/arfs/usage/change/files.html index faf7d3f..134cf3d 100644 --- a/docs/arfs/usage/change/files.html +++ b/docs/arfs/usage/change/files.html @@ -12,7 +12,7 @@ - + @@ -20,6 +20,6 @@
  • File’s must not be allowed to be moved into a folder if a file exists in that folder with the same file name.
  • # Rename File

    Files can be renamed from one name to another.

    # Update File Version

    When a user adds a new file to a folder, and there is a file in that folder with the same name, then a new file version is created.

    - + diff --git a/docs/arfs/usage/change/folders.html b/docs/arfs/usage/change/folders.html index c8b2c3a..955f4c4 100644 --- a/docs/arfs/usage/change/folders.html +++ b/docs/arfs/usage/change/folders.html @@ -12,13 +12,13 @@ - +

    # Folder Write Operations

    # Move Folder

    Folders can be moved from one folder to another within the same Drive.

    • A new file metadata transaction is created when a user wants to move a folder into a different folder.
    • The new file metadata transaction reuses the existing folder’s Folder-Id and copies all of it’s old metadata values, but the file’s Parent-Folder-Id must be updated to the Folder-Id of the folder is was just moved to.
      • For private folders, new ciphers are generated for this new metadata transaction.
    • Folder’s must not be allowed to be moved into a folder if another folder exists in that folder with the same folder name.

    # Rename Folder

    Folders can be renamed from one name to another.

    • A new folder metadata transaction is created when a user wants to rename an existing folder.
    • The new folder metadata transaction reuses the existing folder’s Folder-Id and copies all of it’s old metadata values, but the folder’s name field in its Data JSON must be updated to the new folder name.
      • For private folders, new ciphers are generated for this new metadata transaction.
    • Folders must not be allowed to be renamed to the name of another folder with that same name in that same folder.
    - + diff --git a/docs/arfs/usage/change/snapshots.html b/docs/arfs/usage/change/snapshots.html index ae100e7..f53cfdb 100644 --- a/docs/arfs/usage/change/snapshots.html +++ b/docs/arfs/usage/change/snapshots.html @@ -12,11 +12,11 @@ - +
    - + diff --git a/docs/arfs/usage/create/create-file.html b/docs/arfs/usage/create/create-file.html index 3727801..f75403a 100644 --- a/docs/arfs/usage/create/create-file.html +++ b/docs/arfs/usage/create/create-file.html @@ -12,13 +12,13 @@ - +

    # Create File

    # New File Entity

    • A new file metadata transaction and a separate data transaction are created when a user wants to create a new file.
    • Files can only be created in existing drives, and must have a valid Drive-Id.
    • Files can only be created in existing parent folders, and must have a valid Parent-Folder-Id.
    • The new File Entity Data transaction must only specify the file’s mime type aka Content-Type.
    • The new file metadata transaction must generate a new UUIDv4 for the File-Id.
    • File metadata transactions must have Entity-Type: "file".
    • The client gets the user’s local time for the Unix-Time tag, represented as Seconds Since Unix Epoch.
      • The client populates the File Entity Metadata Transaction Data JSON after creating the data transaction.
      • name The name of the file including extension.
      • size The size of the file on disk, in bytes as an integer.
      • lastModifiedDate The file’s last time of modification as reported by the user’s operating system, in milliseconds since Unix epoch.
      • dataTxId The Arweave transaction id of this File Entity’s Data Transaction.
      • dataContentType The mime time of this File Entity’s data must be determined by the client.
    • If the File is private:
      • Its Cipher tag must be filled out with the respective encryption algorithm (currently AES256-GCM) for both the Metadata and Data transactions.
      • Its Cipher-IV tag must be filled out with the generated Initialization Vector for both the Metadata and Data transactions. Each one has its own unique IV.
      • It must have the content type Content-Type: "application/octet-stream" for both the Metadata and Data transactions.
      • The ArFS client must encrypt the File Entity’s Data and Metadata JSON using their assigned Cipher and Cipher-IV
    - + diff --git a/docs/arfs/usage/create/create-folder.html b/docs/arfs/usage/create/create-folder.html index f4fe4d7..0e86372 100644 --- a/docs/arfs/usage/create/create-folder.html +++ b/docs/arfs/usage/create/create-folder.html @@ -12,12 +12,12 @@ - +

    # Create Folder

    # New Folder Entity

    Folders can be created to organize files.

    • A new Folder Entity Metadata is created when a user wants to create a new folder.
    • Folders can only be created in existing drives, and must have a valid Drive-Id.
    • Folders can only be created in existing parent folders, and must have a valid Parent-Folder-Id.
    • The new folder metadata transaction must generate a new UUIDv4 for the Folder-Id.
    • Folder Entity Metadata transactions must have Entity-Type: "folder".
    • The client gets the user’s local time for the Unix-Time tag, represented as Seconds Since Unix Epoch.
    • The user defined folder name is added to the name property in the folder’s metadata transaction Data JSON.
    • Public folders must have the content type Content-Type: "<application/json>".
    • If the folder is private:
      • Its Cipher tag must be filled out with the respective encryption algorithm (currently AES256-GCM).
      • Its Cipher-IV tag must be filled out with the generated Initialization Vector for the private folder.
      • It must have the content type Content-Type: "application/octet-stream".
      • The ArFS client must encrypt the Folder entity’s metadata JSON using the assigned Cipher and Cipher-IV.
    - + diff --git a/docs/arfs/usage/create/create-snapshot.html b/docs/arfs/usage/create/create-snapshot.html index c43cf27..61ade1b 100644 --- a/docs/arfs/usage/create/create-snapshot.html +++ b/docs/arfs/usage/create/create-snapshot.html @@ -12,11 +12,11 @@ - +
    - + diff --git a/docs/arfs/usage/create/index.html b/docs/arfs/usage/create/index.html index 3ba7314..a9b8921 100644 --- a/docs/arfs/usage/create/index.html +++ b/docs/arfs/usage/create/index.html @@ -12,7 +12,7 @@ - + @@ -22,6 +22,6 @@
  • The Folder Entity's Folder-Id must match the rootFolderId previously created for the Drive Entity.
  • The Folder Entity's Drive-Id must match the Drive-Id previously created for the Drive Entity.
  • The Folder Entity must not include a Parent-Folder-Id tag.
  • Folder Entity metadata transactions must have Entity-Type: 'folder'.
  • The client gets the user's local time for the Unix-Time tag, represented as seconds since Unix Epoch.
  • Public folders must have the content type Content-Type: "application/json".
  • If the folder is private
  • - + diff --git a/docs/arfs/usage/extending-schemas.html b/docs/arfs/usage/extending-schemas.html index 3803180..7e9b38f 100644 --- a/docs/arfs/usage/extending-schemas.html +++ b/docs/arfs/usage/extending-schemas.html @@ -12,7 +12,7 @@ - + @@ -27,6 +27,6 @@ "albumSong": "<the title of the song>" }

    Additionally, the above extended Metadata fields could be added directly as a transaction tag as well, in order to support GraphQL queries.

    Arweave Transaction Headers can only fit a maximum of 2048 bytes total, so this must be taken into account by clients writing custom GQL tags.

    - + diff --git a/docs/arfs/usage/read/index.html b/docs/arfs/usage/read/index.html index d1df1bb..67a8777 100644 --- a/docs/arfs/usage/read/index.html +++ b/docs/arfs/usage/read/index.html @@ -12,11 +12,11 @@ - +

    # Read ArFS Data

    Clients can perform read operations to create a timeline of entity write transactions which can then be replayed to construct the Drive state. This is done by querying an Arweave GraphQL index for the user’s respective transactions. Arweave GraphQL Guide (opens new window) can provide more information on how to use Arweave GraphQL. If no GraphQL index is available, drive state can only be generated by downloading and inspecting all transactions made by the user’s wallet

    This timeline of transactions should be grouped by the block number of each transaction. At every step of the timeline, the client can check if the entity was written by an authorized user. This also conveniently enables the client to surface a trusted entity version history to the user.

    To determine the owner of a Drive, clients must check for who created the first Drive Entity transaction using that Drive-Id. Until a trusted permissions or ACL system is put in place, any transaction in a drive created by any wallet other than the one who created the first Drive Entity transaction could be considered spam.

    The Unix-Time defined on each transaction should be reserved for tie-breaking same entity updates in the same block and should not be trusted as the source of truth for entity write ordering. This is unimportant for single owner drives but is crucial for multi-owner drives with updateable permissions (currently undefined in this spec) as a malicious user could fake the Unix-Time to modify the drive timeline for other users.

    • Drives that have been updated many times can have a long entity timeline which can be a performance bottleneck. To avoid this, clients can cache the drive state locally and sync updates to the file system by only querying for entities in blocks higher than the last time they checked.
    • Not checking for Drive Ownership could result in seeing incorrect drive state and GraphQL queries.

    # Folder/File Paths

    ArweaveFS does not store folder or file paths along with entities as these paths will need to be updated whenever the parent folder name changes which can require many updates for deeply nested file systems. Instead, folder/file paths are left for the client to generate from the folder/file names.

    # Folder View Queries

    Clients that want to provide users with a quick view of a single folder can simply query for an entity timeline for a particular folder by its id. Clients with multi-owner permissions will additionally have to query for the folder's parent drive entity for permission based filtering of the timeline.

    - + diff --git a/docs/cli/all-commands.html b/docs/cli/all-commands.html index 8cc9db3..394ec66 100644 --- a/docs/cli/all-commands.html +++ b/docs/cli/all-commands.html @@ -12,7 +12,7 @@ - + @@ -83,6 +83,6 @@ # Learn more about a command: ardrive <command> --help
    - + diff --git a/docs/cli/getting-help.html b/docs/cli/getting-help.html index d8c38eb..33b8088 100644 --- a/docs/cli/getting-help.html +++ b/docs/cli/getting-help.html @@ -12,11 +12,11 @@ - +
    - + diff --git a/docs/cli/getting-started.html b/docs/cli/getting-started.html index 33c5fca..8e71af2 100644 --- a/docs/cli/getting-started.html +++ b/docs/cli/getting-started.html @@ -12,7 +12,7 @@ - + @@ -39,6 +39,6 @@ # then invoke the CLI from anywhere on your system: ardrive

    To ensure your environment is compatible, we also recommend the following VSCode extensions:

    # Limitations

    Number of files in a bulk upload: Theoretically unlimited
    Max individual file size: 2GB (Node.js limitation)
    Max file name length: 255 bytes
    Max ANS-104 bundled transaction size: 500 MiB per bundle. App will handle creating multiple bundles.
    Max ANS-104 data item counts per bundled transaction: 250 Files per bundle (500 Data Items).

    - + diff --git a/docs/cli/index.html b/docs/cli/index.html index 5784702..5c7fbfd 100644 --- a/docs/cli/index.html +++ b/docs/cli/index.html @@ -12,7 +12,7 @@ - + @@ -75,6 +75,6 @@ } }

    This project is in a state of active development. Use at your own risk!

    # ArDrive

    ArDrive (opens new window) is a permanent storage platform whose applications and core libraries (opens new window) offer hierarchical organization, privacy via complete end-to-end encryption, flexibility, extensibility, and access control over your most valuable data, all made possible by its innovative core technology, the Arweave File System (ArFS) Protocol (opens new window).

    # ArFS

    ArFS (opens new window) is a data modeling, storage, and retrieval protocol designed to emulate common file system operations and to provide aspects of mutability to your data hierarchy on Arweave (opens new window)'s otherwise permanent, immutable data storage blockweave.

    # Data Portability

    Data uploaded via the ArDrive CLI, once indexed by Arweave's Gateways and sufficiently seeded across enough nodes on the network, can be accessed via all other ArDrive applications including the ArDrive Web application (opens new window) at https://app.ardrive.io.

    All transactions successfully executed by ArDrive can always be inspected in the Viewblock blockchain explorer (opens new window).

    # Intended Audience

    This tool is intended for use by:

    For deeper integrations with the ArDrive (opens new window) platform, consider using the ArDrive Core (opens new window) (Node) library's configurable and intuitive class interfaces directly within your application.

    - + diff --git a/docs/cli/using-the-cli.html b/docs/cli/using-the-cli.html index db0243a..080b0d8 100644 --- a/docs/cli/using-the-cli.html +++ b/docs/cli/using-the-cli.html @@ -12,7 +12,7 @@ - + @@ -468,6 +468,6 @@

    # Persistent Caching of ArFS Entity Metadata

    To avoid redundant requests to the Arweave network for immutable ArFS entity metadata, a persistent file cache is created and maintained at:

    Windows: <os.homedir()>/ardrive-caches/metadata
     Non-Windows: <os.homedir()>/.ardrive/caches/metadata
     

    The XDG_CACHE_HOME environment variable is honored, where applicable, and will be used in place of os.homedir() in the scenarios described above.

    Metadata cache logging to stderr can be enabled by setting the ARDRIVE_CACHE_LOG environment variable to 1.

    Cache performance is UNDEFINED for multi-process scenarios, but is presumed to be generally usable.

    The cache can be manually cleared safely at any time that any integrating app is not in operation.

    - + diff --git a/docs/core-sdk.html b/docs/core-sdk.html index 2ff8a81..afd31a0 100644 --- a/docs/core-sdk.html +++ b/docs/core-sdk.html @@ -12,7 +12,7 @@ - + @@ -135,6 +135,6 @@ } );
    - + diff --git a/docs/index.html b/docs/index.html index 886ace8..906c00f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,11 +12,11 @@ - +

    # placeholder

    Exercitation proident duis qui est veniam duis ullamco proident et veniam.

    - + diff --git a/docs/misc/deploy/deploy.html b/docs/misc/deploy/deploy.html index c33c360..0bbcbad 100644 --- a/docs/misc/deploy/deploy.html +++ b/docs/misc/deploy/deploy.html @@ -12,11 +12,11 @@ - +

    # Deploying your dApp

    # Overview

    This guide will outline the steps needed to deploy your dApp onto the Arweave blockchain using the ArDrive web app. It assumes you have already prepared your dApp to use hash routing and relative file paths, and built static files for any dApp in a language or framework that requires it (like React).

    # Deploying

    # Step 1: Log into ArDrive

    Go to the ArDrive web app (opens new window) and log in using the method of your choosing. If you don't already have an account, you will need to follow the instructions to set one up.

    # Step 2: Select or Create a Drive

    Once logged in, navigate to the drive where you want your project to be hosted. If you haven't created a drive yet, or if you want a new one specifically for this project, click the big red "New" button at the top left and create a new drive. Remember, the drive needs to be set to public for your dApp to be accessible to others.

    # Step 3: Upload your project

    With your drive selected, click the big red "New" button again, but this time, select "Upload Folder". Navigate to your project's root directory, or the built directory if required, and select it. This will upload the entire directory, maintaining your project's file structure.

    # Step 4: Confirm Upload

    You'll be given a chance to review the upload and the associated cost. If everything looks right, click "Confirm". Remember, uploading to Arweave isnt free, but the cost is usually quite small and the benefits of having your dApp hosted on the permaweb are significant.

    # Step 5: Create the Manifest

    While ArDrive displays your uploaded files as a traditional file structure, with files and folders inside other folders, thats not how they actually exist on Arweave. The manifest acts as a map to all the files your dApp needs to function. After you confirm your upload, navigate into your newly created folder by double clicking on it. Click the big red "New" button again and select "Create manifest". You'll be prompted to name the manifest and choose where to save it. Be sure to save it inside the folder you just created.

    # Step 6: Get the Data TX ID

    Once the manifest is created, click on it to expand its details. On the bottom right, there's a line labeled "Data TX ID". This is the unique identifier for your uploaded dApp on Arweave. Copy this value.

    # Step 7: View and Share your dApp

    Your dApp is now available on the permaweb forever! Append the Data TX ID you just copied to the end of an Arweave gateway URL, like https://arweave.net/ . It might take a few minutes for all of your files to finish propagating through the network, but once they do your dApp will be accessible to anyone, anywhere, at any time.

    # Updating your dApp

    Files uploaded to Arweave are permanent and immutable. They cannot be changed. However, the Arweave File System (ArFS) protocol used (and created) by ArDrive lets you "replace" them with new versions while still being able to access the old ones. You can do this with entire dApps as well. The old files won't be displayed in the ArDrive web app unless you click on a file to view its history.

    Once you have made changes to your dApp, and built the static directory for it, you can upload the entire folder again to the same location where you uploaded the original. Follow all the same steps listed above for uploading your dApp. You will need to create a new manifest to correctly point to the updated files. Give it the same name as the old manifest in order to "replace" it. Creating the new manifest will generate a new TX ID used to view the updated dApp.

    The old version of the dApp will always be available to anyone who has the correct TX ID

    - + diff --git a/docs/misc/deploy/examples.html b/docs/misc/deploy/examples.html index a05c337..647cf38 100644 --- a/docs/misc/deploy/examples.html +++ b/docs/misc/deploy/examples.html @@ -12,11 +12,11 @@ - +

    # Examples

    Below are some basic websites built with different languages or frameworks that provide more detailed information on how to configure your dApp for that framework. Each one has been deployed to Arweave itself to show that it functions correctly, and can be accessed through any Arweave gateway by using its TX ID. These are all very basic examples, but if you follow the principles explained, your dApp will function correctly when deployed to the permaweb no matter how big or complex it becomes.

    # Basic HTML

    A basic HTML website with a javascript script to facilitate hash routing:

    GPOX8dgUpFpt8IVUyyfBMiPpfWZ9eXHZjNi42W4-_50 (opens new window)

    # React

    A React dApp created using Create-React-App:

    BTjZhINTpCtWiE0PcfpAQ8a3QhL-1AwXfNJ9lhbaJj0 (opens new window)

    # Next

    A Nextjs dApp created using Create-Next-App:

    01hMcPNA_TEXh1S7p4f6jop7r4lrElF1mIlAwkzhJ_s (opens new window)

    - + diff --git a/docs/misc/deploy/index.html b/docs/misc/deploy/index.html index 83700e3..e3cd725 100644 --- a/docs/misc/deploy/index.html +++ b/docs/misc/deploy/index.html @@ -12,11 +12,11 @@ - +

    # Preparing Your dApp

    To make sure dApps work correctly on the Arweave blockchain, they need to be set up in a specific manner. This is because, unlike traditional web hosting, there are no centralized servers for browsers to request files from. Your dApp needs to be able to handle navigation inside the client's browser instead of relying on communication between the client and a server, and not rely on a server as a point of origin for file paths. This is done by ensuring the following:

    Failure to properly implement either will result in your dApp not working the way it should once it is deployed onto Arweave.

    - + diff --git a/docs/misc/deploy/paths.html b/docs/misc/deploy/paths.html index 1d9b7b1..39614c0 100644 --- a/docs/misc/deploy/paths.html +++ b/docs/misc/deploy/paths.html @@ -12,11 +12,11 @@ - +

    # File Paths

    # Overview

    File paths are needed to locate resources in your file system or on a server. There are two types of file paths: absolute and relative. Because there is no way to know exactly from where a user will access a dApp deployed on Arweave, all file paths used need to be relative.

    # Absolute Vs. Relative

    An absolute path is the full URL to a resource, starting from the root. For example, http://www.example.com/images/myImage.jpg is an absolute path. It points directly to the image no matter where the code referencing it is located.

    A relative path is a path relative to the current location. If you have an HTML file in the root directory (folder) and an image in a subdirectory called 'images', you could use the relative path images/myImage.jpg to reference the image.

    # Why Relative Paths

    When deploying dApps on Arweave, relative paths are essential because:

    • Domain agnostic: Arweave permaweb dApps can be accessed from various gateways, not just one domain. Absolute paths tied to a specific domain will not work.
    • Decentralized: Arweave is a decentralized network. There is no root directory or server configuration to reference. All file paths must be relative to the file trying to find an asset, or your dApp wont be able to find it.

    # Identifying Relative and Absolute Paths

    The key difference between relative and absolute file paths is where they start from:

    • Absolute Paths start with a slash (/) or a full URL (including the protocol, such as http://). For example, /images/myImage.jpg or http://www.example.com/images/myImage.jpg are absolute paths.
    • Relative Paths do not start with a slash. They are relative to the current directory. For example, images/myImage.jpg or ../myImage.jpg are relative paths.

    You can navigate around the files of your project with relative paths by following these principles:

    • Same Directory: If the file you're trying to reference is in the same directory as the current file, you can just use the filename. For example, if index.html and about.html are in the same directory, you can link to about.html just using about.html.

    • Subdirectory: If the file is in a subdirectory, you can use the directory name followed by the filename. For example, images/myImage.jpg will point to the myImage.jpg file in the images subdirectory.

    • Parent Directory: If the file is in a parent directory, you can use ../ to go up one level. For example, ../index.html will point to index.html in the parent directory. You can use multiple ../ to go up multiple levels, like ../../index.html.

    - + diff --git a/docs/misc/deploy/routing.html b/docs/misc/deploy/routing.html index 2f4a38b..6ec9daa 100644 --- a/docs/misc/deploy/routing.html +++ b/docs/misc/deploy/routing.html @@ -12,11 +12,11 @@ - +

    # Hash Routing

    # Overview

    Hash routing is a popular technique in single page applications (SPAs) where the site navigation is handled using JavaScript. The "hash" in hash routing refers to the hash symbol (#) inserted into the URL. The part of the URL after the hash symbol is used to determine which "page" to show.

    For example, if your URL is "http://www.example.com/#about", the part after the hash (about) would be used to show an app's "about" page.

    # Hash Routing Vs. History Routing

    Traditional web apps use history routing, where each unique URL represents a different source or asset contained in a server. The URL "http://www.example.com/about" would fetch the "about" page from the app's server and display it for a user. History routing requires a server be available to provide the correct files every time a user navigates around an app.

    In contrast, with hash routing, all navigation is handled by the client's browser, so no server is needed for navigation.

    # Why Hash Routing for dApps

    Hash routing is particularly useful for apps deployed on Arweave for several reasons:

    • Serverless: Arweave is a decentralized storage network. There's no server to process requests, so routing cannot be handled by a server.
    • Persistence: Once data is stored on Arweave, it can't be changed. Hash routing allows you to have "dynamic" content within this immutable structure.
    • Performance: With hash routing, all the necessary code is loaded once, reducing the number of network requests and improving performance.
    - + diff --git a/docs/misc/price-calculator.html b/docs/misc/price-calculator.html index 402a145..4586ca3 100644 --- a/docs/misc/price-calculator.html +++ b/docs/misc/price-calculator.html @@ -12,7 +12,7 @@ - + @@ -29,6 +29,6 @@ Run with the --watch flag (yarn test -- --watch) to run in interactive watch mode.

    # yarn run:prod

    Builds a fresh snowpack production build to the build/ folder Then launches that copy with http-server-spa for local testing The build will be available for preview at: http://localhost:8080 (opens new window)

    - + diff --git a/docs/turbo/api/payment.html b/docs/turbo/api/payment.html index 80938fd..e2b143c 100644 --- a/docs/turbo/api/payment.html +++ b/docs/turbo/api/payment.html @@ -12,7 +12,7 @@ - + @@ -457,6 +457,6 @@ ] }

    * required

    - + diff --git a/docs/turbo/api/upload.html b/docs/turbo/api/upload.html index 70af54c..726048b 100644 --- a/docs/turbo/api/upload.html +++ b/docs/turbo/api/upload.html @@ -12,7 +12,7 @@ - + @@ -60,6 +60,6 @@ } ```

    * required

    - + diff --git a/docs/turbo/turbo-sdk/index.html b/docs/turbo/turbo-sdk/index.html index 572c78a..4a2714c 100644 --- a/docs/turbo/turbo-sdk/index.html +++ b/docs/turbo/turbo-sdk/index.html @@ -12,7 +12,7 @@ - + @@ -178,6 +178,6 @@ // no timeout or AbortSignal provided });

    # Contributions

    If you encounter any issues or have feature requests, please file an issue on our GitHub repository. Contributions, pull requests, and feedback are both welcome and encouraged.

    - + diff --git a/docs/turbo/what-is-turbo.html b/docs/turbo/what-is-turbo.html index 222a56a..8d2feb7 100644 --- a/docs/turbo/what-is-turbo.html +++ b/docs/turbo/what-is-turbo.html @@ -12,11 +12,11 @@ - +

    # What Is Turbo?

    Turbo is a new service offered by ArDrive that removes the barriers to permaweb storage by allowing users to pay for uploads using a credit or debit card. Turbo consists of two separate components: a bundling upload service and a payment service. Turbo Credits can be purchased in the ArDrive web app, and represent a 1:1 conversion from AR tokens in the amount of data they can upload. The smallest denomination of a Turbo Credit is a Winston Credit (winc).

    - + diff --git a/index.html b/index.html index ab67864..c700c6b 100644 --- a/index.html +++ b/index.html @@ -12,11 +12,11 @@ - +

    # About ArDrive

    ArDrive offers never-ending storage of your most valuable files. Pay once and save your memories forever.

    # Control Your Own Data

    # True Data Ownership

    With pay-once pricing you no longer have to add another subscription fee to your monthly budget. Save big when you only have to pay for what you use.

    # No More Lost Data

    Feel safe about the longevity of your files and avoid the horror stories of broken hard drives, deleted accounts, or lost files.

    # Decentralized Network

    Break free from Big Tech and leverage the power of the decentralized Arweave blockchain network that puts you back in control. Own your data instead of renting it.

    # Community Owned

    You're the boss. As a Web3 organization, ArDrive is owned collectively so you can have a say in our governance and share in our rewards.

    # How can Ardrive Help You?

    # Store Family Memories Forever

    Never lose a cherished photo or video again. Keep and pass along all of your most important photos and documents to the present or future generations. Learn more (opens new window)

    # Permanence

    In a digital world, how do you guarantee information is kept for long-periods of time? Just as the web connects data and people over vast distances, your data can now be kept over vast periods of time. Learn more (opens new window)

    # Totally Private or Totally Public

    It’s your choice in how you want to manage your data. Keep it private, share with select individuals, or make it public to the world. ArDrive is optimized for photography, digital art and NFT storage. Learn more (opens new window)

    # Eliminate Subscription Fees

    If you are paying monthly for cloud storage you are renting out your data. Get a digital wallet and move to full ownership of your data with our innovative pay once per file pricing. Learn more (opens new window)

    # Control Your Data

    Break free from the whims of centralized big tech and ever-changing terms of service. Enjoy the benefits of total privacy, security, and extreme data redundancy on a decentralized network. Learn more (opens new window)

    # Perfect Record Keeping

    Data integrity, accuracy and consistency for your most important files! Achieve regulatory compliance in any industry or your personal life by having an immutable (unchanging) and time-stamped record of all your files. Learn more (opens new window)

    # Durable NFTs

    NFTs make the internet ownable. But when you buy an NFT how do you know it is going to be around in 20 years? Who is paying to store it? And what if they stop? Learn more (opens new window)

    # Archive the Web

    Save a copy of any webpage you create or find! Each page will be given a unique url and saved on to Arweave’s permaweb (just like the web, but forever!). Learn more (opens new window)

    - +