0

I´m trying to import a watch-only address to my bcoin node using cli (testnet). My config looks as follows:

[....]
#
# Options
#

network: testnet

#
# Node
#

prefix: ~/.bcoin-testnet
db: leveldb
max-files: 64
cache-size: 100
[...]

entering the following command (just a random valid testnet address):

 bcoin wallet watch my7q4nhpuJ6TsevXdDnPRq1rvHcPKeGEaD

results with the following error in the debug.log:

[E:2017-08-03T08:43:02Z] (node) Network mismatch for address.
AssertionError [ERR_ASSERTION]: Network mismatch for address.
at Wallet.importAddress [as _importAddress] ([...]/.nvm/versions/node/v8.2.1/lib/node_modules/bcoin/lib/wallet/wallet.js:1310:3)
at Wallet.importAddress ([...]/.nvm/versions/node/v8.2.1/lib/node_modules/bcoin/lib/wallet/wallet.js:1284:23)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
[E:2017-08-03T08:43:02Z] (node) This socket is closed
Error: This socket is closed
at Socket._writeGeneric (net.js:721:18)
at Socket._write (net.js:781:8)
at doWrite (_stream_writable.js:371:12)
at clearBuffer (_stream_writable.js:497:7)
at Socket.Writable.uncork (_stream_writable.js:297:7)
at connectionCorkNT (_http_outgoing.js:695:8)
at _combinedTickCallback (internal/process/next_tick.js:135:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

The error occurs, no matter what address I try to import. Does anyone have an idea on how to solve this?

-1

You can use the http api to perform an import. Notably, you import a wallet with the create wallet command as the import command imports addresses into a wallet.

curl -X PUT \ http://127.0.0.1:18332/wallet/$ID \ -H 'authorization: Basic eDppYW1zYXRvc2hp' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -d '{ "masterKey":$MASTERKEY }'

Link to docs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.