Skip to main content

Class: MangroveEventSubscriber

Hierarchy​

Constructors​

constructor​

β€’ new MangroveEventSubscriber(provider, contract, blockManager): MangroveEventSubscriber

Parameters​

NameType
providerProvider
contractContract
blockManagerBlockManager

Returns​

MangroveEventSubscriber

Overrides​

LogSubscriber\<Market.BookSubscriptionEvent\>.constructor

Defined in​

@mangrovedao/mangrove.js/src/mangroveEventSubscriber.ts:27

Properties​

initializedAt​

β€’ Optional initializedAt: BlockWithoutParentHash

Inherited from​

LogSubscriber.initializedAt

Defined in​

@mangrovedao/reliable-event-subscriber/dist/logSubscriber.d.ts:14


lastSeenEventBlock​

β€’ Optional lastSeenEventBlock: BlockWithoutParentHash

Inherited from​

LogSubscriber.lastSeenEventBlock

Defined in​

@mangrovedao/reliable-event-subscriber/dist/logSubscriber.d.ts:15

Methods​

optionsIdentifier​

β–Έ optionsIdentifier(options): string

Parameters​

NameType
optionsOptions

Returns​

string

Defined in​

@mangrovedao/mangrove.js/src/mangroveEventSubscriber.ts:36


enableSubscriptions​

β–Έ enableSubscriptions(): Promise<void>

Returns​

Promise<void>

Defined in​

@mangrovedao/mangrove.js/src/mangroveEventSubscriber.ts:46


computeBookIdentifier​

β–Έ computeBookIdentifier(market, ba): string

Parameters​

NameType
marketMarket
baBA

Returns​

string

Defined in​

@mangrovedao/mangrove.js/src/mangroveEventSubscriber.ts:56


getSemibook​

β–Έ getSemibook(market, ba, options): undefined | Semibook

Parameters​

NameType
marketMarket
baBA
optionsOptions

Returns​

undefined | Semibook

Defined in​

@mangrovedao/mangrove.js/src/mangroveEventSubscriber.ts:62


subscribeToSemibook​

β–Έ subscribeToSemibook(semibook, rec?): Promise<void>

Parameters​

NameTypeDefault value
semibookSemibookundefined
recnumber0

Returns​

Promise<void>

Defined in​

@mangrovedao/mangrove.js/src/mangroveEventSubscriber.ts:83


initialize​

β–Έ initialize(wantedBlock): Promise<InitializeErrorOrBlock>

initialize subscriber at block number blockNumber.

Parameters​

NameType
wantedBlockBlockWithoutParentHash

Returns​

Promise<InitializeErrorOrBlock>

Overrides​

LogSubscriber.initialize

Defined in​

@mangrovedao/mangrove.js/src/mangroveEventSubscriber.ts:129


handleLog​

β–Έ handleLog(log): Promise<void>

handle log

Parameters​

NameType
logLog

Returns​

Promise<void>

Overrides​

LogSubscriber.handleLog

Defined in​

@mangrovedao/mangrove.js/src/mangroveEventSubscriber.ts:151


rollback​

β–Έ rollback(block): void

rollback subscriber to block block

Parameters​

NameType
blockBlock

Returns​

void

Overrides​

LogSubscriber.rollback

Defined in​

@mangrovedao/mangrove.js/src/mangroveEventSubscriber.ts:175

  • Hierarchy
  • Constructors
    • constructor
  • Properties
    • initializedAt
    • lastSeenEventBlock
  • Methods
    • optionsIdentifier
    • enableSubscriptions
    • computeBookIdentifier
    • getSemibook
    • subscribeToSemibook
    • initialize
    • handleLog
    • rollback