Documentation ¶
Index ¶
- type Account
- type FieldDataWrapper
- func (f *FieldDataWrapper) GetBigInt(key string, defaultValue *big.Int) *big.Int
- func (f *FieldDataWrapper) GetBool(key string, defaultValue bool) bool
- func (f *FieldDataWrapper) GetString(key string, defaultValue string) string
- func (f *FieldDataWrapper) GetStringSlice(key string, defaultValue []string) []string
- func (f *FieldDataWrapper) GetUint64(key string, defaultValue uint64) uint64
- func (f *FieldDataWrapper) MustGetBigInt(key string) (*big.Int, error)
- func (f *FieldDataWrapper) MustGetBool(key string) (bool, error)
- func (f *FieldDataWrapper) MustGetString(key string) (string, error)
- func (f *FieldDataWrapper) MustGetStringSlice(key string) ([]string, error)
- func (f *FieldDataWrapper) MustGetUint64(key string) (uint64, error)
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 ¶
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 ¶
GetPublicKeyECDSA key for validating signature
type FieldDataWrapper ¶
FieldDataWrapper used to processing data from framework.FieldData
func NewFieldDataWrapper ¶
func NewFieldDataWrapper(data *framework.FieldData) *FieldDataWrapper
NewFieldDataWrapper returns FieldDataWrapper
func (*FieldDataWrapper) GetBigInt ¶
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.