Versions in this module Expand all Collapse all v0 v0.2.97 Oct 15, 2022 Changes in this version + var AlreadyExistsError = errors.New("wallet already exists") + var AlreadyLoadedError = errors.New("wallet is already loaded") + var NotEnoughBalanceError = errors.New("Not enough balance on utxos") + type ElementsRpcWallet struct + func NewRpcWallet(rpcClient *gelements.Elements, walletName string) (*ElementsRpcWallet, error) + func (r *ElementsRpcWallet) CreateFundedTransaction(preparedTx *transaction.Transaction) (rawTx string, fee uint64, err error) + func (r *ElementsRpcWallet) FinalizeFundedTransaction(rawTx string) (txId string, err error) + func (r *ElementsRpcWallet) FinalizeTransaction(rawTx string) (string, error) + func (r *ElementsRpcWallet) GetAddress() (string, error) + func (r *ElementsRpcWallet) GetBalance() (uint64, error) + func (r *ElementsRpcWallet) SendToAddress(address string, amount uint64) (string, error) + type RpcClient interface + BlindRawTransaction func(txHex string) (string, error) + CreateWallet func(walletname string) (string, error) + FundRawTx func(txHex string) (*gelements.FundRawResult, error) + GetBalance func() (uint64, error) + GetNewAddress func(addrType int) (string, error) + ListWallets func() ([]string, error) + LoadWallet func(filename string, loadonstartup bool) (string, error) + SendRawTx func(txHex string) (string, error) + SendToAddress func(address string, amount string) (string, error) + SetRpcWallet func(walletname string) + SignRawTransactionWithWallet func(txHex string) (gelements.SignRawTransactionWithWalletRes, error) + type Wallet interface + CreateFundedTransaction func(preparedTx *transaction.Transaction) (rawTx string, fee uint64, err error) + FinalizeFundedTransaction func(unpreparedTx string) (preparedTxHex string, err error) + GetAddress func() (string, error) + GetBalance func() (uint64, error) + SendToAddress func(string, uint64) (string, error)