Search
Preparing search index...
The search index is not available
redstone-smartweave
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
redstone-smartweave
CacheableStateEvaluator
Class CacheableStateEvaluator
An implementation of DefaultStateEvaluator that adds caching capabilities
Hierarchy
DefaultStateEvaluator
CacheableStateEvaluator
Index
Constructors
constructor
Methods
do
Read
State
eval
on
State
Update
Constructors
constructor
new
Cacheable
State
Evaluator
(
arweave
:
default
, cache
:
BlockHeightSwCache
<
EvalStateResult
<
unknown
>
>
, executionContextModifiers
?:
ExecutionContextModifier
[]
)
:
CacheableStateEvaluator
Parameters
arweave:
default
cache:
BlockHeightSwCache
<
EvalStateResult
<
unknown
>
>
executionContextModifiers:
ExecutionContextModifier
[]
= []
Returns
CacheableStateEvaluator
Methods
Protected
do
Read
State
do
Read
State<State>
(
missingInteractions
:
GQLEdgeInterface
[]
, baseState
:
EvalStateResult
<
State
>
, executionContext
:
ExecutionContext
<
State
,
HandlerApi
<
State
>
>
, currentTx
:
{
contractTxId
:
string
;
interactionTxId
:
string
}
[]
)
:
Promise
<
EvalStateResult
<
State
>
>
Type parameters
State
Parameters
missingInteractions:
GQLEdgeInterface
[]
baseState:
EvalStateResult
<
State
>
executionContext:
ExecutionContext
<
State
,
HandlerApi
<
State
>
>
currentTx:
{
contractTxId
:
string
;
interactionTxId
:
string
}
[]
Returns
Promise
<
EvalStateResult
<
State
>
>
eval
eval<State>
(
executionContext
:
ExecutionContext
<
State
,
HandlerApi
<
State
>
>
, currentTx
:
{
contractTxId
:
string
;
interactionTxId
:
string
}
[]
)
:
Promise
<
EvalStateResult
<
State
>
>
Type parameters
State
Parameters
executionContext:
ExecutionContext
<
State
,
HandlerApi
<
State
>
>
currentTx:
{
contractTxId
:
string
;
interactionTxId
:
string
}
[]
Returns
Promise
<
EvalStateResult
<
State
>
>
on
State
Update
on
State
Update<State>
(
currentInteraction
:
GQLNodeInterface
, executionContext
:
ExecutionContext
<
State
,
unknown
>
, state
:
EvalStateResult
<
State
>
)
:
Promise
<
void
>
Type parameters
State
Parameters
currentInteraction:
GQLNodeInterface
executionContext:
ExecutionContext
<
State
,
unknown
>
state:
EvalStateResult
<
State
>
Returns
Promise
<
void
>
Exports
Cacheable
State
Evaluator
constructor
do
Read
State
eval
on
State
Update
Generated using
TypeDoc
An implementation of DefaultStateEvaluator that adds caching capabilities