import CodeBlock from "@theme/CodeBlock";
import transaction from "!!raw-loader!../../../../../bindings/wasm/examples/09_transaction.js";

Sending value-based messages is a very straightforward process if you use the
[`MessageBuilder`](./../libraries/wasm/api_reference#messagebuilder) helper class. You will only need to provide a valid seed by chaining a call to 
[`.seed(seed: string)`](./../libraries/wasm/api_reference#messagebuilderseedseed--codemessagebuildercode) and 
an output address and amount by chaining a call to [`.output(address: string, amount: BigInt)`](./../libraries/wasm/api_reference#messagebuilderoutputaddress-amount--codemessagebuildercode). The method will find valid
output(s) that can be used to fund the given amount(s) and the unspent amount will be sent to the same address.

<CodeBlock className="language-javascript">{transaction}</CodeBlock>
