Skip to main content

resolve

Resolves an interaction by applying a series of resolvers in sequence.

This is the main resolver function that takes a built interaction and prepares it for submission to the Flow blockchain by applying all necessary resolvers.

The resolve function uses a pipeline approach, applying each resolver in sequence to transform the interaction from its initial built state to a fully resolved state ready for transmission to the Flow Access API.

Import

You can import the entire package and access the function:


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

Or import directly the specific function:


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

Usage


_11
import { resolve, build, script } from "@onflow/sdk"
_11
_11
const interaction = await build([
_11
script`
_11
access(all) fun main(): String {
_11
return "Hello, World!"
_11
}
_11
`
_11
])
_11
_11
const resolved = await resolve(interaction)

Parameters

interaction

  • Type: any
  • Description: The interaction object to resolve

Returns


_10
export type InteractionBuilderFn = (
_10
ix: Interaction
_10
) => Interaction | Promise<Interaction>

A promise that resolves to the fully resolved interaction


Rate this page