- Relax httpx dependency (#408)
- Remove experimental and flawed BlockhashCache (#408). This was a footgun because it broke a lot.
- Upgrade to Solders 0.21.0 (fixes aarch64 compatibility issues) (#402)
- Upgrade to Solders 0.20 (#394)
- Add sync_native instruction (#376)
- Use latest Solders (#363)
Use latest Solders (#352)
Relaxed websockets dependency (#347)
Fix accidentally ignoring tx_opts in send_transaction
methods (#343)
- Add VersionedTransaction support to
send_transaction
andsimulate_transaction
methods (#334) - Support VersionedMessage in
get_fee_for_message
methods (#337)
- Remove redundant classes and modules (#329, #335 and #338):
- Remove
PublicKey
, in favour ofsolders.pubkey.Pubkey
. - Remove
AccountMeta
in favour ofsolders.instruction.AccountMeta
. - Remove
TransactionInstruction
in favour ofsolders.instruction.Instruction
. - Remove
Keypair
in favour ofsolders.keypair.Keypair
. Your code will need to change as follows:my_keypair.public_key
->my_keypair.pubkey()
my_keypair.secret_key
->bytes(my_keypair)
my_keypair.seed
->my_keypair.secret()
my_keypair.sign(msg)
->my_keypair.sign_message(msg)
Keypair.from_secret_key(key)
->Keypair.from_bytes(key)
- Remove
Message
in favour ofsolders.message.Message
. - Remove
system_program
in favour ofsolders.system_program
. Note: where previously a params object likeAssignParams
called a fieldprogram_id
, it now calls itowner
. - Remove
sysvar
in favour ofsolders.sysvar
. The constants insolders.sysvar
have short names, so instead ofsolana.sysvar.SYSVAR_RENT_PUBKEY
you'll usesolders.sysvar.RENT
. - Remove
solana.blockhash.Blockhash
in favour ofsolders.hash.Hash
. Note:Blockhash(my_str)
->Hash.from_str(my_str)
. - Remove
solana.transaction.TransactionSignature
newtype. This was unused - solana-py is already usingsolders.signature.Signature
. - Remove constant
solana.transaction.SIG_LENGTH
in favour ofsolders.signature.Signature.LENGTH
. - Remove unused
solana.transaction.SigPubkeyPair
.
- Remove
- Use latest solders (#334)
- Use new
solders.rpc.requests.SendRawTransaction
insend_raw_transaction
methods (#332)
Fix conversion of MemcmpOpts in get_program_accounts
methods (#328)
- Use latest
solders
. Note that the parsed fields of jsonParsed responses are now dicts rather than strings. (#318) - Remove
requests
dependency (#315)
- Fix flakiness in token client transactions (#314)
- Use latest
solders
(#312)
- Fix incorrect
encoding
arg in_simulate_transaction_body
(#311)
- Replace SubscriptionError.code with SubscriptionError.type (#309)
- Fix parsing of RPC error messages (#309)
- Correctly filter by program_id in _get_token_accounts_convert (#308)
- Added batch request methods
(Async)HTTPProvider.make_batch_request(_unparsed)
(#304) - Added
make_request_unparsed
to(Async)HTTPProvider
(#304)
-
Use solders for parsing RPC requests (#302):
- Breaking change: Every RPC method now returns a strongly typed object instead of a dictionary.
For example,
client.get_balance
returnsGetBalanceResp
. - 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 ofclient.get_account_info(..., encoding="jsonParsed")
you should doclient.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
, andget_accounts_by_owner_json_parsed
. - Breaking change:
solana.rpc.responses
has been removed and supplanted bysolders.rpc.responses
.
- Breaking change: Every RPC method now returns a strongly typed object instead of a dictionary.
For example,
-
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 asolders.signature.Signature
.
send_raw_transaction
now defaults to the client's commitment level ifpreflight_commitment
is not otherwise specified.
- Use latest Solders version to make objects pickleable again (#252).
- Updated httpx to fix critical vulnerability (#248).
- Updated pytest, websockets, pytest-docker, pytest-asyncio to latest. (#254).
- Updated apischema to latest. (#254).
- Added
get_latest_blockhash
RPC Call. (#254). - Added
get_fee_for_message
RPC Call. (#254). - Added confirmation strategy which checks if the transaction has exceeded last valid blockheight. (#254).
- Added
asyncio_mode = auto
in pytest.ini. (#248). - Added an optional
verify_signature
bool whentransaction.serialize()
is called (#249). - Added Memo program (#249).
- Use solders under the hood for keypairs and pubkeys (#237).
- Remove deprecated
Account
entirely (#238). - Use solders under the hood for
Message
(#239). - Remove unused and very old instruction.py file (#240).
- Default to client's commitment in confirm_transaction, send_transaction and the
Token
client (#242). - Use solders under the hood for
Transaction
(#241). BREAKING CHANGES:Transaction.__init__
no longer accepts asignatures
argument. If you want to construct a transaction with certain signatures, you can still useTransaction.populate
.Transaction.add_signer
has been removed (it was removed from web3.js in September 2020).- The
signatures
attribute ofTransaction
has been changed to a read-only property. - Where previously a "signature" was represented as
bytes
, it is now expected to be asolders.signature.Signature
. This affects the following properties and functions:Transaction.signature
,Transacton.signatures
,Transaction.add_signature
,Transaction.populate
- The
keypairs
inTransaction.sign_partial
are now only allowed to beKeypair
objects. PreviouslyUnion[PublicKey, Keypair]
was allowed. - The
.signatures
property of an unsigned transaction is now a list ofsolders.signature.Signature.default()
instead of an empty list.
- Use solders under the hood for system instructions (#243)
- Expose
client.commmitment
as a property like in web3.js (#242).
- Make transaction message compilation consistent with @solana/web3.js (228)
- Relax typing-extensions contraint (#220)
- Fix str seed input for sp.create_account_with_seed (#206)
- Update
jsonrpcserver
dependency (#205)
- Implement
__hash__
for PublicKey (#202)
- Add default RPC client commitment to token client (#187)
- Add cluster_api_url function (#193)
- Add getBlockHeight RPC method (#200)
- Replace base58 library with based58 #192
- Make
program_ids
list deterministic incompile_message
(#164)
- Throw more specific Exception in API client on failure to retrieve RPC result (#166)
- Add max_retries option to sendTransaction and commitment option to get_transaction (#165)
- Add a partial support for vote program (#167)
- Make keypair hashable and move setters out of property functions (#158)
- Custom solana-py RPC error handling (#152)
- Websockets support (#144)
- New client functions (#139)
- A timeout param for
Client
andAsyncClient
(#146)
- Always return the tx signature when sending transaction (the async method was returning signature status if we were confirming the tx)
- Raise OnCurveException instead of generic Exception in
create_program_address
(#128)
- Add
until
parameter toget_signatures_for_address
(#133) - This changelog.
- To reduce RPC calls from fetching recent blockhashes - allow user-supplied blockhash to
.send_transaction
and dependent fns, and introduce an opt-in blockhash cache (#102) - ReadTheDocs theme and doc changes (#103)
- Deprecate
Account
and replace withKeypair
(#105)
- Implement methods for
solana.system_program
similar to solana-web3:create_account_with_seed
,decode_create_account_with_seed
(#101) - Support for getMultipleAccounts RPC method (#103)
- Support for
solana.rpc.api
methodsget_token_largest_accounts
,get_token_supply
(#104)
- Missing
spl.token.async_client
methods -create_multisig
,get_mint_info
,get_account_info
,approve
,revoke
,burn
,close_account
,freeze_account
,thaw_account
,transfer_checked
,approve_checked
,mint_to_checked
,burn_checked
. Missingspl.token.client
methods -create_multisig
,get_mint_info
,get_account_info
,approve
,revoke
, set_authority, close_account
,freeze_account
,thaw_account
,transfer_checked
,approve_checked
,mint_to_checked
,burn_checked
(#89)
- Valid instruction can contain no keys (#70)
- Commitment levels - deprecated
max
,root
,singleGossip
,recent
and addedprocessed
,confirmed
,finalized
(#82)
- Allocate instruction for system program -
solana.system_program.decode_allocate
,solana.system_program.decode_allocate_with_seed
,solana.system_program.allocate
(#79) - Async support -
AsyncClient
andAsyncToken
classes, refactors sync code, httpx dependency (#83)
- Valid instruction can contain no keys (#70)
- Pipenv update
- Use new devnet api endpoint, deprecate
solana.rpc.api.getConfirmedSignaturesForAddress2
and usesolana.rpc.api.getSignaturesForAddress
instead (#77)
- Integration tests
solana.publickey.create_with_seed
(#69)
- Mismatch in annotation (#63)
- unused imports
- Use python-pure25519 curve check util instead of crypto_core_ed25519_is_valid_point
Added (#66)
- python-pure25519 curve check util
spl.token.client.create_associated_token_account
spl.token.instructions.get_associated_token_address
spl.token.instructions.create_associated_token_account
- ATA constant
ASSOCIATED_TOKEN_PROGRAM_ID