aleo-sdk 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aleo_sdk-0.2.0/.cargo/config.toml +6 -0
- aleo_sdk-0.2.0/.gitignore +6 -0
- aleo_sdk-0.2.0/.readthedocs.yaml +12 -0
- aleo_sdk-0.2.0/CONTRIBUTING.md +34 -0
- aleo_sdk-0.2.0/Cargo.lock +4029 -0
- aleo_sdk-0.2.0/Cargo.toml +34 -0
- aleo_sdk-0.2.0/LICENSE.md +596 -0
- aleo_sdk-0.2.0/PKG-INFO +296 -0
- aleo_sdk-0.2.0/Readme.md +280 -0
- aleo_sdk-0.2.0/build-both.sh +85 -0
- aleo_sdk-0.2.0/build.sh +8 -0
- aleo_sdk-0.2.0/docs/requirements.txt +9 -0
- aleo_sdk-0.2.0/docs/source/conf.py +90 -0
- aleo_sdk-0.2.0/docs/source/examples.rst +85 -0
- aleo_sdk-0.2.0/docs/source/index.rst +25 -0
- aleo_sdk-0.2.0/docs/source/usage.rst +9 -0
- aleo_sdk-0.2.0/install.sh +9 -0
- aleo_sdk-0.2.0/pyproject.toml +38 -0
- aleo_sdk-0.2.0/pytest.ini +7 -0
- aleo_sdk-0.2.0/python/aleo/__init__.py +49 -0
- aleo_sdk-0.2.0/python/aleo/__init__.pyi +1636 -0
- aleo_sdk-0.2.0/python/aleo/_aleolib_mainnet.pyi +1599 -0
- aleo_sdk-0.2.0/python/aleo/_aleolib_testnet.pyi +1599 -0
- aleo_sdk-0.2.0/python/aleo/_client_common.py +174 -0
- aleo_sdk-0.2.0/python/aleo/_facade_common.py +72 -0
- aleo_sdk-0.2.0/python/aleo/_scanner_common.py +224 -0
- aleo_sdk-0.2.0/python/aleo/abi.py +101 -0
- aleo_sdk-0.2.0/python/aleo/async_network_client.py +661 -0
- aleo_sdk-0.2.0/python/aleo/async_record_scanner.py +589 -0
- aleo_sdk-0.2.0/python/aleo/codegen/__init__.py +9 -0
- aleo_sdk-0.2.0/python/aleo/codegen/__main__.py +49 -0
- aleo_sdk-0.2.0/python/aleo/codegen/_emit.py +255 -0
- aleo_sdk-0.2.0/python/aleo/codegen/runtime.py +158 -0
- aleo_sdk-0.2.0/python/aleo/encryptor.py +63 -0
- aleo_sdk-0.2.0/python/aleo/facade/__init__.py +43 -0
- aleo_sdk-0.2.0/python/aleo/facade/account.py +334 -0
- aleo_sdk-0.2.0/python/aleo/facade/async_client.py +1065 -0
- aleo_sdk-0.2.0/python/aleo/facade/call.py +526 -0
- aleo_sdk-0.2.0/python/aleo/facade/client.py +319 -0
- aleo_sdk-0.2.0/python/aleo/facade/errors.py +73 -0
- aleo_sdk-0.2.0/python/aleo/facade/network.py +495 -0
- aleo_sdk-0.2.0/python/aleo/facade/programs.py +552 -0
- aleo_sdk-0.2.0/python/aleo/facade/provider.py +152 -0
- aleo_sdk-0.2.0/python/aleo/facade/records.py +338 -0
- aleo_sdk-0.2.0/python/aleo/mainnet.py +2 -0
- aleo_sdk-0.2.0/python/aleo/mainnet.pyi +1 -0
- aleo_sdk-0.2.0/python/aleo/network_client.py +695 -0
- aleo_sdk-0.2.0/python/aleo/py.typed +0 -0
- aleo_sdk-0.2.0/python/aleo/record_scanner.py +643 -0
- aleo_sdk-0.2.0/python/aleo/security.py +51 -0
- aleo_sdk-0.2.0/python/aleo/testing/__init__.py +21 -0
- aleo_sdk-0.2.0/python/aleo/testing/devnode.py +313 -0
- aleo_sdk-0.2.0/python/aleo/testnet.py +2 -0
- aleo_sdk-0.2.0/python/aleo/testnet.pyi +1 -0
- aleo_sdk-0.2.0/python/examples/facade_quickstart.py +274 -0
- aleo_sdk-0.2.0/python/tests/conftest.py +7 -0
- aleo_sdk-0.2.0/python/tests/e2e/__init__.py +1 -0
- aleo_sdk-0.2.0/python/tests/e2e/conftest.py +58 -0
- aleo_sdk-0.2.0/python/tests/e2e/test_devnode_async.py +49 -0
- aleo_sdk-0.2.0/python/tests/e2e/test_devnode_transact.py +37 -0
- aleo_sdk-0.2.0/python/tests/e2e/test_live_e2e.py +304 -0
- aleo_sdk-0.2.0/python/tests/e2e/test_testnet_objects_live.py +462 -0
- aleo_sdk-0.2.0/python/tests/fixtures/shield_swap_v3.abi.json +2655 -0
- aleo_sdk-0.2.0/python/tests/test_abi_hook.py +82 -0
- aleo_sdk-0.2.0/python/tests/test_account.py +18 -0
- aleo_sdk-0.2.0/python/tests/test_account_class.py +110 -0
- aleo_sdk-0.2.0/python/tests/test_account_parity.py +345 -0
- aleo_sdk-0.2.0/python/tests/test_algebra.py +15 -0
- aleo_sdk-0.2.0/python/tests/test_algorithms.py +341 -0
- aleo_sdk-0.2.0/python/tests/test_chain_data.py +348 -0
- aleo_sdk-0.2.0/python/tests/test_codegen_cli.py +48 -0
- aleo_sdk-0.2.0/python/tests/test_codegen_emit.py +140 -0
- aleo_sdk-0.2.0/python/tests/test_codegen_runtime.py +88 -0
- aleo_sdk-0.2.0/python/tests/test_encryptor.py +26 -0
- aleo_sdk-0.2.0/python/tests/test_facade_account.py +372 -0
- aleo_sdk-0.2.0/python/tests/test_facade_async.py +538 -0
- aleo_sdk-0.2.0/python/tests/test_facade_call.py +311 -0
- aleo_sdk-0.2.0/python/tests/test_facade_client.py +437 -0
- aleo_sdk-0.2.0/python/tests/test_facade_e2e.py +97 -0
- aleo_sdk-0.2.0/python/tests/test_facade_network.py +569 -0
- aleo_sdk-0.2.0/python/tests/test_facade_programs.py +400 -0
- aleo_sdk-0.2.0/python/tests/test_facade_records.py +449 -0
- aleo_sdk-0.2.0/python/tests/test_network_client.py +877 -0
- aleo_sdk-0.2.0/python/tests/test_network_client_async.py +598 -0
- aleo_sdk-0.2.0/python/tests/test_numeric_parity.py +663 -0
- aleo_sdk-0.2.0/python/tests/test_plaintext.py +217 -0
- aleo_sdk-0.2.0/python/tests/test_program_keys.py +605 -0
- aleo_sdk-0.2.0/python/tests/test_programs.py +22 -0
- aleo_sdk-0.2.0/python/tests/test_proving.py +219 -0
- aleo_sdk-0.2.0/python/tests/test_proving_request.py +150 -0
- aleo_sdk-0.2.0/python/tests/test_record_scanner.py +704 -0
- aleo_sdk-0.2.0/python/tests/test_record_scanner_async.py +476 -0
- aleo_sdk-0.2.0/python/tests/test_records.py +28 -0
- aleo_sdk-0.2.0/python/tests/test_records_extra.py +426 -0
- aleo_sdk-0.2.0/python/tests/test_security.py +95 -0
- aleo_sdk-0.2.0/python/tests/test_testnet.py +81 -0
- aleo_sdk-0.2.0/python/tests/test_types.py +241 -0
- aleo_sdk-0.2.0/python/tests/test_value_plaintext.py +233 -0
- aleo_sdk-0.2.0/python/tests/test_vectors_extra.py +179 -0
- aleo_sdk-0.2.0/python/tests/vectors/accounts.json +15 -0
- aleo_sdk-0.2.0/python/tests/vectors/algorithms.json +66 -0
- aleo_sdk-0.2.0/python/tests/vectors/execution.json +1 -0
- aleo_sdk-0.2.0/python/tests/vectors/proving_request.json +5 -0
- aleo_sdk-0.2.0/python/tests/vectors/records.json +15 -0
- aleo_sdk-0.2.0/src/account/address.rs +223 -0
- aleo_sdk-0.2.0/src/account/compute_key.rs +63 -0
- aleo_sdk-0.2.0/src/account/graph_key.rs +87 -0
- aleo_sdk-0.2.0/src/account/mod.rs +141 -0
- aleo_sdk-0.2.0/src/account/private_key.rs +195 -0
- aleo_sdk-0.2.0/src/account/private_key_ciphertext.rs +145 -0
- aleo_sdk-0.2.0/src/account/record.rs +232 -0
- aleo_sdk-0.2.0/src/account/signature.rs +163 -0
- aleo_sdk-0.2.0/src/account/text.rs +404 -0
- aleo_sdk-0.2.0/src/account/view_key.rs +113 -0
- aleo_sdk-0.2.0/src/algebra/boolean.rs +257 -0
- aleo_sdk-0.2.0/src/algebra/field.rs +311 -0
- aleo_sdk-0.2.0/src/algebra/group.rs +277 -0
- aleo_sdk-0.2.0/src/algebra/integer.rs +804 -0
- aleo_sdk-0.2.0/src/algebra/mod.rs +30 -0
- aleo_sdk-0.2.0/src/algebra/scalar.rs +315 -0
- aleo_sdk-0.2.0/src/algorithms/bhp/bhp1024.rs +65 -0
- aleo_sdk-0.2.0/src/algorithms/bhp/bhp256.rs +65 -0
- aleo_sdk-0.2.0/src/algorithms/bhp/bhp512.rs +65 -0
- aleo_sdk-0.2.0/src/algorithms/bhp/bhp768.rs +65 -0
- aleo_sdk-0.2.0/src/algorithms/bhp/mod.rs +27 -0
- aleo_sdk-0.2.0/src/algorithms/mod.rs +24 -0
- aleo_sdk-0.2.0/src/algorithms/pedersen/mod.rs +21 -0
- aleo_sdk-0.2.0/src/algorithms/pedersen/pedersen128.rs +60 -0
- aleo_sdk-0.2.0/src/algorithms/pedersen/pedersen64.rs +60 -0
- aleo_sdk-0.2.0/src/algorithms/poseidon/mod.rs +24 -0
- aleo_sdk-0.2.0/src/algorithms/poseidon/poseidon2.rs +71 -0
- aleo_sdk-0.2.0/src/algorithms/poseidon/poseidon4.rs +71 -0
- aleo_sdk-0.2.0/src/algorithms/poseidon/poseidon8.rs +71 -0
- aleo_sdk-0.2.0/src/credits/mod.rs +81 -0
- aleo_sdk-0.2.0/src/lib.rs +119 -0
- aleo_sdk-0.2.0/src/network/mod.rs +48 -0
- aleo_sdk-0.2.0/src/programs/authorization.rs +125 -0
- aleo_sdk-0.2.0/src/programs/deployment.rs +126 -0
- aleo_sdk-0.2.0/src/programs/dynamic_record.rs +116 -0
- aleo_sdk-0.2.0/src/programs/execution.rs +118 -0
- aleo_sdk-0.2.0/src/programs/execution_request.rs +216 -0
- aleo_sdk-0.2.0/src/programs/fee.rs +127 -0
- aleo_sdk-0.2.0/src/programs/identifier.rs +75 -0
- aleo_sdk-0.2.0/src/programs/literal.rs +154 -0
- aleo_sdk-0.2.0/src/programs/locator.rs +108 -0
- aleo_sdk-0.2.0/src/programs/metadata.rs +473 -0
- aleo_sdk-0.2.0/src/programs/mod.rs +87 -0
- aleo_sdk-0.2.0/src/programs/offline_query.rs +63 -0
- aleo_sdk-0.2.0/src/programs/process.rs +226 -0
- aleo_sdk-0.2.0/src/programs/program.rs +331 -0
- aleo_sdk-0.2.0/src/programs/program_id.rs +92 -0
- aleo_sdk-0.2.0/src/programs/proof.rs +68 -0
- aleo_sdk-0.2.0/src/programs/proving_key.rs +420 -0
- aleo_sdk-0.2.0/src/programs/proving_request.rs +390 -0
- aleo_sdk-0.2.0/src/programs/query.rs +48 -0
- aleo_sdk-0.2.0/src/programs/response.rs +38 -0
- aleo_sdk-0.2.0/src/programs/trace.rs +84 -0
- aleo_sdk-0.2.0/src/programs/transaction.rs +229 -0
- aleo_sdk-0.2.0/src/programs/transition.rs +438 -0
- aleo_sdk-0.2.0/src/programs/value.rs +149 -0
- aleo_sdk-0.2.0/src/programs/verifying_key.rs +314 -0
- aleo_sdk-0.2.0/src/types.rs +116 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# PyO3 extension modules must leave Python symbols undefined at link time
|
|
2
|
+
# (they resolve against the host interpreter at import). maturin injects
|
|
3
|
+
# these flags itself; this config makes plain `cargo build`/`cargo test`
|
|
4
|
+
# link successfully on macOS too (e.g. the --features testnet check).
|
|
5
|
+
[target.'cfg(target_os = "macos")']
|
|
6
|
+
rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
build:
|
|
3
|
+
os: ubuntu-22.04
|
|
4
|
+
tools:
|
|
5
|
+
python: "3.11"
|
|
6
|
+
rust: "1.70"
|
|
7
|
+
commands:
|
|
8
|
+
- pip install maturin[patchelf]
|
|
9
|
+
- cd sdk && maturin build
|
|
10
|
+
- pip install sdk/target/wheels/*.whl
|
|
11
|
+
- pip install -r sdk/docs/requirements.txt
|
|
12
|
+
- sphinx-build -M html sdk/docs/source/ _readthedocs/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to the Aleo sdk library of the Aleo python-sdk! Below you can find some guidelines that the projects strive to follow.
|
|
4
|
+
|
|
5
|
+
## Filing Issues
|
|
6
|
+
|
|
7
|
+
When filing a new issue:
|
|
8
|
+
|
|
9
|
+
- Provide a clear and concise title.
|
|
10
|
+
- Describe the issue in detail, including steps to reproduce, expected behavior, and observed behavior.
|
|
11
|
+
- Label the issue correctly, e.g., "bug", "enhancement", etc.
|
|
12
|
+
|
|
13
|
+
## Development process
|
|
14
|
+
|
|
15
|
+
1. Code and enhance the respective library with new/better functionalities.
|
|
16
|
+
2. Write test functions to test the new functionalities into the `test.py` file, using the `unittest` library.
|
|
17
|
+
3. Ensure all of the tests run successfully, using the `install.sh` file.
|
|
18
|
+
4. Please also ensure the CircleCI tests run successfully, as these tests will be enforced on GitHub prior to merging a pull request. For this, ensure you have `circleci-cli` [installed](https://circleci.com/docs/local-cli/), and `Docker` [installed](https://docs.docker.com/engine/install/). Then, navigate to the `python-sdk` root folder of the repository and run:
|
|
19
|
+
```bash
|
|
20
|
+
circleci local execute build-and-test
|
|
21
|
+
```
|
|
22
|
+
5. If you want to generate executables for the release, ensure `poetry` is installed and then run:
|
|
23
|
+
```bash
|
|
24
|
+
poetry build
|
|
25
|
+
```
|
|
26
|
+
In the future, we aim to automate this step with automated building through CircleCI.
|
|
27
|
+
|
|
28
|
+
## Pull requests
|
|
29
|
+
|
|
30
|
+
Please follow the instructions below when filing pull requests:
|
|
31
|
+
|
|
32
|
+
- Ensure that your branch is forked from the current [master](https://github.com/AleoHQ/python-sdk/tree/master) branch.
|
|
33
|
+
- Provide descriptive text for the feature or proposal. Be sure to link the pull request to any issues by using keywords. Example: "closes #130".
|
|
34
|
+
- Write clear and concise commit messages, describing the changes you made.
|