Documentation
¶
Overview ¶
* This is a very basic extension to provide accounts. It provides signature verification, * but lacks true nonce support. See the handler in handlers.go
Index ¶
- Variables
- func GenerateJSONAccounts(num int) ([]byte, error)
- func LoadAccounts(ctx sdk.Context, accts []Account) error
- func SetAccount(ctx sdk.Context, acct Account) error
- func VerifyAccount(ctx sdk.Context) sdk.Result
- type Account
- func (*Account) Descriptor() ([]byte, []int)
- func (m *Account) GetNonce() uint64
- func (m *Account) GetPubkey() []byte
- func (*Account) ProtoMessage()
- func (m *Account) Reset()
- func (m *Account) String() string
- func (m *Account) XXX_DiscardUnknown()
- func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Account) XXX_Merge(src proto.Message)
- func (m *Account) XXX_Size() int
- func (m *Account) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AccountNotFound = sdk.ResultError(2, "Account not found") BadSignature = sdk.ResultError(3, "Bad signature") FailedToSave = sdk.ResultError(5, "Failed to save account") BadAccountPubKey = sdk.ResultError(6, "Bad account public key") PubKeyNoMatch = sdk.ResultError(7, "Publickey address does not match the sender address") )
Functions ¶
func GenerateJSONAccounts ¶
GenerateJSONAccounts will create a json list of private keys
func LoadAccounts ¶
LoadAccounts can used in initChain to bulk load genesis accounts from a json file
func SetAccount ¶
SetAccount in the state store
Types ¶
type Account ¶
type Account struct {
Pubkey []byte `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
Nonce uint64 `protobuf:"varint,3,opt,name=nonce" json:"nonce,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
Basic account state store model
func GetAccount ¶
GetAccount from state storage based on the account address
func LoadJSONAccounts ¶
LoadJSONAccounts loads a json list from above into []Account
func (*Account) Descriptor ¶
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) XXX_DiscardUnknown ¶
func (m *Account) XXX_DiscardUnknown()
func (*Account) XXX_Marshal ¶
func (*Account) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.