npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xyo-network/diviner-jsonpath

v5.3.30

Published

Primary SDK for using XYO Protocol 2.0

Readme

logo

@xyo-network/diviner-jsonpath

npm license

Primary SDK for using XYO Protocol 2.0

Install

Using npm:

npm install {{name}}

Using yarn:

yarn add {{name}}

Using pnpm:

pnpm add {{name}}

Using bun:

bun add {{name}}

License

See the LICENSE file for license rights and limitations (LGPL-3.0-only).

Reference

packages

modules

### packages

  ### diviner

    ### packages

      ### jsonpath

        ### .temp-typedoc

          ### classes

            ### <a id="JsonPathDiviner"></a>JsonPathDiviner

@xyo-network/diviner-jsonpath


Extends

  • AbstractDiviner<TParams, TIn, TOut, TEventData>

Type Parameters

TParams

TParams extends JsonPathDivinerParams = JsonPathDivinerParams

TIn

TIn extends Payload = Payload

TOut

TOut extends Payload = Payload

TEventData

TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>

Constructors

Constructor

new JsonPathDiviner<TParams, TIn, TOut, TEventData>(key, params): JsonPathDiviner<TParams, TIn, TOut, TEventData>;

Parameters

key

unknown

params

Partial<TParams & RequiredCreatableParams>

Returns

JsonPathDiviner<TParams, TIn, TOut, TEventData>

Inherited from

AbstractDiviner<TParams, TIn, TOut, TEventData>.constructor

Properties

targetSchema

readonly static targetSchema: Schema;

Inherited from

AbstractDiviner.targetSchema

uniqueName

readonly static uniqueName: string;

Inherited from

AbstractDiviner.uniqueName

configSchemas

readonly static configSchemas: Schema[];

Overrides

AbstractDiviner.configSchemas

defaultConfigSchema

readonly static defaultConfigSchema: Schema;

Overrides

AbstractDiviner.defaultConfigSchema

_transforms

protected _transforms: 
  | PayloadTransformer[]
  | undefined;

allowRandomAccount

readonly static allowRandomAccount: boolean;

Inherited from

AbstractDiviner.allowRandomAccount

defaultLogger

static defaultLogger: Logger;

Inherited from

AbstractDiviner.defaultLogger

enableLazyLoad

static enableLazyLoad: boolean;

Inherited from

AbstractDiviner.enableLazyLoad

labels

readonly static labels: Labels;

Inherited from

AbstractDiviner.labels

privateConstructorKey

protected static privateConstructorKey: string;

Inherited from

AbstractDiviner.privateConstructorKey

_account

protected _account: AccountInstance | undefined;

Inherited from

AbstractDiviner._account

_cachedManifests

protected _cachedManifests: LRUCache<number, ModuleManifestPayload, unknown>;

Inherited from

AbstractDiviner._cachedManifests

_globalReentrancyMutex

protected _globalReentrancyMutex: Mutex | undefined;

Inherited from

AbstractDiviner._globalReentrancyMutex

_lastError?

protected optional _lastError?: ModuleDetailsError;

Inherited from

AbstractDiviner._lastError

_moduleConfigQueryValidator

protected _moduleConfigQueryValidator: Queryable | undefined;

Inherited from

AbstractDiviner._moduleConfigQueryValidator

_supportedQueryValidator

protected _supportedQueryValidator: Queryable | undefined;

Inherited from

AbstractDiviner._supportedQueryValidator

useNewResolver

readonly static useNewResolver: false = false;

Inherited from

AbstractDiviner.useNewResolver

Accessors

queries

Get Signature

get queries(): Schema[];

Returns

Schema[]

Inherited from

AbstractDiviner.queries

destinationSchema

Get Signature

get protected destinationSchema(): Schema;

The schema to use for the destination payloads

Returns

Schema


transforms

Get Signature

get protected transforms(): PayloadTransformer[];

Dictionary of schemas to payload transformers for creating indexes from the payloads within a Bound Witness

Returns

PayloadTransformer[]


account

Get Signature

get account(): AccountInstance;

Returns

AccountInstance

Inherited from

AbstractDiviner.account

additionalSigners

Get Signature

get additionalSigners(): AccountInstance[];

Returns

AccountInstance[]

Inherited from

AbstractDiviner.additionalSigners

address

Get Signature

get address(): Lowercase<string> & object & object;

Returns

Lowercase<string> & object & object

Inherited from

AbstractDiviner.address

allowAnonymous

Get Signature

get allowAnonymous(): boolean;

Returns

boolean

Inherited from

AbstractDiviner.allowAnonymous

allowNameResolution

Get Signature

get allowNameResolution(): boolean;

Returns

boolean

Inherited from

AbstractDiviner.allowNameResolution

archiving

Get Signature

get archiving(): 
  | {
  archivists?: ModuleIdentifier[];
  queries?: Schema[];
}
  | undefined;

Returns

| { archivists?: ModuleIdentifier[]; queries?: Schema[]; } | undefined

Inherited from

AbstractDiviner.archiving

archivist

Get Signature

get archivist(): ModuleIdentifier | undefined;

Returns

ModuleIdentifier | undefined

Inherited from

AbstractDiviner.archivist

config

Get Signature

get config(): TParams["config"] & object;

Returns

TParams["config"] & object

Inherited from

AbstractDiviner.config

dead

Get Signature

get dead(): boolean;

Returns

boolean

Inherited from

AbstractDiviner.dead

ephemeralQueryAccountEnabled

Get Signature

get ephemeralQueryAccountEnabled(): boolean;

Returns

boolean

Inherited from

AbstractDiviner.ephemeralQueryAccountEnabled

globalReentrancyMutex

Get Signature

get globalReentrancyMutex(): Mutex | undefined;

Returns

Mutex | undefined

Inherited from

AbstractDiviner.globalReentrancyMutex

id

Get Signature

get id(): string;

The name (if specified) or address of the module

Returns

string

Inherited from

AbstractDiviner.id

logger

Get Signature

get logger(): Logger | undefined;

Returns

Logger | undefined

Inherited from

AbstractDiviner.logger

priority

Get Signature

get priority(): 2;

Returns

2

Inherited from

AbstractDiviner.priority

reentrancy

Get Signature

get reentrancy(): 
  | {
  action: "skip" | "wait";
  scope: "global";
}
  | undefined;

Returns

| { action: "skip" | "wait"; scope: "global"; } | undefined

Inherited from

AbstractDiviner.reentrancy

statusReporter

Get Signature

get statusReporter(): 
  | ModuleStatusReporter & CreatableStatusReporter<void>
  | undefined;

The status reporter used to broadcast lifecycle changes.

Returns

| ModuleStatusReporter & CreatableStatusReporter<void> | undefined

Inherited from

AbstractDiviner.statusReporter

timestamp

Get Signature

get timestamp(): boolean;

Returns

boolean

Inherited from

AbstractDiviner.timestamp

moduleConfigQueryValidator

Get Signature

get protected moduleConfigQueryValidator(): Queryable;

Returns

Queryable

Inherited from

AbstractDiviner.moduleConfigQueryValidator

supportedQueryValidator

Get Signature

get protected supportedQueryValidator(): Queryable;

Returns

Queryable

Inherited from

AbstractDiviner.supportedQueryValidator

downResolver

Get Signature

get downResolver(): CompositeModuleResolver<CompositeModuleResolverParams>;

Returns

CompositeModuleResolver<CompositeModuleResolverParams>

Inherited from

AbstractDiviner.downResolver

modName

Get Signature

get modName(): string | undefined;

Returns

string | undefined

Inherited from

AbstractDiviner.modName

moduleIdentifierTransformers

Get Signature

get moduleIdentifierTransformers(): ModuleIdentifierTransformer[];

Returns

ModuleIdentifierTransformer[]

Inherited from

AbstractDiviner.moduleIdentifierTransformers

privateResolver

Get Signature

get privateResolver(): CompositeModuleResolver<CompositeModuleResolverParams>;

Returns

CompositeModuleResolver<CompositeModuleResolverParams>

Inherited from

AbstractDiviner.privateResolver

root

Get Signature

get root(): this;

Returns

this

Inherited from

AbstractDiviner.root

timeBudget

Get Signature

get timeBudget(): number | undefined;

Returns

number | undefined

Inherited from

AbstractDiviner.timeBudget

upResolver

Get Signature

get upResolver(): CompositeModuleResolver<CompositeModuleResolverParams>;

Returns

CompositeModuleResolver<CompositeModuleResolverParams>

Inherited from

AbstractDiviner.upResolver

Methods

divine()

divine(payloads?, retryConfigIn?): Promise<DivinerDivineResult<TOut>[]>;

Function

divine The main entry point for a diviner. Do not override this function. Implement/override divineHandler for custom functionality

Parameters

payloads?

TIn[]

retryConfigIn?

RetryConfigWithComplete<unknown>

Returns

Promise<DivinerDivineResult<TOut>[]>

Inherited from

AbstractDiviner.divine

divineQuery()

divineQuery(
   payloads?, 
   account?, 
_retry?): Promise<ModuleQueryResult<TOut>>;

Parameters

payloads?

TIn[]

account?

AccountInstance

_retry?

RetryConfig

Returns

Promise<ModuleQueryResult<TOut>>

Inherited from

AbstractDiviner.divineQuery

queryHandler()

protected queryHandler<T, TConfig>(
   query, 
   payloads?, 
queryConfig?): Promise<ModuleQueryHandlerResult>;

Function

queryHandler Calls divine for a divine query. Override to support additional queries.

Type Parameters

T

T extends UnsignedQueryBoundWitness = UnsignedQueryBoundWitness

TConfig

TConfig extends ModuleConfig = ModuleConfig

Parameters

query

T

payloads?

Payload[]

queryConfig?

TConfig

Returns

Promise<ModuleQueryHandlerResult>

Inherited from

AbstractDiviner.queryHandler

startHandler()

protected startHandler(): Promise<void>;

Returns

Promise<void>

Inherited from

AbstractDiviner.startHandler

stopHandler()

protected stopHandler(): Promise<void>;

Returns

Promise<void>

Inherited from

AbstractDiviner.stopHandler

divineHandler()

protected divineHandler(payloads?): Promise<TOut[]>;

Function

divineHandler Implement or override to add custom functionality to a diviner

Parameters

payloads?

TIn[]

Returns

Promise<TOut[]>

Overrides

AbstractDiviner.divineHandler

_getRootFunction()

static _getRootFunction(funcName): any;

Parameters

funcName

string

Returns

any

Inherited from

AbstractDiviner._getRootFunction

_noOverride()

static _noOverride(functionName): void;

Parameters

functionName

string

Returns

void

Inherited from

AbstractDiviner._noOverride

createHandler()

static createHandler<T>(inInstance): Promise<T & AbstractModule<any, any>>;

Static hook called during creation to perform additional initialization. Override in subclasses to customize post-construction setup.

Type Parameters

T

T extends CreatableInstance<CreatableParams, EventData>

Parameters

inInstance

T

Returns

Promise<T & AbstractModule<any, any>>

The instance, potentially modified

Inherited from

AbstractDiviner.createHandler

determineAccount()

static determineAccount(params): Promise<AccountInstance>;

Parameters

params

account?

AccountInstance | "random"

accountPath?

string

wallet?

WalletInstance

Returns

Promise<AccountInstance>

Inherited from

AbstractDiviner.determineAccount

factory()

static factory<TModule>(this, params?): CreatableModuleFactory<TModule>;

Type Parameters

TModule

TModule extends CreatableModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>

Parameters

this

CreatableModule<TModule>

params?

Partial<TModule["params"]>

Returns

CreatableModuleFactory<TModule>

Inherited from

AbstractDiviner.factory

isAllowedSchema()

static isAllowedSchema(schema): boolean;

Parameters

schema

Schema

Returns

boolean

Inherited from

AbstractDiviner.isAllowedSchema

paramsHandler()

static paramsHandler<T>(inParams?): Promise<T["params"]>;

Static hook called during creation to validate and transform params. Override in subclasses to add default values or validation.

Type Parameters

T

T extends AttachableModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>

Parameters

inParams?

Partial<T["params"]>

Returns

Promise<T["params"]>

The processed params ready for construction

Inherited from

AbstractDiviner.paramsHandler

_getRootFunction()

_getRootFunction(funcName): any;

Parameters

funcName

string

Returns

any

Inherited from

AbstractDiviner._getRootFunction

busy()

busy<R>(closure): Promise<R>;

Type Parameters

R

R

Parameters

closure

() => Promise<R>

Returns

Promise<R>

Inherited from

AbstractDiviner.busy

emit()

emit<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;

Emits an event, invoking all registered listeners concurrently.

Type Parameters

TEventName

TEventName extends string | number | symbol = keyof TEventData

TEventArgs

TEventArgs extends EventArgs = TEventData[TEventName]

Parameters

eventName

TEventName

The event to emit.

eventArgs

TEventArgs

The data to pass to listeners.

Returns

Promise<void>

Inherited from

AbstractDiviner.emit

isSupportedQuery()

isSupportedQuery(query, assert?): boolean;

Parameters

query

Schema

assert?

string | boolean

Returns

boolean

Inherited from

AbstractDiviner.isSupportedQuery

previousHash()

previousHash(): Promisable<string | undefined>;

Returns

Promisable<string | undefined>

Inherited from

AbstractDiviner.previousHash

query()

query<T, TConfig>(
   query, 
   payloads?, 
queryConfig?): Promise<ModuleQueryResult>;

Type Parameters

T

T extends UnsignedQueryBoundWitness = UnsignedQueryBoundWitness

TConfig

TConfig extends ModuleConfig = ModuleConfig

Parameters

query

T

payloads?

Payload[]

queryConfig?

TConfig

Returns

Promise<ModuleQueryResult>

Inherited from

AbstractDiviner.query

queryable()

queryable<T, TConfig>(
   query, 
   payloads?, 
queryConfig?): Promise<boolean>;

Type Parameters

T

T extends UnsignedQueryBoundWitness = UnsignedQueryBoundWitness

TConfig

TConfig extends ModuleConfig = ModuleConfig

Parameters

query

T

payloads?

Payload[]

queryConfig?

TConfig

Returns

Promise<boolean>

Inherited from

AbstractDiviner.queryable

_checkDead()

protected _checkDead(): void;

Returns

void

Inherited from

AbstractDiviner._checkDead

archivistInstance()

Call Signature

protected archivistInstance(): Promise<
  | ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload>
| undefined>;

Returns

Promise< | ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload> | undefined>

Inherited from

AbstractDiviner.archivistInstance

Call Signature

protected archivistInstance(required): Promise<ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload>>;

Parameters

required

true

Returns

Promise<ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload>>

Inherited from

AbstractDiviner.archivistInstance

bindHashes()

protected bindHashes(
   hashes, 
   schema, 
account?): PromiseEx<unknown, AccountInstance>;

Parameters

hashes

BrandedHash[]

schema

Schema[]

account?

AccountInstance

Returns

PromiseEx<unknown, AccountInstance>

Inherited from

AbstractDiviner.bindHashes

bindHashesInternal()

protected bindHashesInternal(
   hashes, 
   schema, 
   account?): Promise<{
  schema: "network.xyo.boundwitness" & object;
  addresses: Lowercase<string> & object & object[];
  payload_hashes: BrandedHash[];
  payload_schemas: BrandedSchema<string>[];
  previous_hashes: (BrandedHash | null)[];
  $destination?: Lowercase<string> & object & object;
  $sourceQuery?: BrandedHash;
  $signatures: (BrandedHex | null)[];
}>;

Parameters

hashes

BrandedHash[]

schema

Schema[]

account?

AccountInstance

Returns

Promise<{ schema: "network.xyo.boundwitness" & object; addresses: Lowercase<string> & object & object[]; payload_hashes: BrandedHash[]; payload_schemas: BrandedSchema<string>[]; previous_hashes: (BrandedHash | null)[]; $destination?: Lowercase<string> & object & object; $sourceQuery?: BrandedHash; $signatures: (BrandedHex | null)[]; }>

Inherited from

AbstractDiviner.bindHashesInternal

bindQuery()

protected bindQuery<T>(
   query, 
   payloads?, 
   account?, 
additionalSigners?): PromiseEx<[UnsignedQueryBoundWitness, Payload[], Payload[]], AccountInstance>;

Type Parameters

T

T extends Query

Parameters

query

T

payloads?

Payload[]

account?

AccountInstance

additionalSigners?

AccountInstance[]

Returns

PromiseEx<[UnsignedQueryBoundWitness, Payload[], Payload[]], AccountInstance>

Inherited from

AbstractDiviner.bindQuery

bindQueryInternal()

protected bindQueryInternal<T>(
   query, 
   payloads?, 
   account?, 
additionalSigners?): Promise<[UnsignedQueryBoundWitness, Payload[], Payload[]]>;

Type Parameters

T

T extends Query

Parameters

query

T

payloads?

Payload[]

account?

AccountInstance

additionalSigners?

AccountInstance[]

Returns

Promise<[UnsignedQueryBoundWitness, Payload[], Payload[]]>

Inherited from

AbstractDiviner.bindQueryInternal

bindQueryResult()

protected bindQueryResult<T>(
   query, 
   payloads, 
   additionalWitnesses?, 
errors?): Promise<ModuleQueryResult>;

Type Parameters

T

T extends Query

Parameters

query

T

payloads

Payload[]

additionalWitnesses?

AccountInstance[]

errors?

ModuleError[]

Returns

Promise<ModuleQueryResult>

Inherited from

AbstractDiviner.bindQueryResult

generateConfigAndAddress()

protected generateConfigAndAddress(_maxDepth?): Promisable<Payload[]>;

Parameters

_maxDepth?

number

Returns

Promisable<Payload[]>

Inherited from

AbstractDiviner.generateConfigAndAddress

generateDescribe()

protected generateDescribe(): Promise<ModuleDescriptionPayload>;

Returns

Promise<ModuleDescriptionPayload>

Inherited from

AbstractDiviner.generateDescribe

~~getArchivist()~~

protected getArchivist(): Promise<
  | ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload>
| undefined>;

Returns

Promise< | ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload> | undefined>

Deprecated

use archivistInstance() instead

Inherited from

AbstractDiviner.getArchivist

isAllowedArchivingQuery()

protected isAllowedArchivingQuery(schema): boolean;

Parameters

schema

Schema

Returns

boolean

Inherited from

AbstractDiviner.isAllowedArchivingQuery

moduleAddressHandler()

protected moduleAddressHandler(): Promisable<(AddressPayload | AddressPreviousHashPayload)[]>;

Returns

Promisable<(AddressPayload | AddressPreviousHashPayload)[]>

Inherited from

AbstractDiviner.moduleAddressHandler

stateHandler()

protected stateHandler(): Promise<Payload[]>;

Returns

Promise<Payload[]>

Inherited from

AbstractDiviner.stateHandler

subscribeHandler()

protected subscribeHandler(): void;

Returns

void

Inherited from

AbstractDiviner.subscribeHandler

validateConfig()

protected validateConfig(config?, parents?): boolean;

Parameters

config?

unknown

parents?

string[]

Returns

boolean

Inherited from

AbstractDiviner.validateConfig

addParent()

addParent(mod): void;

Parameters

mod

ModuleInstance

Returns

void

Inherited from

AbstractDiviner.addParent

certifyParents()

certifyParents(): Promise<Payload[]>;

Returns

Promise<Payload[]>

Inherited from

AbstractDiviner.certifyParents

createHandler()

createHandler(): Promise<void>;

Returns

Promise<void>

Inherited from

AbstractDiviner.createHandler

manifest()

manifest(maxDepth?): Promise<ModuleManifestPayload>;

Parameters

maxDepth?

number

Returns

Promise<ModuleManifestPayload>

Inherited from

AbstractDiviner.manifest

manifestQuery()

manifestQuery(account, maxDepth?): Promise<ModuleQueryResult<ModuleManifestPayload>>;

Parameters

account

AccountInstance

maxDepth?

number

Returns

Promise<ModuleQueryResult<ModuleManifestPayload>>

Inherited from

AbstractDiviner.manifestQuery

moduleAddress()

moduleAddress(): Promise<(AddressPayload | AddressPreviousHashPayload)[]>;

Returns

Promise<(AddressPayload | AddressPreviousHashPayload)[]>

Inherited from

AbstractDiviner.moduleAddress

parents()

parents(): Promisable<NodeInstance<NodeParams<AnyConfigSchema<NodeConfig>>, NodeModuleEventData>[]>;

Returns

Promisable<NodeInstance<NodeParams<AnyConfigSchema<NodeConfig>>, NodeModuleEventData>[]>

Inherited from

AbstractDiviner.parents

privateChildren()

privateChildren(): Promisable<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>;

Returns

Promisable<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>

Inherited from

AbstractDiviner.privateChildren

publicChildren()

publicChildren(): Promisable<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>;

Returns

Promisable<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>

Inherited from

AbstractDiviner.publicChildren

removeParent()

removeParent(address): void;

Parameters

address

BrandedAddress

Returns

void

Inherited from

AbstractDiviner.removeParent

resolve()

Call Signature

resolve(): Promise<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>;

Returns

Promise<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>

Inherited from

AbstractDiviner.resolve

Call Signature

resolve<T>(all, options?): Promise<T[]>;

Type Parameters

T

T extends ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>> = ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>

Parameters

all

"*"

options?

ModuleFilterOptions<T>

Returns

Promise<T[]>

Inherited from

AbstractDiviner.resolve

Call Signature

resolve<T>(id, options?): Promise<T | undefined>;

Type Parameters

T

T extends ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>> = ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>

Parameters

id

ModuleIdentifier

options?

ModuleFilterOptions<T>

Returns

Promise<T | undefined>

Inherited from

AbstractDiviner.resolve

resolveIdentifier()

resolveIdentifier(id, options?): Promise<BrandedAddress | undefined>;

Parameters

id

ModuleIdentifier

options?

ObjectFilterOptions<AnyObject>

Returns

Promise<BrandedAddress | undefined>

Inherited from

AbstractDiviner.resolveIdentifier

resolvePrivate()

Call Signature

resolvePrivate<T>(all, options?): Promise<T[]>;

Type Parameters

T

T extends ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>> = ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>

Parameters

all

"*"

options?

ModuleFilterOptions<T>

Returns

Promise<T[]>

Inherited from

AbstractDiviner.resolvePrivate

Call Signature

resolvePrivate<T>(id, options?): Promise<T | undefined>;

Type Parameters

T

T extends ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>> = ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>

Parameters

id

ModuleIdentifier

options?

ModuleFilterOptions<T>

Returns

Promise<T | undefined>

Inherited from

AbstractDiviner.resolvePrivate

siblings()

siblings(): Promise<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>;

Returns

Promise<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>

Inherited from

AbstractDiviner.siblings

state()

state(): Promise<Payload[]>;

Returns

Promise<Payload[]>

Inherited from

AbstractDiviner.state

stateQuery()

stateQuery(account): Promise<ModuleQueryResult>;

Parameters

account

AccountInstance

Returns

Promise<ModuleQueryResult>

Inherited from

AbstractDiviner.stateQuery

subscribe()

subscribe(_queryAccount?): void;

Parameters

_queryAccount?

AccountInstance

Returns

void

Inherited from

AbstractDiviner.subscribe

manifestHandler()

protected manifestHandler(maxDepth?, _ignoreAddresses?): Promise<ModuleManifestPayload>;

Parameters

maxDepth?

number

_ignoreAddresses?

BrandedAddress[]

Returns

Promise<ModuleManifestPayload>

Inherited from

AbstractDiviner.manifestHandler

resolveArchivingArchivists()

protected resolveArchivingArchivists(): Promise<ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload>[]>;

Returns

Promise<ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload>[]>

Inherited from

AbstractDiviner.resolveArchivingArchivists

sendQuery()

protected sendQuery<T, P, R>(
   queryPayload, 
   payloads?, 
account?): Promise<R[]>;

Type Parameters

T

T extends Query

P

P extends Payload = Payload

R

R extends Payload = Payload

Parameters

queryPayload

T

payloads?

P[]

account?

AccountInstance

Returns

Promise<R[]>

Inherited from

AbstractDiviner.sendQuery

sendQueryRaw()

protected sendQueryRaw<T, P, R>(
   queryPayload, 
   payloads?, 
account?): Promise<ModuleQueryResult<R>>;

Type Parameters

T

T extends Query

P

P extends Payload = Payload

R

R extends Payload = Payload

Parameters

queryPayload

T

payloads?

P[]

account?

AccountInstance

Returns

Promise<ModuleQueryResult<R>>

Inherited from

AbstractDiviner.sendQueryRaw

storeToArchivists()

protected storeToArchivists(payloads): Promise<Payload[]>;

Parameters

payloads

Payload[]

Returns

Promise<Payload[]>

Inherited from

AbstractDiviner.storeToArchivists
          ### interfaces

            ### <a id="JsonPathTransformExpression"></a>JsonPathTransformExpression

@xyo-network/diviner-jsonpath


Describes the JSON-path transformation to retrieve a field on a source object and the target field to store the value to on a destination object

Properties

defaultValue?

optional defaultValue?: unknown;

The default value to use if the source field does not exist


destinationField

destinationField: string;

The target field to store the source field into on the destination object


sourcePathExpression

sourcePathExpression: string;

The JSON path expressions for the source field on the source object

          ### type-aliases

            ### <a id="JsonPathDivinerConfig"></a>JsonPathDivinerConfig

@xyo-network/diviner-jsonpath


type JsonPathDivinerConfig = DivinerConfig<object & object>;

The configuration for the JSON Path diviner

            ### <a id="JsonPathDivinerConfigSchema"></a>JsonPathDivinerConfigSchema

@xyo-network/diviner-jsonpath


type JsonPathDivinerConfigSchema = typeof JsonPathDivinerConfigSchema;

The config schema type for the JSON Path diviner

            ### <a id="JsonPathDivinerParams"></a>JsonPathDivinerParams

@xyo-network/diviner-jsonpath


type JsonPathDivinerParams = DivinerParams<AnyConfigSchema<JsonPathDivinerConfig>>;

The params type the JSON Path diviner

            ### <a id="JsonPathDivinerSchema"></a>JsonPathDivinerSchema

@xyo-network/diviner-jsonpath


type JsonPathDivinerSchema = typeof JsonPathDivinerSchema;

The schema type used for the JSONPath Diviner.

            ### <a id="PayloadTransformer"></a>PayloadTransformer

@xyo-network/diviner-jsonpath


type PayloadTransformer = (x) => Partial<Payload>;

Parameters

x

Payload

Returns

Partial<Payload>

            ### <a id="SchemaToJsonPathTransformExpressionsDictionary"></a>SchemaToJsonPathTransformExpressionsDictionary

@xyo-network/diviner-jsonpath


type SchemaToJsonPathTransformExpressionsDictionary<T> = { [key in keyof T]: JsonPathTransformExpression[] };

A dictionary of schema to JSON Path transform expressions.

Type Parameters

T

T extends object = { [schema: Schema]: unknown; }

            ### <a id="SchemaToPayloadTransformersDictionary"></a>SchemaToPayloadTransformersDictionary

@xyo-network/diviner-jsonpath


type SchemaToPayloadTransformersDictionary = object;

A dictionary of schema to payload transformers

Index Signature

[schema: string]: PayloadTransformer[]
          ### variables

            ### <a id="JsonPathDivinerConfigSchema"></a>JsonPathDivinerConfigSchema

@xyo-network/diviner-jsonpath


const JsonPathDivinerConfigSchema: string & object;

The config schema for the JSON Path diviner

Type Declaration

__schema

readonly __schema: true;
            ### <a id="JsonPathDivinerSchema"></a>JsonPathDivinerSchema

@xyo-network/diviner-jsonpath


const JsonPathDivinerSchema: "network.xyo.diviner.jsonpath" & object;

The schema used for the JSONPath Diviner.

Type Declaration

__schema

readonly __schema: true;
            ### <a id="toPayloadTransformer"></a>toPayloadTransformer

@xyo-network/diviner-jsonpath


const toPayloadTransformer: (transformExpression) => PayloadTransformer;

Converts a JSON Path transform expression to a payload transformer

Parameters

transformExpression

JsonPathTransformExpression

The transform expression to convert

Returns

PayloadTransformer

The payload transformer for the JSON Path transform expression