Search
Preparing search index...
The search index is not available
@cityofzion/neo-js
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
"storages/mongodb-storage"
MongodbStorage
Class MongodbStorage
Hierarchy
EventEmitter
MongodbStorage
Index
Constructors
constructor
Properties
_is
Ready
block
Dao
block
Meta
Dao
logger
options
transaction
Meta
Dao
default
Max
Listeners
Methods
add
Listener
analyze
Block
Metas
analyze
Blocks
analyze
Transaction
Metas
close
count
Block
Redundancy
count
Legacy
Transaction
Meta
emit
event
Names
get
Block
get
Block
Count
get
Block
Meta
Count
get
Blocks
get
Highest
Block
Height
get
Highest
Block
Meta
Height
get
Max
Listeners
get
Transaction
init
Connection
is
Ready
listener
Count
listeners
off
on
once
prepend
Listener
prepend
Once
Listener
prune
Block
prune
Legacy
Transaction
Meta
raw
Listeners
ready
Handler
remove
All
Listeners
remove
Block
Meta
ByHeight
remove
Listener
review
Block
Index
For
Height
review
Block
Index
For
Transaction
Id
review
Block
Meta
Index
For
Height
review
Block
Meta
Index
For
Time
review
Indexes
review
Transaction
Meta
Index
For
Height
review
Transaction
Meta
Index
For
Time
review
Transaction
Meta
Index
For
Transaction
Id
review
Transaction
Meta
Index
For
Type
set
Block
set
Block
Count
set
Block
Meta
set
Max
Listeners
set
Ready
set
Transaction
Meta
validate
Optional
Parameters
listener
Count
Constructors
constructor
new
Mongodb
Storage
(
options
?:
MongodbStorageOptions
)
:
MongodbStorage
Parameters
Default value
options:
MongodbStorageOptions
= {}
Returns
MongodbStorage
Properties
Private
_is
Ready
_is
Ready
:
boolean
= false
Private
block
Dao
block
Dao
:
BlockDao
Private
block
Meta
Dao
block
Meta
Dao
:
BlockMetaDao
Private
logger
logger
:
Logger
Private
options
options
:
MongodbStorageOptions
Private
transaction
Meta
Dao
transaction
Meta
Dao
:
TransactionMetaDao
Static
default
Max
Listeners
default
Max
Listeners
:
number
Methods
add
Listener
add
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
analyze
Block
Metas
analyze
Block
Metas
(
startHeight
:
number
, endHeight
:
number
)
:
Promise
<
any
[]
>
Parameters
startHeight:
number
endHeight:
number
Returns
Promise
<
any
[]
>
analyze
Blocks
analyze
Blocks
(
startHeight
:
number
, endHeight
:
number
)
:
Promise
<
any
[]
>
Parameters
startHeight:
number
endHeight:
number
Returns
Promise
<
any
[]
>
analyze
Transaction
Metas
analyze
Transaction
Metas
(
startHeight
:
number
, endHeight
:
number
)
:
Promise
<
any
[]
>
Parameters
startHeight:
number
endHeight:
number
Returns
Promise
<
any
[]
>
close
close
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
count
Block
Redundancy
count
Block
Redundancy
(
height
:
number
)
:
Promise
<
number
>
Parameters
height:
number
Returns
Promise
<
number
>
count
Legacy
Transaction
Meta
count
Legacy
Transaction
Meta
(
targetApiLevel
:
number
)
:
Promise
<
number
>
Parameters
targetApiLevel:
number
Returns
Promise
<
number
>
emit
emit
(
event
:
string
|
symbol
,
...
args
:
any
[]
)
:
boolean
Parameters
event:
string
|
symbol
Rest
...
args:
any
[]
Returns
boolean
event
Names
event
Names
(
)
:
Array
<
string
|
symbol
>
Returns
Array
<
string
|
symbol
>
get
Block
get
Block
(
height
:
number
)
:
Promise
<
any
>
Parameters
height:
number
Returns
Promise
<
any
>
get
Block
Count
get
Block
Count
(
)
:
Promise
<
number
>
deprecated
Returns
Promise
<
number
>
get
Block
Meta
Count
get
Block
Meta
Count
(
)
:
Promise
<
number
>
Returns
Promise
<
number
>
get
Blocks
get
Blocks
(
height
:
number
)
:
Promise
<
any
[]
>
Parameters
height:
number
Returns
Promise
<
any
[]
>
get
Highest
Block
Height
get
Highest
Block
Height
(
)
:
Promise
<
number
>
Returns
Promise
<
number
>
get
Highest
Block
Meta
Height
get
Highest
Block
Meta
Height
(
)
:
Promise
<
number
>
Returns
Promise
<
number
>
get
Max
Listeners
get
Max
Listeners
(
)
:
number
Returns
number
get
Transaction
get
Transaction
(
transactionId
:
string
)
:
Promise
<
any
>
Parameters
transactionId:
string
Returns
Promise
<
any
>
Private
init
Connection
init
Connection
(
)
:
void
Returns
void
is
Ready
is
Ready
(
)
:
boolean
Returns
boolean
listener
Count
listener
Count
(
type
:
string
|
symbol
)
:
number
Parameters
type:
string
|
symbol
Returns
number
listeners
listeners
(
event
:
string
|
symbol
)
:
Function
[]
Parameters
event:
string
|
symbol
Returns
Function
[]
off
off
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
on
on
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
once
once
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
prepend
Listener
prepend
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
prepend
Once
Listener
prepend
Once
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
prune
Block
prune
Block
(
height
:
number
, redundancySize
:
number
)
:
Promise
<
void
>
Parameters
height:
number
redundancySize:
number
Returns
Promise
<
void
>
prune
Legacy
Transaction
Meta
prune
Legacy
Transaction
Meta
(
targetApiLevel
:
number
)
:
Promise
<
void
>
Parameters
targetApiLevel:
number
Returns
Promise
<
void
>
raw
Listeners
raw
Listeners
(
event
:
string
|
symbol
)
:
Function
[]
Parameters
event:
string
|
symbol
Returns
Function
[]
Private
ready
Handler
ready
Handler
(
payload
:
any
)
:
void
Parameters
payload:
any
Returns
void
remove
All
Listeners
remove
All
Listeners
(
event
?:
string
|
symbol
)
:
this
Parameters
Optional
event:
string
|
symbol
Returns
this
remove
Block
Meta
ByHeight
remove
Block
Meta
ByHeight
(
height
:
number
)
:
Promise
<
void
>
Parameters
height:
number
Returns
Promise
<
void
>
remove
Listener
remove
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
Private
review
Block
Index
For
Height
review
Block
Index
For
Height
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
Private
review
Block
Index
For
Transaction
Id
review
Block
Index
For
Transaction
Id
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
Private
review
Block
Meta
Index
For
Height
review
Block
Meta
Index
For
Height
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
Private
review
Block
Meta
Index
For
Time
review
Block
Meta
Index
For
Time
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
Private
review
Indexes
review
Indexes
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
Private
review
Transaction
Meta
Index
For
Height
review
Transaction
Meta
Index
For
Height
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
Private
review
Transaction
Meta
Index
For
Time
review
Transaction
Meta
Index
For
Time
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
Private
review
Transaction
Meta
Index
For
Transaction
Id
review
Transaction
Meta
Index
For
Transaction
Id
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
Private
review
Transaction
Meta
Index
For
Type
review
Transaction
Meta
Index
For
Type
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
set
Block
set
Block
(
height
:
number
, block
:
object
, options
?:
object
)
:
Promise
<
void
>
Parameters
height:
number
block:
object
Default value
options:
object
= {}
Returns
Promise
<
void
>
set
Block
Count
set
Block
Count
(
height
:
number
)
:
Promise
<
void
>
Parameters
height:
number
Returns
Promise
<
void
>
set
Block
Meta
set
Block
Meta
(
blockMeta
:
object
)
:
Promise
<
void
>
Parameters
blockMeta:
object
Returns
Promise
<
void
>
set
Max
Listeners
set
Max
Listeners
(
n
:
number
)
:
this
Parameters
n:
number
Returns
this
Private
set
Ready
set
Ready
(
)
:
void
Returns
void
set
Transaction
Meta
set
Transaction
Meta
(
transactionMeta
:
object
)
:
Promise
<
void
>
Parameters
transactionMeta:
object
Returns
Promise
<
void
>
Private
validate
Optional
Parameters
validate
Optional
Parameters
(
)
:
void
Returns
void
Static
listener
Count
listener
Count
(
emitter
:
EventEmitter
, event
:
string
|
symbol
)
:
number
deprecated
since v4.0.0
Parameters
emitter:
EventEmitter
event:
string
|
symbol
Returns
number
Globals
"analyzers/block-
analyzer"
"common/constants"
"common/profiles"
"core/api"
"core/mesh"
"core/node"
"core/syncer"
"delegates/rpc-
delegate"
"helpers/block-
helper"
"neo"
"storages/memory-
storage"
"storages/mongodb-
storage"
"storages/mongodb/block-
dao"
"storages/mongodb/block-
meta-
dao"
"storages/mongodb/schemas"
"storages/mongodb/transaction-
meta-
dao"
"storages/mongodb/utils"
"validators/endpoint-
validator"
"validators/mongodb-
validator"
"validators/neo-
validator"
"validators/rpc-
validator"
Mongodb
Storage
constructor
_is
Ready
block
Dao
block
Meta
Dao
logger
options
transaction
Meta
Dao
default
Max
Listeners
add
Listener
analyze
Block
Metas
analyze
Blocks
analyze
Transaction
Metas
close
count
Block
Redundancy
count
Legacy
Transaction
Meta
emit
event
Names
get
Block
get
Block
Count
get
Block
Meta
Count
get
Blocks
get
Highest
Block
Height
get
Highest
Block
Meta
Height
get
Max
Listeners
get
Transaction
init
Connection
is
Ready
listener
Count
listeners
off
on
once
prepend
Listener
prepend
Once
Listener
prune
Block
prune
Legacy
Transaction
Meta
raw
Listeners
ready
Handler
remove
All
Listeners
remove
Block
Meta
ByHeight
remove
Listener
review
Block
Index
For
Height
review
Block
Index
For
Transaction
Id
review
Block
Meta
Index
For
Height
review
Block
Meta
Index
For
Time
review
Indexes
review
Transaction
Meta
Index
For
Height
review
Transaction
Meta
Index
For
Time
review
Transaction
Meta
Index
For
Transaction
Id
review
Transaction
Meta
Index
For
Type
set
Block
set
Block
Count
set
Block
Meta
set
Max
Listeners
set
Ready
set
Transaction
Meta
validate
Optional
Parameters
listener
Count
Mongodb
Storage
Options
MODULE_
NAME
mongoose
DEFAULT_
OPTIONS
Generated using
TypeDoc