Documentation
¶
Overview ¶
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library. * * The poly network is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The poly network is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License * along with The poly network . If not, see <http://www.gnu.org/licenses/>.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library. * * The poly network is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The poly network is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License * along with The poly network . If not, see <http://www.gnu.org/licenses/>.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library. * * The poly network is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The poly network is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License * along with The poly network . If not, see <http://www.gnu.org/licenses/>.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library. * * The poly network is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The poly network is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License * along with The poly network . If not, see <http://www.gnu.org/licenses/>.
Index ¶
- func EncodeBigInt(b *big.Int) string
- func GetCurveLabel(name string) (byte, error)
- func GetEthNoCompressKey(key keypair.PublicKey) []byte
- func GetExplorerUrl(chainId uint64) string
- func GetNoCompresskey(key keypair.PublicKey) []byte
- func GetNodeHeader(url string, restClient *RestClient, height uint64) ([]byte, error)
- func GetNodeHeight(url string, restClient *RestClient) (uint64, error)
- func GetProof(url string, contractAddress string, key string, blockheight string, ...) ([]byte, error)
- func ParseAuditpath(path []byte) ([]byte, []byte, [][32]byte, error)
- type NonceManager
- type PixiechainKeyStore
- func (this *PixiechainKeyStore) GetAccounts() []accounts.Account
- func (this *PixiechainKeyStore) GetChainId() uint64
- func (this *PixiechainKeyStore) SignTransaction(tx *types.Transaction, acc accounts.Account) (*types.Transaction, error)
- func (this *PixiechainKeyStore) TestPwd(acc accounts.Account, pwd string) error
- func (this *PixiechainKeyStore) UnlockKeys(sigConfig *config.PixiechainConfig) error
- type PixiechainProof
- type RestClient
- type SortedNonceArr
- type StorageProof
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeBigInt ¶
func GetCurveLabel ¶
func GetEthNoCompressKey ¶
func GetExplorerUrl ¶
func GetNoCompresskey ¶
func GetNodeHeader ¶
func GetNodeHeader(url string, restClient *RestClient, height uint64) ([]byte, error)
func GetNodeHeight ¶
func GetNodeHeight(url string, restClient *RestClient) (uint64, error)
Types ¶
type NonceManager ¶
type NonceManager struct {
// contains filtered or unexported fields
}
func NewNonceManager ¶
func NewNonceManager(ethClient *ethclient.Client) *NonceManager
func (*NonceManager) DecreaseAddressNonce ¶
func (this *NonceManager) DecreaseAddressNonce(address common.Address)
func (*NonceManager) GetAddressNonce ¶
func (this *NonceManager) GetAddressNonce(address common.Address) uint64
return account nonce, and than nonce++
func (*NonceManager) ReturnNonce ¶
func (this *NonceManager) ReturnNonce(addr common.Address, nonce uint64)
type PixiechainKeyStore ¶
type PixiechainKeyStore struct {
// contains filtered or unexported fields
}
func NewPixiechainKeyStore ¶
func NewPixiechainKeyStore(sigConfig *config.PixiechainConfig, chainId *big.Int) *PixiechainKeyStore
func (*PixiechainKeyStore) GetAccounts ¶
func (this *PixiechainKeyStore) GetAccounts() []accounts.Account
func (*PixiechainKeyStore) GetChainId ¶
func (this *PixiechainKeyStore) GetChainId() uint64
func (*PixiechainKeyStore) SignTransaction ¶
func (this *PixiechainKeyStore) SignTransaction(tx *types.Transaction, acc accounts.Account) (*types.Transaction, error)
func (*PixiechainKeyStore) TestPwd ¶
func (this *PixiechainKeyStore) TestPwd(acc accounts.Account, pwd string) error
func (*PixiechainKeyStore) UnlockKeys ¶
func (this *PixiechainKeyStore) UnlockKeys(sigConfig *config.PixiechainConfig) error
type PixiechainProof ¶
type RestClient ¶
type RestClient struct { Addr string // contains filtered or unexported fields }
func NewRestClient ¶
func NewRestClient() *RestClient
func (*RestClient) SendRestRequest ¶
func (self *RestClient) SendRestRequest(addr string, data []byte) ([]byte, error)
func (*RestClient) SetAddr ¶
func (self *RestClient) SetAddr(addr string) *RestClient
func (*RestClient) SetRestClient ¶
func (self *RestClient) SetRestClient(restClient *http.Client) *RestClient
type SortedNonceArr ¶
type SortedNonceArr []uint64
func (SortedNonceArr) Len ¶
func (arr SortedNonceArr) Len() int
func (SortedNonceArr) Less ¶
func (arr SortedNonceArr) Less(i, j int) bool
func (SortedNonceArr) Swap ¶
func (arr SortedNonceArr) Swap(i, j int)