Documentation ¶
Index ¶
- Variables
- func DBExists() bool
- func Exit()
- func GenerateRandomSEED(n int) (string, error)
- func Handle(conf *Conf, w http.ResponseWriter, r *http.Request)
- func HasValidNonce(t *gadk.Transaction, mwm int) bool
- func InitializeWallet() error
- func ListAndSelectAccount(conf *Conf)
- func PowTrytes(api apis, depth int64, trytes []gadk.Transaction, mwm int64, pow gadk.PowFunc) error
- func PrepareTransfers(api apis, ac *Account, trs []gadk.Transfer) (gadk.Bundle, error)
- func Recast(wallet string) error
- func RefreshAccount(conf *Conf)
- func ResetDB(conf *Conf)
- func RestoreAddressesFromSeed(conf *Conf, seed gadk.Trytes) error
- func ScanAndRestoreAddresses(conf *Conf, seed gadk.Trytes) error
- func Send(conf *Conf, ac *Account, mwm int64, trs []gadk.Transfer) (gadk.Trytes, error)
- func SetLog(verbose bool)
- func SetupNewAddresses(conf *Conf, seed gadk.Trytes) error
- func ShowSeed() error
- func UpdateConfirmationState(conf *Conf) error
- func UpdateTXs(conf *Conf) error
- func Walletnotify(conf *Conf) ([]string, error)
- type Account
- type Balance
- type Conf
- type Err
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
var PowInfo string
Functions ¶
func GenerateRandomSEED ¶
func Handle ¶
func Handle(conf *Conf, w http.ResponseWriter, r *http.Request)
Handle handles api calls.
func HasValidNonce ¶
func HasValidNonce(t *gadk.Transaction, mwm int) bool
HasValidNonce checks t's hash has valid MinWeightMagnitude.
func InitializeWallet ¶
func InitializeWallet() error
func ListAndSelectAccount ¶
func ListAndSelectAccount(conf *Conf)
func PrepareTransfers ¶
PrepareTransfers gets an array of transfer objects as input, and then prepare the transfer by generating the correct bundle, as well as choosing and signing the inputs if necessary (if it's a value transfer).
func Recast ¶
Recast assembles unsent txs from public wallets servers and recast them to all wallets servers.
func RefreshAccount ¶
func RefreshAccount(conf *Conf)
RefreshAccount refresh all hashes and accounts from address in address.
func ResetDB ¶
func ResetDB(conf *Conf)
ResetDB reset hashes and balances (basically remove all the hashes and set balances to 0)
func Send ¶
Send sends token. if you need to pow locally, you must specifiy pow func. otherwirse this calls AttachToMesh API.
func UpdateConfirmationState ¶
func Walletnotify ¶
Walletnotify exec walletnotify scripts when receivng tx and tx is confirmed.
Types ¶
type Conf ¶
type Conf struct { RPCUser string RPCPassword string RPCPort string Notify string Node string Testnet bool PassPhrase bool Tag string V2 bool // contains filtered or unexported fields }
Conf is configuration for aidosd.