ResolveCallers
@twine-protocol/twine-core v0.1.0 • Docs
twine-js / @twine-protocol/twine-core / ResolveCallers
Type Alias: ResolveCallers
ResolveCallers:
object
An object containing methods to fetch twines
Used by the resolveHelper function
These methods may return null or throw an error if the twine is not found and the resolveHelper function will handle that.
These methods do not need to check the signature of the twine or anything, that is all handled by the resolveHelper function.
Type declaration
fetchChain
Fetch a chain
fetchPulse
Fetch a pulse
cache
?
TwineCache
| false
| null
A cache to use If set to false
or null
, no caching will be done Normally a resolver will keep a reference to its cache and simply pass it through in here. Example resolveHelper({ //... cache: this.cache })
requestCache
?
A cache to use for requests If set to false
or null
, no caching will be done This is a cache of pending requests, so that a lookup for the same twine is not made multiple times. It is sufficient to use a simple Map for this. Example //... resolveHelper({ //... requestCache: this.requestCache // a Map() })
Defined in
Last updated