diff --git a/lnd.go b/lnd.go index 909e7931..2a211bee 100644 --- a/lnd.go +++ b/lnd.go @@ -196,8 +196,8 @@ func lndMain() error { proxyOpts := []grpc.DialOption{grpc.WithTransportCredentials(cCreds)} var ( - privateWalletPw = []byte("hello") - publicWalletPw = []byte("public") + privateWalletPw = lnwallet.DefaultPrivatePassphrase + publicWalletPw = lnwallet.DefaultPublicPassphrase birthday time.Time recoveryWindow uint32 ) diff --git a/lnwallet/interface.go b/lnwallet/interface.go index 2f803d29..0f752d62 100644 --- a/lnwallet/interface.go +++ b/lnwallet/interface.go @@ -11,10 +11,6 @@ import ( "github.com/roasbeef/btcutil" ) -// ErrNotMine is an error denoting that a WalletController instance is unable -// to spend a specified output. -var ErrNotMine = errors.New("the passed output doesn't belong to the wallet") - // AddressType is an enum-like type which denotes the possible address types // WalletController supports. type AddressType uint8 @@ -32,10 +28,24 @@ const ( UnknownAddressType ) -// ErrDoubleSpend is returned from PublishTransaction in case the -// tx being published is spending an output spent by a conflicting -// transaction. -var ErrDoubleSpend = errors.New("Transaction rejected: output already spent") +var ( + // DefaultPublicPassphrase is the default public passphrase used for the + // wallet. + DefaultPublicPassphrase = []byte("public") + + // DefaultPrivatePassphrase is the default private passphrase used for + // the wallet. + DefaultPrivatePassphrase = []byte("hello") + + // ErrDoubleSpend is returned from PublishTransaction in case the + // tx being published is spending an output spent by a conflicting + // transaction. + ErrDoubleSpend = errors.New("Transaction rejected: output already spent") + + // ErrNotMine is an error denoting that a WalletController instance is + // unable to spend a specified output. + ErrNotMine = errors.New("the passed output doesn't belong to the wallet") +) // Utxo is an unspent output denoted by its outpoint, and output value of the // original output.