Builds transaction instructions based on the provided action type and parameters
// Bridge tokens exampleconst bridgeInstructions = await build( { account: myMultichainAccount }, { type: "intent", data: { amount: BigInt(1000000), mcToken: mcUSDC, toChain: optimism } }); Copy
// Bridge tokens exampleconst bridgeInstructions = await build( { account: myMultichainAccount }, { type: "intent", data: { amount: BigInt(1000000), mcToken: mcUSDC, toChain: optimism } });
// Default action exampleconst defaultInstructions = await build( { account: myMultichainAccount }, { type: "default", data: { instructions: myExistingInstruction } }); Copy
// Default action exampleconst defaultInstructions = await build( { account: myMultichainAccount }, { type: "default", data: { instructions: myExistingInstruction } });
BaseInstructionsParams Base configuration for instructions
Optional
BuildInstructionTypes The build action configuration
Promise resolving to an array of Instruction
Builds transaction instructions based on the provided action type and parameters
Example
Example