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

object


Rate this page