Skip to main content

MultichainClient

Api Code Documentation / Exports / service/Client.h / MultichainClient

service/Client.h.MultichainClient

Implemented by#

Table of contents#

Methods#

Methods#

getInfo#

getInfo(): any

Returns#

any

Defined in#

src/service/Client.h.ts:138


getLastBlockInfo#

getLastBlockInfo(skip?): Promise<BlockInfo>

Get the latest block, possibly skipping a few.

Parameters#

NameTypeDescription
skip?numbernumber of blocks to skip, default 0 (= latest block)

Returns#

Promise<BlockInfo>

Defined in#

src/service/Client.h.ts:116


getLatestValues#

getLatestValues(streamName, key, nValues?): Promise<StreamItemPair[]>

Parameters#

NameType
streamNamestring
keystring
nValues?number

Returns#

Promise<StreamItemPair[]>

Defined in#

src/service/Client.h.ts:165


getOrCreateStream#

getOrCreateStream(options): any

Parameters#

NameType
optionsCreateStreamOptions

Returns#

any

Defined in#

src/service/Client.h.ts:129


getPeerInfo#

getPeerInfo(): Promise<PeerInfo[]>

Returns#

Promise<PeerInfo[]>

Defined in#

src/service/Client.h.ts:141


getRpcClient#

getRpcClient(): RpcClient

Returns#

RpcClient

Defined in#

src/service/Client.h.ts:179


getValue#

getValue(streamName, key): Promise<StreamItemPair>

Parameters#

NameType
streamNamestring
keystring

Returns#

Promise<StreamItemPair>

Defined in#

src/service/Client.h.ts:168


getValues#

getValues(streamName, key, nValues?): Promise<StreamItemPair[]>

Parameters#

NameType
streamNamestring
keystring
nValues?number

Returns#

Promise<StreamItemPair[]>

Defined in#

src/service/Client.h.ts:162


isValidAddress#

isValidAddress(address): Promise<any>

Parameters#

NameType
addressstring

Returns#

Promise<any>

Defined in#

src/service/Client.h.ts:145


latestValuesForKey#

latestValuesForKey(streamId, key, nValues?): Promise<any[]>

Parameters#

NameType
streamIdstring
keystring
nValues?number

Returns#

Promise<any[]>

Defined in#

src/service/Client.h.ts:148


listBlocksByHeight#

listBlocksByHeight(to, from?, verbose?): Promise<BlockListItem[]>

Retrieve all blocks metadata by block height range. You can retrieve the current maximum block height through calling getLastBlockInfo

Parameters#

NameTypeDescription
tonumberhighest block height to return (inclusive)
from?numberlowest block to return (inclusive), defaults to 0
verbose?booleanverbose output, defaults to false

Returns#

Promise<BlockListItem[]>

Defined in#

src/service/Client.h.ts:126


listStreamBlockItemsByHeight#

listStreamBlockItemsByHeight(streamName, to, from?, verbose?): Promise<Item[]>

Retrieve all items within a stream by block height range.

Parameters#

NameTypeDescription
streamNamestringStream Name to Read
tonumberHighest block height to retrieve (inclusive)
from?numberLowest block height to retrieve (inclusive), defaults to 0
verbose?booleanGet verbose data (not typed!)

Returns#

Promise<Item[]>

Defined in#

src/service/Client.h.ts:195


ping#

ping(): any

Returns#

any

Defined in#

src/service/Client.h.ts:143


setValue#

setValue(streamName, streamKey, object): Promise<void>

Parameters#

NameType
streamNamestring
streamKeyStreamKey
objectany

Returns#

Promise<void>

Defined in#

src/service/Client.h.ts:171


streamItems#

streamItems(streamId): Promise<StreamItem[]>

Parameters#

NameType
streamIdstring

Returns#

Promise<StreamItem[]>

Defined in#

src/service/Client.h.ts:135


streams#

streams(stream?): Promise<Stream[]>

Parameters#

NameType
stream?string

Returns#

Promise<Stream[]>

Defined in#

src/service/Client.h.ts:132


updateStreamItem#

updateStreamItem(streamId, key, object): Promise<string>

Parameters#

NameType
streamIdstring
keystring | string[]
objectany

Returns#

Promise<string>

Defined in#

src/service/Client.h.ts:155


updateValue#

updateValue(streamName, key, updateCallback): Promise<void>

Parameters#

NameType
streamNamestring
keystring
updateCallback(current: Resource) => Resource

Returns#

Promise<void>

Defined in#

src/service/Client.h.ts:173


v2_readStreamItems#

v2_readStreamItems(streamName, key, nValues?): Promise<Item[]>

Parameters#

NameType
streamNamestring
keystring
nValues?number

Returns#

Promise<Item[]>

Defined in#

src/service/Client.h.ts:181