account

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

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

Account structure

func AccountFromBytes

func AccountFromBytes(bs []byte) (*Account, error)

func AccountFromJSON

func AccountFromJSON(bs []byte) (*Account, error)

func NewAccount

func NewAccount(addr crypto.Address) (*Account, error)

/---- Constructors

func NewAccountFromSecret

func NewAccountFromSecret(secret string) *Account

/ For tests

func NewContractAccount

func NewContractAccount(addr crypto.Address) (*Account, error)

func (*Account) AddToBalance

func (acc *Account) AddToBalance(amt uint64) error

func (Account) Address

func (acc Account) Address() crypto.Address

func (Account) Balance

func (acc Account) Balance() uint64

func (Account) Code

func (acc Account) Code() []byte

func (*Account) Decode

func (acc *Account) Decode(bs []byte) error

func (*Account) Encode

func (acc *Account) Encode() ([]byte, error)

func (Account) HasPermissions

func (acc Account) HasPermissions(perm Permissions) bool

func (*Account) IncSequence

func (acc *Account) IncSequence()

func (*Account) Marshal added in v0.3.0

func (acc *Account) Marshal() ([]byte, error)

func (*Account) MarshalJSON

func (acc *Account) MarshalJSON() ([]byte, error)

func (*Account) MarshalTo added in v0.3.0

func (acc *Account) MarshalTo(data []byte) (int, error)

func (Account) Permissions

func (acc Account) Permissions() Permissions

func (Account) Sequence

func (acc Account) Sequence() uint64

func (*Account) SetBalance

func (acc *Account) SetBalance(bal uint64) error

func (*Account) SetCode

func (acc *Account) SetCode(code []byte) error

func (*Account) SetPermissions

func (acc *Account) SetPermissions(perm Permissions) error

func (*Account) SetSequence

func (acc *Account) SetSequence(seq uint64)

func (*Account) Size added in v0.3.0

func (acc *Account) Size() int

func (Account) String

func (acc Account) String() string

func (*Account) SubtractFromBalance

func (acc *Account) SubtractFromBalance(amt uint64) error

func (*Account) Unmarshal added in v0.3.0

func (acc *Account) Unmarshal(bs []byte) error

func (*Account) UnmarshalJSON

func (acc *Account) UnmarshalJSON(bs []byte) error

func (*Account) UnsetPermissions

func (acc *Account) UnsetPermissions(perm Permissions) error

type Permissions

type Permissions uint64

func (Permissions) IsSet

func (p Permissions) IsSet(r Permissions) bool

func (Permissions) MarshalText

func (p Permissions) MarshalText() ([]byte, error)

func (*Permissions) Set

func (p *Permissions) Set(r Permissions)

func (Permissions) String

func (p Permissions) String() string

func (*Permissions) UnmarshalText

func (p *Permissions) UnmarshalText(text []byte) error

func (*Permissions) Unset

func (p *Permissions) Unset(r Permissions)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL