Invalid address from HD Wallet

+3 votes

What I did:

I am using https://iancoleman.io/bip39/ to generate bitcoin address.

I have click generate random mnemonic, set coin to BTC. I have tried the addresses from BIP32, BIP44, BIP49 with the command

grant <address> send,receive

Output:

error code: -5
error message:
Invalid address: <address>

 

Expected Output:

{"method":"grant","params":["address","connect"],"id":"86067020-1678611432","chain_name":"chain1"}

<tx_id>

What's wrong did I do?

 

asked Mar 12, 2023 by utarn

1 Answer

0 votes
Sounds like you need to configure your blockchain to use bitcoin-compatible addressing. See this page of the documentation: https://www.multichain.com/developers/address-key-format/
answered Mar 12, 2023 by MultiChain
Do you have an example code in any programming language that generate the address offline? I looked into C# library, it just make an api call.

I have an app running on public blockchain.  The app requires offline account generation, sign message, verify message, and offline transaction builder.

It would be good to have library in one language so that I can port to another language C# and dart.
You can use multichaind-cold which is part of the regular download: https://www.multichain.com/developers/cold-nodes-wallets/
The point is my app require key generation from mobile app which is written in dart or Javascript. It's not possible to run a command like that.
I think in this case your best bet is to use bitcoin compatible addressing, if it's not too late. Otherwise, find some code for generating bitcoin addresses and make the minor modifications required based on MultiChain's documentation: https://www.multichain.com/developers/address-key-format/
...