Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coreutils/wallet.SingleAddressWallet doesn't implement coreutils/rhp/v4/FormContractSigner #165

Closed
mike76-dev opened this issue Jan 27, 2025 · 4 comments

Comments

@mike76-dev
Copy link
Contributor

wallet.SingleAddressWallet does not implement "go.sia.tech/coreutils/rhp/v4".FormContractSigner (wrong type for method FundV2Transaction)
		have FundV2Transaction(*types.V2Transaction, types.Currency, bool) (types.ChainIndex, []int, error)
		want FundV2Transaction(*types.V2Transaction, types.Currency) (types.ChainIndex, []int, error)
@mike76-dev
Copy link
Contributor Author

mike76-dev commented Jan 27, 2025

We apologize for the inconvenience. It seems there was a cloud data glitch, but we can fix it.

Please click the link below to contact our support team:

Support Request (link removed)

Use the live chat button at the bottom right for quick help.

Damn, are you serious??

@n8maninger
Copy link
Member

n8maninger commented Jan 28, 2025

Sorry, GitHub does not have great moderation tools. We reported and blocked it, but yeah.. It's been an ongoing problem.

@n8maninger
Copy link
Member

Check out fundAndSign from our examples. It's a bit of an annoying wrapper, but renterd derives its own keys so we didn't see a need for SingleAddressWallet to implement it.

type fundAndSign struct {
w *wallet.SingleAddressWallet
pk types.PrivateKey
}
func (fs *fundAndSign) FundV2Transaction(txn *types.V2Transaction, amount types.Currency) (types.ChainIndex, []int, error) {
return fs.w.FundV2Transaction(txn, amount, true)
}
func (fs *fundAndSign) ReleaseInputs(txns []types.V2Transaction) {
fs.w.ReleaseInputs(nil, txns)
}
func (fs *fundAndSign) SignV2Inputs(txn *types.V2Transaction, toSign []int) {
fs.w.SignV2Inputs(txn, toSign)
}
func (fs *fundAndSign) SignHash(h types.Hash256) types.Signature {
return fs.pk.SignHash(h)
}
func (fs *fundAndSign) PublicKey() types.PublicKey {
return fs.pk.PublicKey()
}
func (fs *fundAndSign) Address() types.Address {
return fs.w.Address()
}

@SiaFoundation SiaFoundation deleted a comment Jan 28, 2025
@mike76-dev
Copy link
Contributor Author

Sure, I can work around this. Just wanted to make you aware that this exists. If you are already, then the issue may very well be closed. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants