Documentation ¶
Index ¶
- Constants
- Variables
- func GetCurrHeightFromPoly(poly *poly_go_sdk.PolySdk) (uint32, string, error)
- func GetHeaderHashFromPoly(poly *poly_go_sdk.PolySdk, height uint32) (string, error)
- func NeedRetry(msg string) bool
- func SetUpPoly(poly *poly_go_sdk.PolySdk, rpcAddr string) error
- func Wait(dura time.Duration)
- type CrossChainItem
- type CrossChainItemArr
- type FromPolyItem
- type Header
- type Headers
- type NeedToRetryErr
- type NetErr
- type Request
- type Response
- type RestCli
- func (cli *RestCli) BroadcastTx(tx string) (string, error)
- func (cli *RestCli) GetCurrentHeightAndHash() (uint32, string, error)
- func (cli *RestCli) GetHeader(hash string) (*wire.BlockHeader, error)
- func (cli *RestCli) GetProof(txids []string) (string, error)
- func (cli *RestCli) GetScriptPubKey(txid string, index uint32) (string, error)
- func (cli *RestCli) GetTxsAndHeader(height, after uint32) ([]*wire.MsgTx, *wire.BlockHeader, string, error)
- func (cli *RestCli) GetTxsInBlock(hash string) (*wire.MsgBlock, error)
- func (cli *RestCli) IsHeaderReady(height uint32) error
Constants ¶
View Source
const ( BTC_ID uint64 = 1 HDR_LIMIT_PER_BATCH = 1000 )
Variables ¶
View Source
var (
SleepTime time.Duration = 10
)
Functions ¶
func GetCurrHeightFromPoly ¶
func GetHeaderHashFromPoly ¶
Types ¶
type CrossChainItem ¶
func (*CrossChainItem) Deserialize ¶
func (cci *CrossChainItem) Deserialize(buf []byte) error
func (*CrossChainItem) Serialize ¶
func (cci *CrossChainItem) Serialize() ([]byte, error)
type CrossChainItemArr ¶
type CrossChainItemArr []*CrossChainItem
func (*CrossChainItemArr) Deserialize ¶
func (arr *CrossChainItemArr) Deserialize(buf []byte) error
func (CrossChainItemArr) Serialize ¶
func (arr CrossChainItemArr) Serialize() ([]byte, error)
type FromPolyItem ¶
type FromPolyItem struct {
Tx string
}
type NeedToRetryErr ¶
type NeedToRetryErr struct {
Err error
}
func (NeedToRetryErr) Error ¶
func (err NeedToRetryErr) Error() string
func (*NeedToRetryErr) String ¶
func (err *NeedToRetryErr) String() string
type RestCli ¶
Get tx in block; Get proof;
func NewRestCli ¶
func (*RestCli) GetCurrentHeightAndHash ¶
func (*RestCli) GetScriptPubKey ¶
func (*RestCli) GetTxsAndHeader ¶
func (*RestCli) GetTxsInBlock ¶
func (*RestCli) IsHeaderReady ¶
Click to show internal directories.
Click to hide internal directories.