From 9991caf9f83d4b95f9484921fc46f25648b8e896 Mon Sep 17 00:00:00 2001 From: Giga Bob <62410139+Bobinstein@users.noreply.github.com> Date: Tue, 29 Aug 2023 15:16:40 -0400 Subject: [PATCH 01/11] chore: merge production into staging (#7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: merge staging into production (#6) * mdBook * readme wip * readme.md updated from https://stackedit.io/ * readme.md updated from https://stackedit.io/ * readme.md updated from https://stackedit.io/ * readme.md updated from https://stackedit.io/ * demo * readme.md updated from https://stackedit.io/ * readme.md updated from https://stackedit.io/ * readme.md updated from https://stackedit.io/ * readme.md updated from https://stackedit.io/ * readme.md updated from https://stackedit.io/ * readme.md updated from https://stackedit.io/ * Building navigation * Added arfs 0.11 and 0.12 * completed proposal * init * feat: :art: updated for light/dark, other configs updated the app with the code for light/dark modes, made some other configuration changes. * style: :art: css changes stylized prev/next, added borders, color changes, other changes from whitepaper docs * fix: :bug: build script fix fixed depreciated build script * Update deploy.yml * set vuepress dist folder correctly * add base back * style: :art: fixed subheader color subheader color now matches general text color * refactor: removed about section about section existed as a workaround for sidebar defaulting to open, replaced it with price calclulator * docs: :memo: updated landing page replaced placeholder home page with content from ardrive.io * refactor: :memo: added new default page to /cli/, bug fixes replaced readme.md as the landing page for /cli/, fixed error with variable not being initialized. * docs: :memo: added arfs overview overview landing page for arfs * fix: :bug: fixed metadata fixed project metadata so it no longer shows whitepaper * fix: :art: fix logo on light mode logo was not displaying on light mode, cannot recreate locally. pushing possible fix * fix: :bug: log fix another attempt to fix the logo bug * fix: :bug: logo fix defaulted to uncustomized logo src because switching is not needed * fix: :bug: logo fix lets try this fix * style: :art: search box styling basic search box and result styling for readability, will need further input * docs: :memo: inline code styling, added docs created css to target inline code only, will need to be adjusted to team preference. Added some ArFS documentation * docs: :memo: ArFS docs more ArFS documentation. * docs: :memo: ArFS docs additional docs for ArFS * docs: :memo: ArFS Docs ArFS docs, based on confluence post from Phil, have been added up to Operations * refactor: title change changed title from ardrive.io to ArDrive Docs * h2 border-bottom * h2 line styling * added Snapshot entity information * style: :art: style changes several style changes, added customized search box component, replaced discord text with logo, still need to even out SVGs * fixed search result colors * added magnifying glass to search bar for visual * SearchBox styling changes * style changes * docs: :art: added more ArFS docs, styling changes added usage docs, set up sidebar - no custom sidebar yet, styling changes - need to identify issue with sidebar subheader coloring * turned 'last updated' off * style: :art: style changes several style changes suggested by Jonathan * style: :art: changed sidebar order moved core sdk up in sidebar because if the first item has a dropdown it will always start open * style: :art: style changes several style changes suggested by jacob * fix: :bug: fixed links link references were broken when cli file was split. corrected * style: :art: prev / next styling styled the prev and next buttons * style: :art: fixed sidebar item color found and removed rule givinig some sidebar items an opacity * style: :art: minor style changes minor style changes * docs: :art: added overview tag all sections except price calculator now begin with the overview header * sidebar change * style: :art: adjusted nav icons * change prev/next button background color in dark mode * added CNAME file * changed base path * fixed logo path * capitalize page description * added plausible script * Made ArDrive logo larger * Updated data-model.md * added Overview to price Calculator * added meta image * changed support link * spaced nav icons * merge from staging * merge conflicts resolved * completely functional, needs styling * style: :art: set basic styling for the seach modal * updated modal styling * updated ArFS Overview * Added copy button to code blocks using 'vuepress-plugin\-code-copy' plugin * docs: :memo: Updated ArFS documentation Updated ArFS documentation to match recent atlassian updates. * docs: added deployment docs added docs explaining how to deploy a dApp using the ArDrive web app. * docs: added deploy docs added docs for deploying dApps using the ArDrive web app * fix: fixed bug preventing build syntax for removing prev/next buttons on certain pages was incorrect and prevented build. commented out. * refactor: Corrected syntax to remove prev/next corrected the syntax commented out in the previous commit. Unneeded prev/next buttons removed without affecting build * docs: Added Examples page Added page with example websites for deploying a dApp to Arweave * docs: Added Turbo API docs Added preliminary docs for the Turbo Payment and Upload APIs * docs: typo correction replaced AR with data when referring to amount of data that can be uploaded * docs: Added openapi docs links Added disclaimer about docs being up to date, and linked to openapi docs which are maintained as changes are made. * chore: created package-lock.json file created package-lock.json so users can install dependencies with npm without issue. * fix: Fixed Zendesk link * docs(turbo): update CLI and Core docs with Turbo release PE-4435 (#4) --------- Co-authored-by: agsuy Co-authored-by: agsuy <37564412+agsuy@users.noreply.github.com> Co-authored-by: Phil Co-authored-by: Karl Prieb Co-authored-by: Derek Sonnenberg * feat(markdown files): adds documentation for Pins; applies minor clarifications PE-4497 (#5) Co-authored-by: Giga Bob <62410139+Bobinstein@users.noreply.github.com> --------- Co-authored-by: agsuy Co-authored-by: agsuy <37564412+agsuy@users.noreply.github.com> Co-authored-by: Phil Co-authored-by: Karl Prieb Co-authored-by: Derek Sonnenberg Co-authored-by: Matías Batista --- docs/src/docs/arfs/data-model.md | 14 ++++++- docs/src/docs/arfs/entity-types.md | 67 +++++++++++++++++++++++++----- 2 files changed, 69 insertions(+), 12 deletions(-) diff --git a/docs/src/docs/arfs/data-model.md b/docs/src/docs/arfs/data-model.md index 87e7578..8485954 100644 --- a/docs/src/docs/arfs/data-model.md +++ b/docs/src/docs/arfs/data-model.md @@ -2,6 +2,7 @@ Because of Arweave's permanent and immutable nature, traditional file structure operations such as renaming and moving files or folders cannot be accomplished by simply updating on-chain data. ArFS works around this by defining an append-only transaction data model based on the metadata tags found in the Arweave [Transaction Headers.](https://docs.arweave.org/developers/server/http-api#transaction-format) + This model uses a bottom-up reference method, which avoids race conditions in file system updates. Each file contains metadata that refers to the parent folder, and each folder contains metadata that refers to its parent drive. A top-down data model would require the parent model (i.e. a folder) to store references to its children. These defined entities allow the state of the drive to be constructed by a client to look and feel like a file system @@ -14,6 +15,7 @@ These defined entities allow the state of the drive to be constructed by a clien - Snapshot entities contain a state rollups of all files and folder metadata within a drive + - Drive Entities contain folders and files - Folder Entities contain other folders or files @@ -22,6 +24,15 @@ These defined entities allow the state of the drive to be constructed by a clien - Snapshot entities contain a state rollups of all files and folder metadata within a drive + +- Drive Entities contain folders and files + +- Folder Entities contain other folders or files + +- File Entities are composed by both the file data and metadata + +- Snapshot entities contain a state rollups of all entities' (such as drive, folder, file and snapshot) metadata within a drive + ## Entity relationships The following diagram shows the high level relationships between drive, folder, and file entities, and their associated data. More detailed information about each Entity Type can be found [here](./entity-types.md). @@ -30,7 +41,7 @@ The following diagram shows the high level relationships between drive, folder,
Entity Relationship Diagram
-As you can see, Each file contains metadata which point to both the parent folder and the parent drive, while each folder entity contains metadata which points to the parent drive. The drive entity contains metadata about itself, but not the child contents. So clients must build drive states from the lowest level and work their way up. +As you can see, each file and folder contains metadata which points to both the parent folder and the parent drive. The drive entity contains metadata about itself, but not the child contents. So clients must build drive states from the lowest level and work their way up. ## Metadata Format @@ -58,6 +69,7 @@ fields with a `?` suffix are optional. "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](https://en.wikipedia.org/wiki/Universally_unique_identifier) standard. diff --git a/docs/src/docs/arfs/entity-types.md b/docs/src/docs/arfs/entity-types.md index bf6926c..20df46d 100644 --- a/docs/src/docs/arfs/entity-types.md +++ b/docs/src/docs/arfs/entity-types.md @@ -23,7 +23,7 @@ A drive is the highest level logical grouping of folders and files. All folders When creating a Drive, a corresponding folder must be created as well. This will act as the root folder of the drive. This separation of drive and folder entity enables features such as folder view queries, renaming, and linking. ``` -ArFS: "0.11" +ArFS: "0.13" Cipher?: "AES256-GCM" Cipher-IV?: "<12 byte initialization vector as Base64>" Content-Type: "" @@ -46,7 +46,7 @@ Data JSON { A folder is a logical grouping of other folders and files. Folder entity metadata transactions without a parent folder id are considered the Drive Root Folder of their corresponding Drives. All other Folder entities must have a parent folder id. Since folders do not have underlying data, there is no Folder data transaction required. ``` -ArFS: "0.11" +ArFS: "0.13" Cipher?: "AES256-GCM" Cipher-IV?: "<12 byte initialization vector as Base64>" Content-Type: "" @@ -67,12 +67,16 @@ Data JSON { A File contains uploaded data, like a photo, document, or movie. + In the Arweave File System, a single file is broken into 2 parts - its metadata and its data. -A File entity metadata transaction does not include the actual File data. Instead, the File data must be uploaded as a separate transaction, called the File Data Transaction. The File metadata transaction JSON contains a reference to the File Data Transaction id so that it can retrieve the actual data. This separation allows for file metadata to be updated without requiring the file itself to be reuploaded. It also ensures that private files can have their Metadata Transaction JSON encrypted as well, ensuring that no one without authorization can see either the file or its metadata. + +In the Arweave File System, a single file is broken into 2 parts - its metadata and its data. + +A File entity metadata transaction does not include the actual File data. Instead, the File data must be uploaded as a separate transaction, called the File Data Transaction. The File JSON metadata transaction contains a reference to the File Data Transaction ID so that it can retrieve the actual data. This separation allows for file metadata to be updated without requiring the file itself to be reuploaded. It also ensures that private files can have their JSON Metadata Transaction encrypted as well, ensuring that no one without authorization can see either the file or its metadata. ``` -ArFS: "0.11" +ArFS: "0.13" Cipher?: "AES256-GCM" Cipher-IV?: "<12 byte initialization vector as Base64>" Content-Type: "" @@ -87,22 +91,46 @@ Data JSON { "size": , "lastModifiedDate": "dataTxId": "", - "dataContentType": "" + "dataContentType": "", + "pinnedDataOwner": "" # Optional } ``` -
File Metadata Transaction Example
+
Pin Files
+ +Since the version v0.13, ArFS suports Pins. Pins are files whose data may be any transaction uploaded to Arweave, that may or may not be owned by the wallet that created the pin. + +When a new File Pin is created, the only created transaction is the Metadata Transaction. The `dataTxId` field will point it to any transaction in Arweave, and the optional `pinnedDataOwner` field is gonna hold the address of the wallet that owns the original copy of the data transaction. + +
File Data Transaction Example
The File Data Transaction contains limited information about the file, such as the information required to decrypt it, or the Content-Type (mime-type) needed to view in the browser. ``` Cipher?: "AES256-GCM" -Cipher-IV?: "<12 byte initialization vector as Base64>"" -Content-Type: """ - { File data } +Cipher-IV?: "<12 byte initialization vector as Base64>" +Content-Type: "" + { File Data - Encrypted if private } ``` -
File Data Transaction Example
+
File Metadata Transaction Example
+ +The the File Metadata Transaction contains the GQL Tags necessary to identify the file within a drive and folder. + +Its data contains the JSON metadata for the file. This includes the file name, size, last modified date, data transaction id, and data content type. + +``` +ArFS: "0.13" +Cipher?: "AES256-GCM" +Cipher-IV?: "<12 byte initialization vector as Base64>" +Content-Type: "" +Drive-Id: "" +Entity-Type: "file" +File-Id: "" +Parent-Folder-Id: "" +Unix-Time: "" + { File JSON Metadata - Encrypted if private } +``` ## Snapshot @@ -119,7 +147,7 @@ This optional method offers convenience and resource efficiency when building th Snapshot entities require the following tags. These are queried by ArFS clients to find drive snapshots, organize them together with any other transactions not included within them, and build the latest state of the drive. ``` -ArFS: "0.12" +ArFS: "0.13" Drive-Id: "" Entity-Type: "snapshot" Snapshot-Id: "" @@ -130,6 +158,7 @@ Data-Start: "" ``` +
Snapshot Transaction GQL tags example
### Snapshot Entity Data @@ -200,7 +229,23 @@ For private drives, the `dataJson` object contains the JSON-string-escaped encry ] } ``` +
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
+ + From e69d66a2f36c44b60b73ed0cf5c0d1fda2fabda5 Mon Sep 17 00:00:00 2001 From: Stephen <62410139+Bobinstein@users.noreply.github.com> Date: Wed, 30 Aug 2023 14:34:39 -0400 Subject: [PATCH 02/11] chore: changed deploy to production instead of staging --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ffdf927..2cb63bb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: Build and Deploy on: push: branches: - - staging + - production jobs: build-and-deploy: From 3166dc0134e4541fc2a4a0c5bf2924d39b9c05b8 Mon Sep 17 00:00:00 2001 From: Stephen <62410139+Bobinstein@users.noreply.github.com> Date: Wed, 6 Sep 2023 18:02:44 -0400 Subject: [PATCH 03/11] fix: fixed visual bug in navbar --- .../src/.vuepress/theme/components/Navbar.vue | 33 ++----------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/docs/src/.vuepress/theme/components/Navbar.vue b/docs/src/.vuepress/theme/components/Navbar.vue index 15f420a..4327b6f 100644 --- a/docs/src/.vuepress/theme/components/Navbar.vue +++ b/docs/src/.vuepress/theme/components/Navbar.vue @@ -27,7 +27,7 @@ > - - > - - - @@ -207,10 +186,6 @@ $navbar-vertical-padding = 0.7rem $navbar-horizontal-padding = 1.5rem .question - width 20px - height auto - padding-right .55em - padding-top .25em width 20px height auto padding-right .55em @@ -218,7 +193,6 @@ $navbar-horizontal-padding = 1.5rem // margin-top 0rem !important - .icon height 30px width 24px @@ -247,11 +221,9 @@ $navbar-horizontal-padding = 1.5rem .discord-logo color var(--TextColor) padding-right .425rem - padding-right .425rem padding-top 2.5px .navbar - // margin-top 50px !important // margin-top 50px !important padding $navbar-vertical-padding $navbar-horizontal-padding line-height $navbarHeight - 1.4rem @@ -259,8 +231,7 @@ $navbar-horizontal-padding = 1.5rem a, span, img display inline-block .logo - height 32px - width auto + height $navbarHeight - 1rem min-width $navbarHeight - 1.4rem margin-right 0.8rem vertical-align top From 8a6798d3e5bafca089f6549f3689e614d6cb8d6d Mon Sep 17 00:00:00 2001 From: bobinstein Date: Tue, 26 Sep 2023 19:41:08 -0400 Subject: [PATCH 04/11] docs: Added Turbo-SDK doc --- .../theme/configs/default_sidebar_config.js | 7 +- docs/src/docs/turbo/turbo-sdk/index.md | 343 ++++++++++++++++++ 2 files changed, 349 insertions(+), 1 deletion(-) create mode 100644 docs/src/docs/turbo/turbo-sdk/index.md diff --git a/docs/src/.vuepress/theme/configs/default_sidebar_config.js b/docs/src/.vuepress/theme/configs/default_sidebar_config.js index 21a0a2a..d38f00d 100644 --- a/docs/src/.vuepress/theme/configs/default_sidebar_config.js +++ b/docs/src/.vuepress/theme/configs/default_sidebar_config.js @@ -109,6 +109,7 @@ module.exports = [ }, { title: "Turbo", + sidebarDepth: 2, children: [ { title: "What is Turbo?", @@ -121,7 +122,11 @@ module.exports = [ { title: "Upload API", path: "/docs/turbo/api/upload" - } + }, + { + title: "Turbo SDK", + path: "/docs/turbo/turbo-sdk/", + }, ] }, { diff --git a/docs/src/docs/turbo/turbo-sdk/index.md b/docs/src/docs/turbo/turbo-sdk/index.md new file mode 100644 index 0000000..3913518 --- /dev/null +++ b/docs/src/docs/turbo/turbo-sdk/index.md @@ -0,0 +1,343 @@ +# @ardriveapp/turbo-sdk 🚀 + +Welcome to the `@ardrive/turbo-sdk`! This SDK provides functionality for interacting with the Turbo Upload and Payment Services and is available for both NodeJS and Web environments. + + + +## Installation + +```shell +npm install @ardrive/turbo-sdk +``` + +or + +```shell +yarn add @ardrive/turbo-sdk +``` + +## Quick Start + +```typescript +import { TurboFactory } from '@ardrive/turbo-sdk'; + +// load your JWK from a file or generate a new one +const jwk = fs.readFileSync('./my-jwk.json'); +const address = arweave.wallets.jwkToAddress(jwk); +const turbo = TurboFactory.authenticated({ privateKey: jwk }); + +// get the wallet balance +const { winc: balance } = await turbo.getBalance(); + +// prep file for upload +const filePath = path.join(__dirname, './my-image.png'); +const fileSize = fs.statSync(filePath).size; + +// get the cost of uploading the file +const [{ winc: fileSizeCost }] = await turbo.getUploadCosts({ + bytes: [fileSize], +}); + +// check if balance greater than upload cost +if (balance < fileSizeCost) { + const { url } = await turbo.createCheckoutSession({ + amount: fileSizeCost, + owner: address, + // add a promo code if you have one + }); + // open the URL to top-up, continue when done + open(url); + return; +} + +// upload the file +try { + const { id, owner, dataCaches, fastFinalityIndexes } = await turbo.uploadFile(() => { + fileStreamFactory => () => fs.createReadStream(filePath), + fileSizeFactory => () => fileSize, + }); + // upload complete! + console.log('Successfully upload data item!', { id, owner, dataCaches, fastFinalityIndexes }); +} catch (error) { + // upload failed + console.error('Failed to upload data item!', error); +} finally { + const { winc: newBalance } = await turbo.getBalance(); + console.log('New balance:', newBalance); +} +``` + +## Usage + +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 [package.json] based on your project's configuration. Refer to the [examples] directory to see how to use the SDK in various environments. + +### Web + +#### Bundlers (Webpack, Rollup, ESbuild, etc.) + +```javascript +import { TurboFactory } from '@ardrive/turbo-sdk'; + +const turbo = TurboFactory.unauthenticated(); +const rates = await turbo.getFiatRates(); +``` + +#### Browser + +```html + + +``` + +### NodeJS + +#### CommonJS + +Project's `package.json`: + +```json +{ + "type": "commonjs" // or absent +} +``` + +Project's `tsconfig.json`: + +```json +{ + "compilerOptions": { + "module": "CommonJS", + "moduleResolution": "Node", + "skipLibCheck": true + } +} +``` + +Usage: + +```javascript +const { TurboFactory } = require('@ardrive/turbo-sdk'); + +const turbo = TurboFactory.unauthenticated(); +const rates = await turbo.getFiatRates(); +``` + +#### ESM + +Project's `package.json`: + +```json +{ + "type": "module" +} +``` + +Project's `tsconfig.json`: + +```json +{ + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "skipLibCheck": true + } +} +``` + +Usage: + +```javascript +import { TurboFactory } from '@ardrive/turbo-sdk/node'; + +const turbo = TurboFactory.unauthenticated(); +const rates = await turbo.getFiatRates(); +``` + +### Typescript + +The SDK provides TypeScript types. When you import the SDK in a TypeScript project: + +```typescript +import { TurboFactory } from '@ardrive/turbo-sdk/web'; + +// or '@ardrive/turbo-sdk/node' for Node.js projects +``` + +Types are exported from `./lib/types/[node/web]/index.d.ts` and should be automatically recognized, offering benefits such as type-checking and autocompletion. + +## APIs + +### TurboFactory + +- `unauthenticated()` - Creates an instance of a client that accesses Turbo's unauthenticated services. + + ```typescript + const turbo = TurboFactory.unauthenticated(); + ``` + +- `authenticated()` - Creates an instance of a client that accesses Turbo's authenticated and unauthenticated services. + + ```typescript + const jwk = await arweave.crypto.generateJWK(); + const turbo = TurboFactory.authenticated({ privateKey: jwk }); + ``` + +### TurboUnauthenticatedClient + +- `getSupportedCurrencies()` - 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). + + ```typescript + const currencies = await turbo.getSupportedCurrencies(); + ``` + +- `getSupportedCountries()` - Returns the list of countries supported by the Turbo Payment Service's top up workflow. + + ```typescript + const countries = await turbo.getSupportedCountries(); + ``` + +- `getFiatToAR({ currency })` - Returns the current raw fiat to AR conversion rate for a specific currency as reported by third-party pricing oracles. + + ```typescript + const fiatToAR = await turbo.getFiatToAR({ currency: 'USD' }); + ``` + +- `getFiatRates()` - Returns the current fiat rates for 1 GiB of data for supported currencies, including all top-up adjustments and fees. + + ```typescript + const rates = await turbo.getFiatRates(); + ``` + +- `getWincForFiat({ amount })` - Returns the current amount of Winston Credits including all adjustments for the provided fiat currency, amount. To leverage promo codes, see [TurboAuthenticatedClient]. + + ```typescript + const { winc, paymentAmount, quotedPaymentAmount, adjustments } = + await turbo.getWincForFiat({ + amount: USD(100), + // promo codes require an authenticated client + }); + ``` + +- `getUploadCosts({ bytes })` - Returns the estimated cost in Winston Credits for the provided file sizes, including all upload adjustments and fees. + + ```typescript + const [uploadCostForFile] = await turbo.getUploadCosts({ bytes: [1024] }); + const { winc, adjustments } = uploadCostForFile; + ``` + +- `uploadSignedDataItem({ dataItemStreamFactory, dataItemSizeFactory, signal })` - Uploads a signed data item. The provided `dataItemStreamFactory` should produce a NEW signed data item stream each time is it invoked. The `dataItemSizeFactory` is a function that returns the size of the file. The `signal` is an optional [AbortSignal] that can be used to cancel the upload or timeout the request. + + ```typescript + const filePath = path.join(__dirname, './my-signed-data-item'); + const dataItemSize = fs.statSync(filePath).size; + const uploadResponse = await turbo.uploadSignedDataItem({ + dataItemStreamFactory: () => fs.createReadStream(filePath), + dataItemSizeFactory: () => dataItemSize, + signal: AbortSignal.timeout(10_000), // cancel the upload after 10 seconds + }); + ``` + +- `createCheckoutSession({ amount, owner })` - 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 [TurboAuthenticatedClient]. + + ```typescript + const { url, winc, paymentAmount, quotedPaymentAmount, adjustments } = + await turbo.createCheckoutSession({ + amount: USD(10.0), // $10.00 USD + owner: publicArweaveAddress, + // promo codes require an authenticated client + }); + + // Open checkout session in a browser + if (process.platform === 'darwin') { + // macOS + exec(`open ${url}`); + } else if (process.platform === 'win32') { + // Windows + exec(`start "" "${url}"`, { shell: true }); + } else { + // Linux/Unix + open(url); + } + ``` + +### TurboAuthenticatedClient + +- `getBalance()` - Issues a signed request to get the credit balance of a wallet measured in AR (measured in Winston Credits, or winc). + + ```typescript + const { winc: balance } = await turbo.getBalance(); + ``` + +- `getWincForFiat({ amount, promoCodes })` - Returns the current amount of Winston Credits including all adjustments for the provided fiat currency, amount, and optional promo codes. + + ```typescript + const { winc, paymentAmount, quotedPaymentAmount, adjustments } = + await turbo.getWincForFiat({ + amount: USD(100), + promoCodes: ['MY_PROMO_CODE'], // promo codes require an authenticated client + }); + ``` + +- `createCheckoutSession({ amount, owner, promoCodes })` - 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. + + ```typescript + const { url, winc, paymentAmount, quotedPaymentAmount, adjustments } = + await turbo.createCheckoutSession({ + amount: USD(10.0), // $10.00 USD + owner: publicArweaveAddress, + promoCodes: ['MY_PROMO_CODE'], // promo codes require an authenticated client + }); + + // Open checkout session in a browser + if (process.platform === 'darwin') { + // macOS + exec(`open ${url}`); + } else if (process.platform === 'win32') { + // Windows + exec(`start "" "${url}"`, { shell: true }); + } else { + // Linux/Unix + open(url); + } + ``` + +- `uploadFile({ fileStreamFactory, fileSizeFactory, signal })` - Signs and uploads a raw file. The provided `fileStreamFactory` should produce a NEW file data stream each time is it invoked. The `fileSizeFactory` is a function that returns the size of the file. The `signal` is an optional [AbortSignal] that can be used to cancel the upload or timeout the request. + + ```typescript + const filePath = path.join(__dirname, './my-unsigned-file.txt'); + const fileSize = fs.stateSync(filePath).size; + const uploadResult = await turbo.uploadFile({ + fileStreamFactory: () => fs.createReadStream(filePath), + fileSizeFactory: () => fileSize, + // 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. + +[package.json]: https://github.com/ardriveapp/turbo-sdk/blob/main/package.json +[examples]: https://github.com/ardriveapp/turbo-sdk/tree/main/examples +[TurboAuthenticatedClient]: #turboauthenticatedclient +[AbortSignal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal From df8a87326d419550caa7976bb644b8373472a746 Mon Sep 17 00:00:00 2001 From: Dylan Fiedler Date: Tue, 26 Sep 2023 19:03:53 -0500 Subject: [PATCH 05/11] chore: update example in turbo sdk readme (#10) * chore: update examples * chore: fix links --- docs/src/docs/turbo/turbo-sdk/index.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/src/docs/turbo/turbo-sdk/index.md b/docs/src/docs/turbo/turbo-sdk/index.md index 3913518..b5559c8 100644 --- a/docs/src/docs/turbo/turbo-sdk/index.md +++ b/docs/src/docs/turbo/turbo-sdk/index.md @@ -102,8 +102,9 @@ const rates = await turbo.getFiatRates(); #### Browser ```html - - From d7e2c395be595d679e1bd4dd0691a2fc22100f50 Mon Sep 17 00:00:00 2001 From: bobinstein Date: Thu, 28 Sep 2023 21:25:59 -0400 Subject: [PATCH 06/11] docs: Added permasite page --- .../theme/configs/default_sidebar_config.js | 4 + docs/src/docs/misc/permasite.md | 85 +++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 docs/src/docs/misc/permasite.md diff --git a/docs/src/.vuepress/theme/configs/default_sidebar_config.js b/docs/src/.vuepress/theme/configs/default_sidebar_config.js index d38f00d..e6b7bb8 100644 --- a/docs/src/.vuepress/theme/configs/default_sidebar_config.js +++ b/docs/src/.vuepress/theme/configs/default_sidebar_config.js @@ -132,6 +132,10 @@ module.exports = [ { title: "Misc.", children: [ + // { + // title: "Permasites", + // path: "/docs/misc/permasite" + // }, { title: "Price Calculator", path: "/docs/misc/price-calculator", diff --git a/docs/src/docs/misc/permasite.md b/docs/src/docs/misc/permasite.md new file mode 100644 index 0000000..4517813 --- /dev/null +++ b/docs/src/docs/misc/permasite.md @@ -0,0 +1,85 @@ +# How to Save a Website Permanently + +## Overview + +ArDrive offers the ability to save working copies of static websites permanently on [Arweave](https://www.arweave.org/). This means that websites made on WordPress, Wix, SquareSpace and other CMS platforms can now be archived for hundreds of years without the need to pay for ongoing data storage. + +Resources like the [Wayback Machine](https://archive.org/web/) are useful to research the past life of old websites. But the Wayback Machine’s archives are not comprehensive and often only capture partial copies of historic sites. By leveraging the utility of Arweave manifests, ArDrive offers the ability to save full working copies of websites in an unchanging, permanent state without needing to code. + +The process to make a ‘permasite’ takes 10 steps which are outlined below. Advanced users can accomplish similar results by using manifests within the [ArDrive CLI](../cli/intro.md). + +## 1. Download Static Site Files + +ArDrive preserves static copies of existing websites. It will not enable backend interaction with your website’s CMS, allow you to make further changes to the content of your site, or support functionality like contact forms and eCommerce. But it will preserve full working copies of the static content of existing websites. + +To generate your static site files, we recommend [Offline Pages Pro](https://apps.apple.com/us/app/offline-pages-pro/id391462107) (Mac users only), which creates files that work well with this process. After saving your site with Offline Pages Pro, go to File > Export > Local Website to download the local static files. + +Alternatively, the plugin [Simply Static](https://wordpress.org/plugins/simply-static/) generates static files for WordPress websites. Simply Static can fail to properly associate CSS and JS files with your static site, but some users have had success with this free WordPress plugin. + +Other tools, like [Wget](https://www.gnu.org/software/wget/), help capture static versions of websites. While Wget isn't a traditional static site generator, it's great for downloading whole websites for offline use. It offers a simple way to save your site's current look and feel as static files at no cost. + +## 2. Create an Account on ArDrive + +Account creation is free as are uploads of files up to 500 KB. Remember that ArDrive has self-sovereign data; no corporation has your password. Make sure you don’t lose your password, keyfile and seed phrase - they can’t be recovered later. + +## 3. Create a New Public Drive + +Click on the red +New button and create a Drive. Name your Drive and set it as “Public”. Currently, permanent websites can only be stored publicly. + +## 4. Top Up + +Buy ArDrive Turbo credits with a credit card (or ensure your wallet has AR, the native token of the Arweave ecosystem). This will enable you to purchase storage on the Arweave blockchain. Most websites will cost less than $1 to save permanently. [See current prices](https://ardrive.io/pricing/) + +## 5. Upload Static Files + +Upload the static files to your new Public Drive. Offline Pages Pro will generate an index.html file that is *separate* from a large folder of assets (images, css, fonts, etc). Simply Static will add the index.html file to the rest of your assets. Either way, upload all the files you receive from your static site generator to your new Public Drive. + +## 6. Wait + +Permanence takes patience. Once static files have been uploaded, they need to be sent to the Arweave network before being assembled together. This process can take as little as 5 seconds (when using Turbo credits) or up to 30 minutes or more (when using AR at a time of high network use). Make sure to keep your browser tab open and don’t refresh your browser while you wait. + +Instead, hit the refresh icon in the top right of ArDrive to check on the status of your files. You’ll know your file is ready when the light on the icon turns from yellow to green. (Pro Tip: some files uploaded with Turbo are ready before they are green.) + +## 7. Create a Manifest + +Manifests are special `.json` files that instruct Arweave Gateways to map file data associated with specific, unique transaction IDs to customized, hosted paths relative to that of the manifest file itself.” In other words, they are the secret sauce that brings a permasite together. + +Click on the red +New button and select Advanced > New Manifest. Select the location for your manifest, ensuring it is in the same placeas your index.html file. + +Give your Manifest a name like “permasite”, it will be the main way you access your permanent website from ArDrive. + +## 8. Wait Again + +Now the manifest needs to be sent to the Arweave network. Again, this process can take just a few seconds or up to 30 minutes or more. + +After a while, refresh your Drive by clicking on the icon in the upper right – and see if your manifest icon turns from yellow to green. + +## 9. Preview the Manifest + +Got a green light? You’re ready to go. Click on your manifest file and you’ll see a panel of options appear on the right side of your screen. Click on the Preview icon in the top right and it will open a new tab with your permasite. + +If a website appears with a long, random-looking URL in the browser bar, you have a permasite. + +Try clicking around and make sure all your pages are preserved. If they aren’t it could be a limitation of your static site generator or an issue with the manifest (see Notes below). + +## 10. Add a Redirect or Domain Masking + +You’ll notice that your permasite has a long, random-looking URL generated by Arweave. These long URLs are designed to remain for decades, but they also are not very memorable. + +Try redirecting another domain to your permasite, or mask your permasite domain with a domain of your choosing. You can also acquire an [ArNS name](https://ar.io/docs/arns/) that enables you to create a custom, permanent name for your permasite. + +## Notes + + • There’s no delete button with Arweave. Once your permasite is up, it’s up forever. Make sure your content is something you want future humanity to have. + + • Only static sites can become permasites through the ArDrive web app. Advanced functionality is available for developers who use the [ArDrive CLI](https://app.ardrive.io). + + • Links to content on external websites will not be permanent (unless they are also permasites) and if that external content becomes inaccessible or moves, you will not be able to update the links within your permasite. + + • Non-English characters in the URLs of your permasite can be problematic for ArDrive manifests, but non-English characters should work well on the permasite itself. + +## Applications + +Permasites can be used to archive web content before it disappears from the internet. Or they can be used to create working copies of websites before it a particular site is replaced by a new version. + +Manifests can also be used to make reliable perma-backups. Many web hosts offer good daily backups and some offer reliable offsite backups as well. Permasites enable you to have decentralized, highly-redundant backups of your website’s content for a very low cost. \ No newline at end of file From 558271dcac41ede8b3c0504e78dd0b22acc01e67 Mon Sep 17 00:00:00 2001 From: bobinstein Date: Sun, 1 Oct 2023 16:11:38 -0400 Subject: [PATCH 07/11] docs: Permasite docs update --- docs/src/docs/misc/permasite.md | 56 ++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/docs/src/docs/misc/permasite.md b/docs/src/docs/misc/permasite.md index 4517813..77d8820 100644 --- a/docs/src/docs/misc/permasite.md +++ b/docs/src/docs/misc/permasite.md @@ -10,25 +10,37 @@ The process to make a ‘permasite’ takes 10 steps which are outlined below. ## 1. Download Static Site Files -ArDrive preserves static copies of existing websites. It will not enable backend interaction with your website’s CMS, allow you to make further changes to the content of your site, or support functionality like contact forms and eCommerce. But it will preserve full working copies of the static content of existing websites. +ArDrive allows you to preserve full working copies of the static content of existing websites but there are a few limitations to be aware of: +- Permanent sites will not enable backend interaction with your website’s CMS, +- nor allow you to make further changes to the content of your site, +- nor support dynamic functionality like contact forms and eCommerce. -To generate your static site files, we recommend [Offline Pages Pro](https://apps.apple.com/us/app/offline-pages-pro/id391462107) (Mac users only), which creates files that work well with this process. After saving your site with Offline Pages Pro, go to File > Export > Local Website to download the local static files. +To generate your static site files, we recommend: -Alternatively, the plugin [Simply Static](https://wordpress.org/plugins/simply-static/) generates static files for WordPress websites. Simply Static can fail to properly associate CSS and JS files with your static site, but some users have had success with this free WordPress plugin. +*Windows Users* +[WebCopy](https://www.cyotek.com/cyotek-webcopy) and [HtTrack](https://www.httrack.com/) enable Windows users to download static copies of entire websites. -Other tools, like [Wget](https://www.gnu.org/software/wget/), help capture static versions of websites. While Wget isn't a traditional static site generator, it's great for downloading whole websites for offline use. It offers a simple way to save your site's current look and feel as static files at no cost. +*Mac Users* +[Offline Pages Pro](https://apps.apple.com/us/app/offline-pages-pro/id391462107) (Mac users only), which creates files that work well with this process. After saving your site with Offline Pages Pro, go to File > Export > Local Website to download the local static files. +[SiteSucker](https://ricks-apps.com/osx/sitesucker/index.html) is another option for Mac users. + +*Command Line Utility* +[Wget](https://www.gnu.org/software/wget/) is a free tool that helps capture static versions of websites. While Wget isn't a traditional static site generator, it's great for downloading whole websites for offline use. It offers a simple way to save your site's current look and feel as static files at no cost. + +*WordPress* +[Simply Static]((https://wordpress.org/plugins/simply-static/)) is a plugin that generates static files for WordPress websites. Some users note that Simply Static fails to properly associate CSS and JS files with your static site, but others have had success with this free WordPress plugin. ## 2. Create an Account on ArDrive -Account creation is free as are uploads of files up to 500 KB. Remember that ArDrive has self-sovereign data; no corporation has your password. Make sure you don’t lose your password, keyfile and seed phrase - they can’t be recovered later. +Account creation is free as are uploads of small files (currently up to 500 KB). Remember that ArDrive empowers you to be in control of your data; no one else has your password but you. Therefore, it is very important that you safely record your password and seed phrase as they cannot be recovered later. ## 3. Create a New Public Drive -Click on the red +New button and create a Drive. Name your Drive and set it as “Public”. Currently, permanent websites can only be stored publicly. +Click on the red +New button and create a Drive. Name your Drive and set it as “Public”. ArDrive also offers “Private” file storage; however, permanent websites must be public in order to maintain functionality. ## 4. Top Up -Buy ArDrive Turbo credits with a credit card (or ensure your wallet has AR, the native token of the Arweave ecosystem). This will enable you to purchase storage on the Arweave blockchain. Most websites will cost less than $1 to save permanently. [See current prices](https://ardrive.io/pricing/) +To pay for permanent storage on the Arweave network you must either purchase ArDrive Turbo credits with a credit card or (or the advanced option) ensure your wallet has $AR, the native token of the Arweave ecosystem. Most websites will cost less than $1 to save permanently. [See current prices](https://ardrive.io/pricing/) ## 5. Upload Static Files @@ -36,15 +48,15 @@ Upload the static files to your new Public Drive. Offline Pages Pro will generat ## 6. Wait -Permanence takes patience. Once static files have been uploaded, they need to be sent to the Arweave network before being assembled together. This process can take as little as 5 seconds (when using Turbo credits) or up to 30 minutes or more (when using AR at a time of high network use). Make sure to keep your browser tab open and don’t refresh your browser while you wait. +Permanence takes patience. Once static files have been uploaded, they need to be sent to the Arweave network before being assembled together. This process can take as little as 5 seconds (when using Turbo credits) or up to 30 minutes or more (when using $AR). Make sure to keep your browser tab open and do not refresh your browser while you wait. -Instead, hit the refresh icon in the top right of ArDrive to check on the status of your files. You’ll know your file is ready when the light on the icon turns from yellow to green. (Pro Tip: some files uploaded with Turbo are ready before they are green.) +To check on the status of your files, you can click the refresh icon in the top right of ArDrive. You’ll know your file is ready when the light on the icon turns from yellow to green. (Pro Tip: some files uploaded with Turbo are ready before they are green.) ## 7. Create a Manifest -Manifests are special `.json` files that instruct Arweave Gateways to map file data associated with specific, unique transaction IDs to customized, hosted paths relative to that of the manifest file itself.” In other words, they are the secret sauce that brings a permasite together. +[Manifests](https://ardrive.io/manifests/) are special `.json` files that instruct Arweave Gateways to map file data associated with specific, unique transaction IDs to customized, hosted paths relative to that of the manifest file itself. In other words, they are the secret sauce that brings a permasite together. -Click on the red +New button and select Advanced > New Manifest. Select the location for your manifest, ensuring it is in the same placeas your index.html file. +Click on the red +New button and select Advanced > New Manifest. Select the location for your manifest, ensuring it is in the same place as your index.html file. Give your Manifest a name like “permasite”, it will be the main way you access your permanent website from ArDrive. @@ -52,15 +64,15 @@ Give your Manifest a name like “permasite”, it will be the main way you acce Now the manifest needs to be sent to the Arweave network. Again, this process can take just a few seconds or up to 30 minutes or more. -After a while, refresh your Drive by clicking on the icon in the upper right – and see if your manifest icon turns from yellow to green. +After a bit, you can refresh your Drive by clicking on the icon in the upper right – and see if your manifest icon turns from yellow to green. ## 9. Preview the Manifest -Got a green light? You’re ready to go. Click on your manifest file and you’ll see a panel of options appear on the right side of your screen. Click on the Preview icon in the top right and it will open a new tab with your permasite. +Got a green light? You’re ready to go. Click on your manifest file and you will see a panel of options appear on the right side of your screen. Click on the Preview icon in the top right and it will open a new tab with your permasite. -If a website appears with a long, random-looking URL in the browser bar, you have a permasite. +If a website appears with a long, random-looking URL in the browser bar, then congrats, you made a permasite! -Try clicking around and make sure all your pages are preserved. If they aren’t it could be a limitation of your static site generator or an issue with the manifest (see Notes below). +Try clicking around and make sure all your pages are preserved. If they are not it could be a limitation of your static site generator or an issue with the manifest (see Notes below). ## 10. Add a Redirect or Domain Masking @@ -70,16 +82,16 @@ Try redirecting another domain to your permasite, or mask your permasite domain ## Notes - • There’s no delete button with Arweave. Once your permasite is up, it’s up forever. Make sure your content is something you want future humanity to have. +- There’s no delete button with Arweave. Once your permasite is up, it’s up forever. Make sure your content is something you want future humanity to have. - • Only static sites can become permasites through the ArDrive web app. Advanced functionality is available for developers who use the [ArDrive CLI](https://app.ardrive.io). +- Only static sites can become permasites through the ArDrive web app. Advanced functionality is available for developers who use the [ArDrive CLI](https://app.ardrive.io). - • Links to content on external websites will not be permanent (unless they are also permasites) and if that external content becomes inaccessible or moves, you will not be able to update the links within your permasite. +- Links to content on external websites will not be permanent (unless they are also permasites) and if that external content becomes inaccessible or moves, you will not be able to update the links within your permasite. - • Non-English characters in the URLs of your permasite can be problematic for ArDrive manifests, but non-English characters should work well on the permasite itself. +- Non-English characters in the URLs of your permasite can be problematic for ArDrive manifests, but non-English characters should work well on the permasite itself. -## Applications +## Other Use Cases -Permasites can be used to archive web content before it disappears from the internet. Or they can be used to create working copies of websites before it a particular site is replaced by a new version. +Permasites can be used to archive web content before it disappears from the internet. Or they can be used to create working copies of websites before it a particular site is replaced by new versions. -Manifests can also be used to make reliable perma-backups. Many web hosts offer good daily backups and some offer reliable offsite backups as well. Permasites enable you to have decentralized, highly-redundant backups of your website’s content for a very low cost. \ No newline at end of file +Manifests can also be used to make reliable perma-backups. Many web hosts offer good daily backups and some offer reliable offsite backups as well. Permasites enable you to have decentralized, highly-redundant backups of your website’s content for a very low cost. \ No newline at end of file From 29b4574b188bee98efcd5d865c36e4b871932dca Mon Sep 17 00:00:00 2001 From: bobinstein Date: Sat, 7 Oct 2023 15:10:13 -0400 Subject: [PATCH 08/11] fix: fix typo --- docs/src/docs/misc/permasite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/docs/misc/permasite.md b/docs/src/docs/misc/permasite.md index 77d8820..8b8c5f4 100644 --- a/docs/src/docs/misc/permasite.md +++ b/docs/src/docs/misc/permasite.md @@ -28,7 +28,7 @@ To generate your static site files, we recommend: [Wget](https://www.gnu.org/software/wget/) is a free tool that helps capture static versions of websites. While Wget isn't a traditional static site generator, it's great for downloading whole websites for offline use. It offers a simple way to save your site's current look and feel as static files at no cost. *WordPress* -[Simply Static]((https://wordpress.org/plugins/simply-static/)) is a plugin that generates static files for WordPress websites. Some users note that Simply Static fails to properly associate CSS and JS files with your static site, but others have had success with this free WordPress plugin. +[Simply Static](https://wordpress.org/plugins/simply-static/) is a plugin that generates static files for WordPress websites. Some users note that Simply Static fails to properly associate CSS and JS files with your static site, but others have had success with this free WordPress plugin. ## 2. Create an Account on ArDrive From 96a3dde2ab5cb32632f52846fdb55daf06e7ff1e Mon Sep 17 00:00:00 2001 From: bobinstein Date: Sat, 7 Oct 2023 17:56:39 -0400 Subject: [PATCH 09/11] docs: update to permasite page --- docs/src/docs/misc/deploy/examples.md | 6 +++++- docs/src/docs/misc/permasite.md | 15 +++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/src/docs/misc/deploy/examples.md b/docs/src/docs/misc/deploy/examples.md index d221e62..b7abd30 100644 --- a/docs/src/docs/misc/deploy/examples.md +++ b/docs/src/docs/misc/deploy/examples.md @@ -19,4 +19,8 @@ A React dApp created using Create-React-App: A Nextjs dApp created using Create-Next-App: -[01hMcPNA_TEXh1S7p4f6jop7r4lrElF1mIlAwkzhJ_s](https://arweave.net/01hMcPNA_TEXh1S7p4f6jop7r4lrElF1mIlAwkzhJ_s) \ No newline at end of file +[01hMcPNA_TEXh1S7p4f6jop7r4lrElF1mIlAwkzhJ_s](https://arweave.net/01hMcPNA_TEXh1S7p4f6jop7r4lrElF1mIlAwkzhJ_s) + +## WordPress + +[ilP8KEFm0jGAhjEP6e7ZlS7s6BV1NgGJnlw7OfiD5kU](https://arweave.net/ilP8KEFm0jGAhjEP6e7ZlS7s6BV1NgGJnlw7OfiD5kU) \ No newline at end of file diff --git a/docs/src/docs/misc/permasite.md b/docs/src/docs/misc/permasite.md index ecb677f..30f415f 100644 --- a/docs/src/docs/misc/permasite.md +++ b/docs/src/docs/misc/permasite.md @@ -17,17 +17,21 @@ ArDrive allows you to preserve full working copies of the static content of exis To generate your static site files, we recommend: -*Windows Users* +### Windows Users + [WebCopy](https://www.cyotek.com/cyotek-webcopy) and [HtTrack](https://www.httrack.com/) enable Windows users to download static copies of entire websites. -*Mac Users* +### Mac Users + [Offline Pages Pro](https://apps.apple.com/us/app/offline-pages-pro/id391462107) (Mac users only), which creates files that work well with this process. After saving your site with Offline Pages Pro, go to File > Export > Local Website to download the local static files. [SiteSucker](https://ricks-apps.com/osx/sitesucker/index.html) is another option for Mac users. -*Command Line Utility* +### Command Line Utility + [Wget](https://www.gnu.org/software/wget/) is a free tool that helps capture static versions of websites. While Wget isn't a traditional static site generator, it's great for downloading whole websites for offline use. It offers a simple way to save your site's current look and feel as static files at no cost. -*WordPress* +### WordPress + [Simply Static](https://wordpress.org/plugins/simply-static/) is a plugin that generates static files for WordPress websites. Some users note that Simply Static fails to properly associate CSS and JS files with your static site, but others have had success with this free WordPress plugin. ## 2. Create an Account on ArDrive @@ -97,3 +101,6 @@ Permasites can be used to archive web content before it disappears from the inte Manifests can also be used to make reliable perma-backups. Many web hosts offer good daily backups and some offer reliable offsite backups as well. Permasites enable you to have decentralized, highly-redundant backups of your website’s content for a very low cost. +## Example + +You can view a permasite version of this information at [permasite.arweave.dev](https://permasite.arweave.dev) \ No newline at end of file From 958d555ff17ee9843be590b06ca99b72314f8c9d Mon Sep 17 00:00:00 2001 From: bobinstein Date: Mon, 9 Oct 2023 20:18:46 -0400 Subject: [PATCH 10/11] docs: Update and publish permasite page --- .../src/.vuepress/theme/configs/default_sidebar_config.js | 8 ++++---- docs/src/docs/misc/permasite.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/src/.vuepress/theme/configs/default_sidebar_config.js b/docs/src/.vuepress/theme/configs/default_sidebar_config.js index e6b7bb8..25b7d4d 100644 --- a/docs/src/.vuepress/theme/configs/default_sidebar_config.js +++ b/docs/src/.vuepress/theme/configs/default_sidebar_config.js @@ -132,10 +132,10 @@ module.exports = [ { title: "Misc.", children: [ - // { - // title: "Permasites", - // path: "/docs/misc/permasite" - // }, + { + title: "Permasites", + path: "/docs/misc/permasite" + }, { title: "Price Calculator", path: "/docs/misc/price-calculator", diff --git a/docs/src/docs/misc/permasite.md b/docs/src/docs/misc/permasite.md index 376332c..b1e8047 100644 --- a/docs/src/docs/misc/permasite.md +++ b/docs/src/docs/misc/permasite.md @@ -8,6 +8,9 @@ Resources like the [Wayback Machine](https://archive.org/web/) are useful to res The process to make a ‘permasite’ takes 10 steps which are outlined below. Advanced users can accomplish similar results by using manifests within the [ArDrive CLI](../cli/intro.md). +You can view a permasite version of this information at [permasite.arweave.dev](https://permasite.arweave.dev) + + ## 1. Download Static Site Files ArDrive allows you to preserve full working copies of the static content of existing websites but there are a few limitations to be aware of: @@ -101,6 +104,3 @@ Permasites can be used to archive web content before it disappears from the inte Manifests can also be used to make reliable perma-backups. Many web hosts offer good daily backups and some offer reliable offsite backups as well. Permasites enable you to have decentralized, highly-redundant backups of your website’s content for a very low cost. -## Example - -You can view a permasite version of this information at [permasite.arweave.dev](https://permasite.arweave.dev) From 6fb4b90456dec3d6fb8d79982e6b340509a92699 Mon Sep 17 00:00:00 2001 From: bobinstein Date: Mon, 20 Nov 2023 10:06:20 -0500 Subject: [PATCH 11/11] chore: updated zendesk link --- docs/src/.vuepress/theme/components/Navbar.vue | 2 +- docs/src/docs/arfs/privacy.md | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/src/.vuepress/theme/components/Navbar.vue b/docs/src/.vuepress/theme/components/Navbar.vue index 4327b6f..497b335 100644 --- a/docs/src/.vuepress/theme/components/Navbar.vue +++ b/docs/src/.vuepress/theme/components/Navbar.vue @@ -27,7 +27,7 @@ >