cosmpy
cosmpy copied to clipboard
Bug report: rebus support
Prerequisites
- [X] I am running the latest CosmPy version.
- [X] I checked the documentation and found no answer to my problem.
- [X] I checked the existing issues to make sure my problem has not already been reported.
- [X] I have read the code of conduct before creating this issue.
Expected Behavior
Hey! I'm trying to use cosmpy to work with rebus, but when I try to construct a transaction, I get an error with the account.
from cosmpy.aerial.wallet import LocalWallet
from cosmpy.crypto.keypairs import PrivateKey
import bip_utils.slip.slip44.slip44
mnemonic = "1 2 3 4 5"
seed_bytes = Bip39SeedGenerator(mnemonic).Generate()
bip44_def_ctx = Bip44.FromSeed(seed_bytes, Bip44Coins.COSMOS).DeriveDefaultPath()
wallet = LocalWallet(PrivateKey(bip44_def_ctx.PrivateKey().Raw().ToBytes()), prefix=prefix)
address = wallet.address()
balance = ledger_client.query_bank_balance(address)
print(f"Sender Address: {address}, Balance: {balance/1000000000000000000}")
account = ledger_client.query_account(wallet.address())```
### Current Behavior
RuntimeError: Unexpected account type returned from query
### To Reproduce
_No response_
### Context
mac os m1
### Failure Logs
```262 account = BaseAccount()
263 if not response.account.Is(BaseAccount.DESCRIPTOR):
--> 264 raise RuntimeError("Unexpected account type returned from query")
265 response.account.Unpack(account)
267 return Account(
268 address=address,
269 number=account.account_number,
270 sequence=account.sequence,
271 )
RuntimeError: Unexpected account type returned from query```