Doc autogenerated from onflow/sdk/src/transport/subscribe/subscribe.ts
subscribe
Subscribe to a topic and decode the data.
Import
_10import { subscribe } from "@onflow/sdk"
Parameters
options
- Type:
SubscribeParams
_10export type SubscribeParams<T extends SubscriptionTopic> = {_10 topic: T_10 args: SubscriptionArgs<T>_10 onData: (data: SubscriptionData<T>) => void_10 onError: (error: Error) => void_10}
opts
(optional)
- Type:
SdkTransport;
- Description: - Additional options for the subscription.