bitpay / bitcore

A full stack for bitcoin and blockchain-based applications
https://bitcore.io/
MIT License
4.8k stars 2.07k forks source link

Can't understand what the key needed #3617

Open 2jumper3 opened 11 months ago

2jumper3 commented 11 months ago

Hi all! We use this documentation: https://github.com/bitpay/bitcore/blob/master/packages/bitcore-node/docs/api-documentation.md

We are interested in this method: Get Wallet Transactions GET /api/BTC/mainnet/wallet/:pubKey/transactions

Purely theoretically, it refers to the public key of a Bitcoin wallet. To obtain it, I take the private key for the Bitcoin wallet from WalletCore (it's definitely correct, we use it everywhere). From that private key, I use WalletCore to derive the public key Secp256k1. From the public key, I get the data, and from that, I get the hex string.

I've tried both compressed and uncompressed public keys, but the response is always "wallet not found". I've also tried other variations besides Secp256k1, even attempted to convert it to base58. However, it was all in vain.

And the final method: Get Address Transactions GET /api/BTC/mainnet/address/:address/txs As an alternative, it doesn't suit our needs because the response lacks the specific data we require. It only provides txid and value, without even including the date or any other relevant information.