response
Creates a default response object
Import
You can import the entire package and access the function:
_10import * as sdk from "@onflow/sdk"_10_10sdk.response()
Or import directly the specific function:
_10import { response } from "@onflow/sdk"_10_10response()
Usage
_10import { response } from "@onflow/sdk"_10_10// Create a default response object_10const defaultResponse = response();_10console.log(defaultResponse.transaction); // null_10console.log(defaultResponse.account); // null_10console.log(defaultResponse.block); // null_10_10// Typically used internally by the SDK to initialize responses_10// You'll rarely need to use this directly in application code
Returns
_10{ tag: any; transaction: any; transactionStatus: any; transactionId: any; encodedData: any; events: any; event: any; accountStatusEvent: any; account: any; block: any; blockHeader: any; blockDigest: any; latestBlock: any; collection: any; networkParameters: any; streamConnection: any; heartbeat: any; nodeVersionInfo: any; }
A default response object