MultichainClient
Api Code Documentation / Exports / service/Client.h / MultichainClient
service/Client.h.MultichainClient
Implemented by
Table of contents
Methods
- getInfo
- getLastBlockInfo
- getLatestValues
- getOrCreateStream
- getPeerInfo
- getRpcClient
- getValue
- getValues
- isValidAddress
- latestValuesForKey
- listBlocksByHeight
- listStreamBlockItemsByHeight
- ping
- setValue
- streamItems
- streams
- updateStreamItem
- updateValue
- v2_readStreamItems
Methods
getInfo
▸ getInfo(): any
Returns
any
Defined in
getLastBlockInfo
▸ getLastBlockInfo(skip?
): Promise
<BlockInfo
>
Get the latest block, possibly skipping a few.
Parameters
Name | Type | Description |
---|---|---|
skip? | number | number of blocks to skip, default 0 (= latest block) |
Returns
Promise
<BlockInfo
>
Defined in
getLatestValues
▸ getLatestValues(streamName
, key
, nValues?
): Promise
<StreamItemPair
[]>
Parameters
Name | Type |
---|---|
streamName | string |
key | string |
nValues? | number |
Returns
Promise
<StreamItemPair
[]>
Defined in
getOrCreateStream
▸ getOrCreateStream(options
): any
Parameters
Name | Type |
---|---|
options | CreateStreamOptions |
Returns
any
Defined in
getPeerInfo
▸ getPeerInfo(): Promise
<PeerInfo
[]>
Returns
Promise
<PeerInfo
[]>
Defined in
getRpcClient
▸ getRpcClient(): RpcClient
Returns
Defined in
getValue
▸ getValue(streamName
, key
): Promise
<StreamItemPair
>
Parameters
Name | Type |
---|---|
streamName | string |
key | string |
Returns
Promise
<StreamItemPair
>
Defined in
getValues
▸ getValues(streamName
, key
, nValues?
): Promise
<StreamItemPair
[]>
Parameters
Name | Type |
---|---|
streamName | string |
key | string |
nValues? | number |
Returns
Promise
<StreamItemPair
[]>
Defined in
isValidAddress
▸ isValidAddress(address
): Promise
<any
>
Parameters
Name | Type |
---|---|
address | string |
Returns
Promise
<any
>
Defined in
latestValuesForKey
▸ latestValuesForKey(streamId
, key
, nValues?
): Promise
<any
[]>
Parameters
Name | Type |
---|---|
streamId | string |
key | string |
nValues? | number |
Returns
Promise
<any
[]>
Defined in
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
Name | Type | Description |
---|---|---|
to | number | highest block height to return (inclusive) |
from? | number | lowest block to return (inclusive), defaults to 0 |
verbose? | boolean | verbose output, defaults to false |
Returns
Promise
<BlockListItem
[]>
Defined in
listStreamBlockItemsByHeight
▸ listStreamBlockItemsByHeight(streamName
, to
, from?
, verbose?
): Promise
<Item
[]>
Retrieve all items within a stream by block height range.
Parameters
Name | Type | Description |
---|---|---|
streamName | string | Stream Name to Read |
to | number | Highest block height to retrieve (inclusive) |
from? | number | Lowest block height to retrieve (inclusive), defaults to 0 |
verbose? | boolean | Get verbose data (not typed!) |
Returns
Promise
<Item
[]>
Defined in
ping
▸ ping(): any
Returns
any
Defined in
setValue
▸ setValue(streamName
, streamKey
, object
): Promise
<void
>
Parameters
Name | Type |
---|---|
streamName | string |
streamKey | StreamKey |
object | any |
Returns
Promise
<void
>
Defined in
streamItems
▸ streamItems(streamId
): Promise
<StreamItem
[]>
Parameters
Name | Type |
---|---|
streamId | string |
Returns
Promise
<StreamItem
[]>
Defined in
streams
▸ streams(stream?
): Promise
<Stream
[]>
Parameters
Name | Type |
---|---|
stream? | string |
Returns
Promise
<Stream
[]>
Defined in
updateStreamItem
▸ updateStreamItem(streamId
, key
, object
): Promise
<string
>
Parameters
Name | Type |
---|---|
streamId | string |
key | string | string [] |
object | any |
Returns
Promise
<string
>
Defined in
updateValue
▸ updateValue(streamName
, key
, updateCallback
): Promise
<void
>
Parameters
Name | Type |
---|---|
streamName | string |
key | string |
updateCallback | (current : Resource ) => Resource |
Returns
Promise
<void
>
Defined in
v2_readStreamItems
▸ v2_readStreamItems(streamName
, key
, nValues?
): Promise
<Item
[]>
Parameters
Name | Type |
---|---|
streamName | string |
key | string |
nValues? | number |
Returns
Promise
<Item
[]>