Skip to main content

response

Creates a default response object

Import

You can import the entire package and access the function:


_10
import * as sdk from "@onflow/sdk"
_10
_10
sdk.response()

Or import directly the specific function:


_10
import { response } from "@onflow/sdk"
_10
_10
response()

Usage


_10
import { response } from "@onflow/sdk"
_10
_10
// Create a default response object
_10
const defaultResponse = response();
_10
console.log(defaultResponse.transaction); // null
_10
console.log(defaultResponse.account); // null
_10
console.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


Rate this page