Bitcoin-com / bitbox-sdk

BITBOX SDK for Bitcoin Cash
https://developer.bitcoin.com/bitbox
MIT License
87 stars 62 forks source link

testnet is broken at trest.bitcoin.com/v2 #190

Open mariusk opened 4 years ago

mariusk commented 4 years ago

I've managed to fund Copay wallet using a testnet faucet. Using the mnemonic master key, I managed to duplicate this using bitbox-sdk. This sdk generates the right address, but when I call bitbox.Address.details it returns a zero balance.

I've verified that the testnet address I generated and funded has money here:

https://www.blockchain.com/bch-testnet/address/bchtest:qz8tccq6zlc3umyk0y9xj90yw8cjwmm435s4e566wh

When I look up the same address using trest.bitcion.com/v2 directly however I get the same zero balance info as the bitbox-sdk call:

balance: {
  balance: 0,
  balanceSat: 0,
  totalReceived: 0,
  totalReceivedSat: 0,
  totalSent: 0,
  totalSentSat: 0,
  unconfirmedBalance: 0,
  unconfirmedBalanceSat: 0,
  unconfirmedTxApperances: 0,
  txApperances: 0,
  transactions: [],
  legacyAddress: 'mtXfur2QYkEmjjMbxNmmbS7cUpvcHDThjQ',
  cashAddress: 'bchtest:qz8tccq6zlc3umyk0y9xj90yw8cjwmm435s4e566wh',
  slpAddress: 'slptest:qz8tccq6zlc3umyk0y9xj90yw8cjwmm435tp70qdu2',
  currentPage: 0,
  pagesTotal: 0
}

So it really seems the testnet or the node hosting it at trest.bitcon.com is broken. As if this stuff wasn't hard enough for newbs from the get go! :P

christroutner commented 4 years ago

bch-js is forked from BITBOX, but maintained by FullStack.cash. You might give it a go and see if you get better results. We have a similar examples directory as the examples in BITBOX: https://fullstack.cash/examples

You can also do a quick test using our Explorer UI: https://fullstack.cash/explore-testnet

mariusk commented 4 years ago

@christroutner Thanks, I will look into it. On that testnet explorer tool it finds the tx fine.

A heads up though; the link to get an API key at:

https://account.bchjs.cash/

has an invalid certificate, making it unavailable for most users.

christroutner commented 4 years ago

Where did you see the link to bchjs.cash? I'm trying to change all those links to fullstack.cash.

mariusk commented 4 years ago

From here: https://api.fullstack.cash/

mariusk commented 4 years ago

@christroutner Some more feedback, assuming you're interested:

So still quite "challenging" to get started to put it mildly.