Documentation ¶
Overview ¶
Package turtlecoinwalletdrpcgo handles the the rpc connection between your app and turtle-service
Index ¶
- func EstimateFusion(threshold int, addresses []string, rpcPassword string) (fusionReadyCount int, totalOutputCount int, err error)
- func GetFeeInfo(rpcPassword string) (address string, fee float64, status string, err error)
- func GetMnemonicSeed(address string, rpcPassword string) (isDeterministicWallet bool, mnemonicSeed string, err error)
- func GetSpendKeys(address string, rpcPassword string) (spendSecretKey string, spendPublicKey string, err error)
- func GetViewKey(rpcPassword string) (privateViewKey string, err error)
- func RequestAddress(rpcPassword string) (address string, err error)
- func RequestBalance(rpcPassword string) (availableBalance float64, lockedBalance float64, totalBalance float64, ...)
- func RequestStatus(rpcPassword string) (walletBlockCount int, knownBlockCount int, localDaemonBlockCount int, ...)
- func SaveWallet(rpcPassword string) (err error)
- func SendFusionTransaction(threshold int, addresses []string, destinationAddress string, ...) (transactionHash string, err error)
- func SendTransaction(addressRecipient string, amount float64, paymentID string, fee float64, ...) (transactionHash string, err error)
- type Transfer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateFusion ¶
func EstimateFusion(threshold int, addresses []string, rpcPassword string) (fusionReadyCount int, totalOutputCount int, err error)
EstimateFusion counts the number of unspent outputs of the specified addresses and returns how many of those outputs can be optimized. This method is used to understand if a fusion transaction can be created. If fusionReadyCount returns a value = 0, then a fusion transaction cannot be created. threshold is the value that determines which outputs will be optimized. Only the outputs, lesser than the threshold value, will be included into a fusion transaction (threshold is expressed in TRTL, not 0.01 TRTL). fusionReadyCount is the number of outputs that can be optimized. totalOutputCount is the total number of unspent outputs of the specified addresses.
func GetFeeInfo ¶
GetFeeInfo returns info on the fee requested by the remote node for every transactions returned fee is expressed in TRTL, not in 0.01 TRTL
func GetMnemonicSeed ¶
func GetMnemonicSeed(address string, rpcPassword string) (isDeterministicWallet bool, mnemonicSeed string, err error)
GetMnemonicSeed provides the mnemonic seed.
func GetSpendKeys ¶
func GetSpendKeys(address string, rpcPassword string) (spendSecretKey string, spendPublicKey string, err error)
GetSpendKeys provides the private and public spend keys
func GetViewKey ¶
GetViewKey provides the private view key
func RequestAddress ¶
RequestAddress provides the address of the current wallet
func RequestBalance ¶
func RequestBalance(rpcPassword string) (availableBalance float64, lockedBalance float64, totalBalance float64, err error)
RequestBalance provides the available and locked balances of the current wallet returned balances are expressed in TRTL, not in 0.01 TRTL
func RequestStatus ¶
func RequestStatus(rpcPassword string) (walletBlockCount int, knownBlockCount int, localDaemonBlockCount int, peerCount int, err error)
RequestStatus requests turtle-service connection and sync status
func SaveWallet ¶
SaveWallet saves the sync info in the wallet
func SendFusionTransaction ¶
func SendFusionTransaction(threshold int, addresses []string, destinationAddress string, rpcPassword string) (transactionHash string, err error)
SendFusionTransaction allows you to send a fusion transaction, by taking funds from selected addresses and transferring them to the destination address. threshold is the value that determines which outputs will be optimized. Only the outputs, lesser than the threshold value, will be included into a fusion transaction (threshold is expressed in TRTL, not 0.01 TRTL). parameters amount and fee are expressed in TRTL, not 0.01 TRTL