Giter Club home page Giter Club logo

pybitcointools's People

Contributors

cneves avatar coder5876 avatar ethers avatar fcracker79 avatar frewsxcv avatar miwcryptocurrency avatar paulmartinwork avatar primal100 avatar reiven avatar renelvon avatar rubensayshi avatar steve132 avatar tgerring avatar tinybike avatar v1k45 avatar vbuterin avatar wizardofozzie avatar ycuv avatar zouppen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pybitcointools's Issues

return error when using some functions

I am new to python and blockchain and I face some problems when using the library.
When I try the following codes in colab.

from cryptos import *
l = Litecoin(testnet=True)
l.history("mioAEyT8BnWPwFQJdo6BSteooTysZVDnX3")

it returns

/usr/local/lib/python3.9/dist-packages/cryptos/coins/base.py in history(self, addr, merkle_proof)
162
163 def history(self, addr: str, merkle_proof: bool = False) -> ElectrumXHistoryResponse:
--> 164 return self._run_async("history", addr, merkle_proof=merkle_proof)
165
166 def get_histories(self, *args: str, merkle_proof: bool = False) -> List[ElectrumXMultiTxResponse]:

/usr/local/lib/python3.9/dist-packages/cryptos/coins/base.py in _run_async(self, method, *args, **kwargs)
82 fut = Future()
83 self._request_queue.sync_q.put((fut, method, args, kwargs))
---> 84 return fut.result(timeout=self.timeout * 2)
85
86 def del(self):

/usr/lib/python3.9/concurrent/futures/_base.py in result(self, timeout)
444 raise CancelledError()
445 elif self._state == FINISHED:
--> 446 return self.__get_result()
447 else:
448 raise TimeoutError()

/usr/lib/python3.9/concurrent/futures/_base.py in __get_result(self)
389 if self._exception:
390 try:
--> 391 raise self._exception
392 finally:
393 # Break a reference cycle with the exception in self._exception

/usr/local/lib/python3.9/dist-packages/cryptos/coins/base.py in run(self)
66 if inspect.isasyncgen(coro):
67 coro = alist(coro)
---> 68 result = await asyncio.wait_for(coro, timeout=self.timeout)
69 fut.set_result(result)
70 except BaseException as e:

/usr/lib/python3.9/asyncio/tasks.py in wait_for(fut, timeout, loop)
477
478 if fut.done():
--> 479 return fut.result()
480 else:
481 fut.remove_done_callback(cb)

/usr/local/lib/python3.9/dist-packages/cryptos/coins_async/base.py in history(self, addr, merkle_proof)
423 if self.client.requires_scripthash:
424 addr = self.addrtoscripthash(addr)
--> 425 txs = await self.client.get_history(addr)
426 if merkle_proof:
427 return list(await self._filter_by_proof(*txs))

/usr/local/lib/python3.9/dist-packages/cryptos/electrumx_client/client.py in get_history(self, scripthash)
500
501 async def get_history(self, scripthash: str) -> ElectrumXHistoryResponse:
--> 502 return await self.send_request("blockchain.scripthash.get_history", scripthash)
503
504 async def get_mempool(self, scripthash: str) -> ElectrumXMempoolResponse:

/usr/local/lib/python3.9/dist-packages/cryptos/electrumx_client/client.py in send_request(self, method, timeout, *args, **kwargs)
387
388 async def send_request(self, method: str, *args, timeout: int = 30, **kwargs) -> Any:
--> 389 await self._ensure_connected()
390 return await self._send_request(method, *args, timeout=timeout, **kwargs)
391

/usr/local/lib/python3.9/dist-packages/cryptos/electrumx_client/client.py in _ensure_connected(self)
357 for p in pending:
358 p.cancel()
--> 359 raise exc
360 else:
361 raise ConnectionError("JSONRPC Connection is already closing, cannot send message")

/usr/local/lib/python3.9/dist-packages/cryptos/electrumx_client/client.py in connect_to_any_server(self)
322
323 async def connect_to_any_server(self) -> None:
--> 324 self._set_new_server()
325 connect_task = asyncio.create_task(self._connect())
326

/usr/local/lib/python3.9/dist-packages/cryptos/electrumx_client/client.py in _set_new_server(self)
249 def _set_new_server(self):
250 self.host = self._choose_new_server()
--> 251 self.server = self._servers[self.host]
252 try:
253 self.port = int(self.server[self._port_key])

KeyError: None

Same problems when I try "send" functions, use bitcoin testnet and use my pc to do this.
Is there any step I have missed or something I need to install? Thank you very much.

Error on following readme and "cannot choose from empty sequence"

I have 2 issues:

  1. When literally copying the readme examples it appears that the parameters are given out of order and it tries to parse as int the recipient address.

  2. Even when fixing the issue above (adding keyword arguments) it gives "IndexError: Cannot choose from an empty sequence"; as far as I can see it tries to select a random server from an empty list that should be filled by

        if servers:
            self.servers = servers
        else:
            self.servers = read_json(server_file, {})

in lines 68 to 71.

The server file "bitcoin.json" seems to not be present, and then defaults to empty.
Am I supposed to provide this file?

occur error Error #-26: 64: bad-txns-nonstandard-inputs, code=-26

c.unspent(addr)
got only single output res:

 [{'output': '2bda516c03fcedaa79a5827eea7f607f365f1180e4dd9dc30a1e7143c8e26013:0', 'value': 950000}]

and init outs:

 [{'value': 100000, 'address': '32GGH6W8uK9WFnQwirkLM3zqSbvZV47suY'}, {'value': 795600, 'address': '3R19nu8MXnhvfJoCcVJKxe2THk4ZGX59YV'}]

and c.signall(tx, priv) got hex string:
01000000011360e2c843711e0ac39ddde480115f367f607fea7e82a579aaedfc036c51da2b000000008b483045022100ff521bbeabdd99a39c8d57409cb41c62b2cb3e688300575d534aaa5e3731f92f0220495b622ab5f74f3ba2c0e4f02965e118ded621d932156625ec9b77e29508270f01410498d50701f190c02ac432c1c6e3e868b70bd7fe49890ffcb3f1e870310d229fa4c8413baf30b8804915ba84b24b02b2e5c346af04bce50ffb0da75f6c4aab5cfeffffffff02a08601000000000017a9140649b58a4f377d75a45b4eb0321a7a4dca5ad68d87d0230c000000000017a914a9e1a3c3ed078b33214b3df052b458b7830538938700000000

c.pushtx(tx_seri)  occur error info: Validation Error: BitcoindException(super=com.neemre.btcdcli4j.core.BitcoindException: Error #-26: 64: bad-txns-nonstandard-inputs, code=-26  

I try to decoderawtransaction the hex string from c.signall(tx, priv) returns:

bitcoin-cli decoderawtransaction 01000000011360e2c843711e0ac39ddde480115f367f607fea7e82a579aaedfc036c51da2b000000008b483045022100c3752d4803644e1dfa3bb3773fb8defcab3a502b3fd91eed56b12c5c9089b38302203d49118f0c3d8a898b410f54155e8e73d6bdd0f9ad15084e9011ab3569a8aea901410498d50701f190c02ac432c1c6e3e868b70bd7fe49890ffcb3f1e870310d229fa4c8413baf30b8804915ba84b24b02b2e5c346af04bce50ffb0da75f6c4aab5cfeffffffff02d0230c000000000017a9140649b58a4f377d75a45b4eb0321a7a4dca5ad68d87a08601000000000017a914ffb8f2c954e1a7e6600578a6c7e30163f937cd038700000000  

got this:

{
  "txid": "e74e65b24779973e67baa6183c7dd6a5082d46a971d6a1a4ca21cbb164be3947",
  "hash": "e74e65b24779973e67baa6183c7dd6a5082d46a971d6a1a4ca21cbb164be3947",
  "version": 1,
  "size": 254,
  "vsize": 254,
  "locktime": 0,
  "vin": [
    {
      "txid": "2bda516c03fcedaa79a5827eea7f607f365f1180e4dd9dc30a1e7143c8e26013",
      "vout": 0,
      "scriptSig": {
        "asm": "3045022100ff521bbeabdd99a39c8d57409cb41c62b2cb3e688300575d534aaa5e3731f92f0220495b622ab5f74f3ba2c0e4f02965e118ded621d932156625ec9b77e29508270f[ALL] 0498d50701f190c02ac432c1c6e3e868b70bd7fe49890ffcb3f1e870310d229fa4c8413baf30b8804915ba84b24b02b2e5c346af04bce50ffb0da75f6c4aab5cfe",
        "hex": "483045022100ff521bbeabdd99a39c8d57409cb41c62b2cb3e688300575d534aaa5e3731f92f0220495b622ab5f74f3ba2c0e4f02965e118ded621d932156625ec9b77e29508270f01410498d50701f190c02ac432c1c6e3e868b70bd7fe49890ffcb3f1e870310d229fa4c8413baf30b8804915ba84b24b02b2e5c346af04bce50ffb0da75f6c4aab5cfe"
      },
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 0.00100000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 0649b58a4f377d75a45b4eb0321a7a4dca5ad68d OP_EQUAL",
        "hex": "a9140649b58a4f377d75a45b4eb0321a7a4dca5ad68d87",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [
          "32GGH6W8uK9WFnQwirkLM3zqSbvZV47suY"
        ]
      }
    },
    {
      "value": 0.00795600,
      "n": 1,
      "scriptPubKey": {
        "asm": "OP_HASH160 a9e1a3c3ed078b33214b3df052b458b783053893 OP_EQUAL",
        "hex": "a914a9e1a3c3ed078b33214b3df052b458b78305389387",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [
          "3HBGRggBpPaeWepZoKmfoHHF1U7GXcrvit"
        ]
      }
    }
  ]
}

Is there any problem with the above transaction info??? please help!

Use same coin classes for testnet and mainnet

Ideally for development environment a user/developer it would be easier/ convenient if same API/modules ran the expected functions on testnet without modifying much code.

For example:

With different classes/modules you'd have to do this in all files:

from cryptos import bitcoin
from cryptos import bitcoin_testnet


if settings.PRODUCTION:
    Bitcoin = bitcoin.Bitcoin
else:
    Bitcoin = bitcoin_testnet.Bitcoin

txdata = {...}
Bitcoin().pushtx(txdata)

With same classes a user can perhaps do something like this:

from cryptos.bitcoin import Bitcoin

txdata = {...}
Bitcoin(testnet=not settings.PRODUCTION).pushtx(txdata)

What do you think about it?
Feel free to assign this issue to me.

Error in multi signature transactions for bitcoin cash

Hello @primal100 ,
I am using multi signature transactions for bitcoin cash. I got this error

Traceback (most recent call last):
 File "bcc.py", line 1223 , in <module>
   s1 = coin.multisign(tx, i, script, "d2a900b169fe7f576d9c4237f341ca8b21ea16c0a7ef27e1e93bc4351b8f40b3")
 File "/kunwar/anaconda3/lib/python3.6/site-packages/cryptos/coins/base.py", line 223, in multisign
   return multisign(tx, i, script, pk, self.hashcode)
 File "/kunwar/anaconda3/lib/python3.6/site-packages/cryptos/transaction.py", line 433, in multisign
   modtx = signature_form(tx, i, script, hashcode)
 File "/kunwar/anaconda3/lib/python3.6/site-packages/cryptos/transaction.py", line 222, in signature_form
   return uahf_digest(newtx, i)
 File "/kunwar/anaconda3/lib/python3.6/site-packages/cryptos/transaction.py", line 197, in uahf_digest
   o.append(encode_8_bytes(inp['amount']))
KeyError: 'amount'

I am using the same code which you gave as an example for multi-signatures. Please address this. Thanks in advance

Bitcoin Gold

When install cryptos or cryptos==1.36 I can't have Bitcoin Gold from lib.

Getting different address than bitcore-lib

Hi,

I am trying to convert some code from JavaScript into Python using cryptos and it works perfectly for one of the use cases but there is one part which I can't figure it out.


var bitcore = require('bitcore-lib');
const ethers = require('ethers');
const xpubs = [
    "xpub....",
    "xpub....",
    "xpub....."
]
const path = "m/0/1/2"
const rootNodes = xpubs.map((xpub) => ethers.HDNodeWallet.fromExtendedKey(xpub));
const derivedNodes = rootNodes.map((rn) => rn.derivePath(path));
const pubKeys = derivedNodes.map((dn) => Buffer.from(dn.publicKey.slice(2), 'hex'));
const redeemScript = bitcore.Script.buildMultisigOut(pubKeys, 2);
const address = bitcore.Address.payingTo(redeemScript).toString();
console.log(address)

I tried to reproduce this result with cryptos like this:

from cryptos import *
coin = Bitcoin()
publickeys = ['03.....', '03....', '03...']
script, address = coin.mk_multisig_address(publickeys, 2)
print(address)

in the Python I already derived the publickeys so that step is not there but I confirmed that the public keys that are used for the multi sig script are the same so the difference should be either in multisig script or the function to get the address.

https://github.com/bitpay/bitcore/blob/master/packages/bitcore-lib-cash/lib/address.js#L268
In the js library code it says it creates P2SH address.

https://github.com/bitpay/bitcore/blob/v8.0.0/packages/bitcore-lib/lib/address.js#L341
One other thing maybe is the function that creates the address use Hash.sha256ripemd160 not sure if that is the reason.

If anyone has an idea how I could get same result with cryptos that would be a huge help.

api expired ????

hi i get this when trying to get wallet outputs:

Exception('{"status":"fail","data":{"error_message":"API Key invalid, account access expired, or this account\'s daily request limit has been exhausted."}}')

ElectrumX servers

Hello, when test new major branch with ElectrumX I have problem with servers.
Some servers from .json files are down. And I can't check unspent, balance. Scrypt take one of them without check works it or not.
How to update servers list and hold actual only?

api = Doge(testnet=False)
print(f"coin_symbol: {api.coin_symbol}")

priv = sha256('a big long brainwallet password')
pub = api.privtopub(priv)
addr = api.pubtoaddr(pub)
api.get_balances(addr)
print(f"priv: {priv}")
print(f"pub: {pub}")
print(f"addr: {addr}")
print(f"Balance: {api.get_balances(addr)}")

TimeoutError: 493 finally:
    494     timeout_handle.cancel()

Error: name 'keystore' is not defined

Followed the readme, "BIP39-BIP44 Standard Wallets" section, with the commands below, in IDLE:

>>> from cryptos import *
>>> words = entropy_to_words(os.urandom(16))
>>> words
'husband surface feel slice route air coin record want patient galaxy honey'
>>> keystore.bip39_is_checksum_valid(words)
Traceback (most recent call last):
  File "<pyshell#7>", line 1, in <module>
    keystore.bip39_is_checksum_valid(words)
NameError: name 'keystore' is not defined
>>> coin = Bitcoin()
>>> wallet = coin.wallet(words)
Traceback (most recent call last):
  File "<pyshell#9>", line 1, in <module>
    wallet = coin.wallet(words)
AttributeError: 'Bitcoin' object has no attribute 'wallet'
>>> 

Unite some addresses in one transaction

I have a little address when have confirmed inputs. I want to unite some addresses in one transaction for payment. How can I do it?

For examples:
Alice has inputs on her address and Bob has inputs on his address and they wanna send their inputs to Ivan address in once transaction for economy fees.

is_address is not working

I am validating with testnet address using 'is_address' method. This function is returning true even I change the address. Please fix this.

Obsolete test in cryptos/electrumx_client/test.py?

The current test in cryptos/electrumx_client/test.py seem to fail with

from cryptos.electrumx_client import rpc_send_and_wait, rpc_send

The two imported symbols do not exist in cryptos.electrumx_client. Is the test code obsolete?

multisig error after mktx: can't concat str to bytes

coin = Bitcoin()
...
tx = coin.mktx(inputs,outs)
for i in range(0, len(tx['ins'])):
    sig1 = coin.multisign(tx, i, script, "private_key_first")
    sig2 = coin.multisign(tx, i, script, "private_key_second")
    tx = apply_multisignatures(tx, i, script, sig1, sig2)

cryptos/transaction.py in serialize at line 182

177.        o.append(encode_1_byte(txobj["flag"]))
178    o.append(num_to_var_int(len(txobj["ins"])))
179    for inp in txobj["ins"]:
180        o.append(inp["tx_hash"][::-1])
181        o.append(encode_4_bytes(inp["tx_pos"]))
182        o.append(num_to_var_int(len(inp["script"])) + (inp["script"] if inp["script"] else bytes()))
183        o.append(encode_4_bytes(inp["sequence"]))
184    o.append(num_to_var_int(len(txobj["outs"])))
185    for out in txobj["outs"]:
186        o.append(encode_8_bytes(out["value"]))
187        o.append(num_to_var_int(len(out["script"])) + out["script"])

Test execution fails with message KeyError

I tried running the tests but it threw the following exception:

(pybtc)  % python test.py
Traceback (most recent call last):
  File "test.py", line 8, in <module>
    from bitcoin import cryptos
  File "/home/vikas/code/oss/pybitcointools/bitcoin/cryptos/__init__.py", line 1, in <module>
    from .bitcoin import  Bitcoin
  File "/home/vikas/code/oss/pybitcointools/bitcoin/cryptos/bitcoin.py", line 3, in <module>
    from .constants import COIN_METADATA
  File "/home/vikas/code/oss/pybitcointools/bitcoin/cryptos/constants.py", line 3, in <module>
    COIN_METADATA = {coin['coin_symbol']: coin for coin in COIN_SYMBOL_ODICT_LIST}
  File "/home/vikas/code/oss/pybitcointools/bitcoin/cryptos/constants.py", line 3, in <dictcomp>
    COIN_METADATA = {coin['coin_symbol']: coin for coin in COIN_SYMBOL_ODICT_LIST}
KeyError: 'coin_symbol'

I checked the constants module of blockcypher, the dict seems to have coin_symbol key in it. But I don't understand why it gets removed while running.

SyntaxError: invalid syntax on import

Hi ...

I'm trying to utilise your amazing library but not getting very far unfortunately... I'm on a mac and did a standard pip install. When I import I am getting a syntax error below... Is there anything obvious I'm going wrong?... i.e. does it need python 3* etc...

Appreciate any pointers..

Sam

MuleMacTop:processor sampipe$ python
Python 2.7.10 (default, Jul 15 2017, 17:16:57)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

from cryptos import *
Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.7/site-packages/cryptos/init.py", line 10, in
from .coins import *
File "/Library/Python/2.7/site-packages/cryptos/coins/init.py", line 1, in
from .bitcoin import *
File "/Library/Python/2.7/site-packages/cryptos/coins/bitcoin.py", line 1, in
from ..explorers import blockchain
File "/Library/Python/2.7/site-packages/cryptos/explorers/init.py", line 1, in
from . import base_insight, bitpay, blockcypher, blockdozer, dash_siampm, sochain
File "/Library/Python/2.7/site-packages/cryptos/explorers/blockcypher.py", line 5
def unspent(*addrs, coin_symbol=None, api_key=None, **kwargs):
^
SyntaxError: invalid syntax

Sweep TX Fees

Hi,
What's the best approach regarding calculating fees on a sweep tx?
Thanks.

confirmations 0

I can't understand how can I send if I have 2 Inputs: first input has confirmations more 100 and second zero. How can I send it that my transactions will be done? I need sign all inputs or only where confirmations more?

Bitcoin Cash why bcc? Need BCH

MaxRetryError

HTTPSConnectionPool(host='bcc.blockdozer.com', port=443): Max retries exceeded with url: /insight-api/addrs/1GnX7YYimkWPzkPoHYqbJ4waxG6MN2cdSg/utxo (Caused by SSLError(CertificateError("hostname 'bcc.blockdozer.com' doesn't match either of 'bch.blockdozer.com', 'beta.blockdozer.com', 'blockdozer.com', 'btc.blockdozer.com', 'tbch.blockdozer.com', 'tbtc.blockdozer.com', 'www.blockdozer.com', 'zcash.blockdozer.com'",),))

Trust bch.blockdozer.com

And after use https://bch.blockdozer.com/insight-api/addrs/1GnX7YYimkWPzkPoHYqbJ4waxG6MN2cdSg/utxo or bcc I have empty result from explorer. Why?

Question: How to generate different public addresses but have one private key?

I'd like to generate a new public address for every incoming transaction that users can use to send coins but still have one private key that gives me access to the wallet.

Could you please let me know how i would do that with this library?

EDIT: I'm asking because what i tested doesn't seem to work. Meaning that i generated two receiving addresses and transferred some coins to them but i don't see any funds if i import the 12-words into for example Copay wallet. I did this on the Testnet.

Here is my code:

        # The 12 words i imported to Copay wallet
        words = entropy_to_words(os.urandom(16))
        wallet = self.btc.wallet(words)

        # Address 1
        addr1 = wallet.new_receiving_address()

        # Address 2
        addr2 = wallet.new_receiving_address()

Asyncio.exceptions.CancelledError inconsistently triggers when using preparesignedtx

Asyncio.exceptions.CancelledError inconsistently triggers when using preparesignedtx

Example of my code:

# example below on how self.pk is generated
self.pk = hex(secrets.randbits(256))[2:] 


# another class function object
c = cryptos.Bitcoin(testnet=False)

create_signed_tx = c.preparesignedtx(self.pk, 
 self.mainnetAddress,
 self.recipientAddress,
 self.bitcoinTotal-self.est_fee,
 fee=self.est_fee)

self.pk is a key existing out of 256 randomly generated binary digits that are converted into a hexadecimal string (with the 0x, cut off)
self.mainnetAddress is a mainnet bc1 address generated from self.pk.

What causes this CancelledError? Is this a library issue or is this an error on my end.
Does preparesignedtx require a private key in Wallet Import Format?

Full error log:


 Traceback (most recent call last):
   File "/workspace/.heroku/python/lib/python3.9/site-packages/cryptos/coins_async/base.py", line 1028, in preparesignedtx
     return await self.preparesignedmultirecipienttx(privkey, frm, outs, change_addr=change_addr,
  File "/workspace/.heroku/python/lib/python3.9/site-packages/cryptos/coins_async/base.py", line 1011, in preparesignedmultirecipienttx
     tx = await self.preparemultitx(frm, outs, fee=fee, change_addr=change_addr,
   File "/workspace/.heroku/python/lib/python3.9/site-packages/cryptos/coins_async/base.py", line 982, in preparemultitx
     unspents = await self.unspent(frm)
   File "/workspace/.heroku/python/lib/python3.9/site-packages/cryptos/coins_async/base.py", line 397, in unspent
     unspents = await self.client.unspent(value)
File "/workspace/.heroku/python/lib/python3.9/site-packages/cryptos/electrumx_client/client.py", line 508, in unspent
return await self.send_request("blockchain.scripthash.listunspent", scripthash)
File "/workspace/.heroku/python/lib/python3.9/site-packages/cryptos/electrumx_client/client.py", line 389, in send_request
await self._ensure_connected()
 File "/workspace/.heroku/python/lib/python3.9/site-packages/cryptos/electrumx_client/client.py", line 351, in _ensure_connected
done, pending = await asyncio.wait([is_connected_task, self._connection_task],
File "/workspace/.heroku/python/lib/python3.9/asyncio/tasks.py", line 413, in wait
return await _wait(fs, timeout, return_when, loop)
 File "/workspace/.heroku/python/lib/python3.9/asyncio/tasks.py", line 529, in _wait
await waiter
 asyncio.exceptions.CancelledError

Regards,
Pogo

Error calling inspect function

Hi,

I'm traying to use the inspect function to decode the 'outs' from a raw BTC transaction. When I run my test code I get this error:

Traceback (most recent call last):
  File "/tmp/p3.py", line 13, in <module>
    print(c.inspect(txr))
  File "/opt/python3.9/lib/python3.9/site-packages/cryptos/coins/base.py", line 331, in inspect
    return self._run_async("inspect", tx)
  File "/opt/python3.9/lib/python3.9/site-packages/cryptos/coins/base.py", line 84, in _run_async
    return fut.result(timeout=self.timeout * 2)
  File "/opt/python3.9/lib/python3.9/concurrent/futures/_base.py", line 446, in result
    return self.__get_result()
  File "/opt/python3.9/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
    raise self._exception
  File "/opt/python3.9/lib/python3.9/site-packages/cryptos/coins/base.py", line 68, in run
    result = await asyncio.wait_for(coro, timeout=self.timeout)
  File "/opt/python3.9/lib/python3.9/asyncio/tasks.py", line 479, in wait_for
    return fut.result()
  File "/opt/python3.9/lib/python3.9/site-packages/cryptos/coins_async/base.py", line 1068, in inspect
    prevout = (await anext(self.get_txs(h)))['outs'][i]
NameError: name 'anext' is not defined

The code is :

import cryptos as C
from pprint import pprint

txr = "020000000001013b97b2b1cbc0ce16a6fb648f6ff2cc4b99a6ee8bef5d7810c33bf0db50b209e40100000000ffffffff02384a00000000000022512019bb1553602cd439a742bf2f17fb654eeffc427cd5b55504d7ebf6f221de6d82d4240b0000000000225120eb27ecb5decad5b77f1d7cc75a1ff4e08dbbe5aacb83c95446573caac9c427fb01401bcb5fd039634f815d5397db03b26cef7859a3f4953db28a0eaefc91552cf8dda51690922176d55bb376976c58f1451d7b2f7b2b620c549b104d90f55fcc0cc100000000"

print(CT.public_txhash(txr))

c = C.Bitcoin()
print(c.inspect(txr))

And my version is 2.0.9 and Python 3.9.16. The transaction ID is 6728b6b56d6e5f29ae7f05dc1f3320115240ac880bc09d63d4af86d0978fccf4

Question on bitcoin address type from privtoaddr

Hi,

New to the bitcoin world so forgive me. Has a quick question on your library.

I understand there are many different types of bitcoin addresses P2PK, P2PKH, P2MS, P2SH, P2WPKH, P2WSH, P2TR.

I reused this code to make a simple brain wallet tester:

#generate the private key
Private_Key = sha256(myQuote)
b = Bitcoin()
#generate the public key
bitCoinAddress = b.privtoaddr(Private_Key)

Which type of bitcoin address does this result in?

What other methods does your library have for generating other address types?

Just getting started in this so interested in learning.

AssertionError On Litecoin

Hi When i Try to Send Litecoin to other addresses i get an error

assert bin_dbl_sha256(data[:-4])[:4] == data[-4:]
AssertionError

python 2.7 error

Hi, I am testing with python 2.7 and it returns this error

Traceback (most recent call last):
File "test.py", line 1, in
from cryptos import *
File "/home/ger/.local/lib/python2.7/site-packages/cryptos/init.py", line 10, in
from .coins import *
File "/home/ger/.local/lib/python2.7/site-packages/cryptos/coins/init.py", line 1, in
from .bitcoin import *
File "/home/ger/.local/lib/python2.7/site-packages/cryptos/coins/bitcoin.py", line 1, in
from ..explorers import blockchain
File "/home/ger/.local/lib/python2.7/site-packages/cryptos/explorers/init.py", line 1, in
from . import base_insight, bitpay, blockcypher, blockdozer, dash_siampm, sochain
File "/home/ger/.local/lib/python2.7/site-packages/cryptos/explorers/blockcypher.py", line 5
def unspent(*addrs, coin_symbol=None, api_key=None, **kwargs):
^
SyntaxError: invalid syntax

Thanks!

My

2024-08-22T17:28:25.793Z -> Network -> Sending POST to https://discord.com/api/v9/debug-logs/4/discord_app_logs
2024-08-22T17:28:26.667Z -> Σ:1180.963s, Δ:5.035s -> RTCConnection(1274316657707192421, default) -> Handling ping: 71
2024-08-22T17:28:26.908Z -> Network -> Completed POST to https://discord.com/api/v9/debug-logs/4/discord_app_logs with status: 201
2024-08-22T17:28:27.277Z -> Σ:1181.573s, Δ:0.610s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:28:27.355Z -> Σ:1181.651s, Δ:0.078s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:28:31.665Z -> Σ:1185.961s, Δ:4.310s -> RTCConnection(1274316657707192421, default) -> Handling ping: 70
2024-08-22T17:28:36.666Z -> Σ:1190.962s, Δ:5.001s -> RTCConnection(1274316657707192421, default) -> Handling ping: 70
2024-08-22T17:28:41.032Z -> Σ:1195.328s, Δ:4.366s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:28:41.113Z -> Σ:1195.409s, Δ:0.081s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:28:41.666Z -> Σ:1195.961s, Δ:0.552s -> RTCConnection(1274316657707192421, default) -> Handling ping: 69
2024-08-22T17:28:45.878Z -> Σ:1200.174s, Δ:4.213s -> Flux -> Dispatching WRITE_CACHES
2024-08-22T17:28:45.879Z -> Σ:1200.175s, Δ:0.001s -> GuildBasicChannels -> Starting to write all basic channels
2024-08-22T17:28:45.880Z -> Σ:1200.176s, Δ:0.001s -> GuildBasicChannels -> 0 basic_channel guilds submitted (took: 0.05846199952065945ms, skipped: 4 guilds)
2024-08-22T17:28:45.898Z -> Σ:1200.194s, Δ:0.018s -> CacheStore -> Writing cache now
2024-08-22T17:28:46.666Z -> Σ:1200.962s, Δ:0.768s -> RTCConnection(1274316657707192421, default) -> Handling ping: 69
2024-08-22T17:28:47.042Z -> Σ:1201.338s, Δ:0.376s -> Flux -> Dispatching CLEAR_CACHES
2024-08-22T17:28:47.044Z -> Σ:1201.340s, Δ:0.002s -> DatabaseManager -> disabling and nulling all databases (reason: DatabaseManager (Requested by user))
2024-08-22T17:28:47.045Z -> Σ:1201.341s, Δ:0.001s -> GatewaySocket -> Closing connection, current state is SESSION_ESTABLISHED
2024-08-22T17:28:47.046Z -> Σ:1201.342s, Δ:0.001s -> GatewaySocket -> Setting connection state to CLOSED
2024-08-22T17:28:47.046Z -> Σ:1201.342s, Δ:0.000s -> GatewaySocket -> .connect() called, new state is WILL_RECONNECT
2024-08-22T17:28:47.046Z -> Σ:1201.342s, Δ:0.000s -> GatewaySocket -> Setting connection state to WILL_RECONNECT
2024-08-22T17:28:47.046Z -> Σ:1201.342s, Δ:0.000s -> GatewaySocket -> Setting connection state to CONNECTING
2024-08-22T17:28:47.046Z -> Σ:1201.342s, Δ:0.000s -> GatewaySocket -> [CONNECT] wss://gateway.discord.gg, encoding: json, version: 9, compression: zstd-stream
2024-08-22T17:28:47.050Z -> Σ:1201.346s, Δ:0.004s -> CacheStore -> Clearing cache store
2024-08-22T17:28:47.076Z -> Σ:1201.372s, Δ:0.026s -> GatewaySocket -> [RESET] (true, 1000, Disconnect requested by user)
2024-08-22T17:28:47.076Z -> Σ:1201.372s, Δ:0.000s -> Flux -> Dispatching CONNECTION_CLOSED
2024-08-22T17:28:47.077Z -> Σ:1201.373s, Δ:0.001s -> AuthenticationStore -> handleConnectionClosed called with code 1000. {"tokenManagerHasToken":true,"storageHasToken":true}
2024-08-22T17:28:47.077Z -> Σ:1201.373s, Δ:0.000s -> RTCConnection(1274316657707192421, default) -> Destroy RTCConnection
2024-08-22T17:28:47.077Z -> Σ:1201.373s, Δ:0.000s -> RTCControlSocket(default) -> CLOSE
2024-08-22T17:28:47.077Z -> Σ:1201.373s, Δ:0.000s -> RTCConnection(1274316657707192421, default) -> Disconnected from RTC server, clean: true, code: 1000, reason: Force Close, state: RTC_CONNECTED
2024-08-22T17:28:47.088Z -> Σ:1201.384s, Δ:0.011s -> Sentry -> Breadcrumb {"category":"analytics","message":"voice_disconnect"}
2024-08-22T17:28:47.089Z -> Analytics -> voice_disconnect
2024-08-22T17:28:47.090Z -> Σ:1201.386s, Δ:0.002s -> Connection(default) -> Connection state change: CONNECTED => DISCONNECTED
2024-08-22T17:28:47.090Z -> Σ:1201.386s, Δ:0.000s -> RTCConnection(1274316657707192421, default) -> RTC media connection state change: RTC_CONNECTED => DISCONNECTED
2024-08-22T17:28:47.090Z -> Σ:1201.386s, Δ:0.000s -> RTCConnection(1274316657707192421, default) -> RTC connection state: RTC_CONNECTED => RTC_DISCONNECTED
2024-08-22T17:28:47.091Z -> Σ:1201.387s, Δ:0.001s -> Connection(default) -> Connection state change: DISCONNECTED => DISCONNECTED
2024-08-22T17:28:47.091Z -> Σ:1201.387s, Δ:0.000s -> RTCConnection(1274316657707192421, default) -> RTC media connection state change: RTC_DISCONNECTED => DISCONNECTED
2024-08-22T17:28:47.091Z -> Σ:1201.387s, Δ:0.000s -> RTCConnection(1274316657707192421, default) -> RTC connection state: RTC_DISCONNECTED => RTC_DISCONNECTED
2024-08-22T17:28:47.091Z -> Σ:1201.387s, Δ:0.000s -> RTCConnection(1274316657707192421, default) -> RTC connection state: RTC_DISCONNECTED => DISCONNECTED
2024-08-22T17:28:47.091Z -> Σ:1201.387s, Δ:0.000s -> ConnectionStore -> connection closed dispatched
2024-08-22T17:28:47.091Z -> Σ:1201.387s, Δ:0.000s -> ConnectivityStatusStore -> Connection closed
2024-08-22T17:28:47.091Z -> Σ:1201.387s, Δ:0.000s -> ConnectivityStatusStore -> State set to CONNECTING, with delay: 10000
2024-08-22T17:28:47.092Z -> Σ:1201.388s, Δ:0.001s -> discord_protos.discord_users.v1.FrecencyUserSettings -> Scheduling save from markDirty
2024-08-22T17:28:47.093Z -> Σ:1201.389s, Δ:0.001s -> AppDatabaseManager -> database has changed (was: [object Object], now: null, action: USER_SETTINGS_PROTO_UPDATE_EDIT_INFO). resetting modules.
2024-08-22T17:28:47.093Z -> Σ:1201.389s, Δ:0.000s -> AppDatabaseManager -> no usable database; skipping action (type: USER_SETTINGS_PROTO_UPDATE_EDIT_INFO, database: null, state: undefined)
2024-08-22T17:28:47.098Z -> Σ:1201.394s, Δ:0.005s -> Sentry -> Breadcrumb {"message":"Heartbeat Track State Parameters Changed. Foregrounded true, Connection State: DISCONNECTED"}
2024-08-22T17:28:47.165Z -> Σ:1201.461s, Δ:0.067s -> Sentry -> Breadcrumb {"category":"analytics","message":"view_voice_channel"}
2024-08-22T17:28:47.165Z -> Analytics -> view_voice_channel
2024-08-22T17:28:47.183Z -> Σ:1201.479s, Δ:0.018s -> Sentry -> Breadcrumb {"category":"analytics","message":"voice_codec_detected"}
2024-08-22T17:28:47.183Z -> Analytics -> voice_codec_detected
2024-08-22T17:28:47.186Z -> Σ:1201.482s, Δ:0.003s -> discord_protos.discord_users.v1.FrecencyUserSettings -> Persisting proto
2024-08-22T17:28:47.190Z -> Network -> Sending PATCH to https://discord.com/api/v9/users/@me/settings-proto/2
2024-08-22T17:28:47.377Z -> Σ:1201.673s, Δ:0.191s -> GatewaySocket -> [CONNECTED] wss://gateway.discord.gg/?encoding=json&v=9&compress=zstd-stream in 331 ms
2024-08-22T17:28:47.377Z -> Σ:1201.673s, Δ:0.000s -> ConnectionStore -> handleIdentify called {"hasToken":true}
2024-08-22T17:28:47.377Z -> Σ:1201.673s, Δ:0.000s -> GatewaySocket -> Setting connection state to IDENTIFYING
2024-08-22T17:28:47.378Z -> Σ:1201.674s, Δ:0.001s -> GatewaySocket -> [IDENTIFY]
2024-08-22T17:28:47.414Z -> Σ:1201.710s, Δ:0.036s -> GatewaySocket -> [HELLO] via
gateway-prd-us-east1-d-925v: 0, heartbeat interval: 41250, took 368 ms
2024-08-22T17:28:47.474Z -> Network -> Completed PATCH to https://discord.com/api/v9/users/@me/settings-proto/2 with status: 200
2024-08-22T17:28:47.480Z -> Σ:1201.776s, Δ:0.066s -> AppDatabaseManager -> no usable database; skipping action (type: USER_SETTINGS_PROTO_UPDATE, database: null, state: undefined)
2024-08-22T17:28:47.732Z -> Σ:1202.028s, Δ:0.252s -> GatewaySocket -> [READY] took 685ms, as 172e8644dac07c776ad5af3f27410743
2024-08-22T17:28:47.732Z -> Σ:1202.028s, Δ:0.000s -> GatewaySocket ->
gateway-prd-us-east1-d-925v: 99.615
| id_created: 1.071
| session_lookup_time: 1.432
| session_lookup_finished: 0.019
| discord-sessions-prd-1-153: 96.225
| | start_session: 78.658
| | | discord-api-rpc-76d94dd978-68mnw: 72.263
| | | | get_user: 4.65
| | | | get_guilds: 9.62
| | | | user_settings_proto: 0.039
| | | | relationships: 0.006
| | | | friend_suggestion: 0.031
| | | | connections: 0.184
| | | | serialized_read_states: 0.003
| | | | pending_payments: 0.001
| | | | send_scheduled_deletion_message: 0.001
| | | | sanitize_premium_perks: 0
| | | | guild_join_requests: 0
| | | | broadcaster_user_ids: 0.001
| | | | user_guild_settings: 4.197
| | | | serialized_private_channels: 0.003
| | | | user_segments: 6.483
| | | | game_invites: 0.002
| | | | blocker_ids: 0
| | | | affine_user_ids: 0.007
| | | | experiments: 20.575
| | | | required_action: 0.01
| | | | authorized_ip_coro: 0.002
| | starting_guild_connect: 0.052
| | presence_started: 8.66
| | guilds_started: 0.442
| | guilds_connect: 7.944
| | presence_connect: 0.001
| | connect_finished: 8.279
| | build_ready: 0.033
| | clean_ready: 0.001
| | optimize_ready: 0.088
| | split_ready: 0.008
2024-08-22T17:28:47.732Z -> Σ:1202.028s, Δ:0.000s -> GatewaySocket -> Setting connection state to SESSION_ESTABLISHED
2024-08-22T17:28:47.732Z -> Σ:1202.028s, Δ:0.000s -> GatewaySocket -> Updating resume url to wss://gateway-us-east1-d.discord.gg
2024-08-22T17:28:47.735Z -> Σ:1202.031s, Δ:0.003s -> Flux -> Dispatching CONNECTION_OPEN
2024-08-22T17:28:47.737Z -> Σ:1202.032s, Δ:0.001s -> AuthenticationStore -> handleConnectionOpen called {"tokenManagerHasToken":true,"storageHasToken":true}
2024-08-22T17:28:47.737Z -> Σ:1202.033s, Δ:0.001s -> DatabaseManager -> removing database (user: 1274309871038103554, database: null)
2024-08-22T17:28:47.737Z -> Σ:1202.033s, Δ:0.000s -> DatabaseManager -> Not opening database because caches have been manually cleared.
2024-08-22T17:28:47.737Z -> Σ:1202.033s, Δ:0.000s -> AppDatabaseManager -> no usable database; skipping action (type: CONNECTION_OPEN, database: null, state: undefined)
2024-08-22T17:28:47.740Z -> Σ:1202.036s, Δ:0.003s -> ChannelStore -> GuildCreate contained full channels for 1274316657707192421 #:6
2024-08-22T17:28:47.740Z -> Σ:1202.036s, Δ:0.000s -> ChannelStore -> Deleting guild channels for 1274316657707192421
2024-08-22T17:28:47.740Z -> Σ:1202.036s, Δ:0.000s -> ChannelStore -> GuildCreate contained full channels for 1274317922076201054 #:12
2024-08-22T17:28:47.740Z -> Σ:1202.036s, Δ:0.000s -> ChannelStore -> Deleting guild channels for 1274317922076201054
2024-08-22T17:28:47.740Z -> Σ:1202.036s, Δ:0.000s -> ChannelStore -> GuildCreate contained full channels for 1276215752894189670 #:6
2024-08-22T17:28:47.740Z -> Σ:1202.036s, Δ:0.000s -> ChannelStore -> Deleting guild channels for 1276215752894189670
2024-08-22T17:28:47.740Z -> Σ:1202.036s, Δ:0.000s -> ChannelStore -> GuildCreate contained full channels for 1276215869738975363 #:12
2024-08-22T17:28:47.740Z -> Σ:1202.036s, Δ:0.000s -> ChannelStore -> Deleting guild channels for 1276215869738975363
2024-08-22T17:28:47.769Z -> Σ:1202.065s, Δ:0.029s -> ConnectivityStatusStore -> Connection open.
2024-08-22T17:28:47.769Z -> Σ:1202.065s, Δ:0.000s -> ConnectivityStatusStore -> State set to ONLINE, with delay: 0
2024-08-22T17:28:47.769Z -> Σ:1202.065s, Δ:0.000s -> Sentry -> Breadcrumb {"category":"analytics","message":"review_request_eligibility_checked"}
2024-08-22T17:28:47.770Z -> Analytics -> review_request_eligibility_checked
2024-08-22T17:28:47.778Z -> Σ:1202.074s, Δ:0.009s -> Sentry -> Breadcrumb {"category":"analytics","message":"ready_payload_received"}
2024-08-22T17:28:47.778Z -> Analytics -> ready_payload_received {"compressed_byte_size":16153,"uncompressed_byte_size":73197,"compression_algorithm":"zstd-stream","packing_algorithm":"json","unpack_duration_ms":8,"identify_total_server_duration_ms":99,"identify_api_duration_ms":78,"identify_guilds_duration_ms":7,"num_guilds":4,"num_guild_channels":36,"num_guild_category_channels":10,"duration_ms_since_identify_start":-1724343044980.34,"duration_ms_since_connection_start":-1724343044649.34,"duration_ms_since_emit_start":1724343045381.34,"is_reconnect":false,"is_fast_connect":false,"did_force_clear_guild_hashes":false,"identify_uncompressed_byte_size":590,"identify_compressed_byte_size":384,"had_cache_at_startup":true,"used_cache_at_startup":true,"client_performance_cpu":13.236763236763238,"client_performance_memory":537452,"cpu_core_count":8,"accessibility_features":128,"rendered_locale":"cs","uptime_app":1201,"client_rtc_state":"DISCONNECTED","client_app_state":"active"}
2024-08-22T17:28:48.005Z -> Σ:1202.301s, Δ:0.227s -> GatewaySocket -> Dispatched 1 messages in 272ms
2024-08-22T17:28:48.013Z -> Σ:1202.309s, Δ:0.008s -> GatewaySocket -> [READY_SUPPLEMENTAL] took 967ms
2024-08-22T17:28:48.013Z -> Σ:1202.309s, Δ:0.000s -> GatewaySocket -> Setting connection state to SESSION_ESTABLISHED
2024-08-22T17:28:48.139Z -> Network -> Sending POST to https://discord.com/api/v9/science
2024-08-22T17:28:48.277Z -> Σ:1202.573s, Δ:0.264s -> AppDatabaseManager -> no usable database; skipping action (type: CONNECTION_OPEN_SUPPLEMENTAL, database: null, state: undefined)
2024-08-22T17:28:48.294Z -> Σ:1202.590s, Δ:0.017s -> Sentry -> Breadcrumb {"category":"analytics","message":"voice_connection_connecting"}
2024-08-22T17:28:48.294Z -> Analytics -> voice_connection_connecting
2024-08-22T17:28:48.294Z -> Σ:1202.590s, Δ:0.000s -> RTCControlSocket(default) -> [CONNECT] wss://frankfurt10011.discord.media/
2024-08-22T17:28:48.295Z -> Σ:1202.591s, Δ:0.001s -> RTCConnection(1274316657707192421, default) -> Connecting to RTC server wss://frankfurt10011.discord.media/, rtc-connection-id: 0166db28-462a-4d98-95c5-6bd289dab087
2024-08-22T17:28:48.295Z -> Σ:1202.591s, Δ:0.000s -> RTCConnection(1274316657707192421, default) -> RTC connection state: AWAITING_ENDPOINT => CONNECTING
2024-08-22T17:28:48.345Z -> Σ:1202.641s, Δ:0.050s -> Sentry -> Breadcrumb {"category":"analytics","message":"video_layout_toggled"}
2024-08-22T17:28:48.345Z -> Analytics -> video_layout_toggled
2024-08-22T17:28:48.586Z -> Σ:1202.882s, Δ:0.241s -> Flux -> Slow dispatch on RTC_CONNECTION_STATE: 291.17761499993503ms
2024-08-22T17:28:48.587Z -> Σ:1202.883s, Δ:0.001s -> Sentry -> Breadcrumb {"message":"Heartbeat Track State Parameters Changed. Foregrounded true, Connection State: CONNECTING"}
2024-08-22T17:28:48.598Z -> Σ:1202.894s, Δ:0.011s -> discord_protos.discord_users.v1.FrecencyUserSettings -> Loading proto
2024-08-22T17:28:48.598Z -> Σ:1202.894s, Δ:0.000s -> AppDatabaseManager -> no usable database; skipping action (type: USER_SETTINGS_PROTO_UPDATE_EDIT_INFO, database: null, state: undefined)
2024-08-22T17:28:48.599Z -> Network -> Sending GET to https://discord.com/api/v9/users/@me/settings-proto/2
2024-08-22T17:28:48.616Z -> Σ:1202.912s, Δ:0.018s -> GatewaySocket -> Dispatched 4 messages in 341ms
2024-08-22T17:28:48.670Z -> Σ:1202.966s, Δ:0.054s -> Sentry -> Breadcrumb {"category":"analytics","message":"android_jank_stats"}
2024-08-22T17:28:48.671Z -> Analytics -> android_jank_stats
2024-08-22T17:28:48.673Z -> Network -> Completed POST to https://discord.com/api/v9/science with status: 204
2024-08-22T17:28:48.676Z -> Σ:1202.972s, Δ:0.006s -> RTCConnection(1274316657707192421, default) -> Connected to RTC server.
2024-08-22T17:28:48.676Z -> Σ:1202.972s, Δ:0.000s -> RTCConnection(1274316657707192421, default) -> RTC connection state: CONNECTING => AUTHENTICATING
2024-08-22T17:28:48.676Z -> Σ:1202.972s, Δ:0.000s -> Sentry -> Breadcrumb {"message":"Heartbeat Track State Parameters Changed. Foregrounded true, Connection State: AUTHENTICATING"}
2024-08-22T17:28:48.677Z -> Σ:1202.973s, Δ:0.001s -> RTCControlSocket(default) -> [CONNECTED] wss://frankfurt10011.discord.media/ in 383 ms
2024-08-22T17:28:48.678Z -> Σ:1202.974s, Δ:0.001s -> RTCControlSocket(default) -> [HELLO] heartbeat interval: 13750, version: 8, took 384 ms
2024-08-22T17:28:48.678Z -> Σ:1202.974s, Δ:0.000s -> RTCControlSocket(default) -> Starting heartbeat with interval: 13750
2024-08-22T17:28:48.993Z -> Network -> Sending POST to https://discord.com/api/v9/science
2024-08-22T17:28:48.999Z -> Σ:1203.295s, Δ:0.321s -> RTCControlSocket(default) -> [READY] took 705 ms
2024-08-22T17:28:48.999Z -> Σ:1203.295s, Δ:0.000s -> RTCConnection(1274316657707192421, default) -> RTC connection state: AUTHENTICATING => RTC_CONNECTING
2024-08-22T17:28:49.000Z -> Σ:1203.296s, Δ:0.001s -> Sentry -> Breadcrumb {"message":"Heartbeat Track State Parameters Changed. Foregrounded true, Connection State: RTC_CONNECTING"}
2024-08-22T17:28:49.003Z -> Σ:1203.299s, Δ:0.003s -> Connection(default) -> Creating connection to 35.207.143.96:50003 with audio ssrc: 202465
2024-08-22T17:28:49.005Z -> Σ:1203.301s, Δ:0.002s -> Connection(default) -> updateVideoQuality: {
"remoteSinkWantsMaxFramerate": 20
}
2024-08-22T17:28:49.006Z -> Σ:1203.302s, Δ:0.001s -> Connection(default) -> updateVideoQuality: {
"encodingVideoWidth": 1280,
"encodingVideoHeight": 720,
"encodingVideoFrameRate": 30,
"captureVideoFrameRate": 30,
"remoteSinkWantsMaxFramerate": 20,
"remoteSinkWantsPixelCount": 921600,
"encodingVideoBitRate": 2500000,
"encodingVideoMinBitRate": 150000,
"encodingVideoMaxBitRate": 2500000,
"streamParameters": [
{
"type": "video",
"active": false,
"rid": "100",
"ssrc": 202466,
"rtxSsrc": 202467,
"quality": 100,
"maxBitrate": 2500000,
"maxFrameRate": 20,
"maxResolution": {
"type": "fixed",
"width": 1280,
"height": 720
},
"profile": 0,
"minBitrate": 150000,
"maxPixelCount": 921600
}
]
}
2024-08-22T17:28:49.007Z -> Σ:1203.303s, Δ:0.001s -> Connection(default) -> updateVideoQuality: {
"remoteSinkWantsPixelCount": 921600,
"remoteSinkWantsMaxFramerate": 20,
"encodingVideoMinBitRate": 150000,
"encodingVideoMaxBitRate": 2500000,
"encodingVideoBitRate": 2500000,
"streamParameters": [
{
"type": "video",
"active": false,
"rid": "100",
"ssrc": 202466,
"rtxSsrc": 202467,
"quality": 100,
"maxBitrate": 2500000,
"maxFrameRate": 20,
"maxResolution": {
"type": "fixed",
"width": 1280,
"height": 720
},
"profile": 0,
"minBitrate": 150000,
"maxPixelCount": 921600
}
]
}
2024-08-22T17:28:49.142Z -> Network -> Completed GET to https://discord.com/api/v9/users/@me/settings-proto/2 with status: 200
2024-08-22T17:28:49.154Z -> Σ:1203.450s, Δ:0.147s -> AppDatabaseManager -> no usable database; skipping action (type: USER_SETTINGS_PROTO_UPDATE, database: null, state: undefined)
2024-08-22T17:28:49.184Z -> Network -> Completed POST to https://discord.com/api/v9/science with status: 204
2024-08-22T17:28:49.507Z -> Σ:1203.803s, Δ:0.353s -> Connection(default) -> Connected with local address 37.48.0.76:31491 and protocol: udp
2024-08-22T17:28:49.516Z -> Σ:1203.812s, Δ:0.009s -> Connection(default) -> Available codecs: "[{"codec":"H264","decode":true,"encode":true},{"codec":"H265","decode":true,"encode":false},{"codec":"VP8","decode":true,"encode":true},{"codec":"VP9","decode":true,"encode":true}]\n"
2024-08-22T17:28:49.516Z -> Σ:1203.812s, Δ:0.000s -> Connection(default) -> Experimental codecs: []
2024-08-22T17:28:49.517Z -> Σ:1203.813s, Δ:0.001s -> Connection(default) -> Audio codecs: opus
2024-08-22T17:28:49.517Z -> Σ:1203.813s, Δ:0.000s -> Connection(default) -> Video codecs: H265[encode: false, decode: true],H264[encode: true, decode: true],VP8[encode: true, decode: true],VP9[encode: true, decode: true]
2024-08-22T17:28:49.518Z -> Σ:1203.814s, Δ:0.001s -> Connection(default) -> Encryption modes: aead_aes256_gcm_rtpsize,aead_aes256_gcm,aead_xchacha20_poly1305_rtpsize,xsalsa20_poly1305_lite_rtpsize,xsalsa20_poly1305_lite,xsalsa20_poly1305_suffix,xsalsa20_poly1305
2024-08-22T17:28:49.518Z -> Σ:1203.814s, Δ:0.000s -> Connection(default) -> Connection state change: CONNECTING => CONNECTED
2024-08-22T17:28:49.518Z -> Σ:1203.814s, Δ:0.000s -> RTCConnection(1274316657707192421, default) -> RTC media connection state change: RTC_CONNECTING => CONNECTED
2024-08-22T17:28:49.518Z -> Σ:1203.814s, Δ:0.000s -> RTCConnection(1274316657707192421, default) -> RTC connection state: RTC_CONNECTING => RTC_CONNECTED
2024-08-22T17:28:49.519Z -> Σ:1203.815s, Δ:0.001s -> Sentry -> Breadcrumb {"message":"Heartbeat Track State Parameters Changed. Foregrounded true, Connection State: RTC_CONNECTED"}
2024-08-22T17:28:49.545Z -> Σ:1203.841s, Δ:0.026s -> Sentry -> Breadcrumb {"category":"analytics","message":"voice_connection_success"}
2024-08-22T17:28:49.546Z -> Analytics -> voice_connection_success
2024-08-22T17:28:49.546Z -> Σ:1203.842s, Δ:0.001s -> RTCConnection(1274316657707192421, default) -> RTC connected to media server: 35.207.143.96:50003
2024-08-22T17:28:49.546Z -> Σ:1203.842s, Δ:0.000s -> RTCConnection(1274316657707192421, default) -> Sending UDP info to RTC server. {"address":"37.48.0.76","port":31491,"mode":"aead_aes256_gcm_rtpsize","codecs":[{"type":"audio","name":"opus","priority":1,"payloadType":120},{"type":"video","name":"H265","priority":1,"payloadType":101,"rtxPayloadType":102,"encode":false,"decode":true},{"type":"video","name":"H264","priority":2,"payloadType":103,"rtxPayloadType":104,"encode":true,"decode":true},{"type":"video","name":"VP8","priority":3,"payloadType":105,"rtxPayloadType":106,"encode":true,"decode":true},{"type":"video","name":"VP9","priority":4,"payloadType":107,"rtxPayloadType":108,"encode":true,"decode":true}]} ["fixed_keyframe_interval"]
2024-08-22T17:28:49.547Z -> Σ:1203.842s, Δ:0.000s -> Sentry -> Breadcrumb {"category":"analytics","message":"voice_connection_remote_streams_created"}
2024-08-22T17:28:49.547Z -> Analytics -> voice_connection_remote_streams_created
2024-08-22T17:28:49.588Z -> Network -> Sending POST to https://discord.com/api/v9/science
2024-08-22T17:28:49.651Z -> Σ:1203.947s, Δ:0.105s -> RTCConnection(1274316657707192421, default) -> Setting media-session-id: e38e835491c0b1d98429533548318e36 for rtc-connection-id: 0166db28-462a-4d98-95c5-6bd289dab087
2024-08-22T17:28:49.652Z -> Σ:1203.948s, Δ:0.001s -> Connection(default) -> Selected encryption mode: aead_aes256_gcm_rtpsize
2024-08-22T17:28:49.657Z -> Σ:1203.953s, Δ:0.005s -> RTCConnection(1274316657707192421, default) -> Remote media sink wants: {"any":100}
2024-08-22T17:28:49.658Z -> Σ:1203.954s, Δ:0.001s -> Connection(default) -> updateVideoQuality: {
"remoteSinkWantsPixelCount": 921600,
"remoteSinkWantsMaxFramerate": 20,
"encodingVideoMinBitRate": 150000,
"encodingVideoMaxBitRate": 2500000,
"encodingVideoBitRate": 2500000,
"streamParameters": [
{
"type": "video",
"active": false,
"rid": "100",
"ssrc": 202466,
"rtxSsrc": 202467,
"quality": 100,
"maxBitrate": 2500000,
"maxFrameRate": 20,
"maxResolution": {
"type": "fixed",
"width": 1280,
"height": 720
},
"profile": 0,
"minBitrate": 150000,
"maxPixelCount": 921600
}
]
}
2024-08-22T17:28:49.659Z -> Σ:1203.955s, Δ:0.001s -> RTCConnection(1274316657707192421, default) -> Handling ping: 48
2024-08-22T17:28:49.660Z -> Σ:1203.956s, Δ:0.001s -> Sentry -> Breadcrumb {"category":"analytics","message":"media_session_joined"}
2024-08-22T17:28:49.660Z -> Analytics -> media_session_joined
2024-08-22T17:28:49.685Z -> Network -> Sending POST to https://discord.com/api/v9/science
2024-08-22T17:28:49.775Z -> Network -> Completed POST to https://discord.com/api/v9/science with status: 204
2024-08-22T17:28:49.886Z -> Network -> Completed POST to https://discord.com/api/v9/science with status: 204
2024-08-22T17:28:50.295Z -> Σ:1204.591s, Δ:0.635s -> AppDatabaseManager -> no usable database; skipping action (type: POST_CONNECTION_OPEN, database: null, state: undefined)
2024-08-22T17:28:50.300Z -> Network -> Sending GET to https://discord.com/api/v9/users/@me/collectibles-marketing
2024-08-22T17:28:50.305Z -> Σ:1204.601s, Δ:0.010s -> BackgroundSync -> Starting Background Sync
2024-08-22T17:28:50.305Z -> Σ:1204.601s, Δ:0.000s -> BackgroundSync -> Skipping Background Sync because it has been too soon
2024-08-22T17:28:50.305Z -> Network -> Sending GET to https://cdn.discordapp.com/changelogs/config_1.json?x=5
2024-08-22T17:28:50.325Z -> Σ:1204.621s, Δ:0.020s -> CacheStore -> Not writing cache because caches cleared
2024-08-22T17:28:50.325Z -> Σ:1204.621s, Δ:0.000s -> Sentry -> Breadcrumb {"category":"analytics","message":"notification_permission_status"}
2024-08-22T17:28:50.326Z -> Analytics -> notification_permission_status
2024-08-22T17:28:50.340Z -> Network -> Sending POST to https://discord.com/api/v9/science
2024-08-22T17:28:50.552Z -> Network -> Completed GET to https://cdn.discordapp.com/changelogs/config_1.json?x=5 with status: 200
2024-08-22T17:28:50.622Z -> Network -> Completed POST to https://discord.com/api/v9/science with status: 204
2024-08-22T17:28:51.874Z -> Network -> Completed GET to https://discord.com/api/v9/users/@me/collectibles-marketing?platform=1 with status: 200
2024-08-22T17:28:54.665Z -> Σ:1208.961s, Δ:4.340s -> RTCConnection(1274316657707192421, default) -> Handling ping: 57
2024-08-22T17:28:55.764Z -> Network -> Sending POST to https://discord.com/api/v9/metrics/v2
2024-08-22T17:28:56.018Z -> Network -> Completed POST to https://discord.com/api/v9/metrics/v2 with status: 204
2024-08-22T17:28:56.414Z -> Σ:1210.709s, Δ:1.748s -> Sentry -> Breadcrumb {"category":"analytics","message":"video_layout_toggled"}
2024-08-22T17:28:56.414Z -> Analytics -> video_layout_toggled
2024-08-22T17:28:56.449Z -> Network -> Sending POST to https://discord.com/api/v9/science
2024-08-22T17:28:56.622Z -> Network -> Completed POST to https://discord.com/api/v9/science with status: 204
2024-08-22T17:28:57.772Z -> Σ:1212.068s, Δ:1.359s -> ReadStateStore -> Deleting ReadState 1092842365208760350 0 {"remote":true,"persisted":true,"channelMissing":true,"isOld":true,"validType":false,"readableType":false,"oldThreadCutoff":"1265360018954256384","mentionCount":0,"channelId":"1092842365208760350","ackMessageId":"1261409538603745437","lastMessageId":null}
2024-08-22T17:28:57.774Z -> Network -> Sending DELETE to https://discord.com/api/v9/channels/1092842365208760350/messages/ack
2024-08-22T17:28:57.879Z -> Σ:1212.175s, Δ:0.107s -> ReadStateStore -> Deleting ReadState 1119185778065543279 4 {"remote":true,"persisted":true,"channelMissing":true,"isOld":true,"validType":false,"readableType":false,"oldThreadCutoff":"1265360019407241216","mentionCount":0,"channelId":"1119185778065543279","ackMessageId":"1119245882701914160","lastMessageId":null}
2024-08-22T17:28:57.882Z -> Network -> Sending DELETE to https://discord.com/api/v9/channels/1119185778065543279/messages/ack
2024-08-22T17:28:57.980Z -> Network -> Completed DELETE to https://discord.com/api/v9/channels/1092842365208760350/messages/ack with status: 204
2024-08-22T17:28:58.088Z -> Network -> Completed DELETE to https://discord.com/api/v9/channels/1119185778065543279/messages/ack with status: 204
2024-08-22T17:28:59.667Z -> Σ:1213.963s, Δ:1.788s -> RTCConnection(1274316657707192421, default) -> Handling ping: 57
2024-08-22T17:29:00.531Z -> Σ:1214.827s, Δ:0.864s -> Sentry -> Breadcrumb {"category":"analytics","message":"settings_pane_viewed"}
2024-08-22T17:29:00.532Z -> Analytics -> settings_pane_viewed
2024-08-22T17:29:00.854Z -> Network -> Sending POST to https://discord.com/api/v9/science
2024-08-22T17:29:01.162Z -> Network -> Completed POST to https://discord.com/api/v9/science with status: 204
2024-08-22T17:29:02.695Z -> Σ:1216.991s, Δ:2.164s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:29:02.765Z -> Σ:1217.061s, Δ:0.070s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:29:04.665Z -> Σ:1218.961s, Δ:1.900s -> RTCConnection(1274316657707192421, default) -> Handling ping: 57
2024-08-22T17:29:09.666Z -> Σ:1223.962s, Δ:5.001s -> RTCConnection(1274316657707192421, default) -> Handling ping: 57
2024-08-22T17:29:10.465Z -> Σ:1224.761s, Δ:0.799s -> Sentry -> Breadcrumb {"category":"analytics","message":"settings_pane_viewed"}
2024-08-22T17:29:10.466Z -> Analytics -> settings_pane_viewed
2024-08-22T17:29:10.775Z -> Network -> Sending POST to https://discord.com/api/v9/science
2024-08-22T17:29:11.005Z -> Network -> Completed POST to https://discord.com/api/v9/science with status: 204
2024-08-22T17:29:14.634Z -> Σ:1228.930s, Δ:4.169s -> RTCConnection(1274316657707192421, default) -> Handling ping: 25
2024-08-22T17:29:15.476Z -> Network -> Sending GET to https://latency.discord.media/rtc
2024-08-22T17:29:15.723Z -> Network -> Completed GET to https://latency.discord.media/rtc with status: 200
2024-08-22T17:29:15.814Z -> Σ:1230.110s, Δ:1.180s -> RTCLatencyTestManager -> RTC region latency test completed, ranked regions are: ["frankfurt","warsaw","milan","stockholm","rotterdam"]
2024-08-22T17:29:16.445Z -> Σ:1230.741s, Δ:0.631s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:29:16.514Z -> Σ:1230.810s, Δ:0.069s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:29:19.666Z -> Σ:1233.962s, Δ:3.152s -> RTCConnection(1274316657707192421, default) -> Handling ping: 56
2024-08-22T17:29:24.665Z -> Σ:1238.961s, Δ:4.999s -> RTCConnection(1274316657707192421, default) -> Handling ping: 55
2024-08-22T17:29:29.665Z -> Σ:1243.961s, Δ:5.000s -> RTCConnection(1274316657707192421, default) -> Handling ping: 53
2024-08-22T17:29:30.195Z -> Σ:1244.491s, Δ:0.530s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:29:30.275Z -> Σ:1244.571s, Δ:0.080s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:29:34.666Z -> Σ:1248.962s, Δ:4.391s -> RTCConnection(1274316657707192421, default) -> Handling ping: 54
2024-08-22T17:29:39.666Z -> Σ:1253.962s, Δ:5.000s -> RTCConnection(1274316657707192421, default) -> Handling ping: 54
2024-08-22T17:29:43.945Z -> Σ:1258.241s, Δ:4.279s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:29:43.983Z -> Σ:1258.279s, Δ:0.038s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:29:44.665Z -> Σ:1258.961s, Δ:0.682s -> RTCConnection(1274316657707192421, default) -> Handling ping: 53
2024-08-22T17:29:49.666Z -> Σ:1263.962s, Δ:5.001s -> RTCConnection(1274316657707192421, default) -> Handling ping: 53
2024-08-22T17:29:54.666Z -> Σ:1268.961s, Δ:4.999s -> RTCConnection(1274316657707192421, default) -> Handling ping: 52
2024-08-22T17:29:57.696Z -> Σ:1271.992s, Δ:3.031s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:29:57.752Z -> Σ:1272.047s, Δ:0.055s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:29:59.238Z -> Σ:1273.534s, Δ:1.487s -> Sentry -> Breadcrumb {"message":"App state changed to background","category":"appState"}
2024-08-22T17:29:59.238Z -> Σ:1273.534s, Δ:0.000s -> index.native.tsx -> AppState changing from active to background
2024-08-22T17:29:59.238Z -> Σ:1273.534s, Δ:0.000s -> Flux -> Dispatching APP_STATE_UPDATE
2024-08-22T17:29:59.239Z -> Σ:1273.535s, Δ:0.001s -> ConnectivityStatusStore -> App state updated: background
2024-08-22T17:29:59.239Z -> Σ:1273.535s, Δ:0.000s -> CacheStore -> Not writing cache because caches cleared
2024-08-22T17:29:59.240Z -> Σ:1273.536s, Δ:0.001s -> Sentry -> Breadcrumb {"category":"analytics","message":"android_jank_stats"}
2024-08-22T17:29:59.240Z -> Analytics -> android_jank_stats
2024-08-22T17:29:59.240Z -> Σ:1273.536s, Δ:0.000s -> Sentry -> Breadcrumb {"message":"Heartbeat Track State Parameters Changed. Foregrounded false, Connection State: RTC_CONNECTED"}
2024-08-22T17:29:59.249Z -> Σ:1273.545s, Δ:0.009s -> Sentry -> Breadcrumb {"category":"analytics","message":"app_background"}
2024-08-22T17:29:59.249Z -> Analytics -> app_background
2024-08-22T17:29:59.249Z -> Σ:1273.545s, Δ:0.000s -> KvBackgroundManager -> performing cleanup (deep: true)
2024-08-22T17:29:59.665Z -> Σ:1273.961s, Δ:0.416s -> RTCConnection(1274316657707192421, default) -> Handling ping: 51
2024-08-22T17:30:04.666Z -> Σ:1278.962s, Δ:5.001s -> RTCConnection(1274316657707192421, default) -> Handling ping: 50
2024-08-22T17:30:09.666Z -> Σ:1283.962s, Δ:5.000s -> RTCConnection(1274316657707192421, default) -> Handling ping: 50
2024-08-22T17:30:11.448Z -> Σ:1285.744s, Δ:1.782s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:30:11.525Z -> Σ:1285.821s, Δ:0.077s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:30:14.665Z -> Σ:1288.961s, Δ:3.140s -> RTCConnection(1274316657707192421, default) -> Handling ping: 50
2024-08-22T17:30:15.906Z -> Σ:1290.201s, Δ:1.240s -> Sentry -> Breadcrumb {"category":"analytics","message":"native_share_sheet_app_clicked"}
2024-08-22T17:30:15.906Z -> Analytics -> native_share_sheet_app_clicked
2024-08-22T17:30:19.652Z -> Σ:1293.948s, Δ:3.747s -> RTCConnection(1274316657707192421, default) -> Handling ping: 36
2024-08-22T17:30:24.644Z -> Σ:1298.940s, Δ:4.992s -> RTCConnection(1274316657707192421, default) -> Handling ping: 28
2024-08-22T17:30:25.197Z -> Σ:1299.493s, Δ:0.553s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:30:25.277Z -> Σ:1299.573s, Δ:0.080s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:30:29.665Z -> Σ:1303.961s, Δ:4.388s -> RTCConnection(1274316657707192421, default) -> Handling ping: 48
2024-08-22T17:30:29.989Z -> Σ:1304.285s, Δ:0.324s -> Sentry -> Breadcrumb {"message":"App state changed to active","category":"appState"}
2024-08-22T17:30:29.995Z -> Σ:1304.291s, Δ:0.006s -> index.native.tsx -> AppState changing from background to active
2024-08-22T17:30:29.996Z -> Σ:1304.292s, Δ:0.001s -> Flux -> Dispatching APP_STATE_UPDATE
2024-08-22T17:30:30.004Z -> Σ:1304.300s, Δ:0.008s -> GatewaySocket -> Connection has reset backoff for reason: App state is active
2024-08-22T17:30:30.005Z -> Σ:1304.301s, Δ:0.001s -> ConnectivityStatusStore -> App state updated: active
2024-08-22T17:30:30.010Z -> Σ:1304.306s, Δ:0.005s -> Sentry -> Breadcrumb {"message":"Heartbeat Track State Parameters Changed. Foregrounded true, Connection State: RTC_CONNECTED"}
2024-08-22T17:30:30.055Z -> Σ:1304.351s, Δ:0.045s -> Sentry -> Breadcrumb {"category":"lifecycle","message":"App opened","data":{"openFrom":"launcher"}}
2024-08-22T17:30:30.062Z -> Analytics -> app_opened {"device_model":"SM-A226B","device_brand":"samsung","device_product":"a22xnseea","device_manufacturer":"samsung","smallest_screen_width":384,"device_performance_class":0,"soc_name":"Mediatek_MT6833V/NZA","ram_size":3,"max_cpu_freq":2,"opened_from":"launcher","load_id":"fca96d9a-34f8-40ad-a6e4-43fc4f7f3eb4","theme":"darker","client_performance_cpu":8.10878243512974,"client_performance_memory":349088,"cpu_core_count":8,"accessibility_features":128,"rendered_locale":"cs","uptime_app":1304,"client_rtc_state":"RTC_CONNECTED","client_app_state":"active"}
2024-08-22T17:30:30.063Z -> Σ:1304.359s, Δ:0.008s -> Sentry -> Breadcrumb {"message":"Heartbeat scheduler- logging app start, checking for correctly scheduled heartbeat in 10s"}
2024-08-22T17:30:30.087Z -> Network -> Sending POST to https://discord.com/api/v9/science
2024-08-22T17:30:30.340Z -> Network -> Completed POST to https://discord.com/api/v9/science with status: 204
2024-08-22T17:30:34.660Z -> Σ:1308.956s, Δ:4.597s -> RTCConnection(1274316657707192421, default) -> Handling ping: 43
2024-08-22T17:30:37.651Z -> Σ:1311.947s, Δ:2.991s -> Sentry -> Breadcrumb {"category":"analytics","message":"settings_pane_viewed"}
2024-08-22T17:30:37.652Z -> Analytics -> settings_pane_viewed
2024-08-22T17:30:37.768Z -> Network -> Sending POST to https://discord.com/api/v9/science
2024-08-22T17:30:38.005Z -> Network -> Completed POST to https://discord.com/api/v9/science with status: 204
2024-08-22T17:30:38.949Z -> Σ:1313.245s, Δ:1.298s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:30:39.040Z -> Σ:1313.335s, Δ:0.090s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:30:39.665Z -> Σ:1313.961s, Δ:0.626s -> RTCConnection(1274316657707192421, default) -> Handling ping: 48
2024-08-22T17:30:44.666Z -> Σ:1318.962s, Δ:5.001s -> RTCConnection(1274316657707192421, default) -> Handling ping: 47
2024-08-22T17:30:48.050Z -> Σ:1322.346s, Δ:3.384s -> Sentry -> Breadcrumb {"message":"App state changed to background","category":"appState"}
2024-08-22T17:30:48.050Z -> Σ:1322.346s, Δ:0.000s -> index.native.tsx -> AppState changing from active to background
2024-08-22T17:30:48.050Z -> Σ:1322.346s, Δ:0.000s -> Flux -> Dispatching APP_STATE_UPDATE
2024-08-22T17:30:48.050Z -> Σ:1322.346s, Δ:0.000s -> ConnectivityStatusStore -> App state updated: background
2024-08-22T17:30:48.050Z -> Σ:1322.346s, Δ:0.000s -> CacheStore -> Not writing cache because caches cleared
2024-08-22T17:30:48.053Z -> Σ:1322.349s, Δ:0.003s -> Sentry -> Breadcrumb {"category":"analytics","message":"android_jank_stats"}
2024-08-22T17:30:48.054Z -> Analytics -> android_jank_stats
2024-08-22T17:30:48.054Z -> Σ:1322.350s, Δ:0.001s -> Sentry -> Breadcrumb {"message":"Heartbeat Track State Parameters Changed. Foregrounded false, Connection State: RTC_CONNECTED"}
2024-08-22T17:30:48.063Z -> Σ:1322.359s, Δ:0.009s -> Sentry -> Breadcrumb {"category":"analytics","message":"app_background"}
2024-08-22T17:30:48.063Z -> Analytics -> app_background
2024-08-22T17:30:48.063Z -> Σ:1322.359s, Δ:0.000s -> KvBackgroundManager -> performing cleanup (deep: false)
2024-08-22T17:30:49.664Z -> Σ:1323.960s, Δ:1.601s -> RTCConnection(1274316657707192421, default) -> Handling ping: 46
2024-08-22T17:30:50.470Z -> Σ:1324.766s, Δ:0.806s -> Sentry -> Breadcrumb {"message":"App state changed to active","category":"appState"}
2024-08-22T17:30:50.470Z -> Σ:1324.766s, Δ:0.000s -> index.native.tsx -> AppState changing from background to active
2024-08-22T17:30:50.470Z -> Σ:1324.766s, Δ:0.000s -> Flux -> Dispatching APP_STATE_UPDATE
2024-08-22T17:30:50.471Z -> Σ:1324.767s, Δ:0.001s -> GatewaySocket -> Connection has reset backoff for reason: App state is active
2024-08-22T17:30:50.471Z -> Σ:1324.767s, Δ:0.000s -> ConnectivityStatusStore -> App state updated: active
2024-08-22T17:30:50.471Z -> Σ:1324.767s, Δ:0.000s -> Sentry -> Breadcrumb {"message":"Heartbeat Track State Parameters Changed. Foregrounded true, Connection State: RTC_CONNECTED"}
2024-08-22T17:30:50.476Z -> Σ:1324.772s, Δ:0.005s -> Sentry -> Breadcrumb {"category":"lifecycle","message":"App opened","data":{"openFrom":"launcher"}}
2024-08-22T17:30:50.482Z -> Analytics -> app_opened {"device_model":"SM-A226B","device_brand":"samsung","device_product":"a22xnseea","device_manufacturer":"samsung","smallest_screen_width":384,"device_performance_class":0,"soc_name":"Mediatek_MT6833V/NZA","ram_size":3,"max_cpu_freq":2,"opened_from":"launcher","load_id":"fca96d9a-34f8-40ad-a6e4-43fc4f7f3eb4","theme":"darker","client_performance_cpu":4.2372881355932215,"client_performance_memory":418908,"cpu_core_count":8,"accessibility_features":128,"rendered_locale":"cs","uptime_app":1324,"client_rtc_state":"RTC_CONNECTED","client_app_state":"active"}
2024-08-22T17:30:50.483Z -> Σ:1324.779s, Δ:0.007s -> Sentry -> Breadcrumb {"message":"Heartbeat scheduler- logging app start, checking for correctly scheduled heartbeat in 10s"}
2024-08-22T17:30:50.486Z -> Network -> Sending POST to https://discord.com/api/v9/science
2024-08-22T17:30:50.694Z -> Network -> Completed POST to https://discord.com/api/v9/science with status: 204
2024-08-22T17:30:51.115Z -> Σ:1325.411s, Δ:0.632s -> Sentry -> Breadcrumb {"message":"App state changed to background","category":"appState"}
2024-08-22T17:30:51.115Z -> Σ:1325.411s, Δ:0.000s -> index.native.tsx -> AppState changing from active to background
2024-08-22T17:30:51.115Z -> Σ:1325.411s, Δ:0.000s -> Flux -> Dispatching APP_STATE_UPDATE
2024-08-22T17:30:51.116Z -> Σ:1325.412s, Δ:0.001s -> ConnectivityStatusStore -> App state updated: background
2024-08-22T17:30:51.116Z -> Σ:1325.412s, Δ:0.000s -> CacheStore -> Not writing cache because caches cleared
2024-08-22T17:30:51.117Z -> Σ:1325.413s, Δ:0.001s -> Sentry -> Breadcrumb {"category":"analytics","message":"android_jank_stats"}
2024-08-22T17:30:51.117Z -> Analytics -> android_jank_stats
2024-08-22T17:30:51.117Z -> Σ:1325.413s, Δ:0.000s -> Sentry -> Breadcrumb {"message":"Heartbeat Track State Parameters Changed. Foregrounded false, Connection State: RTC_CONNECTED"}
2024-08-22T17:30:51.123Z -> Σ:1325.419s, Δ:0.006s -> Sentry -> Breadcrumb {"category":"analytics","message":"app_background"}
2024-08-22T17:30:51.124Z -> Analytics -> app_background
2024-08-22T17:30:51.124Z -> Σ:1325.420s, Δ:0.001s -> KvBackgroundManager -> performing cleanup (deep: false)
2024-08-22T17:30:52.698Z -> Σ:1326.994s, Δ:1.574s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:30:52.764Z -> Σ:1327.059s, Δ:0.065s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:30:54.667Z -> Σ:1328.963s, Δ:1.904s -> RTCConnection(1274316657707192421, default) -> Handling ping: 46
2024-08-22T17:30:55.738Z -> Σ:1330.034s, Δ:1.071s -> Sentry -> Breadcrumb {"category":"analytics","message":"native_share_sheet_app_clicked"}
2024-08-22T17:30:55.738Z -> Analytics -> native_share_sheet_app_clicked
2024-08-22T17:30:59.083Z -> Σ:1333.379s, Δ:3.345s -> Sentry -> Breadcrumb {"message":"App state changed to active","category":"appState"}
2024-08-22T17:30:59.084Z -> Σ:1333.380s, Δ:0.001s -> index.native.tsx -> AppState changing from background to active
2024-08-22T17:30:59.084Z -> Σ:1333.380s, Δ:0.000s -> Flux -> Dispatching APP_STATE_UPDATE
2024-08-22T17:30:59.084Z -> Σ:1333.380s, Δ:0.000s -> GatewaySocket -> Connection has reset backoff for reason: App state is active
2024-08-22T17:30:59.084Z -> Σ:1333.380s, Δ:0.000s -> ConnectivityStatusStore -> App state updated: active
2024-08-22T17:30:59.084Z -> Σ:1333.380s, Δ:0.000s -> Sentry -> Breadcrumb {"message":"Heartbeat Track State Parameters Changed. Foregrounded true, Connection State: RTC_CONNECTED"}
2024-08-22T17:30:59.097Z -> Σ:1333.393s, Δ:0.013s -> Sentry -> Breadcrumb {"category":"lifecycle","message":"App opened","data":{"openFrom":"launcher"}}
2024-08-22T17:30:59.098Z -> Analytics -> app_opened {"device_model":"SM-A226B","device_brand":"samsung","device_product":"a22xnseea","device_manufacturer":"samsung","smallest_screen_width":384,"device_performance_class":0,"soc_name":"Mediatek_MT6833V/NZA","ram_size":3,"max_cpu_freq":2,"opened_from":"launcher","load_id":"fca96d9a-34f8-40ad-a6e4-43fc4f7f3eb4","theme":"darker","client_performance_cpu":8.607784431137725,"client_performance_memory":386784,"cpu_core_count":8,"accessibility_features":128,"rendered_locale":"cs","uptime_app":1333,"client_rtc_state":"RTC_CONNECTED","client_app_state":"active"}
2024-08-22T17:30:59.098Z -> Σ:1333.394s, Δ:0.001s -> Sentry -> Breadcrumb {"message":"Heartbeat scheduler- logging app start, checking for correctly scheduled heartbeat in 10s"}
2024-08-22T17:30:59.119Z -> Network -> Sending POST to https://discord.com/api/v9/science
2024-08-22T17:30:59.543Z -> Network -> Completed POST to https://discord.com/api/v9/science with status: 204
2024-08-22T17:30:59.645Z -> Σ:1333.941s, Δ:0.547s -> RTCConnection(1274316657707192421, default) -> Handling ping: 25
2024-08-22T17:31:02.851Z -> Σ:1337.147s, Δ:3.206s -> Sentry -> Breadcrumb {"category":"analytics","message":"settings_pane_viewed"}
2024-08-22T17:31:02.851Z -> Analytics -> settings_pane_viewed
2024-08-22T17:31:03.336Z -> Network -> Sending POST to https://discord.com/api/v9/science
2024-08-22T17:31:03.624Z -> Network -> Completed POST to https://discord.com/api/v9/science with status: 204
2024-08-22T17:31:04.655Z -> Σ:1338.951s, Δ:1.804s -> RTCConnection(1274316657707192421, default) -> Handling ping: 34
2024-08-22T17:31:06.449Z -> Σ:1340.745s, Δ:1.794s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:31:06.653Z -> Σ:1340.949s, Δ:0.204s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:31:09.667Z -> Σ:1343.963s, Δ:3.014s -> RTCConnection(1274316657707192421, default) -> Handling ping: 47
2024-08-22T17:31:14.666Z -> Σ:1348.962s, Δ:4.999s -> RTCConnection(1274316657707192421, default) -> Handling ping: 45
2024-08-22T17:31:19.647Z -> Σ:1353.943s, Δ:4.981s -> RTCConnection(1274316657707192421, default) -> Handling ping: 26
2024-08-22T17:31:20.205Z -> Σ:1354.501s, Δ:0.558s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:31:20.272Z -> Σ:1354.568s, Δ:0.067s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:31:24.666Z -> Σ:1358.962s, Δ:4.394s -> RTCConnection(1274316657707192421, default) -> Handling ping: 43
2024-08-22T17:31:27.052Z -> Σ:1361.348s, Δ:2.386s -> Sentry -> Breadcrumb {"message":"App state changed to background","category":"appState"}
2024-08-22T17:31:27.052Z -> Σ:1361.348s, Δ:0.000s -> index.native.tsx -> AppState changing from active to background
2024-08-22T17:31:27.052Z -> Σ:1361.348s, Δ:0.000s -> Flux -> Dispatching APP_STATE_UPDATE
2024-08-22T17:31:27.053Z -> Σ:1361.349s, Δ:0.001s -> ConnectivityStatusStore -> App state updated: background
2024-08-22T17:31:27.053Z -> Σ:1361.349s, Δ:0.000s -> CacheStore -> Not writing cache because caches cleared
2024-08-22T17:31:27.056Z -> Σ:1361.351s, Δ:0.002s -> Sentry -> Breadcrumb {"category":"analytics","message":"android_jank_stats"}
2024-08-22T17:31:27.056Z -> Analytics -> android_jank_stats
2024-08-22T17:31:27.056Z -> Σ:1361.352s, Δ:0.001s -> Sentry -> Breadcrumb {"message":"Heartbeat Track State Parameters Changed. Foregrounded false, Connection State: RTC_CONNECTED"}
2024-08-22T17:31:27.065Z -> Σ:1361.361s, Δ:0.009s -> Sentry -> Breadcrumb {"category":"analytics","message":"app_background"}
2024-08-22T17:31:27.066Z -> Analytics -> app_background
2024-08-22T17:31:27.066Z -> Σ:1361.362s, Δ:0.001s -> KvBackgroundManager -> performing cleanup (deep: false)
2024-08-22T17:31:29.666Z -> Σ:1363.962s, Δ:2.600s -> RTCConnection(1274316657707192421, default) -> Handling ping: 43
2024-08-22T17:31:30.643Z -> Σ:1364.939s, Δ:0.977s -> Sentry -> Breadcrumb {"category":"analytics","message":"native_share_sheet_app_clicked"}
2024-08-22T17:31:30.643Z -> Analytics -> native_share_sheet_app_clicked
2024-08-22T17:31:33.956Z -> Σ:1368.252s, Δ:3.313s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:31:34.032Z -> Σ:1368.328s, Δ:0.076s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:31:34.669Z -> Σ:1368.965s, Δ:0.637s -> RTCConnection(1274316657707192421, default) -> Handling ping: 45
2024-08-22T17:31:39.666Z -> Σ:1373.962s, Δ:4.997s -> RTCConnection(1274316657707192421, default) -> Handling ping: 40
2024-08-22T17:31:44.666Z -> Σ:1378.962s, Δ:5.000s -> RTCConnection(1274316657707192421, default) -> Handling ping: 39
2024-08-22T17:31:47.706Z -> Σ:1382.002s, Δ:3.040s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:31:47.751Z -> Σ:1382.046s, Δ:0.044s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:31:49.666Z -> Σ:1383.962s, Δ:1.916s -> RTCConnection(1274316657707192421, default) -> Handling ping: 38
2024-08-22T17:31:54.669Z -> Σ:1388.965s, Δ:5.003s -> RTCConnection(1274316657707192421, default) -> Handling ping: 39
2024-08-22T17:31:59.665Z -> Σ:1393.961s, Δ:4.996s -> RTCConnection(1274316657707192421, default) -> Handling ping: 30
2024-08-22T17:32:01.456Z -> Σ:1395.752s, Δ:1.791s -> RTCControlSocket(default) -> Sending heartbeat
2024-08-22T17:32:01.605Z -> Σ:1395.901s, Δ:0.149s -> RTCControlSocket(default) -> Heartbeat ACK received
2024-08-22T17:32:04.658Z -> Σ:1398.954s, Δ:3.053s -> RTCConnection(1274316657707192421, default) -> Handling ping: 28
2024-08-22T17:32:09.664Z -> Σ:1403.960s, Δ:5.006s -> RTCConnection(1274316657707192421, default) -> Handling ping: 35
2024-08-22T17:32:11.075Z -> Σ:1405.371s, Δ:1.411s -> Sentry -> Breadcrumb {"message":"App state changed to active","category":"appState"}
2024-08-22T17:32:11.078Z -> Σ:1405.374s, Δ:0.003s -> index.native.tsx -> AppState changing from background to active
2024-08-22T17:32:11.079Z -> Σ:1405.375s, Δ:0.001s -> Flux -> Dispatching APP_STATE_UPDATE
2024-08-22T17:32:11.092Z -> Σ:1405.388s, Δ:0.013s -> GatewaySocket -> Connection has reset backoff for reason: App state is active
2024-08-22T17:32:11.092Z -> Σ:1405.388s, Δ:0.000s -> ConnectivityStatusStore -> App state updated: active
2024-08-22T17:32:11.100Z -> Σ:1405.396s, Δ:0.008s -> Sentry -> Breadcrumb {"message":"Heartbeat Track State Parameters Changed. Foregrounded true, Connection State: RTC_CONNECTED"}
2024-08-22T17:32:11.147Z -> Σ:1405.442s, Δ:0.046s -> Sentry -> Breadcrumb {"category":"lifecycle","message":"App opened","data":{"openFrom":"launcher"}}
2024-08-22T17:32:11.160Z -> Analytics -> app_opened {"device_model":"SM-A226B","device_brand":"samsung","device_product":"a22xnseea","device_manufacturer":"samsung","smallest_screen_width":384,"device_performance_class":0,"soc_name":"Mediatek_MT6833V/NZA","ram_size":3,"max_cpu_freq":2,"opened_from":"launcher","load_id":"fca96d9a-34f8-40ad-a6e4-43fc4f7f3eb4","theme":"darker","client_performance_cpu":4.370629370629371,"client_performance_memory":337976,"cpu_core_count":8,"accessibility_features":128,"rendered_locale":"cs","uptime_app":1405,"client_rtc_state":"RTC_CONNECTED","client_app_state":"active"}
2024-08-22T17:32:11.160Z -> Σ:1405.456s, Δ:0.014s -> Sentry -> Breadcrumb {"message":"Heartbeat scheduler- logging app start, checking for correctly scheduled heartbeat in 10s"}
2024-08-22T17:32:11.180Z -> Network -> Sending POST to https://discord.com/api/v9/science
2024-08-22T17:32:11.407Z -> Network -> Completed POST to https://discord.com/api/v9/science with status: 204

Issues sending LTC txn

When trying the "long way", i get the error

AttributeError: 'Litecoin' object has no attribute 'serialize'

When trying the short way :

{'status': 'fail', 'data': {'network': 'Network is required (DOGE, DOGETEST, ...)', 'tx_hex': 'A valid signed transaction hexadecimal string is required. Please check if all inputs in the given transactions are still available to spend. See the "Is Tx Output Spent?" API call for reference.'}}

how cant test valid in blockchain?

self.api.is_address('2MudhyEqJ7RzedMPXrReNXDcJ9Hch1AUqdv') == True
self.api.is_address('2MudhyEqJ7RzedMPXrReNXDcJ9Hch1AUqd4') == True WHY? This address is not valid in blockchain!!!

how to derive other BIP44 paths from mnemonic?

  • I would like to independently recreate the receiving addresses that are shown in the blockchain.info wallet.
  • for example on blockchain.info multiple accounts can be created.
  • how can xpub and xprv keys for these additional (BIP44?) accounts be derived from the mnemonic?
  • for an example see https://iancoleman.io/bip39/

Account = 1 corresponds to the second blockchain.info wallet, and so on:
image

I have already done this for account = 0: https://blog.typodrive.com/2018/03/24/derive-bitcoin-addresses-from-hd-xpub-keys/

Timeout error on Dash and Doge while using unspent

I'm getting the error below while using the unspent function on Dash and Doge. Any idea why? Is there a way to increase the timeout or change the blockchain provider for these two coins?

Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\coins_async\base.py", line 397, in unspent
    unspents = await self.client.unspent(value)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\electrumx_client\client.py", line 508, in unspent
    return await self.send_request("blockchain.scripthash.listunspent", scripthash)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\electrumx_client\client.py", line 389, in send_request
    await self._ensure_connected()
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\electrumx_client\client.py", line 351, in _ensure_connected
    done, pending = await asyncio.wait([is_connected_task, self._connection_task],
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 384, in wait
    return await _wait(fs, timeout, return_when, loop)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 491, in _wait
    await waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 456, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\User\Desktop\wallets\py_bitcoinlib\btc_wallet.py", line 302, in <module>
    balance, balance_float = balance(wallet, network, args.testnet)
  File "C:\Users\User\Desktop\wallets\py_bitcoinlib\btc_wallet.py", line 198, in balance
    inputs = coin.unspent(wallet[network]['addr1'])
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\coins\base.py", line 152, in unspent
    return self._run_async("unspent", addr, merkle_proof=merkle_proof)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\coins\base.py", line 84, in _run_async
    return fut.result(timeout=self.timeout * 2)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 458, in result
    return self.__get_result()
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result
    raise self._exception
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\coins\base.py", line 68, in run
    result = await asyncio.wait_for(coro, timeout=self.timeout)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

Bug on rpc.py

I think this two line is obviously incorrect in rpc.py file (line 97 and 100):

        if self.use_ssl and not 's' in server.keys():
        elif not self.use_ssl and not 't' in server.keys():

Transaction fee automatic calculation

i am looking to implement automatic suitable fee for a transaction. The main structure will be below where user can still use old method and also new mktx method or we should create new method.Lets say and i will implement.

example;
createRawTransaction(inputs, outputs, fee = standard, changeaddress = changeaddress, segwit = False):
if standard :
we will findout from source fee per byte
else :
given fee will be satoshi per byte

i think we can make autodetect segwit for mktx method on the basis of output addresses

Invalid address format when investigating a transaction

Hello, When I request a transaction inspection, I get an incorrect address in outs
c.inspect(c.get_raw_tx('dea795a8d3b048dd2506bf7945de74b63fc3d2af60001d480f99dd91dca8eda2'))
I have
'outs': [{'address': 'JtmFUWY6rKmTc3XJCxYWtxxrUzzgJcsfh', 'value': 40000}
But the shipment was made to the address tb1qg39yq6d5c62ezktqs5ufh3ku37vkg6nwk46cuc

Please, help me, what I`m doing wrong???

from cryptos import *

'''
https://blockstream.info/testnet/address/2My7wDrirLvDi5sScPcmj1ZfAToRvqe8Mpq
2My7wDrirLvDi5sScPcmj1ZfAToRvqe8Mpq
Balance : 0.00038360
'''
priv = 'fcdc16596718465bf585d7cf59ac56efcf8a629c77e6ba82a5afc2499dbb15a4'
timeout_seconds = 120 # 120 seconds
c = Bitcoin(testnet=True, timeout=timeout_seconds)
addr_from = '2My7wDrirLvDi5sScPcmj1ZfAToRvqe8Mpq'
addr_to = 'tb1qrsjj80zgz2mat9h3mupce7tqcgqgycna6ywz6m'
rtl_tx = c.send(priv, addr_from, addr_to, 10000)


ERROR ->
Traceback (most recent call last):
File "D:\GIT\Python\bitcoin-rpi.venv\lib\site-packages\cryptos\coins_async\base.py", line 490, in pushtx
result = await self.client.broadcast_tx(tx)
File "D:\GIT\Python\bitcoin-rpi.venv\lib\site-packages\cryptos\electrumx_client\client.py", line 517, in broadcast_tx
return await self.send_request("blockchain.transaction.broadcast", raw_tx)
File "D:\GIT\Python\bitcoin-rpi.venv\lib\site-packages\cryptos\electrumx_client\client.py", line 390, in send_request
return await self._send_request(method, *args, timeout=timeout, **kwargs)
File "D:\GIT\Python\bitcoin-rpi.venv\lib\site-packages\cryptos\electrumx_client\client.py", line 386, in _send_request
return await self.session.send_request(method, args, timeout=timeout, **kwargs)
File "D:\GIT\Python\bitcoin-rpi.venv\lib\site-packages\cryptos\electrumx_client\client.py", line 143, in send_request
response = await asyncio.wait_for(
File "C:\Users\kerna\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 445, in wait_for
return fut.result()
File "D:\GIT\Python\bitcoin-rpi.venv\lib\site-packages\aiorpcx\session.py", line 540, in send_request
return await self._send_concurrent(message, future, 1)
File "D:\GIT\Python\bitcoin-rpi.venv\lib\site-packages\aiorpcx\session.py", line 512, in _send_concurrent
return await future
aiorpcx.jsonrpc.RPCError: (1, 'the transaction was rejected by network rules.\n\nmandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element)\n')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\GIT\Python\bitcoin-rpi\exam_sign02.py", line 15, in
rtl_tx = c.send(priv, addr_from, addr_to, 10000)
File "D:\GIT\Python\bitcoin-rpi.venv\lib\site-packages\cryptos\coins\base.py", line 327, in send
return self._run_async("send", privkey, frm, to, value,
File "D:\GIT\Python\bitcoin-rpi.venv\lib\site-packages\cryptos\coins\base.py", line 84, in _run_async
return fut.result(timeout=self.timeout * 2)
File "C:\Users\kerna\AppData\Local\Programs\Python\Python310\lib\concurrent\futures_base.py", line 458, in result
return self.__get_result()
File "C:\Users\kerna\AppData\Local\Programs\Python\Python310\lib\concurrent\futures_base.py", line 403, in __get_result
raise self._exception
File "D:\GIT\Python\bitcoin-rpi.venv\lib\site-packages\cryptos\coins\base.py", line 68, in run
result = await asyncio.wait_for(coro, timeout=self.timeout)
File "C:\Users\kerna\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 445, in wait_for
return fut.result()
File "D:\GIT\Python\bitcoin-rpi.venv\lib\site-packages\cryptos\coins_async\base.py", line 1057, in send
return await self.send_to_multiple_receivers_tx(privkey, frm, outs, change_addr=change_addr,
File "D:\GIT\Python\bitcoin-rpi.venv\lib\site-packages\cryptos\coins_async\base.py", line 1043, in send_to_multiple_receivers_tx
return await self.pushtx(tx)
File "D:\GIT\Python\bitcoin-rpi.venv\lib\site-packages\cryptos\coins_async\base.py", line 498, in pushtx
raise TXRejectedError(message)
cryptos.coins_async.base.TXRejectedError: {'ins': [{'tx_hash': '467af9bc5c52678c18f867fe9ac2f1bb545e123b5609b78f69e6766d771753e8', 'tx_pos': 0, 'script': '1600142f48ae6578926108c8970caf2e18cac0ca787496', 'sequence': 4294967295}], 'outs': [{'value': 10000, 'script': '00141c2523bc4812b7d596f1df038cf960c20082627d'}, {'value': 27360, 'script': 'a914406fd8f26859a2986a264f74de48b7a43be2807487'}], 'version': 1, 'marker': 0, 'flag': 1, 'witness': [{'number': 2, 'scriptCode': '473044022069cc9b9c69baa9d172335061b13c0ebd98af10ef8b3e4f6a16bf5c9aa41b073b02205337dda64a0e3535fd05d510866cf4eefb395a8b46899d78d22a3727b3b83032012102e5afa2ffdc23712302220aefe11ba9f00f67a7032d0aaae7e1fbb59d970ae748'}], 'locktime': 0}
01000000000101e85317776d76e6698fb709563b125e54bbf1c29afe67f8188c67525cbcf97a4600000000171600142f48ae6578926108c8970caf2e18cac0ca787496ffffffff0210270000000000001600141c2523bc4812b7d596f1df038cf960c20082627de06a00000000000017a914406fd8f26859a2986a264f74de48b7a43be280748702473044022069cc9b9c69baa9d172335061b13c0ebd98af10ef8b3e4f6a16bf5c9aa41b073b02205337dda64a0e3535fd05d510866cf4eefb395a8b46899d78d22a3727b3b83032012102e5afa2ffdc23712302220aefe11ba9f00f67a7032d0aaae7e1fbb59d970ae74800000000
the transaction was rejected by network rules.

mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element)

bc1 -> bc1 transfers don't work

from cryptos import *
c = Bitcoin() 
z=c.send("51charPrivKey","bc1destination",1,fee=10000,segwit=True)

Error at c.send() -

File "C:\Users\work\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptos\main.py", line 432, in b58check_to_bin
assert bin_dbl_sha256(data[:-4])[:4] == data[-4:]
AssertionError

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.