Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use Pinata ipfs instead of web3.storage #367

Merged
merged 6 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -729,31 +729,31 @@ algokit task [OPTIONS] COMMAND [ARGS]...

### ipfs

Upload files to IPFS using Web3 Storage provider.
Upload files to IPFS using Pinata provider.

```shell
algokit task ipfs [OPTIONS] COMMAND [ARGS]...
```

#### login

Login to web3 storage ipfs provider.
Login to Pinata ipfs provider. You will be prompted for your JWT.

```shell
algokit task ipfs login [OPTIONS]
```

#### logout

Logout of web3 storage ipfs provider.
Logout of Pinata ipfs provider.

```shell
algokit task ipfs logout [OPTIONS]
```

#### upload

Upload a file to web3 storage ipfs provider. Please note, max file size is 100MB.
Upload a file to Pinata ipfs provider. Please note, max file size is 100MB.

```shell
algokit task ipfs upload [OPTIONS]
Expand Down
16 changes: 8 additions & 8 deletions docs/features/tasks/ipfs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AlgoKit Task IPFS

The AlgoKit IPFS feature allows you to interact with the IPFS [InterPlanetary File System](https://ipfs.tech/) using the [Web3 Storage provider](https://web3.storage/). This feature supports logging in and out of the Web3 Storage provider, and uploading files to IPFS.
The AlgoKit IPFS feature allows you to interact with the IPFS [InterPlanetary File System](https://ipfs.tech/) using the [Piñata provider](https://www.pinata.cloud/). This feature supports logging in and out of the Piñata provider, and uploading files to IPFS.

## Usage

Expand All @@ -10,7 +10,7 @@ Available commands and possible usage as follows:
$ ~ algokit task ipfs
Usage: algokit task ipfs [OPTIONS]

Upload files to IPFS using Web3 Storage provider.
Upload files to IPFS using Pinata provider.

Options:
-f, --file PATH Path to the file to upload. [required]
Expand All @@ -25,17 +25,17 @@ Options:

## Prerequisites

Before you can use this feature, you need to ensure that you have signed up for a Web3 Storage account and have an API token. You can sign up for a Web3 Storage account by reading [quickstart](https://web3.storage/docs/intro/#quickstart).
Before you can use this feature, you need to ensure that you have signed up for a Piñata account and have a JWT. You can sign up for a Piñata account by reading [quickstart](https://docs.pinata.cloud/docs/getting-started).

## Login

Please note, you need to login to the Web3 Storage provider before you can upload files. You can do this using the `login` command:
Please note, you need to login to the Piñata provider before you can upload files. You can do this using the `login` command:

```bash
$ algokit task ipfs login
```

This will prompt you to enter your Web3 Storage API token. Once you are logged in, you can upload files to IPFS.
This will prompt you to enter your Piñata JWT. Once you are logged in, you can upload files to IPFS.

## Upload

Expand All @@ -45,17 +45,17 @@ To upload a file to IPFS, you can use the `ipfs` command as follows:
$ algokit task ipfs --file {PATH_TO_YOUR_FILE}
```

This will upload the file to IPFS using the Web3 Storage provider and return the CID (Content Identifier) of the uploaded file.
This will upload the file to IPFS using the Piñata provider and return the CID (Content Identifier) of the uploaded file.

## Logout

If you want to logout from the Web3 Storage provider, you can use the `logout` command:
If you want to logout from the Piñata provider, you can use the `logout` command:

```bash
$ algokit task ipfs logout
```

This will remove your Web3 Storage API token from the keyring.
This will remove your Piñata JWT from the keyring.

## File Size Limit

Expand Down
4 changes: 2 additions & 2 deletions docs/features/tasks/mint.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AlgoKit Task Mint

The AlgoKit Mint feature allows you to mint new fungible or non-fungible assets on the Algorand blockchain. This feature supports the creation of assets, validation of asset parameters, and uploading of asset metadata and image to IPFS using the Web3 Storage provider. Immutable assets are compliant with [ARC3](https://arc.algorand.foundation/ARCs/arc-0003), while mutable are based using [ARC19](https://arc.algorand.foundation/ARCs/arc-0019) standard.
The AlgoKit Mint feature allows you to mint new fungible or non-fungible assets on the Algorand blockchain. This feature supports the creation of assets, validation of asset parameters, and uploading of asset metadata and image to IPFS using the Piñata provider. Immutable assets are compliant with [ARC3](https://arc.algorand.foundation/ARCs/arc-0003), while mutable are based using [ARC19](https://arc.algorand.foundation/ARCs/arc-0019) standard.

## Usage

Expand Down Expand Up @@ -51,7 +51,7 @@ To mint a new asset in interactive mode, you can use the mint command as follows
$ algokit task mint
```

This will interactively prompt you for the required information, upload the asset image and metadata to IPFS using the Web3 Storage provider and mint a new asset on the Algorand blockchain. The [asset's metadata](https://arc.algorand.foundation/ARCs/arc-0003#json-metadata-file-schema) will be generated automatically based on the provided asset name, decimals, and image.
This will interactively prompt you for the required information, upload the asset image and metadata to IPFS using the Piñata provider and mint a new asset on the Algorand blockchain. The [asset's metadata](https://arc.algorand.foundation/ARCs/arc-0003#json-metadata-file-schema) will be generated automatically based on the provided asset name, decimals, and image.

If you want to provide a custom metadata file, you can use the --metadata flag:

Expand Down
50 changes: 29 additions & 21 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ auth0-python = "^4.4.0"
algokit-utils = "v2.1.0"
multiformats = "^0.2.1"
aiohttp = "3.9.1"
yaspin = "^3.0.1"
negar-abbasi marked this conversation as resolved.
Show resolved Hide resolved

[tool.poetry.group.dev.dependencies]
pytest = "^7.2.0"
Expand Down
Loading