goTezos: github.com/DefinitelyNotAGoat/goTezos/account Index | Files

package account

import "github.com/DefinitelyNotAGoat/goTezos/account"

Index

Package Files

account.go interfaces.go mocks.go

Constants

const MUTEZ = 1000000

type AccountService Uses

type AccountService struct {
    // contains filtered or unexported fields
}

AccountService is a struct wrapper for account functions

func NewAccountService Uses

func NewAccountService(tzclient tzc.TezosClient, blockService block.TezosBlockService, snapshotService snapshot.TezosSnapshotService) *AccountService

NewAccountService returns a new AccountService

func (*AccountService) CreateWallet Uses

func (s *AccountService) CreateWallet(mnenomic string, password string) (Wallet, error)

CreateWallet returns Wallet with the mnemonic and password provided

func (*AccountService) GetBalance Uses

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 Uses

func (s *AccountService) GetBalanceAtBlock(tezosAddr string, id interface{}) (float64, error)

GetBalanceAtBlock get the balance of an address at a specific hash

func (*AccountService) GetBalanceAtSnapshot Uses

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 Uses

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 Uses

func (s *AccountService) ImportWallet(address, public, secret string) (Wallet, error)

ImportWallet returns an imported Wallet

type FrozenBalance Uses

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 Uses

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)
}

type Wallet Uses

type Wallet struct {
    Address  string
    Mnemonic string
    Seed     []byte
    Kp       keyPair
    Sk       string
    Pk       string
}

Wallet needed for signing operations

Package account imports 12 packages (graph). Updated 2019-11-16. Refresh now. Tools for package owners.