Documentation
¶
Index ¶
- Constants
- func DeserializeArgs(source []byte) ([]byte, []byte, *big.Int, error)
- func HashChildren(v, hash []byte) []byte
- func HashLeaf(value []byte) []byte
- func MerkleProve(path, root []byte) ([]byte, error)
- func ReadBytes(buffer []byte, offset int, count int) ([]byte, int, error)
- func ReadUInt255(buffer []byte, offset int) (*big.Int, int, error)
- func ReadVarBytes(buffer []byte, offset int) ([]byte, int, error)
- func ReadVarUInt(buffer []byte, offset int) (uint64, int, error)
- func ReadVarUInt16(buffer []byte, offset int) (uint64, int, error)
- func ReadVarUInt32(buffer []byte, offset int) (uint64, int, error)
- func ReadVarUInt64(buffer []byte, offset int) (uint64, int, error)
- func ReadVarUInt8(buffer []byte, offset int) (uint64, int, error)
- type CrossChainTxParameter
- type SyncService
- func (this *SyncService) GetBalance(account helper.UInt160, assetId helper.UInt256) ([]models.Unspent, helper.Fixed8, error)
- func (this *SyncService) GetCurrentNeoChainSyncHeight(relayChainID uint64) (uint64, error)
- func (this *SyncService) GetCurrentRelayChainSyncHeight(neoChainID uint64) (uint32, error)
- func (this *SyncService) GetGasConsumed(script []byte, checkWitnessHashes string) (*helper.Fixed8, error)
- func (this *SyncService) GetTransactionInputs(from helper.UInt160, assetId helper.UInt256, amount helper.Fixed8) ([]*tx.CoinReference, helper.Fixed8, error)
- func (this *SyncService) MakeInvocationTransaction(script []byte, from helper.UInt160, attributes []*tx.TransactionAttribute, ...) (*tx.InvocationTransaction, error)
- func (this *SyncService) NeoToRelay()
- func (this *SyncService) NeoToRelayCheckAndRetry()
- func (this *SyncService) RelayToNeo()
- func (this *SyncService) RelayToNeoRetry()
- func (this *SyncService) Run()
- type ToMerkleValue
Constants ¶
View Source
const ( VERIFY_AND_EXECUTE_TX = "VerifyAndExecuteTx" CHANGE_BOOK_KEEPER = "ChangeBookKeeper" SYNC_BLOCK_HEADER = "SyncBlockHeader" )
Variables ¶
This section is empty.
Functions ¶
func HashChildren ¶
func MerkleProve ¶
Types ¶
type CrossChainTxParameter ¶
type CrossChainTxParameter struct { TxHash []byte // source chain tx hash, when FromChainID = 2 (eth), it's a key CrossChainID []byte FromContract []byte ToChainID uint64 ToContract []byte Method []byte Args []byte }
func DeserializeCrossChainTxParameter ¶
func DeserializeCrossChainTxParameter(source []byte, offset int) (*CrossChainTxParameter, error)
type SyncService ¶
type SyncService struct {
// contains filtered or unexported fields
}
SyncService ...
func NewSyncService ¶
func NewSyncService(acct *rsdk.Account, relaySdk *rsdk.PolySdk, neoAccount *wallet.Account, neoSdk *neoRpc.RpcClient) *SyncService
NewSyncService ...
func (*SyncService) GetBalance ¶
func (*SyncService) GetCurrentNeoChainSyncHeight ¶
func (this *SyncService) GetCurrentNeoChainSyncHeight(relayChainID uint64) (uint64, error)
GetCurrentNeoChainSyncHeight
func (*SyncService) GetCurrentRelayChainSyncHeight ¶
func (this *SyncService) GetCurrentRelayChainSyncHeight(neoChainID uint64) (uint32, error)
GetCurrentRelayChainSyncHeight :get the synced NEO blockHeight from Relay Chain
func (*SyncService) GetGasConsumed ¶
func (*SyncService) GetTransactionInputs ¶
func (*SyncService) MakeInvocationTransaction ¶
func (this *SyncService) MakeInvocationTransaction(script []byte, from helper.UInt160, attributes []*tx.TransactionAttribute, changeAddress helper.UInt160, sysFee helper.Fixed8, netFee helper.Fixed8) (*tx.InvocationTransaction, error)
func (*SyncService) NeoToRelayCheckAndRetry ¶
func (this *SyncService) NeoToRelayCheckAndRetry()
func (*SyncService) RelayToNeo ¶
func (this *SyncService) RelayToNeo()
RelayToNeo sync headers from relay chain to neo
func (*SyncService) RelayToNeoRetry ¶
func (this *SyncService) RelayToNeoRetry()
type ToMerkleValue ¶
type ToMerkleValue struct { TxHash []byte // poly chain tx hash FromChainID uint64 TxParam *CrossChainTxParameter }
func DeserializeMerkleValue ¶
func DeserializeMerkleValue(source []byte) (*ToMerkleValue, error)
Click to show internal directories.
Click to hide internal directories.