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:
_10import * as sdk from "@onflow/sdk"_10_10sdk.resolve(context)
Or import directly the specific function:
_10import { resolve } from "@onflow/sdk"_10_10resolve(context)
Usage
_11import { resolve, build, script } from "@onflow/sdk"_11_11const interaction = await build([_11 script`_11 access(all) fun main(): String {_11 return "Hello, World!"_11 }_11 `_11])_11_11const resolved = await resolve(interaction)
Parameters
context
- Type:
_12export 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}