# Send a Multisig Transaction

A web application may request Adena to broadcast a multisig transaction via the `BroadcastMultisigTransaction` method. This method allows you to submit a transaction along with the collected signatures from authorized signers. Upon the user's approval, Adena will broadcast the transaction to the blockchain.

**Note:** Unlike the UI-based broadcast method where you upload .tx and .sig files, the injection method manages all transaction data and signatures through code.

### Code

```typescript
adena.BroadcastMultisigTransaction(
  multisigDocument: MultisigTransactionDocument,
  multisigSignatures?: Signature[]
)
```

### Params

| Key                | Type   | Description                          |
| ------------------ | ------ | ------------------------------------ |
| multisigDocument   | object | Multisig Transaction Document Model  |
| multisigSignatures | array  | Array of Signature Models (optional) |

#### Multisig Transaction Document Model

| Key           | Type   | Description                                                                |
| ------------- | ------ | -------------------------------------------------------------------------- |
| tx            | RawTx  | The raw transaction object containing messages, fees, signatures, and memo |
| chainId       | string | The chain ID of the target blockchain (e.g., "staging", "portal-loop")     |
| accountNumber | string | The account number of the multisig account                                 |
| sequence      | string | The sequence number of the multisig account                                |

#### RawTx Model

| Key             | Type                    | Description                                                              |
| --------------- | ----------------------- | ------------------------------------------------------------------------ |
| msg             | RawTxMessageType\[]     | Array of transaction messages (BankSend, VmCall, VmAddPackage, or VmRun) |
| fee             | object                  | Fee object containing gas\_wanted and gas\_fee                           |
| fee.gas\_wanted | string                  | The maximum gas units allowed for the transaction                        |
| fee.gas\_fee    | string                  | The gas fee amount with denomination (e.g., "6113ugnot")                 |
| signatures      | RawSignature\[] \| null | Array of signatures or null if unsigned                                  |
| memo            | string                  | Optional memo text for the transaction                                   |

#### RawTxMessageType

| Message Type           | Description                                              |
| ---------------------- | -------------------------------------------------------- |
| RawBankSendMessage     | Message for sending tokens from one address to another   |
| RawVmCallMessage       | Message for calling a function in a Gno realm or package |
| RawVmAddPackageMessage | Message for adding a new package to the blockchain       |
| RawVmRunMessage        | Message for running Gno code                             |

#### Signature Model

| Key            | Type   | Description                                   |
| -------------- | ------ | --------------------------------------------- |
| pub\_key       | object | Public key object                             |
| pub\_key.type  | string | Public key type (e.g., `/tm.PubKeySecp256k1`) |
| pub\_key.value | string | Base64-encoded public key                     |
| signature      | string | Base64-encoded signature                      |

### Response

| Key     | Type   | Description                                 |
| ------- | ------ | ------------------------------------------- |
| code    | number | Code (success: 0)                           |
| status  | string | Returns success or failure                  |
| type    | string | Response type                               |
| message | string | Descriptive message of the result           |
| data    | object | Broadcast Multisig Transaction Result Model |

#### Broadcast Multisig Transaction Result Model

| Key         | Type   | Description      |
| ----------- | ------ | ---------------- |
| check\_tx   | object | CheckTx result   |
| deliver\_tx | object | DeliverTx result |
| hash        | string | Transaction hash |
| height      | string | Block height     |

### Sample Request

```typescript
await adena.BroadcastMultisigTransaction({
  tx: {
    msg: [
      {
        "@type": "/vm.m_call",
        func: "Approve",
        pkg_path: "gno.land/r/gnoland/wugnot",
        args: ["g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5", "100"],
        caller: "g1ksdqtg675y28vkua8zrghxzlgwtpyxwklp5gpf",
        send: "",
      },
    ],
    fee: {
      gas_wanted: "6112955",
      gas_fee: "6113ugnot",
    },
    signatures: [],
    memo: "",
  },
  chainId: "staging",
  accountNumber: "6224",
  sequence: "0",
}, [{
  "pub_key": {
    "@type": "/tm.PubKeySecp256k1",
    "value": "A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"
  },
  "signature": "..."
}]);

```

**Important:** Replace the following fields with your actual transaction details:

* `caller`: Your multisig account address
* `chainId`: Your target chain ID
* `accountNumber` and `sequence`: Your account's current values
* Signatures array: The collected signatures from authorized signers

### Sample Response

```json
{
    "status": "success",
    "data": {
        "broadcastResult": {
            "check_tx": {
                "ResponseBase": {
                    "Error": null,
                    "Data": "",
                    "Events": [],
                    "Log": "msg:0,success:true,log:,events:[]",
                    "Info": ""
                },
                "GasWanted": "6112955",
                "GasUsed": "35800"
            },
            "deliver_tx": {
                "ResponseBase": {
                    "Error": null,
                    "Data": "",
                    "Events": [],
                    "Log": "msg:0,success:true,log:,events:[]",
                    "Info": ""
                },
                "GasWanted": "6112955",
                "GasUsed": "65724"
            },
            "hash": "sd643Z4flCIe3YHMYIYKtVcNrb1paVWSe6vRGlRHABc=",
            "height": "4769"
        },
        "txExplorerUrl": "https://gnoscan.io/transactions/details?chainId=staging&txhash=sd643Z4flCIe3YHMYIYKtVcNrb1paVWSe6vRGlRHABc="
    },
    "code": 0,
    "message": "Transaction has been successfully executed.",
    "type": "TRANSACTION_SUCCESS"
}
```


---

# Agent Instructions: 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.adena.app/integrations/transactions/send-a-multisig-transaction.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.
