Skip to content

Commit

Permalink
feat(act): modify README.md with ACT examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferenc Sárai committed Oct 14, 2024
1 parent 13de026 commit 3b61215
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ the [releases tab](https://github.com/ethersphere/swarm-cli/releases).
- [Uploading a File](#uploading-a-file)
- [Creating an Identity](#creating-an-identity)
- [Uploading to a Feed](#uploading-to-a-feed)
- [Upload file with ACT](#upload-file-with-act)
- [Download file with ACT](#download-file-with-act)
- [Create grantees list](#create-grantees-list)
- [Get grantees list](#get-grantees-list)
- [Patch grantees list](#patch-grantees-list)
- [Description](#description)
- [Installation](#installation)
- [From npm](#from-npm)
Expand Down Expand Up @@ -68,6 +73,64 @@ the [releases tab](https://github.com/ethersphere/swarm-cli/releases).

![Swarm CLI Feed Upload Command](./docs/feed-upload.gif)

## Upload file with ACT

```sh
swarm-cli upload <file> --act --stamp <postage_batch_id>
```

## Download file with ACT

```sh
swarm-cli download <swarm_hash> <file> --act --act-history-address <swarm_history_address> --act-publisher <public_key>
```

## Create grantees list

```sh
swarm-cli grantee create grantees.json --stamp <postage_batch_id>
```

`grantees.json`:

```json
{ "grantees": [
"02ceff1422a7026ba54ad89967d81f2805a55eb3d05f64eb5c49ea6024212b12e8",
"02ceff1422a7026ba54ad89967d81f2805a55eb3d05f64eb5c49ea6024212b12e9",
"02ceff1422a7026ba54ad89967d81f2805a55eb3d05f64eb5c49ea6024212b12ee"
]
}
```

## Get grantees list

```sh
swarm-cli grantee get <grantee_reference>
```

## Patch grantees list

```sh
swarm-cli grantee patch grantees-patch.json \
--reference <grantee_reference> \
--history <grantee_history_reference> \
--stamp <postage_batch_id>
```

`grantees-patch.json`:

```json
{
"add": [
"02ceff1422a7026ba54ad89967d81f2805a55eb3d05f64eb5c49ea6024212b12e7"
],
"revoke": [
"02ceff1422a7026ba54ad89967d81f2805a55eb3d05f64eb5c49ea6024212b12e9",
"02ceff1422a7026ba54ad89967d81f2805a55eb3d05f64eb5c49ea6024212b12ee"
]
}
```

# Description

> Manage your Bee node and interact with the Swarm network via the CLI
Expand Down

0 comments on commit 3b61215

Please sign in to comment.