Code Monkey home page Code Monkey logo

Comments (5)

gasparyanyur avatar gasparyanyur commented on June 2, 2024

the same error!
@wpaulino please help to solve this error!

from btcwallet.

guggero avatar guggero commented on June 2, 2024

Some module dependencies need to be fixed to make this work.
In the meantime you can do the following instead:

git clone https://github.com/btcsuite/btcwallet.git
cd btcwallet
make install

from btcwallet.

straumer avatar straumer commented on June 2, 2024

Hey @guggero. How would I use it in my code?

I added github.com/btcsuite/btcwallet/wallet as an import, did go mod tidy and the wallet module was successfully found in btcwallet. But then I try to build:

$ go build -o main ./main.go
# github.com/btcsuite/btcwallet/wallet
/home/user/go/pkg/mod/github.com/btcsuite/[email protected]/wallet/createtx.go:148:43: cannot use changeSource (type *txauthor.ChangeSource) as type txauthor.ChangeSource in argument to txauthor.NewUnsignedTransaction
/home/user/go/pkg/mod/github.com/btcsuite/[email protected]/wallet/createtx.go:330:16: undefined: txsizes.NestedP2WPKHPkScriptSize
/home/user/go/pkg/mod/github.com/btcsuite/[email protected]/wallet/createtx.go:358:42: invalid composite literal type txauthor.ChangeSource
/home/user/go/pkg/mod/github.com/btcsuite/[email protected]/wallet/psbt.go:198:44: cannot use changeSource (type *txauthor.ChangeSource) as type txauthor.ChangeSource in argument to txauthor.NewUnsignedTransaction

from btcwallet.

guggero avatar guggero commented on June 2, 2024

You need to add replace directives to your go.mod file to fix this:

replace github.com/btcsuite/btcwallet/wallet/txauthor => github.com/btcsuite/btcwallet/wallet/txauthor v1.0.1-0.20210329233242-e0607006dce6

replace github.com/btcsuite/btcwallet/wallet/txsizes => github.com/btcsuite/btcwallet/wallet/txsizes v1.0.1-0.20210519225359-6ab9b615576f

from btcwallet.

straumer avatar straumer commented on June 2, 2024

Thanks!

from btcwallet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.