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
_20{_20 tag: any;_20 transaction: any;_20 transactionStatus: any;_20 transactionId: any;_20 encodedData: any;_20 events: any;_20 event: any;_20 accountStatusEvent: any;_20 account: any;_20 block: any;_20 blockHeader: any;_20 blockDigest: any;_20 latestBlock: any;_20 collection: any;_20 networkParameters: any;_20 streamConnection: any;_20 heartbeat: any;_20 nodeVersionInfo: any;_20}
A default response object