model

package
v0.0.0-...-68ae804 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: Apache-2.0 Imports: 7 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 {
	AddressStr    string `json:"address"` // Ethereum account address derived from the private key
	PrivateKeyStr string `json:"private_key"`
	PublicKeyStr  string `json:"public_key"` // Ethereum public key derived from the private key
}

Account is an Ethereum account

func NewAccount

func NewAccount(addressStr string, privateKeyStr string, publicKeyStr string) *Account

NewAccount returns Account

func (*Account) GetPrivateKeyECDSA

func (a *Account) GetPrivateKeyECDSA() (*ecdsa.PrivateKey, error)

GetPrivateKeyECDSA key for signing data

func (*Account) GetPrivateKeyECIES

func (a *Account) GetPrivateKeyECIES() (*ecies.PrivateKey, error)

GetPrivateKeyECIES key for encrypting data

func (*Account) GetPublicKeyECDSA

func (a *Account) GetPublicKeyECDSA() (*ecdsa.PublicKey, error)

GetPublicKeyECDSA key for validating signature

func (*Account) GetPublicKeyECIES

func (a *Account) GetPublicKeyECIES() (*ecies.PublicKey, error)

GetPublicKeyECIES key for decrypting data

type FieldDataWrapper

type FieldDataWrapper struct {
	*framework.FieldData
}

FieldDataWrapper used to processing data from framework.FieldData

func NewFieldDataWrapper

func NewFieldDataWrapper(data *framework.FieldData) *FieldDataWrapper

NewFieldDataWrapper returns FieldDataWrapper

func (*FieldDataWrapper) GetBigInt

func (f *FieldDataWrapper) GetBigInt(key string, defaultValue *big.Int) *big.Int

GetBigInt get big.Int value from framework.FieldData with specific key, returns defaultValue when the key doesn't exist or the value of the key is not type of big.Int.

func (*FieldDataWrapper) GetBool

func (f *FieldDataWrapper) GetBool(key string, defaultValue bool) bool

GetBool get bool value from framework.FieldData with specific key, returns defaultValue when the key doesn't exist or the value of the key is not type of bool.

func (*FieldDataWrapper) GetString

func (f *FieldDataWrapper) GetString(key string, defaultValue string) string

GetString get string value from framework.FieldData with specific key, returns defaultValue when the key doesn't exist or the value of the key is not type of string.

func (*FieldDataWrapper) GetStringSlice

func (f *FieldDataWrapper) GetStringSlice(key string, defaultValue []string) []string

GetStringSlice get string slice value from framework.FieldData with specific key, returns defaultValue when the key doesn't exist or the value of the key is not type of string slice.

func (*FieldDataWrapper) GetUint64

func (f *FieldDataWrapper) GetUint64(key string, defaultValue uint64) uint64

GetUint64 get unit64 value from framework.FieldData with specific key, returns defaultValue when the key doesn't exist or the value of the key is not type of unit64.

func (*FieldDataWrapper) MustGetBigInt

func (f *FieldDataWrapper) MustGetBigInt(key string) (*big.Int, error)

MustGetBigInt get big.Int value from framework.FieldData with specific key, returns error when the key doesn't exist or the value of the key is not type of big.Int.

func (*FieldDataWrapper) MustGetBool

func (f *FieldDataWrapper) MustGetBool(key string) (bool, error)

MustGetBool get bool value from framework.FieldData with specific key, returns error when the key doesn't exist or the value of the key is not type of bool.

func (*FieldDataWrapper) MustGetString

func (f *FieldDataWrapper) MustGetString(key string) (string, error)

MustGetString get string value from framework.FieldData with specific key, returns error when the key doesn't exist or the value of the key is not type of string.

func (*FieldDataWrapper) MustGetStringSlice

func (f *FieldDataWrapper) MustGetStringSlice(key string) ([]string, error)

MustGetStringSlice get string slice value from framework.FieldData with specific key, returns error when the key doesn't exist or the value of the key is not type of string slice.

func (*FieldDataWrapper) MustGetUint64

func (f *FieldDataWrapper) MustGetUint64(key string) (uint64, error)

MustGetUint64 get unit64 value from framework.FieldData with specific key, returns error when the key doesn't exist or the value of the key is not type of unit64.

Jump to

Keyboard shortcuts

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