Documentation ¶
Index ¶
- type AccountBlock
- type AccountBlockWithHeight
- type AccountBlockWithHeightV2
- type AccountBlocksMsg
- type AccountBlocksWithHeightMsg
- type AccountBlocksWithHeightMsgV2
- type AccountChainEvent
- type ChainSubscribe
- func (c *ChainSubscribe) DeleteAccountBlocks(blocks []*ledger.AccountBlock) error
- func (c *ChainSubscribe) DeleteSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
- func (c *ChainSubscribe) InsertAccountBlocks(blocks []*vm_db.VmAccountBlock) error
- func (c *ChainSubscribe) InsertSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
- func (c *ChainSubscribe) PrepareDeleteAccountBlocks(blocks []*ledger.AccountBlock) error
- func (c *ChainSubscribe) PrepareDeleteSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
- func (c *ChainSubscribe) PrepareInsertAccountBlocks(blocks []*vm_db.VmAccountBlock) error
- func (c *ChainSubscribe) PrepareInsertSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
- func (c *ChainSubscribe) Stop()
- type EventSystem
- func (es *EventSystem) Start()
- func (es *EventSystem) Stop()
- func (es *EventSystem) SubscribeAccountBlocks(ch chan []*AccountBlock) *RpcSubscription
- func (es *EventSystem) SubscribeAccountBlocksByAddr(addr types.Address, ch chan []*AccountBlockWithHeight, ft FilterType) *RpcSubscription
- func (es *EventSystem) SubscribeLogs(p *api.FilterParam, ch chan []*Logs, ft FilterType) *RpcSubscription
- func (es *EventSystem) SubscribeOnroadBlocksByAddr(addr types.Address, ch chan []*OnroadMsg, ft FilterType) *RpcSubscription
- func (es *EventSystem) SubscribeSnapshotBlocks(ch chan []*SnapshotBlock, ft FilterType) *RpcSubscription
- type FilterType
- type Logs
- type LogsMsg
- type LogsMsgV2
- type LogsV2
- type OnroadBlocksMsg
- type OnroadBlocksMsgV2
- type OnroadMsg
- type OnroadMsgV2
- type RpcFilterParam
- type RpcSubscription
- type SendBlock
- type SnapshotBlock
- type SnapshotBlockV2
- type SnapshotBlocksMsg
- type SnapshotBlocksMsgV2
- type SnapshotChainEvent
- type SubscribeApi
- func (s *SubscribeApi) CreateAccountBlockFilter() (rpc.ID, error)
- func (s *SubscribeApi) CreateAccountBlockFilterByAddress(addr types.Address) (rpc.ID, error)
- func (s *SubscribeApi) CreateAccountBlockSubscription(ctx context.Context) (*rpc.Subscription, error)
- func (s *SubscribeApi) CreateAccountBlockSubscriptionByAddress(ctx context.Context, addr types.Address) (*rpc.Subscription, error)
- func (s *SubscribeApi) CreateSnapshotBlockFilter() (rpc.ID, error)
- func (s *SubscribeApi) CreateSnapshotBlockSubscription(ctx context.Context) (*rpc.Subscription, error)
- func (s *SubscribeApi) CreateUnreceivedBlockFilterByAddress(addr types.Address) (rpc.ID, error)
- func (s *SubscribeApi) CreateUnreceivedBlockSubscriptionByAddress(ctx context.Context, addr types.Address) (*rpc.Subscription, error)
- func (s *SubscribeApi) CreateVmLogFilter(param api.VmLogFilterParam) (rpc.ID, error)
- func (s *SubscribeApi) CreateVmlogSubscription(ctx context.Context, param api.VmLogFilterParam) (*rpc.Subscription, error)
- func (s *SubscribeApi) GetChangesByFilterId(id rpc.ID) (interface{}, error)
- func (s *SubscribeApi) GetFilterChanges(id rpc.ID) (interface{}, error)deprecated
- func (s *SubscribeApi) GetLogs(param RpcFilterParam) ([]*Logs, error)deprecated
- func (s *SubscribeApi) NewAccountBlocks(ctx context.Context) (*rpc.Subscription, error)deprecated
- func (s *SubscribeApi) NewAccountBlocksByAddr(ctx context.Context, addr types.Address) (*rpc.Subscription, error)deprecated
- func (s *SubscribeApi) NewAccountBlocksByAddrFilter(addr types.Address) (rpc.ID, error)deprecated
- func (s *SubscribeApi) NewAccountBlocksFilter() (rpc.ID, error)deprecated
- func (s *SubscribeApi) NewLogs(ctx context.Context, param RpcFilterParam) (*rpc.Subscription, error)
- func (s *SubscribeApi) NewLogsFilter(param RpcFilterParam) (rpc.ID, error)deprecated
- func (s *SubscribeApi) NewOnroadBlocksByAddr(ctx context.Context, addr types.Address) (*rpc.Subscription, error)deprecated
- func (s *SubscribeApi) NewOnroadBlocksByAddrFilter(addr types.Address) (rpc.ID, error)deprecated
- func (s *SubscribeApi) NewSnapshotBlocks(ctx context.Context) (*rpc.Subscription, error)deprecated
- func (s *SubscribeApi) NewSnapshotBlocksFilter() (rpc.ID, error)deprecated
- func (s *SubscribeApi) UninstallFilter(id rpc.ID) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBlock ¶
type AccountBlockWithHeight ¶
type AccountBlocksMsg ¶
type AccountBlocksMsg struct { Blocks []*AccountBlock `json:"result"` Id rpc.ID `json:"subscription"` }
type AccountBlocksWithHeightMsg ¶
type AccountBlocksWithHeightMsg struct { Blocks []*AccountBlockWithHeight `json:"result"` Id rpc.ID `json:"subscription"` }
type AccountBlocksWithHeightMsgV2 ¶
type AccountBlocksWithHeightMsgV2 struct { Blocks []*AccountBlockWithHeightV2 `json:"result"` Id rpc.ID `json:"subscription"` }
type AccountChainEvent ¶
type AccountChainEvent struct { BlockType byte FromBlockHash types.Hash Hash types.Hash Height uint64 Addr types.Address ToAddr types.Address Logs []*ledger.VmLog SendBlockList []*SendBlock }
func NewAccountChainEvent ¶
func NewAccountChainEvent(block *ledger.AccountBlock, logs []*ledger.VmLog) *AccountChainEvent
type ChainSubscribe ¶
type ChainSubscribe struct {
// contains filtered or unexported fields
}
func NewChainSubscribe ¶
func NewChainSubscribe(v *vite.Vite, e *EventSystem) *ChainSubscribe
func (*ChainSubscribe) DeleteAccountBlocks ¶
func (c *ChainSubscribe) DeleteAccountBlocks(blocks []*ledger.AccountBlock) error
func (*ChainSubscribe) DeleteSnapshotBlocks ¶
func (c *ChainSubscribe) DeleteSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
func (*ChainSubscribe) InsertAccountBlocks ¶
func (c *ChainSubscribe) InsertAccountBlocks(blocks []*vm_db.VmAccountBlock) error
func (*ChainSubscribe) InsertSnapshotBlocks ¶
func (c *ChainSubscribe) InsertSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
func (*ChainSubscribe) PrepareDeleteAccountBlocks ¶
func (c *ChainSubscribe) PrepareDeleteAccountBlocks(blocks []*ledger.AccountBlock) error
func (*ChainSubscribe) PrepareDeleteSnapshotBlocks ¶
func (c *ChainSubscribe) PrepareDeleteSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
func (*ChainSubscribe) PrepareInsertAccountBlocks ¶
func (c *ChainSubscribe) PrepareInsertAccountBlocks(blocks []*vm_db.VmAccountBlock) error
func (*ChainSubscribe) PrepareInsertSnapshotBlocks ¶
func (c *ChainSubscribe) PrepareInsertSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
func (*ChainSubscribe) Stop ¶
func (c *ChainSubscribe) Stop()
type EventSystem ¶
type EventSystem struct {
// contains filtered or unexported fields
}
var Es *EventSystem
func NewEventSystem ¶
func NewEventSystem(v *vite.Vite) *EventSystem
func (*EventSystem) Start ¶
func (es *EventSystem) Start()
func (*EventSystem) Stop ¶
func (es *EventSystem) Stop()
func (*EventSystem) SubscribeAccountBlocks ¶
func (es *EventSystem) SubscribeAccountBlocks(ch chan []*AccountBlock) *RpcSubscription
func (*EventSystem) SubscribeAccountBlocksByAddr ¶
func (es *EventSystem) SubscribeAccountBlocksByAddr(addr types.Address, ch chan []*AccountBlockWithHeight, ft FilterType) *RpcSubscription
func (*EventSystem) SubscribeLogs ¶
func (es *EventSystem) SubscribeLogs(p *api.FilterParam, ch chan []*Logs, ft FilterType) *RpcSubscription
func (*EventSystem) SubscribeOnroadBlocksByAddr ¶
func (es *EventSystem) SubscribeOnroadBlocksByAddr(addr types.Address, ch chan []*OnroadMsg, ft FilterType) *RpcSubscription
func (*EventSystem) SubscribeSnapshotBlocks ¶
func (es *EventSystem) SubscribeSnapshotBlocks(ch chan []*SnapshotBlock, ft FilterType) *RpcSubscription
type FilterType ¶
type FilterType byte
const ( LogsSubscription FilterType = iota LogsSubscriptionV2 AccountBlocksSubscription AccountBlocksWithHeightSubscription AccountBlocksWithHeightSubscriptionV2 OnroadBlocksSubscription OnroadBlocksSubscriptionV2 SnapshotBlocksSubscription SnapshotBlocksSubscriptionV2 )
type OnroadBlocksMsg ¶
type OnroadBlocksMsgV2 ¶
type OnroadBlocksMsgV2 struct { Blocks []*OnroadMsgV2 `json:"result"` Id rpc.ID `json:"subscription"` }
type OnroadMsgV2 ¶
type RpcFilterParam ¶
type RpcSubscription ¶
func (*RpcSubscription) Err ¶
func (s *RpcSubscription) Err() <-chan error
func (*RpcSubscription) Unsubscribe ¶
func (s *RpcSubscription) Unsubscribe()
type SnapshotBlock ¶
type SnapshotBlockV2 ¶
type SnapshotBlocksMsg ¶
type SnapshotBlocksMsg struct { Blocks []*SnapshotBlock `json:"result"` Id rpc.ID `json:"subscription"` }
type SnapshotBlocksMsgV2 ¶
type SnapshotBlocksMsgV2 struct { Blocks []*SnapshotBlockV2 `json:"result"` Id rpc.ID `json:"subscription"` }
type SnapshotChainEvent ¶
type SubscribeApi ¶
type SubscribeApi struct {
// contains filtered or unexported fields
}
func NewSubscribeApi ¶
func NewSubscribeApi(vite *vite.Vite) *SubscribeApi
func (*SubscribeApi) CreateAccountBlockFilter ¶
func (s *SubscribeApi) CreateAccountBlockFilter() (rpc.ID, error)
func (*SubscribeApi) CreateAccountBlockFilterByAddress ¶
func (*SubscribeApi) CreateAccountBlockSubscription ¶
func (s *SubscribeApi) CreateAccountBlockSubscription(ctx context.Context) (*rpc.Subscription, error)
func (*SubscribeApi) CreateAccountBlockSubscriptionByAddress ¶
func (s *SubscribeApi) CreateAccountBlockSubscriptionByAddress(ctx context.Context, addr types.Address) (*rpc.Subscription, error)
func (*SubscribeApi) CreateSnapshotBlockFilter ¶
func (s *SubscribeApi) CreateSnapshotBlockFilter() (rpc.ID, error)
func (*SubscribeApi) CreateSnapshotBlockSubscription ¶
func (s *SubscribeApi) CreateSnapshotBlockSubscription(ctx context.Context) (*rpc.Subscription, error)
func (*SubscribeApi) CreateUnreceivedBlockFilterByAddress ¶
func (*SubscribeApi) CreateUnreceivedBlockSubscriptionByAddress ¶
func (s *SubscribeApi) CreateUnreceivedBlockSubscriptionByAddress(ctx context.Context, addr types.Address) (*rpc.Subscription, error)
func (*SubscribeApi) CreateVmLogFilter ¶
func (s *SubscribeApi) CreateVmLogFilter(param api.VmLogFilterParam) (rpc.ID, error)
func (*SubscribeApi) CreateVmlogSubscription ¶
func (s *SubscribeApi) CreateVmlogSubscription(ctx context.Context, param api.VmLogFilterParam) (*rpc.Subscription, error)
func (*SubscribeApi) GetChangesByFilterId ¶
func (s *SubscribeApi) GetChangesByFilterId(id rpc.ID) (interface{}, error)
func (*SubscribeApi) GetFilterChanges
deprecated
func (s *SubscribeApi) GetFilterChanges(id rpc.ID) (interface{}, error)
Deprecated: use subscribe_getChangesByFilterId instead
func (*SubscribeApi) GetLogs
deprecated
func (s *SubscribeApi) GetLogs(param RpcFilterParam) ([]*Logs, error)
Deprecated: use ledger_getVmLogsByFilter instead
func (*SubscribeApi) NewAccountBlocks
deprecated
func (s *SubscribeApi) NewAccountBlocks(ctx context.Context) (*rpc.Subscription, error)
Deprecated: use subscribe_createAccountBlockSubscription instead
func (*SubscribeApi) NewAccountBlocksByAddr
deprecated
func (s *SubscribeApi) NewAccountBlocksByAddr(ctx context.Context, addr types.Address) (*rpc.Subscription, error)
Deprecated: use subscribe_createAccountBlockSubscriptionByAddress instead
func (*SubscribeApi) NewAccountBlocksByAddrFilter
deprecated
func (*SubscribeApi) NewAccountBlocksFilter
deprecated
func (s *SubscribeApi) NewAccountBlocksFilter() (rpc.ID, error)
Deprecated: use subscribe_createAccountBlockFilter instead
func (*SubscribeApi) NewLogs ¶
func (s *SubscribeApi) NewLogs(ctx context.Context, param RpcFilterParam) (*rpc.Subscription, error)
Deprevated: use subscribe_createVmLogSubscription instead
func (*SubscribeApi) NewLogsFilter
deprecated
func (s *SubscribeApi) NewLogsFilter(param RpcFilterParam) (rpc.ID, error)
Deprecated: use subscribe_createVmLogFilter instead
func (*SubscribeApi) NewOnroadBlocksByAddr
deprecated
func (s *SubscribeApi) NewOnroadBlocksByAddr(ctx context.Context, addr types.Address) (*rpc.Subscription, error)
Deprecated: use subscribe_createUnreceivedBlockSubscriptionByAddress instead
func (*SubscribeApi) NewOnroadBlocksByAddrFilter
deprecated
func (*SubscribeApi) NewSnapshotBlocks
deprecated
func (s *SubscribeApi) NewSnapshotBlocks(ctx context.Context) (*rpc.Subscription, error)
Deprecated: use subscribe_createSnapshotBlockSubscription instead
func (*SubscribeApi) NewSnapshotBlocksFilter
deprecated
func (s *SubscribeApi) NewSnapshotBlocksFilter() (rpc.ID, error)
Deprecated: use subscribe_createSnapshotBlockFilter instead
func (*SubscribeApi) UninstallFilter ¶
func (s *SubscribeApi) UninstallFilter(id rpc.ID) bool
Click to show internal directories.
Click to hide internal directories.