Skip to main content

API reference

Streamr SDK version 8.5.0

Classes

Interfaces

Enums

Type Aliases

BrandedString

BrandedString\<T>: string & { __brand: T }

Type parameters

Name
T

ConnectionInfo

ConnectionInfo: Object

Type declaration

NameType
allowGzip?boolean
allowInsecureAuthentication?boolean
errorPassThrough?boolean
fetchOptions?Record\<string, string>
headers?{ [key: string]: string | number; }
password?string
skipFetchSetup?boolean
throttleCallback?(attempt: number, url: string) => Promise\<boolean>
throttleLimit?number
throttleSlotInterval?number
timeout?number
urlstring
user?string

EthereumAddress

EthereumAddress: BrandedString\<"EthereumAddress">


ExternalProvider

ExternalProvider: Object

Type declaration

NameType
host?string
isMetaMask?boolean
isStatus?boolean
path?string
request?(request: { method: string ; params?: any[] }) => Promise\<any>
send?(request: { method: string ; params?: any[] }, callback: (error: any, response: any) => void) => void
sendAsync?(request: { method: string ; params?: any[] }, callback: (error: any, response: any) => void) => void

GapFillStrategy

GapFillStrategy: "light" | "full"


LogLevel

LogLevel: "silent" | "fatal" | "error" | "warn" | "info" | "debug" | "trace"


MessageListener

MessageListener: (content: unknown, metadata: MessageMetadata) => unknown | Promise\<unknown>

Type declaration

▸ (content, metadata): unknown | Promise\<unknown>

Parameters
NameType
contentunknown
metadataMessageMetadata
Returns

unknown | Promise\<unknown>


MessageMetadata

MessageMetadata: Omit\<Message, "content">


MetricsDefinition

MetricsDefinition: Record\<string, Metric>


MetricsReport

MetricsReport: { period: { end: number ; start: number } } & Record\<string, any>


PermissionAssignment

PermissionAssignment: UserPermissionAssignment | PublicPermissionAssignment


PermissionQuery

PermissionQuery: UserPermissionQuery | PublicPermissionQuery


ResendOptions

ResendOptions: ResendLastOptions | ResendFromOptions | ResendRangeOptions

The supported resend types.


StreamDefinition

StreamDefinition: string | { id: string ; partition?: number } | { partition?: number ; stream: string } | { partition?: number ; streamId: string }


StreamID

StreamID: BrandedString\<"StreamID">


StreamMessageAESEncrypted

StreamMessageAESEncrypted\<T>: StreamMessage\<T> & { encryptionType: AES ; groupKeyId: string ; parsedContent: never }

Encrypted StreamMessage.

Type parameters

NameType
Tunknown

StreamPartID

StreamPartID: BrandedString\<"StreamPartID">


SubscribeOptions

SubscribeOptions: StreamDefinition & ExtraSubscribeOptions

Variables

CONFIG_TEST

Const CONFIG_TEST: StreamrClientConfig

Streamr client constructor options that work in the test environment


STREAMR_STORAGE_NODE_GERMANY

Const STREAMR_STORAGE_NODE_GERMANY: "0x31546eEA76F2B2b3C5cC06B1c93601dc35c9D916"


VALID_FIELD_TYPES

Const VALID_FIELD_TYPES: readonly ["number", "string", "boolean", "list", "map"]

Functions

formStorageNodeAssignmentStreamId

formStorageNodeAssignmentStreamId(clusterAddress): StreamID

Parameters

NameType
clusterAddressstring

Returns

StreamID