btcwallet icon indicating copy to clipboard operation
btcwallet copied to clipboard

Creating a new address without rpc server

Open gasparyanyur opened this issue 6 years ago • 1 comments

Hi all. I am trying to generate a new address without connection to rpc server. I do not want to receive transactions and etc. I only want to generate and show it users.

Here is my code

wallet, err := loader.OpenExistingWallet([]byte(generator.Password), false)

	if err != nil {
		return err
	}

	var scope = waddrmgr.KeyScope{
		Purpose: 44,
		Coin:    0,
	}

	address, err := wallet.NewAddress(1, scope)
	
	if err != nil {
		return err
	}

	fmt.Println(address.String())

So I am getting an error look like this

blockchain RPC is inactive

How can I solve this problem ?

gasparyanyur avatar Feb 20 '19 14:02 gasparyanyur

Does you like to share your codebase. I will review and after that I will help you to resolve your issue. @gasparyanyur

ali2210 avatar Oct 16 '21 13:10 ali2210