Documentation
¶
Index ¶
- Variables
- func DeriveDefaultXpub(network Network, mnemonic string) (string, error)
- func LiftFromRustBuffer[GoType any](bufReader BufReader[GoType], rbuf RustBufferI) GoType
- func LowerIntoRustBuffer[GoType any](bufWriter BufWriter[GoType], value GoType) C.RustBuffer
- type Balance
- type BufLifter
- type BufLowerer
- type BufReader
- type BufWriter
- type ChainClient
- type ChainClientInterface
- type Error
- type ErrorGeneric
- type FfiConverterBalance
- type FfiConverterBool
- type FfiConverterChainClient
- type FfiConverterError
- type FfiConverterFloat64
- type FfiConverterInt64
- type FfiConverterNetwork
- type FfiConverterOptionalString
- type FfiConverterSequenceWalletTransaction
- func (c FfiConverterSequenceWalletTransaction) Lift(rb RustBufferI) []WalletTransaction
- func (c FfiConverterSequenceWalletTransaction) Lower(value []WalletTransaction) C.RustBuffer
- func (c FfiConverterSequenceWalletTransaction) Read(reader io.Reader) []WalletTransaction
- func (c FfiConverterSequenceWalletTransaction) Write(writer io.Writer, value []WalletTransaction)
- type FfiConverterSequenceWalletTransactionOutput
- func (c FfiConverterSequenceWalletTransactionOutput) Lift(rb RustBufferI) []WalletTransactionOutput
- func (c FfiConverterSequenceWalletTransactionOutput) Lower(value []WalletTransactionOutput) C.RustBuffer
- func (c FfiConverterSequenceWalletTransactionOutput) Read(reader io.Reader) []WalletTransactionOutput
- func (c FfiConverterSequenceWalletTransactionOutput) Write(writer io.Writer, value []WalletTransactionOutput)
- type FfiConverterString
- type FfiConverterUint32
- type FfiConverterUint64
- type FfiConverterWallet
- type FfiConverterWalletCredentials
- func (c FfiConverterWalletCredentials) Lift(rb RustBufferI) WalletCredentials
- func (c FfiConverterWalletCredentials) Lower(value WalletCredentials) C.RustBuffer
- func (c FfiConverterWalletCredentials) Read(reader io.Reader) WalletCredentials
- func (c FfiConverterWalletCredentials) Write(writer io.Writer, value WalletCredentials)
- type FfiConverterWalletSendResult
- func (c FfiConverterWalletSendResult) Lift(rb RustBufferI) WalletSendResult
- func (c FfiConverterWalletSendResult) Lower(value WalletSendResult) C.RustBuffer
- func (c FfiConverterWalletSendResult) Read(reader io.Reader) WalletSendResult
- func (c FfiConverterWalletSendResult) Write(writer io.Writer, value WalletSendResult)
- type FfiConverterWalletTransaction
- func (c FfiConverterWalletTransaction) Lift(rb RustBufferI) WalletTransaction
- func (c FfiConverterWalletTransaction) Lower(value WalletTransaction) C.RustBuffer
- func (c FfiConverterWalletTransaction) Read(reader io.Reader) WalletTransaction
- func (c FfiConverterWalletTransaction) Write(writer io.Writer, value WalletTransaction)
- type FfiConverterWalletTransactionOutput
- func (c FfiConverterWalletTransactionOutput) Lift(rb RustBufferI) WalletTransactionOutput
- func (c FfiConverterWalletTransactionOutput) Lower(value WalletTransactionOutput) C.RustBuffer
- func (c FfiConverterWalletTransactionOutput) Read(reader io.Reader) WalletTransactionOutput
- func (c FfiConverterWalletTransactionOutput) Write(writer io.Writer, value WalletTransactionOutput)
- type FfiDestroyerBalance
- type FfiDestroyerBool
- type FfiDestroyerChainClient
- type FfiDestroyerError
- type FfiDestroyerFloat64
- type FfiDestroyerInt64
- type FfiDestroyerNetwork
- type FfiDestroyerOptionalString
- type FfiDestroyerSequenceWalletTransaction
- type FfiDestroyerSequenceWalletTransactionOutput
- type FfiDestroyerString
- type FfiDestroyerUint32
- type FfiDestroyerUint64
- type FfiDestroyerWallet
- type FfiDestroyerWalletCredentials
- type FfiDestroyerWalletSendResult
- type FfiDestroyerWalletTransaction
- type FfiDestroyerWalletTransactionOutput
- type FfiObject
- type GoRustBuffer
- type NativeError
- type Network
- type RustBufferI
- type Wallet
- func (_self *Wallet) ApplyTransaction(txHex string) error
- func (_self *Wallet) Balance() (Balance, error)
- func (_self *Wallet) BumpTransactionFee(txId string, satPerVbyte float64) (string, error)
- func (object *Wallet) Destroy()
- func (_self *Wallet) FullScan(chainClient *ChainClient) error
- func (_self *Wallet) GetTransactions(limit uint64, offset uint64) ([]WalletTransaction, error)
- func (_self *Wallet) NewAddress() (string, error)
- func (_self *Wallet) SendToAddress(address string, amount uint64, satPerVbyte float64, sendAll bool) (WalletSendResult, error)
- func (_self *Wallet) Sync(chainClient *ChainClient) error
- type WalletCredentials
- type WalletInterface
- type WalletSendResult
- type WalletTransaction
- type WalletTransactionOutput
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrErrorGeneric = fmt.Errorf("ErrorGeneric")
Err* are used for checking error type with `errors.Is`
View Source
var FfiConverterBalanceINSTANCE = FfiConverterBalance{}
View Source
var FfiConverterBoolINSTANCE = FfiConverterBool{}
View Source
var FfiConverterChainClientINSTANCE = FfiConverterChainClient{}
View Source
var FfiConverterErrorINSTANCE = FfiConverterError{}
View Source
var FfiConverterFloat64INSTANCE = FfiConverterFloat64{}
View Source
var FfiConverterInt64INSTANCE = FfiConverterInt64{}
View Source
var FfiConverterNetworkINSTANCE = FfiConverterNetwork{}
View Source
var FfiConverterOptionalStringINSTANCE = FfiConverterOptionalString{}
View Source
var FfiConverterSequenceWalletTransactionINSTANCE = FfiConverterSequenceWalletTransaction{}
View Source
var FfiConverterSequenceWalletTransactionOutputINSTANCE = FfiConverterSequenceWalletTransactionOutput{}
View Source
var FfiConverterStringINSTANCE = FfiConverterString{}
View Source
var FfiConverterUint32INSTANCE = FfiConverterUint32{}
View Source
var FfiConverterUint64INSTANCE = FfiConverterUint64{}
View Source
var FfiConverterWalletCredentialsINSTANCE = FfiConverterWalletCredentials{}
View Source
var FfiConverterWalletINSTANCE = FfiConverterWallet{}
View Source
var FfiConverterWalletSendResultINSTANCE = FfiConverterWalletSendResult{}
View Source
var FfiConverterWalletTransactionINSTANCE = FfiConverterWalletTransaction{}
View Source
var FfiConverterWalletTransactionOutputINSTANCE = FfiConverterWalletTransactionOutput{}
Functions ¶
func LiftFromRustBuffer ¶
func LiftFromRustBuffer[GoType any](bufReader BufReader[GoType], rbuf RustBufferI) GoType
func LowerIntoRustBuffer ¶
func LowerIntoRustBuffer[GoType any](bufWriter BufWriter[GoType], value GoType) C.RustBuffer
Types ¶
type BufLifter ¶
type BufLifter[GoType any] interface { Lift(value RustBufferI) GoType }
type BufLowerer ¶
type BufLowerer[GoType any] interface { Lower(value GoType) C.RustBuffer }
type ChainClient ¶
type ChainClient struct {
// contains filtered or unexported fields
}
func NewChainClient ¶
func NewChainClient(electrumUrl string) (*ChainClient, error)
func (*ChainClient) Destroy ¶
func (object *ChainClient) Destroy()
type ChainClientInterface ¶
type ChainClientInterface interface {
}
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func NewErrorGeneric ¶
type ErrorGeneric ¶
type ErrorGeneric struct {
Field0 string
}
Variant structs
func (ErrorGeneric) Error ¶
func (err ErrorGeneric) Error() string
func (ErrorGeneric) Is ¶
func (self ErrorGeneric) Is(target error) bool
type FfiConverterBalance ¶
type FfiConverterBalance struct{}
func (FfiConverterBalance) Lift ¶
func (c FfiConverterBalance) Lift(rb RustBufferI) Balance
func (FfiConverterBalance) Lower ¶
func (c FfiConverterBalance) Lower(value Balance) C.RustBuffer
type FfiConverterBool ¶
type FfiConverterBool struct{}
type FfiConverterChainClient ¶
type FfiConverterChainClient struct{}
func (FfiConverterChainClient) Lift ¶
func (c FfiConverterChainClient) Lift(pointer unsafe.Pointer) *ChainClient
func (FfiConverterChainClient) Lower ¶
func (c FfiConverterChainClient) Lower(value *ChainClient) unsafe.Pointer
func (FfiConverterChainClient) Read ¶
func (c FfiConverterChainClient) Read(reader io.Reader) *ChainClient
func (FfiConverterChainClient) Write ¶
func (c FfiConverterChainClient) Write(writer io.Writer, value *ChainClient)
type FfiConverterError ¶
type FfiConverterError struct{}
func (FfiConverterError) Lift ¶
func (c FfiConverterError) Lift(eb RustBufferI) *Error
func (FfiConverterError) Lower ¶
func (c FfiConverterError) Lower(value *Error) C.RustBuffer
type FfiConverterFloat64 ¶
type FfiConverterFloat64 struct{}
type FfiConverterInt64 ¶
type FfiConverterInt64 struct{}
type FfiConverterNetwork ¶
type FfiConverterNetwork struct{}
func (FfiConverterNetwork) Lift ¶
func (c FfiConverterNetwork) Lift(rb RustBufferI) Network
func (FfiConverterNetwork) Lower ¶
func (c FfiConverterNetwork) Lower(value Network) C.RustBuffer
type FfiConverterOptionalString ¶
type FfiConverterOptionalString struct{}
func (FfiConverterOptionalString) Lift ¶
func (c FfiConverterOptionalString) Lift(rb RustBufferI) *string
func (FfiConverterOptionalString) Lower ¶
func (c FfiConverterOptionalString) Lower(value *string) C.RustBuffer
type FfiConverterSequenceWalletTransaction ¶
type FfiConverterSequenceWalletTransaction struct{}
func (FfiConverterSequenceWalletTransaction) Lift ¶
func (c FfiConverterSequenceWalletTransaction) Lift(rb RustBufferI) []WalletTransaction
func (FfiConverterSequenceWalletTransaction) Lower ¶
func (c FfiConverterSequenceWalletTransaction) Lower(value []WalletTransaction) C.RustBuffer
func (FfiConverterSequenceWalletTransaction) Read ¶
func (c FfiConverterSequenceWalletTransaction) Read(reader io.Reader) []WalletTransaction
func (FfiConverterSequenceWalletTransaction) Write ¶
func (c FfiConverterSequenceWalletTransaction) Write(writer io.Writer, value []WalletTransaction)
type FfiConverterSequenceWalletTransactionOutput ¶
type FfiConverterSequenceWalletTransactionOutput struct{}
func (FfiConverterSequenceWalletTransactionOutput) Lift ¶
func (c FfiConverterSequenceWalletTransactionOutput) Lift(rb RustBufferI) []WalletTransactionOutput
func (FfiConverterSequenceWalletTransactionOutput) Lower ¶
func (c FfiConverterSequenceWalletTransactionOutput) Lower(value []WalletTransactionOutput) C.RustBuffer
func (FfiConverterSequenceWalletTransactionOutput) Read ¶
func (c FfiConverterSequenceWalletTransactionOutput) Read(reader io.Reader) []WalletTransactionOutput
func (FfiConverterSequenceWalletTransactionOutput) Write ¶
func (c FfiConverterSequenceWalletTransactionOutput) Write(writer io.Writer, value []WalletTransactionOutput)
type FfiConverterString ¶
type FfiConverterString struct{}
func (FfiConverterString) Lift ¶
func (FfiConverterString) Lift(rb RustBufferI) string
func (FfiConverterString) Lower ¶
func (FfiConverterString) Lower(value string) C.RustBuffer
type FfiConverterUint32 ¶
type FfiConverterUint32 struct{}
type FfiConverterUint64 ¶
type FfiConverterUint64 struct{}
type FfiConverterWallet ¶
type FfiConverterWallet struct{}
type FfiConverterWalletCredentials ¶
type FfiConverterWalletCredentials struct{}
func (FfiConverterWalletCredentials) Lift ¶
func (c FfiConverterWalletCredentials) Lift(rb RustBufferI) WalletCredentials
func (FfiConverterWalletCredentials) Lower ¶
func (c FfiConverterWalletCredentials) Lower(value WalletCredentials) C.RustBuffer
func (FfiConverterWalletCredentials) Read ¶
func (c FfiConverterWalletCredentials) Read(reader io.Reader) WalletCredentials
func (FfiConverterWalletCredentials) Write ¶
func (c FfiConverterWalletCredentials) Write(writer io.Writer, value WalletCredentials)
type FfiConverterWalletSendResult ¶
type FfiConverterWalletSendResult struct{}
func (FfiConverterWalletSendResult) Lift ¶
func (c FfiConverterWalletSendResult) Lift(rb RustBufferI) WalletSendResult
func (FfiConverterWalletSendResult) Lower ¶
func (c FfiConverterWalletSendResult) Lower(value WalletSendResult) C.RustBuffer
func (FfiConverterWalletSendResult) Read ¶
func (c FfiConverterWalletSendResult) Read(reader io.Reader) WalletSendResult
func (FfiConverterWalletSendResult) Write ¶
func (c FfiConverterWalletSendResult) Write(writer io.Writer, value WalletSendResult)
type FfiConverterWalletTransaction ¶
type FfiConverterWalletTransaction struct{}
func (FfiConverterWalletTransaction) Lift ¶
func (c FfiConverterWalletTransaction) Lift(rb RustBufferI) WalletTransaction
func (FfiConverterWalletTransaction) Lower ¶
func (c FfiConverterWalletTransaction) Lower(value WalletTransaction) C.RustBuffer
func (FfiConverterWalletTransaction) Read ¶
func (c FfiConverterWalletTransaction) Read(reader io.Reader) WalletTransaction
func (FfiConverterWalletTransaction) Write ¶
func (c FfiConverterWalletTransaction) Write(writer io.Writer, value WalletTransaction)
type FfiConverterWalletTransactionOutput ¶
type FfiConverterWalletTransactionOutput struct{}
func (FfiConverterWalletTransactionOutput) Lift ¶
func (c FfiConverterWalletTransactionOutput) Lift(rb RustBufferI) WalletTransactionOutput
func (FfiConverterWalletTransactionOutput) Lower ¶
func (c FfiConverterWalletTransactionOutput) Lower(value WalletTransactionOutput) C.RustBuffer
func (FfiConverterWalletTransactionOutput) Read ¶
func (c FfiConverterWalletTransactionOutput) Read(reader io.Reader) WalletTransactionOutput
func (FfiConverterWalletTransactionOutput) Write ¶
func (c FfiConverterWalletTransactionOutput) Write(writer io.Writer, value WalletTransactionOutput)
type FfiDestroyerBalance ¶
type FfiDestroyerBalance struct{}
func (FfiDestroyerBalance) Destroy ¶
func (_ FfiDestroyerBalance) Destroy(value Balance)
type FfiDestroyerBool ¶
type FfiDestroyerBool struct{}
func (FfiDestroyerBool) Destroy ¶
func (FfiDestroyerBool) Destroy(_ bool)
type FfiDestroyerChainClient ¶
type FfiDestroyerChainClient struct{}
func (FfiDestroyerChainClient) Destroy ¶
func (_ FfiDestroyerChainClient) Destroy(value *ChainClient)
type FfiDestroyerError ¶
type FfiDestroyerError struct{}
func (FfiDestroyerError) Destroy ¶
func (_ FfiDestroyerError) Destroy(value *Error)
type FfiDestroyerFloat64 ¶
type FfiDestroyerFloat64 struct{}
func (FfiDestroyerFloat64) Destroy ¶
func (FfiDestroyerFloat64) Destroy(_ float64)
type FfiDestroyerInt64 ¶
type FfiDestroyerInt64 struct{}
func (FfiDestroyerInt64) Destroy ¶
func (FfiDestroyerInt64) Destroy(_ int64)
type FfiDestroyerNetwork ¶
type FfiDestroyerNetwork struct{}
func (FfiDestroyerNetwork) Destroy ¶
func (_ FfiDestroyerNetwork) Destroy(value Network)
type FfiDestroyerOptionalString ¶
type FfiDestroyerOptionalString struct{}
func (FfiDestroyerOptionalString) Destroy ¶
func (_ FfiDestroyerOptionalString) Destroy(value *string)
type FfiDestroyerSequenceWalletTransaction ¶
type FfiDestroyerSequenceWalletTransaction struct{}
func (FfiDestroyerSequenceWalletTransaction) Destroy ¶
func (FfiDestroyerSequenceWalletTransaction) Destroy(sequence []WalletTransaction)
type FfiDestroyerSequenceWalletTransactionOutput ¶
type FfiDestroyerSequenceWalletTransactionOutput struct{}
func (FfiDestroyerSequenceWalletTransactionOutput) Destroy ¶
func (FfiDestroyerSequenceWalletTransactionOutput) Destroy(sequence []WalletTransactionOutput)
type FfiDestroyerString ¶
type FfiDestroyerString struct{}
func (FfiDestroyerString) Destroy ¶
func (FfiDestroyerString) Destroy(_ string)
type FfiDestroyerUint32 ¶
type FfiDestroyerUint32 struct{}
func (FfiDestroyerUint32) Destroy ¶
func (FfiDestroyerUint32) Destroy(_ uint32)
type FfiDestroyerUint64 ¶
type FfiDestroyerUint64 struct{}
func (FfiDestroyerUint64) Destroy ¶
func (FfiDestroyerUint64) Destroy(_ uint64)
type FfiDestroyerWallet ¶
type FfiDestroyerWallet struct{}
func (FfiDestroyerWallet) Destroy ¶
func (_ FfiDestroyerWallet) Destroy(value *Wallet)
type FfiDestroyerWalletCredentials ¶
type FfiDestroyerWalletCredentials struct{}
func (FfiDestroyerWalletCredentials) Destroy ¶
func (_ FfiDestroyerWalletCredentials) Destroy(value WalletCredentials)
type FfiDestroyerWalletSendResult ¶
type FfiDestroyerWalletSendResult struct{}
func (FfiDestroyerWalletSendResult) Destroy ¶
func (_ FfiDestroyerWalletSendResult) Destroy(value WalletSendResult)
type FfiDestroyerWalletTransaction ¶
type FfiDestroyerWalletTransaction struct{}
func (FfiDestroyerWalletTransaction) Destroy ¶
func (_ FfiDestroyerWalletTransaction) Destroy(value WalletTransaction)
type FfiDestroyerWalletTransactionOutput ¶
type FfiDestroyerWalletTransactionOutput struct{}
func (FfiDestroyerWalletTransactionOutput) Destroy ¶
func (_ FfiDestroyerWalletTransactionOutput) Destroy(value WalletTransactionOutput)
type GoRustBuffer ¶
type GoRustBuffer struct {
// contains filtered or unexported fields
}
This is needed, because as of go 1.24 type RustBuffer C.RustBuffer cannot have methods, RustBuffer is treated as non-local type
func RustBufferFromExternal ¶
func RustBufferFromExternal(b RustBufferI) GoRustBuffer
func (GoRustBuffer) AsReader ¶
func (cb GoRustBuffer) AsReader() *bytes.Reader
func (GoRustBuffer) Capacity ¶
func (cb GoRustBuffer) Capacity() uint64
func (GoRustBuffer) Data ¶
func (cb GoRustBuffer) Data() unsafe.Pointer
func (GoRustBuffer) Free ¶
func (cb GoRustBuffer) Free()
func (GoRustBuffer) Len ¶
func (cb GoRustBuffer) Len() uint64
func (GoRustBuffer) ToGoBytes ¶
func (cb GoRustBuffer) ToGoBytes() []byte
type NativeError ¶
type NativeError interface {
AsError() error
}
type RustBufferI ¶
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
func NewWallet ¶
func NewWallet(credentials WalletCredentials, dbPath string, network Network) (*Wallet, error)
func (*Wallet) ApplyTransaction ¶
func (*Wallet) BumpTransactionFee ¶
func (*Wallet) FullScan ¶
func (_self *Wallet) FullScan(chainClient *ChainClient) error
func (*Wallet) GetTransactions ¶
func (_self *Wallet) GetTransactions(limit uint64, offset uint64) ([]WalletTransaction, error)
func (*Wallet) NewAddress ¶
func (*Wallet) SendToAddress ¶
func (*Wallet) Sync ¶
func (_self *Wallet) Sync(chainClient *ChainClient) error
type WalletCredentials ¶
func (*WalletCredentials) Destroy ¶
func (r *WalletCredentials) Destroy()
type WalletInterface ¶
type WalletInterface interface {
ApplyTransaction(txHex string) error
Balance() (Balance, error)
BumpTransactionFee(txId string, satPerVbyte float64) (string, error)
FullScan(chainClient *ChainClient) error
GetTransactions(limit uint64, offset uint64) ([]WalletTransaction, error)
NewAddress() (string, error)
SendToAddress(address string, amount uint64, satPerVbyte float64, sendAll bool) (WalletSendResult, error)
Sync(chainClient *ChainClient) error
}
type WalletSendResult ¶
func (*WalletSendResult) Destroy ¶
func (r *WalletSendResult) Destroy()
type WalletTransaction ¶
type WalletTransaction struct {
Id string
Timestamp uint64
Outputs []WalletTransactionOutput
BlockHeight uint32
BalanceChange int64
IsConsolidation bool
}
func (*WalletTransaction) Destroy ¶
func (r *WalletTransaction) Destroy()
type WalletTransactionOutput ¶
func (*WalletTransactionOutput) Destroy ¶
func (r *WalletTransactionOutput) Destroy()
Click to show internal directories.
Click to hide internal directories.