> For the complete documentation index, see [llms.txt](https://docs.blocto.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blocto.app/blocto-sdk/javascript-sdk/flow/authorization.md).

# Send Transaction

{% hint style="warning" %}
Before sending a transaction, user needs to connect to Blocto wallet first.
{% endhint %}

### Step 1 - Send transaction

```javascript
import * as fcl from "@blocto/fcl";

const SIMPLE_TRANSACTION = `\
transaction {
  execute {
    log("Hello World!!")
  }
}
`;


const transactionId = await fcl.mutate({
  cadence: SIMPLE_TRANSACTION,
  proposer: fcl.currentUser,
  payer: fcl.currentUser,
  limit: 50,
});

// The transactions status and events after being sealed
const transaction = await fcl.tx(transactionId).onceSealed();
```

### Step 2 - Authorizing a transaction

```javascript
import * as fcl from "@blocto/fcl";

const transactionId = await fcl.mutate({
  cadence: `
    transaction {
      prepare(acct: AuthAccount) {
        log("Hello from prepare")
      }
      execute {
        log("Hello from execute")
      }
    }
  `,
  proposer: fcl.currentUser,
  payer: fcl.currentUser,
  authorizations: [fcl.currentUser],
  limit: 50,
});

const transaction = await fcl.tx(transactionId).onceSealed();
console.log(transaction); // The transactions status and events after being sealed
```

{% embed url="<https://codesandbox.io/s/flow-sign-transaction-v2-lxgc0g>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blocto.app/blocto-sdk/javascript-sdk/flow/authorization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
