Solana

Latest version: v0.34.2

Safety actively analyzes 638396 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 6

0.27.2

Changed

- Use latest `solders` [(312)](https://github.com/michaelhly/solana-py/pull/312)

0.27.1

Fixed

- Fix incorrect `encoding` arg in `_simulate_transaction_body` [(311)](https://github.com/michaelhly/solana-py/pull/311)

0.27.0

Changed

- Replace SubscriptionError.code with SubscriptionError.type [(309)](https://github.com/michaelhly/solana-py/pull/309)

Fixed

- Fix parsing of RPC error messages [(309)](https://github.com/michaelhly/solana-py/pull/309)
- Correctly filter by program_id in _get_token_accounts_convert [(308)](https://github.com/michaelhly/solana-py/pull/308)

0.26.0

Added

- Added batch request methods `(Async)HTTPProvider.make_batch_request(_unparsed)` [(304)](https://github.com/michaelhly/solana-py/pull/304)
- Added `make_request_unparsed` to `(Async)HTTPProvider` [(304)](https://github.com/michaelhly/solana-py/pull/304)

Changed

- Use solders for parsing RPC requests [(302)](https://github.com/michaelhly/solana-py/pull/302):
- **Breaking change**: Every RPC method now returns a strongly typed object instead of a dictionary.
For example, `client.get_balance` returns `GetBalanceResp`.
- **Breaking change**: RPC methods now raise `RPCException` if the RPC returns an error result.
Previously only the transaction sending methods did this.
- **Breaking change**: RPC methods that can return `jsonParsed` data now have their own dedicated Python
method you should use. For example, instead of `client.get_account_info(..., encoding="jsonParsed")`
you should do `client.get_account_info_json_parsed(...)`. This is done for the sake of static typing.
- **Breaking change**: The `get_accounts` method on the SPL Token client has been split into four separate methods:
`get_accounts_by_delegate`, `get_accounts_by_owner`, `get_accounts_by_delegate_json_parsed`, and `get_accounts_by_owner_json_parsed`.
- **Breaking change**: `solana.rpc.responses` has been removed and supplanted by `solders.rpc.responses`.
- Remove unused deps: `apischema`, `based58`, `jsonrpcclient`, `jsonrpcserver`.

- Use Solders for building RPC requests:
- **Breaking change**: Removed deprecated RPC methods.
- **Breaking change**: Functions that accepted Union[PublicKey, str] now only accept PublicKey.
- **Breaking change**: RPC functions that accepted a `str` signature param now expect a `solders.signature.Signature`.

Fixed

- `send_raw_transaction` now defaults to the client's commitment level if `preflight_commitment` is not otherwise specified.

0.25.0

Fixed

- Use latest Solders version to make objects pickleable again [(252)](https://github.com/michaelhly/solana-py/pull/252).


Changed

- Updated httpx to fix critical vulnerability [(248)](https://github.com/michaelhly/solana-py/pull/248).
- Updated pytest, websockets, pytest-docker, pytest-asyncio to latest. [(254)](https://github.com/michaelhly/solana-py/pull/254).
- Updated apischema to latest. [(254)](https://github.com/michaelhly/solana-py/pull/254).


Added

- Added `get_latest_blockhash` RPC Call. [(254)](https://github.com/michaelhly/solana-py/pull/254).
- Added `get_fee_for_message` RPC Call. [(254)](https://github.com/michaelhly/solana-py/pull/254).
- Added confirmation strategy which checks if the transaction has exceeded last valid blockheight. [(254)](https://github.com/michaelhly/solana-py/pull/254).
- Added `asyncio_mode = auto` in pytest.ini. [(248)](https://github.com/michaelhly/solana-py/pull/254).
- Added an optional `verify_signature` bool when `transaction.serialize()` is called [(249)](https://github.com/michaelhly/solana-py/pull/249).
- Added Memo program [(249)](https://github.com/michaelhly/solana-py/pull/249).

0.24.0

Not secure
Changed

- Use [solders](https://github.com/kevinheavey/solders) under the hood for keypairs and pubkeys [(#237)](https://github.com/michaelhly/solana-py/pull/237).
- Remove deprecated `Account` entirely [(238)](https://github.com/michaelhly/solana-py/pull/238).
- Use [solders](https://github.com/kevinheavey/solders) under the hood for `Message` [(#239)](https://github.com/michaelhly/solana-py/pull/239).
- Remove unused and very old instruction.py file [(240)](https://github.com/michaelhly/solana-py/pull/240).
- Default to client's commitment in confirm_transaction, send_transaction and the `Token` client [(242)](https://github.com/michaelhly/solana-py/pull/242).
- Use [solders](https://github.com/kevinheavey/solders) under the hood for `Transaction` [(#241)](https://github.com/michaelhly/solana-py/pull/241). BREAKING CHANGES:
- `Transaction.__init__` no longer accepts a `signatures` argument. If you want to construct a transaction with certain signatures, you can still use `Transaction.populate`.
- `Transaction.add_signer` has been removed (it was removed from web3.js in September 2020).
- The `signatures` attribute of `Transaction` has been changed to a read-only property.
- Where previously a "signature" was represented as `bytes`, it is now expected to be a `solders.signature.Signature`.
This affects the following properties and functions: `Transaction.signature`, `Transacton.signatures`, `Transaction.add_signature`, `Transaction.populate`
- The `keypairs` in `Transaction.sign_partial` are now only allowed to be `Keypair` objects. Previously `Union[PublicKey, Keypair]` was allowed.
- The `.signatures` property of an unsigned transaction is now a list of `solders.signature.Signature.default()` instead
of an empty list.
- Use [solders](https://github.com/kevinheavey/solders) under the hood for system instructions [(#243)](https://github.com/michaelhly/solana-py/pull/243)

Added

- Expose `client.commmitment` as a property like in web3.js [(242)](https://github.com/michaelhly/solana-py/pull/242).

Page 3 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.