Documentation ¶
Index ¶
- Variables
- type Account
- type Address
- type BigInt
- func (bi *BigInt) Add(num int64)
- func (bi *BigInt) GetBytes() []byte
- func (bi *BigInt) GetInt64() int64
- func (bi *BigInt) GetString(base int) string
- func (bi *BigInt) Hex() string
- func (bi *BigInt) SetBytes(buf []byte)
- func (bi *BigInt) SetHexString(hexString string) error
- func (bi *BigInt) SetInt64(x int64)
- func (bi *BigInt) SetString(x string, base int)
- func (bi *BigInt) Sign() int
- func (bi *BigInt) String() string
- type BigInts
- type Config
- type JsonRpcIntResponse
- type Transaction
- type Transactions
- type YouMobile
- func (y *YouMobile) AccountManager() accounts.AccountManager
- func (y *YouMobile) Call(api string, params []byte) (string, error)
- func (y *YouMobile) CreateAccount(passphrase string) (*Account, error)
- func (y *YouMobile) ExportECDSAKey(account *Account, passphrase string) (string, error)
- func (y *YouMobile) ExportKeyJson(account *Account, passphrase, newPassphrase string) (string, error)
- func (y *YouMobile) Find(address string) (*Account, error)
- func (y *YouMobile) ImportECDSAKey(key string, passphrase string) (*Account, error)
- func (y *YouMobile) ImportKeyJson(keyJson string, passphrase, newPassphrase string) (*Account, error)
- func (y *YouMobile) Lock(address *Address) error
- func (y *YouMobile) SignTransaction(account *Account, tx *Transaction) (string, error)
- func (y *YouMobile) TimedUnlock(account *Account, passphrase string, timeout int64) error
- func (y *YouMobile) Unlock(account *Account, passphrase string) error
- func (y *YouMobile) UpdateAccount(account *Account, passphrase, newPassphrase string) error
Constants ¶
This section is empty.
Variables ¶
var ( StandardScryptN = keystore.StandardScryptN StandardScryptP = keystore.StandardScryptP LightScryptN = keystore.LightScryptN LightScryptP = keystore.LightScryptP PassphraseKeyStore = 0 PlaintextKeyStore = 1 )
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func (*Account) GetAddress ¶
type Address ¶
type Address struct {
// contains filtered or unexported fields
}
Address represents the 20 byte address of an Ethereum account.
func NewAddress ¶
type BigInt ¶
type BigInt struct {
// contains filtered or unexported fields
}
A BigInt represents a signed multi-precision integer.
func (*BigInt) GetInt64 ¶
GetInt64 returns the int64 representation of x. If x cannot be represented in an int64, the result is undefined.
func (*BigInt) GetString ¶
GetString returns the value of x as a formatted string in some number base.
func (*BigInt) SetBytes ¶
SetBytes interprets buf as the bytes of a big-endian unsigned integer and sets the big int to that value.
func (*BigInt) SetHexString ¶
func (*BigInt) SetString ¶
SetString sets the big int to x.
The string prefix determines the actual conversion base. A prefix of "0x" or "0X" selects base 16; the "0" prefix selects base 8, and a "0b" or "0B" prefix selects base 2. Otherwise the selected base is 10.
type BigInts ¶
type BigInts struct {
// contains filtered or unexported fields
}
BigInts represents a slice of big ints.
type JsonRpcIntResponse ¶
type JsonRpcIntResponse struct { JsonRpc string `json:"jsonrpc"` Id int64 `json:"id"` Result string `json:"result"` }
{"jsonrpc":"2.0","id":2,"result":0}
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
Transaction represents a single transaction.
func NewTransaction ¶
func NewTransaction(nonce string, to *Address, amount string, gasLimit string, gasPrice string, data []byte) (*Transaction, error)
NewTransaction creates a new transaction with the given properties.
type Transactions ¶
type Transactions struct {
// contains filtered or unexported fields
}
func (*Transactions) Append ¶
func (t *Transactions) Append(tx *Transaction)
Append Transaction to list
type YouMobile ¶
type YouMobile struct {
// contains filtered or unexported fields
}
func NewYouMobile ¶
func (*YouMobile) AccountManager ¶
func (y *YouMobile) AccountManager() accounts.AccountManager
func (*YouMobile) CreateAccount ¶
func (*YouMobile) ExportECDSAKey ¶
func (*YouMobile) ExportKeyJson ¶
func (*YouMobile) ImportECDSAKey ¶
ImportECDSA stores the given key into the key directory, encrypting it with the passphrase.
func (*YouMobile) ImportKeyJson ¶
func (*YouMobile) SignTransaction ¶
func (y *YouMobile) SignTransaction(account *Account, tx *Transaction) (string, error)
SignTransaction sign tx for SignRawTransaction
func (*YouMobile) TimedUnlock ¶
TimedUnlock unlocks the given account with the passphrase. The account stays unlocked for the duration of timeout (nanoseconds). A timeout of 0 unlocks the account until the program exits. The account must match a unique key file.
If the account address is already unlocked for a duration, TimedUnlock extends or shortens the active unlock timeout. If the address was previously unlocked indefinitely the timeout is not altered.