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


_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


Rate this page