Documentation ¶
Index ¶
- Variables
- func AccountIsExist(accountName string) (bool, error)
- func ClientCall(method string, result interface{}, args ...interface{}) error
- func CreateNewAccountWithName(fromAccount string, fromPriKey *ecdsa.PrivateKey, newAccountName string) (error, common.PubKey, *ecdsa.PrivateKey)
- func DefaultDataDir() string
- func DefultURL() string
- func DelayGetReceiptByTxHash(txHash common.Hash, maxTime uint) (*types.RPCReceipt, bool, error)
- func GasPrice() (*big.Int, error)
- func GenerateAccountName(namePrefix string, addStrLen int) string
- func GenerateAssetName(namePrefix string, addStrLen int) string
- func GeneratePubKey() (common.PubKey, *ecdsa.PrivateKey)
- func GenerateRandomName(namePrefix string, addStrLen int) string
- func GenerateValidAccountName(namePrefix string, suffixStrLen int) (string, error)
- func GenerateValidAccountNameAndKey(namePrefix string, suffixStrLen int) (string, common.PubKey, *ecdsa.PrivateKey, error)
- func GenerateValidAssetName(namePrefix string, suffixStrLen int) (string, error)
- func GetAccountByName(accountName string) accountmanager.Account
- func GetAccountInfo(accountName string) bool
- func GetAssetBalanceByID(accountName string, assetID uint64) (*big.Int, error)
- func GetAssetInfoById(assetID uint64) (*asset.AssetObject, error)
- func GetAssetInfoByName(assetName string) (*asset.AssetObject, error)
- func GetNextAssetIdFrom(fromAssetId uint64) uint64
- func GetNonce(accountname common.Name) (uint64, error)
- func GetReceiptByTxHash(hash common.Hash) (*types.RPCReceipt, error)
- func GetTxpoolStatus() (int, int)
- func HomeDir() string
- func IncreaseAsset(fromAccount string, fromPrikey *ecdsa.PrivateKey, assetName string, ...) error
- func IsAssetExist(assetName string) (bool, error)
- func IsTxpoolFull() bool
- func IssueAsset(fromAccount string, owner string, fromPrikey *ecdsa.PrivateKey, ...) error
- func IssueAssetWithValidAccount(fromAccount string, owner string, toAccount string, assetName string, ...) (*ecdsa.PrivateKey, error)
- func MustRPCClient() (*rpc.Client, error)
- func SendRawTx(rawTx []byte) (common.Hash, error)
- func SendTxTest(gcs []*GenAction) (common.Hash, error)
- func SetAssetNewOwner(fromAccount string, assetName string, newOwner string, ...) error
- func TransferAsset(fromAccountName, toAccountName string, assetId uint64, amount int64, ...) error
- type GenAction
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SystemAccountPriKey, _ = crypto.HexToECDSA("289c2857d4598e37fb9647507e47a309d6133539bf21a8b9cb6df88fd5232032")
SystemAccountPubKey = common.HexToPubKey("0x047db227d7094ce215c3a0f57e1bcc732551fe351f94249471934567e0f5dc1bf795962b8cccb87a2eb56b29fbe37d614e2f4c3c45b789ae4f1f51f4cb21972ffd")
Gaslimit = uint64(2000000)
SystemAccount = "ftsystemio"
Minernonce = uint64(0)
MaxTxNumInTxpool = 40960 + 4096
)
Functions ¶
func AccountIsExist ¶
func ClientCall ¶
ClientCall Wrapper rpc call api.
func CreateNewAccountWithName ¶
func CreateNewAccountWithName(fromAccount string, fromPriKey *ecdsa.PrivateKey, newAccountName string) (error, common.PubKey, *ecdsa.PrivateKey)
func DefaultDataDir ¶
func DefaultDataDir() string
defaultDataDir is the default data directory to use for the databases and other persistence requirements.
func DelayGetReceiptByTxHash ¶
func GenerateAccountName ¶
func GenerateAssetName ¶
func GeneratePubKey ¶
func GeneratePubKey() (common.PubKey, *ecdsa.PrivateKey)
func GenerateRandomName ¶
func GenerateValidAssetName ¶
func GetAccountByName ¶
func GetAccountByName(accountName string) accountmanager.Account
func GetAccountInfo ¶
func GetAssetBalanceByID ¶
GetAccountBalanceByID get balance by address ,assetID and number.
func GetAssetInfoById ¶
func GetAssetInfoById(assetID uint64) (*asset.AssetObject, error)
func GetAssetInfoByName ¶
func GetAssetInfoByName(assetName string) (*asset.AssetObject, error)
GetAssetInfoByName get assetINfo by accountName
func GetNextAssetIdFrom ¶
func GetReceiptByTxHash ¶
func GetReceiptByTxHash(hash common.Hash) (*types.RPCReceipt, error)
func GetTxpoolStatus ¶
func IncreaseAsset ¶
func IsAssetExist ¶
func IsTxpoolFull ¶
func IsTxpoolFull() bool
func IssueAsset ¶
func SetAssetNewOwner ¶
func TransferAsset ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.