Documentation ¶
Index ¶
- Constants
- type AccountService
- func (s *AccountService) CreateWallet(mnenomic string, password string) (Wallet, error)
- func (s *AccountService) GetBalance(tezosAddr string) (float64, error)
- func (s *AccountService) GetBalanceAtBlock(tezosAddr string, id interface{}) (float64, error)
- func (s *AccountService) GetBalanceAtSnapshot(tezosAddr string, cycle int) (float64, error)
- func (s *AccountService) ImportEncryptedWallet(pw, encKey string) (Wallet, error)
- func (s *AccountService) ImportWallet(address, public, secret string) (Wallet, error)
- type FrozenBalance
- type TezosAccountService
- type Wallet
Constants ¶
const MUTEZ = 1000000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountService ¶
type AccountService struct {
// contains filtered or unexported fields
}
AccountService is a struct wrapper for account functions
func NewAccountService ¶
func NewAccountService(tzclient tzc.TezosClient, blockService block.TezosBlockService, snapshotService snapshot.TezosSnapshotService) *AccountService
NewAccountService returns a new AccountService
func (*AccountService) CreateWallet ¶
func (s *AccountService) CreateWallet(mnenomic string, password string) (Wallet, error)
CreateWallet returns Wallet with the mnemonic and password provided
func (*AccountService) GetBalance ¶
func (s *AccountService) GetBalance(tezosAddr string) (float64, error)
GetBalance gets the balance of a public key hash at a specific snapshot for a cycle.
func (*AccountService) GetBalanceAtBlock ¶
func (s *AccountService) GetBalanceAtBlock(tezosAddr string, id interface{}) (float64, error)
GetBalanceAtBlock get the balance of an address at a specific hash
func (*AccountService) GetBalanceAtSnapshot ¶
func (s *AccountService) GetBalanceAtSnapshot(tezosAddr string, cycle int) (float64, error)
GetBalanceAtSnapshot gets the balance of a public key hash at a specific snapshot for a cycle.
func (*AccountService) ImportEncryptedWallet ¶
func (s *AccountService) ImportEncryptedWallet(pw, encKey string) (Wallet, error)
ImportEncryptedWallet imports an encrypted wallet using password provided by caller. Caller should remove any 'encrypted:' scheme prefix.
func (*AccountService) ImportWallet ¶
func (s *AccountService) ImportWallet(address, public, secret string) (Wallet, error)
ImportWallet returns an imported Wallet
type FrozenBalance ¶
type FrozenBalance struct { Deposits string `json:"deposits"` Fees string `json:"fees"` Rewards string `json:"rewards"` }
FrozenBalance is representation of frozen balance on the Tezos network
type TezosAccountService ¶
type TezosAccountService interface { GetBalanceAtSnapshot(tezosAddr string, cycle int) (float64, error) GetBalance(tezosAddr string) (float64, error) GetBalanceAtBlock(tezosAddr string, id interface{}) (float64, error) CreateWallet(mnenomic string, password string) (Wallet, error) ImportWallet(address, public, secret string) (Wallet, error) ImportEncryptedWallet(pw, encKey string) (Wallet, error) }