Skip to main content

RpcMultichainClient

Api Code Documentation / Exports / service/Client / RpcMultichainClient

service/Client.RpcMultichainClient

Implements#

Table of contents#

Constructors#

Properties#

Methods#

Constructors#

constructor#

new RpcMultichainClient(settings)

Parameters#

NameType
settingsConnectionSettings

Defined in#

src/service/Client.ts:46

Properties#

hasWriteLock#

Private hasWriteLock: boolean

Defined in#

src/service/Client.ts:44


rpcClient#

Private rpcClient: RpcClient

Defined in#

src/service/Client.ts:42

Methods#

getInfo#

getInfo(): Promise<any>

Returns#

Promise<any>

Implementation of#

MultichainClient.getInfo

Defined in#

src/service/Client.ts:134


getLastBlockInfo#

getLastBlockInfo(skip?): Promise<BlockInfo>

Get the latest block, possibly skipping a few.

Parameters#

NameTypeDefault value
skipnumber0

Returns#

Promise<BlockInfo>

Implementation of#

MultichainClient.getLastBlockInfo

Defined in#

src/service/Client.ts:243


getLatestValues#

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

Parameters#

NameTypeDefault value
streamNamestringundefined
keystringundefined
nValuesnumbermaxItemCount

Returns#

Promise<StreamItemPair[]>

Implementation of#

MultichainClient.getLatestValues

Defined in#

src/service/Client.ts:158


getOrCreateStream#

getOrCreateStream(options): Promise<string>

Parameters#

NameType
optionsCreateStreamOptions

Returns#

Promise<string>

Implementation of#

MultichainClient.getOrCreateStream

Defined in#

src/service/Client.ts:55


getPeerInfo#

getPeerInfo(): Promise<PeerInfo[]>

Returns#

Promise<PeerInfo[]>

Implementation of#

MultichainClient.getPeerInfo

Defined in#

src/service/Client.ts:247


getRpcClient#

getRpcClient(): RpcClient

Returns#

RpcClient

Implementation of#

MultichainClient.getRpcClient

Defined in#

src/service/Client.ts:51


getValue#

getValue(streamName, key): Promise<StreamItemPair>

Parameters#

NameType
streamNamestring
keystring

Returns#

Promise<StreamItemPair>

Implementation of#

MultichainClient.getValue

Defined in#

src/service/Client.ts:205


getValues#

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

Parameters#

NameTypeDefault value
streamNamestringundefined
keystringundefined
nValuesnumbermaxItemCount

Returns#

Promise<StreamItemPair[]>

Implementation of#

MultichainClient.getValues

Defined in#

src/service/Client.ts:138


isValidAddress#

isValidAddress(address): Promise<boolean>

Parameters#

NameType
addressstring

Returns#

Promise<boolean>

Implementation of#

MultichainClient.isValidAddress

Defined in#

src/service/Client.ts:129


latestValuesForKey#

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

Parameters#

NameTypeDefault value
streamIdstringundefined
keystringundefined
nValuesnumber1

Returns#

Promise<any[]>

Implementation of#

MultichainClient.latestValuesForKey

Defined in#

src/service/Client.ts:105


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#

NameTypeDefault value
tonumberundefined
fromstring | number0
verbosebooleanfalse

Returns#

Promise<BlockListItem[]>

Implementation of#

MultichainClient.listBlocksByHeight

Defined in#

src/service/Client.ts:255


listStreamBlockItemsByHeight#

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

Retrieve all items within a stream by block height range.

Parameters#

NameTypeDefault value
streamNamestringundefined
tonumberundefined
fromnumber0
verbosebooleanfalse

Returns#

Promise<Item[]>

Implementation of#

MultichainClient.listStreamBlockItemsByHeight

Defined in#

src/service/Client.ts:263


ping#

ping(): Promise<any>

Returns#

Promise<any>

Implementation of#

MultichainClient.ping

Defined in#

src/service/Client.ts:251


setValue#

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

Parameters#

NameType
streamNamestring
streamkeyStreamKey
objectany

Returns#

Promise<void>

Implementation of#

MultichainClient.setValue

Defined in#

src/service/Client.ts:218


streamItems#

streamItems(streamId): Promise<StreamItem[]>

Parameters#

NameType
streamIdstring

Returns#

Promise<StreamItem[]>

Implementation of#

MultichainClient.streamItems

Defined in#

src/service/Client.ts:92


streams#

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

Parameters#

NameType
name?string

Returns#

Promise<Stream[]>

Implementation of#

MultichainClient.streams

Defined in#

src/service/Client.ts:79


updateStreamItem#

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

Parameters#

NameType
streamIdstring
keystring
objectany

Returns#

Promise<string>

Implementation of#

MultichainClient.updateStreamItem

Defined in#

src/service/Client.ts:120


updateValue#

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

Parameters#

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

Returns#

Promise<void>

Implementation of#

MultichainClient.updateValue

Defined in#

src/service/Client.ts:223


v2_readStreamItems#

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

Parameters#

NameTypeDefault value
streamNamestringundefined
keystringundefined
nValuesnumbermaxItemCount

Returns#

Promise<Item[]>

Implementation of#

MultichainClient.v2_readStreamItems

Defined in#

src/service/Client.ts:280