diff --git a/content/sdks/(clis)/ardrive-cli/(other-utility-operations)/persistent-caching-of-arfs-entity-metadata.mdx b/content/sdks/(clis)/ardrive-cli/(other-utility-operations)/persistent-caching-of-arfs-entity-metadata.mdx index 611c1d745..f7107c458 100644 --- a/content/sdks/(clis)/ardrive-cli/(other-utility-operations)/persistent-caching-of-arfs-entity-metadata.mdx +++ b/content/sdks/(clis)/ardrive-cli/(other-utility-operations)/persistent-caching-of-arfs-entity-metadata.mdx @@ -108,7 +108,7 @@ ardrive \ --help [arconnect]: https://arconnect.io/ [kb-wallets]: https://ardrive.atlassian.net/l/c/FpK8FuoQ [arweave-manifests]: https://github.com/ArweaveTeam/arweave/wiki/Path-Manifests -[example-manifest-webpage]: https://turbo-gateway.com/qozq9YIUPEHfZhoTp9DkBpJuA_KNULBnfLiMroj5pZI +[example-manifest-webpage]: https://arweave.net/qozq9YIUPEHfZhoTp9DkBpJuA_KNULBnfLiMroj5pZI [arlocal]: https://github.com/textury/arlocal [mozilla-mime-types]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types [viewblock]: https://viewblock.io/arweave/ diff --git a/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-a-custom-manifest.mdx b/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-a-custom-manifest.mdx index b4bfd5daa..c2c5aab82 100644 --- a/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-a-custom-manifest.mdx +++ b/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-a-custom-manifest.mdx @@ -24,7 +24,7 @@ ardrive upload-file --content-type "application/x.arweave-manifest+json" --local The returned `dataTxId` field on the created `file` entity will be the endpoint that the manifest can be found on Arweave, just as explained in the [manifest sections](#uploading-manifests) above: ```shell -https://turbo-gateway.com/{dataTxId} -https://turbo-gateway.com/{dataTxId}/custom-file-1 -https://turbo-gateway.com/{dataTxId}/custom-file-2 +https://arweave.net/{dataTxId} +https://arweave.net/{dataTxId}/custom-file-1 +https://arweave.net/{dataTxId}/custom-file-2 ``` \ No newline at end of file diff --git a/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-files-with-custom-metadata.mdx b/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-files-with-custom-metadata.mdx index f36a0781f..5e7c0220b 100644 --- a/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-files-with-custom-metadata.mdx +++ b/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-files-with-custom-metadata.mdx @@ -32,7 +32,7 @@ e.g: When the custom metadata is attached to the MetaData Transaction's GQL tags, they will become visible on any Arweave GQL gateway and also third party tools that read GQL data. -When these tags are added to the MetaData Transaction's Data JSON they can be read by downloading the JSON data directly from `https://turbo-gateway.com/METADATA_TX_ID`. +When these tags are added to the MetaData Transaction's Data JSON they can be read by downloading the JSON data directly from `https://arweave.net/METADATA_TX_ID`. To add this custom metadata to your file metadata transactions, CLI users can pass custom metadata these parameters: diff --git a/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-manifests.mdx b/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-manifests.mdx index 468c59945..ab48e551d 100644 --- a/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-manifests.mdx +++ b/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-manifests.mdx @@ -3,17 +3,17 @@ title: "Uploading Manifests" description: "Command line interface for ArDrive" --- -[Arweave Path Manifests][arweave-manifests] are 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. So if, for example, your manifest file had an turbo-gateway.com URL like: +[Arweave Path Manifests][arweave-manifests] are 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. So if, for example, your manifest file had an arweave.net URL like: ```shell -https://turbo-gateway.com/{manifest tx id} +https://arweave.net/{manifest tx id} ``` Then, all the mapped transactions and paths in the manifest file would be addressable at URLs like: ```shell -https://turbo-gateway.com/{manifest tx id}/foo.txt -https://turbo-gateway.com/{manifest tx id}/bar/baz.png +https://arweave.net/{manifest tx id}/foo.txt +https://arweave.net/{manifest tx id}/bar/baz.png ``` ArDrive supports the creation of these Arweave manifests using any of your PUBLIC folders. The generated manifest paths will be links to each of the file entities within the specified folder. The manifest file entity will be created at the root of the folder. @@ -108,10 +108,10 @@ In the return output, the top link will be a link to the deployed web app: ```shell "links": [ - "https://turbo-gateway.com/0MK68J8TqGhaaOpPe713Zn0jdpczMt2NGS2CtRYiuAg", - "https://turbo-gateway.com/0MK68J8TqGhaaOpPe713Zn0jdpczMt2NGS2CtRYiuAg/asset-manifest.json", - "https://turbo-gateway.com/0MK68J8TqGhaaOpPe713Zn0jdpczMt2NGS2CtRYiuAg/favicon.ico", - "https://turbo-gateway.com/0MK68J8TqGhaaOpPe713Zn0jdpczMt2NGS2CtRYiuAg/index.html", + "https://arweave.net/0MK68J8TqGhaaOpPe713Zn0jdpczMt2NGS2CtRYiuAg", + "https://arweave.net/0MK68J8TqGhaaOpPe713Zn0jdpczMt2NGS2CtRYiuAg/asset-manifest.json", + "https://arweave.net/0MK68J8TqGhaaOpPe713Zn0jdpczMt2NGS2CtRYiuAg/favicon.ico", + "https://arweave.net/0MK68J8TqGhaaOpPe713Zn0jdpczMt2NGS2CtRYiuAg/index.html", # ... ``` diff --git a/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-with-a-custom-content-type.mdx b/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-with-a-custom-content-type.mdx index 24717488c..85351f11f 100644 --- a/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-with-a-custom-content-type.mdx +++ b/content/sdks/(clis)/ardrive-cli/(working-with-files)/uploading-with-a-custom-content-type.mdx @@ -3,7 +3,7 @@ title: "Uploading With a Custom Content Type" description: "Command line interface for ArDrive" --- -Each file uploaded to the Arweave network receives a `"Content-Type"` GraphQL tag that contains the MIME type for the file. The gateway will use this content type to determine how to serve that file's data transaction at the `turbo-gateway.com/{data tx id}` endpoint. +Each file uploaded to the Arweave network receives a `"Content-Type"` GraphQL tag that contains the MIME type for the file. The gateway will use this content type to determine how to serve that file's data transaction at the `arweave.net/{data tx id}` endpoint. By default, the CLI will attempt to derive this content type from the file extension of the provided file. In most cases, the content type that is derived will be correct and the gateway will properly serve the file. diff --git a/content/sdks/(clis)/ario-deploy/(claude-code-integration)/add-the-skill-to-your-project.mdx b/content/sdks/(clis)/ario-deploy/(claude-code-integration)/add-the-skill-to-your-project.mdx new file mode 100644 index 000000000..dfb4bac55 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(claude-code-integration)/add-the-skill-to-your-project.mdx @@ -0,0 +1,17 @@ +--- +title: "Add the Skill to Your Project" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +```bash +mkdir -p .claude/skills +curl -o .claude/skills/deploy.md https://raw.githubusercontent.com/ar-io/ar-io-deploy/main/examples/claude-skill/deploy.md +``` + +Then in Claude Code, say: + +- "deploy to ar.io" +- "deploy my app to arweave" +- "set up CI/CD for ar.io deployment" + +Claude will build your project, detect the output folder, and run the deploy with the right flags. \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(claude-code-integration)/meta.json b/content/sdks/(clis)/ario-deploy/(claude-code-integration)/meta.json new file mode 100644 index 000000000..7197eefea --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(claude-code-integration)/meta.json @@ -0,0 +1,8 @@ +{ + "title": "Claude Code Integration", + "pages": [ + "add-the-skill-to-your-project", + "what-the-skill-does" + ], + "defaultOpen": false +} \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(claude-code-integration)/what-the-skill-does.mdx b/content/sdks/(clis)/ario-deploy/(claude-code-integration)/what-the-skill-does.mdx new file mode 100644 index 000000000..c92496648 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(claude-code-integration)/what-the-skill-does.mdx @@ -0,0 +1,14 @@ +--- +title: "What the Skill Does" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +1. **Detects your build folder** (`./dist`, `./build`, `./out`) +2. **Checks for credentials** (`DEPLOY_KEY` env var or wallet file) +3. **Installs `@ar.io/deploy`** if not already available +4. **Runs the deployment** with appropriate flags +5. **Reports results** — transaction ID, Arweave URL, ArNS URL + +See [`examples/claude-skill/`](./examples/claude-skill/) for the full skill file and customization options. + +--- \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(commands)/advanced-usage.mdx b/content/sdks/(clis)/ario-deploy/(commands)/advanced-usage.mdx new file mode 100644 index 000000000..30fc20968 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(commands)/advanced-usage.mdx @@ -0,0 +1,35 @@ +--- +title: "Advanced Usage" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +Deploy to an undername (subdomain) — the ArNS authority key is a Solana wallet: + +```bash +ario-deploy deploy --use-arns --arns-name my-app --wallet ./wallet.json --arns-wallet ./arns-id.json --undername staging +``` + +Deploy with a custom TTL: + +```bash +ario-deploy deploy --use-arns --arns-name my-app --wallet ./wallet.json --arns-wallet ./arns-id.json --ttl-seconds 7200 +``` + +Update ArNS on devnet (or against a custom RPC): + +```bash +ario-deploy deploy --use-arns --arns-name my-app --wallet ./wallet.json --arns-wallet ./arns-id.json --cluster devnet +ario-deploy deploy --use-arns --arns-name my-app --wallet ./wallet.json --arns-wallet ./arns-id.json --rpc-url https://my-rpc.example.com +``` + +Upload using an Ethereum wallet (file): + +```bash +ario-deploy deploy --sig-type ethereum --wallet ./private-key.txt +``` + +Upload using a Solana wallet (base58 private key): + +```bash +ario-deploy deploy --sig-type solana --private-key "\" +``` \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(commands)/direct-commands.mdx b/content/sdks/(clis)/ario-deploy/(commands)/direct-commands.mdx new file mode 100644 index 000000000..e7bb77c3f --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(commands)/direct-commands.mdx @@ -0,0 +1,36 @@ +--- +title: "Direct Commands" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +Use flags for faster, scriptable deployments: + +```bash +ario-deploy deploy --wallet ./wallet.json + +ario-deploy deploy --use-arns --arns-name my-app --wallet ./wallet.json --arns-wallet ./arns-id.json +``` + +Deploy using private key directly: + +```bash +ario-deploy deploy --private-key "$(cat wallet.json)" +``` + +Deploy using environment variable: + +```bash +DEPLOY_KEY=$(base64 -i wallet.json) ario-deploy deploy --deploy-folder ./dist +``` + +Deploy a specific folder: + +```bash +ario-deploy deploy --wallet ./wallet.json --deploy-folder ./build +``` + +Deploy a single file: + +```bash +ario-deploy deploy --wallet ./wallet.json --deploy-file ./path/to/file.txt +``` \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(commands)/interactive-mode-easiest.mdx b/content/sdks/(clis)/ario-deploy/(commands)/interactive-mode-easiest.mdx new file mode 100644 index 000000000..d75c2c720 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(commands)/interactive-mode-easiest.mdx @@ -0,0 +1,24 @@ +--- +title: "Interactive Mode (Easiest)" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +Run the deploy command without arguments to be guided through all deployment options: + +```bash +ario-deploy deploy +``` + +When ArNS details aren't supplied via flags, `deploy` asks whether you want to +update an ArNS name (defaulting to yes) and, if so, prompts for the details. It +will guide you through: + +- Whether to update an ArNS name (and which one) +- Wallet method (file, string, or environment variable) +- What to deploy (folder or file) +- Advanced options (optional: undername, TTL, Solana cluster) + +Pass `--arns-name` (or `--use-arns`) to skip the ArNS confirmation, or use the +`upload` command for an upload-only run. In a non-interactive environment (CI, +or no TTY) `deploy` does not prompt — supply everything via flags or +`DEPLOY_KEY`. \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(commands)/meta.json b/content/sdks/(clis)/ario-deploy/(commands)/meta.json new file mode 100644 index 000000000..b2a1dc3a8 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(commands)/meta.json @@ -0,0 +1,10 @@ +{ + "title": "Commands", + "pages": [ + "interactive-mode-easiest", + "direct-commands", + "upload-deploy-without-arns", + "advanced-usage" + ], + "defaultOpen": false +} \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(commands)/upload-deploy-without-arns.mdx b/content/sdks/(clis)/ario-deploy/(commands)/upload-deploy-without-arns.mdx new file mode 100644 index 000000000..6c5367ef0 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(commands)/upload-deploy-without-arns.mdx @@ -0,0 +1,13 @@ +--- +title: "Upload/deploy without ArNS" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +`deploy` uploads without updating ArNS by default. You can also use the `upload` command explicitly for the same Turbo upload, dedupe cache, and payment options as deploy, minus ArNS flags: + +```bash +ario-deploy deploy --wallet ./wallet.json --deploy-folder ./dist +ario-deploy upload --wallet ./wallet.json --deploy-folder ./dist +ario-deploy upload --wallet ./wallet.json --deploy-file ./dist/index.html +DEPLOY_KEY=$(base64 -i wallet.json) ario-deploy upload --deploy-folder ./dist +``` \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(github-action)/basic-usage.mdx b/content/sdks/(clis)/ario-deploy/(github-action)/basic-usage.mdx new file mode 100644 index 000000000..f32f80a53 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(github-action)/basic-usage.mdx @@ -0,0 +1,13 @@ +--- +title: "Basic Usage" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +```yaml +- uses: ar-io/ar-io-deploy@v1 + with: + deploy-key: ${{ secrets.DEPLOY_KEY }} # upload key (pays for the upload) + arns-key: ${{ secrets.ARNS_KEY }} # Solana ArNS authority key + arns-name: myapp + deploy-folder: ./dist +``` \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(github-action)/disabling-deduplication.mdx b/content/sdks/(clis)/ario-deploy/(github-action)/disabling-deduplication.mdx new file mode 100644 index 000000000..db73cb261 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(github-action)/disabling-deduplication.mdx @@ -0,0 +1,28 @@ +--- +title: "Disabling Deduplication" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +By default, the action caches transaction IDs to avoid re-uploading unchanged files. To disable this: + +```yaml +- name: Deploy without dedupe + uses: ar-io/ar-io-deploy@v1 + with: + deploy-key: ${{ secrets.DEPLOY_KEY }} + deploy-folder: ./dist + no-dedupe: 'true' +``` + +You can also limit the cache size: + +```yaml +- name: Deploy with limited cache + uses: ar-io/ar-io-deploy@v1 + with: + deploy-key: ${{ secrets.DEPLOY_KEY }} + deploy-folder: ./dist + dedupe-cache-max-entries: '1000' +``` + +--- \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(github-action)/meta.json b/content/sdks/(clis)/ario-deploy/(github-action)/meta.json new file mode 100644 index 000000000..948f06c1f --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(github-action)/meta.json @@ -0,0 +1,12 @@ +{ + "title": "GitHub Action", + "pages": [ + "basic-usage", + "pr-preview-deployments", + "production-deployment", + "with-on-demand-payment", + "updating-arns-solana", + "disabling-deduplication" + ], + "defaultOpen": false +} \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(github-action)/pr-preview-deployments.mdx b/content/sdks/(clis)/ario-deploy/(github-action)/pr-preview-deployments.mdx new file mode 100644 index 000000000..4cd473cb0 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(github-action)/pr-preview-deployments.mdx @@ -0,0 +1,47 @@ +--- +title: "PR Preview Deployments" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +Automatically deploy preview builds for each pull request. The `preview` mode auto-generates an undername from the PR number and posts a comment with the preview URL: + +```yaml +name: Deploy PR Preview + +on: + pull_request: + types: [opened, synchronize] + +jobs: + deploy-preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Deploy Preview + uses: ar-io/ar-io-deploy@v1 + with: + deploy-key: ${{ secrets.DEPLOY_KEY }} + arns-key: ${{ secrets.ARNS_KEY }} + arns-name: myapp + preview: 'true' + github-token: ${{ secrets.GITHUB_TOKEN }} + deploy-folder: ./dist +``` + +When `preview` is enabled, the action will: + +- Auto-generate an undername like `pr-123` from the PR number +- Post a comment on the PR with the preview URL +- Update the comment on subsequent pushes instead of creating new ones \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(github-action)/production-deployment.mdx b/content/sdks/(clis)/ario-deploy/(github-action)/production-deployment.mdx new file mode 100644 index 000000000..fa530997b --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(github-action)/production-deployment.mdx @@ -0,0 +1,39 @@ +--- +title: "Production Deployment" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +Deploy to your base ArNS name when pushing to main: + +```yaml +name: Deploy to Production + +on: + push: + branches: [main] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Deploy to Permaweb + uses: ar-io/ar-io-deploy@v1 + with: + deploy-key: ${{ secrets.DEPLOY_KEY }} + arns-key: ${{ secrets.ARNS_KEY }} + arns-name: myapp + deploy-folder: ./dist +``` \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(github-action)/updating-arns-solana.mdx b/content/sdks/(clis)/ario-deploy/(github-action)/updating-arns-solana.mdx new file mode 100644 index 000000000..6e23cc279 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(github-action)/updating-arns-solana.mdx @@ -0,0 +1,17 @@ +--- +title: "Updating ArNS (Solana)" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +ArNS updates run against the Solana ARIO programs. Provide the Solana ArNS authority key via `arns-key` (a base58 Solana secret key); the upload is still paid for by `deploy-key`. Use `cluster` to target `mainnet` (default) or `devnet`, and `rpc-url` for a custom RPC endpoint. + +```yaml +- name: Deploy and update ArNS + uses: ar-io/ar-io-deploy@v1 + with: + deploy-key: ${{ secrets.DEPLOY_KEY }} # upload key + arns-key: ${{ secrets.ARNS_KEY }} # Solana ArNS authority key + arns-name: myapp + deploy-folder: ./dist + cluster: mainnet +``` \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(github-action)/with-on-demand-payment.mdx b/content/sdks/(clis)/ario-deploy/(github-action)/with-on-demand-payment.mdx new file mode 100644 index 000000000..768770e1c --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(github-action)/with-on-demand-payment.mdx @@ -0,0 +1,16 @@ +--- +title: "With On-Demand Payment" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +```yaml +- name: Deploy with ARIO on-demand + uses: ar-io/ar-io-deploy@v1 + with: + deploy-key: ${{ secrets.DEPLOY_KEY }} + arns-key: ${{ secrets.ARNS_KEY }} + arns-name: myapp + deploy-folder: ./dist + on-demand: ario + max-token-amount: '2.0' +``` \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(prerequisites)/arns-authority-key-arns-key.mdx b/content/sdks/(clis)/ario-deploy/(prerequisites)/arns-authority-key-arns-key.mdx new file mode 100644 index 000000000..f117e99f2 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(prerequisites)/arns-authority-key-arns-key.mdx @@ -0,0 +1,8 @@ +--- +title: "ArNS authority key (ARNS_KEY)" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +Set a base58-encoded **Solana** secret key as `ARNS_KEY`, or pass a `solana-keygen` `id.json` file via `--arns-wallet` (or a base58 string via `--arns-private-key`). This key must control the ArNS name being updated. + +⚠️ **Important:** Use dedicated wallets for deployments to minimize security risks. Ensure your upload wallet has sufficient Turbo Credits for uploads. \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(prerequisites)/meta.json b/content/sdks/(clis)/ario-deploy/(prerequisites)/meta.json new file mode 100644 index 000000000..12bc3b3be --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(prerequisites)/meta.json @@ -0,0 +1,8 @@ +{ + "title": "Prerequisites", + "pages": [ + "upload-key-deploy-key", + "arns-authority-key-arns-key" + ], + "defaultOpen": false +} \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/(prerequisites)/upload-key-deploy-key.mdx b/content/sdks/(clis)/ario-deploy/(prerequisites)/upload-key-deploy-key.mdx new file mode 100644 index 000000000..289c13df9 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/(prerequisites)/upload-key-deploy-key.mdx @@ -0,0 +1,13 @@ +--- +title: "Upload key (DEPLOY_KEY)" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +1. **Arweave signer (default):** Encode your Arweave wallet key in base64 and set it as `DEPLOY_KEY`: + + ```bash + base64 -i wallet.json | pbcopy + ``` + +2. **Ethereum/Polygon/KYVE signers:** Use your raw private key (no encoding needed) as `DEPLOY_KEY`. +3. **Solana signer:** Use a base58-encoded secret key as `DEPLOY_KEY`, or a `solana-keygen` `id.json` byte-array wallet file via `--wallet`. \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/bundler-service.mdx b/content/sdks/(clis)/ario-deploy/bundler-service.mdx new file mode 100644 index 000000000..220354c6c --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/bundler-service.mdx @@ -0,0 +1,26 @@ +--- +title: "Bundler service" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +Uploads go through a bundler service that accepts signed data items and posts them to Arweave. By default, ario-deploy uses the [Turbo](https://docs.ardrive.io/docs/turbo/) API and ArDrive’s production bundler (`https://upload.ardrive.io`). **`--uploader`** sets the **base URL** of the bundler service to use (scheme + host; typically no path). + +| When to use | Example value | +| ------------------------- | ------------------------------------------------------- | +| **Default** (omit flag) | ArDrive production bundler — same as Turbo CLI defaults | +| **Arweave bundler** | `https://turbo.ardrive.io` | +| **Development / staging** | `https://upload.ardrive.dev` | +| **Custom or self-hosted** | Your own base URL if it implements the Turbo API | + +**Examples:** + +```bash +ario-deploy deploy --wallet ./wallet.json --deploy-folder ./dist --uploader https://turbo.ardrive.io + +ario-deploy upload --wallet ./wallet.json --deploy-folder ./dist --uploader https://turbo.ardrive.io +``` + +**Notes:** + +- Turbo billing and signer behavior follow Turbo. +- Use a **base URL only** (e.g. `https://turbo.ardrive.io`), not a path to a specific file or route. \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/cli-in-github-actions.mdx b/content/sdks/(clis)/ario-deploy/cli-in-github-actions.mdx new file mode 100644 index 000000000..d7da97ac8 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/cli-in-github-actions.mdx @@ -0,0 +1,84 @@ +--- +title: "CLI in GitHub Actions" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +You can also use the CLI directly in your workflows: + +**Basic Workflow:** + +```yaml +name: Deploy to Permaweb + +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v3 + with: + version: 9 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + + - run: pnpm install + + - run: pnpm deploy + env: + DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} +``` + +**With On-Demand Payment:** + +```yaml +name: Deploy to Permaweb with On-Demand Payment + +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v3 + with: + version: 9 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + + - run: pnpm install + - run: pnpm build + + - name: Deploy with ARIO on-demand + run: ario-deploy deploy --arns-name my-app --on-demand ario --max-token-amount 2.0 + env: + DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} # upload key (pays for the upload) + ARNS_KEY: ${{ secrets.ARNS_KEY }} # Solana ArNS authority key + + + # Or upload with Ethereum and Base-ETH on-demand payment (upload only; ArNS requires Solana): + # - name: Upload with Base-ETH on-demand + # run: | + # ario-deploy upload \ + # --sig-type ethereum \ + # --on-demand base-eth \ + # --max-token-amount 0.2 + # env: + # DEPLOY_KEY: ${{ secrets.ETH_PRIVATE_KEY }} +``` \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/command-options.mdx b/content/sdks/(clis)/ario-deploy/command-options.mdx new file mode 100644 index 000000000..5dd17541a --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/command-options.mdx @@ -0,0 +1,33 @@ +--- +title: "Command Options" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +**`deploy`** (upload by default, optional ArNS update): + +- `--use-arns`: Update an ArNS/ANT record after upload. When ArNS details aren't supplied and you're in a TTY, `deploy` asks by default. +- `--arns-name, -n`: The ArNS name to update. Required when using `--use-arns`; also implies ArNS mode. +- `--cluster, -p`: Solana cluster for ArNS updates. Choices: `mainnet`, `devnet`. Default: `mainnet` +- `--rpc-url`: Optional Solana RPC URL override for ArNS updates +- `--deploy-folder, -d`: Folder to deploy. Default: `./dist` +- `--deploy-file, -f`: Deploy a single file instead of a folder +- `--undername, -u`: ANT undername to update. Default: `@` +- `--ttl-seconds, -t`: TTL in seconds for the ANT record (60-86400). Default: `60` + +Upload key (pays for the upload): + +- `--sig-type, -s`: Signer type for the upload key. Choices: `arweave`, `ethereum`, `polygon`, `kyve`, `solana`. Default: `arweave` +- `--wallet, -w`: Path to the upload wallet file (JWK for Arweave, private key for Ethereum/Polygon/KYVE, `solana-keygen` `id.json` for Solana). Falls back to `DEPLOY_KEY`. +- `--private-key, -k`: Upload private-key string (alternative to `--wallet`). JWK JSON for Arweave, hex for EVM chains, base58 secret key for Solana. + +ArNS authority key (controls the name, signs the update — always Solana): + +- `--arns-wallet`: Path to the Solana `solana-keygen` `id.json` wallet that controls the ArNS name. Falls back to `ARNS_KEY`. +- `--arns-private-key`: Base58 Solana secret key for the ArNS authority (alternative to `--arns-wallet`). Falls back to `ARNS_KEY`. +- `--on-demand`: Enable on-demand payment with specified token. Choices: `ario`, `base-eth` +- `--max-token-amount`: Maximum token amount for on-demand payment (used with `--on-demand`) +- `--no-dedupe`: Disable deduplication (do not cache or reuse previous uploads) +- `--dedupe-cache-max-entries`: Maximum number of entries to keep in the dedupe cache (LRU). Default: `10000` +- `--uploader`: Custom Turbo upload service base URL. See the **Bundler service** section. + +**`upload`** (explicit upload without ArNS): accepts `--deploy-folder`, `--deploy-file`, wallet/signer flags, `--uploader`, `--on-demand` / `--max-token-amount`, and dedupe flags only. \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/deduplication.mdx b/content/sdks/(clis)/ario-deploy/deduplication.mdx new file mode 100644 index 000000000..d27b48ca2 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/deduplication.mdx @@ -0,0 +1,38 @@ +--- +title: "Deduplication" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +By default, ario-deploy caches your deployment log to prevent uploading duplicate (unchanged) files. This saves both time and upload costs by reusing existing data on Arweave. + +**How it works:** + +1. When you deploy, ario-deploy hashes each file in your build +2. It checks the local cache for matching hashes from previous uploads +3. Files that haven't changed are skipped - the existing transaction ID is reused +4. Only new or modified files are uploaded to Arweave +5. The cache is stored locally in `.ario-deploy/transaction-cache.json` + +**Disable deduplication:** + +If you need to force a fresh upload of all files (e.g., for debugging or to ensure a completely new deployment): + +```bash +ario-deploy deploy --wallet ./wallet.json --no-dedupe +``` + +**Limit cache size:** + +The dedupe cache uses an LRU (Least Recently Used) eviction strategy. By default, it keeps up to 10,000 entries. You can adjust this limit: + +```bash +ario-deploy deploy --wallet ./wallet.json --dedupe-cache-max-entries 1000 +``` + +**Cache location:** + +The cache file is stored at `.ario-deploy/transaction-cache.json` in your project root. You can: + +- Add it to `.gitignore` if you don't want to share cache across team members +- Commit it to share cached transaction IDs with your team (reduces duplicate uploads) +- Delete it to start fresh: `rm -rf .ario-deploy/` \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/dependencies.mdx b/content/sdks/(clis)/ario-deploy/dependencies.mdx new file mode 100644 index 000000000..c16d53fa1 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/dependencies.mdx @@ -0,0 +1,11 @@ +--- +title: "Dependencies" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +- **@ar.io/sdk** - For ANT operations and ArNS management on Solana +- **@ardrive/turbo-sdk** - For fast file uploads to Arweave (and signer types) +- **@solana/kit** - Solana RPC clients and transaction signers for ArNS updates +- **bs58** - Base58 encoding/decoding for Solana keys +- **@oclif/core** - CLI framework +- **mime-types** - MIME type detection \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/features.mdx b/content/sdks/(clis)/ario-deploy/features.mdx new file mode 100644 index 000000000..577a20257 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/features.mdx @@ -0,0 +1,16 @@ +--- +title: "Features" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +- **Turbo SDK Integration:** Uses Turbo SDK for fast, reliable file uploads to Arweave +- **On-Demand Payment:** Pay with ARIO or Base-ETH tokens on-demand during upload +- **Arweave Manifest v0.2.0:** Creates manifests with fallback support for SPAs +- **Optional ArNS Updates:** Updates ArNS records via ANT with new transaction IDs +- **Automated Workflow:** Integrates with GitHub Actions for continuous deployment +- **Git Hash Tagging:** In CI (GitHub Actions), tags uploaded data items with the deploying commit SHA +- **404 Fallback Detection:** Automatically detects and sets 404.html as fallback +- **Network Support:** ArNS updates run against the Solana ARIO programs on `mainnet` or `devnet`, with an optional custom RPC URL +- **Flexible Deployment:** Supports deploying a folder or a single file +- **Modern CLI:** Built with oclif for a robust command-line experience +- **TypeScript:** Fully typed for better developer experience \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/meta.json b/content/sdks/(clis)/ario-deploy/meta.json new file mode 100644 index 000000000..3e9825fc9 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/meta.json @@ -0,0 +1,21 @@ +{ + "title": "ARIO Deploy", + "icon": "/brand/ario-white.svg", + "pages": [ + "features", + "(prerequisites)", + "(commands)", + "on-demand-payment", + "bundler-service", + "command-options", + "deduplication", + "package-json-scripts", + "(github-action)", + "cli-in-github-actions", + "(claude-code-integration)", + "security-best-practices", + "troubleshooting", + "dependencies" + ], + "defaultOpen": false +} \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/on-demand-payment.mdx b/content/sdks/(clis)/ario-deploy/on-demand-payment.mdx new file mode 100644 index 000000000..bb639b6e2 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/on-demand-payment.mdx @@ -0,0 +1,35 @@ +--- +title: "On-Demand Payment" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +Use on-demand payment to automatically fund uploads with ARIO or Base-ETH tokens when your Turbo balance is insufficient: + +Deploy with ARIO on-demand payment: + +```bash +ario-deploy deploy --wallet ./wallet.json --deploy-folder ./dist --on-demand ario --max-token-amount 1.5 +``` + +Deploy with Base-ETH on-demand payment (using Ethereum signer): + +```bash +ario-deploy deploy --sig-type ethereum --private-key "0x..." --on-demand base-eth --max-token-amount 0.1 +``` + +**On-Demand Payment Options:** + +- `--on-demand`: Token to use for on-demand payment (`ario` or `base-eth`) +- `--max-token-amount`: Maximum token amount to spend (in native token units, e.g., `1.5` for 1.5 ARIO or `0.1` for 0.1 ETH) + +**How it works:** + +1. Checks your Turbo balance before upload +2. If balance is insufficient, converts tokens to Turbo credits on-demand +3. Automatically adds a 10% buffer (`topUpBufferMultiplier: 1.1`) for reliability +4. Proceeds with upload once funded + +**Token compatibility:** + +- **ARIO**: Works with Arweave signer +- **Base-ETH**: Works with Ethereum signer (Base Network) \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/package-json-scripts.mdx b/content/sdks/(clis)/ario-deploy/package-json-scripts.mdx new file mode 100644 index 000000000..2ad529434 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/package-json-scripts.mdx @@ -0,0 +1,30 @@ +--- +title: "Package.json Scripts" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +Add deployment scripts to your `package.json`: + +```json +{ + "scripts": { + "build": "vite build", + "deploy": "pnpm build && ario-deploy deploy --arns-name \", + "deploy:staging": "pnpm build && ario-deploy deploy --arns-name \ --undername staging", + "deploy:devnet": "pnpm build && ario-deploy deploy --arns-name \ --cluster devnet", + "deploy:on-demand": "pnpm build && ario-deploy deploy --arns-name \ --on-demand ario --max-token-amount 1.5" + } +} +``` + +These read the upload key from `DEPLOY_KEY` and the Solana ArNS authority key from `ARNS_KEY`. Deploy with: + +```bash +DEPLOY_KEY=$(base64 -i wallet.json) ARNS_KEY=\ pnpm deploy +``` + +Or with on-demand payment: + +```bash +DEPLOY_KEY=$(base64 -i wallet.json) ARNS_KEY=\ pnpm deploy:on-demand +``` \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/security-best-practices.mdx b/content/sdks/(clis)/ario-deploy/security-best-practices.mdx new file mode 100644 index 000000000..d76759e03 --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/security-best-practices.mdx @@ -0,0 +1,12 @@ +--- +title: "Security & Best Practices" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +- **Dedicated Wallet:** Always use a dedicated wallet for deployments to minimize security risks +- **Wallet Encoding:** Arweave wallets must be base64 encoded to be used in the deployment script +- **ArNS Name:** Required only when updating an ANT/ArNS target undername or root record +- **Turbo Credits:** Ensure your wallet has sufficient Turbo Credits, or use on-demand payment for automatic funding +- **On-Demand Limits:** Set reasonable `--max-token-amount` limits to prevent unexpected costs +- **Secret Management:** Keep your `DEPLOY_KEY` secret secure and never commit it to your repository +- **Build Security:** Always check your build for exposed environmental secrets before deployment, as data on Arweave is permanent \ No newline at end of file diff --git a/content/sdks/(clis)/ario-deploy/troubleshooting.mdx b/content/sdks/(clis)/ario-deploy/troubleshooting.mdx new file mode 100644 index 000000000..ef7f0276f --- /dev/null +++ b/content/sdks/(clis)/ario-deploy/troubleshooting.mdx @@ -0,0 +1,12 @@ +--- +title: "Troubleshooting" +description: "CLI for deploying apps to the permaweb (Arweave) and updating ArNS" +--- + +- **Error: "DEPLOY_KEY environment variable not set":** Verify your base64 encoded wallet is set as the `DEPLOY_KEY` environment variable +- **Error: "deploy-folder does not exist":** Check that your build folder exists and the path is correct +- **Error: "deploy-file does not exist":** Check that your build file exists and the path is correct +- **Error: "ArNS name does not exist":** Verify the ArNS name is correct and exists in the specified network +- **Upload timeouts:** Files have a timeout for upload. Large files may fail and require optimization +- **Insufficient Turbo Credits:** Use `--on-demand` with `--max-token-amount` to automatically fund uploads when balance is low +- **On-demand payment fails:** Ensure your wallet has sufficient tokens (ARIO or Base-ETH) and the token type matches your signer (`ario` with Arweave, `base-eth` with Ethereum) \ No newline at end of file diff --git a/content/sdks/ar-io-sdk/(advanced)/solana-networks.mdx b/content/sdks/ar-io-sdk/(advanced)/advanced-networks.mdx similarity index 96% rename from content/sdks/ar-io-sdk/(advanced)/solana-networks.mdx rename to content/sdks/ar-io-sdk/(advanced)/advanced-networks.mdx index f5654ae9a..0b386159f 100644 --- a/content/sdks/ar-io-sdk/(advanced)/solana-networks.mdx +++ b/content/sdks/ar-io-sdk/(advanced)/advanced-networks.mdx @@ -1,5 +1,5 @@ --- -title: "Solana Networks" +title: "Networks" description: "TypeScript/JavaScript SDK for interacting with the ar.io ecosystem" --- diff --git a/content/sdks/ar-io-sdk/(advanced)/meta.json b/content/sdks/ar-io-sdk/(advanced)/meta.json index 0b9b80fdf..37b638823 100644 --- a/content/sdks/ar-io-sdk/(advanced)/meta.json +++ b/content/sdks/ar-io-sdk/(advanced)/meta.json @@ -5,7 +5,7 @@ "circuit-breaker", "automatic-retries", "generated-instruction-builders", - "solana-networks" + "advanced-networks" ], "defaultOpen": false } \ No newline at end of file diff --git a/content/sdks/ar-io-sdk/(ario-contract)/arweave-name-system-arns.mdx b/content/sdks/ar-io-sdk/(ario-contract)/arweave-name-system-arns.mdx index 12c16069d..66dbd409e 100644 --- a/content/sdks/ar-io-sdk/(ario-contract)/arweave-name-system-arns.mdx +++ b/content/sdks/ar-io-sdk/(ario-contract)/arweave-name-system-arns.mdx @@ -311,6 +311,8 @@ const price = await ario Calculates the expanded cost details for the interaction in question, e.g a 'Buy-Name' interaction, where args are the specific params for that interaction. The fromAddress is the address that would be charged for the interaction, and fundFrom is where the funds would be taken from, either `balance`, `stakes`, or `any`. +On Solana, the result also includes a `gasEstimate` — the total SOL (in lamports) the wallet needs to execute the intent: transaction fees (quoted from recent on-chain prioritization fees) plus rent-exempt deposits for the accounts the flow creates. For `Buy-Name` that covers both transactions (ANT spawn + buy) and the rent for the spawned asset/PDAs and the ArNS record; first-time buyers with no ACL accounts yet are quoted the ACL bootstrap rent as well (pass `fromAddress` so that check can be made). The fee side is a conservative upper bound: the write path tightens the compute-unit limit from a pre-send simulation, so the landed fee is usually lower. + ```typescript const costDetails = await ario.getCostDetails({ intent: "Buy-Name", @@ -332,7 +334,19 @@ const costDetails = await ario.getCostDetails({ "discountTotal": 476850455, "multiplier": 0.8 } - ] + ], + "gasEstimate": { + "totalLamports": 14679680, + "feeLamports": 23000, + "baseFeeLamports": 15000, + "priorityFeeLamports": 8000, + "rentLamports": 14656680, + "rentReclaimedLamports": 0, + "priorityFeeMicroLamports": 10000, + "computeUnitLimit": 400000, + "signatureCount": 3, + "transactionCount": 2 + } } ``` diff --git a/content/sdks/ar-io-sdk/(ario-contract)/general.mdx b/content/sdks/ar-io-sdk/(ario-contract)/general.mdx index 4932183aa..53c05bccd 100644 --- a/content/sdks/ar-io-sdk/(ario-contract)/general.mdx +++ b/content/sdks/ar-io-sdk/(ario-contract)/general.mdx @@ -11,21 +11,21 @@ Providing `signer` plus `rpcSubscriptions` enables write methods the client is read-only. ```typescript -import { ARIO } from "@ar.io/sdk"; +import { ARIO } from '@ar.io/sdk'; import { - createSolanaRpc, - createSolanaRpcSubscriptions, - createKeyPairSignerFromBytes, -} from "@solana/kit"; + createSolanaRpc, + createSolanaRpcSubscriptions, + createKeyPairSignerFromBytes, +} from '@solana/kit'; -const rpc = createSolanaRpc("https://api.mainnet-beta.solana.com"); +const rpc = createSolanaRpc('https://api.mainnet-beta.solana.com'); // read-only client const ario = ARIO.init({ rpc }); // read-write client (needs rpcSubscriptions for sendAndConfirm) const rpcSubscriptions = createSolanaRpcSubscriptions( - "wss://api.mainnet-beta.solana.com", + 'wss://api.mainnet-beta.solana.com', ); const signer = await createKeyPairSignerFromBytes(/* 64-byte secret key */); const arioWrite = ARIO.init({ rpc, rpcSubscriptions, signer }); @@ -44,20 +44,20 @@ const info = await ario.getInfo(); ```json { - "Name": "AR.IO", - "Ticker": "ARIO", - "Logo": "", - "Denomination": 6, - "Handlers": [], - "LastCreatedEpochIndex": 0, - "LastDistributedEpochIndex": 0, - "totalSupply": 1000000000000000, - "protocolBalance": 0, - "epochSettings": { - "durationMs": 86400000, - "prescribedNameCount": 25, - "maxObservers": 50 - } + "Name": "AR.IO", + "Ticker": "ARIO", + "Logo": "", + "Denomination": 6, + "Handlers": [], + "LastCreatedEpochIndex": 0, + "LastDistributedEpochIndex": 0, + "totalSupply": 1000000000000000, + "protocolBalance": 0, + "epochSettings": { + "durationMs": 86400000, + "prescribedNameCount": 25, + "maxObservers": 50 + } } ``` @@ -84,23 +84,20 @@ const ario = ARIO.init({ rpc }); const supply = await ario.getTokenSupply(); ``` -
- Output +**Output:** ```json { - "total": 1000000000000000000, - "circulating": 998094653842520, - "locked": 0, - "withdrawn": 560563387278, - "delegated": 1750000000, - "staked": 1343032770199, - "protocolBalance": 46317263683761 + "total": 1000000000000000000, + "circulating": 998094653842520, + "locked": 0, + "withdrawn": 560563387278, + "delegated": 1750000000, + "staked": 1343032770199, + "protocolBalance": 46317263683761 } ``` -
- #### getBalance() Retrieves the balance of the specified wallet address. @@ -109,10 +106,10 @@ Retrieves the balance of the specified wallet address. const ario = ARIO.init({ rpc }); // the balance will be returned in mARIO as a value const balance = await ario - .getBalance({ - address: "QGWqtJdLLgm2ehFWiiPzMaoFLD50CnGuzZIPEdoDRGQ", - }) - .then((balance: number) => new mARIOToken(balance).toARIO()); // convert it to ARIO for readability + .getBalance({ + address: "QGWqtJdLLgm2ehFWiiPzMaoFLD50CnGuzZIPEdoDRGQ", + }) + .then((balance: number) => new mARIOToken(balance).toARIO()); // convert it to ARIO for readability ``` **Output:** @@ -128,10 +125,10 @@ Retrieves the balances of the ARIO process in `mARIO`, paginated and sorted by t ```typescript const ario = ARIO.init({ rpc }); const balances = await ario.getBalances({ - cursor: "-4xgjroXENKYhTWqrBo57HQwvDL51mMdfsdsxJy6Y2Z_sA", - limit: 100, - sortBy: "balance", - sortOrder: "desc", + cursor: "-4xgjroXENKYhTWqrBo57HQwvDL51mMdfsdsxJy6Y2Z_sA", + limit: 100, + sortBy: "balance", + sortOrder: "desc", }); ``` @@ -139,22 +136,22 @@ const balances = await ario.getBalances({ ```json { - "items": [ - { - "address": "-4xgjroXENKYhTWqrBo57HQwvDL51mMvSxJy6Y2Z_sA", - "balance": 1000000 - }, - { - "address": "-7vXsQZQDk8TMDlpiSLy3CnLi5PDPlAaN2DaynORpck", - "balance": 1000000 - } - // ...98 other balances - ], - "hasMore": true, - "nextCursor": "-7vXsQZQDk8TMDlpiSLy3CnLi5PDPlAaN2DaynORpck", - "totalItems": 1789, - "sortBy": "balance", - "sortOrder": "desc" + "items": [ + { + "address": "-4xgjroXENKYhTWqrBo57HQwvDL51mMvSxJy6Y2Z_sA", + "balance": 1000000 + }, + { + "address": "-7vXsQZQDk8TMDlpiSLy3CnLi5PDPlAaN2DaynORpck", + "balance": 1000000 + } + // ...98 other balances + ], + "hasMore": true, + "nextCursor": "-7vXsQZQDk8TMDlpiSLy3CnLi5PDPlAaN2DaynORpck", + "totalItems": 1789, + "sortBy": "balance", + "sortOrder": "desc" } ``` @@ -167,7 +164,7 @@ _Note: Requires `signer` to be provided on `ARIO.init` to sign the transaction._ ```typescript const ario = ARIO.init({ rpc, rpcSubscriptions, signer }); const { id: txId } = await ario.transfer({ - target: "RecipientSolanaPubkeyBase58", - qty: new ARIOToken(1000).toMARIO(), + target: 'RecipientSolanaPubkeyBase58', + qty: new ARIOToken(1000).toMARIO(), }); -``` +``` \ No newline at end of file diff --git a/content/sdks/ar-io-sdk/(ario-contract)/networks.mdx b/content/sdks/ar-io-sdk/(ario-contract)/networks.mdx index 2eee84262..8f1587fe5 100644 --- a/content/sdks/ar-io-sdk/(ario-contract)/networks.mdx +++ b/content/sdks/ar-io-sdk/(ario-contract)/networks.mdx @@ -8,17 +8,18 @@ at — mainnet-beta by default. For devnet or a local validator, override the RPC URL and (on any non-mainnet cluster) the per-program addresses: ```typescript -import { ARIO } from "@ar.io/sdk"; -import { createSolanaRpc, address } from "@solana/kit"; +import { ARIO } from '@ar.io/sdk'; +import { createSolanaRpc, address } from '@solana/kit'; const ario = ARIO.init({ - rpc: createSolanaRpc("https://api.devnet.solana.com"), - coreProgramId: address("\"), - garProgramId: address("\"), - arnsProgramId: address("\"), - antProgramId: address("\"), + rpc: createSolanaRpc('https://api.devnet.solana.com'), + coreProgramId: address('\'), + garProgramId: address('\'), + arnsProgramId: address('\'), + antProgramId: address('\'), }); ``` On localnet (Surfpool) source program IDs from `migration/localnet/out/localnet.env` in the `solana-ar-io` monorepo. + diff --git a/content/sdks/ardrive-core-js/(advanced-features)/manifest-creation.mdx b/content/sdks/ardrive-core-js/(advanced-features)/manifest-creation.mdx index 15b18049e..78e153ff2 100644 --- a/content/sdks/ardrive-core-js/(advanced-features)/manifest-creation.mdx +++ b/content/sdks/ardrive-core-js/(advanced-features)/manifest-creation.mdx @@ -13,5 +13,5 @@ const manifest = await arDrive.uploadPublicManifest({ conflictResolution: 'upsert' }); -// Access: https://turbo-gateway.com/{manifestId} +// Access: https://arweave.net/{manifestId} ``` \ No newline at end of file diff --git a/content/sdks/wayfinder/wayfinder-core/dynamic-routing.mdx b/content/sdks/wayfinder/wayfinder-core/dynamic-routing.mdx index af5696c9f..ee3aeff9b 100644 --- a/content/sdks/wayfinder/wayfinder-core/dynamic-routing.mdx +++ b/content/sdks/wayfinder/wayfinder-core/dynamic-routing.mdx @@ -29,11 +29,11 @@ const redirectUrl = await wayfinder.resolveUrl({ #### Legacy URLs -Given a legacy turbo-gateway.com or turbo-gateway.com URL, the redirect URL will be the same as the original URL, but with the gateway selected by Wayfinder's routing strategy. +Given a legacy arweave.net or arweave.dev URL, the redirect URL will be the same as the original URL, but with the gateway selected by Wayfinder's routing strategy. ```javascript const redirectUrl = await wayfinder.resolveUrl({ - originalUrl: 'https://turbo-gateway.com/example-tx-id', + originalUrl: 'https://arweave.net/example-tx-id', }); // results in https://\/example-tx-id ``` diff --git a/scripts/generate-sdk-docs.ts b/scripts/generate-sdk-docs.ts index 81d72f172..5686f1b11 100644 --- a/scripts/generate-sdk-docs.ts +++ b/scripts/generate-sdk-docs.ts @@ -82,6 +82,17 @@ const PACKAGES: { sourceUrl: "https://github.com/ardriveapp/ardrive-cli", icon: "/ecosystem-logos/logo-ardrive.svg", }, + { + name: "ario-deploy", + readmeUrl: + "https://raw.githubusercontent.com/ar-io/ar-io-deploy/refs/heads/main/README.md", + dest: path.resolve("content/sdks/(clis)/ario-deploy"), + title: "ARIO Deploy", + description: + "CLI for deploying apps to the permaweb (Arweave) and updating ArNS", + sourceUrl: "https://github.com/ar-io/ar-io-deploy", + icon: "/brand/ario-white.svg", + }, ]; function sanitizeFilename(title: string): string { @@ -95,13 +106,15 @@ function escapeContent(content: string): string { // Escape content that might be interpreted as JSX return ( content + // Remove HTML comments (not valid in MDX) + .replace(//g, "") // Remove h1 headers (# title) .replace(/^#\s+[^\n]+\n/gm, "") // Convert
blocks to normal output blocks with "Output:" prefix .replace( - /
\s*[^<]*<\/summary>\s*(```[\s\S]*?```)\s*<\/details>/g, - (match, codeBlock) => { - return `**Output:**\n\n${codeBlock}`; + /
\s*[^<]*<\/summary>\s*([\s\S]*?)\s*<\/details>/g, + (match, content) => { + return `**Output:**\n\n${content.trim()}`; } ) // Escape emoji checkmarks and crosses that might be interpreted as JSX @@ -274,6 +287,8 @@ async function processPackage(pkg: (typeof PACKAGES)[0]) { // Structure to hold our pages/folders const rootPages: string[] = []; const folders: Record = {}; + // Track all page slugs to detect collisions across route group folders + const usedSlugs = new Set(); for (const h2Section of h2Sections) { if (!h2Section.startsWith("## ")) continue; @@ -348,7 +363,11 @@ async function processPackage(pkg: (typeof PACKAGES)[0]) { ); const h3Content = h3Lines.slice(1).join("\n").trim(); - const h3Filename = sanitizeFilename(cleanH3Title); + let h3Filename = sanitizeFilename(cleanH3Title); + if (usedSlugs.has(h3Filename)) { + h3Filename = `${h2FolderName}-${h3Filename}`; + } + usedSlugs.add(h3Filename); const escapedContent = escapeContent(h3Content); const pageContent = `--- @@ -384,7 +403,11 @@ ${escapedContent}`; rootPages.push(folderName); } else { // No H3 subsections - create a single page - const filename = h2FolderName; + let filename = h2FolderName; + if (usedSlugs.has(filename)) { + filename = `${filename}-2`; + } + usedSlugs.add(filename); const escapedContent = escapeContent(h2ContentBody); const pageContent = `--- diff --git a/tsconfig.json b/tsconfig.json index 6ca184d32..c912a5db8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,7 @@ "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, - "jsx": "preserve", + "jsx": "react-jsx", "incremental": true, "paths": { "@/.source": [ @@ -36,7 +36,8 @@ "next-env.d.ts", "**/*.ts", "**/*.tsx", - ".next/types/**/*.ts" + ".next/types/**/*.ts", + ".next/dev/types/**/*.ts" ], "exclude": [ "node_modules"