Skip to main content

API reference v103.0.0-rc.12

Type Aliases

BrandedString<T>

BrandedString<T>: string & object

Type declaration

__brand

__brand: T

Type Parameters

T


DhtAddress

DhtAddress: BrandedString<"DhtAddress">


EnvironmentId

EnvironmentId: "polygon" | "polygonAmoy" | "dev2"


EthereumAddress

EthereumAddress: BrandedString<"EthereumAddress">


GapFillStrategy

GapFillStrategy: "light" | "full"


IdentityConfig

IdentityConfig: KeyPairIdentityConfig | EthereumProviderIdentityConfig | CustomIdentityConfig


KeyType

KeyType: typeof validKeyTypeValues[number]


LogLevel

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


MessageListener()

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

Parameters

content

unknown

metadata

MessageMetadata

Returns

unknown | Promise<unknown>


MessageMetadata

MessageMetadata: Omit<Message, "content">


MessageSignatureType

MessageSignatureType: KeyType | "ECDSA_SECP256K1_LEGACY" | "ERC_1271"


MetricsDefinition

MetricsDefinition: Record<string, Metric>


MetricsReport

MetricsReport: object & Record<string, any>

Type declaration

period

period: object

period.end

end: number

period.start

start: number


PermissionAssignment

PermissionAssignment: UserPermissionAssignment | PublicPermissionAssignment


PermissionQuery

PermissionQuery: UserPermissionQuery | PublicPermissionQuery


ResendOptions

ResendOptions: ResendLastOptions | ResendFromOptions | ResendRangeOptions

The supported resend types.


SignerWithProvider

SignerWithProvider: AbstractSigner<Provider>

The AbstractSigner type is from the ethers library.


StreamDefinition

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


StreamID

StreamID: BrandedString<"StreamID">


StreamMessageAESEncrypted

StreamMessageAESEncrypted: StreamMessage & object

Encrypted StreamMessage.

Type declaration

encryptionType

encryptionType: AES

groupKeyId

groupKeyId: string


StreamMetadata

StreamMetadata: Record<string, unknown>


StreamPartID

StreamPartID: BrandedString<"StreamPartID">


StrictStreamrClientConfig

StrictStreamrClientConfig: MarkOptional<Required<StreamrClientConfig>, "auth" | "metrics"> & object

Type declaration

cache

cache: Exclude<Required<StreamrClientConfig["cache"]>, undefined>

contracts

contracts: Exclude<Required<StreamrClientConfig["contracts"]>, undefined>

encryption

encryption: Exclude<Required<StreamrClientConfig["encryption"]>, undefined>

network

network: Exclude<Required<StreamrClientConfig["network"]>, undefined>


SubscribeOptions

SubscribeOptions: StreamDefinition & ExtraSubscribeOptions


UserID

UserID: BrandedString<"UserID">

Variables

DEFAULT_ENVIRONMENT_ID

const DEFAULT_ENVIRONMENT_ID: EnvironmentId = 'polygon'


DEFAULT_KEY_TYPE

const DEFAULT_KEY_TYPE: KeyType = 'ECDSA_SECP256K1_EVM'


EncryptedGroupKey

EncryptedGroupKey: EncryptedGroupKey$Type

Generated

MessageType for protobuf message EncryptedGroupKey


ENVIRONMENT_IDS

const ENVIRONMENT_IDS: EnvironmentId[]


PeerDescriptor

PeerDescriptor: PeerDescriptor$Type

Generated

MessageType for protobuf message dht.PeerDescriptor


STREAMR_STORAGE_NODE_ADDRESS

const STREAMR_STORAGE_NODE_ADDRESS: string


STREAMR_STORAGE_NODE_GERMANY

const STREAMR_STORAGE_NODE_GERMANY: "0x31546eEA76F2B2b3C5cC06B1c93601dc35c9D916" = '0x31546eEA76F2B2b3C5cC06B1c93601dc35c9D916'

Deprecated

use STREAMR_STORAGE_NODE_ADDRESS instead


validKeyTypeValues

const validKeyTypeValues: readonly ["ECDSA_SECP256K1_EVM", "ML_DSA_87"]

This is where config keyTypes are connected to Identity implementations.

How to configure new Identity types:

  1. Add a new SignatureType entry to NetworkRpc.proto in network package
  2. Add the needed SigningUtil to signingUtils.ts
  3. Create the Identity implementation itself (eg. extend KeyPairIdentity)
  4. Wire everything together below

Functions

convertBytesToStreamMessage()

convertBytesToStreamMessage(bytes): StreamMessage

Parameters

bytes

Uint8Array

Returns

StreamMessage


convertStreamMessageToBytes()

convertStreamMessageToBytes(oldStreamMessage): Uint8Array

Parameters

oldStreamMessage

StreamMessage

Returns

Uint8Array


formStorageNodeAssignmentStreamId()

formStorageNodeAssignmentStreamId(clusterAddress): StreamID

Parameters

clusterAddress

string

Returns

StreamID


getStreamPartitionCount()

getStreamPartitionCount(metadata): number

Parameters

metadata

StreamMetadata

Returns

number


parseStreamMetadata()

parseStreamMetadata(metadata): StreamMetadata

Parameters

metadata

string

Returns

StreamMetadata


peerDescriptorTranslator()

peerDescriptorTranslator(json): PeerDescriptor

Parameters

json

NetworkPeerDescriptor

Returns

PeerDescriptor

Enumerations

Classes

Important

Other

Interfaces

Important

Other