Documentation ¶
Index ¶
- func CreateNewLocalAccount(candidate *Creation) error
- func ExportKeystore(address, path, passphrase string) (string, error)
- func ExportPrivateKey(address, passphrase string) error
- func ImportFromPrivateKey(privateKey, name, passphrase string) (string, error)
- func ImportKeyStore(keyPath, name, passphrase string) (string, error)
- func IsValidPassphrase(pass string) bool
- func New() string
- func RemoveAccount(name string) error
- type Account
- type Creation
- type FrozenResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNewLocalAccount ¶
CreateNewLocalAccount assumes all the inputs are valid, legitmate
func ExportKeystore ¶
ExportKeystore to file
func ExportPrivateKey ¶
ExportPrivateKey from account
func ImportFromPrivateKey ¶
ImportFromPrivateKey allows import of an ECDSA private key
func ImportKeyStore ¶
ImportKeyStore imports a keystore along with a password
func RemoveAccount ¶
RemoveAccount - removes an account from the keystore
Types ¶
type Account ¶
type Account struct { Address string `json:"address"` Type string `json:"type"` Name string `json:"name"` ID string `json:"id"` Balance int64 `json:"balance"` Allowance int64 `json:"allowance"` LastWithdraw int64 `json:"lastWithdraw"` IsWitness bool `json:"isWitness"` IsElected bool `json:"isElected"` Assets map[string]int64 `json:"assetList"` TronPower int64 `json:"tronPower"` TronPowerUsed int64 `json:"tronPowerUsed"` FrozenBalance int64 `json:"frozenBalance"` FrozenResources []FrozenResource `json:"frozenList"` Votes map[string]int64 `json:"voteList"` BWTotal int64 `json:"bandwidthTotal"` BWUsed int64 `json:"bandwidthUsed"` EnergyTotal int64 `json:"energyTotal"` EnergyUsed int64 `json:"energyUsed"` }
Account detailed view
type Creation ¶
type Creation struct { Name string Passphrase string Mnemonic string MnemonicPassphrase string HdAccountNumber *uint32 HdIndexNumber *uint32 }
Creation struct for account
type FrozenResource ¶
type FrozenResource struct { Type core.ResourceCode Amount int64 DelegateTo string Expire int64 }
FrozenResource by account
Click to show internal directories.
Click to hide internal directories.