This release is a pre-release and may not be stable for production use.
PINELY Python SDK
Python package for autonomous machine finance on Robinhood Chain (testnet 46630, mainnet 4663). It implements
the same signing and payment flow as the TypeScript SDK (@pinely-protocol/sdk), and produces identical machine
IDs and signatures for identical inputs. It is a subset of the TypeScript API, see Limitations.
- Machine key store abstraction (
DevKeyStore,KeyStore). - EIP-712 signing for revenue swaps (
SwapIntent) and HTTP 402 payments (Payment402Intent). hookDataencoding for the PinelyHook (Stage 2).
Install
This is a beta release (0.1.0b1). While it is the only release, a plain install picks it up:
pip install pinely-sdk
Once a stable release exists, pip skips pre-releases unless you pass --pre, so use pip install --pre pinely-sdk
to keep following the beta channel.
Supported dependency ranges: web3 7.0 to 8.x, eth-account 0.13.1 or newer, requests 2.31 or newer. The
test suite was run on Python 3.12 with both the lowest and the highest of these combinations.
From a clone of the repository (development):
pip install -e sdk-python
Usage
from pinely_sdk import Pinely
pinely = Pinely.connect(
private_key="0x...",
chain_id=46630,
registry_address="0x...", # MachineRegistry, from the deployment address book
stablecoin_address="0x...", # canonical stablecoin, from the official Robinhood Chain documentation
paymaster_address="0x...", # PinelyPaymaster, required for payments
)
machine = pinely.machines.create(name="autonomous-delivery-01", operator="0x...")
result = machine.pay(
"https://facilitator.example/v1/charge/dock-001",
max_amount=250_000, # 0.25 stablecoin (6 decimals): an upper bound, the challenge amount is what is paid
facilitator_url="https://facilitator.example",
)
Behaviour you can rely on
- No default addresses and no default network. A missing address or an unsupported chain raises.
- Payments are never simulated. Without
facilitator_url, with a 402 challenge for another asset, network or a larger amount, or without a Facilitator confirmation carrying a transaction hash and an access token, the result isfailed. - Never signs blindly. The prepared UserOperation is rebuilt and compared field by field (recipient, amount, token, paymaster, gas, fee cap) before its hash is signed.
- Swaps need Stage 2.
prepare_swapraises until ahook_addressis configured. - Replay isolation. The domains are
PINELYandPINELYFacilitator, bound to the chain id. Tests assert digests identical to the TypeScript SDK and the contract's type hash, so signatures from any earlier deployment never verify.
Limitations
This beta covers signing, hashing and the HTTP 402 payment flow. Compared with the TypeScript SDK it does not provide:
- A hardware key store.
Pinely.connect()takes a private key and always usesDevKeyStore, an in-memory key for development. Do not use it for a key that controls real funds on production hardware. - On-chain reads. There is no
rpc_url, so there is no machine info lookup and no kill-switch (isFrozen) check. - Transaction builders for freeze, unfreeze, policy changes and surplus sweeping.
The SDK is not externally audited.
Tests
python -m unittest discover -s sdk-python/tests -t sdk-python
Metadata
Release files for pinely-sdk 0.1.0b1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pinely_sdk-0.1.0b1.tar.gz | 21.2 kB | Without provenance | Details for pinely_sdk-0.1.0b1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pinely_sdk-0.1.0b1-py3-none-any.whl | Python 3 | none | any | Details for pinely_sdk-0.1.0b1-py3-none-any.whl |
Total release size: 35.7 kB
Release files / pinely_sdk-0.1.0b1.tar.gz
| Download URL | pinely_sdk-0.1.0b1.tar.gz |
|---|---|
| Size | 21.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba48acd83b127573137fa756e4b42ba5a49cef52eb10bf4fa14a5d901c8c1bf6
|
|
BLAKE2b-256 checksum How to use checksums |
7379e4e306a2653a662753bb1373ddf6c37bc664215d40c53315e4b353f9a54b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.6
|
Release files / pinely_sdk-0.1.0b1-py3-none-any.whl
| Download URL | pinely_sdk-0.1.0b1-py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7abf73d70edc0fe06b3cd81d093933f53b2a71ecb9acef4d5bb5d728aaaac640
|
|
BLAKE2b-256 checksum How to use checksums |
a575812ca303dfe2814055ae747db4fe4ed325964fb873d41c4917d4f285142e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.6
|
Security for pinely-sdk 0.1.0b1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.