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(context)

Or import directly the specific function:


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

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

context

  • Type:

_12
export interface SdkContext {
_12
get accessNodeUrl(): string
_12
get transport(): SdkTransport
_12
get computeLimit(): number
_12
get customResolver(): ((args: any) => Promise<any>) | undefined
_12
get customDecoders(): {[key: string]: (data: any) => any}
_12
get contracts(): {
_12
[contractName: string]: string
_12
}
_12
get debug(): {[key: string]: any}
_12
get legacyContractIdentifiers(): Record<string, string>
_12
}

Returns

Promise<Interaction>


Rate this page