autonity-cli


Nameautonity-cli JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryCommand line interface to interact with Autonity
upload_time2024-12-12 12:28:01
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords autonity cli rpc web3
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Autonity CLI

A command-line tool that exposes all the functionality of Autonity from the
convenience of the command-line. It can be used interactively or executed from a
shell script. Connecting directly to the Autonity JSON-RPC endpoint of your
choice, it allows you to:

- create new ATN and NTN accounts or import keys
- list balances for any native asset or ERC-20 token
- transfer assets to different account
- sign or verify messages using private/public keys
- make smart contract calls from the command-line
- query block information or protocol state
- manage the your validator node state
- delegate stake and claim staking rewards

After installing, run `aut --help` for a list of all commands and options.

## Quick Start

Requirements:

- **Python 3.9 or greater** (Install using the package manager for your OS or
  [pyenv](https://github.com/pyenv/pyenv) ).
  - (Note that websocket connections are not supported for Python 3.10+ due to
    an issue in the latest stable version of the `web3.py` dependency)
- **The** [pipx](https://pypa.github.io/pipx/) **tool** (Install a recent
  version with `pip install pipx`)

To install Autonity CLI as a pipx package, isolated in its own environment, run:

```console
pipx install autonity-cli
```

Once successfully installed, the tool will be available in the shell as the
`aut` command. All commands are discoverable from the help text. Type
`aut --help`, `aut <command> --help` etc. for details.

⚠️ If upgrading from "aut" `v0.5.0` or earlier, you will need to uninstall the
`aut` package before reinstalling `autonity-cli`:

```console
$ pipx uninstall aut
$ pipx install autonity-cli
```

**Note:**

- If `pipx` selects an incompatible version of Python, you may need to specify a
  specific one. Use the `--python` flag:

  ```console
  pipx install --python /usr/bin/pythonX.Y autonity-cli
  ```

  See the `pipx install` help text for details.

- If the `aut` command is not available after installation, and you are on
  Ubuntu, try running `aut` in a new terminal window. Otherwise, ensure that
  `~/.local/bin` appears in your `PATH`. Run `pipx ensurepath` to verify.

## (Optional) Enable command completion (bash and zsh)

Completion is available in `bash` and `zsh` shells as follows. (Adapt these
commands to your particular configuration.)

```console
# For zsh, replace bash_source with zsh_source.
$ _AUT_COMPLETE=bash_source aut > ~/.aut-complete
$ echo 'source ~/.aut-complete' >> ~/.bashrc
```

Auto-complete should be enabled in _new_ shells. (Use `source ~/.aut-complete`
to activate it in the current shell instance.)

## Configuration using `.autrc` files

If the `aut` command finds this file, it reads configuration parameters from it.
See the [sample file](.autrc.sample) in this repo. This avoids the need to enter
certain values on the command-line. These parameters can be overridden by
environment variables and command-line parameters where necessary.

If `.autrc` is not found in the current directory, all parent directories are
searched in turn and the first `.autrc` file found is used. Alternatively, this
file can be placed in `~/.config/aut/autrc`.

A very simple `.autrc` file may specify the endpoint for Web3 connections:

```console
# Create a config file holding the rpc endpoint.
$ echo '[aut]' > .autrc
$ echo 'rpc_endpoint = https://rpc1.piccadilly.autonity.org/' >> .autrc
```

## Usage Examples

### Create a new account (for demo purposes)

```console
# Create an account
# !! For demonstration purposes only. Use a HW wallet or other key-management infrastructure. !!
$ mkdir -p keystore
$ aut account new --keyfile keystore/alice.key
Password for new account:
Confirm account password:
0xd888bc90720757796C72eC2a3A231c81b55e8097
```

This can be added as the default key for transaction signing (and default
address for queries) in the `.autrc` file:

```console
echo 'keyfile = keystore/alice.key' >> .autrc
```

### Check account balance (after funding the account)

```console
# Check Alice's balance (use address in keystore/alice.key), given in Wei.
$ aut account balance
100000000000000000000
# Check Bob's balance (1 ATN).  Bob's address is 0x4EcE2e62E67a7B64a83D3E180dC86962145b762f
$ aut account balance 0x4EcE2e62E67a7B64a83D3E180dC86962145b762f
1000000000000000000
```

### Create, sign and send a transaction

```console
# Send 1 ATN to Bob
$ aut tx make --to 0x4EcE2e62E67a7B64a83D3E180dC86962145b762f --value 1aut | aut tx sign - | aut tx send -
Enter passphrase (or CTRL-d to exit):
0x47f71a94372d00a3066414b80f3b9c78d71b3011479ddc86e37ab86e0fe80d8a
```

Explanation of the above: The `maketx` command extracts the `from` address from
the default keyfile, and automatically sets the `gas`, `nonce` and other fields
by querying the RPC endpoint in the config file. It then writes this to
`stdout`, which is piped to the `signtx` command, using the `-` argument to
indicate `stdin`. The sign `signtx` decrypts the default keyfile after querying
the user for the password, and writes the signed transaction to `stdout`. This
is then piped to the `sendtx` command, which connects to the RPC endpoint given
in the config file and passes the signed transaction to the node for broadcast.
`sendtx` then outputs the transaction hash to `stdout`.

All configuration options can be set using command-line parameters to override
the configuration file. Use the `--help` flag with any command to see all
available options.

### Wait for the transaction

```console
# Wait for a transaction to complete.  Print the transaction receipt to stdout.
$ aut tx wait 0x47f71a94372d00a3066414b80f3b9c78d71b3011479ddc86e37ab86e0fe80d8a
{"blockHash": "0x65e74faaaee5efa3b6e998fd78c8e1ca3085c8bd88709101e8fa801a03ab371d", "blockNumber": 5780419, "contractAddress": null, "cumulativeGasUsed": 21000, "effectiveGasPrice": 1000000000, "from": "0xd888bc90720757796C72eC2a3A231c81b55e8097", "gasUsed": 21000, "logs": [], "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "status": 1, "to": "0x4EcE2e62E67a7B64a83D3E180dC86962145b762f", "transactionHash": "0x47f71a94372d00a3066414b80f3b9c78d71b3011479ddc86e37ab86e0fe80d8a", "transactionIndex": 0, "type": "0x2"}

# Re-check Bob's balance
$ aut account balance 0x4EcE2e62E67a7B64a83D3E180dC86962145b762f
2000000000000000000
```

### Call contracts

Contract calls are possible using the following syntax:

```console
aut contract call --address CONTRACT_ADDRESS --abi ABI_FILE METHOD [PARAMETERS]...
```

As an example, assuming that the RPC URL has been set in the `.autrc` file,
calling the `getProposer` function of the Autonity contract is

```console
$ aut contract call --abi <((aut protocol contract-abi)) --address $(aut protocol contract-address) \
  getProposer 10000 1
"0x31870f96212787D181B3B2771F58AF2BeD0019Aa"
```

#### Complex types

The types `array` and `tuple` are supported as parameters as single quoted
strings.

For example, giving a contract function `arrayLength` that takes a `string[]`
input, the command will look like the following:

```console
$ aut contract call --abi ABI_FILE_PATH --address CONTRACT_ADDRESS \
  arrayLength '["a","b","c","d","e","f","g"]'
7
```

The same applies to `tuple` types, giving a struct:

```solidity
struct Payment {
    address from;
    uint256 blockNumber;
    uint256 amount;
}
```

A contract call `printHeight` that accepts a `Payment` as input will be:

```console
$ aut contract call --abi ABI_FILE_PATH --address CONTRACT_ADDRESS  \
  printHeight '["0x31870f96212787D181B3B2771F58AF2BeD0019Aa", 183413, 1000000000000000000]'
183413
```

## Development

The project is managed using [hatch](https://hatch.pypa.io/latest/). Check the
installation instructions [here](https://hatch.pypa.io/latest/install/).

Hatch will automatically manage a virtual environment for the project. To run
the command in development mode use:

```console
hatch run aut ....
```

alternatively, you can open a shell in the `hatch` environment by executing

```console
hatch shell
```

To run the unit and script-based tests, use `hatch run test`. To check for
linting errors, use `hatch run lint:all`. To reformat the code, use
`hatch run lint:format`.

## Reporting a Vulnerability

**Please do not file a public ticket** mentioning the vulnerability.

Instead, please send an email to <security@autonity.org> to report a security
issue.

The following PGP key may be used to communicate sensitive information to
developers:

Fingerprint: `6006 CCC3 DD11 7885 1A23 4290 7486 F832 6320 219E`

```
-----BEGIN PGP PUBLIC KEY BLOCK-----

xsFNBGL7epsBEADHxcFdpX1a60JFFN4jW3VtvofLFNXAHKT4GlOtIayozySdZI2A
fGRg2brbYdXdlHN3MYZJbMo/kIfMlYqiVFevEtNGDEGKYmqzXiad7RRpmxYyjzhH
VfkMd7V9wjEKiU9jL/GIDEXF32ZQbHwtvT3GRAd9NyPsjF3V8tzF4C5Da2zrSX17
K8jn5Tfi3OLHm2r0oyNaV4MAZD4usXSnvUbKPMe5OALv64oZd+1uSIv2qdZ1HPqs
VLiDSXcY31FkB3Wfc0oeT2rlvqsujFQC1hicI6hXI1e4LpTbXrhQjLzbMfXmrXuC
oqkN4M1aBUpm83M/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UFcAWNEQFR6pWGgiPonxSaTN4Cw2f1vKekhxAYXrbm
7sqEKZl+59D8uzHA0QSORP8FKpextccCtiL2L5b3ttGmrjGiXeL1wm1iWHxuOksm
OpGFz6WgVZS1MYuomyBb/tm8MOsPabODmW3kJDUd1DcxO99ZFP72IERBTKqonKLW
VCTV8Evv2agpTwTiP7TxGnl9ep5ZxkXAnQUXMwfVBYg0uGmmMhdcQ2n8wh6f1aR2
GksOuLSMQTC/RNNHOnS0xTKrlh0uQ5fF0WZJaUpUXjHxCjiBAXUdlwXJET+S2t7H
jLXA1MdBmJp7ymBVRqQQguaH5G2dciSEG/iqMLH76u7c+L1w+esGpwbSu1OH+wd7
7ys9vJxxJIqch8mzKlRTun+M/CCXWX5uvxeVGrwmvrARfnyOpyR9W0MzJ5xi7n5I
B1LUp7ycX/NeWHviWALjz1ObHeipvErh2n2iD/8swWez6eho1BDJ9sf8hz/gVJbR
dNvOgvIvgW1Bcibq3uqiigQnFYo15bmfIDRCJCBCmqf4Xb8Ip+m/QrLf92KIcDRc
VtiVUMzKBEpmz4LdeSy73Qfr
=12PL
-----END PGP PUBLIC KEY BLOCK-----
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "autonity-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "autonity, cli, rpc, web3",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/eb/a0/317dafb4e15d0acfe60620820ab08488e130d3dcb8eda6797a9a2202bbca/autonity_cli-1.0.0.tar.gz",
    "platform": null,
    "description": "# Autonity CLI\n\nA command-line tool that exposes all the functionality of Autonity from the\nconvenience of the command-line. It can be used interactively or executed from a\nshell script. Connecting directly to the Autonity JSON-RPC endpoint of your\nchoice, it allows you to:\n\n- create new ATN and NTN accounts or import keys\n- list balances for any native asset or ERC-20 token\n- transfer assets to different account\n- sign or verify messages using private/public keys\n- make smart contract calls from the command-line\n- query block information or protocol state\n- manage the your validator node state\n- delegate stake and claim staking rewards\n\nAfter installing, run `aut --help` for a list of all commands and options.\n\n## Quick Start\n\nRequirements:\n\n- **Python 3.9 or greater** (Install using the package manager for your OS or\n  [pyenv](https://github.com/pyenv/pyenv) ).\n  - (Note that websocket connections are not supported for Python 3.10+ due to\n    an issue in the latest stable version of the `web3.py` dependency)\n- **The** [pipx](https://pypa.github.io/pipx/) **tool** (Install a recent\n  version with `pip install pipx`)\n\nTo install Autonity CLI as a pipx package, isolated in its own environment, run:\n\n```console\npipx install autonity-cli\n```\n\nOnce successfully installed, the tool will be available in the shell as the\n`aut` command. All commands are discoverable from the help text. Type\n`aut --help`, `aut <command> --help` etc. for details.\n\n\u26a0\ufe0f If upgrading from \"aut\" `v0.5.0` or earlier, you will need to uninstall the\n`aut` package before reinstalling `autonity-cli`:\n\n```console\n$ pipx uninstall aut\n$ pipx install autonity-cli\n```\n\n**Note:**\n\n- If `pipx` selects an incompatible version of Python, you may need to specify a\n  specific one. Use the `--python` flag:\n\n  ```console\n  pipx install --python /usr/bin/pythonX.Y autonity-cli\n  ```\n\n  See the `pipx install` help text for details.\n\n- If the `aut` command is not available after installation, and you are on\n  Ubuntu, try running `aut` in a new terminal window. Otherwise, ensure that\n  `~/.local/bin` appears in your `PATH`. Run `pipx ensurepath` to verify.\n\n## (Optional) Enable command completion (bash and zsh)\n\nCompletion is available in `bash` and `zsh` shells as follows. (Adapt these\ncommands to your particular configuration.)\n\n```console\n# For zsh, replace bash_source with zsh_source.\n$ _AUT_COMPLETE=bash_source aut > ~/.aut-complete\n$ echo 'source ~/.aut-complete' >> ~/.bashrc\n```\n\nAuto-complete should be enabled in _new_ shells. (Use `source ~/.aut-complete`\nto activate it in the current shell instance.)\n\n## Configuration using `.autrc` files\n\nIf the `aut` command finds this file, it reads configuration parameters from it.\nSee the [sample file](.autrc.sample) in this repo. This avoids the need to enter\ncertain values on the command-line. These parameters can be overridden by\nenvironment variables and command-line parameters where necessary.\n\nIf `.autrc` is not found in the current directory, all parent directories are\nsearched in turn and the first `.autrc` file found is used. Alternatively, this\nfile can be placed in `~/.config/aut/autrc`.\n\nA very simple `.autrc` file may specify the endpoint for Web3 connections:\n\n```console\n# Create a config file holding the rpc endpoint.\n$ echo '[aut]' > .autrc\n$ echo 'rpc_endpoint = https://rpc1.piccadilly.autonity.org/' >> .autrc\n```\n\n## Usage Examples\n\n### Create a new account (for demo purposes)\n\n```console\n# Create an account\n# !! For demonstration purposes only. Use a HW wallet or other key-management infrastructure. !!\n$ mkdir -p keystore\n$ aut account new --keyfile keystore/alice.key\nPassword for new account:\nConfirm account password:\n0xd888bc90720757796C72eC2a3A231c81b55e8097\n```\n\nThis can be added as the default key for transaction signing (and default\naddress for queries) in the `.autrc` file:\n\n```console\necho 'keyfile = keystore/alice.key' >> .autrc\n```\n\n### Check account balance (after funding the account)\n\n```console\n# Check Alice's balance (use address in keystore/alice.key), given in Wei.\n$ aut account balance\n100000000000000000000\n# Check Bob's balance (1 ATN).  Bob's address is 0x4EcE2e62E67a7B64a83D3E180dC86962145b762f\n$ aut account balance 0x4EcE2e62E67a7B64a83D3E180dC86962145b762f\n1000000000000000000\n```\n\n### Create, sign and send a transaction\n\n```console\n# Send 1 ATN to Bob\n$ aut tx make --to 0x4EcE2e62E67a7B64a83D3E180dC86962145b762f --value 1aut | aut tx sign - | aut tx send -\nEnter passphrase (or CTRL-d to exit):\n0x47f71a94372d00a3066414b80f3b9c78d71b3011479ddc86e37ab86e0fe80d8a\n```\n\nExplanation of the above: The `maketx` command extracts the `from` address from\nthe default keyfile, and automatically sets the `gas`, `nonce` and other fields\nby querying the RPC endpoint in the config file. It then writes this to\n`stdout`, which is piped to the `signtx` command, using the `-` argument to\nindicate `stdin`. The sign `signtx` decrypts the default keyfile after querying\nthe user for the password, and writes the signed transaction to `stdout`. This\nis then piped to the `sendtx` command, which connects to the RPC endpoint given\nin the config file and passes the signed transaction to the node for broadcast.\n`sendtx` then outputs the transaction hash to `stdout`.\n\nAll configuration options can be set using command-line parameters to override\nthe configuration file. Use the `--help` flag with any command to see all\navailable options.\n\n### Wait for the transaction\n\n```console\n# Wait for a transaction to complete.  Print the transaction receipt to stdout.\n$ aut tx wait 0x47f71a94372d00a3066414b80f3b9c78d71b3011479ddc86e37ab86e0fe80d8a\n{\"blockHash\": \"0x65e74faaaee5efa3b6e998fd78c8e1ca3085c8bd88709101e8fa801a03ab371d\", \"blockNumber\": 5780419, \"contractAddress\": null, \"cumulativeGasUsed\": 21000, \"effectiveGasPrice\": 1000000000, \"from\": \"0xd888bc90720757796C72eC2a3A231c81b55e8097\", \"gasUsed\": 21000, \"logs\": [], \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\", \"status\": 1, \"to\": \"0x4EcE2e62E67a7B64a83D3E180dC86962145b762f\", \"transactionHash\": \"0x47f71a94372d00a3066414b80f3b9c78d71b3011479ddc86e37ab86e0fe80d8a\", \"transactionIndex\": 0, \"type\": \"0x2\"}\n\n# Re-check Bob's balance\n$ aut account balance 0x4EcE2e62E67a7B64a83D3E180dC86962145b762f\n2000000000000000000\n```\n\n### Call contracts\n\nContract calls are possible using the following syntax:\n\n```console\naut contract call --address CONTRACT_ADDRESS --abi ABI_FILE METHOD [PARAMETERS]...\n```\n\nAs an example, assuming that the RPC URL has been set in the `.autrc` file,\ncalling the `getProposer` function of the Autonity contract is\n\n```console\n$ aut contract call --abi <((aut protocol contract-abi)) --address $(aut protocol contract-address) \\\n  getProposer 10000 1\n\"0x31870f96212787D181B3B2771F58AF2BeD0019Aa\"\n```\n\n#### Complex types\n\nThe types `array` and `tuple` are supported as parameters as single quoted\nstrings.\n\nFor example, giving a contract function `arrayLength` that takes a `string[]`\ninput, the command will look like the following:\n\n```console\n$ aut contract call --abi ABI_FILE_PATH --address CONTRACT_ADDRESS \\\n  arrayLength '[\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\"]'\n7\n```\n\nThe same applies to `tuple` types, giving a struct:\n\n```solidity\nstruct Payment {\n    address from;\n    uint256 blockNumber;\n    uint256 amount;\n}\n```\n\nA contract call `printHeight` that accepts a `Payment` as input will be:\n\n```console\n$ aut contract call --abi ABI_FILE_PATH --address CONTRACT_ADDRESS  \\\n  printHeight '[\"0x31870f96212787D181B3B2771F58AF2BeD0019Aa\", 183413, 1000000000000000000]'\n183413\n```\n\n## Development\n\nThe project is managed using [hatch](https://hatch.pypa.io/latest/). Check the\ninstallation instructions [here](https://hatch.pypa.io/latest/install/).\n\nHatch will automatically manage a virtual environment for the project. To run\nthe command in development mode use:\n\n```console\nhatch run aut ....\n```\n\nalternatively, you can open a shell in the `hatch` environment by executing\n\n```console\nhatch shell\n```\n\nTo run the unit and script-based tests, use `hatch run test`. To check for\nlinting errors, use `hatch run lint:all`. To reformat the code, use\n`hatch run lint:format`.\n\n## Reporting a Vulnerability\n\n**Please do not file a public ticket** mentioning the vulnerability.\n\nInstead, please send an email to <security@autonity.org> to report a security\nissue.\n\nThe following PGP key may be used to communicate sensitive information to\ndevelopers:\n\nFingerprint: `6006 CCC3 DD11 7885 1A23 4290 7486 F832 6320 219E`\n\n```\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nxsFNBGL7epsBEADHxcFdpX1a60JFFN4jW3VtvofLFNXAHKT4GlOtIayozySdZI2A\nfGRg2brbYdXdlHN3MYZJbMo/kIfMlYqiVFevEtNGDEGKYmqzXiad7RRpmxYyjzhH\nVfkMd7V9wjEKiU9jL/GIDEXF32ZQbHwtvT3GRAd9NyPsjF3V8tzF4C5Da2zrSX17\nK8jn5Tfi3OLHm2r0oyNaV4MAZD4usXSnvUbKPMe5OALv64oZd+1uSIv2qdZ1HPqs\nVLiDSXcY31FkB3Wfc0oeT2rlvqsujFQC1hicI6hXI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kEU2cxVe6IoK+x/uP0nfmCoH7ZlWapIOgKSDKsb/Ze\nczVTmHt23O9/Tq7C2aCvK3UFcAWNEQFR6pWGgiPonxSaTN4Cw2f1vKekhxAYXrbm\n7sqEKZl+59D8uzHA0QSORP8FKpextccCtiL2L5b3ttGmrjGiXeL1wm1iWHxuOksm\nOpGFz6WgVZS1MYuomyBb/tm8MOsPabODmW3kJDUd1DcxO99ZFP72IERBTKqonKLW\nVCTV8Evv2agpTwTiP7TxGnl9ep5ZxkXAnQUXMwfVBYg0uGmmMhdcQ2n8wh6f1aR2\nGksOuLSMQTC/RNNHOnS0xTKrlh0uQ5fF0WZJaUpUXjHxCjiBAXUdlwXJET+S2t7H\njLXA1MdBmJp7ymBVRqQQguaH5G2dciSEG/iqMLH76u7c+L1w+esGpwbSu1OH+wd7\n7ys9vJxxJIqch8mzKlRTun+M/CCXWX5uvxeVGrwmvrARfnyOpyR9W0MzJ5xi7n5I\nB1LUp7ycX/NeWHviWALjz1ObHeipvErh2n2iD/8swWez6eho1BDJ9sf8hz/gVJbR\ndNvOgvIvgW1Bcibq3uqiigQnFYo15bmfIDRCJCBCmqf4Xb8Ip+m/QrLf92KIcDRc\nVtiVUMzKBEpmz4LdeSy73Qfr\n=12PL\n-----END PGP PUBLIC KEY BLOCK-----\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Command line interface to interact with Autonity",
    "version": "1.0.0",
    "project_urls": {
        "Changes": "https://github.com/autonity/autonity-cli/blob/master/CHANGELOG.md",
        "Homepage": "https://github.com/autonity/autonity-cli",
        "Issues": "https://github.com/autonity/autonity-cli/issues",
        "Source": "https://github.com/autonity/autonity-cli"
    },
    "split_keywords": [
        "autonity",
        " cli",
        " rpc",
        " web3"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "13a3aad31584e0eb2966dbef843bb5d541161143ba3a37ce4cc8e8334ee01b30",
                "md5": "5f7c64339d917a18036217d991262c25",
                "sha256": "f85444b273ddacb12debc0d26b492c2c2d723fcc4f65844b74fee6d69ba83838"
            },
            "downloads": -1,
            "filename": "autonity_cli-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5f7c64339d917a18036217d991262c25",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 47690,
            "upload_time": "2024-12-12T12:28:03",
            "upload_time_iso_8601": "2024-12-12T12:28:03.710277Z",
            "url": "https://files.pythonhosted.org/packages/13/a3/aad31584e0eb2966dbef843bb5d541161143ba3a37ce4cc8e8334ee01b30/autonity_cli-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "eba0317dafb4e15d0acfe60620820ab08488e130d3dcb8eda6797a9a2202bbca",
                "md5": "9fbb8d9581072cca209fba9b37a19a7d",
                "sha256": "d4fe1d080e75958988b09a685ec3007c7ba76be370707ac41a5bdde9e426f0d6"
            },
            "downloads": -1,
            "filename": "autonity_cli-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9fbb8d9581072cca209fba9b37a19a7d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 37754,
            "upload_time": "2024-12-12T12:28:01",
            "upload_time_iso_8601": "2024-12-12T12:28:01.539841Z",
            "url": "https://files.pythonhosted.org/packages/eb/a0/317dafb4e15d0acfe60620820ab08488e130d3dcb8eda6797a9a2202bbca/autonity_cli-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-12 12:28:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "autonity",
    "github_project": "autonity-cli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "autonity-cli"
}
        
Elapsed time: 0.54788s